refactor(ui): remove dead DS exports and unify wave gradient fallbacks (WS-G1)

Wave 5 G1 — evidence-based deletion only (docs/REFACTOR_WAVE5_AUDIT.md).

Deleted (references = 0 repo-wide, grep verified):
- apps/desktop/src/renderer/components/ProBadge.tsx (65 lines, self-reference only)
- apps/admin/src/lib/supabase-server.ts (unused duplicate of the web wrapper;
  api-client already owns createSupabaseServerClient)
- packages/ui: d3roSpace, d3roWeight, d3roMotion, darkTheme, lightTheme,
  getModePalette; `themes` kept module-private (used by getTheme)
- packages/ui-native: d3roNativeSpace, d3roNativeWeight, d3roNativeMotion,
  d3roNativeOverlayShadow, D3roNativePaletteKey (+ barrel entries)

Changed:
- ds/AudioVisualizerBar, ds/GradientWave: SSR/무-문서 폴백 hex 대신
  theme-raw RAW.dark.gradient 를 읽는다. 같은 색을 두 곳에 적지 않는다 (DP1).

Verification:
- npm run typecheck (desktop/web/admin/packages) GREEN
- npm run lint --max-warnings=0 GREEN
- npm run test GREEN
- npm run typecheck:mobile, lint:mobile GREEN; test:mobile 599 GREEN
- npm run check:design: 0 violations

Kept (with reason): apps/desktop/src/preload/popup.ts (electron-vite entry),
apps/*/src/proxy.ts (Next middleware), instrumentation.ts, *.d.ts,
constants.ts WAVE_BAR (화면 고유 수치, P4).
This commit is contained in:
Yun Chan 2026-11-08 20:55:40 +09:00
parent f57e40d82a
commit b8b91901eb
7 changed files with 25 additions and 135 deletions

View file

@ -1,65 +0,0 @@
// src/renderer/components/ProBadge.tsx
// Feature gate badge: renders children normally if unlocked,
// shows lock overlay with PRO badge if locked.
// v4(2026-09-28): 덮개는 키보드로도 누를 수 있는 버튼. 모노 글꼴·강조색 글자 제거 — 잠김은 강조가 아니다.
import { Box, ButtonBase, Typography } from '@mui/material'
import { Lock } from 'lucide-react'
import { d3roPalette, d3roRadius, d3roTransition, typoSx } from '@d3ro/ui/theme'
import { useProFeature } from '../hooks/useProFeature'
import { useI18n } from '@d3ro/i18n'
import type { Feature } from '@d3ro/core/types'
interface ProBadgeProps {
feature: Feature
children: React.ReactNode
}
export function ProBadge({ feature, children }: ProBadgeProps): React.ReactElement {
const { t } = useI18n()
const { unlocked, loading, showUpgrade } = useProFeature(feature)
// While loading or if unlocked, render children normally
if (loading || unlocked) {
return <>{children}</>
}
return (
<Box sx={{ position: 'relative' }}>
{/* 잠긴 내용은 흐리게, 조작 불가 */}
<Box aria-hidden sx={{ opacity: 0.35, pointerEvents: 'none' }}>
{children}
</Box>
<ButtonBase
onClick={showUpgrade}
aria-label={t('license.pro.required')}
sx={{
position: 'absolute',
inset: 0,
borderRadius: d3roRadius.inner,
transition: d3roTransition('background-color'),
'&:hover': { bgcolor: d3roPalette.surface.overlaySoft },
}}
>
<Box
sx={{
display: 'flex',
alignItems: 'center',
gap: 0.75,
px: 1.5,
py: 0.5,
borderRadius: d3roRadius.small,
bgcolor: d3roPalette.bg.elevated,
border: `1px solid ${d3roPalette.border.default}`,
}}
>
<Lock size={14} aria-hidden style={{ color: d3roPalette.text.secondary }} />
<Typography component="span" sx={{ ...typoSx('small'), fontWeight: 500, color: d3roPalette.text.primary }}>
{t('license.pro.required')}
</Typography>
</Box>
</ButtonBase>
</Box>
)
}