@astryxdesign/cli 0.5.2-canary.e4f8e4e → 0.5.2-canary.ed45a8f

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 (32) hide show
  1. package/api/theme/targets/targets.test.mjs +15 -0
  2. package/assets/docs/icons.doc.mjs +2 -2
  3. package/assets/docs/typography.doc.mjs +2 -2
  4. package/assets/templates/blocks/components/DateTimeInput/DateTimeInputShowcase.tsx +4 -1
  5. package/assets/templates/blocks/components/Table/TableRowStatusTable.doc.mjs +3 -3
  6. package/assets/templates/blocks/components/Table/TableRowStatusTable.tsx +4 -4
  7. package/assets/templates/blocks/components/TimeInput/TimeInputShowcase.doc.mjs +1 -1
  8. package/assets/templates/blocks/components/TimeInput/TimeInputShowcase.tsx +12 -6
  9. package/assets/templates/pages/ai-chat/template.doc.mjs +1 -1
  10. package/assets/templates/pages/centered-hero/template.doc.mjs +1 -1
  11. package/assets/templates/pages/contact-form/template.doc.mjs +1 -1
  12. package/assets/templates/pages/dashboard/template.doc.mjs +1 -1
  13. package/assets/templates/pages/detail-page/template.doc.mjs +1 -1
  14. package/assets/templates/pages/gallery-hero/template.doc.mjs +1 -1
  15. package/assets/templates/pages/incident-console/template.doc.mjs +1 -1
  16. package/assets/templates/pages/login/template.doc.mjs +1 -1
  17. package/assets/templates/pages/messaging-shell/template.doc.mjs +1 -1
  18. package/assets/templates/pages/product-gallery/template.doc.mjs +1 -1
  19. package/assets/templates/pages/settings/template.doc.mjs +1 -1
  20. package/assets/templates/pages/table/template.doc.mjs +1 -1
  21. package/assets/templates/pages/table-filter/page.tsx +897 -365
  22. package/foundation/discovery/__fixtures__/component-accessibility-overlay.doc.d.mts +16 -1
  23. package/foundation/discovery/__fixtures__/component-accessibility-overlay.doc.mjs +17 -2
  24. package/foundation/discovery/__fixtures__/component-anatomy-override.doc.d.mts +38 -0
  25. package/foundation/discovery/__fixtures__/component-anatomy-override.doc.mjs +45 -0
  26. package/foundation/discovery/component-loader.mjs +6 -2
  27. package/foundation/discovery/component-loader.test.mjs +36 -1
  28. package/foundation/discovery/componentDocOverlay.test.mjs +29 -2
  29. package/foundation/discovery/theming-targets.d.mts +8 -3
  30. package/foundation/discovery/theming-targets.mjs +58 -6
  31. package/foundation/discovery/theming-targets.test.mjs +71 -2
  32. package/package.json +9 -9
@@ -39,6 +39,21 @@ describe('themeTargets (api/theme/targets)', () => {
39
39
  ]);
40
40
  }, 60_000);
41
41
 
42
+ it.each(['table-header', 'table-body', 'table-footer'])(
43
+ '%s appears once under the Table owner',
44
+ async target => {
45
+ const {data} = await themeTargets('Table');
46
+ const matches = data.targets.filter(entry => entry.key === target);
47
+ expect(data.componentCount).toBe(1);
48
+ expect(matches).toHaveLength(1);
49
+ expect(matches[0]).toMatchObject({
50
+ key: target,
51
+ component: 'Table',
52
+ });
53
+ },
54
+ 60_000,
55
+ );
56
+
42
57
  // Half the system's keys contain "button" (chat-send-button, toggle-button,
43
58
  // …). A component name has to mean the component, or `theme targets Button`
44
59
  // answers a different question than `component Button` and the two views
