@astryxdesign/cli 0.5.0-canary.32a62fd → 0.5.0-canary.3799df9

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.
@@ -18,9 +18,9 @@ export const doc = {
18
18
  'Enumerates the whole themeable surface: each `defineTheme` components key, the stable ' +
19
19
  'class it paints, the component that declares it, and the props and states that are legal ' +
20
20
  'override keys under it. Same source as the Theming table `astryx component <Name>` prints ' +
21
- '— the component docs — so the list cannot drift from the components, and `theme build` ' +
21
+ '(the component docs), so the list cannot drift from the components, and `theme build` ' +
22
22
  'validates overrides against this exact set. A filter naming a component gives that ' +
23
- 'component\u2019s set; anything else is a substring search over the keys.',
23
+ 'component\'s set; anything else is a substring search over the keys.',
24
24
  importPath: '@astryxdesign/cli/api',
25
25
  signature:
26
26
  'themeTargets(filter?: string, ctx?: {cwd?: string}): Promise<ThemeTargetsResponse>',
@@ -35,7 +35,7 @@ export const doc = {
35
35
  {
36
36
  name: 'ctx.cwd',
37
37
  type: 'string',
38
- description: 'Directory the project’s @astryxdesign/core is resolved from.',
38
+ description: 'Directory the project\'s @astryxdesign/core is resolved from.',
39
39
  },
40
40
  ],
41
41
  returns: [
@@ -7,7 +7,7 @@ export const doc = {
7
7
  name: 'Step — Content Slot',
8
8
  displayName: 'Step — Content Slot',
9
9
  description:
10
- 'Children passed to a Step render below its description, indented to line up with the label rather than the indicator, and stay outside the clickable label area so buttons inside remain their own targets. In a full flow you gate the slot on the step being active — that is what turns a vertical stepper into an expanding one.',
10
+ 'Children passed to a Step render below its description, indented to line up with the label rather than the indicator, and stay outside the clickable label area so buttons inside remain their own targets. In a full flow you gate the slot on the step being active. That is what turns a vertical stepper into an expanding one.',
11
11
  isReady: true,
12
12
  aspectRatio: 4 / 3,
13
13
  componentsUsed: ['Stepper', 'Step', 'TextInput', 'Button'],
@@ -7,7 +7,7 @@ export const doc = {
7
7
  name: 'Stepper — Custom Content',
8
8
  displayName: 'Stepper — Custom Content',
9
9
  description:
10
- 'A vertical stepper where each step owns a slice of the page. The content slot takes any node — form fields, a summary panel, a banner — so a stepper is not limited to multi-step forms. Rendering the slot only for the active step is what makes the flow expand one step at a time.',
10
+ 'A vertical stepper where each step owns a slice of the page. The content slot takes any node (form fields, a summary panel, a banner), so a stepper is not limited to multi-step forms. Rendering the slot only for the active step is what makes the flow expand one step at a time.',
11
11
  isReady: true,
12
12
  aspectRatio: 4 / 3,
13
13
  componentsUsed: [
@@ -153,14 +153,16 @@ const styles: Record<string, CSSProperties> = {
153
153
  flex: 1,
154
154
  },
155
155
  quantityInput: {
156
- // minWidth (not a hard width) so the field grows to fit the digit + the
157
- // theme's input padding. A fixed 40px was too tight on themes with larger
158
- // padding / bigger type scale (e.g. Matcha, Y2K), clipping the value.
159
- minWidth: 64,
160
156
  flexShrink: 0,
161
157
  },
158
+ // `auto` basis so the button wraps to its own line rather than ellipsizing.
162
159
  cartButton: {
163
- flex: 1,
160
+ flex: '1 1 auto',
161
+ minWidth: 0,
162
+ },
163
+ cartRow: {
164
+ width: '100%',
165
+ minWidth: 0,
164
166
  },
165
167
  };
166
168
 
@@ -236,6 +238,18 @@ const inlineStyles: Record<string, CSSProperties> = {
236
238
  display: 'flex',
237
239
  flexDirection: 'column',
238
240
  },
241
+ // Flex bases, not grid tracks: the checkout form needs a width floor, and the
242
+ // chat wraps to its own row rather than squeezing it under one.
243
+ checkoutColumn: {
244
+ flex: '1 1 300px',
245
+ minWidth: 0,
246
+ display: 'grid',
247
+ },
248
+ chatColumn: {
249
+ flex: '2 1 520px',
250
+ minWidth: 0,
251
+ display: 'grid',
252
+ },
239
253
  };
240
254
 
241
255
  const PRODUCT_IMAGE_KEYS = ['watch', 'headphones', 'backpack'];
@@ -284,8 +298,7 @@ const DEFAULT_PRODUCTS: ProductSpec[] = [
284
298
  // scaffolded template renders real imagery without needing local public assets.
285
299
  const DEFAULT_IMAGES: Record<string, string> = {
286
300
  watch: '/template-assets/Neutral-Watch.png',
287
- headphones:
288
- '/template-assets/Neutral-Headphones.png',
301
+ headphones: '/template-assets/Neutral-Headphones.png',
289
302
  backpack: '/template-assets/Neutral-Backpack.png',
290
303
  wallet: '/template-assets/Neutral-Wallet.png',
291
304
  tumbler: '/template-assets/Neutral-Tumbler.png',
@@ -350,14 +363,14 @@ function CardShowcase({
350
363
 
351
364
  return (
352
365
  <VStack gap={8}>
353
- <Grid columns={columns} gap={4}>
354
- <GridSpan columns={1}>
366
+ <HStack gap={4} wrap="wrap">
367
+ <div style={inlineStyles.checkoutColumn}>
355
368
  <CheckoutCard isMobile={isMobile} />
356
- </GridSpan>
357
- <GridSpan columns={isMobile ? 1 : 2}>
369
+ </div>
370
+ <div style={inlineStyles.chatColumn}>
358
371
  <ChatCard />
359
- </GridSpan>
360
- </Grid>
372
+ </div>
373
+ </HStack>
361
374
  <Grid columns={columns} gap={4}>
362
375
  <GridSpan columns={isMobile ? 1 : 3}>
363
376
  <InventoryCard images={images} inventory={inventory} />
@@ -472,7 +485,12 @@ function StorePreview({
472
485
  }}>
473
486
  {p.description}
474
487
  </Text>
475
- <HStack gap={2} vAlign="center" hAlign="center">
488
+ <HStack
489
+ gap={2}
490
+ vAlign="center"
491
+ hAlign="center"
492
+ wrap="wrap"
493
+ style={styles.cartRow}>
476
494
  <NumberInput
477
495
  label="Quantity"
478
496
  isLabelHidden
@@ -481,6 +499,7 @@ function StorePreview({
481
499
  min={1}
482
500
  max={99}
483
501
  size="sm"
502
+ width={72}
484
503
  style={styles.quantityInput}
485
504
  />
486
505
  <Button
@@ -506,7 +525,7 @@ function StorePreview({
506
525
 
507
526
  function CheckoutCard({isMobile}: {isMobile: boolean}) {
508
527
  return (
509
- <Card padding={5} style={styles.card}>
528
+ <Card padding={isMobile ? 4 : 5} style={styles.card}>
510
529
  <VStack gap={4} style={styles.checkoutStack}>
511
530
  <Heading level={2}>Checkout</Heading>
512
531
 
@@ -560,7 +579,7 @@ function CheckoutCard({isMobile}: {isMobile: boolean}) {
560
579
  <Text type="supporting" weight="bold">
561
580
  Payment method
562
581
  </Text>
563
- <Grid columns={isMobile ? 1 : {minWidth: 70, max: 3}} gap={2}>
582
+ <Grid columns={isMobile ? 1 : {minWidth: 80, max: 3}} gap={2}>
564
583
  <SelectableCard
565
584
  label="Pay with card"
566
585
  isSelected={true}
@@ -614,7 +633,7 @@ function CheckoutCard({isMobile}: {isMobile: boolean}) {
614
633
  placeholder="1234 1234 1234 1234"
615
634
  value=""
616
635
  onChange={() => {}}
617
- startIcon={<CreditCard size={16} />}
636
+ startIcon={isMobile ? undefined : <CreditCard size={16} />}
618
637
  size="lg"
619
638
  />
620
639
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.5.0-canary.32a62fd",
3
+ "version": "0.5.0-canary.3799df9",
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": "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",
90
+ "@astryxdesign/charts": "0.5.0-canary.3799df9",
91
+ "@astryxdesign/core": "0.5.0-canary.3799df9",
92
+ "@astryxdesign/lab": "0.5.0-canary.3799df9",
93
+ "@astryxdesign/theme-neutral": "0.5.0-canary.3799df9",
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": "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",
111
+ "@astryxdesign/charts": "0.5.0-canary.3799df9",
112
+ "@astryxdesign/core": "0.5.0-canary.3799df9",
113
+ "@astryxdesign/lab": "0.5.0-canary.3799df9",
114
+ "@astryxdesign/theme-neutral": "0.5.0-canary.3799df9",
115
115
  "gpt-tokenizer": "^3.4.0"
116
116
  },
117
117
  "scripts": {