@astryxdesign/cli 0.1.0 → 0.1.1

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 (140) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +117 -75
  3. package/bin/astryx.mjs +22 -7
  4. package/docs/getting-started.doc.mjs +11 -11
  5. package/docs/icons.doc.mjs +1 -1
  6. package/docs/migration.doc.mjs +2 -2
  7. package/docs/shape.doc.mjs +1 -1
  8. package/docs/styling.doc.mjs +3 -4
  9. package/docs/theme.doc.dense.mjs +2 -2
  10. package/docs/theme.doc.mjs +14 -0
  11. package/docs/theme.doc.zh.mjs +2 -2
  12. package/docs/working-with-ai.doc.mjs +4 -4
  13. package/package.json +2 -2
  14. package/src/api/doctor.mjs +3 -3
  15. package/src/api/search.mjs +207 -13
  16. package/src/api/template.mjs +2 -1
  17. package/src/codemods/__tests__/registry.test.mjs +1 -0
  18. package/src/codemods/registry.mjs +1 -0
  19. package/src/codemods/runner.mjs +105 -51
  20. package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-config-surfaces.test.mjs +116 -0
  21. package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-module-specifiers.test.mjs +51 -0
  22. package/src/codemods/transforms/v0.1.0/index.mjs +28 -0
  23. package/src/codemods/transforms/v0.1.0/migrate-xds-config-surfaces.mjs +230 -0
  24. package/src/codemods/transforms/v0.1.0/migrate-xds-module-specifiers.mjs +84 -0
  25. package/src/commands/agent-docs.mjs +119 -66
  26. package/src/commands/agent-docs.path-safety.test.mjs +1 -1
  27. package/src/commands/agent-docs.test.mjs +87 -31
  28. package/src/commands/build-theme.import-path.test.mjs +1 -1
  29. package/src/commands/build-theme.path-safety.test.mjs +1 -1
  30. package/src/commands/build-theme.prose.test.mjs +1 -1
  31. package/src/commands/build.mjs +196 -0
  32. package/src/commands/component-package.test.mjs +1 -1
  33. package/src/commands/component.test.mjs +1 -1
  34. package/src/commands/docs.test.mjs +1 -1
  35. package/src/commands/doctor.test.mjs +1 -1
  36. package/src/commands/external-showcase.test.mjs +1 -1
  37. package/src/commands/init.mjs +10 -2
  38. package/src/commands/interactive-guard.test.mjs +1 -1
  39. package/src/commands/json-contract.test.mjs +10 -3
  40. package/src/commands/swizzle-gap-safety.test.mjs +1 -1
  41. package/src/commands/swizzle.path-safety.test.mjs +1 -1
  42. package/src/commands/template.path-safety.test.mjs +1 -1
  43. package/src/commands/template.test.mjs +1 -1
  44. package/src/commands/upgrade.mjs +353 -169
  45. package/src/commands/upgrade.test.mjs +41 -27
  46. package/src/index.mjs +1 -0
  47. package/src/lib/config.mjs +12 -0
  48. package/src/lib/config.test.mjs +42 -0
  49. package/src/lib/error-codes.mjs +3 -0
  50. package/src/types/error-codes.d.ts +1 -0
  51. package/src/utils/interactive.mjs +1 -1
  52. package/src/utils/interactive.test.mjs +2 -0
  53. package/src/utils/package-manager.mjs +1 -1
  54. package/src/utils/package-manager.test.mjs +1 -1
  55. package/src/utils/path-safety.test.mjs +1 -1
  56. package/src/utils/paths.test.mjs +8 -8
  57. package/src/utils/update-check.mjs +4 -26
  58. package/src/utils/update-check.test.mjs +2 -64
  59. package/templates/blocks/components/AppShell/AppShellContentOnly.tsx +1 -9
  60. package/templates/blocks/components/AppShell/AppShellShowcase.tsx +1 -10
  61. package/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx +1 -9
  62. package/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx +1 -9
  63. package/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx +1 -9
  64. package/templates/blocks/components/AppShell/AppShellWithBanner.tsx +1 -9
  65. package/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx +12 -19
  66. package/templates/blocks/components/Banner/BannerShowcase.tsx +1 -8
  67. package/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx +1 -8
  68. package/templates/blocks/components/Carousel/CarouselShowcase.tsx +2 -12
  69. package/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsx +6 -9
  70. package/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx +10 -12
  71. package/templates/blocks/components/ChatMessageList/ChatMessageListDensity.tsx +1 -9
  72. package/templates/blocks/components/ChatMessageList/ChatMessageListFullFeatured.tsx +1 -9
  73. package/templates/blocks/components/ChatMessageList/ChatMessageListShowcase.tsx +1 -9
  74. package/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +1 -8
  75. package/templates/blocks/components/ChatSendButton/ChatSendButtonInComposer.tsx +1 -8
  76. package/templates/blocks/components/Citation/CitationInlineText.tsx +4 -4
  77. package/templates/blocks/components/Code/CodeInlineInParagraph.tsx +1 -8
  78. package/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx +1 -1
  79. package/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx +1 -1
  80. package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsx +9 -12
  81. package/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +13 -15
  82. package/templates/blocks/components/Divider/DividerShowcase.tsx +1 -8
  83. package/templates/blocks/components/Divider/DividerVertical.tsx +7 -9
  84. package/templates/blocks/components/Field/FieldShowcase.tsx +1 -8
  85. package/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx +1 -6
  86. package/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx +1 -9
  87. package/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx +4 -6
  88. package/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx +1 -6
  89. package/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx +2 -8
  90. package/templates/blocks/components/HoverCard/HoverCardShowcase.tsx +1 -8
  91. package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx +2 -12
  92. package/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx +8 -11
  93. package/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx +9 -12
  94. package/templates/blocks/components/Overlay/OverlayBottomStrip.tsx +4 -17
  95. package/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +15 -16
  96. package/templates/blocks/components/Overlay/OverlayShowcase.tsx +5 -21
  97. package/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx +2 -14
  98. package/templates/blocks/components/Pagination/PaginationPageSize.tsx +12 -14
  99. package/templates/blocks/components/Pagination/PaginationVariants.tsx +1 -8
  100. package/templates/blocks/components/Pagination/PaginationWithTable.tsx +2 -14
  101. package/templates/blocks/components/Tokenizer/TokenizerClear.tsx +1 -6
  102. package/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +2 -7
  103. package/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +1 -6
  104. package/templates/blocks/components/Tokenizer/TokenizerIcon.tsx +1 -6
  105. package/templates/blocks/components/Tokenizer/TokenizerMaxEntries.tsx +1 -6
  106. package/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +2 -7
  107. package/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx +1 -6
  108. package/templates/blocks/components/Tokenizer/TokenizerStates.tsx +4 -9
  109. package/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +1 -10
  110. package/templates/blocks/components/Toolbar/ToolbarSizes.tsx +1 -8
  111. package/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx +1 -8
  112. package/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +1 -10
  113. package/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx +8 -11
  114. package/templates/pages/ai-chat/page.tsx +71 -64
  115. package/templates/pages/ai-chat-landing/page.tsx +8 -12
  116. package/templates/pages/centered-hero/page.tsx +13 -15
  117. package/templates/pages/classic-gallery/page.tsx +27 -34
  118. package/templates/pages/detail-page/page.tsx +18 -18
  119. package/templates/pages/documentation/page.tsx +42 -58
  120. package/templates/pages/documentation-design/page.tsx +82 -60
  121. package/templates/pages/documentation-technical/page.tsx +101 -60
  122. package/templates/pages/editor/page.tsx +42 -54
  123. package/templates/pages/file-explorer/page.tsx +13 -16
  124. package/templates/pages/form-two-column/page.tsx +13 -17
  125. package/templates/pages/gallery-hero/page.tsx +13 -15
  126. package/templates/pages/ide/page.tsx +188 -264
  127. package/templates/pages/library/page.tsx +16 -23
  128. package/templates/pages/login/page.tsx +14 -18
  129. package/templates/pages/login-card/page.tsx +14 -18
  130. package/templates/pages/login-split/page.tsx +50 -48
  131. package/templates/pages/login-sso/page.tsx +9 -13
  132. package/templates/pages/mixed-gallery/page.tsx +51 -45
  133. package/templates/pages/payment-form/page.tsx +56 -70
  134. package/templates/pages/product-detail/page.tsx +27 -33
  135. package/templates/pages/product-gallery/page.tsx +7 -13
  136. package/templates/pages/settings-dialog/page.tsx +35 -43
  137. package/templates/pages/settings-sidebar/page.tsx +39 -47
  138. package/templates/pages/side-gallery/page.tsx +6 -9
  139. package/templates/pages/table-grouped/page.tsx +11 -15
  140. package/templates/pages/theme-showcase/page.tsx +33 -37
