PageSourceSearch

https://snew.ai/assets/AuditPage-arYjfZ5E.js

js snew.ai collected 2026-10-05 15:08:34 UTC 17,996 bytes, 1 lines download raw bytes

1import{r as j,j as e}from"./index-L9AYrVUw.js";import{m as o,b1 as n,C as i,R as r,aC as d,b2 as u,aD as y}from"./PlanAccessModal-P_W2GThH.js";import"./productFunnel-DiJFcMU2.js";import"./locale-Cctu0V3Y.js";const x=[{page:"StudioAIModal",file:"src/components/board/StudioAIModal.tsx",severity:"med",category:"radius",title:"Radii consolidados em 5 bandas (mas ainda hardcoded)",detail:"Antes: 12 valores (3/4/5/6/8/10/12/14/16/24/99/999). Agora: 6/8/12/16/999 apenas — alinhado à escala oficial.",fix:"Próximo passo: substituir os literais numéricos por RADIUS.* de @/components/ui/tokens."},{page:"StudioAIModal",file:"src/components/board/StudioAIModal.tsx",severity:"ok",category:"color",title:"Paleta dark do modal promovida a tokens globais",detail:"Os 8 hex do chrome dark (bg/surface/surface2/border/borderHi/text/textDim/textMute) agora vivem como --color-modal-* em src/index.css e são expostos via COLOR.modal.* em tokens.ts. Valores fixos (theme-invariant) por design — o modal permanece dark em light mode intencionalmente.",fix:"Reutilizar COLOR.modal.* em qualquer novo componente full-screen dark antes de introduzir novos hex."},{page:"StudioAIModal",file:"src/components/board/StudioAIModal.tsx",severity:"ok",category:"font",title:"fontFamily hardcoded removido",detail:"Todas as declarações inline 'Inter, -apple-system, ...' foram apagadas — herda do body."},{page:"Home3",file:"src/pages/Home3Page.tsx",severity:"high",category:"color",title:"Cores pastel/marca hardcoded",detail:"#D4B896, #6B7B5A, #8B6F47, #A67C52, #00C2FF, #0A7A3B, #166534, #854D0E, #9A3412 — não estão no design system.",fix:"Se são cores de categoria (skill/gradient), promover para GRADIENTS/tokens em iconRegistry.ts. Se são semânticas, mapear para --color-text-success/warning/danger."},{page:"Home3",file:"src/pages/Home3Page.tsx",severity:"ok",category:"radius",title:"borderRadius: 4 corrigido",detail:"Único ocorrência migrada para RADIUS.sm (6px) e import de tokens adicionado."},{page:"SyncConfirm",file:"src/pages/onboarding/OnboardingStepSyncConfirm.tsx",severity:"ok",category:"radius",title:"Pill unificado em RADIUS.pill",detail:"Todos os 999/9999 substituídos por RADIUS.pill. Memória atualizada para citar o token como fonte de verdade."},{page:"SyncConfirm",file:"src/pages/onboarding/OnboardingStepSyncConfirm.tsx",severity:"ok",category:"color",title:"Escala de cinza migrada para tokens",detail:"7 tons hex substituídos por COLOR.bg.secondary/tertiary e COLOR.border.secondary — inclusive shimmers."},{page:"SyncConfirm",file:"src/pages/onboarding/OnboardingStepSyncConfirm.tsx",severity:"ok",category:"color",title:"Verde success migrado",detail:"#166534, #16a34a, #22c55e → hsl(${COLOR.text.success}) / bg.success."},{page:"Board3",file:"src/pages/Board3Page.tsx",severity:"ok",category:"radius",title:"Sem hardcodes detectados",detail:"Página delega renderização para AssetCreatorModal + Home3Sidebar. Consistência depende dos componentes filhos."},{page:"Onboarding (all)",file:"src/pages/onboarding/OnboardingLayout.tsx",severity:"ok",category:"spacing",title:"Layout 100% tokens",detail:"T importado de @/components/ui/tokens; usa COLOR/SPACE em tudo."},{page:"Global · ESLint",file:"eslint.config.js",severity:"ok",category:"spacing",title:"Trava institucional ativa",detail:"snew-tokens/no-hardcoded-{colors,radius,classnames} + prefer-token-import promovidos a `error` nos arquivos auditados. Restante do projeto continua em `warn` para migração incremental."},{page:"StudioAIModal",file:"src/components/board/StudioAIModal.tsx",severity:"ok",category:"font",title:"Hierarquia tipográfica unificada (primary/secondary/tertiary)",detail
1:"Chat, Presets e Cenas compartilham a mesma escala: primary 13/500 (T.text), secondary 12/400 (T.textDim), tertiary 10-11/400 (T.textMute). Labels ALL-CAPS 10/700 letter-spacing 0.4.",fix:"Reutilizar T.text / T.textDim / T.textMute em qualquer novo painel do modal — não introduzir novos níveis."},{page:"StudioAIModal",file:"src/components/board/StudioAIModal.tsx",severity:"ok",category:"spacing",title:"Grid de Cenas & Presets padronizado",detail:"Ambos os painéis usam grid 3 colunas, thumbnail 4:3, borderRadius 8, columnGap 8, rowGap 20, label 10/400. Sem borders nos cards — separação puramente por espaçamento.",fix:"Novo painel de biblioteca (poses, personagens) deve herdar o mesmo spec."},{page:"StudioAIModal",file:"src/components/board/StudioAIModal.tsx",severity:"ok",category:"color",title:"CTA manual para sugestão de presets",detail:"Painel de Presets não dispara mais fetch automático — user clica em 'Sugerir presets'. Thumbnails caem no bucket `style-references` quando o descriptor não traz imagem."}],C=[{token:"RADIUS.sm",value:"6px",pages:["Onboarding","Chat"]},{token:"RADIUS.md",value:"8px",pages:["Home3","SyncConfirm","Onboarding"]},{token:"RADIUS.lg",value:"12px",pages:["Onboarding","StudioAIModal (mismatch)"]},{token:"RADIUS.xl",value:"16px",pages:["Onboarding choice-cards"]},{token:"RADIUS.pill",value:"999px",pages:["Todos os botões (memória: rounded-full)"]}],R=["chip","sm","md","floatSoft","floatRaised","focusRing"],k=[1,2,3,4,5,6,7,8],b=[{id:"home",label:"Home",path:"/",note:"Dashboard entrypoint"},{id:"board3",label:"Board 3",path:"/board",note:"Canvas + AssetCreatorModal"},{id:"onb-goals",label:"Onboarding · Goals",path:"/onboarding/goals"},{id:"onb-source",label:"Onboarding · Source",path:"/onboarding/source"},{id:"onb-priority",label:"Onboarding · Priority",path:"/onboarding/priority"},{id:"onb-store",label:"Onboarding · Store",path:"/onboarding/store"},{id:"onb-pricing",label:"Onboarding · Pricing",path:"/onboarding/pricing"},{id:"onb-sync",label:"Onboarding · Sync Confirm",path:"/onboarding/sync-confirm"},{id:"studio-ai",label:"Studio AI Modal",path:"/studio-ai-modal",note:"Dark palette — verificar consistência"}],h=l=>({display:"grid",gridTemplateColumns:`repeat(${l}, minmax(0, 1fr))`,gap:o[3]}),s={page:{minHeight:"100vh",background:`hsl(${i.bg.tertiary})`,color:`hsl(${i.text.primary})`,fontFamily:n.sans,padding:`${o[8]} ${o[8]}`},wrap:{maxWidth:1280,margin:"0 auto"},h1:{fontSize:28,fontWeight:700,letterSpacing:"-0.02em",margin:0},sub:{fontSize:14,color:`hsl(${i.text.tertiary})`,marginTop:o[2]},section:{marginTop:o[8],background:`hsl(${i.bg.primary})`,borderRadius:r.lg,border:d.default,padding:o[6]},sectionTitle:{fontSize:11,fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:`hsl(${i.text.tertiary})`,margin:0,marginBottom:o[4]},card:{background:`hsl(${i.bg.primary})`,border:d.default,borderRadius:r.md,padding:o[4],display:"flex",flexDirection:"column",gap:o[2]},mono:{fontFamily:n.mono,fontSize:11,color:`hsl(${i.text.tertiary})`},tab:{padding:`${o[2]} ${o[4]}`,borderRadius:r.pill,border:d.default,background:`hsl(${i.bg.primary})`,fontSize:12,fontWeight:500,cursor:"pointer",color:`hsl(${i.text.secondary})`},tabActive:{background:`hsl(${i.text.primary})`,color:`hsl(${i.bg.primary})`,borderColor:"transparent"}},O={high:{bg:`hsl(${i.bg.danger})`,fg:`hsl(${i.text.danger})`,label:"HIGH"},med:{bg:`hsl(${i.bg.warning})`,fg:`hsl(${i.text.warning})`,label:"MED"},low:{bg:`hsl(${i.bg.info})`,fg:`hsl(${i.text.info})`,label:"LOW"},ok:{bg:`hsl(${i.bg.success})`,fg:`hsl(${i.text.success})`,label:"OK"}};function g({title:l,right:c,children:m}){return e.jsxs("section",{style:s.section,children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:o[4]},children:[e.jsx("h2",{style:s.sectionTitle,children:l}),c]}),m]})}function $({severity:l}){const c=O[l];return e.jsx("span",{style:{fontSize:10,fontWeight:700,letterSpacing:"0.05em",padding:`2px ${o[2]}`,borderRadius:r.sm,background:c.bg,color:c.fg},children:c.label})}function f({label:l,value:c,style:m}){return e.jsxs("div",{style:s.card,children:[e.jsx("div",{style:{height:56,borderRadius:r.sm,...m}}),e.jsx("div",{style:{fontSize:12,fontWeight:600},children:l}),e.jsx("div",{style:s.mono,children:c})]})}function w(){const[l,c]=j.useState(b[0].id),[m,v]=j.useState("all"),p=b.find(t=>
1t.id===l),S=x.filter(t=>m==="all"||t.severity===m),A=x.reduce((t,a)=>({...t,[a.severity]:(t[a.severity]??0)+1}),{high:0,med:0,low:0,ok:0});return e.jsx("div",{style:s.page,children:e.jsxs("div",{style:s.wrap,children:[e.jsxs("header",{style:{display:"flex",alignItems:"flex-end",justifyContent:"space-between"},children:[e.jsxs("div",{children:[e.jsx("h1",{style:s.h1,children:"Design Audit"}),e.jsx("p",{style:s.sub,children:"Consolidação de tokens e componentes das rotas Home 3, Board 3, Onboarding e Studio AI Modal."})]}),e.jsx("div",{style:s.mono,children:"/audit"})]}),e.jsx("div",{style:{...h(4),marginTop:o[6]},children:["high","med","low","ok"].map(t=>e.jsxs("button",{onClick:()=>v(m===t?"all":t),style:{...s.card,alignItems:"flex-start",cursor:"pointer",outline:m===t?`2px solid hsl(${i.text.primary})`:"none",outlineOffset:-2},children:[e.jsx($,{severity:t}),e.jsx("div",{style:{fontSize:32,fontWeight:700,letterSpacing:"-0.02em"},children:A[t]}),e.jsx("div",{style:{fontSize:12,color:`hsl(${i.text.tertiary})`},children:t==="high"?"quebra o sistema":t==="med"?"atenção":t==="low"?"melhoria":"conforme"})]},t))}),e.jsx(g,{title:`Inconsistências detectadas · ${S.length} / ${x.length}`,right:m!=="all"?e.jsx("button",{onClick:()=>v("all"),style:{...s.tab,fontSize:11},children:"Clear filter"}):null,children:e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:o[2]},children:S.map((t,a)=>e.jsxs("div",{style:{...s.card,flexDirection:"row",alignItems:"flex-start",gap:o[4]},children:[e.jsx("div",{style:{minWidth:60},children:e.jsx($,{severity:t.severity})}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4},children:[e.jsxs("div",{style:{display:"flex",gap:o[2],alignItems:"baseline"},children:[e.jsx("span",{style:{fontSize:13,fontWeight:600},children:t.title}),e.jsxs("span",{style:{...s.mono,fontSize:10},children:[t.page," · ",t.category]})]}),e.jsx("div",{style:{fontSize:12,color:`hsl(${i.text.secondary})`,lineHeight:1.5},children:t.detail}),t.fix&&e.jsxs("div",{style:{fontSize:12,color:`hsl(${i.text.success})`,lineHeight:1.5},children:["→ ",t.fix]}),e.jsx("div",{style:{...s.mono,fontSize:10},children:t.file})]})]},a))})}),e.jsx(g,{title:"Cores · text / bg / border",children:e.jsxs("div",{style:h(4),children:[Object.entries(i.text).map(([t,a])=>e.jsx(f,{label:`text.${t}`,value:a,style:{background:`hsl(${a})`,border:d.default}},`t-${t}`)),Object.entries(i.bg).map(([t,a])=>e.jsx(f,{label:`bg.${t}`,value:a,style:{background:`hsl(${a})`,border:d.default}},`b-${t}`)),Object.entries(i.border).map(([t,a])=>e.jsx(f,{label:`border.${t}`,value:a,style:{background:`hsl(${i.bg.primary})`,border:`2px solid hsl(${a})`}},`br-${t}`))]})}),e.jsxs(g,{title:"Radius · escala oficial",children:[e.jsx("div",{style:h(5),children:Object.entries(r).map(([t,a])=>e.jsxs("div",{style:s.card,children:[e.jsx("div",{style:{height:72,background:`hsl(${i.bg.secondary})`,border:d.emphasis,borderRadius:a}}),e.jsxs("div",{style:{fontSize:12,fontWeight:600},children:["RADIUS.",t]}),e.jsx("div",{style:s.mono,children:a})]},t))}),e.jsx("div",{style:{marginTop:o[4],display:"flex",flexDirection:"column",gap:o[1]},children:C.map(t=>e.jsxs("div",{style:{...s.mono,fontSize:12},children:[e.jsx("b",{children:t.token})," (",t.value,") — ",t.pages.join(", ")]},t.token))})]}),e.jsx(g,{title:"Spacing · escala 4px",children:e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:o[2]},children:k.map(t=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:o[4]},children:[e.jsxs("div",{style:{...s.mono,width:80},children:["SPACE.",t]}),e.jsx("div",{style:{height:16,width:`var(--snew-space-${t})`,background:`hsl(${i.text.primary})`,borderRadius:r.sm}}),e.jsxs("div",{style:s.mono,children:[[4,8,12,16,20,24,32,40][t-1],"px"]})]},t))})}),e.jsx(g,{title:"Shadow · elevação",children:e.jsx("div",{style:h(3),children:R.map(t=>e.jsxs("div",{style:{...s.card,boxShadow:u[t],minHeight:100,justifyContent:"flex-end"},children:[e.jsxs("div",{style:{fontSize:12,fontWeight:600},children:["SHADOW.",t]}),e.jsx("div",{style:s.mono,children:u[t]})]},t))})}),e.jsx(g,{title:"Typography",children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:o[3]},children:[e.jsx("div",{style:{fontFamily:n.sans,fontSize:32,fontWeight:700,letterSpacing:"-0.02em"},children:"Inter · Page Title 32/700"}),e.jsx("div",{style:{fontFamily:n.sans,fontSize:18,fontWeight:600},children:"Section title 18/600"}),e.jsx("div",{style:{fontFamily:n.sans,fontSize:14,fontWeight:500},children:"Body 14/500"}),e.jsx("div",{style:{fontFamily:n.sans,fontSize:13,fontWeight:400,color:`hsl(${i.text.secondary})`},children:"Secondary 13/400"}),e.jsx("div",{style:{fontFamily:n.sans,fontSize:11,fontWeight:500,letterSpacing:"0.08em",textTransform:"uppercase",color:`hsl(${i.text.tertiary})`},children:"Label 11/500 uppercase"}),e.jsx("div",{style:{fontFamily:n.mono,fontSize:12},children:"Mono 12/400 — IBM Plex Mono"}),e.jsx("div",{style:{fontFamily:n.serif,fontSize:24},children:"DM Serif Display 24 — display accent"})]})}),e.jsx(g,{title:"Controles · altura padrão + botão pill",children:e.jsxs("div",{style:{display:"flex",gap:o[3],alignItems:"center",flexWrap:"wrap"},children:[["sm","md","lg"].map(t=>e.jsxs("button",{style:{height:y[t],padding:`0 ${o[4]}`,borderRadius:r.pill,background:`hsl(${i.text.primary})`,color:`hsl(${i.bg.primary})`,border:"none",fontSize:13,fontWeight:500,cursor:"pointer",fontFamily:n.sans},children:["Button ",t," · ",y[t]]},t)),e.jsx("input",{placeholder:"Input md",style:{height:y.md,padding:`0 ${o[4]}`,borderRadius:r.md,border:d.default,background:`hsl(${i.bg.primary})`,fontFamily:n.sans,fontSize:13,minWidth:220}})]})}),e.jsx(g,{title:"Studio AI Modal · palette dark + hierarquia",children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:o[4]},children:[e.jsxs("div",{style:{fontSize:12,color:`hsl(${i.text.secondary})`,lineHeight:1.5},children:["Chrome dark theme-invariant. Tokens em ",e.jsx("b",{children:"COLOR.modal.*"})," (src/components/ui/tokens.ts) e CSS vars ",e.jsx("b",{children:"--color-modal-*"})," (src/index.css). Não flipam com light/dark mode — o modal é dark by design."]}),e.jsx("div",{style:h(5),children:["bg","surface","surface2","surface3","border","borderHi","text","textDim","textMute"].map(t=>e.jsxs("div",{style:s.card,children:[e.jsx("div",{style:{height:56,borderRadius:r.sm,background:`hsl(var(--color-modal-${t==="surface2"?"surface-2":t==="surface3"?"surface-3":t==="borderHi"?"border-hi":t==="textDim"?"text-dim":t==="textMute"?"text-mute":t}))`,border:d.default}}),e.jsxs("div",{style:{fontSize:12,fontWeight:600},children:["modal.",t]}),e.jsxs("div",{style:s.mono,children:["--color-modal-",t==="surface2"?"surface-2":t==="surface3"?"surface-3":t==="borderHi"?"border-hi":t==="textDim"?"text-dim":t==="textMute"?"text-mute":t]})]},t))}),e.jsxs("div",{style:{background:"hsl(var(--color-modal-bg))",borderRadius:r.md,padding:o[6],display:"flex",flexDirection:"column",gap:o[3],border:"1px solid hsl(var(--color-modal-border))"},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",color:"hsl(var(--color-modal-text-mute))"},children:"LABEL · 10/700 · letter-spacing 0.4 · textMute"}),e.jsx("div",{style:{fontSize:13,fontWeight:500,color:"hsl(var(--color-modal-text))"},children:"Primary · 13/500 · T.text — títulos de card, input do chat, ações principais"}),e.jsx("div",{style:{fontSize:12,fontWeight:400,color:"hsl(var(--color-modal-text-dim))",lineHeight:1.4},children:"Secondary · 12/400 · T.textDim — descrições, captions, corpo do chat, timestamps"}),e.jsx("div",{style:{fontSize:10,fontWeight:400,color:"hsl(var(--color-modal-text-mute))"},children:"Tertiary · 10-11/400 · T.textMute — meta, hint, label da grid de estilos/cenas"})]}),e.jsxs("div",{style:{fontSize:12,color:`hsl(${i.text.secondary})`,lineHeight:1.6},children:[e.jsx("b",{children:"Grid de Presets & Cenas"})," — 3 colunas · thumbnail 4:3 · borderRadius ",e.jsx("b",{children:"8px"})," · columnGap ",e.jsx("b",{children:"8px"})," · rowGap ",e.jsx("b",{children:"20px"})," · sem border, sem shadow, label ",e.jsx("b",{children:"10/400"})," abaixo. Skeleton = surface3 gradient no mesmo aspect ratio."]}),e.jsxs("div",{style:{fontSize:12,color:`hsl(${i.text.secondary})`,lineHeight:1.6},children:[e.jsx("b",{children:"Chat surface"})," — textarea/composer em ",e.jsx("code",{style:s.mono,children:"surface2"})," com border 1px ",e.jsx("code",{style:s.mono,children:"border"}),", radius ",e.jsx("b",{children:"8"}),". Alinhamento vertical 36px. Sem gradientes."]})]})}),e.jsxs(g,{title:"Previews vivos · componentes reais",right:e.jsx("div",{style:{...s.mono,fontSize:10},children:"iframe · escala 0.62"}),children:[e.jsx("div",{style:{display:"flex",gap:o[2],flexWrap:"wrap",marginBottom:o[4]},children:b.map(t=>e.jsx("button",{onClick:()=>c(t.id),style:{...s.tab,...l===t.id?s.tabActive:{},fontFamily:n.sans},children:t.label},t.id))}),e.jsxs("div",{style:{border:d.default,borderRadius:r.lg,overflow:"hidden",background:`hsl(${i.bg.secondary})`,position:"relative",height:820},children:[p.note&&e.jsx("div",{style:{position:"absolute",top:o[3],left:o[3],zIndex:2,background:`hsl(${i.bg.primary})`,border:d.default,borderRadius:r.pill,padding:`${o[1]} ${o[3]}`,fontSize:11,color:`hsl(${i.text.secondary})`,boxShadow:u.sm},children:p.note}
1),e.jsx("iframe",{src:p.path,title:p.label,style:{width:"161.29%",height:"161.29%",border:"none",transform:"scale(0.62)",transformOrigin:"top left",background:`hsl(${i.bg.primary})`}},l)]}),e.jsx("div",{style:{...s.mono,marginTop:o[2]},children:p.path})]}),e.jsxs("div",{style:{marginTop:o[8],textAlign:"center",...s.mono},children:["Fonte: scan estático de ",new Set(x.map(t=>t.file)).size," arquivos · tokens de @/components/ui/tokens"]})]})})}export{w as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.