@@ -108,7 +108,7 @@ export const brandTheme = defineTheme({
108
108
  content: [
109
109
  {
110
110
  type: 'prose',
111
- text: 'A glyph that belongs to one component or library gets a namespaced key (`numberInput:stepperDown`, `richtext:bold`) instead of a new semantic name. It resolves through the same registry and a theme overrides it the same way, but the shared IconName list stays reserved for glyphs the whole system uses so adding one does not make every downstream icon registry grow a key.',
111
+ text: 'A glyph that belongs to one component or library gets a namespaced key (`numberInput:stepperDown`, `richtext:bold`) instead of a new semantic name. It resolves through the same registry and a theme overrides it the same way, but the shared IconName list stays reserved for glyphs the whole system uses, so adding one does not make every downstream icon registry grow a key.',
112
112
  },
113
113
  {
114
114
  type: 'code',
@@ -138,7 +138,7 @@ export const brandTheme = defineTheme({
138
138
  content: [
139
139
  {
140
140
  type: 'prose',
141
- text: 'To add a new semantic icon name to the design system only for a glyph the whole system shares; a component-owned one takes a namespaced key instead:',
141
+ text: 'To add a new semantic icon name to the design system, only for a glyph the whole system shares; a component-owned one takes a namespaced key instead:',
142
142
  },
143
143
  {
144
144
  type: 'list',
@@ -56,7 +56,7 @@ export const docs = {
56
56
  {
57
57
  type: 'code',
58
58
  lang: 'html',
59
- label: 'Google Fonts add to your document <head>',
59
+ label: 'Google Fonts: add to your document <head>',
60
60
  code: `<link rel="preconnect" href="https://fonts.googleapis.com" />
61
61
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
62
62
  <link
@@ -67,7 +67,7 @@ export const docs = {
67
67
  {
68
68
  type: 'code',
69
69
  lang: 'css',
70
- label: 'Self-hosted one @font-face per family and weight',
70
+ label: 'Self-hosted: one @font-face per family and weight',
71
71
  code: `@font-face {
72
72
  font-family: 'Fraunces';
73
73
  src: url('/fonts/fraunces.woff2') format('woff2');
@@ -13,7 +13,10 @@ export default function DateTimeInputShowcase() {
13
13
  );
14
14
 
15
15
  return (
16
- <Stack direction="vertical" width="100%" style={{maxWidth: 400}}>
16
+ <Stack
17
+ direction="vertical"
18
+ width="100%"
19
+ style={{minWidth: 240, maxWidth: 400}}>
17
20
  <DateTimeInput
18
21
  label="Meeting time"
19
22
  placeholder="Select a date"
@@ -4,10 +4,10 @@
4
4
  export const doc = {
5
5
  type: 'block',
6
6
  exampleFor: 'useTableRowStatus',
7
- name: 'useTableRowStatus - Status Dots',
8
- displayName: 'useTableRowStatus - Status Dots',
7
+ name: 'useTableRowStatus - Status Icons',
8
+ displayName: 'useTableRowStatus - Status Icons',
9
9
  description:
10
- 'A job table using useTableRowStatus to render a colored status dot (or icon) per row (failed / running / queued). Rows with no status show no dot.',
10
+ 'A job table using useTableRowStatus. Semantic outcomes use the themed success, warning, and error icons; a palette-only queued state keeps the neutral dot.',
11
11
  isReady: true,
12
12
  aspectRatio: 16 / 9,
13
13
  componentsUsed: ['Table'],
@@ -34,13 +34,13 @@ const columns: TableColumn<Job>[] = [
34
34
  function jobStatus(job: Job): TableRowStatus | null {
35
35
  switch (job.state) {
36
36
  case 'failed':
37
- return {color: 'error', icon: 'error', label: 'Failed'};
37
+ return {color: 'error', label: 'Failed'};
38
38
  case 'running':
39
- return {color: 'warning', icon: 'warning', label: 'Running'};
39
+ return {color: 'warning', label: 'Running'};
40
40
  case 'queued':
41
41
  return {color: 'gray', label: 'Queued'};
42
- default:
43
- return null; // succeeded: no dot
42
+ case 'succeeded':
43
+ return {color: 'success', label: 'Succeeded'};
44
44
  }
45
45
  }
46
46
 
@@ -10,6 +10,6 @@ export const doc = {
10
10
  aspectRatio: 16 / 9,
11
11
  isShowcase: true,
12
12
  description:
13
- 'A time input field.',
13
+ 'A time input that uses the browser/OS picker on touch by default and Astryx typed entry on fine pointers.',
14
14
  componentsUsed: ['TimeInput'],
15
15
  };
@@ -4,15 +4,21 @@
4
4
 
5
5
  import {useState} from 'react';
6
6
  import {TimeInput, type ISOTimeString} from '@astryxdesign/core/TimeInput';
7
+ import {Stack} from '@astryxdesign/core/Layout';
7
8
 
8
9
  export default function TimeInputShowcase() {
9
10
  const [time, setTime] = useState<ISOTimeString | undefined>(undefined);
10
11
  return (
11
- <TimeInput
12
- label="Time"
13
- placeholder="Select a time"
14
- value={time}
15
- onChange={setTime}
16
- />
12
+ <Stack
13
+ direction="vertical"
14
+ width="100%"
15
+ style={{minWidth: 240, maxWidth: 400}}>
16
+ <TimeInput
17
+ label="Time"
18
+ placeholder="Select a time"
19
+ value={time}
20
+ onChange={setTime}
21
+ />
22
+ </Stack>
17
23
  );
18
24
  }
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'AI Chat Conversation',
7
7
  displayName: 'AI Chat Conversation',
8
- description: 'Transcript of alternating turns carrying mixed rich content inline markdown, code blocks, collapsible tool-call output beside a resizable artifact panel that holds generated output while the stream keeps scrolling. Chat, conversation, assistant, messages, or copilot thread.',
8
+ description: 'Transcript of alternating turns carrying mixed rich content inline (markdown, code blocks, collapsible tool-call output) beside a resizable artifact panel that holds generated output while the stream keeps scrolling. Chat, conversation, assistant, messages, or copilot thread.',
9
9
  isReady: true,
10
10
  category: 'AI Chat - Conversation',
11
11
  };
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'Centered Hero',
7
7
  displayName: 'Centered Hero',
8
- description: 'Symmetrical centered stack headline, short blurb, paired call-to-action buttons resting on one wide full-bleed picture, with nothing on either flank competing. Hero, banner, splash, landing image, or marketing masthead.',
8
+ description: 'Symmetrical centered stack (headline, short blurb, paired call-to-action buttons) resting on one wide full-bleed picture, with nothing on either flank competing. Hero, banner, splash, landing image, or marketing masthead.',
9
9
  isReady: true,
10
10
  category: 'Gallery - Hero',
11
11
  };
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'Contact Form',
7
7
  displayName: 'Contact Form',
8
- description: 'Flat single-column form mixing control types text, pill toggles, dropdowns, long free-text landing on one full-width submit. No steps, no branching, no summary rail. Contact, lead capture, enquiry, survey, or intake form.',
8
+ description: 'Flat single-column form mixing control types (text, pill toggles, dropdowns, long free-text) landing on one full-width submit. No steps, no branching, no summary rail. Contact, lead capture, enquiry, survey, or intake form.',
9
9
  isReady: true,
10
10
  category: 'Form - Basic',
11
11
  };
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'Analytics Dashboard',
7
7
  displayName: 'Analytics Dashboard',
8
- description: 'Three-band analytics: a row of headline tiles, then charts, then supporting tables, all re-reading from one global filter bar. Breadth over depth a summary surface rather than a drill-down. Dashboard, overview, metrics, stats, analytics, reporting, or insights.',
8
+ description: 'Three-band analytics: a row of headline tiles, then charts, then supporting tables, all re-reading from one global filter bar. Breadth over depth, a summary surface rather than a drill-down. Dashboard, overview, metrics, stats, analytics, reporting, or insights.',
9
9
  isReady: true,
10
10
  category: 'Dashboard - Analytics',
11
11
  isHiddenFromOverview: true,
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'Order Detail',
7
7
  displayName: 'Order Detail',
8
- description: 'Single-record detail in two columns: a summary header with status and actions, a repeating line-item list, a totals block that sums it, and a chronological activity timeline in the rail. The shape for any record holding children plus a history a customer order with shipping, an invoice, a transaction, or a job.',
8
+ description: 'Single-record detail in two columns: a summary header with status and actions, a repeating line-item list, a totals block that sums it, and a chronological activity timeline in the rail. The shape for any record holding children plus a history: a customer order with shipping, an invoice, a transaction, or a job.',
9
9
  isReady: true,
10
10
  category: 'Content - Order Detail',
11
11
  };
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'Gallery Hero',
7
7
  displayName: 'Gallery Hero',
8
- description: 'Centered stack headline, short blurb, call-to-action buttons resolving into a multi-image photo grid rather than one wide full-bleed picture, so the imagery reads as a set. Hero, banner, splash, landing image, masthead, or gallery intro.',
8
+ description: 'Centered stack (headline, short blurb, call-to-action buttons) resolving into a multi-image photo grid rather than one wide full-bleed picture, so the imagery reads as a set. Hero, banner, splash, landing image, masthead, or gallery intro.',
9
9
  isReady: true,
10
10
  category: 'Gallery - Hero',
11
11
  };
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'Incident Console',
7
7
  displayName: 'Incident Console',
8
- description: 'Dense row queue with an inspector: severity-coded rows grouped by status, a saved-search filter bar, a segmented status control, and a resizable detail pane for the selected row. Rows, not cards sized for scanning volume. Incident, alert, on-call, outage, ticket, or triage console.',
8
+ description: 'Dense row queue with an inspector: severity-coded rows grouped by status, a saved-search filter bar, a segmented status control, and a resizable detail pane for the selected row. Rows, not cards, sized for scanning volume. Incident, alert, on-call, outage, ticket, or triage console.',
9
9
  isReady: false,
10
10
  category: 'Tools - Incident Console',
11
11
  };
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'Basic Login',
7
7
  displayName: 'Basic Login',
8
- description: 'Minimal centered credential form on a plain ground two fields and a submit, nothing competing for attention. The least-chrome entry surface. Login, sign in, signin, authentication, credentials, or account access.',
8
+ description: 'Minimal centered credential form on a plain ground: two fields and a submit, nothing competing for attention. The least-chrome entry surface. Login, sign in, signin, authentication, credentials, or account access.',
9
9
  isReady: true,
10
10
  isHiddenFromOverview: true,
11
11
  category: 'Login - Basic',
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'Messaging Shell',
7
7
  displayName: 'Messaging Shell',
8
- description: 'Four-column nested navigation narrowing left to right team workspace, channel list, message stream, thread panel where each column scopes the next. Dense rows, zero cards. Team messaging, chat, channels, threads, inbox, direct message, or conversation workspace.',
8
+ description: 'Four-column nested navigation narrowing left to right (team workspace, channel list, message stream, thread panel) where each column scopes the next. Dense rows, zero cards. Team messaging, chat, channels, threads, inbox, direct message, or conversation workspace.',
9
9
  isReady: false,
10
10
  category: 'Shell - Messaging',
11
11
  };
@@ -4,7 +4,7 @@
4
4
  export const doc = {
5
5
  name: 'Product Gallery',
6
6
  displayName: 'Product Gallery',
7
- description: 'Uniform card grid where every tile carries media, title, supporting line, and a price. Browse-to-select only no filtering, no detail surface. Products, catalog, storefront, shop, listings, or ecommerce grid.',
7
+ description: 'Uniform card grid where every tile carries media, title, supporting line, and a price. Browse-to-select only, with no filtering and no detail surface. Products, catalog, storefront, shop, listings, or ecommerce grid.',
8
8
  type: 'page',
9
9
  isReady: true,
10
10
  category: 'Gallery - Product',
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'Settings Form',
7
7
  displayName: 'Settings Form',
8
- description: 'Preferences as one continuously scrolling form, sections stacked in order with no navigation between them. The simplest settings shape everything reachable by scrolling. Settings, preferences, configuration, options, or account.',
8
+ description: 'Preferences as one continuously scrolling form, sections stacked in order with no navigation between them. The simplest settings shape: everything reachable by scrolling. Settings, preferences, configuration, options, or account.',
9
9
  isReady: true,
10
10
  category: 'Settings - Form',
11
11
  };
@@ -5,7 +5,7 @@ export const doc = {
5
5
  type: 'page',
6
6
  name: 'Simple Table',
7
7
  displayName: 'Simple Table',
8
- description: 'Flat row collection where columns sort, rows select into a bulk-action toolbar, and each row carries an overflow menu. Sortable but ungrouped, with no detail pane the baseline shape. Table, list, rows, records, grid, spreadsheet, or roster.',
8
+ description: 'Flat row collection where columns sort, rows select into a bulk-action toolbar, and each row carries an overflow menu. Sortable but ungrouped, with no detail pane, the baseline shape. Table, list, rows, records, grid, spreadsheet, or roster.',
9
9
  isReady: false,
10
10
  category: 'Table - Basic',
11
11
  isHiddenFromOverview: true,