@astryxdesign/cli 0.1.1-canary.a514b99 → 0.1.1-canary.a7d67d0

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 (77) hide show
  1. package/docs/working-with-ai.doc.mjs +6 -6
  2. package/package.json +19 -8
  3. package/src/api/discover.mjs +78 -26
  4. package/src/api/layout.mjs +301 -0
  5. package/src/api/layout.test.mjs +238 -0
  6. package/src/api/template.mjs +191 -50
  7. package/src/api/template.test.mjs +2 -0
  8. package/src/codemods/__tests__/registry.test.mjs +1 -0
  9. package/src/codemods/registry.mjs +1 -0
  10. package/src/codemods/transforms/v0.1.2/__tests__/rename-text-color-active-to-accent.test.mjs +120 -0
  11. package/src/codemods/transforms/v0.1.2/index.mjs +19 -0
  12. package/src/codemods/transforms/v0.1.2/rename-text-color-active-to-accent.mjs +136 -0
  13. package/src/commands/gap-report.mjs +17 -9
  14. package/src/commands/gap-report.test.mjs +21 -16
  15. package/src/commands/init.mjs +34 -8
  16. package/src/commands/init.next-steps.test.mjs +46 -0
  17. package/src/commands/layout.mjs +139 -0
  18. package/src/commands/swizzle.mjs +51 -23
  19. package/src/commands/upgrade.mjs +2 -71
  20. package/src/config.mjs +31 -0
  21. package/src/config.test.mjs +24 -0
  22. package/src/index.mjs +4 -0
  23. package/src/lib/config-schema.mjs +119 -0
  24. package/src/lib/config.mjs +34 -7
  25. package/src/lib/config.test.mjs +51 -2
  26. package/src/lib/error-codes.mjs +8 -0
  27. package/src/lib/integrations.mjs +155 -0
  28. package/src/lib/integrations.test.mjs +154 -0
  29. package/src/lib/levenshtein.mjs +29 -0
  30. package/src/lib/manifest.mjs +6 -0
  31. package/src/lib/package-scanner.mjs +31 -7
  32. package/src/lib/string-utils.mjs +5 -14
  33. package/src/lib/xle/browser.d.ts +100 -0
  34. package/src/lib/xle/browser.mjs +120 -0
  35. package/src/lib/xle/expand.mjs +622 -0
  36. package/src/lib/xle/parse.mjs +581 -0
  37. package/src/lib/xle/print.mjs +174 -0
  38. package/src/lib/xle/registry-core.mjs +170 -0
  39. package/src/lib/xle/registry.mjs +237 -0
  40. package/src/lib/xle/splice.mjs +137 -0
  41. package/src/lib/xle/validate.mjs +356 -0
  42. package/src/lib/xle/xle.test.mjs +333 -0
  43. package/src/types/config.d.ts +99 -0
  44. package/src/utils/github.mjs +12 -27
  45. package/templates/blocks/components/Card/ClickableCardWithNestedButton.doc.mjs +1 -1
  46. package/templates/blocks/components/Card/SelectableCardMulti.doc.mjs +1 -1
  47. package/templates/blocks/components/ChatDictationButton/ChatDictationButtonShowcase.tsx +3 -3
  48. package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyShowcase.doc.mjs +15 -0
  49. package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyShowcase.tsx +26 -0
  50. package/templates/blocks/components/DateInput/DateInputDateRange.doc.mjs +2 -2
  51. package/templates/blocks/components/FileInput/FileInputShowcase.tsx +4 -2
  52. package/templates/blocks/components/LinkProvider/LinkProviderCustomLink.doc.mjs +14 -0
  53. package/templates/blocks/components/LinkProvider/LinkProviderCustomLink.tsx +43 -0
  54. package/templates/blocks/components/MultiSelector/MultiSelectorShowcase.tsx +6 -2
  55. package/templates/blocks/components/NumberInput/NumberInputShowcase.tsx +6 -2
  56. package/templates/blocks/components/RadioList/RadioListShowcase.tsx +8 -1
  57. package/templates/blocks/components/SegmentedControl/SegmentedControlShowcase.tsx +3 -1
  58. package/templates/blocks/components/Selector/SelectorShowcase.tsx +4 -1
  59. package/templates/blocks/components/Slider/SliderShowcase.tsx +10 -1
  60. package/templates/blocks/components/Tab/TabShowcase.tsx +3 -1
  61. package/templates/blocks/components/TabList/TabListShowcase.tsx +3 -1
  62. package/templates/blocks/components/TabMenu/TabMenuShowcase.tsx +3 -1
  63. package/templates/blocks/components/Table/ColumnResizeHookUsage.doc.mjs +14 -0
  64. package/templates/blocks/components/Table/ColumnResizeHookUsage.tsx +59 -0
  65. package/templates/blocks/components/Table/StickyColumnsHookUsage.doc.mjs +14 -0
  66. package/templates/blocks/components/Table/StickyColumnsHookUsage.tsx +104 -0
  67. package/templates/blocks/components/Text/TextColors.tsx +20 -5
  68. package/templates/blocks/components/TextArea/TextAreaShowcase.tsx +4 -2
  69. package/templates/blocks/components/TextInput/TextInputShowcase.tsx +4 -2
  70. package/templates/blocks/components/Thumbnail/ThumbnailGallery.tsx +25 -5
  71. package/templates/blocks/components/Timestamp/TimestampColors.tsx +2 -2
  72. package/templates/blocks/components/ToggleButton/ToggleButtonGroup.doc.mjs +1 -1
  73. package/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx +8 -6
  74. package/templates/blocks/components/Typeahead/TypeaheadShowcase.tsx +6 -2
  75. package/templates/pages/theme-showcase/page.tsx +8 -19
  76. package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.doc.mjs +0 -14
  77. package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx +0 -57
