@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.
- package/CHANGELOG.md +64 -0
- package/README.md +53 -51
- package/api/docs/docs.doc.mjs +2 -2
- package/api/index.d.mts +1 -1
- package/api/index.mjs +1 -1
- package/api/search/search.mjs +50 -4
- package/api/search/search.test.mjs +71 -0
- package/api/template/template.doc.mjs +2 -2
- package/api/theme/build/build.mjs +12 -42
- package/api/theme/targets/targets.d.mts +18 -0
- package/api/theme/targets/targets.mjs +87 -0
- package/api/theme/targets/targets.test.mjs +66 -0
- package/api/theme/theme.d.mts +1 -0
- package/api/theme/theme.mjs +3 -1
- package/api/theme/theme.type.d.mts +23 -0
- package/api/theme/theme.type.mjs +21 -1
- package/api/theme/themeTargets.doc.d.mts +11 -0
- package/api/theme/themeTargets.doc.mjs +58 -0
- package/api/theme/themeTemplate.doc.mjs +3 -3
- package/assets/codemods/__tests__/registry.test.mjs +1 -0
- package/assets/codemods/registry.mjs +1 -0
- package/assets/codemods/transforms/v0.5.0/__tests__/next-codemods.test.mjs +127 -0
- package/assets/codemods/transforms/v0.5.0/banner-collapsible-content.mjs +171 -0
- package/assets/codemods/transforms/v0.5.0/index.mjs +20 -0
- package/assets/docs/README.md +50 -0
- package/assets/docs/cli-integrations.doc.mjs +4 -4
- package/assets/docs/theme.doc.dense.mjs +1 -1
- package/assets/docs/theme.doc.mjs +1 -1
- package/assets/docs/typography.doc.mjs +2 -2
- package/assets/templates/blocks/components/Banner/BannerCollapsibleContent.doc.mjs +1 -1
- package/assets/templates/blocks/components/Banner/BannerCollapsibleContent.tsx +1 -1
- package/assets/templates/blocks/components/DateInput/DateInputClearable.tsx +5 -1
- package/assets/templates/blocks/components/DateInput/DateInputDateRange.tsx +6 -1
- package/assets/templates/blocks/components/DateInput/DateInputFormats.tsx +5 -1
- package/assets/templates/blocks/components/DateInput/DateInputShowcase.tsx +4 -1
- package/assets/templates/blocks/components/DateInput/DateInputWithDescription.tsx +5 -1
- package/assets/templates/blocks/components/DateInput/DateInputWithValidation.tsx +5 -1
- package/assets/templates/blocks/components/Dialog/DialogAdaptivePresentation.doc.mjs +25 -0
- package/assets/templates/blocks/components/Dialog/DialogAdaptivePresentation.tsx +167 -0
- package/assets/templates/blocks/components/Dialog/DialogScrollingContent.tsx +1 -1
- package/assets/templates/blocks/components/HoverCard/HoverCardHookUsage.tsx +4 -1
- package/assets/templates/blocks/components/Step/StepContent.doc.mjs +14 -0
- package/assets/templates/blocks/components/Step/StepContent.tsx +32 -0
- package/assets/templates/blocks/components/Step/StepIndicator.doc.mjs +14 -0
- package/assets/templates/blocks/components/Step/StepIndicator.tsx +60 -0
- package/assets/templates/blocks/components/Step/StepShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/Step/StepShowcase.tsx +26 -0
- package/assets/templates/blocks/components/Step/StepStates.doc.mjs +14 -0
- package/assets/templates/blocks/components/Step/StepStates.tsx +46 -0
- package/assets/templates/blocks/components/Stepper/StepperCustomContent.doc.mjs +22 -0
- package/assets/templates/blocks/components/Stepper/StepperCustomContent.tsx +126 -0
- package/assets/templates/blocks/components/Stepper/StepperIndicatorModes.doc.mjs +1 -1
- package/assets/templates/blocks/components/Stepper/StepperIndicatorModes.tsx +17 -5
- package/assets/templates/blocks/components/Stepper/StepperOnTrackHorizontal.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperOnTrackHorizontal.tsx +25 -0
- package/assets/templates/blocks/components/Stepper/StepperOnTrackVertical.doc.mjs +2 -2
- package/assets/templates/blocks/components/Stepper/StepperOnTrackVertical.tsx +1 -1
- package/assets/templates/blocks/components/Stepper/StepperShowcase.doc.mjs +1 -1
- package/assets/templates/blocks/components/Stepper/StepperShowcase.tsx +6 -7
- package/assets/templates/blocks/components/Stepper/StepperStatus.tsx +1 -1
- package/assets/templates/pages/mixed-gallery/page.tsx +12 -3
- package/assets/templates/pages/table-grouped/page.tsx +151 -144
- package/assets/templates/themes/chocolate/chocolateTheme.ts +3 -1
- package/assets/templates/themes/matcha/matchaTheme.ts +3 -1
- package/assets/templates/themes/neutral/neutralTheme.ts +16 -9
- package/clients/cli/commands/build-theme.mjs +85 -0
- package/clients/cli/commands/dialog-adaptive-template.test.mjs +24 -0
- package/clients/cli/commands/theme-targets.behavior.test.mjs +64 -0
- package/clients/cli/commands/theme-targets.doc.mjs +38 -0
- package/clients/cli/commands/theme-template.doc.mjs +2 -2
- package/clients/cli/commands/theme.doc.mjs +4 -2
- package/clients/cli/index.mjs +1 -0
- package/clients/cli/lib/component-format.mjs +2 -2
- package/clients/cli/lib/manifest.mjs +2 -0
- package/foundation/discovery/theming-targets.d.mts +86 -0
- package/foundation/discovery/theming-targets.mjs +202 -0
- package/foundation/discovery/theming-targets.test.mjs +245 -0
- package/foundation/response/response-types.doc.mjs +7 -2
- package/package.json +9 -9
- package/assets/templates/blocks/components/Stepper/StepperHorizontal.doc.mjs +0 -14
- package/assets/templates/blocks/components/Stepper/StepperHorizontal.tsx +0 -24
- package/assets/templates/blocks/components/Stepper/StepperMultiStepForm.doc.mjs +0 -14
- package/assets/templates/blocks/components/Stepper/StepperMultiStepForm.tsx +0 -92
- package/assets/templates/blocks/components/Stepper/StepperVerticalOnboarding.doc.mjs +0 -14
- 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.
|
|
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
|
-
}
|