@astryxdesign/cli 0.7.9-canary.cfd25ce → 0.7.9-canary.d5dd0ec

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 (108) hide show
  1. package/README.md +1 -1
  2. package/api/component/__fixtures__/resolutions/modules.txt +4 -4
  3. package/api/discover/_adapter.d.mts +1 -1
  4. package/api/search/_candidate-score.mjs +25 -23
  5. package/api/search/_main-searcher.mjs +1 -1
  6. package/api/search/_result.d.mts +5 -5
  7. package/api/search/_words.d.mts +44 -7
  8. package/api/search/_words.mjs +113 -21
  9. package/api/search/search.d.mts +1 -1
  10. package/api/swizzle/_adapter.d.mts +10 -0
  11. package/api/swizzle/_adapter.mjs +24 -1
  12. package/api/swizzle/copy/copy.d.mts +17 -1
  13. package/api/swizzle/copy/copy.mjs +249 -9
  14. package/api/swizzle/swizzle.doc.mjs +1 -1
  15. package/api/swizzle/swizzle.type.mjs +1 -1
  16. package/api/theme/build/build.mjs +363 -73
  17. package/api/theme/build/core-interception.mjs +92 -29
  18. package/api/theme/build/icon-imports.d.mts +35 -4
  19. package/api/theme/build/icon-imports.mjs +299 -38
  20. package/assets/discover/official-packages.json +4 -0
  21. package/assets/docs/author-a-theme.doc.mjs +3 -1
  22. package/assets/docs/icons.doc.mjs +29 -0
  23. package/assets/docs/motion.doc.mjs +1 -1
  24. package/assets/docs/tree/calendar-systems.doc.mjs +146 -0
  25. package/assets/docs/tree/calendars.doc.mjs +46 -0
  26. package/assets/docs/tree/i18n-calendars.doc.mjs +51 -0
  27. package/assets/docs/tree/internationalization.doc.mjs +3 -3
  28. package/assets/templates/blocks/components/Calendar/useCalendarDaysHookUsage.doc.mjs +14 -0
  29. package/assets/templates/blocks/components/Calendar/useCalendarDaysHookUsage.tsx +71 -0
  30. package/assets/templates/blocks/components/Hooks/useMergedRefsHookUsage.doc.mjs +14 -0
  31. package/assets/templates/blocks/components/Hooks/useMergedRefsHookUsage.tsx +78 -0
  32. package/assets/templates/blocks/components/Hooks/useScrollOverflowHookUsage.doc.mjs +14 -0
  33. package/assets/templates/blocks/components/Hooks/useScrollOverflowHookUsage.tsx +94 -0
  34. package/assets/templates/blocks/components/Icon/useIconHookUsage.doc.mjs +19 -0
  35. package/assets/templates/blocks/components/Icon/useIconHookUsage.tsx +68 -0
  36. package/assets/templates/blocks/components/Link/useLinkComponentHookUsage.doc.mjs +14 -0
  37. package/assets/templates/blocks/components/Link/useLinkComponentHookUsage.tsx +89 -0
  38. package/assets/templates/blocks/components/Overlay/useOverlayHookUsage.doc.mjs +21 -0
  39. package/assets/templates/blocks/components/Overlay/useOverlayHookUsage.tsx +49 -0
  40. package/assets/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx +8 -7
  41. package/assets/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx +8 -7
  42. package/assets/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx +8 -7
  43. package/assets/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx +12 -10
  44. package/assets/templates/blocks/components/PowerSearch/PowerSearchShowcase.tsx +8 -7
  45. package/assets/templates/blocks/components/Tokenizer/TokenizerClear.doc.mjs +2 -1
  46. package/assets/templates/blocks/components/Tokenizer/TokenizerClear.tsx +2 -2
  47. package/assets/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +0 -1
  48. package/assets/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +0 -1
  49. package/assets/templates/blocks/components/Tokenizer/TokenizerOverflow.doc.mjs +2 -1
  50. package/assets/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +0 -2
  51. package/assets/templates/blocks/components/usePanGesture/PanDraggableBox.doc.mjs +15 -0
  52. package/assets/templates/blocks/components/usePanGesture/PanDraggableBox.tsx +98 -0
  53. package/assets/templates/blocks/components/usePanGesture/PanPlayingCard.doc.mjs +14 -0
  54. package/assets/templates/blocks/components/usePanGesture/PanPlayingCard.tsx +147 -0
  55. package/assets/templates/pages/table-inbox/page.tsx +11 -8
  56. package/assets/templates/pages/work-item-detail/page.tsx +6 -2
  57. package/assets/theme.template.ts +14 -2
  58. package/authoring/debug/parse.d.mts +2 -2
  59. package/authoring/doctypes/base/type.ts +41 -0
  60. package/authoring/doctypes/component/component.doc.mjs +7 -1
  61. package/authoring/doctypes/component/type.ts +5 -0
  62. package/authoring/index.d.ts +2 -0
  63. package/clients/cli/commands/ensure-core-built.mjs +399 -43
  64. package/clients/cli/commands/swizzle.mjs +10 -0
  65. package/clients/cli/index.mjs +11 -6
  66. package/clients/cli/lib/component-format.mjs +49 -0
  67. package/foundation/agent-docs/agent-docs-target.d.mts +49 -0
  68. package/foundation/agent-docs/agent-docs-target.mjs +201 -0
  69. package/foundation/agent-docs/agent-docs.d.mts +1 -38
  70. package/foundation/agent-docs/agent-docs.mjs +16 -181
  71. package/foundation/config/config-path.d.mts +13 -0
  72. package/foundation/config/config-path.mjs +42 -0
  73. package/foundation/config/project.d.mts +1 -10
  74. package/foundation/config/project.mjs +31 -35
  75. package/foundation/discovery/component-discovery.mjs +56 -10
  76. package/foundation/discovery/component-loader.d.mts +1 -1
  77. package/foundation/discovery/icon-set-paths.d.mts +18 -0
  78. package/foundation/discovery/icon-set-paths.mjs +23 -0
  79. package/foundation/discovery/icon-set-writer.d.mts +2 -7
  80. package/foundation/discovery/icon-set-writer.mjs +3 -12
  81. package/foundation/env/search-path.d.mts +12 -0
  82. package/foundation/env/search-path.mjs +71 -43
  83. package/foundation/fs/module-loader.d.mts +2 -8
  84. package/foundation/fs/module-loader.mjs +3 -12
  85. package/foundation/fs/present-files.d.mts +11 -0
  86. package/foundation/fs/present-files.mjs +25 -0
  87. package/foundation/integrations/autolink.d.mts +2 -21
  88. package/foundation/integrations/autolink.mjs +6 -42
  89. package/foundation/integrations/contribution-fixes.mjs +26 -3
  90. package/foundation/integrations/contribution-inventory.mjs +1 -1
  91. package/foundation/integrations/installed-package.d.mts +36 -0
  92. package/foundation/integrations/installed-package.mjs +57 -0
  93. package/foundation/integrations/integrations.d.mts +3 -75
  94. package/foundation/integrations/integrations.mjs +3 -16
  95. package/foundation/integrations/manifest-paths.d.mts +13 -0
  96. package/foundation/integrations/manifest-paths.mjs +31 -0
  97. package/foundation/integrations/manifest-writer.d.mts +3 -4
  98. package/foundation/integrations/manifest-writer.mjs +5 -3
  99. package/foundation/release/cache.d.mts +11 -4
  100. package/foundation/release/cache.mjs +15 -7
  101. package/foundation/response/response-types.doc.mjs +1 -1
  102. package/foundation/runtime/locked-versions.mjs +1 -1
  103. package/foundation/runtime/package-set.mjs +1 -1
  104. package/foundation/text/levenshtein.d.mts +4 -1
  105. package/foundation/text/levenshtein.mjs +44 -1
  106. package/package.json +9 -9
  107. package/api/swizzle/_github.d.mts +0 -8
  108. package/api/swizzle/_github.mjs +0 -22