@@ -143,12 +143,6 @@ const styles: Record<string, CSSProperties> = {
143
143
  textAlign: 'center' as const,
144
144
  maxWidth: 560,
145
145
  },
146
- // Hero headline painted with the theme's accent-text ink. Text has no
147
- // 'accent' color value, so we set the dedicated --color-text-accent token
148
- // directly (distinct from --color-accent / the 'active' color).
149
- heroHeadline: {
150
- color: 'var(--color-text-accent)',
151
- },
152
146
  centerText: {
153
147
  textAlign: 'center',
154
148
  },
@@ -438,7 +432,7 @@ function StorePreview({
438
432
  <VStack gap={10} style={{...styles.content, ...styles.contentFluid}}>
439
433
  <Center>
440
434
  <VStack gap={4} hAlign="center" style={styles.heroText}>
441
- <Text type="display-2" style={styles.heroHeadline}>
435
+ <Text type="display-2" color="accent">
442
436
  Little joys,
443
437
  <br />
444
438
  everywhere you go
@@ -462,10 +456,7 @@ function StorePreview({
462
456
  />
463
457
  </AspectRatio>
464
458
  <div style={inlineStyles.cardBody}>
465
- <VStack
466
- gap={2}
467
- hAlign="center"
468
- style={styles.cardStack}>
459
+ <VStack gap={2} hAlign="center" style={styles.cardStack}>
469
460
  <HStack>
470
461
  <Badge label={p.badge} variant={p.badgeVariant} />
471
462
  </HStack>
@@ -475,7 +466,10 @@ function StorePreview({
475
466
  <Text
476
467
  type="supporting"
477
468
  color="secondary"
478
- style={{...styles.cardDescription, ...styles.centerText}}>
469
+ style={{
470
+ ...styles.cardDescription,
471
+ ...styles.centerText,
472
+ }}>
479
473
  {p.description}
480
474
  </Text>
481
475
  <HStack gap={2} vAlign="center" hAlign="center">
@@ -746,9 +740,7 @@ function ChatCard() {
746
740
 
747
741
  <ChatMessage sender="assistant">
748
742
  <VStack gap={3}>
749
- <Text type="body">
750
- Here’s everything I have on order #1043:
751
- </Text>
743
+ <Text type="body">Here’s everything I have on order #1043:</Text>
752
744
  <Card padding={3}>
753
745
  <VStack gap={1}>
754
746
  <Item
@@ -1107,10 +1099,7 @@ function InventoryCard({
1107
1099
  ).length;
1108
1100
  return (
1109
1101
  <Card padding={0} style={styles.inventoryCard}>
1110
- <HStack
1111
- hAlign="between"
1112
- vAlign="center"
1113
- style={styles.inventoryHeader}>
1102
+ <HStack hAlign="between" vAlign="center" style={styles.inventoryHeader}>
1114
1103
  <Heading level={2}>Inventory</Heading>
1115
1104
  <Button
1116
1105
  label="Add item"
@@ -1,14 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
4
- export const doc = {
5
- type: 'block',
6
- exampleFor: 'MoreMenu',
7
- name: 'MoreMenu — In Toolbar',
8
- displayName: 'MoreMenu — In Toolbar',
9
- description:
10
- 'A three-dot menu alongside icon buttons in a card header toolbar.',
11
- isReady: true,
12
- aspectRatio: 16 / 9,
13
- componentsUsed: ['MoreMenu', 'Button', 'Icon', 'Toolbar', 'Text', 'Card', 'Section'],
14
- };
@@ -1,57 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {MoreMenu} from '@astryxdesign/core/MoreMenu';
6
- import {Button} from '@astryxdesign/core/Button';
7
- import {Icon} from '@astryxdesign/core/Icon';
8
- import {Toolbar} from '@astryxdesign/core/Toolbar';
9
- import {Heading} from '@astryxdesign/core/Text';
10
- import {Card} from '@astryxdesign/core/Card';
11
- import {Section} from '@astryxdesign/core/Section';
12
- import {
13
- ArrowLeftIcon,
14
- ArrowDownTrayIcon,
15
- ShareIcon,
16
- TrashIcon,
17
- } from '@heroicons/react/24/outline';
18
-
19
- export default function MoreMenuInToolbar() {
20
- return (
21
- <Card width="100%" height="100%" style={{marginTop: 100}}>
22
- <Toolbar
23
- label="Project actions"
24
- size="sm"
25
- dividers={['bottom']}
26
- startContent={
27
- <Button
28
- label="Back"
29
- variant="ghost"
30
- icon={<Icon icon={ArrowLeftIcon} />}
31
- isIconOnly
32
- />
33
- }
34
- centerContent={<Heading level={5}>Title</Heading>}
35
- endContent={
36
- <>
37
- <div style={{marginInlineEnd: 8}}>
38
- <MoreMenu
39
- label="More actions"
40
- size="sm"
41
- items={[
42
- {label: 'Export', icon: ArrowDownTrayIcon, onClick: () => {}},
43
- {label: 'Share', icon: ShareIcon, onClick: () => {}},
44
- {type: 'divider'},
45
- {label: 'Delete', icon: TrashIcon, onClick: () => {}},
46
- ]}
47
- />
48
- </div>
49
- <Button label="Discard" variant="secondary" size="sm" />
50
- <Button label="Save" variant="primary" size="sm" />
51
- </>
52
- }
53
- />
54
- <Section />
55
- </Card>
56
- );
57
- }