@ggui-ai/ui-gen 0.6.2 → 0.7.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.
Files changed (35) hide show
  1. package/dist/adapters/generation-dispatch.js +21 -8
  2. package/dist/adapters/generation-dispatch.js.map +1 -1
  3. package/dist/adapters/index.js +1 -1
  4. package/dist/adapters/index.js.map +1 -1
  5. package/dist/advanced/index.js +21 -8
  6. package/dist/advanced/index.js.map +1 -1
  7. package/dist/boilerplate.js +9 -5
  8. package/dist/boilerplate.js.map +1 -1
  9. package/dist/check/index.js.map +1 -1
  10. package/dist/evaluation/axis-checks/index.js.map +1 -1
  11. package/dist/evaluation/index.js +3 -3
  12. package/dist/evaluation/index.js.map +1 -1
  13. package/dist/harness/index.js +9 -5
  14. package/dist/harness/index.js.map +1 -1
  15. package/dist/harness/runtime.js +10 -6
  16. package/dist/harness/runtime.js.map +1 -1
  17. package/dist/harness/types-public.js +9 -5
  18. package/dist/harness/types-public.js.map +1 -1
  19. package/dist/index.js +21 -8
  20. package/dist/index.js.map +1 -1
  21. package/dist/tools/get-primitives-ts.d.ts +1 -1
  22. package/dist/tools/get-primitives-ts.js +1 -1
  23. package/dist/tools/get-primitives-ts.js.map +1 -1
  24. package/dist/validation/index.d.ts +1 -1
  25. package/dist/validation/index.js +1 -1
  26. package/dist/validation/index.js.map +1 -1
  27. package/package.json +12 -12
  28. package/src/boilerplate/generate.ts +2 -0
  29. package/src/boilerplate/system-prompt.ts +3 -1
  30. package/src/boilerplate/templates/base.tsx.tmpl +1 -1
  31. package/src/evaluation/llm-evaluator.ts +8 -1
  32. package/src/evaluation/types-public.ts +4 -3
  33. package/src/harness/primitive-slice.ts +1 -1
  34. package/src/tools/get-primitives-ts.ts +1 -1
  35. package/src/validation/primitives.ts +1 -1
@@ -168,7 +168,9 @@ var ALL_COMPONENTS = [
168
168
  "Pagination",
169
169
  "EmptyState",
170
170
  "Stat",
171
- "Stepper"
171
+ "Stepper",
172
+ "Markdown",
173
+ "MarkdownInline"
172
174
  ].join(", ");
173
175
  var ALL_COMPOSITIONS = [
174
176
  "Header",
@@ -528,12 +530,12 @@ Only list MISSING interactive elements. Use 'fail' only for issues blocking core
528
530
  priority: "P2",
529
531
  tier: 2,
530
532
  failOutcome: "warn",
531
- codingGuidance: "Add labels on form inputs, alt text on images, semantic HTML.",
532
- evalInstruction: `Evaluate ACCESSIBILITY: missing labels, alt text, semantic HTML, keyboard support.
533
+ codingGuidance: "Add labels on form inputs, alt text on images, semantic HTML, and state ARIA (aria-checked/pressed/selected/expanded) on hand-rolled interactive controls.",
534
+ evalInstruction: `Evaluate ACCESSIBILITY: missing labels, alt text, semantic HTML, keyboard support, ARIA state.
533
535
 
534
536
  ggui primitives bake in their own ARIA \u2014 see "Primitive Accessibility" in the Design System context above. NEVER flag a ggui primitive (Input/Select/TextArea, RadioGroup, Checkbox, Toggle, Progress, Slider, Spinner, Skeleton, Tabs, Accordion, Alert, Toast, Tooltip, Clickable, Icon) for a missing role / aria-* / label / keyboard handler \u2014 it is already there and not visible in the source you are reading.
535
537
 
536
- Flag ONLY real gaps: a raw div/span used as an interactive control; an image with no alt text; an Input/Select/TextArea with no \`label\` prop; an icon-only Button with no aria-label; live/streaming data not wrapped in an aria-live region; inverted heading hierarchy.
538
+ Flag ONLY real gaps: a raw div/span used as an interactive control; a hand-rolled control whose checked/selected/expanded/pressed state is conveyed only by styling (strikethrough, color, a check icon) with no \`aria-checked\` / \`aria-pressed\` / \`aria-selected\` / \`aria-expanded\`; an image with no alt text; an Input/Select/TextArea with no \`label\` prop; an icon-only Button with no aria-label; live/streaming data not wrapped in an aria-live region; inverted heading hierarchy.
537
539
 
538
540
  Only list MISSING accessibility features. Use 'fail' only if it blocks delivery.`
539
541
  },
