@astryxdesign/cli 0.4.7 → 0.5.0-canary.32a62fd

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 (85) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +53 -51
  3. package/api/docs/docs.doc.mjs +2 -2
  4. package/api/index.d.mts +1 -1
  5. package/api/index.mjs +1 -1
  6. package/api/search/search.mjs +50 -4
  7. package/api/search/search.test.mjs +71 -0
  8. package/api/template/template.doc.mjs +2 -2
  9. package/api/theme/build/build.mjs +12 -42
  10. package/api/theme/targets/targets.d.mts +18 -0
  11. package/api/theme/targets/targets.mjs +87 -0
  12. package/api/theme/targets/targets.test.mjs +66 -0
  13. package/api/theme/theme.d.mts +1 -0
  14. package/api/theme/theme.mjs +3 -1
  15. package/api/theme/theme.type.d.mts +23 -0
  16. package/api/theme/theme.type.mjs +21 -1
  17. package/api/theme/themeTargets.doc.d.mts +11 -0
  18. package/api/theme/themeTargets.doc.mjs +58 -0
  19. package/api/theme/themeTemplate.doc.mjs +3 -3
  20. package/assets/codemods/__tests__/registry.test.mjs +1 -0
  21. package/assets/codemods/registry.mjs +1 -0
  22. package/assets/codemods/transforms/v0.5.0/__tests__/next-codemods.test.mjs +127 -0
  23. package/assets/codemods/transforms/v0.5.0/banner-collapsible-content.mjs +171 -0
  24. package/assets/codemods/transforms/v0.5.0/index.mjs +20 -0
  25. package/assets/docs/README.md +50 -0
  26. package/assets/docs/cli-integrations.doc.mjs +4 -4
  27. package/assets/docs/theme.doc.dense.mjs +1 -1
  28. package/assets/docs/theme.doc.mjs +1 -1
  29. package/assets/docs/typography.doc.mjs +2 -2
  30. package/assets/templates/blocks/components/Banner/BannerCollapsibleContent.doc.mjs +1 -1
  31. package/assets/templates/blocks/components/Banner/BannerCollapsibleContent.tsx +1 -1
  32. package/assets/templates/blocks/components/DateInput/DateInputClearable.tsx +5 -1
  33. package/assets/templates/blocks/components/DateInput/DateInputDateRange.tsx +6 -1
  34. package/assets/templates/blocks/components/DateInput/DateInputFormats.tsx +5 -1
  35. package/assets/templates/blocks/components/DateInput/DateInputShowcase.tsx +4 -1
  36. package/assets/templates/blocks/components/DateInput/DateInputWithDescription.tsx +5 -1
  37. package/assets/templates/blocks/components/DateInput/DateInputWithValidation.tsx +5 -1
  38. package/assets/templates/blocks/components/Dialog/DialogAdaptivePresentation.doc.mjs +25 -0
  39. package/assets/templates/blocks/components/Dialog/DialogAdaptivePresentation.tsx +167 -0
  40. package/assets/templates/blocks/components/Dialog/DialogScrollingContent.tsx +1 -1
  41. package/assets/templates/blocks/components/HoverCard/HoverCardHookUsage.tsx +4 -1
  42. package/assets/templates/blocks/components/Step/StepContent.doc.mjs +14 -0
  43. package/assets/templates/blocks/components/Step/StepContent.tsx +32 -0
  44. package/assets/templates/blocks/components/Step/StepIndicator.doc.mjs +14 -0
  45. package/assets/templates/blocks/components/Step/StepIndicator.tsx +60 -0
  46. package/assets/templates/blocks/components/Step/StepShowcase.doc.mjs +15 -0
  47. package/assets/templates/blocks/components/Step/StepShowcase.tsx +26 -0
  48. package/assets/templates/blocks/components/Step/StepStates.doc.mjs +14 -0
  49. package/assets/templates/blocks/components/Step/StepStates.tsx +46 -0
  50. package/assets/templates/blocks/components/Stepper/StepperCustomContent.doc.mjs +22 -0
  51. package/assets/templates/blocks/components/Stepper/StepperCustomContent.tsx +126 -0
  52. package/assets/templates/blocks/components/Stepper/StepperIndicatorModes.doc.mjs +1 -1
  53. package/assets/templates/blocks/components/Stepper/StepperIndicatorModes.tsx +17 -5
  54. package/assets/templates/blocks/components/Stepper/StepperOnTrackHorizontal.doc.mjs +14 -0
  55. package/assets/templates/blocks/components/Stepper/StepperOnTrackHorizontal.tsx +25 -0
  56. package/assets/templates/blocks/components/Stepper/StepperOnTrackVertical.doc.mjs +2 -2
  57. package/assets/templates/blocks/components/Stepper/StepperOnTrackVertical.tsx +1 -1
  58. package/assets/templates/blocks/components/Stepper/StepperShowcase.doc.mjs +1 -1
  59. package/assets/templates/blocks/components/Stepper/StepperShowcase.tsx +6 -7
  60. package/assets/templates/blocks/components/Stepper/StepperStatus.tsx +1 -1
  61. package/assets/templates/pages/mixed-gallery/page.tsx +12 -3
  62. package/assets/templates/pages/table-grouped/page.tsx +151 -144
  63. package/assets/templates/themes/chocolate/chocolateTheme.ts +3 -1
  64. package/assets/templates/themes/matcha/matchaTheme.ts +3 -1
  65. package/assets/templates/themes/neutral/neutralTheme.ts +16 -9
  66. package/clients/cli/commands/build-theme.mjs +85 -0
  67. package/clients/cli/commands/dialog-adaptive-template.test.mjs +24 -0
  68. package/clients/cli/commands/theme-targets.behavior.test.mjs +64 -0
  69. package/clients/cli/commands/theme-targets.doc.mjs +38 -0
  70. package/clients/cli/commands/theme-template.doc.mjs +2 -2
  71. package/clients/cli/commands/theme.doc.mjs +4 -2
  72. package/clients/cli/index.mjs +1 -0
  73. package/clients/cli/lib/component-format.mjs +2 -2
  74. package/clients/cli/lib/manifest.mjs +2 -0
  75. package/foundation/discovery/theming-targets.d.mts +86 -0
  76. package/foundation/discovery/theming-targets.mjs +202 -0
  77. package/foundation/discovery/theming-targets.test.mjs +245 -0
  78. package/foundation/response/response-types.doc.mjs +7 -2
  79. package/package.json +9 -9
  80. package/assets/templates/blocks/components/Stepper/StepperHorizontal.doc.mjs +0 -14
  81. package/assets/templates/blocks/components/Stepper/StepperHorizontal.tsx +0 -24
  82. package/assets/templates/blocks/components/Stepper/StepperMultiStepForm.doc.mjs +0 -14
  83. package/assets/templates/blocks/components/Stepper/StepperMultiStepForm.tsx +0 -92
  84. package/assets/templates/blocks/components/Stepper/StepperVerticalOnboarding.doc.mjs +0 -14
  85. package/assets/templates/blocks/components/Stepper/StepperVerticalOnboarding.tsx +0 -40
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.4.7",
3
+ "version": "0.5.0-canary.32a62fd",
4
4
  "displayName": "CLI",