@@ -3,15 +3,10 @@
3
3
  'use client';
4
4
 
5
5
  import {useState} from 'react';
6
- import * as stylex from '@stylexjs/stylex';
7
6
  import {Tokenizer} from '@astryxdesign/core/Tokenizer';
8
7
  import {Stack} from '@astryxdesign/core/Layout';
9
8
  import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
10
9
 
11
- const styles = stylex.create({
12
- fixed: {width: 400},
13
- });
14
-
15
10
  const users: SearchableItem[] = [
16
11
  {id: '1', label: 'Alice Johnson'},
17
12
  {id: '2', label: 'Bob Smith'},
@@ -44,7 +39,7 @@ export default function TokenizerStates() {
44
39
  value={[users[0], users[2]]}
45
40
  onChange={() => {}}
46
41
  isDisabled
47
- xstyle={styles.fixed}
42
+ style={{width: 400}}
48
43
  />
49
44
  <Tokenizer
50
45
  label="Error message"
@@ -54,7 +49,7 @@ export default function TokenizerStates() {
54
49
  onChange={items => setErrorValue(items)}
55
50
  isRequired
56
51
  status={{type: 'error', message: 'At least one reviewer is required'}}
57
- xstyle={styles.fixed}
52
+ style={{width: 400}}
58
53
  />
59
54
  <Tokenizer
60
55
  label="Warning message"
@@ -66,7 +61,7 @@ export default function TokenizerStates() {
66
61
  type: 'warning',
67
62
  message: 'Consider adding at least 2 approvers',
68
63
  }}
69
- xstyle={styles.fixed}
64
+ style={{width: 400}}
70
65
  />
71
66
  <Tokenizer
72
67
  label="Success message"
@@ -75,7 +70,7 @@ export default function TokenizerStates() {
75
70
  value={successValue}
76
71
  onChange={items => setSuccessValue(items)}
77
72
  status={{type: 'success', message: 'All required reviewers added'}}
78
- xstyle={styles.fixed}
73
+ style={{width: 400}}
79
74
  />
80
75
  </Stack>
81
76
  );
@@ -9,19 +9,10 @@ import {Heading} from '@astryxdesign/core/Text';
9
9
  import {Card} from '@astryxdesign/core/Card';
10
10
  import {Section} from '@astryxdesign/core/Section';
11
11
  import {FunnelIcon, PlusIcon} from '@heroicons/react/24/outline';
12
- import * as stylex from '@stylexjs/stylex';
13
-
14
- const styles = stylex.create({
15
- card: {
16
- width: 500,
17
- height: '100%',
18
- marginTop: 260,
19
- },
20
- });
21
12
 
22
13
  export default function ToolbarCardHeader() {
23
14
  return (
24
- <Card xstyle={styles.card}>
15
+ <Card style={{width: 500, height: '100%', marginTop: 260}}>
25
16
  <Toolbar
26
17
  label="User list actions"
27
18
  size="sm"
@@ -9,13 +9,6 @@ import {Heading} from '@astryxdesign/core/Text';
9
9
  import {Stack} from '@astryxdesign/core/Layout';
10
10
  import {Card} from '@astryxdesign/core/Card';
11
11
  import {FunnelIcon, PlusIcon} from '@heroicons/react/24/outline';
12
- import * as stylex from '@stylexjs/stylex';
13
-
14
- const styles = stylex.create({
15
- container: {
16
- width: 500,
17
- },
18
- });
19
12
 
20
13
  const SIZES = [
21
14
  {size: 'sm' as const, label: 'Small'},
@@ -25,7 +18,7 @@ const SIZES = [
25
18
 
26
19
  export default function ToolbarSizes() {
27
20
  return (
28
- <Stack direction="vertical" gap={4} xstyle={styles.container}>
21
+ <Stack direction="vertical" gap={4} style={{width: 500}}>
29
22
  {SIZES.map(({size, label}) => (
30
23
  <Card key={size}>
31
24
  <Toolbar
@@ -9,21 +9,14 @@ import {TextInput} from '@astryxdesign/core/TextInput';
9
9
  import {MoreMenu} from '@astryxdesign/core/MoreMenu';
10
10
  import {Stack} from '@astryxdesign/core/Layout';
11
11
  import {Table} from '@astryxdesign/core/Table';
12
- import * as stylex from '@stylexjs/stylex';
13
12
  import {
14
13
  MagnifyingGlassIcon,
15
14
  ChevronDownIcon,
16
15
  } from '@heroicons/react/24/outline';
17
16
 
18
- const styles = stylex.create({
19
- container: {
20
- width: '100%',
21
- },
22
- });
23
-
24
17
  export default function ToolbarTableFilter() {
25
18
  return (
26
- <Stack direction="vertical" xstyle={styles.container}>
19
+ <Stack direction="vertical" style={{width: '100%'}}>
27
20
  <Toolbar
28
21
  label="Table filters"
29
22
  size="sm"
@@ -9,19 +9,10 @@ import {Heading} from '@astryxdesign/core/Text';
9
9
  import {Card} from '@astryxdesign/core/Card';
10
10
  import {Section} from '@astryxdesign/core/Section';
11
11
  import {ArrowLeftIcon} from '@heroicons/react/24/outline';
12
- import * as stylex from '@stylexjs/stylex';
13
-
14
- const styles = stylex.create({
15
- card: {
16
- width: 600,
17
- height: '100%',
18
- marginTop: 260,
19
- },
20
- });
21
12
 
22
13
  export default function ToolbarThreeSlot() {
23
14
  return (
24
- <Card xstyle={styles.card}>
15
+ <Card style={{width: 600, height: '100%', marginTop: 260}}>
25
16
  <Toolbar
26
17
  label="Document toolbar"
27
18
  dividers={['bottom']}
@@ -2,7 +2,7 @@
2
2
 
3
3
  'use client';
4
4
 
5
- import {useState} from 'react';
5
+ import {useState, type CSSProperties} from 'react';
6
6
  import {Toolbar} from '@astryxdesign/core/Toolbar';
7
7
  import {Button} from '@astryxdesign/core/Button';
8
8
  import {Icon} from '@astryxdesign/core/Icon';
@@ -10,21 +10,18 @@ import {TabList, Tab} from '@astryxdesign/core/TabList';
10
10
  import {Card} from '@astryxdesign/core/Card';
11
11
  import {Section} from '@astryxdesign/core/Section';
12
12
  import {PlusIcon} from '@heroicons/react/24/outline';
13
- import * as stylex from '@stylexjs/stylex';
14
13
 
15
- const styles = stylex.create({
16
- card: {
17
- width: '100%',
18
- maxWidth: 500,
19
- height: '100%',
20
- marginTop: 200,
21
- },
22
- });
14
+ const card: CSSProperties = {
15
+ width: '100%',
16
+ maxWidth: 500,
17
+ height: '100%',
18
+ marginTop: 200,
19
+ };
23
20
 
24
21
  export default function ToolbarWithTabs() {
25
22
  const [tab, setTab] = useState('overview');
26
23
  return (
27
- <Card xstyle={styles.card}>
24
+ <Card style={card}>
28
25
  <Toolbar
29
26
  label="Section navigation"
30
27
  dividers={['bottom']}
@@ -2,9 +2,7 @@
2
2
 
3
3
  'use client';
4
4
 
5
- import {useRef, useState} from 'react';
6
- import * as stylex from '@stylexjs/stylex';
7
- import {spacingVars} from '@astryxdesign/core/theme/tokens.stylex';
5
+ import {useRef, useState, type CSSProperties} from 'react';
8
6
 
9
7
  import {
10
8
  HStack,
@@ -55,56 +53,66 @@ import {
55
53
  // Below this width the split-pane collapses to a single chat column. Shared by
56
54
  // the CSS container query and the JS check in openArtifact so they can't drift.
57
55
  const MOBILE_MAX_WIDTH = 767;
58
- const MOBILE = `@container artifact (max-width: ${MOBILE_MAX_WIDTH}px)`;
59
-
60
- const styles = stylex.create({
61
- root: {
62
- height: '100dvh',
63
- width: '100%',
64
- containerType: 'inline-size',
65
- containerName: 'artifact',
66
- },
67
- chatColumn: {
68
- flex: 1,
69
- width: '100%',
70
- minWidth: 0,
71
- height: '100%',
72
- },
73
- chatLayout: {
74
- flex: 1,
75
- minHeight: 0,
76
- },
77
- artifactPanel: {
78
- overflow: 'hidden',
79
- flexDirection: 'column',
80
- display: {default: 'flex', [MOBILE]: 'none'},
81
- },
82
- resizeHandle: {
83
- display: {default: 'flex', [MOBILE]: 'none'},
84
- },
85
- artifactCard: {
86
- marginBlockStart: spacingVars['--spacing-2'],
87
- },
88
- artifactScroll: {
89
- flex: 1,
90
- overflowY: 'auto',
91
- },
92
- articleBody: {
93
- maxWidth: 720,
94
- marginInline: 'auto',
95
- },
96
- });
97
-
98
- // Runtime width for the artifact panel; the MOBILE override forces full width.
99
- const dynamicStyles = stylex.create({
100
- artifactPanelWidth: (size: number | string) => ({
101
- width: {
102
- default: typeof size === 'number' ? `${size}px` : size,
103
- [MOBILE]: '100%',
104
- },
105
- flexShrink: {default: 0, [MOBILE]: 1},
106
- }),
107
- });
56
+
57
+ const root: CSSProperties = {
58
+ height: '100dvh',
59
+ width: '100%',
60
+ containerType: 'inline-size',
61
+ containerName: 'artifact',
62
+ };
63
+ const chatColumn: CSSProperties = {
64
+ flex: 1,
65
+ width: '100%',
66
+ minWidth: 0,
67
+ height: '100%',
68
+ };
69
+ const chatLayout: CSSProperties = {
70
+ flex: 1,
71
+ minHeight: 0,
72
+ };
73
+ const artifactCard: CSSProperties = {
74
+ marginBlockStart: 'var(--spacing-2)',
75
+ };
76
+ const artifactScroll: CSSProperties = {
77
+ flex: 1,
78
+ overflowY: 'auto',
79
+ };
80
+ const articleBody: CSSProperties = {
81
+ maxWidth: 720,
82
+ marginInline: 'auto',
83
+ };
84
+
85
+ // Runtime width for the artifact panel, passed in via the --artifact-panel-width
86
+ // custom property so the MOBILE container query can still override it to 100%
87
+ // (an inline `width` would beat the class rule). The container query lives in a
88
+ // plain <style> tag below so it needs NO CSS compiler.
89
+ const artifactPanelWidthVar = (size: number | string): CSSProperties =>
90
+ ({
91
+ '--artifact-panel-width': typeof size === 'number' ? `${size}px` : size,
92
+ }) as CSSProperties;
93
+
94
+ const AI_CHAT_CSS = `
95
+ .ai-chat-resize-handle {
96
+ display: flex;
97
+ }
98
+ .ai-chat-artifact-panel {
99
+ overflow: hidden;
100
+ display: flex;
101
+ flex-direction: column;
102
+ width: var(--artifact-panel-width);
103
+ flex-shrink: 0;
104
+ }
105
+ @container artifact (max-width: ${MOBILE_MAX_WIDTH}px) {
106
+ .ai-chat-resize-handle {
107
+ display: none;
108
+ }
109
+ .ai-chat-artifact-panel {
110
+ display: none;
111
+ width: 100%;
112
+ flex-shrink: 1;
113
+ }
114
+ }
115
+ `;
108
116
 
109
117
  // Artifact content
110
118
 
@@ -225,8 +233,8 @@ function MobileArtifactActions() {
225
233
  // Scrollable artifact body — the formatted document.
226
234
  function ArtifactBody() {
227
235
  return (
228
- <Section variant="transparent" xstyle={styles.artifactScroll}>
229
- <VStack gap={2} xstyle={styles.articleBody}>
236
+ <Section variant="transparent" style={artifactScroll}>
237
+ <VStack gap={2} style={articleBody}>
230
238
  <Heading level={1}>{ARTIFACT_TITLE}</Heading>
231
239
  <Markdown>{ARTIFACT_CONTENT}</Markdown>
232
240
  </VStack>
@@ -243,7 +251,7 @@ function ArtifactCard({onOpen}: {onOpen: () => void}) {
243
251
  variant="muted"
244
252
  padding={3}
245
253
  maxWidth={360}
246
- xstyle={styles.artifactCard}>
254
+ style={artifactCard}>
247
255
  <HStack gap={3} vAlign="center" width="100%">
248
256
  <Icon icon={DocumentTextIcon} size="md" color="secondary" />
249
257
  <StackItem size="fill">
@@ -288,17 +296,18 @@ export default function AIChatConversationTemplate() {
288
296
  };
289
297
 
290
298
  return (
291
- <VStack ref={rootRef} xstyle={styles.root}>
299
+ <VStack ref={rootRef} style={root}>
300
+ <style>{AI_CHAT_CSS}</style>
292
301
  <Layout
293
302
  height="fill"
294
303
  content={
295
304
  <LayoutContent padding={0}>
296
305
  <HStack height="100%">
297
306
  {/* Chat column — flexes to fill the space the artifact leaves */}
298
- <VStack xstyle={styles.chatColumn}>
307
+ <VStack style={chatColumn}>
299
308
  <ChatLayout
300
309
  density="spacious"
301
- xstyle={styles.chatLayout}
310
+ style={chatLayout}
302
311
  composer={
303
312
  <ChatComposer
304
313
  onSubmit={() => {}}
@@ -677,17 +686,15 @@ The fix is to catch \`TokenExpiredError\` specifically and attempt a refresh bef
677
686
  pillPlacement="start"
678
687
  hasDivider
679
688
  label="Resize artifact panel"
680
- xstyle={styles.resizeHandle}
689
+ className="ai-chat-resize-handle"
681
690
  />
682
691
 
683
692
  {/* Toolbar as the card header, body below */}
684
693
  <Card
685
694
  variant="transparent"
686
695
  height="100%"
687
- xstyle={[
688
- styles.artifactPanel,
689
- dynamicStyles.artifactPanelWidth(artifactResize.size),
690
- ]}>
696
+ className="ai-chat-artifact-panel"
697
+ style={artifactPanelWidthVar(artifactResize.size)}>
691
698
  <Toolbar
692
699
  label="Artifact actions"
693
700
  dividers={['bottom']}
@@ -2,9 +2,7 @@
2
2
 
3
3
  'use client';
4
4
 
5
- import {useRef, useState} from 'react';
6
- import * as stylex from '@stylexjs/stylex';
7
- import {spacingVars} from '@astryxdesign/core/theme/tokens.stylex';
5
+ import {useRef, useState, type CSSProperties} from 'react';
8
6
 
9
7
  import {Layout, LayoutContent, VStack, HStack} from '@astryxdesign/core/Layout';
10
8
  import {Text, Heading} from '@astryxdesign/core/Text';
@@ -40,12 +38,10 @@ import {
40
38
  LightBulbIcon,
41
39
  } from '@heroicons/react/24/outline';
42
40
 
43
- const styles = stylex.create({
44
- // Fill the content area so the greeting and composer stay vertically centered.
45
- page: {minHeight: '100%'},
46
- composerInput: {minHeight: 84},
47
- categories: {paddingInline: spacingVars['--spacing-3']},
48
- });
41
+ // Fill the content area so the greeting and composer stay vertically centered.
42
+ const pageStyle: CSSProperties = {minHeight: '100%'};
43
+ const composerInput: CSSProperties = {minHeight: 84};
44
+ const categories: CSSProperties = {paddingInline: 'var(--spacing-3)'};
49
45
 
50
46
  // Suggestion cards shown once a category is selected.
51
47
  const CATEGORY_SUGGESTIONS: Record<
@@ -311,7 +307,7 @@ export default function AIChatTemplate() {
311
307
  padding={6}
312
308
  content={
313
309
  <LayoutContent>
314
- <VStack gap={8} vAlign="center" xstyle={styles.page}>
310
+ <VStack gap={8} vAlign="center" style={pageStyle}>
315
311
  {/* Greeting */}
316
312
  <VStack gap={1}>
317
313
  <HStack gap={2} vAlign="center">
@@ -333,7 +329,7 @@ export default function AIChatTemplate() {
333
329
  <ChatComposerInput
334
330
  handleRef={composerInputRef}
335
331
  triggers={composerTriggers}
336
- xstyle={styles.composerInput}
332
+ style={composerInput}
337
333
  onFiles={files =>
338
334
  setAttachments(prev => [...prev, ...files.map(f => f.name)])
339
335
  }
@@ -435,7 +431,7 @@ export default function AIChatTemplate() {
435
431
  />
436
432
 
437
433
  {/* Category filters + suggestion cards */}
438
- <VStack gap={6} xstyle={styles.categories}>
434
+ <VStack gap={6} style={categories}>
439
435
  <ToggleButtonGroup
440
436
  label="Category"
441
437
  value={category}
@@ -2,7 +2,7 @@
2
2
 
3
3
  'use client';
4
4
 
5
- import * as stylex from '@stylexjs/stylex';
5
+ import type {CSSProperties} from 'react';
6
6
  import {
7
7
  VStack,
8
8
  HStack,
@@ -19,18 +19,16 @@ import {ArrowRightIcon} from '@heroicons/react/20/solid';
19
19
  const IMAGE_URL =
20
20
  'https://lookaside.facebook.com/assets/astryx/light-scene-horizontal-1.png';
21
21
 
22
- const styles = stylex.create({
23
- heroImage: {
24
- width: '100%',
25
- height: '100%',
26
- objectFit: 'cover',
27
- },
28
- heroFrame: {
29
- maxWidth: 1200,
30
- marginInline: 'auto',
31
- borderRadius: 'var(--radius-page)',
32
- },
33
- });
22
+ const heroImage: CSSProperties = {
23
+ width: '100%',
24
+ height: '100%',
25
+ objectFit: 'cover',
26
+ };
27
+ const heroFrame: CSSProperties = {
28
+ maxWidth: 1200,
29
+ marginInline: 'auto',
30
+ borderRadius: 'var(--radius-page)',
31
+ };
34
32
 
35
33
  export default function CenteredHero() {
36
34
  return (
@@ -68,9 +66,9 @@ export default function CenteredHero() {
68
66
  </HStack>
69
67
  </VStack>
70
68
  <Section variant="transparent" padding={0}>
71
- <AspectRatio ratio={16 / 9} xstyle={styles.heroFrame}>
69
+ <AspectRatio ratio={16 / 9} style={heroFrame}>
72
70
  <img
73
- {...stylex.props(styles.heroImage)}
71
+ style={heroImage}
74
72
  src={IMAGE_URL}
75
73
  alt="A bright, colorful lifestyle scene"
76
74
  />
@@ -2,41 +2,38 @@
2
2
 
3
3
  'use client';
4
4
 
5
- import {useState} from 'react';
5
+ import {useState, type CSSProperties} from 'react';
6
6
  import {VStack, Layout, LayoutContent} from '@astryxdesign/core/Layout';
7
7
  import {Center} from '@astryxdesign/core/Center';
8
8
  import {Text, Heading} from '@astryxdesign/core/Text';
9
9
  import {Grid} from '@astryxdesign/core/Grid';
10
10
  import {Section} from '@astryxdesign/core/Section';
11
11
  import {TabList, Tab} from '@astryxdesign/core/TabList';
12
- import * as stylex from '@stylexjs/stylex';
13
12
 
14
13
  // ─── Styles ─────────────────────────────────────────────────────────────────
15
14
 
16
- const styles = stylex.create({
17
- outer: {
18
- maxWidth: 1200,
19
- width: '100%',
20
- paddingInline: 'var(--spacing-6)',
21
- paddingBlock: 'var(--spacing-8)',
22
- },
23
- imageWrapper: {
24
- position: 'relative',
25
- aspectRatio: '3/2',
26
- borderRadius: 'var(--radius-container)',
27
- overflow: 'clip',
28
- },
29
- textCenter: {
30
- textAlign: 'center',
31
- },
32
- imgFill: {
33
- position: 'absolute',
34
- inset: 0,
35
- width: '100%',
36
- height: '100%',
37
- objectFit: 'cover',
38
- },
39
- });
15
+ const outer: CSSProperties = {
16
+ maxWidth: 1200,
17
+ width: '100%',
18
+ paddingInline: 'var(--spacing-6)',
19
+ paddingBlock: 'var(--spacing-8)',
20
+ };
21
+ const imageWrapper: CSSProperties = {
22
+ position: 'relative',
23
+ aspectRatio: '3/2',
24
+ borderRadius: 'var(--radius-container)',
25
+ overflow: 'clip',
26
+ };
27
+ const textCenter: CSSProperties = {
28
+ textAlign: 'center',
29
+ };
30
+ const imgFill: CSSProperties = {
31
+ position: 'absolute',
32
+ inset: 0,
33
+ width: '100%',
34
+ height: '100%',
35
+ objectFit: 'cover',
36
+ };
40
37
 
41
38
  // ─── Gallery Data ───────────────────────────────────────────────────────────
42
39
 
@@ -117,11 +114,11 @@ export default function ClassicGalleryTemplate() {
117
114
  content={
118
115
  <LayoutContent padding={0}>
119
116
  <Center axis="horizontal">
120
- <VStack gap={8} xstyle={styles.outer}>
117
+ <VStack gap={8} style={outer}>
121
118
  {/* Header */}
122
119
  <Center axis="horizontal">
123
120
  <Section variant="transparent" maxWidth={680} padding={0}>
124
- <VStack gap={4} hAlign="center" xstyle={styles.textCenter}>
121
+ <VStack gap={4} hAlign="center" style={textCenter}>
125
122
  <VStack gap={2} hAlign="center">
126
123
  <Heading level={1}>
127
124
  Make every day a little more delightful, one detail at a
@@ -150,12 +147,8 @@ export default function ClassicGalleryTemplate() {
150
147
  {/* Gallery Grid */}
151
148
  <Grid columns={{minWidth: 260, repeat: 'fit'}} gap={4}>
152
149
  {filteredImages.map((image, i) => (
153
- <div key={i} {...stylex.props(styles.imageWrapper)}>
154
- <img
155
- src={image.src}
156
- alt={image.alt}
157
- {...stylex.props(styles.imgFill)}
158
- />
150
+ <div key={i} style={imageWrapper}>
151
+ <img src={image.src} alt={image.alt} style={imgFill} />
159
152
  </div>
160
153
  ))}
161
154
  </Grid>
@@ -41,26 +41,26 @@ import {
41
41
  } from '@heroicons/react/24/outline';
42
42
 
43
43
  // ─── Styles ─────────────────────────────────────────────────────────────────
44
- import * as stylex from '@stylexjs/stylex';
44
+ import type {CSSProperties} from 'react';
45
45
 
46
46
  // The only custom CSS in this template is small optical-alignment negative
47
47
  // margins: LayoutHeader/TabList have no edge-dock prop (#2622) and List
48
48
  // has no "bleed to container edge" prop (#2626). Everything else uses props.
49
- const pageStyles = stylex.create({
50
- // Bleed the tab bar to the header's content edges so the active-tab underline
51
- // meets the header divider. No edge-dock prop on TabList (#2622).
52
- tabsRow: {
53
- marginInline: -12,
54
- marginBottom: -16,
55
- marginTop: 12,
56
- },
57
- // Pull the list items' inner padding back so their content optically aligns
58
- // with the section heading above (ListItem insets content by ~8px). No
59
- // edge/inset prop on List (#2626).
60
- itemsList: {
61
- marginInline: -8,
62
- },
63
- });
49
+ // Plain inline styles — no StyleX compiler required.
50
+
51
+ // Bleed the tab bar to the header's content edges so the active-tab underline
52
+ // meets the header divider. No edge-dock prop on TabList (#2622).
53
+ const tabsRow: CSSProperties = {
54
+ marginInline: -12,
55
+ marginBottom: -16,
56
+ marginTop: 12,
57
+ };
58
+ // Pull the list items' inner padding back so their content optically aligns
59
+ // with the section heading above (ListItem insets content by ~8px). No
60
+ // edge/inset prop on List (#2626).
61
+ const itemsList: CSSProperties = {
62
+ marginInline: -8,
63
+ };
64
64
 
65
65
  // ─── Product data ───────────────────────────────────────────────────────────
66
66
  const PRODUCT_IMAGES = [
@@ -258,7 +258,7 @@ function PageHeader({
258
258
  </HStack>
259
259
  )}
260
260
 
261
- <HStack vAlign="center" xstyle={pageStyles.tabsRow}>
261
+ <HStack vAlign="center" style={tabsRow}>
262
262
  <StackItem size="fill">
263
263
  <TabList value={activeTab} onChange={onTabChange} size="lg">
264
264
  <Tab value="details" label="Details" />
@@ -305,7 +305,7 @@ function ItemsCard() {
305
305
  </HStack>
306
306
  </HStack>
307
307
 
308
- <List density="spacious" xstyle={pageStyles.itemsList}>
308
+ <List density="spacious" style={itemsList}>
309
309
  {PRODUCTS.map((product, i) => (
310
310
  <ListItem
311
311
  key={i}