@@ -1136,7 +1138,7 @@ Available primitives (all from \`@ggui-ai/design\`):
1136
1138
  - Composite: Accordion, Tabs, Table, Toast
1137
1139
 
1138
1140
  Available compound components (all from \`@ggui-ai/design\`):
1139
- - Autocomplete, Breadcrumb, Dropdown, EmptyState, FormField, MenuItem, Pagination, SearchField, Stat, Stepper, Tag
1141
+ - Autocomplete, Breadcrumb, Dropdown, EmptyState, FormField, Markdown, MarkdownInline, MenuItem, Pagination, SearchField, Stat, Stepper, Tag
1140
1142
 
1141
1143
  **Choosing between similar components** \u2014 pick by intent, don't guess:
1142
1144
  - **Pick from options**: one value from a short fixed list (a form field) \u2192 \`Select\`. Type-to-filter a long list, then pick \u2192 \`Autocomplete\`. A menu of actions off a button (edit / delete / \u2026) \u2192 \`Dropdown\`. A search box that filters displayed content \u2192 \`SearchField\`.
@@ -1178,6 +1180,7 @@ The design-system primitives are accessible by construction \u2014 they emit the
1178
1180
  4. **Live & streaming data** \u2014 wrap any region whose content updates on its own (a \`useStream\` \`.latest\` value, a live clock, an "N new" counter, a flashing price) in an element with \`aria-live="polite"\` so screen readers announce the change.
1179
1181
  5. **Headings nest** \u2014 one \`<Heading level={1}>\` per screen, \`level={2}\` for sections, \`level={3}\` for subsections. Never skip or invert levels.
1180
1182
  6. **Buttons** \u2014 descriptive text content; icon-only buttons need \`aria-label\`. Announce busy state: \`<Button disabled={isLoading} aria-busy={isLoading}>{isLoading ? 'Submitting\u2026' : 'Submit'}</Button>\`.
1183
+ 7. **Stateful controls announce their state.** Toggleable / selectable / expandable things use the primitive that carries the semantics (\`Checkbox\`, \`Toggle\`, \`Tabs\`, \`Accordion\`) \u2014 never a styled \`Box\`/\`Icon\` that only *looks* checked. When you hand-roll one with \`as={Clickable}\`, \`Clickable\` adds button + keyboard semantics but NOT state \u2014 add it yourself: \`role="checkbox"\` + \`aria-checked={done}\` on a toggleable row, \`aria-pressed\` on a toggle button, \`aria-selected\` on the chosen item, \`aria-expanded\` on an open/close affordance. Styling (strikethrough, color, a check icon) must never be the only carrier of state.
1181
1184
 
1182
1185
  ## Design System Usage (CRITICAL)
1183
1186
 
@@ -1384,6 +1387,7 @@ Hero sections should feel airy. Use \`padding="xl"\` (32px) on the main card, no
1384
1387
  - [ ] Typed Props interface exported; request-specific data is a prop with default
1385
1388
  - [ ] Every Input/TextArea/Select has a \`label\` prop (no separate \`<Text>\` label)
1386
1389
  - [ ] Icon-only buttons have \`aria-label\`; no redundant \`role\`/\`aria-*\` on primitives
1390
+ - [ ] Toggleable/selected/expanded state is ARIA-expressed (\`aria-checked\`/\`aria-pressed\`/\`aria-selected\`/\`aria-expanded\`) \u2014 never style-only
1387
1391
  - [ ] Live/streaming regions wrapped in \`aria-live="polite"\`
1388
1392
  - [ ] Headings nest \u2014 one \`level={1}\`, then \`level={2}\`/\`{3}\` \u2014 never skipped or inverted
1389
1393
  - [ ] Wire hooks (\`useAction\`, \`useStream\`) imported from \`@ggui-ai/wire\` and consumed`;