@astryxdesign/cli 0.3.0-canary.fbc60c5 → 0.3.0-canary.fcbc342
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/README.md +8 -8
- package/api/blog/blog.doc.mjs +2 -2
- package/api/build/build.doc.mjs +1 -1
- package/api/component/component.doc.mjs +1 -1
- package/api/discover/discover.doc.mjs +2 -2
- package/api/docs/docs.doc.mjs +2 -2
- package/api/doctor/doctor.doc.mjs +3 -3
- package/api/hook/hook.doc.mjs +1 -1
- package/api/init/init.doc.mjs +1 -1
- package/api/integration/summarizeIssues.doc.mjs +1 -1
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/json/assertResponse.doc.mjs +2 -2
- package/api/json/isError.doc.mjs +1 -1
- package/api/json/parseResponse.doc.mjs +2 -2
- package/api/layout/layoutCheck.doc.mjs +1 -1
- package/api/layout/layoutExpand.doc.mjs +1 -1
- package/api/layout/layoutGrammar.doc.mjs +1 -1
- package/api/swizzle/swizzle.doc.mjs +1 -1
- package/api/template/template.test.mjs +38 -13
- package/api/theme/listThemes.doc.mjs +2 -2
- package/api/theme/themeAdd.doc.mjs +1 -1
- package/api/theme/themeBuild.doc.mjs +3 -3
- package/api/theme/themeList.doc.mjs +2 -2
- package/api/upgrade/upgrade.doc.mjs +1 -1
- package/assets/codemods/transforms/next/__tests__/next-codemods.test.mjs +92 -0
- package/assets/codemods/transforms/next/index.mjs +11 -1
- package/assets/codemods/transforms/next/rename-dropdown-menu-radio-dot-target.mjs +152 -0
- package/assets/codemods/transforms/v0.3.0/__tests__/migrate-grid-minchildwidth-to-columns.test.mjs +82 -0
- package/assets/codemods/transforms/v0.3.0/__tests__/migrate-table-rowexpansion-to-tree.test.mjs +201 -0
- package/assets/codemods/transforms/v0.3.0/index.mjs +8 -0
- package/assets/codemods/transforms/v0.3.0/migrate-grid-minchildwidth-to-columns.mjs +38 -2
- package/assets/codemods/transforms/v0.3.0/migrate-table-rowexpansion-to-tree.mjs +214 -0
- package/assets/docs/browser-support.doc.mjs +6 -6
- package/assets/docs/getting-started.doc.mjs +3 -3
- package/assets/docs/icons.doc.mjs +3 -3
- package/assets/docs/illustrations.doc.mjs +2 -2
- package/assets/docs/internationalization.doc.mjs +1 -1
- package/assets/docs/layout.doc.dense.mjs +1 -1
- package/assets/docs/migration.doc.mjs +1 -1
- package/assets/docs/principles.doc.mjs +1 -1
- package/assets/docs/styling-libraries.doc.mjs +1 -1
- package/assets/docs/styling.doc.mjs +4 -4
- package/assets/docs/theme.doc.mjs +3 -3
- package/assets/docs/typography.doc.mjs +2 -2
- package/assets/templates/blocks/components/AspectRatio/AspectRatioCircleImage.tsx +1 -1
- package/assets/templates/blocks/components/AspectRatio/AspectRatioImageGallery.tsx +1 -1
- package/assets/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx +3 -3
- package/assets/templates/blocks/components/AspectRatio/AspectRatioSquareImage.tsx +1 -1
- package/assets/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarFallbackChain.tsx +6 -6
- package/assets/templates/blocks/components/Avatar/AvatarGroup.tsx +5 -5
- package/assets/templates/blocks/components/Avatar/AvatarInteractive.tsx +2 -2
- package/assets/templates/blocks/components/Avatar/AvatarShowcase.tsx +4 -4
- package/assets/templates/blocks/components/Avatar/AvatarTooltip.tsx +4 -4
- package/assets/templates/blocks/components/Avatar/AvatarUserCard.tsx +3 -3
- package/assets/templates/blocks/components/Avatar/AvatarWithImage.tsx +4 -4
- package/assets/templates/blocks/components/Avatar/AvatarWithStatus.tsx +3 -3
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerAttachments.tsx +5 -5
- package/assets/templates/blocks/components/Lightbox/LightboxGallery.tsx +4 -4
- package/assets/templates/blocks/components/Lightbox/LightboxShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Lightbox/LightboxVideo.tsx +1 -1
- package/assets/templates/blocks/components/Lightbox/LightboxZoom.tsx +2 -2
- package/assets/templates/blocks/components/MediaTheme/MediaThemeImageOverlay.tsx +1 -1
- package/assets/templates/blocks/components/MediaTheme/MediaThemeLightScrim.tsx +1 -1
- package/assets/templates/blocks/components/MediaTheme/MediaThemeShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Overlay/OverlayBottomStrip.tsx +1 -1
- package/assets/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +1 -1
- package/assets/templates/blocks/components/Overlay/OverlayShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Stepper/StepperHorizontal.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperHorizontal.tsx +24 -0
- package/assets/templates/blocks/components/Stepper/StepperIndicatorModes.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperIndicatorModes.tsx +68 -0
- package/assets/templates/blocks/components/Stepper/StepperMultiStepForm.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperMultiStepForm.tsx +92 -0
- package/assets/templates/blocks/components/Stepper/StepperOnTrackVertical.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperOnTrackVertical.tsx +41 -0
- package/assets/templates/blocks/components/Stepper/StepperShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/Stepper/StepperShowcase.tsx +25 -0
- package/assets/templates/blocks/components/Stepper/StepperStatus.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperStatus.tsx +50 -0
- package/assets/templates/blocks/components/Stepper/StepperVerticalOnboarding.doc.mjs +14 -0
- package/assets/templates/blocks/components/Stepper/StepperVerticalOnboarding.tsx +40 -0
- package/assets/templates/blocks/components/Table/TableRowExpansionTable.tsx +61 -58
- package/assets/templates/blocks/components/TextArea/TextAreaStates.tsx +1 -1
- package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.tsx +1 -1
- package/assets/templates/pages/centered-hero/page.tsx +1 -1
- package/assets/templates/pages/classic-gallery/page.tsx +10 -10
- package/assets/templates/pages/detail-page/page.tsx +5 -5
- package/assets/templates/pages/form-two-column/page.tsx +1 -1
- package/assets/templates/pages/gallery-hero/page.tsx +3 -3
- package/assets/templates/pages/library/page.tsx +30 -30
- package/assets/templates/pages/login/page.tsx +1 -2
- package/assets/templates/pages/login-card/page.tsx +1 -2
- package/assets/templates/pages/login-split/page.tsx +5 -6
- package/assets/templates/pages/login-sso/page.tsx +2 -3
- package/assets/templates/pages/mixed-gallery/page.tsx +5 -5
- package/assets/templates/pages/payment-form/page.tsx +3 -3
- package/assets/templates/pages/product-detail/page.tsx +7 -7
- package/assets/templates/pages/product-gallery/page.tsx +6 -6
- package/assets/templates/pages/shell-top-nav/page.tsx +2 -2
- package/assets/templates/pages/side-gallery/page.tsx +9 -9
- package/assets/templates/pages/table-page-chart/page.tsx +6 -6
- package/assets/templates/pages/theme-showcase/page.tsx +6 -6
- package/assets/templates/themes/neutral/neutralTheme.ts +4 -1
- package/authoring/codemod/codemod.doc.mjs +2 -2
- package/authoring/config/config.doc.mjs +1 -1
- package/authoring/doctypes/base/type.ts +21 -0
- package/authoring/doctypes/command/command.doc.mjs +2 -2
- package/authoring/doctypes/component/component.doc.mjs +7 -7
- package/authoring/doctypes/enum/enum.doc.mjs +2 -2
- package/authoring/doctypes/function/function.doc.mjs +3 -3
- package/authoring/doctypes/hook/hook.doc.mjs +3 -3
- package/authoring/doctypes/reference/reference.doc.mjs +3 -3
- package/authoring/doctypes/schema/schema.doc.mjs +1 -1
- package/authoring/doctypes/template/template.doc.mjs +3 -3
- package/clients/cli/commands/build-theme.registry.test.mjs +14 -1
- package/clients/cli/commands/build.doc.mjs +1 -1
- package/clients/cli/commands/component.doc.mjs +1 -1
- package/clients/cli/commands/doctor.doc.mjs +2 -2
- package/clients/cli/commands/layout-expand.doc.mjs +1 -1
- package/clients/cli/commands/layout.doc.mjs +1 -1
- package/clients/cli/commands/manifest.doc.mjs +3 -3
- package/clients/cli/commands/search.doc.mjs +1 -1
- package/clients/cli/commands/theme-add.doc.mjs +1 -1
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/clients/cli/commands/theme-list.doc.mjs +1 -1
- package/clients/cli/commands/theme.doc.mjs +2 -2
- package/clients/cli/commands/validate-integration.doc.mjs +2 -2
- package/foundation/agent-docs/agent-docs.mjs +3 -4
- package/foundation/agent-docs/agent-docs.test.mjs +8 -0
- package/foundation/discovery/template-adapter.d.mts +6 -3
- package/foundation/discovery/template-adapter.mjs +33 -13
- package/foundation/response/response-types.doc.mjs +7 -7
- package/foundation/response/response.doc.mjs +5 -5
- package/package.json +9 -9
|
@@ -17,7 +17,6 @@ import {CubeIcon} from '@heroicons/react/24/outline';
|
|
|
17
17
|
const pageStyle: CSSProperties = {
|
|
18
18
|
minHeight: '100%',
|
|
19
19
|
backgroundColor: 'var(--color-background-body)',
|
|
20
|
-
padding: 'var(--spacing-6)',
|
|
21
20
|
};
|
|
22
21
|
// Cap the column at 400px but let it shrink to fit narrow screens (Stack
|
|
23
22
|
// has no maxWidth prop, so it's set here).
|
|
@@ -43,7 +42,7 @@ export default function LoginPage() {
|
|
|
43
42
|
};
|
|
44
43
|
|
|
45
44
|
return (
|
|
46
|
-
<Center axis="both" style={pageStyle}>
|
|
45
|
+
<Center axis="both" padding={6} style={pageStyle}>
|
|
47
46
|
<VStack gap={4} hAlign="center" style={contentStyle}>
|
|
48
47
|
{/* Logo */}
|
|
49
48
|
<VStack gap={2} hAlign="center">
|
|
@@ -58,7 +58,6 @@ const GoogleIcon = (props: React.SVGProps<SVGSVGElement>) => (
|
|
|
58
58
|
const pageStyle: CSSProperties = {
|
|
59
59
|
minHeight: '100%',
|
|
60
60
|
backgroundColor: 'var(--color-background-body)',
|
|
61
|
-
padding: 'var(--spacing-6)',
|
|
62
61
|
};
|
|
63
62
|
// Cap the column at 400px but let it shrink to fit narrow screens (Stack
|
|
64
63
|
// has no maxWidth prop, so it's set here).
|
|
@@ -87,7 +86,7 @@ export default function LoginSimple() {
|
|
|
87
86
|
};
|
|
88
87
|
|
|
89
88
|
return (
|
|
90
|
-
<Center axis="both" style={pageStyle}>
|
|
89
|
+
<Center axis="both" padding={6} style={pageStyle}>
|
|
91
90
|
<VStack gap={4} hAlign="center" style={contentStyle}>
|
|
92
91
|
{/* Logo */}
|
|
93
92
|
<VStack gap={2} hAlign="center">
|
|
@@ -18,11 +18,11 @@ import {Link} from '@astryxdesign/core/Link';
|
|
|
18
18
|
import {Divider} from '@astryxdesign/core/Divider';
|
|
19
19
|
|
|
20
20
|
const COVER_IMAGE_URL =
|
|
21
|
-
'
|
|
21
|
+
'/template-assets/light-working-vertical-1.png';
|
|
22
22
|
const APPLE_LOGO_URL =
|
|
23
|
-
'
|
|
23
|
+
'/template-assets/AppleLogo.png';
|
|
24
24
|
const GOOGLE_LOGO_URL =
|
|
25
|
-
'
|
|
25
|
+
'/template-assets/GoogleLogo.png';
|
|
26
26
|
|
|
27
27
|
// Grid emits minmax(MIN, 1fr) where MIN is a hard floor, so MIN plus the
|
|
28
28
|
// grid inset and page padding must fit the narrowest phone or the column is
|
|
@@ -33,11 +33,10 @@ const COLUMN_MIN_WIDTH = 240;
|
|
|
33
33
|
// tightens the inset at that same point, keyed to the card width (not the
|
|
34
34
|
// window) so it never desyncs.
|
|
35
35
|
// minHeight:100% fills the host so the centered card never leaves an unpainted
|
|
36
|
-
// band; padding keeps it off the surface edges.
|
|
36
|
+
// band; Center's padding prop keeps it off the surface edges.
|
|
37
37
|
const pageStyle: CSSProperties = {
|
|
38
38
|
minHeight: '100%',
|
|
39
39
|
backgroundColor: 'var(--color-background-body)',
|
|
40
|
-
padding: 'var(--spacing-6)',
|
|
41
40
|
};
|
|
42
41
|
const cardWrap: CSSProperties = {
|
|
43
42
|
width: '100%',
|
|
@@ -98,7 +97,7 @@ export default function LoginTwoColumn() {
|
|
|
98
97
|
};
|
|
99
98
|
|
|
100
99
|
return (
|
|
101
|
-
<Center axis="both" style={pageStyle}>
|
|
100
|
+
<Center axis="both" padding={6} style={pageStyle}>
|
|
102
101
|
<style>{LOGIN_SPLIT_CSS}</style>
|
|
103
102
|
<VStack gap={4} width="100%">
|
|
104
103
|
<div style={cardWrap}>
|
|
@@ -20,14 +20,13 @@ import {Avatar} from '@astryxdesign/core/Avatar';
|
|
|
20
20
|
// Styles
|
|
21
21
|
// ---------------------------------------------------------------------------
|
|
22
22
|
|
|
23
|
-
const BG_URL = '
|
|
23
|
+
const BG_URL = '/template-assets/building.png';
|
|
24
24
|
|
|
25
25
|
const pageStyle: CSSProperties = {
|
|
26
26
|
minHeight: '100%',
|
|
27
27
|
backgroundImage: `url(${BG_URL})`,
|
|
28
28
|
backgroundSize: 'cover',
|
|
29
29
|
backgroundPosition: 'center',
|
|
30
|
-
padding: 'var(--spacing-6)',
|
|
31
30
|
};
|
|
32
31
|
|
|
33
32
|
type SSOProvider = {
|
|
@@ -98,7 +97,7 @@ export default function LoginSSO() {
|
|
|
98
97
|
};
|
|
99
98
|
|
|
100
99
|
return (
|
|
101
|
-
<Center axis="both" style={pageStyle}>
|
|
100
|
+
<Center axis="both" padding={6} style={pageStyle}>
|
|
102
101
|
<Card padding={8} width="100%" maxWidth={400}>
|
|
103
102
|
<VStack gap={4} hAlign="stretch">
|
|
104
103
|
{/* ── Step 1: Email entry ── */}
|
|
@@ -66,23 +66,23 @@ interface GalleryImage {
|
|
|
66
66
|
// All landscape photos so the uniform 3:2 / 3:1 tiles crop cleanly.
|
|
67
67
|
const IMAGES: GalleryImage[] = [
|
|
68
68
|
{
|
|
69
|
-
src: '
|
|
69
|
+
src: '/template-assets/illustrative-horizontal-1.png',
|
|
70
70
|
title: 'Going places',
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
|
-
src: '
|
|
73
|
+
src: '/template-assets/light-home-horizontal-1.png',
|
|
74
74
|
title: 'Making memories',
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
-
src: '
|
|
77
|
+
src: '/template-assets/light-lifestyle-horizontal-1.png',
|
|
78
78
|
title: 'Being free',
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
|
-
src: '
|
|
81
|
+
src: '/template-assets/light-working-horizontal-2.png',
|
|
82
82
|
title: 'Getting it done',
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
|
-
src: '
|
|
85
|
+
src: '/template-assets/light-scene-horizontal-1.png',
|
|
86
86
|
title: 'Finding calm',
|
|
87
87
|
},
|
|
88
88
|
];
|
|
@@ -111,13 +111,13 @@ const US_STATES = [
|
|
|
111
111
|
// docsite; the CLI swaps these for an inline placeholder on scaffold).
|
|
112
112
|
const ITEM_IMAGES: Record<string, {src: string}> = {
|
|
113
113
|
'1': {
|
|
114
|
-
src: '
|
|
114
|
+
src: '/template-assets/light-product-1.png',
|
|
115
115
|
},
|
|
116
116
|
'2': {
|
|
117
|
-
src: '
|
|
117
|
+
src: '/template-assets/light-product-4.png',
|
|
118
118
|
},
|
|
119
119
|
'3': {
|
|
120
|
-
src: '
|
|
120
|
+
src: '/template-assets/light-product-5.png',
|
|
121
121
|
},
|
|
122
122
|
};
|
|
123
123
|
|
|
@@ -74,13 +74,13 @@ function StarRating({rating, count}: {rating: number; count: number}) {
|
|
|
74
74
|
// ─── Image URLs ─────────────────────────────────────────────────────────────
|
|
75
75
|
// IMAGES[0] = fallback hero; IMAGES[1..6] = thumbnails (first is selected by default)
|
|
76
76
|
const IMAGES = [
|
|
77
|
-
'
|
|
78
|
-
'
|
|
79
|
-
'
|
|
80
|
-
'
|
|
81
|
-
'
|
|
82
|
-
'
|
|
83
|
-
'
|
|
77
|
+
'/template-assets/light-product-1.png',
|
|
78
|
+
'/template-assets/light-product-1.png',
|
|
79
|
+
'/template-assets/light-product-2.png',
|
|
80
|
+
'/template-assets/light-product-3.png',
|
|
81
|
+
'/template-assets/light-product-4.png',
|
|
82
|
+
'/template-assets/light-product-5.png',
|
|
83
|
+
'/template-assets/light-product-3.png',
|
|
84
84
|
];
|
|
85
85
|
|
|
86
86
|
// ─── Product Data ───────────────────────────────────────────────────────────
|
|
@@ -40,7 +40,7 @@ const PRODUCTS: Product[] = [
|
|
|
40
40
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
41
41
|
price: 75.0,
|
|
42
42
|
image:
|
|
43
|
-
'
|
|
43
|
+
'/template-assets/illustrative-horizontal-1.png',
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
id: 2,
|
|
@@ -49,7 +49,7 @@ const PRODUCTS: Product[] = [
|
|
|
49
49
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
50
50
|
price: 80.0,
|
|
51
51
|
image:
|
|
52
|
-
'
|
|
52
|
+
'/template-assets/illustrative-vertical-1.png',
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
id: 3,
|
|
@@ -58,7 +58,7 @@ const PRODUCTS: Product[] = [
|
|
|
58
58
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
59
59
|
price: 75.0,
|
|
60
60
|
image:
|
|
61
|
-
'
|
|
61
|
+
'/template-assets/illustrative-horizontal-3.png',
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
id: 4,
|
|
@@ -67,7 +67,7 @@ const PRODUCTS: Product[] = [
|
|
|
67
67
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
68
68
|
price: 75.0,
|
|
69
69
|
image:
|
|
70
|
-
'
|
|
70
|
+
'/template-assets/illustrative-horizontal-4.png',
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
id: 5,
|
|
@@ -76,7 +76,7 @@ const PRODUCTS: Product[] = [
|
|
|
76
76
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
77
77
|
price: 60.0,
|
|
78
78
|
image:
|
|
79
|
-
'
|
|
79
|
+
'/template-assets/illustrative-horizontal-5.png',
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
id: 6,
|
|
@@ -85,7 +85,7 @@ const PRODUCTS: Product[] = [
|
|
|
85
85
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
86
86
|
price: 80.0,
|
|
87
87
|
image:
|
|
88
|
-
'
|
|
88
|
+
'/template-assets/illustrative-horizontal-2.png',
|
|
89
89
|
},
|
|
90
90
|
];
|
|
91
91
|
|
|
@@ -158,7 +158,7 @@ export default function ShellTopNav() {
|
|
|
158
158
|
<MegaFeatured
|
|
159
159
|
title="The Autumn Edit"
|
|
160
160
|
description="Layering staples in warm, earthy tones."
|
|
161
|
-
image="
|
|
161
|
+
image="/template-assets/texture-beige-horizontal-1.png"
|
|
162
162
|
imageAlt="Autumn collection lookbook"
|
|
163
163
|
linkLabel="Shop the edit"
|
|
164
164
|
linkHref="#autumn-edit"
|
|
@@ -172,7 +172,7 @@ export default function ShellTopNav() {
|
|
|
172
172
|
<MegaFeatured
|
|
173
173
|
title="Meet Studio Mara"
|
|
174
174
|
description="Modern tailoring, made to last."
|
|
175
|
-
image="
|
|
175
|
+
image="/template-assets/texture-beige-horizontal-2.png"
|
|
176
176
|
imageAlt="Studio Mara lookbook"
|
|
177
177
|
linkLabel="Discover the label"
|
|
178
178
|
linkHref="#studio-mara"
|
|
@@ -25,39 +25,39 @@ const imageClip = {
|
|
|
25
25
|
|
|
26
26
|
const IMAGES = [
|
|
27
27
|
{
|
|
28
|
-
src: '
|
|
28
|
+
src: '/template-assets/colorful-lifestyle-vertical-3.png',
|
|
29
29
|
alt: 'Colorful lifestyle scene',
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
src: '
|
|
32
|
+
src: '/template-assets/colorful-lifestyle-horizontal-1.png',
|
|
33
33
|
alt: 'Colorful lifestyle horizontal',
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
src: '
|
|
36
|
+
src: '/template-assets/colorful-lifestyle-vertical-1.png',
|
|
37
37
|
alt: 'Colorful lifestyle vertical',
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
src: '
|
|
40
|
+
src: '/template-assets/colorful-home-vertical-2.png',
|
|
41
41
|
alt: 'Colorful home interior',
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
|
-
src: '
|
|
44
|
+
src: '/template-assets/colorful-home-vertical-3.png',
|
|
45
45
|
alt: 'Colorful home scene',
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
-
src: '
|
|
48
|
+
src: '/template-assets/colorful-home-vertical-1.png',
|
|
49
49
|
alt: 'Colorful home vertical',
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
src: '
|
|
52
|
+
src: '/template-assets/colorful-lifestyle-horizontal-2.png',
|
|
53
53
|
alt: 'Colorful lifestyle wide',
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
|
-
src: '
|
|
56
|
+
src: '/template-assets/colorful-lifestyle-vertical-2.png',
|
|
57
57
|
alt: 'Colorful lifestyle detail',
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
src: '
|
|
60
|
+
src: '/template-assets/colorful-lifestyle-vertical-4.png',
|
|
61
61
|
alt: 'Colorful lifestyle portrait',
|
|
62
62
|
},
|
|
63
63
|
];
|
|
@@ -46,37 +46,37 @@ const PRODUCTS = [
|
|
|
46
46
|
{
|
|
47
47
|
name: 'Ceremonial Matcha Latte',
|
|
48
48
|
category: 'Matcha' as ProductCategory,
|
|
49
|
-
image: '
|
|
49
|
+
image: '/template-assets/matcha-product-1.png',
|
|
50
50
|
price: 6,
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
name: 'Oat Milk Cappuccino',
|
|
54
54
|
category: 'Coffee' as ProductCategory,
|
|
55
|
-
image: '
|
|
55
|
+
image: '/template-assets/matcha-product-2.png',
|
|
56
56
|
price: 5,
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
name: 'Jasmine Green Tea',
|
|
60
60
|
category: 'Tea' as ProductCategory,
|
|
61
|
-
image: '
|
|
61
|
+
image: '/template-assets/matcha-product-3.png',
|
|
62
62
|
price: 4,
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
name: 'Mango Matcha Smoothie',
|
|
66
66
|
category: 'Smoothie' as ProductCategory,
|
|
67
|
-
image: '
|
|
67
|
+
image: '/template-assets/matcha-product-4.png',
|
|
68
68
|
price: 8,
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
name: 'Hojicha Latte',
|
|
72
72
|
category: 'Specialty' as ProductCategory,
|
|
73
|
-
image: '
|
|
73
|
+
image: '/template-assets/matcha-product-5.png',
|
|
74
74
|
price: 7,
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
name: 'Iced Yuzu Matcha',
|
|
78
78
|
category: 'Matcha' as ProductCategory,
|
|
79
|
-
image: '
|
|
79
|
+
image: '/template-assets/matcha-product-6.png',
|
|
80
80
|
price: 7,
|
|
81
81
|
},
|
|
82
82
|
];
|
|
@@ -283,13 +283,13 @@ const DEFAULT_PRODUCTS: ProductSpec[] = [
|
|
|
283
283
|
// Neutral product photos, served from the shared astryx asset CDN so the
|
|
284
284
|
// scaffolded template renders real imagery without needing local public assets.
|
|
285
285
|
const DEFAULT_IMAGES: Record<string, string> = {
|
|
286
|
-
watch: '
|
|
286
|
+
watch: '/template-assets/Neutral-Watch.png',
|
|
287
287
|
headphones:
|
|
288
|
-
'
|
|
289
|
-
backpack: '
|
|
290
|
-
wallet: '
|
|
291
|
-
tumbler: '
|
|
292
|
-
throw_: '
|
|
288
|
+
'/template-assets/Neutral-Headphones.png',
|
|
289
|
+
backpack: '/template-assets/Neutral-Backpack.png',
|
|
290
|
+
wallet: '/template-assets/Neutral-Wallet.png',
|
|
291
|
+
tumbler: '/template-assets/Neutral-Tumbler.png',
|
|
292
|
+
throw_: '/template-assets/Neutral-Blanket.png',
|
|
293
293
|
};
|
|
294
294
|
|
|
295
295
|
export interface ThemeShowcaseProps {
|
|
@@ -323,8 +323,11 @@ export const neutralTheme = defineTheme({
|
|
|
323
323
|
|
|
324
324
|
// =========================================================================
|
|
325
325
|
// Radius — slightly larger than default (kept as-is)
|
|
326
|
+
// --radius-none and --radius-full are always fixed and must never be
|
|
327
|
+
// scaled by a theme (see defineTheme's radius config docs) — 0 and
|
|
328
|
+
// 9999px respectively, matching @astryxdesign/core's own defaults.
|
|
326
329
|
// =========================================================================
|
|
327
|
-
'--radius-none': '
|
|
330
|
+
'--radius-none': '0px',
|
|
328
331
|
'--radius-inner': '0.375rem',
|
|
329
332
|
'--radius-element': '0.625rem',
|
|
330
333
|
'--radius-container': '0.75rem',
|
|
@@ -42,7 +42,7 @@ export const doc = {
|
|
|
42
42
|
name: 'fileExtensions',
|
|
43
43
|
type: 'string[]',
|
|
44
44
|
description:
|
|
45
|
-
'File extensions this codemod applies to. Code codemods only
|
|
45
|
+
'File extensions this codemod applies to. Code codemods only; a ' +
|
|
46
46
|
'config codemod always targets astryx.config.*.',
|
|
47
47
|
example: "['.tsx', '.ts']",
|
|
48
48
|
},
|
|
@@ -140,7 +140,7 @@ export const doc = {
|
|
|
140
140
|
type: 'prose',
|
|
141
141
|
text:
|
|
142
142
|
"The config-codemod variant (type: 'config') carries the same fields " +
|
|
143
|
-
'as a code codemod except fileExtensions
|
|
143
|
+
'as a code codemod except fileExtensions: it always targets the ' +
|
|
144
144
|
'astryx.config.* file rather than a set of source files.',
|
|
145
145
|
},
|
|
146
146
|
{
|
|
@@ -46,7 +46,7 @@ export const doc = {
|
|
|
46
46
|
{
|
|
47
47
|
name: 'experimental',
|
|
48
48
|
type: '{ xle?: { components?: Record<string, XleComponent> } }',
|
|
49
|
-
description: 'Unstable features
|
|
49
|
+
description: 'Unstable features; may change without a breaking bump.',
|
|
50
50
|
fields: [
|
|
51
51
|
{
|
|
52
52
|
name: 'experimental.xle.components',
|
|
@@ -260,6 +260,8 @@ export interface ComponentSlotElement {
|
|
|
260
260
|
* { property: 'padding', vars: ['--_card-padding'] },
|
|
261
261
|
* ```
|
|
262
262
|
*/
|
|
263
|
+
// SYNC: apps/docsite/scripts/generate-data.mjs (interface DerivedVar) — see the
|
|
264
|
+
// note on ComponentThemingTarget below.
|
|
263
265
|
export interface ComponentThemingDerivedVar {
|
|
264
266
|
/** The standard CSS property name (camelCase) that theme authors write.
|
|
265
267
|
* e.g. `'borderRadius'`, `'padding'`, `'paddingBlock'` */
|
|
@@ -270,6 +272,12 @@ export interface ComponentThemingDerivedVar {
|
|
|
270
272
|
/** Named expansion strategy instead of specific vars.
|
|
271
273
|
* `'container'` — expands padding to 7 container layout tokens. */
|
|
272
274
|
expand?: 'container';
|
|
275
|
+
/** Emit only the internal `vars`, dropping the source property from the
|
|
276
|
+
* generated rule. Use when the class-carrying element must not receive the
|
|
277
|
+
* standard property itself — the value reaches a child through the var
|
|
278
|
+
* (e.g. TextArea's flush wrapper drives the inner textarea's inline
|
|
279
|
+
* padding). Without this, the property is emitted alongside the var. */
|
|
280
|
+
replaces?: boolean;
|
|
273
281
|
}
|
|
274
282
|
|
|
275
283
|
/**
|
|
@@ -285,6 +293,10 @@ export interface ComponentThemingDerivedVar {
|
|
|
285
293
|
* {className: 'astryx-card'}
|
|
286
294
|
* ```
|
|
287
295
|
*/
|
|
296
|
+
// SYNC: When adding a field here, add it to the docsite's generated-registry
|
|
297
|
+
// copy too — apps/docsite/scripts/generate-data.mjs (interface ThemingTarget).
|
|
298
|
+
// `next build` type-checks the emitted componentRegistry.ts against that copy,
|
|
299
|
+
// so a field present in a .doc.mjs but missing there fails the docsite build.
|
|
288
300
|
export interface ComponentThemingTarget {
|
|
289
301
|
/** The stable CSS class name rendered by the component.
|
|
290
302
|
* Always starts with `astryx-`.
|
|
@@ -304,6 +316,15 @@ export interface ComponentThemingTarget {
|
|
|
304
316
|
* `[data-checked="checked"]`. Legacy state classes are still emitted for
|
|
305
317
|
* compatibility. Omit if the element has no state-driven selectors. */
|
|
306
318
|
states?: string[];
|
|
319
|
+
/** Set when this target has been RENAMED and this entry is the old name.
|
|
320
|
+
* The component still emits the class (via `themeProps`'s `legacyNames`),
|
|
321
|
+
* so existing themes keep working, but the docsite should steer readers to
|
|
322
|
+
* the replacement. The value is the class name that supersedes this one,
|
|
323
|
+
* without the `astryx-` prefix — e.g. `"checkbox-indicator"`.
|
|
324
|
+
*
|
|
325
|
+
* A theme target is public API; renaming one without this is a silent
|
|
326
|
+
* break for every theme styling it. */
|
|
327
|
+
deprecatedFor?: string;
|
|
307
328
|
}
|
|
308
329
|
|
|
309
330
|
/**
|
|
@@ -15,7 +15,7 @@ export const doc = {
|
|
|
15
15
|
displayName: 'CommandDoc',
|
|
16
16
|
namespace: 'authoring',
|
|
17
17
|
description:
|
|
18
|
-
'The doc-type for a CLI command
|
|
18
|
+
'The doc-type for a CLI command: the terminal binding of an operation. A command ' +
|
|
19
19
|
'is not its own behavior; it is a FunctionDoc exposed on the CLI, referenced via `fn`, ' +
|
|
20
20
|
'carrying only CLI-surface facts (args, flags, subcommands, examples, exit codes). ' +
|
|
21
21
|
'A `defineCommand` converter turns it into Commander config + `--help`.',
|
|
@@ -231,7 +231,7 @@ export const doc = {
|
|
|
231
231
|
notes: [
|
|
232
232
|
{
|
|
233
233
|
type: 'prose',
|
|
234
|
-
text: 'A command carries only CLI-surface facts. Behavior, parameters, returns, and thrown errors live in the FunctionDoc it points at via `fn
|
|
234
|
+
text: 'A command carries only CLI-surface facts. Behavior, parameters, returns, and thrown errors live in the FunctionDoc it points at via `fn`; the function does not know it has a CLI.',
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
237
|
type: 'prose',
|
|
@@ -50,7 +50,7 @@ export const doc = {
|
|
|
50
50
|
name: 'hiddenComponents',
|
|
51
51
|
type: 'string[]',
|
|
52
52
|
description:
|
|
53
|
-
'Sub-component names to hide from human-facing UI (CLI listings, docs catalogs). They stay public and importable
|
|
53
|
+
'Sub-component names to hide from human-facing UI (CLI listings, docs catalogs). They stay public and importable; agents and tooling can still discover them via source.',
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
name: 'hidden',
|
|
@@ -104,7 +104,7 @@ export const doc = {
|
|
|
104
104
|
name: 'theming.derived',
|
|
105
105
|
type: 'ComponentThemingDerivedVar[]',
|
|
106
106
|
description:
|
|
107
|
-
'Maps standard CSS properties to internal vars for theme-pipeline expansion. Ordered by priority
|
|
107
|
+
'Maps standard CSS properties to internal vars for theme-pipeline expansion. Ordered by priority: earlier entries emit first.',
|
|
108
108
|
},
|
|
109
109
|
],
|
|
110
110
|
},
|
|
@@ -170,7 +170,7 @@ export const doc = {
|
|
|
170
170
|
name: 'description',
|
|
171
171
|
type: 'string',
|
|
172
172
|
description:
|
|
173
|
-
"SubComponentDoc variant (required there): one-sentence description of the sub-component's role within the parent composition. Single/Multi docs have no top-level description
|
|
173
|
+
"SubComponentDoc variant (required there): one-sentence description of the sub-component's role within the parent composition. Single/Multi docs have no top-level description; they derive their summary from `usage`.",
|
|
174
174
|
},
|
|
175
175
|
],
|
|
176
176
|
examples: [
|
|
@@ -187,7 +187,7 @@ export const docs = {
|
|
|
187
187
|
'A Switch toggles a single setting on or off. Use it for instant, binary preferences that apply immediately without a submit step.',
|
|
188
188
|
bestPractices: [
|
|
189
189
|
{guidance: true, description: 'Apply the change immediately when toggled.'},
|
|
190
|
-
{guidance: false, description: 'Use a Switch for actions that need confirmation
|
|
190
|
+
{guidance: false, description: 'Use a Switch for actions that need confirmation; prefer a Checkbox in a form.'},
|
|
191
191
|
],
|
|
192
192
|
},
|
|
193
193
|
props: [
|
|
@@ -226,9 +226,9 @@ export const docs = {
|
|
|
226
226
|
type: 'list',
|
|
227
227
|
style: 'unordered',
|
|
228
228
|
items: [
|
|
229
|
-
'SingleComponentDoc
|
|
230
|
-
'MultiComponentDoc
|
|
231
|
-
'SubComponentDoc
|
|
229
|
+
'SingleComponentDoc: one primary component; put props directly on the doc via `props`. Use for Switch, Badge, Spinner, TextInput.',
|
|
230
|
+
'MultiComponentDoc: a directory exporting several components/hooks; list them in `components` (inline ComponentEntry or name-only ComponentRef). Use for Table, Dialog, TabList.',
|
|
231
|
+
'SubComponentDoc: a single sub-component in its own {Name}.doc.mjs inside the parent directory; set `subComponentOf` to the parent name. It inherits family fields and may omit `usage`.',
|
|
232
232
|
],
|
|
233
233
|
},
|
|
234
234
|
{
|
|
@@ -14,7 +14,7 @@ export const doc = {
|
|
|
14
14
|
displayName: 'EnumDoc',
|
|
15
15
|
namespace: 'authoring',
|
|
16
16
|
description:
|
|
17
|
-
'The doc-type for a closed vocabulary
|
|
17
|
+
'The doc-type for a closed vocabulary: a fixed set of literal values such as ' +
|
|
18
18
|
'error codes or response-type discriminants. Colocated as a `.doc.mjs` next to ' +
|
|
19
19
|
'the source of truth it documents.',
|
|
20
20
|
appliesTo: '<enum>.doc.mjs',
|
|
@@ -59,7 +59,7 @@ export const doc = {
|
|
|
59
59
|
{
|
|
60
60
|
name: 'members',
|
|
61
61
|
type: 'EnumMemberDoc[]',
|
|
62
|
-
description: 'The enumerated members
|
|
62
|
+
description: 'The enumerated members: one entry per literal value.',
|
|
63
63
|
required: true,
|
|
64
64
|
fields: [
|
|
65
65
|
{
|
|
@@ -41,7 +41,7 @@ export const doc = {
|
|
|
41
41
|
name: 'kind',
|
|
42
42
|
type: "'hook' | 'api'",
|
|
43
43
|
description:
|
|
44
|
-
'Which flavor
|
|
44
|
+
'Which flavor; drives docsite sectioning; inferred from importPath if omitted.',
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
name: 'summary',
|
|
@@ -127,7 +127,7 @@ export const doc = {
|
|
|
127
127
|
{
|
|
128
128
|
name: 'returns[].name',
|
|
129
129
|
type: 'string',
|
|
130
|
-
description: 'Field name (hooks)
|
|
130
|
+
description: 'Field name (hooks); omit for API envelope entries.',
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
name: 'returns[].type',
|
|
@@ -191,7 +191,7 @@ export const doc = {
|
|
|
191
191
|
name: 'usage',
|
|
192
192
|
type: 'UsageDoc',
|
|
193
193
|
description:
|
|
194
|
-
'Usage documentation (hooks)
|
|
194
|
+
'Usage documentation (hooks): description, best practices, anatomy. Same shape as HookDoc.usage.',
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
name: 'command',
|
|
@@ -43,7 +43,7 @@ export const doc = {
|
|
|
43
43
|
name: 'group',
|
|
44
44
|
type: 'string',
|
|
45
45
|
description:
|
|
46
|
-
'Optional group for sidebar/docs organization
|
|
46
|
+
'Optional group for sidebar/docs organization; same as ComponentDoc.group.',
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
name: 'keywords',
|
|
@@ -117,7 +117,7 @@ export const doc = {
|
|
|
117
117
|
{
|
|
118
118
|
name: 'usage',
|
|
119
119
|
type: 'UsageDoc',
|
|
120
|
-
description: 'Usage documentation
|
|
120
|
+
description: 'Usage documentation: description and best practices.',
|
|
121
121
|
required: true,
|
|
122
122
|
fields: [
|
|
123
123
|
{
|
|
@@ -190,7 +190,7 @@ export const docs = {
|
|
|
190
190
|
notes: [
|
|
191
191
|
{
|
|
192
192
|
type: 'prose',
|
|
193
|
-
text: "A hook's discriminant is `type: 'function'
|
|
193
|
+
text: "A hook's discriminant is `type: 'function'`: HookDoc and FunctionDoc share the generalized function kind. HookDoc is the hook-flavored view: named `returns` fields and a required `usage` block.",
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
type: 'prose',
|
|
@@ -14,7 +14,7 @@ export const doc = {
|
|
|
14
14
|
displayName: 'ReferenceDoc',
|
|
15
15
|
namespace: 'authoring',
|
|
16
16
|
description:
|
|
17
|
-
'The doc-type for a reference/topic doc
|
|
17
|
+
'The doc-type for a reference/topic doc: tokens, principles, theming, patterns, ' +
|
|
18
18
|
'accessibility, migration guides. Unlike ComponentDoc it is not tied to a component: ' +
|
|
19
19
|
'drop a `.doc.mjs` in the docs directory and it shows up in `astryx docs`. Content is ' +
|
|
20
20
|
'built from ordered sections of mixed content blocks.',
|
|
@@ -120,7 +120,7 @@ export const docs = {
|
|
|
120
120
|
notes: [
|
|
121
121
|
{
|
|
122
122
|
type: 'prose',
|
|
123
|
-
text: 'Each `sections[].content` is an ordered array of ReferenceContentBlock
|
|
123
|
+
text: 'Each `sections[].content` is an ordered array of ReferenceContentBlock, a discriminated union. New block types can be added without breaking existing docs. The same union is reused by the `notes` field on SchemaDoc and CommandDoc.',
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
type: 'code',
|
|
@@ -140,7 +140,7 @@ export const docs = {
|
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
type: 'prose',
|
|
143
|
-
text: "A section may set `previewType` to render a visual preview column for token tables
|
|
143
|
+
text: "A section may set `previewType` to render a visual preview column for token tables: one of 'swatch' | 'shadow-box' | 'radius-box' | 'spacing-bar' | 'size-bar' | 'border-line' | 'duration-bar' | 'easing-curve' | 'font-sample'.",
|
|
144
144
|
},
|
|
145
145
|
],
|
|
146
146
|
};
|
|
@@ -190,7 +190,7 @@ export const doc = {
|
|
|
190
190
|
type: 'list',
|
|
191
191
|
style: 'dont',
|
|
192
192
|
items: [
|
|
193
|
-
'Set `required: false` for optional fields
|
|
193
|
+
'Set `required: false` for optional fields; omit `required` entirely instead.',
|
|
194
194
|
],
|
|
195
195
|
},
|
|
196
196
|
],
|