5
5
  "description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
6
6
  "author": "Meta Open Source",
@@ -87,10 +87,10 @@
87
87
  "zod": "^4.4.3"
88
88
  },
89
89
  "peerDependencies": {
90
- "@astryxdesign/charts": "*",
91
- "@astryxdesign/core": "*",
92
- "@astryxdesign/lab": "*",
93
- "@astryxdesign/theme-neutral": "*",
90
+ "@astryxdesign/charts": "0.5.0-canary.32a62fd",
91
+ "@astryxdesign/core": "0.5.0-canary.32a62fd",
92
+ "@astryxdesign/lab": "0.5.0-canary.32a62fd",
93
+ "@astryxdesign/theme-neutral": "0.5.0-canary.32a62fd",
94
94
  "gpt-tokenizer": "^3.4.0"
95
95
  },
96
96
  "peerDependenciesMeta": {
@@ -108,10 +108,10 @@
108
108
  }
109
109
  },
110
110
  "devDependencies": {
111
- "@astryxdesign/charts": "*",
112
- "@astryxdesign/core": "*",
113
- "@astryxdesign/lab": "*",
114
- "@astryxdesign/theme-neutral": "*",
111
+ "@astryxdesign/charts": "0.5.0-canary.32a62fd",
112
+ "@astryxdesign/core": "0.5.0-canary.32a62fd",
113
+ "@astryxdesign/lab": "0.5.0-canary.32a62fd",
114
+ "@astryxdesign/theme-neutral": "0.5.0-canary.32a62fd",
115
115
  "gpt-tokenizer": "^3.4.0"
116
116
  },
