@ggui-ai/ui-gen 0.6.3 → 0.8.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/adapters/generation-dispatch.js +20 -8
- package/dist/adapters/generation-dispatch.js.map +1 -1
- package/dist/adapters/index.js +1 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/advanced/index.js +20 -8
- package/dist/advanced/index.js.map +1 -1
- package/dist/boilerplate.js +9 -5
- package/dist/boilerplate.js.map +1 -1
- package/dist/check/index.js.map +1 -1
- package/dist/evaluation/axis-checks/index.js.map +1 -1
- package/dist/evaluation/index.js +3 -3
- package/dist/evaluation/index.js.map +1 -1
- package/dist/harness/index.js +9 -5
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/runtime.js +10 -6
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness/types-public.js +9 -5
- package/dist/harness/types-public.js.map +1 -1
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/dist/tools/get-primitives-ts.d.ts +1 -1
- package/dist/tools/get-primitives-ts.js +1 -1
- package/dist/tools/get-primitives-ts.js.map +1 -1
- package/dist/validation/index.d.ts +1 -1
- package/dist/validation/index.js +1 -1
- package/dist/validation/index.js.map +1 -1
- package/package.json +12 -12
- package/src/boilerplate/generate.ts +2 -0
- package/src/boilerplate/system-prompt.ts +3 -1
- package/src/boilerplate/templates/base.tsx.tmpl +1 -1
- package/src/evaluation/llm-evaluator.ts +8 -1
- package/src/evaluation/types-public.ts +4 -3
- package/src/harness/primitive-slice.ts +1 -1
- package/src/tools/get-primitives-ts.ts +1 -1
- package/src/validation/primitives.ts +1 -1
|
@@ -807,7 +807,9 @@ var ALL_COMPONENTS = [
|
|
|
807
807
|
"Pagination",
|
|
808
808
|
"EmptyState",
|
|
809
809
|
"Stat",
|
|
810
|
-
"Stepper"
|
|
810
|
+
"Stepper",
|
|
811
|
+
"Markdown",
|
|
812
|
+
"MarkdownInline"
|
|
811
813
|
].join(", ");
|
|
812
814
|
var ALL_COMPOSITIONS = [
|
|
813
815
|
"Header",
|
|
@@ -1167,12 +1169,12 @@ Only list MISSING interactive elements. Use 'fail' only for issues blocking core
|
|
|
1167
1169
|
priority: "P2",
|
|
1168
1170
|
tier: 2,
|
|
1169
1171
|
failOutcome: "warn",
|
|
1170
|
-
codingGuidance: "Add labels on form inputs, alt text on images, semantic HTML.",
|
|
1171
|
-
evalInstruction: `Evaluate ACCESSIBILITY: missing labels, alt text, semantic HTML, keyboard support.
|
|
1172
|
+
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.",
|
|
1173
|
+
evalInstruction: `Evaluate ACCESSIBILITY: missing labels, alt text, semantic HTML, keyboard support, ARIA state.
|
|
1172
1174
|
|
|
1173
1175
|
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.
|
|
1174
1176
|
|
|
1175
|
-
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.
|
|
1177
|
+
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.
|
|
1176
1178
|
|
|
1177
1179
|
Only list MISSING accessibility features. Use 'fail' only if it blocks delivery.`
|
|
1178
1180
|
},
|
|
@@ -1775,7 +1777,7 @@ Available primitives (all from \`@ggui-ai/design\`):
|
|
|
1775
1777
|
- Composite: Accordion, Tabs, Table, Toast
|
|
1776
1778
|
|
|
1777
1779
|
Available compound components (all from \`@ggui-ai/design\`):
|
|
1778
|
-
- Autocomplete, Breadcrumb, Dropdown, EmptyState, FormField, MenuItem, Pagination, SearchField, Stat, Stepper, Tag
|
|
1780
|
+
- Autocomplete, Breadcrumb, Dropdown, EmptyState, FormField, Markdown, MarkdownInline, MenuItem, Pagination, SearchField, Stat, Stepper, Tag
|
|
1779
1781
|
|
|
1780
1782
|
**Choosing between similar components** \u2014 pick by intent, don't guess:
|
|
1781
1783
|
- **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\`.
|
|
@@ -1817,6 +1819,7 @@ The design-system primitives are accessible by construction \u2014 they emit the
|
|
|
1817
1819
|
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.
|
|
1818
1820
|
5. **Headings nest** \u2014 one \`<Heading level={1}>\` per screen, \`level={2}\` for sections, \`level={3}\` for subsections. Never skip or invert levels.
|
|
1819
1821
|
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>\`.
|
|
1822
|
+
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.
|
|
1820
1823
|
|
|
1821
1824
|
## Design System Usage (CRITICAL)
|
|
1822
1825
|
|
|
@@ -2023,6 +2026,7 @@ Hero sections should feel airy. Use \`padding="xl"\` (32px) on the main card, no
|
|
|
2023
2026
|
- [ ] Typed Props interface exported; request-specific data is a prop with default
|
|
2024
2027
|
- [ ] Every Input/TextArea/Select has a \`label\` prop (no separate \`<Text>\` label)
|
|
2025
2028
|
- [ ] Icon-only buttons have \`aria-label\`; no redundant \`role\`/\`aria-*\` on primitives
|
|
2029
|
+
- [ ] Toggleable/selected/expanded state is ARIA-expressed (\`aria-checked\`/\`aria-pressed\`/\`aria-selected\`/\`aria-expanded\`) \u2014 never style-only
|
|
2026
2030
|
- [ ] Live/streaming regions wrapped in \`aria-live="polite"\`
|
|
2027
2031
|
- [ ] Headings nest \u2014 one \`level={1}\`, then \`level={2}\`/\`{3}\` \u2014 never skipped or inverted
|
|
2028
2032
|
- [ ] Wire hooks (\`useAction\`, \`useStream\`) imported from \`@ggui-ai/wire\` and consumed`;
|