@astralkit/mcp 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts CHANGED
@@ -51,6 +51,14 @@ export declare function listComponents(params?: {
51
51
  offset?: number;
52
52
  }): Promise<ComponentListResponse>;
53
53
  export declare function getComponent(slug: string, framework?: string): Promise<ComponentDetailResponse>;
54
+ export interface CategoryListResponse {
55
+ categories: {
56
+ slug: string;
57
+ name: string;
58
+ count: number;
59
+ }[];
60
+ }
61
+ export declare function getCategories(): Promise<CategoryListResponse>;
54
62
  export declare function listBoosters(params?: {
55
63
  framework?: string;
56
64
  search?: string;
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAMA,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,QAkB7D;AAED,qBAAa,QAAS,SAAQ,KAAK;aAGf,MAAM,EAAE,MAAM;aACd,IAAI,EAAE,MAAM;gBAF5B,OAAO,EAAE,MAAM,EACC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM;CAK/B;AAsDD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EA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C;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC,CAEtD;AAED,wBAAsB,cAAc,CAAC,MAAM,GAAE;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAQtC;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,GAAE,MAAgB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAE9G;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC7D;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAEnE;AAED,wBAAsB,YAAY,CAAC,MAAM,GAAE;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,GAAG,CAAC,CAKpB;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,GAAE,MAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,CAEzF"}
package/dist/api.js CHANGED
@@ -35,8 +35,8 @@ async function request(path) {
35
35
  const url = `${apiBase}${path}`;
36
36
  const headers = {
37
37
  'Accept': 'application/json',
38
- 'User-Agent': '@astralkit/mcp/1.0.0',
39
- 'X-AstralKit-CLI': 'mcp-1.0.0',
38
+ 'User-Agent': '@astralkit/mcp/1.6.0',
39
+ 'X-AstralKit-CLI': 'mcp-1.6.0',
40
40
  };
41
41
  if (apiKey) {
42
42
  headers['x-api-key'] = apiKey;
@@ -98,6 +98,9 @@ export async function listComponents(params = {}) {
98
98
  export async function getComponent(slug, framework = 'react') {
99
99
  return request(`/api/cli/components/${encodeURIComponent(slug)}?framework=${encodeURIComponent(framework)}`);
100
100
  }
101
+ export async function getCategories() {
102
+ return request('/api/cli/categories');
103
+ }
101
104
  export async function listBoosters(params = {}) {
102
105
  const qs = new URLSearchParams();
103
106
  if (params.framework)
package/dist/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AACjD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,IAAI,MAAM,GAAkB,IAAI,CAAC;AACjC,IAAI,OAAO,GAAW,gBAAgB,CAAC;AAEvC,MAAM,UAAU,SAAS,CAAC,GAAkB,EAAE,OAAgB;IAC5D,MAAM,GAAG,GAAG,CAAC;IACb,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;YAChC,MAAM,WAAW,GACf,MAAM,CAAC,QAAQ,KAAK,WAAW;gBAC/B,MAAM,CAAC,QAAQ,KAAK,WAAW;gBAC/B,MAAM,CAAC,QAAQ,KAAK,KAAK,CAAC;YAC5B,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,KAAK,OAAO,IAAI,WAAW,CAAC,EAAE,CAAC;gBAClF,OAAO,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;gBAC/F,OAAO;YACT,CAAC;YACD,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACxC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,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AO,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAY,EAAE,YAAoB,QAAQ;IACzE,OAAO,OAAO,CAAC,qBAAqB,kBAAkB,CAAC,IAAI,CAAC,cAAc,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AAC7G,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const BUILD_STANDARDS: Record<string, string>;
2
+ export declare const BUILD_STANDARD_TOPICS: string[];
3
+ /** Build the get_build_standards response. No topic -> an index of all topics. */
4
+ export declare function buildStandardsGuide(topic?: string): string;
5
+ //# sourceMappingURL=build-standards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-standards.d.ts","sourceRoot":"","sources":["../../src/data/build-standards.ts"],"names":[],"mappings":"AAqKA,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQlD,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAA+B,CAAC;AAYlE,kFAAkF;AAClF,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAa1D"}
@@ -0,0 +1,190 @@
1
+ // Structural & non-visual build standards served by the get_build_standards tool
2
+ // and the astralkit://standards resource. The sibling of rules.ts (visual rules):
3
+ // rules.ts covers tokens/colors/spacing/icons; this covers ARCHITECTURE and the
4
+ // states/error/responsive/radix correctness that make an app "built well" vs messy.
5
+ //
6
+ // Source: docs/CODE_ARCHITECTURE_GUIDE.md, docs/empty-states-guide.md,
7
+ // docs/empty-states-engagement-guide.md, docs/error-handing.md, the radix-research
8
+ // bank, and src/sdk/astralkit/ai-rules.md. Principles kept verbatim; every code
9
+ // example is written in AstralKit conventions (ak-* tokens, Phosphor icons,
10
+ // the existing atoms/empty-state.tsx) so this never contradicts get_coding_standards.
11
+ const ARCHITECTURE = `# Architecture & Separation of Concerns
12
+
13
+ The golden test for every file/function/component: "Can I describe what this does in ONE sentence WITHOUT using 'and'?" If not, split it.
14
+
15
+ ## Atomic design (and the import rule)
16
+ - atoms — smallest building blocks, zero business logic, self-contained (Button, Input, Badge, Spinner, Avatar). Import NOTHING.
17
+ - molecules — 2-4 atoms forming one unit (SearchInput, FormField, NavLink). Import atoms only.
18
+ - organisms — full sections (Header, Sidebar, DataTable, PricingCard, LoginForm). Import atoms + molecules.
19
+ - templates — page layout with slots, no real data.
20
+ - pages — route files (Next.js app/), wire data to templates/organisms.
21
+ RULE: never skip levels upward. An atom CANNOT call an API. An organism is NOT composed entirely of other organisms — prefer composition of smaller parts.
22
+
23
+ ## Separation of concerns — data flows in ONE direction
24
+ Routes -> Services -> Repositories -> Database. Components -> Hooks -> Services. Never sideways, never upward.
25
+ - page.tsx is THIN (wire data + compose; aim < 50 lines). It does not hold business logic.
26
+ - Hooks hold logic, never return JSX. Extract a hook when useState+useEffect do one "thing", logic is reusable, or the file grows from logic (not JSX).
27
+ - Services hold business rules; they call repositories, never the DB/Prisma directly; framework-agnostic (no React).
28
+ - Repositories are the ONLY place DB calls happen; one per entity; map DB types to your own types at the boundary (don't let Prisma types leak through the app).
29
+ - utils are PURE functions (same input -> same output, no side effects), categorized by kind (formatters/validators/transformers/helpers) — never a junk-drawer utils.ts.
30
+
31
+ ## Composition over inheritance
32
+ Build complex UI by combining simple parts, not a god-component with 8 boolean props. Prefer compound components (Card + Card.Header + Card.Content) and asChild composition over prop explosions.
33
+
34
+ ## Presentational vs container
35
+ Presentational (dumb): all data via props, no fetching, no business logic, only UI state (isOpen). Container/hook (smart): fetch, manage state, handle logic, pass down. This is what makes a component reusable and testable.
36
+
37
+ ## File-size limits (hard)
38
+ component 150 · hook 100 · service 200 · repository 150 · utility 100 · ANY file 300 = STOP and refactor now. Approaching a limit means a sub-component, a hook, or a util wants to be extracted.
39
+
40
+ ## Naming & imports
41
+ PascalCase components; 'use' prefix hooks; 'Service'/'Repository' suffixes; SCREAMING_SNAKE constants; 'handle' event handlers; is/has/can/should booleans. Import order: framework -> third-party -> '@/' aliases -> relative -> types. Barrel-export each component folder (index.ts) and import from the barrel, never reach into internals.`;
42
+ const REFACTORING = `# Refactoring a Messy App (do this, don't rewrite)
43
+
44
+ The #1 way AI makes things worse: rewriting a working file "more cleanly" and changing behavior. Don't.
45
+
46
+ ## Golden rules
47
+ - MOVE code, don't REWRITE it. Copy-paste EXACT blocks into new files.
48
+ - Small bites. ONE area at a time. Verify before moving on.
49
+ - Do NOT rename, "optimize", or "clean up" while moving. Do NOT refactor multiple areas at once.
50
+
51
+ ## The incremental process
52
+ 1. SURVEY — list every area that needs work, group into scopes, estimate complexity. Don't start yet.
53
+ 2. PRIORITIZE — start with scopes that have NO dependencies on others; save the interconnected pieces for last.
54
+ 3. REFACTOR ONE SCOPE — analyze (list concerns + line numbers), extract one concern at a time (exact copy + only necessary imports), verify it still works.
55
+ 4. CHECKPOINT — stop, report what moved, confirm it works, then continue.
56
+
57
+ ## What a "scope" is
58
+ The smallest independently-refactorable unit: "the top nav bar", "the user avatar dropdown", "one form", "one data table", "one service". NOT "the entire header" or "all the modals". If a scope has > 3 components, > 2 hooks, > 200 lines, or > 5 new files — split it further.
59
+
60
+ ## Must stay identical while refactoring
61
+ Function signatures, component props + types, state logic, API patterns, error handling, the rendered JSX, classNames/styling, conditional logic. If you're changing any of these, you're rewriting, not refactoring — stop.
62
+
63
+ ## Red flags (stop if you catch yourself)
64
+ Rewriting a function "more efficiently", changing state management, altering prop shapes, "improving" patterns, or touching something unrelated. When two scopes seem tightly coupled or a scope is bigger than expected — pause and ask.
65
+
66
+ End state: when you need to change how something works, you touch ONE file.`;
67
+ const STATE_LIFECYCLE = `# The Four-State Contract
68
+
69
+ EVERY component that renders data (a list, table, feed, card-grid, detail view) must handle all four states. This is the single biggest "looks unfinished / looks broken" tell.
70
+
71
+ 1. LOADING — a skeleton that matches the shape of the real content (not a centered spinner for page content).
72
+ 2. EMPTY — a real empty state (see the empty-states topic), never blank space.
73
+ 3. ERROR — a recovery UI with an action (see the error-handling topic), never a raw error or a white screen.
74
+ 4. POPULATED — the data.
75
+
76
+ Build the EMPTY and ERROR states FIRST, before the populated state — they are part of the component's contract, not an afterthought.
77
+
78
+ The shape, every time:
79
+ if (isLoading) return <Skeleton />
80
+ if (isError) return <ErrorState onRetry={refetch} />
81
+ if (!data?.length) return <EmptyState ... />
82
+ return <List data={data} />
83
+
84
+ Anti-pattern (the "Ghost"): {data.length > 0 && <List/>} with no else branch — the user sees blank space and assumes the app is broken. Always render an explicit empty/loading branch.`;
85
+ const EMPTY_STATES = `# Empty States
86
+
87
+ An empty state is a UX moment, not a placeholder. It answers: what's happening, why, and what to do next.
88
+
89
+ ## Five types — never reuse one design for all
90
+ 1. First-use (zero data) — your onboarding moment. Frame as "ready to begin", not "no data".
91
+ 2. User-cleared — they removed everything. Celebrate completion or offer undo.
92
+ 3. No results — search/filter returned nothing. MUST echo the query ("No results for 'invoic'", not "Nothing here").
93
+ 4. Error — data should exist but failed. Icon (not illustration), and ALWAYS a recovery action.
94
+ 5. Conditional/positive — "No issues found", "All caught up" — a good thing; say so.
95
+
96
+ ## Anatomy (centered in its container, max-w ~28rem text)
97
+ visual (icon or illustration) -> title (what's happening) -> description (why + what to do) -> primary CTA -> optional secondary. Reuse the existing component: src/components/atoms/empty-state.tsx.
98
+
99
+ ## Messaging
100
+ Formula: title = state what's empty; description = why OR what to do + the benefit; CTA = verb + object ("Create project", not "Click here"). Be human, helpful, specific, encouraging, action-oriented. Headline can carry light brand personality; description stays informative.
101
+
102
+ ## Voice — match the emotional temperature
103
+ Don't use the same cheerfulness for an error and a celebration. First-use = warm/encouraging; no-results = neutral/helpful; error = calm/reassuring ("your work is safe, this is on our end"); all-done = briefly celebratory.
104
+
105
+ ## Visual
106
+ Illustration for first-use and positive/celebration and full-page states; icon-only for errors, table/inline empties, and states the user sees often. Keep it on-brand (ak-* colors, no new palette). Subtle entrance animation signals "intentional, not broken" — honor prefers-reduced-motion.
107
+
108
+ ## Seven anti-patterns to avoid
109
+ - Naked Empty: "No data" with no context or path. - Apologizer: "Oops! So sorry!". - Blamer: "You haven't added anything yet". - Dead End: states the problem, no CTA. - Novel: a wall of text. - Confuser: "Error 500 / ECONNREFUSED". - Ghost: rendering nothing at all when empty.`;
110
+ const ERROR_HANDLING = `# Error Handling
111
+
112
+ Three principles: never show raw errors to users; always provide a path forward; fail gracefully and recover automatically where possible. Every error must answer the user's three questions: what happened, is it my fault, what do I do now.
113
+
114
+ ## Classify, then map to a recovery
115
+ - Network/offline -> "You're offline. Check your connection." -> Retry.
116
+ - Timeout / 5xx / 503 -> "Taking longer than expected / temporarily unavailable." -> auto-retry with exponential backoff (1s -> 2s -> 4s, max 3), then a Retry button + status link.
117
+ - 401 / session expired -> redirect to login (preserve the intended destination).
118
+ - 403 -> "You don't have permission." -> go back / contact admin.
119
+ - 404 (user action) -> "This item doesn't exist or was removed." -> go back / search.
120
+ - 400 / validation -> inline field errors (NOT a toast).
121
+ - 429 -> "Slow down — too many requests." -> countdown.
122
+
123
+ ## Boundaries (Next.js App Router)
124
+ Error boundary hierarchy: Root -> Layout -> Page -> Section -> Component — a broken chart must NEVER crash the nav. Every route ships error.tsx + loading.tsx (and not-found.tsx where relevant). Isolate non-critical sections in their own boundary with a fallback so the rest of the page keeps working.
125
+
126
+ ## Rules
127
+ - Never an empty catch: catch (e) {} is forbidden — every catch logs AND updates the UI.
128
+ - Never alert() — use a toast (react-hot-toast / Sonner / Radix Toast). Error toasts do NOT auto-dismiss (manual close); success/info auto-dismiss ~4s; max ~3 at once.
129
+ - Retry network/5xx, NEVER 4xx.
130
+ - Forms: inline errors with aria-invalid + aria-describedby; on submit failure, focus the first error field; preserve the user's input; prevent double-submit.
131
+ - Error UI anatomy: title (plain) + description (is it my fault?) + primary action + optional error ID for support. Use role="alert" / aria-live for dynamic errors.
132
+
133
+ Empty state vs error state: empty = no data yet, encouraging/forward-looking. Error = data should exist but failed, calm/recovery-focused. Don't confuse them.`;
134
+ const RESPONSIVE = `# Responsive & Mobile Navigation
135
+
136
+ Mobile-first: unprefixed classes are the mobile base; add complexity upward with md:/lg:. Type scales UP, never down. 48px touch targets (min-h-ak-control-lg). No horizontal scroll on mobile. Test at 375 / 390 / 768 / 1280.
137
+
138
+ ## The AstralKit layout-primitive trap
139
+ ak-stack / ak-cluster / ak-grid / ak-switcher already set display. A naive md:hidden / md:flex on top of them fights the primitive. Wrap-then-toggle the wrapper, don't toggle display on the primitive itself.
140
+
141
+ ## Navigation by breakpoint (every nav needs a mobile answer)
142
+ - Top bar: desktop = inline links. Mobile = a hamburger that opens a drawer. The desktop links MUST be hidden behind it (e.g. nav links 'hidden md:flex', hamburger 'md:hidden'). A top bar with desktop links and NO mobile menu is the most common responsiveness bug.
143
+ - Mobile menu: a Radix Dialog used as a sheet (w-[85vw] max-w-sm, slides from the side), not a fragile custom dropdown. Trap focus, close on route change and Escape.
144
+ - Mega-menu: full panel on desktop; collapse to a stacked accordion (<details> or a Radix Accordion) inside the mobile drawer.
145
+ - Sidebar: persistent on desktop; on mobile it becomes the drawer (full replacement), toggled by the hamburger.
146
+
147
+ Confirm the mobile menu actually exists and is reachable — most AI-built navs ship desktop-only.`;
148
+ const RADIX = `# Radix UI Correctness
149
+
150
+ AstralKit overlays/menus/forms build on Radix primitives. The common failures:
151
+
152
+ - asChild / Slot: use asChild to merge a primitive's behavior onto YOUR styled element (e.g. <DialogTrigger asChild><Button>…</Button></DialogTrigger>) — exactly one child, which must forward props/ref. Don't double-wrap (a styled button inside a styled button).
153
+ - Dialog/AlertDialog a11y: every Dialog needs a Title (visually-hidden if there's no visible heading) and a description or aria-describedby — otherwise screen readers announce nothing and Radix warns.
154
+ - Focus management: Radius traps focus inside an open overlay and restores it on close. Don't fight it; use onOpenAutoFocus / onCloseAutoFocus to retarget focus deliberately, not to disable it. Keep visible focus rings.
155
+ - Portal + theme: Radix renders overlays in a Portal at <body>, OUTSIDE your themed tree — so the AstralKit theme/dark-mode class may not reach it. Wrap portalled content in the theme context (or apply the data-ak-theme on the portal container) or dropdowns/dialogs render unthemed.
156
+ - Styling: style by state with data-[state=open]/data-[state=checked] attributes, not by toggling classes in JS.
157
+ - Versions: keep all @radix-ui/* (or the unified radix-ui) on one resolved version — mismatched primitive + react versions cause focus/dismiss bugs.`;
158
+ export const BUILD_STANDARDS = {
159
+ architecture: ARCHITECTURE,
160
+ refactoring: REFACTORING,
161
+ 'state-lifecycle': STATE_LIFECYCLE,
162
+ 'empty-states': EMPTY_STATES,
163
+ 'error-handling': ERROR_HANDLING,
164
+ responsive: RESPONSIVE,
165
+ radix: RADIX,
166
+ };
167
+ export const BUILD_STANDARD_TOPICS = Object.keys(BUILD_STANDARDS);
168
+ const TOPIC_BLURBS = {
169
+ architecture: 'atomic design, separation of concerns, layers, file-size limits, naming',
170
+ refactoring: 'the safe incremental process for cleaning up a messy app (move, don\'t rewrite)',
171
+ 'state-lifecycle': 'the loading/empty/error/populated contract every data component must handle',
172
+ 'empty-states': 'the 5 empty-state types, messaging, voice, and 7 anti-patterns',
173
+ 'error-handling': 'error classification, boundaries, toasts, retries, never-empty-catch',
174
+ responsive: 'mobile-first rules + the mobile-menu / mega-menu navigation patterns',
175
+ radix: 'correct Radix usage: asChild, focus, portal theming, a11y, versions',
176
+ };
177
+ /** Build the get_build_standards response. No topic -> an index of all topics. */
178
+ export function buildStandardsGuide(topic) {
179
+ if (topic && BUILD_STANDARDS[topic])
180
+ return BUILD_STANDARDS[topic];
181
+ const index = BUILD_STANDARD_TOPICS.map(t => `- ${t} — ${TOPIC_BLURBS[t]}`).join('\n');
182
+ const unknown = topic ? `\n\n(No topic "${topic}". Returning the index.)` : '';
183
+ return (`# AstralKit Build Standards\n\n` +
184
+ `Structural & correctness rules that make an app "built well", not just visually polished. ` +
185
+ `Call get_build_standards with one topic to get that section:\n\n${index}\n\n` +
186
+ `These complement get_coding_standards (visual rules) and polish_ui (visual revamp). ` +
187
+ `For per-screen-type guidance (dashboard, nav, pricing, auth…) use get_screen_blueprint. ` +
188
+ `To audit existing code against these rules, use review_app.${unknown}`);
189
+ }
190
+ //# sourceMappingURL=build-standards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-standards.js","sourceRoot":"","sources":["../../src/data/build-standards.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,kFAAkF;AAClF,gFAAgF;AAChF,oFAAoF;AACpF,EAAE;AACF,uEAAuE;AACvE,mFAAmF;AACnF,gFAAgF;AAChF,4EAA4E;AAC5E,sFAAsF;AAEtF,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gVA8B2T,CAAC;AAEjV,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;4EAwBwD,CAAC;AAE7E,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;wLAiBgK,CAAC;AAEzL,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;sRAwBiQ,CAAC;AAEvR,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;+JAuBwI,CAAC;AAEhK,MAAM,UAAU,GAAG;;;;;;;;;;;;;iGAa8E,CAAC;AAElG,MAAM,KAAK,GAAG;;;;;;;;;qJASuI,CAAC;AAEtJ,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,YAAY;IAC5B,gBAAgB,EAAE,cAAc;IAChC,UAAU,EAAE,UAAU;IACtB,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAElE,MAAM,YAAY,GAA2B;IAC3C,YAAY,EAAE,yEAAyE;IACvF,WAAW,EAAE,iFAAiF;IAC9F,iBAAiB,EAAE,6EAA6E;IAChG,cAAc,EAAE,gEAAgE;IAChF,gBAAgB,EAAE,sEAAsE;IACxF,UAAU,EAAE,sEAAsE;IAClF,KAAK,EAAE,qEAAqE;CAC7E,CAAC;AAEF,kFAAkF;AAClF,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,IAAI,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC;QAAE,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;IAEnE,MAAM,KAAK,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvF,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,kBAAkB,KAAK,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/E,OAAO,CACL,iCAAiC;QACjC,4FAA4F;QAC5F,mEAAmE,KAAK,MAAM;QAC9E,sFAAsF;QACtF,0FAA0F;QAC1F,8DAA8D,OAAO,EAAE,CACxE,CAAC;AACJ,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const CODING_STANDARDS = "# AstralKit Coding Standards\n\n## Setup\n- Package: `astralkit` (npm)\n- CSS: `@import \"astralkit/theme\"; @import \"astralkit/utilities\";` (after Tailwind imports)\n- Tailwind v3 plugin: `require('astralkit/tailwind.cjs')` in tailwind.config\n- Tailwind v4: `@import \"astralkit/theme-v4\"; @import \"astralkit/utilities\";`\n- Icons: `@phosphor-icons/react` exclusively. Never Lucide, Heroicons, or inline SVGs.\n- Fonts: Inter (body), DM Serif Display (display), JetBrains Mono (code)\n\n## Token-First Rule\nALWAYS use `ak-*` tokens. NEVER use arbitrary bracket values.\n```tsx\n// CORRECT\n<div className=\"p-ak-3 gap-ak-2 text-ak-base rounded-ak-lg\">\n// WRONG \u2014 arbitrary values silently collapse in Tailwind v4\n<div className=\"p-[1.5rem] gap-[1rem] text-[16px] rounded-[0.75rem]\">\n```\n\n## Semantic Colors \u2014 No Raw Tailwind\n```tsx\n// CORRECT: bg-ak-surface, text-ak-text, border-ak-border, bg-ak-primary\n// WRONG: bg-gray-50, text-gray-900, border-gray-200, bg-blue-600\n```\n\n## Typography \u2014 16px Floor\n- Body text, descriptions, nav items, table cells: `text-ak-base` (16px) minimum\n- UI text: `font-medium` minimum \u2014 `font-normal` is for long-form prose only\n- Labels/badges: `text-ak-sm` (14px) or `text-ak-xs` (12px uppercase) acceptable\n- Helper/error text: `text-ak-sm` (14px) is the only exception\n\n## Spacing \u2014 ak-* Tokens Only\n```tsx\n// CORRECT: p-ak-3, gap-ak-2, mb-ak-1_5\n// WRONG: p-6, gap-4, mb-3\n```\n\n## Icons \u2014 Phosphor Only\n```tsx\nimport { House, Gear } from '@phosphor-icons/react'\n<House size={20} aria-hidden=\"true\" />\n```\n\n## No Inline Styles\nUse Tailwind classes. `style={{}}` only for CSS variables with no Tailwind equivalent.\n\n## No Shadows on Panels/Dropdowns \u2014 Borders Only\nUse `border border-ak-border`. Reserve shadows for modals and elevated cards.\n\n## Motion \u2014 Framer Motion + CSS + Lenis (GSAP not allowed)\nFramer Motion (the MIT `motion` package) IS allowed. Prefer the AstralKit presets from\n`astralkit/motion` (tuned to the motion tokens, reduced-motion-safe). CSS animations are\nalso fine (durations/easings via `duration-ak-*`, `ease-ak-spring`/`bounce`). Use Lenis for\nsmooth scroll. ALWAYS honor `prefers-reduced-motion`. **GSAP is NOT allowed** (license).\n```tsx\nimport { motion, useReducedMotion } from 'motion/react'\nimport { fadeInUp, withReducedMotion } from 'astralkit/motion'\nconst reduced = useReducedMotion()\n<motion.div initial=\"hidden\" animate=\"show\" variants={withReducedMotion(fadeInUp, reduced)} />\n```\n\n## Premium Polish \u2014 Use the Effect Toolkit (with taste)\nAstralKit ships CSS-only premium effects \u2014 reach for them so screens feel designed, not generic:\n- Depth/glow: `ak-card-glow`, `ak-ambient-glow`, `ak-spotlight-card`, `ak-gradient-border`, `ak-text-glow`, `ak-surface-raised`\n- Backgrounds: `ak-mesh-light` / `ak-mesh-dark` / `ak-mesh-astral` (mesh gradients)\n- Motion accents (CSS): `ak-float`, `ak-scroll-fade`, `ak-section-fade`, `ak-sheen`, `ak-press` (tap feedback)\n- Color: tasteful accent (60-30-10); colorful charts use `ak-chart-1`..`ak-chart-6`; curated palettes via `astralkit/palettes`\n- Icons: Phosphor `weight=\"duotone\"` reads richer for feature/marketing icons\n\n### Effect guardrails (use the RIGHT effect on the RIGHT surface)\n- **Glows need dark surfaces.** `ak-text-glow`, `ak-ambient-glow`, and `ak-card-glow` read correctly as LIGHT-on-DARK. On a light background with dark text they look like a muddy smudge \u2014 **do NOT put text-glow on dark text / light backgrounds.**\n- **For dramatic/marketing heroes, go dark.** Add the `dark` class to the section root + `ak-mesh-dark` (tokens auto-flip to dark), light text, and a gradient accent word. This reads more premium than a light hero.\n- **Gradient text accent** (instead of glow): `<span className=\"bg-gradient-to-r from-ak-primary to-ak-info bg-clip-text text-transparent\">word</span>`.\n- Don't stack many effects on one element; one accent treatment per focal point.\n\n## Layout primitives \u2014 don't fight responsive display\n`ak-stack`, `ak-cluster`, `ak-grid`, `ak-switcher` SET `display` (flex/grid) and are unlayered, so they OVERRIDE Tailwind's responsive display utilities (`md:hidden`, `lg:block`, `sm:hidden`). Putting a responsive display toggle on the SAME element silently fails (e.g. a mobile accordion stays visible on desktop):\n```tsx\n// WRONG \u2014 ak-stack's display:flex beats md:hidden, so it never hides\n<div className=\"md:hidden ak-stack\">\u2026</div>\n// RIGHT \u2014 wrap: toggle on the outer element, primitive inside\n<div className=\"md:hidden\"><div className=\"ak-stack\">\u2026</div></div>\n// or use plain flex/grid when you need to toggle visibility\n<div className=\"md:hidden flex flex-col\">\u2026</div>\n```\n\n## Charts \u2014 readable AND rendered (recipe)\nUse the colorful `ak-chart-*` tokens with solid fills (not faint `ak-primary` tints). **Percentage bar heights only resolve if the container has a DEFINITE height** \u2014 a common bug is `min-height` + `items-end`, which collapses the bars to zero. Use this pattern:\n```tsx\n{/* DEFINITE height (h-56) + stretched columns so %-height bars resolve */}\n<div className=\"flex h-56 items-stretch gap-ak-1\">\n {data.map((v, i) => (\n <div key={i} className=\"group flex flex-1 flex-col justify-end gap-ak-1\">\n <div\n className={(i === data.length - 1 ? 'bg-ak-primary' : 'bg-ak-chart-1') + ' w-full rounded-ak-md'}\n style={{ height: `${Math.round((v / max) * 100)}%` }} /* sanctioned data-driven inline style */\n role=\"img\" aria-label={`${labels[i]}: ${v}`}\n />\n <span className=\"text-ak-xs text-ak-text-muted\">{labels[i]}</span>\n </div>\n ))}\n</div>\n```\n\n## Touch Targets \u2014 48px Minimum\n- Buttons: `min-h-[3rem]` + `cursor-pointer`\n- Form inputs: `h-14` (56px)\n\n## Empty States \u2014 Every Data Container\nEvery list, table, or feed must handle: Loading \u2192 Error \u2192 Empty \u2192 Data.\nEmpty states need: icon, title, description, CTA.\n\n## Error Handling \u2014 Never Show Raw Errors\nUser-facing errors need: title (jargon-free), description, action (Retry/Go Back).\n\n## cn() Utility\n```tsx\nimport { cn } from '@/lib/utils'\n<div className={cn(\"p-ak-3\", isActive && \"bg-ak-primary\")}>\n```\n";
1
+ export declare const CODING_STANDARDS = "# AstralKit Coding Standards\n\n## Setup\n- Package: `astralkit` (npm)\n- CSS: `@import \"astralkit/theme\"; @import \"astralkit/utilities\";` (after Tailwind imports)\n- Tailwind v3 plugin: `require('astralkit/tailwind.cjs')` in tailwind.config\n- Tailwind v4: `@import \"astralkit/theme-v4\"; @import \"astralkit/utilities\";`\n- Icons: `@phosphor-icons/react` exclusively. Never Lucide, Heroicons, or inline SVGs.\n- Fonts: Inter (body), DM Serif Display (display), JetBrains Mono (code)\n\n## Token-First Rule\nALWAYS use `ak-*` tokens. NEVER use arbitrary bracket values.\n```tsx\n// CORRECT\n<div className=\"p-ak-3 gap-ak-2 text-ak-base rounded-ak-lg\">\n// WRONG \u2014 arbitrary values silently collapse in Tailwind v4\n<div className=\"p-[1.5rem] gap-[1rem] text-[16px] rounded-[0.75rem]\">\n```\n\n## Semantic Colors \u2014 No Raw Tailwind\n```tsx\n// CORRECT: bg-ak-surface, text-ak-text, border-ak-border, bg-ak-primary\n// WRONG: bg-gray-50, text-gray-900, border-gray-200, bg-blue-600\n```\n\n## Typography \u2014 16px Floor\n- Body text, descriptions, nav items, table cells: `text-ak-base` (16px) minimum\n- UI text: `font-medium` minimum \u2014 `font-normal` is for long-form prose only\n- Labels/badges: `text-ak-sm` (14px) or `text-ak-xs` (12px uppercase) acceptable\n- Helper/error text: `text-ak-sm` (14px) is the only exception\n\n## Spacing \u2014 ak-* Tokens Only\n```tsx\n// CORRECT: p-ak-3, gap-ak-2, mb-ak-1_5\n// WRONG: p-6, gap-4, mb-3\n```\n\n## Icons \u2014 Phosphor Only\n```tsx\nimport { House, Gear } from '@phosphor-icons/react'\n<House size={20} aria-hidden=\"true\" />\n```\n\n## No Inline Styles\nUse Tailwind classes. `style={{}}` only for CSS variables with no Tailwind equivalent.\n\n## No Shadows on Panels/Dropdowns \u2014 Borders Only\nUse `border border-ak-border`. Reserve shadows for modals and elevated cards.\n\n## Motion \u2014 Framer Motion + CSS + Lenis (GSAP not allowed)\nFramer Motion (the MIT `motion` package) IS allowed. Prefer the AstralKit presets from\n`astralkit/motion` (tuned to the motion tokens, reduced-motion-safe). CSS animations are\nalso fine (durations/easings via `duration-ak-*`, `ease-ak-spring`/`bounce`). Use Lenis for\nsmooth scroll. ALWAYS honor `prefers-reduced-motion`. **GSAP is NOT allowed** (license).\n```tsx\nimport { motion, useReducedMotion } from 'motion/react'\nimport { fadeInUp, withReducedMotion } from 'astralkit/motion'\nconst reduced = useReducedMotion()\n<motion.div initial=\"hidden\" animate=\"show\" variants={withReducedMotion(fadeInUp, reduced)} />\n```\n\n## Premium Polish \u2014 Use the Effect Toolkit (with taste)\nAstralKit ships CSS-only premium effects \u2014 reach for them so screens feel designed, not generic:\n- Depth/glow: `ak-card-glow`, `ak-ambient-glow`, `ak-spotlight-card`, `ak-gradient-border`, `ak-text-glow`, `ak-surface-raised`\n- Backgrounds: `ak-mesh-light` / `ak-mesh-dark` / `ak-mesh-astral` (mesh gradients)\n- Motion accents (CSS): `ak-float`, `ak-scroll-fade`, `ak-section-fade`, `ak-sheen`, `ak-press` (tap feedback)\n- Color: tasteful accent (60-30-10); colorful charts use `ak-chart-1`..`ak-chart-6`; curated palettes via `astralkit/palettes`\n- Icons: Phosphor `weight=\"duotone\"` reads richer for feature/marketing icons\n\n### Effect guardrails (use the RIGHT effect on the RIGHT surface)\n- **Glows need dark surfaces.** `ak-text-glow`, `ak-ambient-glow`, and `ak-card-glow` read correctly as LIGHT-on-DARK. On a light background with dark text they look like a muddy smudge \u2014 **do NOT put text-glow on dark text / light backgrounds.**\n- **For dramatic/marketing heroes, go dark.** Add the `dark` class to the section root + `ak-mesh-dark` (tokens auto-flip to dark), light text, and a gradient accent word. This reads more premium than a light hero.\n- **Gradient text accent** (instead of glow): `<span className=\"bg-gradient-to-r from-ak-primary to-ak-info bg-clip-text text-transparent\">word</span>`.\n- Don't stack many effects on one element; one accent treatment per focal point.\n\n## Layout primitives \u2014 don't fight responsive display\n`ak-stack`, `ak-cluster`, `ak-grid`, `ak-switcher` SET `display` (flex/grid) and are unlayered, so they OVERRIDE Tailwind's responsive display utilities (`md:hidden`, `lg:block`, `sm:hidden`). Putting a responsive display toggle on the SAME element silently fails (e.g. a mobile accordion stays visible on desktop):\n```tsx\n// WRONG \u2014 ak-stack's display:flex beats md:hidden, so it never hides\n<div className=\"md:hidden ak-stack\">\u2026</div>\n// RIGHT \u2014 wrap: toggle on the outer element, primitive inside\n<div className=\"md:hidden\"><div className=\"ak-stack\">\u2026</div></div>\n// or use plain flex/grid when you need to toggle visibility\n<div className=\"md:hidden flex flex-col\">\u2026</div>\n```\n\n## Charts \u2014 readable AND rendered (recipe)\nUse the colorful `ak-chart-*` tokens with solid fills (not faint `ak-primary` tints). **Percentage bar heights only resolve if the container has a DEFINITE height** \u2014 a common bug is `min-height` + `items-end`, which collapses the bars to zero. Use this pattern:\n```tsx\n{/* DEFINITE height (h-56) + stretched columns so %-height bars resolve */}\n<div className=\"flex h-56 items-stretch gap-ak-1\">\n {data.map((v, i) => (\n <div key={i} className=\"group flex flex-1 flex-col justify-end gap-ak-1\">\n <div\n className={(i === data.length - 1 ? 'bg-ak-primary' : 'bg-ak-chart-1') + ' w-full rounded-ak-md'}\n style={{ height: `${Math.round((v / max) * 100)}%` }} /* sanctioned data-driven inline style */\n role=\"img\" aria-label={`${labels[i]}: ${v}`}\n />\n <span className=\"text-ak-xs text-ak-text-muted\">{labels[i]}</span>\n </div>\n ))}\n</div>\n```\n\n## Touch Targets \u2014 48px Minimum\n- Buttons: `min-h-[3rem]` + `cursor-pointer`\n- Form inputs: `h-14` (56px)\n\n## Empty States \u2014 Every Data Container\nEvery list, table, or feed must handle: Loading \u2192 Error \u2192 Empty \u2192 Data.\nEmpty states need: icon, title, description, CTA.\n\n## Error Handling \u2014 Never Show Raw Errors\nUser-facing errors need: title (jargon-free), description, action (Retry/Go Back).\n\n## cn() Utility\n```tsx\nimport { cn } from '@/lib/utils'\n<div className={cn(\"p-ak-3\", isActive && \"bg-ak-primary\")}>\n```\n\n## Theming Grammar \u2014 M3 Role System (60-30-10)\nEvery fill must use a ROLE, never resolve \"what color is this\" yourself:\n- **CTAs + binary on-states** (buttons, checked checkbox, toggle-ON): `bg-ak-primary text-ak-on-primary hover:bg-ak-primary-hover` \u2014 NEVER `bg-ak-text` for interactive fills.\n- **Selection-among-options** (active tab/segment/chip/nav item): `bg-ak-secondary text-ak-on-secondary`; subtle selected rows/nav: `bg-ak-secondary-container text-ak-on-secondary-container`.\n- **Selected-not-pressed cards**: `bg-ak-primary-container border-ak-primary`.\n- **Inverted/dark panels** (terminals, dark rails, dark tooltips, promo cards): `bg-ak-inverse-surface text-ak-inverse-on-surface` \u2014 NEVER `bg-ak-text`, `bg-ak-neutral-900 text-white`, or raw `bg-black`/hex.\n- **Surfaces**: page canvas `bg-ak-surface` \u2192 paper cards/inputs `bg-ak-surface-container-lowest` (or legacy `bg-ak-bg`/`bg-ak-elevated`) \u2192 wells/tracks `bg-ak-surface-container` (`-high`/`-highest` deeper). Borders: `border-ak-outline-variant` (hairline) / `border-ak-outline`.\n- **Overlays**: `bg-ak-scrim`. **Status**: `ak-error(-container)`/`ak-success`/`ak-warning`/`ak-info` + their `-text`/`on-` partners.\n- Non-interactive emphasis ink pills may keep `bg-ak-text text-ak-bg`. Opacity washes (`bg-ak-text/10`) stay neutral. Content colors (palette swatches, chart data) are exempt.\nDefault theme: primary is black, secondary falls back to primary \u2014 monochrome by default, fully colorable by any theme.\n";
2
2
  //# sourceMappingURL=rules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/data/rules.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,ytMAwH5B,CAAC"}
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/data/rules.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,gtPAmI5B,CAAC"}
@@ -1,122 +1,133 @@
1
- export const CODING_STANDARDS = `# AstralKit Coding Standards
2
-
3
- ## Setup
4
- - Package: \`astralkit\` (npm)
5
- - CSS: \`@import "astralkit/theme"; @import "astralkit/utilities";\` (after Tailwind imports)
6
- - Tailwind v3 plugin: \`require('astralkit/tailwind.cjs')\` in tailwind.config
7
- - Tailwind v4: \`@import "astralkit/theme-v4"; @import "astralkit/utilities";\`
8
- - Icons: \`@phosphor-icons/react\` exclusively. Never Lucide, Heroicons, or inline SVGs.
9
- - Fonts: Inter (body), DM Serif Display (display), JetBrains Mono (code)
10
-
11
- ## Token-First Rule
12
- ALWAYS use \`ak-*\` tokens. NEVER use arbitrary bracket values.
13
- \`\`\`tsx
14
- // CORRECT
15
- <div className="p-ak-3 gap-ak-2 text-ak-base rounded-ak-lg">
16
- // WRONG — arbitrary values silently collapse in Tailwind v4
17
- <div className="p-[1.5rem] gap-[1rem] text-[16px] rounded-[0.75rem]">
18
- \`\`\`
19
-
20
- ## Semantic Colors — No Raw Tailwind
21
- \`\`\`tsx
22
- // CORRECT: bg-ak-surface, text-ak-text, border-ak-border, bg-ak-primary
23
- // WRONG: bg-gray-50, text-gray-900, border-gray-200, bg-blue-600
24
- \`\`\`
25
-
26
- ## Typography — 16px Floor
27
- - Body text, descriptions, nav items, table cells: \`text-ak-base\` (16px) minimum
28
- - UI text: \`font-medium\` minimum — \`font-normal\` is for long-form prose only
29
- - Labels/badges: \`text-ak-sm\` (14px) or \`text-ak-xs\` (12px uppercase) acceptable
30
- - Helper/error text: \`text-ak-sm\` (14px) is the only exception
31
-
32
- ## Spacing — ak-* Tokens Only
33
- \`\`\`tsx
34
- // CORRECT: p-ak-3, gap-ak-2, mb-ak-1_5
35
- // WRONG: p-6, gap-4, mb-3
36
- \`\`\`
37
-
38
- ## Icons — Phosphor Only
39
- \`\`\`tsx
40
- import { House, Gear } from '@phosphor-icons/react'
41
- <House size={20} aria-hidden="true" />
42
- \`\`\`
43
-
44
- ## No Inline Styles
45
- Use Tailwind classes. \`style={{}}\` only for CSS variables with no Tailwind equivalent.
46
-
47
- ## No Shadows on Panels/Dropdowns — Borders Only
48
- Use \`border border-ak-border\`. Reserve shadows for modals and elevated cards.
49
-
50
- ## Motion — Framer Motion + CSS + Lenis (GSAP not allowed)
51
- Framer Motion (the MIT \`motion\` package) IS allowed. Prefer the AstralKit presets from
52
- \`astralkit/motion\` (tuned to the motion tokens, reduced-motion-safe). CSS animations are
53
- also fine (durations/easings via \`duration-ak-*\`, \`ease-ak-spring\`/\`bounce\`). Use Lenis for
54
- smooth scroll. ALWAYS honor \`prefers-reduced-motion\`. **GSAP is NOT allowed** (license).
55
- \`\`\`tsx
56
- import { motion, useReducedMotion } from 'motion/react'
57
- import { fadeInUp, withReducedMotion } from 'astralkit/motion'
58
- const reduced = useReducedMotion()
59
- <motion.div initial="hidden" animate="show" variants={withReducedMotion(fadeInUp, reduced)} />
60
- \`\`\`
61
-
62
- ## Premium Polish — Use the Effect Toolkit (with taste)
63
- AstralKit ships CSS-only premium effects — reach for them so screens feel designed, not generic:
64
- - Depth/glow: \`ak-card-glow\`, \`ak-ambient-glow\`, \`ak-spotlight-card\`, \`ak-gradient-border\`, \`ak-text-glow\`, \`ak-surface-raised\`
65
- - Backgrounds: \`ak-mesh-light\` / \`ak-mesh-dark\` / \`ak-mesh-astral\` (mesh gradients)
66
- - Motion accents (CSS): \`ak-float\`, \`ak-scroll-fade\`, \`ak-section-fade\`, \`ak-sheen\`, \`ak-press\` (tap feedback)
67
- - Color: tasteful accent (60-30-10); colorful charts use \`ak-chart-1\`..\`ak-chart-6\`; curated palettes via \`astralkit/palettes\`
68
- - Icons: Phosphor \`weight="duotone"\` reads richer for feature/marketing icons
69
-
70
- ### Effect guardrails (use the RIGHT effect on the RIGHT surface)
71
- - **Glows need dark surfaces.** \`ak-text-glow\`, \`ak-ambient-glow\`, and \`ak-card-glow\` read correctly as LIGHT-on-DARK. On a light background with dark text they look like a muddy smudge — **do NOT put text-glow on dark text / light backgrounds.**
72
- - **For dramatic/marketing heroes, go dark.** Add the \`dark\` class to the section root + \`ak-mesh-dark\` (tokens auto-flip to dark), light text, and a gradient accent word. This reads more premium than a light hero.
73
- - **Gradient text accent** (instead of glow): \`<span className="bg-gradient-to-r from-ak-primary to-ak-info bg-clip-text text-transparent">word</span>\`.
74
- - Don't stack many effects on one element; one accent treatment per focal point.
75
-
76
- ## Layout primitives — don't fight responsive display
77
- \`ak-stack\`, \`ak-cluster\`, \`ak-grid\`, \`ak-switcher\` SET \`display\` (flex/grid) and are unlayered, so they OVERRIDE Tailwind's responsive display utilities (\`md:hidden\`, \`lg:block\`, \`sm:hidden\`). Putting a responsive display toggle on the SAME element silently fails (e.g. a mobile accordion stays visible on desktop):
78
- \`\`\`tsx
79
- // WRONG — ak-stack's display:flex beats md:hidden, so it never hides
80
- <div className="md:hidden ak-stack">…</div>
81
- // RIGHT — wrap: toggle on the outer element, primitive inside
82
- <div className="md:hidden"><div className="ak-stack">…</div></div>
83
- // or use plain flex/grid when you need to toggle visibility
84
- <div className="md:hidden flex flex-col">…</div>
85
- \`\`\`
86
-
87
- ## Charts — readable AND rendered (recipe)
88
- Use the colorful \`ak-chart-*\` tokens with solid fills (not faint \`ak-primary\` tints). **Percentage bar heights only resolve if the container has a DEFINITE height** — a common bug is \`min-height\` + \`items-end\`, which collapses the bars to zero. Use this pattern:
89
- \`\`\`tsx
90
- {/* DEFINITE height (h-56) + stretched columns so %-height bars resolve */}
91
- <div className="flex h-56 items-stretch gap-ak-1">
92
- {data.map((v, i) => (
93
- <div key={i} className="group flex flex-1 flex-col justify-end gap-ak-1">
94
- <div
95
- className={(i === data.length - 1 ? 'bg-ak-primary' : 'bg-ak-chart-1') + ' w-full rounded-ak-md'}
96
- style={{ height: \`\${Math.round((v / max) * 100)}%\` }} /* sanctioned data-driven inline style */
97
- role="img" aria-label={\`\${labels[i]}: \${v}\`}
98
- />
99
- <span className="text-ak-xs text-ak-text-muted">{labels[i]}</span>
100
- </div>
101
- ))}
102
- </div>
103
- \`\`\`
104
-
105
- ## Touch Targets — 48px Minimum
106
- - Buttons: \`min-h-[3rem]\` + \`cursor-pointer\`
107
- - Form inputs: \`h-14\` (56px)
108
-
109
- ## Empty States — Every Data Container
110
- Every list, table, or feed must handle: Loading → Error → Empty → Data.
111
- Empty states need: icon, title, description, CTA.
112
-
113
- ## Error Handling — Never Show Raw Errors
114
- User-facing errors need: title (jargon-free), description, action (Retry/Go Back).
115
-
116
- ## cn() Utility
117
- \`\`\`tsx
118
- import { cn } from '@/lib/utils'
119
- <div className={cn("p-ak-3", isActive && "bg-ak-primary")}>
120
- \`\`\`
1
+ export const CODING_STANDARDS = `# AstralKit Coding Standards
2
+
3
+ ## Setup
4
+ - Package: \`astralkit\` (npm)
5
+ - CSS: \`@import "astralkit/theme"; @import "astralkit/utilities";\` (after Tailwind imports)
6
+ - Tailwind v3 plugin: \`require('astralkit/tailwind.cjs')\` in tailwind.config
7
+ - Tailwind v4: \`@import "astralkit/theme-v4"; @import "astralkit/utilities";\`
8
+ - Icons: \`@phosphor-icons/react\` exclusively. Never Lucide, Heroicons, or inline SVGs.
9
+ - Fonts: Inter (body), DM Serif Display (display), JetBrains Mono (code)
10
+
11
+ ## Token-First Rule
12
+ ALWAYS use \`ak-*\` tokens. NEVER use arbitrary bracket values.
13
+ \`\`\`tsx
14
+ // CORRECT
15
+ <div className="p-ak-3 gap-ak-2 text-ak-base rounded-ak-lg">
16
+ // WRONG — arbitrary values silently collapse in Tailwind v4
17
+ <div className="p-[1.5rem] gap-[1rem] text-[16px] rounded-[0.75rem]">
18
+ \`\`\`
19
+
20
+ ## Semantic Colors — No Raw Tailwind
21
+ \`\`\`tsx
22
+ // CORRECT: bg-ak-surface, text-ak-text, border-ak-border, bg-ak-primary
23
+ // WRONG: bg-gray-50, text-gray-900, border-gray-200, bg-blue-600
24
+ \`\`\`
25
+
26
+ ## Typography — 16px Floor
27
+ - Body text, descriptions, nav items, table cells: \`text-ak-base\` (16px) minimum
28
+ - UI text: \`font-medium\` minimum — \`font-normal\` is for long-form prose only
29
+ - Labels/badges: \`text-ak-sm\` (14px) or \`text-ak-xs\` (12px uppercase) acceptable
30
+ - Helper/error text: \`text-ak-sm\` (14px) is the only exception
31
+
32
+ ## Spacing — ak-* Tokens Only
33
+ \`\`\`tsx
34
+ // CORRECT: p-ak-3, gap-ak-2, mb-ak-1_5
35
+ // WRONG: p-6, gap-4, mb-3
36
+ \`\`\`
37
+
38
+ ## Icons — Phosphor Only
39
+ \`\`\`tsx
40
+ import { House, Gear } from '@phosphor-icons/react'
41
+ <House size={20} aria-hidden="true" />
42
+ \`\`\`
43
+
44
+ ## No Inline Styles
45
+ Use Tailwind classes. \`style={{}}\` only for CSS variables with no Tailwind equivalent.
46
+
47
+ ## No Shadows on Panels/Dropdowns — Borders Only
48
+ Use \`border border-ak-border\`. Reserve shadows for modals and elevated cards.
49
+
50
+ ## Motion — Framer Motion + CSS + Lenis (GSAP not allowed)
51
+ Framer Motion (the MIT \`motion\` package) IS allowed. Prefer the AstralKit presets from
52
+ \`astralkit/motion\` (tuned to the motion tokens, reduced-motion-safe). CSS animations are
53
+ also fine (durations/easings via \`duration-ak-*\`, \`ease-ak-spring\`/\`bounce\`). Use Lenis for
54
+ smooth scroll. ALWAYS honor \`prefers-reduced-motion\`. **GSAP is NOT allowed** (license).
55
+ \`\`\`tsx
56
+ import { motion, useReducedMotion } from 'motion/react'
57
+ import { fadeInUp, withReducedMotion } from 'astralkit/motion'
58
+ const reduced = useReducedMotion()
59
+ <motion.div initial="hidden" animate="show" variants={withReducedMotion(fadeInUp, reduced)} />
60
+ \`\`\`
61
+
62
+ ## Premium Polish — Use the Effect Toolkit (with taste)
63
+ AstralKit ships CSS-only premium effects — reach for them so screens feel designed, not generic:
64
+ - Depth/glow: \`ak-card-glow\`, \`ak-ambient-glow\`, \`ak-spotlight-card\`, \`ak-gradient-border\`, \`ak-text-glow\`, \`ak-surface-raised\`
65
+ - Backgrounds: \`ak-mesh-light\` / \`ak-mesh-dark\` / \`ak-mesh-astral\` (mesh gradients)
66
+ - Motion accents (CSS): \`ak-float\`, \`ak-scroll-fade\`, \`ak-section-fade\`, \`ak-sheen\`, \`ak-press\` (tap feedback)
67
+ - Color: tasteful accent (60-30-10); colorful charts use \`ak-chart-1\`..\`ak-chart-6\`; curated palettes via \`astralkit/palettes\`
68
+ - Icons: Phosphor \`weight="duotone"\` reads richer for feature/marketing icons
69
+
70
+ ### Effect guardrails (use the RIGHT effect on the RIGHT surface)
71
+ - **Glows need dark surfaces.** \`ak-text-glow\`, \`ak-ambient-glow\`, and \`ak-card-glow\` read correctly as LIGHT-on-DARK. On a light background with dark text they look like a muddy smudge — **do NOT put text-glow on dark text / light backgrounds.**
72
+ - **For dramatic/marketing heroes, go dark.** Add the \`dark\` class to the section root + \`ak-mesh-dark\` (tokens auto-flip to dark), light text, and a gradient accent word. This reads more premium than a light hero.
73
+ - **Gradient text accent** (instead of glow): \`<span className="bg-gradient-to-r from-ak-primary to-ak-info bg-clip-text text-transparent">word</span>\`.
74
+ - Don't stack many effects on one element; one accent treatment per focal point.
75
+
76
+ ## Layout primitives — don't fight responsive display
77
+ \`ak-stack\`, \`ak-cluster\`, \`ak-grid\`, \`ak-switcher\` SET \`display\` (flex/grid) and are unlayered, so they OVERRIDE Tailwind's responsive display utilities (\`md:hidden\`, \`lg:block\`, \`sm:hidden\`). Putting a responsive display toggle on the SAME element silently fails (e.g. a mobile accordion stays visible on desktop):
78
+ \`\`\`tsx
79
+ // WRONG — ak-stack's display:flex beats md:hidden, so it never hides
80
+ <div className="md:hidden ak-stack">…</div>
81
+ // RIGHT — wrap: toggle on the outer element, primitive inside
82
+ <div className="md:hidden"><div className="ak-stack">…</div></div>
83
+ // or use plain flex/grid when you need to toggle visibility
84
+ <div className="md:hidden flex flex-col">…</div>
85
+ \`\`\`
86
+
87
+ ## Charts — readable AND rendered (recipe)
88
+ Use the colorful \`ak-chart-*\` tokens with solid fills (not faint \`ak-primary\` tints). **Percentage bar heights only resolve if the container has a DEFINITE height** — a common bug is \`min-height\` + \`items-end\`, which collapses the bars to zero. Use this pattern:
89
+ \`\`\`tsx
90
+ {/* DEFINITE height (h-56) + stretched columns so %-height bars resolve */}
91
+ <div className="flex h-56 items-stretch gap-ak-1">
92
+ {data.map((v, i) => (
93
+ <div key={i} className="group flex flex-1 flex-col justify-end gap-ak-1">
94
+ <div
95
+ className={(i === data.length - 1 ? 'bg-ak-primary' : 'bg-ak-chart-1') + ' w-full rounded-ak-md'}
96
+ style={{ height: \`\${Math.round((v / max) * 100)}%\` }} /* sanctioned data-driven inline style */
97
+ role="img" aria-label={\`\${labels[i]}: \${v}\`}
98
+ />
99
+ <span className="text-ak-xs text-ak-text-muted">{labels[i]}</span>
100
+ </div>
101
+ ))}
102
+ </div>
103
+ \`\`\`
104
+
105
+ ## Touch Targets — 48px Minimum
106
+ - Buttons: \`min-h-[3rem]\` + \`cursor-pointer\`
107
+ - Form inputs: \`h-14\` (56px)
108
+
109
+ ## Empty States — Every Data Container
110
+ Every list, table, or feed must handle: Loading → Error → Empty → Data.
111
+ Empty states need: icon, title, description, CTA.
112
+
113
+ ## Error Handling — Never Show Raw Errors
114
+ User-facing errors need: title (jargon-free), description, action (Retry/Go Back).
115
+
116
+ ## cn() Utility
117
+ \`\`\`tsx
118
+ import { cn } from '@/lib/utils'
119
+ <div className={cn("p-ak-3", isActive && "bg-ak-primary")}>
120
+ \`\`\`
121
+
122
+ ## Theming Grammar — M3 Role System (60-30-10)
123
+ Every fill must use a ROLE, never resolve "what color is this" yourself:
124
+ - **CTAs + binary on-states** (buttons, checked checkbox, toggle-ON): \`bg-ak-primary text-ak-on-primary hover:bg-ak-primary-hover\` — NEVER \`bg-ak-text\` for interactive fills.
125
+ - **Selection-among-options** (active tab/segment/chip/nav item): \`bg-ak-secondary text-ak-on-secondary\`; subtle selected rows/nav: \`bg-ak-secondary-container text-ak-on-secondary-container\`.
126
+ - **Selected-not-pressed cards**: \`bg-ak-primary-container border-ak-primary\`.
127
+ - **Inverted/dark panels** (terminals, dark rails, dark tooltips, promo cards): \`bg-ak-inverse-surface text-ak-inverse-on-surface\` — NEVER \`bg-ak-text\`, \`bg-ak-neutral-900 text-white\`, or raw \`bg-black\`/hex.
128
+ - **Surfaces**: page canvas \`bg-ak-surface\` → paper cards/inputs \`bg-ak-surface-container-lowest\` (or legacy \`bg-ak-bg\`/\`bg-ak-elevated\`) → wells/tracks \`bg-ak-surface-container\` (\`-high\`/\`-highest\` deeper). Borders: \`border-ak-outline-variant\` (hairline) / \`border-ak-outline\`.
129
+ - **Overlays**: \`bg-ak-scrim\`. **Status**: \`ak-error(-container)\`/\`ak-success\`/\`ak-warning\`/\`ak-info\` + their \`-text\`/\`on-\` partners.
130
+ - Non-interactive emphasis ink pills may keep \`bg-ak-text text-ak-bg\`. Opacity washes (\`bg-ak-text/10\`) stay neutral. Content colors (palette swatches, chart data) are exempt.
131
+ Default theme: primary is black, secondary falls back to primary — monochrome by default, fully colorable by any theme.
121
132
  `;
122
133
  //# sourceMappingURL=rules.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/data/rules.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwH/B,CAAC"}
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/data/rules.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmI/B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const SCREEN_BLUEPRINTS: Record<string, string>;
2
+ export declare const SCREEN_TYPES: string[];
3
+ /** Build the get_screen_blueprint response for a screen type. */
4
+ export declare function buildScreenBlueprint(screenType: string): string;
5
+ //# sourceMappingURL=screens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../src/data/screens.ts"],"names":[],"mappings":"AAoJA,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQpD,CAAC;AAEF,eAAO,MAAM,YAAY,UAAiC,CAAC;AAE3D,iEAAiE;AACjE,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAY/D"}