117
117
  "scripts": {
@@ -1,14 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
4
- export const doc = {
5
- type: 'block',
6
- exampleFor: 'Stepper',
7
- name: 'Stepper — Horizontal Progress',
8
- displayName: 'Stepper — Horizontal Progress',
9
- description:
10
- 'A horizontal separated stepper: each step owns a segment of the progress bar above its label. Filled segments track how far the flow has progressed.',
11
- isReady: true,
12
- aspectRatio: 16 / 9,
13
- componentsUsed: ['Stepper'],
14
- };
@@ -1,24 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {useState} from 'react';
6
- import {Stepper, Step} from '@astryxdesign/lab';
7
-
8
- export default function StepperHorizontal() {
9
- const [active, setActive] = useState(1);
10
- return (
11
- <div style={{width: '100%', maxWidth: 600}}>
12
- <Stepper
13
- activeStep={active}
14
- orientation="horizontal"
15
- onStepClick={setActive}>
16
- <Step step={0} label="Workspace" />
17
- <Step step={1} label="Team" />
18
- <Step step={2} label="Integrations" />
19
- <Step step={3} label="Import" />
20
- <Step step={4} label="Launch" />
21
- </Stepper>
22
- </div>
23
- );
24
- }
@@ -1,14 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
4
- export const doc = {
5
- type: 'block',
6
- exampleFor: 'Stepper',
7
- name: 'Stepper — Multi-Step Form',
8
- displayName: 'Stepper — Multi-Step Form',
9
- description:
10
- 'A vertical stepper driving a multi-step form. Each step renders its own fields in the content slot for the active step, with Back/Continue buttons advancing activeStep.',
11
- isReady: true,
12
- aspectRatio: 4 / 3,
13
- componentsUsed: ['Stepper', 'TextInput', 'Button', 'Text'],
14
- };
@@ -1,92 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {useState} from 'react';
6
- import {Stepper, Step} from '@astryxdesign/lab';
7
- import {TextInput} from '@astryxdesign/core/TextInput';
8
- import {Button} from '@astryxdesign/core/Button';
9
- import {Text} from '@astryxdesign/core/Text';
10
-
11
- export default function StepperMultiStepForm() {
12
- const [active, setActive] = useState(0);
13
- return (
14
- <div style={{width: '100%', maxWidth: 480}}>
15
- <Stepper
16
- activeStep={active}
17
- orientation="vertical"
18
- onStepClick={setActive}>
19
- <Step step={0} label="Project details" indicator="number">
20
- {active === 0 && (
21
- <div style={{display: 'flex', flexDirection: 'column', gap: 12}}>
22
- <TextInput
23
- label="Project name"
24
- placeholder="My awesome project"
25
- value=""
26
- />
27
- <TextInput
28
- label="Repository URL"
29
- placeholder="https://github.com/..."
30
- value=""
31
- />
32
- <div>
33
- <Button
34
- label="Continue"
35
- variant="primary"
36
- onClick={() => setActive(1)}
37
- />
38
- </div>
39
- </div>
40
- )}
41
- </Step>
42
- <Step step={1} label="Environment" indicator="number">
43
- {active === 1 && (
44
- <div style={{display: 'flex', flexDirection: 'column', gap: 12}}>
45
- <TextInput label="Node version" placeholder="20" value="" />
46
- <TextInput
47
- label="Build command"
48
- placeholder="npm run build"
49
- value=""
50
- />
51
- <div style={{display: 'flex', gap: 8}}>
52
- <Button
53
- label="Back"
54
- variant="secondary"
55
- onClick={() => setActive(0)}
56
- />
57
- <Button
58
- label="Continue"
59
- variant="primary"
60
- onClick={() => setActive(2)}
61
- />
62
- </div>
63
- </div>
64
- )}
65
- </Step>
66
- <Step step={2} label="Deploy" indicator="number">
67
- {active === 2 && (
68
- <div style={{display: 'flex', flexDirection: 'column', gap: 12}}>
69
- <Text type="body">
70
- Ready to deploy. This creates a production build and pushes to
71
- your configured hosting.
72
- </Text>
73
- <div style={{display: 'flex', gap: 8}}>
74
- <Button
75
- label="Back"
76
- variant="secondary"
77
- onClick={() => setActive(1)}
78
- />
79
- <Button
80
- label="Deploy now"
81
- variant="primary"
82
- onClick={() => setActive(3)}
83
- />
84
- </div>
85
- </div>
86
- )}
87
- </Step>
88
- <Step step={3} label="Done" indicator="number" />
89
- </Stepper>
90
- </div>
91
- );
92
- }
@@ -1,14 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
4
- export const doc = {
5
- type: 'block',
6
- exampleFor: 'Stepper',
7
- name: 'Stepper — Vertical Onboarding',
8
- displayName: 'Stepper — Vertical Onboarding',
9
- description:
10
- 'A vertical stepper for an onboarding flow, with a label and description per step. The auto indicator shows a check for completed steps, a ring for the current step, and a number for upcoming ones.',
11
- isReady: true,
12
- aspectRatio: 4 / 3,
13
- componentsUsed: ['Stepper'],
14
- };
@@ -1,40 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {useState} from 'react';
6
- import {Stepper, Step} from '@astryxdesign/lab';
7
-
8
- export default function StepperVerticalOnboarding() {
9
- const [active, setActive] = useState(2);
10
- return (
11
- <div style={{width: '100%', maxWidth: 400}}>
12
- <Stepper
13
- activeStep={active}
14
- orientation="vertical"
15
- onStepClick={setActive}>
16
- <Step
17
- step={0}
18
- label="Create workspace"
19
- description="Name and configure your workspace"
20
- />
21
- <Step
22
- step={1}
23
- label="Invite team members"
24
- description="Add collaborators by email"
25
- />
26
- <Step
27
- step={2}
28
- label="Set up integrations"
29
- description="Connect Slack, GitHub, Jira"
30
- />
31
- <Step
32
- step={3}
33
- label="Import data"
34
- description="Bring in existing projects"
35
- />
36
- <Step step={4} label="Launch" description="Go live with your team" />
37
- </Stepper>
38
- </div>
39
- );
40
- }