@@ -82,6 +82,7 @@ import {
82
82
  StackItem,
83
83
  VStack,
84
84
  } from '@astryxdesign/core/Layout';
85
+ import {rtlStyles} from '@astryxdesign/core/utils';
85
86
  import {
86
87
  durationVars,
87
88
  easeVars,
@@ -1391,7 +1392,13 @@ function ConversationPane({
1391
1392
  <Button
1392
1393
  label="Inbox"
1393
1394
  variant="ghost"
1394
- icon={<Icon icon={ArrowLeftIcon} size="sm" />}
1395
+ icon={
1396
+ <Icon
1397
+ icon={ArrowLeftIcon}
1398
+ size="sm"
1399
+ xstyle={rtlStyles.mirror}
1400
+ />
1401
+ }
1395
1402
  onClick={onClose}
1396
1403
  />
1397
1404
  }
@@ -1840,7 +1847,9 @@ function ComposeWindow({
1840
1847
  // than being rejected for not matching anything.
1841
1848
  hasCreate
1842
1849
  // Stamps data-autofocus, which is what the sheet looks for
1843
- // once the window is actually visible.
1850
+ // once the window is actually visible. It applies to the
1851
+ // inline field: on a compact touch screen the field opens
1852
+ // its own sheet and ignores it.
1844
1853
  //
1845
1854
  // Deliberately without `hasEntriesOnFocus`: the two together
1846
1855
  // mean the window can never open without the full directory
@@ -1874,10 +1883,6 @@ function ComposeWindow({
1874
1883
  )}
1875
1884
  </>
1876
1885
  }
1877
- // The recipient rows read as one header, so all three stay
1878
- // inline fields on every device; the sheet has no end lane
1879
- // for the Cc and Bcc buttons.
1880
- presentation="popover"
1881
1886
  />
1882
1887
  {hasCc ? (
1883
1888
  <Tokenizer
@@ -1888,7 +1893,6 @@ function ComposeWindow({
1888
1893
  value={cc}
1889
1894
  onChange={items => setCc(items)}
1890
1895
  hasCreate
1891
- presentation="popover"
1892
1896
  />
1893
1897
  ) : null}
1894
1898
  {hasBcc ? (
@@ -1900,7 +1904,6 @@ function ComposeWindow({
1900
1904
  value={bcc}
1901
1905
  onChange={items => setBcc(items)}
1902
1906
  hasCreate
1903
- presentation="popover"
1904
1907
  />
1905
1908
  ) : null}
1906
1909
  <TextInput
@@ -29,6 +29,7 @@ import {MoreMenu} from '@astryxdesign/core/MoreMenu';
29
29
  import type {DropdownMenuOption} from '@astryxdesign/core/DropdownMenu';
30
30
  import {Link} from '@astryxdesign/core/Link';
31
31
  import {Icon} from '@astryxdesign/core/Icon';
32
+ import {rtlStyles} from '@astryxdesign/core/utils';
32
33
  import {AspectRatio} from '@astryxdesign/core/AspectRatio';
33
34
  import {Divider} from '@astryxdesign/core/Divider';
34
35
  import {StatusDot} from '@astryxdesign/core/StatusDot';
@@ -381,7 +382,11 @@ function PageHeader({
381
382
  <HStack gap={4} vAlign="center" wrap="wrap">
382
383
  <Link href="#" type="supporting" color="secondary">
383
384
  <HStack as="span" gap={1} vAlign="center">
384
- <Icon icon={ArrowLeftIcon} size="sm" />
385
+ <Icon
386
+ icon={ArrowLeftIcon}
387
+ size="sm"
388
+ xstyle={rtlStyles.mirror}
389
+ />
385
390
  All Tasks
386
391
  </HStack>
387
392
  </Link>
@@ -463,7 +468,6 @@ function PageHeader({
463
468
  onRemove={onRemove}
464
469
  />
465
470
  )}
466
- presentation="popover"
467
471
  />
468
472
  </HStack>
469
473
  </VStack>
@@ -181,8 +181,8 @@ export const myTheme = defineTheme({
181
181
  radius: {base: 4, multiplier: 1},
182
182
 
183
183
  /**
184
- * Motion. Two knobs set how its CSS feels (touch springs don't read them
185
- * yet):
184
+ * Motion. Two knobs set how it feels. tempo also times the touch springs;
185
+ * character sets only the CSS curves for now:
186
186
  * tempo — 1 is Astryx's own; 0.75 the quickest, 1.5 the slowest.
187
187
  * character — 'crisp' | 'standard' | 'expressive': the entrance and move
188
188
  * curves (--ease-entrance, --ease-move). --ease-exit, the curve for
@@ -346,6 +346,18 @@ export const myTheme = defineTheme({
346
346
  */
347
347
  // iconVariants: ['outline', 'filled'],
348
348
 
349
+ /**
350
+ * Choose which shared icon a component's own icon role uses, by slot, such
351
+ * as `code-block-copy` for CodeBlock's copy button. A value is an icon name,
352
+ * `null` to hide the icon, a partial `{icon, variant, size}` request, or a
353
+ * pure function of the slot's state that returns one.
354
+ * Keep a slot function in its own module and import it, so a built theme
355
+ * can import it too. Here `copySlot` is
356
+ * `({copied}) => ({icon: copied ? 'checkDouble' : 'copy'})`.
357
+ * Reference: `astryx docs icons`; each component's docs list its slots.
358
+ */
359
+ // componentIcons: {'code-block-copy': copySlot},
360
+
349
361
  /**
350
362
  * Replace the small components that DRAW control state — the checkbox box,
351
363
  * the radio dot, the mark on a chosen option — by indicator name rather than
@@ -78,9 +78,9 @@ declare const eventSchema: z.ZodObject<{
78
78
  template: "template";
79
79
  command: "command";
80
80
  component: "component";
81
- hook: "hook";
82
- theme: "theme";
83
81
  doc: "doc";
82
+ theme: "theme";
83
+ hook: "hook";
84
84
  integration: "integration";
85
85
  migration: "migration";
86
86
  mixed: "mixed";
@@ -549,6 +549,47 @@ export interface ComponentThemingVar {
549
549
  private?: boolean;
550
550
  }
551
551
 
552
+ /**
553
+ * A component icon slot: a themeable icon role the component owns, which a
554
+ * theme maps to a shared icon name through `defineTheme({componentIcons})`.
555
+ * Each entry corresponds to a slot in `ComponentIconSlotMap`.
556
+ *
557
+ * @example
558
+ * ```
559
+ * {
560
+ * slot: 'code-block-copy',
561
+ * description: 'The copy button icon.',
562
+ * fallback: '`copy`; `check` while copied',
563
+ * state: [{name: 'copied', type: 'boolean', description: 'True while the copied feedback shows.'}],
564
+ * whenNull: 'Hides the glyph. The button keeps its size, name, and tooltip.',
565
+ * }
566
+ * ```
567
+ */
568
+ // SYNC: When adding a field here, add it to the docsite's generated-registry
569
+ // copy too — apps/docsite/scripts/generate-data.mjs (interface ComponentIconSlot).
570
+ export interface ComponentIconSlotDoc {
571
+ /** The slot name, `<component-kebab>-<semantic-role>`. */
572
+ slot: string;
573
+ /** The icon's role in the component. */
574
+ description: string;
575
+ /** The icon the component renders when the theme maps nothing, per state. */
576
+ fallback: string;
577
+ /** The state a slot function receives. Omit for a stateless slot. */
578
+ state?: ComponentIconSlotStateDoc[];
579
+ /** What a slot value of `null` does for this component. */
580
+ whenNull: string;
581
+ }
582
+
583
+ /** One field of the state a component passes to a slot function. */
584
+ export interface ComponentIconSlotStateDoc {
585
+ /** The field name. */
586
+ name: string;
587
+ /** The field's TypeScript type. */
588
+ type: string;
589
+ /** When the field has each value. */
590
+ description: string;
591
+ }
592
+
552
593
  /**
553
594
  * Documents a hook parameter/option. Similar to ComponentPropDoc but for hook
554
595
  * arguments and options object fields.
@@ -102,7 +102,7 @@ export const doc = {
102
102
  },
103
103
  {
104
104
  name: 'theming',
105
- type: '{ container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] }',
105
+ type: '{ container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] }',
106
106
  description:
107
107
  'Theming configuration: the stable selector surface (astryx-* classes + data-attribute reflections) that themes target via @scope selectors in defineTheme.',
108
108
  fields: [
@@ -130,6 +130,12 @@ export const doc = {
130
130
  description:
131
131
  "Maps standard CSS properties to internal vars for theme-pipeline expansion. Ordered by priority: earlier entries emit first. The pipeline reads only Core components' entries, so an integration's have no effect.",
132
132
  },
133
+ {
134
+ name: 'theming.componentIcons',
135
+ type: 'ComponentIconSlotDoc[]',
136
+ description:
137
+ "The component's icon slots, which a theme maps through `defineTheme({componentIcons})`: each slot's name, role, fallback per state, the state a slot function receives, and what `null` does. Each entry corresponds to a slot in `ComponentIconSlotMap`.",
138
+ },
133
139
  ],
134
140
  },
135
141
  {
@@ -10,6 +10,7 @@ import type {
10
10
  ComponentAnatomyElement,
11
11
  ComponentBestPractice,
12
12
  ComponentExampleDoc,
13
+ ComponentIconSlotDoc,
13
14
  ComponentPlaygroundConfig,
14
15
  ComponentPropDoc,
15
16
  ComponentThemingDerivedVar,
@@ -162,6 +163,10 @@ export interface ComponentBaseDoc extends AuthoredDocGraphFields {
162
163
  * on this component, also emit the internal var.
163
164
  * @see ComponentThemingDerivedVar */
164
165
  derived?: ComponentThemingDerivedVar[];
166
+ /** Component icon slots this component resolves through the theme's
167
+ * `componentIcons`. Each entry corresponds to a slot in
168
+ * `ComponentIconSlotMap`. */
169
+ componentIcons?: ComponentIconSlotDoc[];
165
170
  };
166
171
  /** Component usage documentation — concise summary, best practices,
167
172
  * and optional visual anatomy. */
@@ -138,6 +138,8 @@ export type {
138
138
  ComponentThemingTarget,
139
139
  ComponentThemingVar,
140
140
  ComponentThemingDerivedVar,
141
+ ComponentIconSlotDoc,
142
+ ComponentIconSlotStateDoc,
141
143
  UsageDoc,
142
144
  // hook
143
145
  HookParamDoc,