@ggui-ai/ui-gen 0.6.3 → 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.
- 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
package/dist/harness/index.js
CHANGED
|
@@ -979,7 +979,9 @@ var ALL_COMPONENTS = [
|
|
|
979
979
|
"Pagination",
|
|
980
980
|
"EmptyState",
|
|
981
981
|
"Stat",
|
|
982
|
-
"Stepper"
|
|
982
|
+
"Stepper",
|
|
983
|
+
"Markdown",
|
|
984
|
+
"MarkdownInline"
|
|
983
985
|
].join(", ");
|
|
984
986
|
var ALL_COMPOSITIONS = [
|
|
985
987
|
"Header",
|
|
@@ -1339,12 +1341,12 @@ Only list MISSING interactive elements. Use 'fail' only for issues blocking core
|
|
|
1339
1341
|
priority: "P2",
|
|
1340
1342
|
tier: 2,
|
|
1341
1343
|
failOutcome: "warn",
|
|
1342
|
-
codingGuidance: "Add labels on form inputs, alt text on images, semantic HTML.",
|
|
1343
|
-
evalInstruction: `Evaluate ACCESSIBILITY: missing labels, alt text, semantic HTML, keyboard support.
|
|
1344
|
+
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.",
|
|
1345
|
+
evalInstruction: `Evaluate ACCESSIBILITY: missing labels, alt text, semantic HTML, keyboard support, ARIA state.
|
|
1344
1346
|
|
|
1345
1347
|
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.
|
|
1346
1348
|
|
|
1347
|
-
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.
|
|
1349
|
+
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.
|
|
1348
1350
|
|
|
1349
1351
|
Only list MISSING accessibility features. Use 'fail' only if it blocks delivery.`
|
|
1350
1352
|
},
|
|
@@ -1947,7 +1949,7 @@ Available primitives (all from \`@ggui-ai/design\`):
|
|
|
1947
1949
|
- Composite: Accordion, Tabs, Table, Toast
|
|
1948
1950
|
|
|
1949
1951
|
Available compound components (all from \`@ggui-ai/design\`):
|
|
1950
|
-
- Autocomplete, Breadcrumb, Dropdown, EmptyState, FormField, MenuItem, Pagination, SearchField, Stat, Stepper, Tag
|
|
1952
|
+
- Autocomplete, Breadcrumb, Dropdown, EmptyState, FormField, Markdown, MarkdownInline, MenuItem, Pagination, SearchField, Stat, Stepper, Tag
|
|
1951
1953
|
|
|
1952
1954
|
**Choosing between similar components** \u2014 pick by intent, don't guess:
|
|
1953
1955
|
- **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\`.
|
|
@@ -1989,6 +1991,7 @@ The design-system primitives are accessible by construction \u2014 they emit the
|
|
|
1989
1991
|
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.
|
|
1990
1992
|
5. **Headings nest** \u2014 one \`<Heading level={1}>\` per screen, \`level={2}\` for sections, \`level={3}\` for subsections. Never skip or invert levels.
|
|
1991
1993
|
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>\`.
|
|
1994
|
+
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.
|
|
1992
1995
|
|
|
1993
1996
|
## Design System Usage (CRITICAL)
|
|
1994
1997
|
|
|
@@ -2195,6 +2198,7 @@ Hero sections should feel airy. Use \`padding="xl"\` (32px) on the main card, no
|
|
|
2195
2198
|
- [ ] Typed Props interface exported; request-specific data is a prop with default
|
|
2196
2199
|
- [ ] Every Input/TextArea/Select has a \`label\` prop (no separate \`<Text>\` label)
|
|
2197
2200
|
- [ ] Icon-only buttons have \`aria-label\`; no redundant \`role\`/\`aria-*\` on primitives
|
|
2201
|
+
- [ ] Toggleable/selected/expanded state is ARIA-expressed (\`aria-checked\`/\`aria-pressed\`/\`aria-selected\`/\`aria-expanded\`) \u2014 never style-only
|
|
2198
2202
|
- [ ] Live/streaming regions wrapped in \`aria-live="polite"\`
|
|
2199
2203
|
- [ ] Headings nest \u2014 one \`level={1}\`, then \`level={2}\`/\`{3}\` \u2014 never skipped or inverted
|
|
2200
2204
|
- [ ] Wire hooks (\`useAction\`, \`useStream\`) imported from \`@ggui-ai/wire\` and consumed`;
|