@astryxdesign/cli 0.3.0-canary.d1b7d82 → 0.3.0-canary.d52d2cb
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/api/template/template.test.mjs +12 -13
- package/assets/codemods/transforms/v0.3.0/__tests__/migrate-grid-minchildwidth-to-columns.test.mjs +82 -0
- package/assets/codemods/transforms/v0.3.0/migrate-grid-minchildwidth-to-columns.mjs +38 -2
- package/assets/docs/layout.doc.dense.mjs +1 -1
- 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/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/authoring/doctypes/base/type.ts +6 -0
- package/foundation/agent-docs/agent-docs.mjs +3 -4
- package/foundation/agent-docs/agent-docs.test.mjs +8 -0
- package/foundation/discovery/template-adapter.mjs +8 -4
- package/package.json +9 -9
|
@@ -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 {
|
|
@@ -270,6 +270,12 @@ export interface ComponentThemingDerivedVar {
|
|
|
270
270
|
/** Named expansion strategy instead of specific vars.
|
|
271
271
|
* `'container'` — expands padding to 7 container layout tokens. */
|
|
272
272
|
expand?: 'container';
|
|
273
|
+
/** Emit only the internal `vars`, dropping the source property from the
|
|
274
|
+
* generated rule. Use when the class-carrying element must not receive the
|
|
275
|
+
* standard property itself — the value reaches a child through the var
|
|
276
|
+
* (e.g. TextArea's flush wrapper drives the inner textarea's inline
|
|
277
|
+
* padding). Without this, the property is emitted alongside the var. */
|
|
278
|
+
replaces?: boolean;
|
|
273
279
|
}
|
|
274
280
|
|
|
275
281
|
/**
|
|
@@ -341,10 +341,9 @@ export function generateCompressedIndex(version, {coreDir, invocation = getCliIn
|
|
|
341
341
|
|
|
342
342
|
// Rules — the top error-preventers.
|
|
343
343
|
lines.push('RULES:');
|
|
344
|
-
lines.push('- No <div> — components do all layout/spacing
|
|
345
|
-
lines.push('- Frame first:
|
|
346
|
-
lines.push('- Dense data = rows (Table, List/Item)
|
|
347
|
-
lines.push('- Status → StatusDot/Token; Badge only for counts and enumerated states, never decoration.');
|
|
344
|
+
lines.push('- No <div> — components do all layout/spacing, page frame included.');
|
|
345
|
+
lines.push('- Frame first: read `astryx docs layout` before writing any page or screen — page frame, region widths, breakpoint behavior.');
|
|
346
|
+
lines.push('- Dense data = rows (Table, List/Item), never Card-wrapped list items; Card is for standalone widgets. Status = StatusDot/Token; Badge = counts only.');
|
|
348
347
|
// Styling guidance tailored to the project's configured system — never
|
|
349
348
|
// recommend a path that isn't compiled here (xstyle needs the StyleX compiler;
|
|
350
349
|
// utilities need Tailwind). Tokens are always the source of truth.
|
|
@@ -46,6 +46,14 @@ describe('generateCompressedIndex', () => {
|
|
|
46
46
|
expect(result).toMatch(/never override --color-/);
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
+
it('sends frame choice to the layout doc rather than naming a shell', () => {
|
|
50
|
+
const result = generateCompressedIndex('1.0.0');
|
|
51
|
+
const frameRule = result.split('\n').find(l => l.includes('Frame first'));
|
|
52
|
+
expect(frameRule).toContain('astryx docs layout');
|
|
53
|
+
expect(result).not.toMatch(/AppShell/);
|
|
54
|
+
expect(frameRule).not.toMatch(/https?:/);
|
|
55
|
+
});
|
|
56
|
+
|
|
49
57
|
it('includes the post-generation self-check rule', () => {
|
|
50
58
|
const result = generateCompressedIndex('1.0.0');
|
|
51
59
|
expect(result).toContain('SELF-CHECK before you finish');
|
|
@@ -153,14 +153,18 @@ const PLACEHOLDER_IMAGE =
|
|
|
153
153
|
'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20400%20300%22%20preserveAspectRatio%3D%22xMidYMid%20slice%22%3E%3Crect%20width%3D%22400%22%20height%3D%22300%22%20fill%3D%22%23f5f6f8%22%2F%3E%3Cg%20transform%3D%22translate%28200%20150%29%22%20fill%3D%22none%22%20stroke%3D%22%23c2cad6%22%20stroke-width%3D%225%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%22-44%22%20y%3D%22-44%22%20width%3D%2288%22%20height%3D%2288%22%20rx%3D%2216%22%2F%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%22-18%22%20r%3D%222.5%22%20fill%3D%22%23c2cad6%22%20stroke%3D%22none%22%2F%3E%3Cpath%20d%3D%22M-34%2030%20L-8%200%20L10%2018%20L20%208%20L34%2024%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E';
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
|
-
* Demo-image sources to strip from scaffolded projects
|
|
157
|
-
*
|
|
158
|
-
*
|
|
156
|
+
* Demo-image sources to strip from scaffolded projects. Template demo imagery
|
|
157
|
+
* is self-hosted under the docsite's `/template-assets/*` dir (committed there,
|
|
158
|
+
* mirrored into the sandbox preview by scripts/sync-templates.js). Those paths
|
|
159
|
+
* only resolve inside the Astryx docsite/sandbox, so on scaffold they're
|
|
160
|
+
* replaced with a self-contained placeholder — a scaffolded project has no
|
|
161
|
+
* `/template-assets/` dir and would otherwise 404. Genuine third-party URLs
|
|
162
|
+
* (e.g. brand logos from paypalobjects.com) are intentionally left untouched.
|
|
159
163
|
*
|
|
160
164
|
* @type {RegExp[]}
|
|
161
165
|
*/
|
|
162
166
|
const DEMO_IMAGE_PATTERNS = [
|
|
163
|
-
|
|
167
|
+
/\/template-assets\/[\w-]+\.\w+/g,
|
|
164
168
|
];
|
|
165
169
|
|
|
166
170
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.3.0-canary.
|
|
3
|
+
"version": "0.3.0-canary.d52d2cb",
|
|
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",
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
"zod": "^4.4.3"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@astryxdesign/charts": "0.3.0-canary.
|
|
88
|
-
"@astryxdesign/core": "0.3.0-canary.
|
|
89
|
-
"@astryxdesign/lab": "0.3.0-canary.
|
|
90
|
-
"@astryxdesign/theme-neutral": "0.3.0-canary.
|
|
87
|
+
"@astryxdesign/charts": "0.3.0-canary.d52d2cb",
|
|
88
|
+
"@astryxdesign/core": "0.3.0-canary.d52d2cb",
|
|
89
|
+
"@astryxdesign/lab": "0.3.0-canary.d52d2cb",
|
|
90
|
+
"@astryxdesign/theme-neutral": "0.3.0-canary.d52d2cb",
|
|
91
91
|
"gpt-tokenizer": "^3.4.0"
|
|
92
92
|
},
|
|
93
93
|
"peerDependenciesMeta": {
|
|
@@ -105,10 +105,10 @@
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@astryxdesign/charts": "0.3.0-canary.
|
|
109
|
-
"@astryxdesign/core": "0.3.0-canary.
|
|
110
|
-
"@astryxdesign/lab": "0.3.0-canary.
|
|
111
|
-
"@astryxdesign/theme-neutral": "0.3.0-canary.
|
|
108
|
+
"@astryxdesign/charts": "0.3.0-canary.d52d2cb",
|
|
109
|
+
"@astryxdesign/core": "0.3.0-canary.d52d2cb",
|
|
110
|
+
"@astryxdesign/lab": "0.3.0-canary.d52d2cb",
|
|
111
|
+
"@astryxdesign/theme-neutral": "0.3.0-canary.d52d2cb",
|
|
112
112
|
"gpt-tokenizer": "^3.4.0"
|
|
113
113
|
},
|
|
114
114
|
"scripts": {
|