An open source design system that's fully customizable and agent ready
TypeScript
feat(cli): make page + block templates render without a StyleX compiler (#3102)
Joey9c16d985ddc6
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellContentOnly.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellContentOnly.tsxindex b240df4b31..04f6ce87e5 100644--- a/packages/cli/templates/blocks/components/AppShell/AppShellContentOnly.tsx+++ b/packages/cli/templates/blocks/components/AppShell/AppShellContentOnly.tsx@@ -5,18 +5,10 @@import {AppShell} from '@astryxdesign/core/AppShell';import {VStack} from '@astryxdesign/core/Stack';import {Heading, Text} from '@astryxdesign/core/Text';-import stylex from '@stylexjs/stylex';--const styles = stylex.create({- fit: {- height: '100%',- minHeight: 0,- },-});export default function AppShellContentOnly() {return (- <AppShell contentPadding={6} xstyle={styles.fit}>+ <AppShell contentPadding={6} style={{height: '100%', minHeight: 0}}><VStack gap={4}><Heading level={3}>Page Content</Heading><Text type="body">diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellShowcase.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellShowcase.tsxindex 62e6a02b8e..530ddc037b 100644--- a/packages/cli/templates/blocks/components/AppShell/AppShellShowcase.tsx+++ b/packages/cli/templates/blocks/components/AppShell/AppShellShowcase.tsx@@ -19,21 +19,12 @@ import {} from '@heroicons/react/24/outline';import {HomeIcon} from '@heroicons/react/24/solid';import {CubeIcon} from '@heroicons/react/24/outline';-import stylex from '@stylexjs/stylex';--const styles = stylex.create({- fit: {- height: '100%',- minHeight: 0,- width: '100%',- },-});export default function AppShellShowcase() {return (<AppShellcontentPadding={6}- xstyle={styles.fit}+ style={{height: '100%', minHeight: 0, width: '100%'}}sideNav={<SideNavheader={diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.tsxindex 5095f5e724..cb0bb43020 100644--- a/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx+++ b/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx@@ -20,20 +20,12 @@ import {} from '@heroicons/react/24/outline';import {HomeIcon} from '@heroicons/react/24/solid';import {CubeIcon} from '@heroicons/react/24/outline';-import stylex from '@stylexjs/stylex';--const styles = stylex.create({- fit: {- height: '100%',- minHeight: 0,- },-});export default function AppShellSideNavOnly() {return (<AppShellcontentPadding={6}- xstyle={styles.fit}+ style={{height: '100%', minHeight: 0}}sideNav={<SideNavheader={diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.tsxindex d1f302fb81..402dc1075f 100644--- a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx+++ b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx@@ -8,20 +8,12 @@ import {Heading, Text} from '@astryxdesign/core/Text';import {TopNav, TopNavHeading, TopNavItem} from '@astryxdesign/core/TopNav';import {NavIcon} from '@astryxdesign/core/NavIcon';import {CubeIcon} from '@heroicons/react/24/outline';-import stylex from '@stylexjs/stylex';--const styles = stylex.create({- fit: {- height: '100%',- minHeight: 0,- },-});export default function AppShellTopNavOnly() {return (<AppShellcontentPadding={6}- xstyle={styles.fit}+ style={{height: '100%', minHeight: 0}}topNav={<TopNavlabel="Main navigation"diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsxindex 2748e84272..b7b29a3d29 100644--- a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx+++ b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx@@ -16,20 +16,12 @@ import {} from '@heroicons/react/24/outline';import {HomeIcon} from '@heroicons/react/24/solid';import {CubeIcon} from '@heroicons/react/24/outline';-import stylex from '@stylexjs/stylex';--const styles = stylex.create({- fit: {- height: '100%',- minHeight: 0,- },-});export default function AppShellTopNavWithSideNav() {return (<AppShellcontentPadding={6}- xstyle={styles.fit}+ style={{height: '100%', minHeight: 0}}topNav={<TopNavlabel="Main navigation"diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellWithBanner.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellWithBanner.tsxindex 195870e80d..c66dea91aa 100644--- a/packages/cli/templates/blocks/components/AppShell/AppShellWithBanner.tsx+++ b/packages/cli/templates/blocks/components/AppShell/AppShellWithBanner.tsx@@ -17,20 +17,12 @@ import {} from '@heroicons/react/24/outline';import {HomeIcon} from '@heroicons/react/24/solid';import {CubeIcon} from '@heroicons/react/24/outline';-import stylex from '@stylexjs/stylex';--const styles = stylex.create({- fit: {- height: '100%',- minHeight: 0,- },-});export default function AppShellWithBanner() {return (<AppShellcontentPadding={6}- xstyle={styles.fit}+ style={{height: '100%', minHeight: 0}}topNav={<TopNavlabel="Main navigation"diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsxindex 9527fc9469..a018e6e037 100644--- a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx+++ b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx@@ -2,26 +2,9 @@'use client';-import * as stylex from '@stylexjs/stylex';import {AspectRatio} from '@astryxdesign/core/AspectRatio';import {HStack, VStack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';-import {radiusVars} from '@astryxdesign/core/theme/tokens.stylex';--const s = stylex.create({- // Fixed height with auto width lets the aspect ratio drive the width,- // so all three containers share the same height but differ in width.- ratioBox: {- height: 120,- width: 'auto',- borderRadius: radiusVars['--radius-container'],- },- image: {- width: '100%',- height: '100%',- objectFit: 'cover',- },-});const items = [{@@ -49,8 +32,18 @@ export default function AspectRatioShowcase() {<HStack gap={4} vAlign="start">{items.map(({ratio, label, src, alt}) => (<VStack key={label} gap={2} hAlign="center">- <AspectRatio ratio={ratio} xstyle={s.ratioBox}>- <img src={src} alt={alt} {...stylex.props(s.image)} />+ <AspectRatio+ ratio={ratio}+ style={{+ height: 120,+ width: 'auto',+ borderRadius: 'var(--radius-container)',+ }}>+ <img+ src={src}+ alt={alt}+ style={{width: '100%', height: '100%', objectFit: 'cover'}}+ /></AspectRatio><Text type="supporting" color="secondary">{label}diff --git a/packages/cli/templates/blocks/components/Banner/BannerShowcase.tsx b/packages/cli/templates/blocks/components/Banner/BannerShowcase.tsxindex d8c7f3969c..a7d513e5d3 100644--- a/packages/cli/templates/blocks/components/Banner/BannerShowcase.tsx+++ b/packages/cli/templates/blocks/components/Banner/BannerShowcase.tsx@@ -4,17 +4,10 @@import {Banner} from '@astryxdesign/core/Banner';import {Stack} from '@astryxdesign/core/Layout';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- root: {- maxWidth: 800,- },-});export default function BannerShowcase() {return (- <Stack direction="vertical" gap={3} xstyle={styles.root}>+ <Stack direction="vertical" gap={3} style={{maxWidth: 800}}><Banner status="info" title="A new software update is available." /><Banner status="success" title="Your changes have been saved." /><Bannerdiff --git a/packages/cli/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx b/packages/cli/templates/blocks/components/Blockquote/BlockquoteShowcase.tsxindex a9a40ecf7a..da887feffb 100644--- a/packages/cli/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx+++ b/packages/cli/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx@@ -4,17 +4,10 @@import {Blockquote} from '@astryxdesign/core/Blockquote';import {Stack} from '@astryxdesign/core/Layout';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- root: {- width: 500,- },-});export default function BlockquoteShowcase() {return (- <Stack direction="vertical" gap={4} xstyle={styles.root}>+ <Stack direction="vertical" gap={4} style={{width: 500}}><Blockquote>Design is not just what it looks like and feels like. Design is how itworks.diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselShowcase.tsx b/packages/cli/templates/blocks/components/Carousel/CarouselShowcase.tsxindex 5bf4a243f1..77085094b1 100644--- a/packages/cli/templates/blocks/components/Carousel/CarouselShowcase.tsx+++ b/packages/cli/templates/blocks/components/Carousel/CarouselShowcase.tsx@@ -6,16 +6,6 @@ import {Carousel} from '@astryxdesign/core/Carousel';import {Card} from '@astryxdesign/core/Card';import {Stack} from '@astryxdesign/core/Layout';import {Text, Heading} from '@astryxdesign/core/Text';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- root: {- maxWidth: 500,- },- card: {- minWidth: 200,- },-});const ITEMS = [{title: 'Design', body: 'Create wireframes and prototypes.'},@@ -32,9 +22,9 @@ export default function CarouselShowcase() {hasSnaphasButtons={false}aria-label="Workflow steps"- xstyle={styles.root}>+ style={{maxWidth: 500}}>{ITEMS.map(item => (- <Card key={item.title} padding={3} xstyle={styles.card}>+ <Card key={item.title} padding={3} style={{minWidth: 200}}><Stack direction="vertical" gap={1}><Heading level={5}>{item.title}</Heading><Text type="supporting" color="secondary">diff --git a/packages/cli/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsx b/packages/cli/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsxindex e4c9674f4b..588debe32e 100644--- a/packages/cli/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsx+++ b/packages/cli/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsx@@ -8,15 +8,12 @@ import {Button} from '@astryxdesign/core/Button';import {Icon} from '@astryxdesign/core/Icon';import {Stack} from '@astryxdesign/core/Layout';import {PaperClipIcon} from '@heroicons/react/24/outline';-import * as stylex from '@stylexjs/stylex';-import {colorVars, borderVars, radiusVars} from '@astryxdesign/core/theme/tokens.stylex';+import type {CSSProperties} from 'react';-const styles = stylex.create({- drawerBorder: {- border: `${borderVars['--border-width']} solid ${colorVars['--color-border']}`,- borderRadius: radiusVars['--radius-chat'],- },-});+const drawerBorder: CSSProperties = {+ border: 'var(--border-width) solid var(--color-border)',+ borderRadius: 'var(--radius-chat)',+};export default function ChatComposerDrawerShowcase() {return (@@ -27,7 +24,7 @@ export default function ChatComposerDrawerShowcase() {<ChatComposerDrawercount={4}label="Attachments"- xstyle={styles.drawerBorder}>+ style={drawerBorder}><Token label="design-spec.pdf" onRemove={() => {}} /><Token label="api-schema.json" onRemove={() => {}} /><Token label="screenshot.png" onRemove={() => {}} />diff --git a/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsxindex ac7a839f5b..d9a39406f5 100644--- a/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx+++ b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx@@ -11,21 +11,19 @@ import {ChatComposer,} from '@astryxdesign/core/Chat';import {Markdown} from '@astryxdesign/core/Markdown';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- panel: {- width: 450,- height: 600,- borderRadius: 8,- overflow: 'hidden',- border: '1px solid var(--color-border)',- },-});+import type {CSSProperties} from 'react';++const panel: CSSProperties = {+ width: 450,+ height: 600,+ borderRadius: 8,+ overflow: 'hidden',+ border: '1px solid var(--color-border)',+};export default function ChatLayoutPanelChat() {return (- <div {...stylex.props(styles.panel)}>+ <div style={panel}><ChatLayoutcomposer={<ChatComposer onSubmit={() => {}} placeholder="Ask something..." />diff --git a/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListDensity.tsx b/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListDensity.tsxindex 440f9fd947..25b3faf29e 100644--- a/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListDensity.tsx+++ b/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListDensity.tsx@@ -12,14 +12,6 @@ import {Text} from '@astryxdesign/core/Text';import {Avatar} from '@astryxdesign/core/Avatar';import {Divider} from '@astryxdesign/core/Divider';import {Fragment} from 'react';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- section: {- flex: 1,- minHeight: 0,- },-});const DENSITIES = ['compact', 'balanced', 'spacious'] as const;@@ -39,7 +31,7 @@ export default function ChatMessageListDensity() {<Text type="supporting" color="secondary">{density.charAt(0).toUpperCase() + density.slice(1)}</Text>- <VStack xstyle={styles.section}>+ <VStack style={{flex: 1, minHeight: 0}}><ChatMessageList density={density}><ChatMessage sender="user"><ChatMessageBubble>diff --git a/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListFullFeatured.tsx b/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListFullFeatured.tsxindex 5d404f812c..48c56876b6 100644--- a/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListFullFeatured.tsx+++ b/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListFullFeatured.tsx@@ -15,18 +15,10 @@ import {Markdown} from '@astryxdesign/core/Markdown';import {CodeBlock} from '@astryxdesign/core/CodeBlock';import {Timestamp} from '@astryxdesign/core/Timestamp';import {Token} from '@astryxdesign/core/Token';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- container: {- maxWidth: 500,- justifyContent: 'center',- },-});export default function ChatMessageListFullFeatured() {return (- <VStack xstyle={styles.container}>+ <VStack style={{maxWidth: 500, justifyContent: 'center'}}><ChatMessageList><ChatSystemMessage variant="divider">Today</ChatSystemMessage>diff --git a/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListShowcase.tsx b/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListShowcase.tsxindex 844349f5e6..e27d32faca 100644--- a/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListShowcase.tsx+++ b/packages/cli/templates/blocks/components/ChatMessageList/ChatMessageListShowcase.tsx@@ -11,18 +11,10 @@ import {} from '@astryxdesign/core/Chat';import {VStack} from '@astryxdesign/core/Layout';import {Timestamp} from '@astryxdesign/core/Timestamp';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- container: {- maxWidth: 600,- height: '100%',- },-});export default function ChatMessageListShowcase() {return (- <VStack xstyle={styles.container}>+ <VStack style={{maxWidth: 600, height: '100%'}}><ChatMessageList density="balanced"><ChatSystemMessage variant="divider">March 15, 2026diff --git a/packages/cli/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx b/packages/cli/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsxindex ac27e0ca07..bddd2e2ef1 100644--- a/packages/cli/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx+++ b/packages/cli/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx@@ -2,7 +2,6 @@'use client';-import * as stylex from '@stylexjs/stylex';import {ChatMessageList,ChatMessage,@@ -21,15 +20,9 @@ import {HandThumbDownIcon,} from '@heroicons/react/24/outline';-const styles = stylex.create({- container: {- maxWidth: 600,- },-});-export default function ChatMessageMetadataShowcase() {return (- <VStack xstyle={styles.container}>+ <VStack style={{maxWidth: 600}}><ChatMessageList><ChatMessage sender="assistant"><ChatMessageBubblediff --git a/packages/cli/templates/blocks/components/ChatSendButton/ChatSendButtonInComposer.tsx b/packages/cli/templates/blocks/components/ChatSendButton/ChatSendButtonInComposer.tsxindex 026d79ab7d..1647b4b3a5 100644--- a/packages/cli/templates/blocks/components/ChatSendButton/ChatSendButtonInComposer.tsx+++ b/packages/cli/templates/blocks/components/ChatSendButton/ChatSendButtonInComposer.tsx@@ -2,19 +2,12 @@'use client';-import * as stylex from '@stylexjs/stylex';import {ChatComposer} from '@astryxdesign/core/Chat';import {Stack} from '@astryxdesign/core/Layout';-const styles = stylex.create({- root: {- maxWidth: 450,- },-});-export default function ChatSendButtonInComposer() {return (- <Stack direction="vertical" width="100%" xstyle={styles.root}>+ <Stack direction="vertical" width="100%" style={{maxWidth: 450}}><ChatComposeronSubmit={() => {}}value="Hello, how can you help?"diff --git a/packages/cli/templates/blocks/components/Citation/CitationInlineText.tsx b/packages/cli/templates/blocks/components/Citation/CitationInlineText.tsxindex 95c1d08be9..e0786dfb94 100644--- a/packages/cli/templates/blocks/components/Citation/CitationInlineText.tsx+++ b/packages/cli/templates/blocks/components/Citation/CitationInlineText.tsx@@ -25,12 +25,12 @@ export default function CitationInlineText() {.</Text><Text type="body">- StyleX compiles atomic CSS at build time for optimal performance+ TypeScript adds static types to JavaScript for safer refactoring<Citationsource={{- title: 'StyleX Documentation',- url: 'https://stylexjs.com',- icon: 'https://stylexjs.com/img/favicon.ico',+ title: 'TypeScript Documentation',+ url: 'https://www.typescriptlang.org',+ icon: 'https://www.typescriptlang.org/favicon-32x32.png',}}number={3}variant="label"diff --git a/packages/cli/templates/blocks/components/Code/CodeInlineInParagraph.tsx b/packages/cli/templates/blocks/components/Code/CodeInlineInParagraph.tsxindex 410fd4c7dd..c6592560ce 100644--- a/packages/cli/templates/blocks/components/Code/CodeInlineInParagraph.tsx+++ b/packages/cli/templates/blocks/components/Code/CodeInlineInParagraph.tsx@@ -4,17 +4,10 @@import {Code} from '@astryxdesign/core/CodeBlock';import {Text} from '@astryxdesign/core/Text';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- root: {- maxWidth: 400,- },-});export default function CodeInlineInParagraph() {return (- <Text type="body" xstyle={styles.root}>Use <Code>useState</Code>for local state and{' '}+ <Text type="body" style={{maxWidth: 400}}>Use <Code>useState</Code>for local state and{' '}<Code>useEffect</Code>for side effects. If you need shared stateacross components, consider <Code>useContext</Code>or a statemanagement library.diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsxindex ef854a6acc..e7dc068502 100644--- a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx@@ -15,7 +15,7 @@ export default function CodeBlockBashCommand() {style={{width: '100%'}}/><CodeBlock- code="yarn add @stylexjs/stylex"+ code="yarn add @astryxdesign/theme-neutral"language="bash"hasCopyButtonstyle={{width: '100%'}}diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsxindex 9439b62d16..d935950919 100644--- a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx@@ -8,7 +8,7 @@ const code = `{"name": "@astryxdesign/core","version": "0.0.5","dependencies": {- "@stylexjs/stylex": "^0.17.5",+ "@astryxdesign/theme-neutral": "^0.1.0","react": "^19.0.0"},"scripts": {diff --git a/packages/cli/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsx b/packages/cli/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsxindex 616d259e51..d9d35a23a4 100644--- a/packages/cli/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsx+++ b/packages/cli/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsx@@ -2,7 +2,7 @@'use client';-import {useMemo} from 'react';+import {useMemo, type CSSProperties} from 'react';import {CommandPalette,CommandPaletteList,@@ -14,13 +14,10 @@ import {Icon} from '@astryxdesign/core/Icon';import {createStaticSource} from '@astryxdesign/core/Typeahead';import {Stack} from '@astryxdesign/core/Layout';import type {SearchableItem} from '@astryxdesign/core/Typeahead';-import * as stylex from '@stylexjs/stylex';-const styles = stylex.create({- itemLabel: {- flexGrow: 1,- },-});+const itemLabel: CSSProperties = {+ flexGrow: 1,+};type CommandItem = SearchableItem<{shortcut?: string}>;@@ -48,7 +45,7 @@ export default function CommandPaletteItemShowcase() {searchSource={source}renderItem={(item: CommandItem) => (<>- <Text type="body" xstyle={styles.itemLabel}>+ <Text type="body" style={itemLabel}>{item.label}</Text>{item.auxiliaryData?.shortcut && (@@ -65,18 +62,18 @@ export default function CommandPaletteItemShowcase() {<CommandPaletteList><CommandPaletteItem value="home" onSelect={() => {}}><Icon icon="externalLink" size="sm" />- <Text type="body" xstyle={styles.itemLabel}>Home</Text>+ <Text type="body" style={itemLabel}>Home</Text></CommandPaletteItem><CommandPaletteItem value="search" isHighlighted onSelect={() => {}}><Icon icon="search" size="sm" />- <Text type="body" xstyle={styles.itemLabel}>Search (highlighted)</Text>+ <Text type="body" style={itemLabel}>Search (highlighted)</Text></CommandPaletteItem><CommandPaletteItem value="selected" isSelected onSelect={() => {}}><Icon icon="check" size="sm" />- <Text type="body" xstyle={styles.itemLabel}>Selected item</Text>+ <Text type="body" style={itemLabel}>Selected item</Text></CommandPaletteItem><CommandPaletteItem value="disabled" isDisabled>- <Text type="body" xstyle={styles.itemLabel}>Disabled item</Text>+ <Text type="body" style={itemLabel}>Disabled item</Text></CommandPaletteItem></CommandPaletteList></Stack>diff --git a/packages/cli/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx b/packages/cli/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsxindex a2a864cb14..3280c57414 100644--- a/packages/cli/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx+++ b/packages/cli/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx@@ -1,22 +1,8 @@// Copyright (c) Meta Platforms, Inc. and affiliates.'use client';-import * as stylex from '@stylexjs/stylex';import {ContextMenu} from '@astryxdesign/core/ContextMenu';-const styles = stylex.create({- area: {- padding: '48px',- borderWidth: '2px',- borderStyle: 'dashed',- borderColor: '#d1d5db',- borderRadius: '8px',- textAlign: 'center',- color: '#6b7280',- userSelect: 'none',- },-});-export default function ContextMenuShowcase() {return (<ContextMenu@@ -25,7 +11,19 @@ export default function ContextMenuShowcase() {{label: 'Copy', onClick: () => {}},{label: 'Paste', onClick: () => {}},]}>- <div {...stylex.props(styles.area)}>Right-click this area</div>+ <div+ style={{+ padding: '48px',+ borderWidth: '2px',+ borderStyle: 'dashed',+ borderColor: '#d1d5db',+ borderRadius: '8px',+ textAlign: 'center',+ color: '#6b7280',+ userSelect: 'none',+ }}>+ Right-click this area+ </div></ContextMenu>);}diff --git a/packages/cli/templates/blocks/components/Divider/DividerShowcase.tsx b/packages/cli/templates/blocks/components/Divider/DividerShowcase.tsxindex 99866f0add..8868f6fb17 100644--- a/packages/cli/templates/blocks/components/Divider/DividerShowcase.tsx+++ b/packages/cli/templates/blocks/components/Divider/DividerShowcase.tsx@@ -4,17 +4,10 @@import {Divider} from '@astryxdesign/core/Divider';import {Stack} from '@astryxdesign/core/Layout';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- root: {- width: 500,- },-});export default function DividerShowcase() {return (- <Stack direction="vertical" gap={4} xstyle={styles.root}>+ <Stack direction="vertical" gap={4} style={{width: 500}}><Divider variant="subtle" /><Divider variant="strong" /><Divider label="or" />diff --git a/packages/cli/templates/blocks/components/Divider/DividerVertical.tsx b/packages/cli/templates/blocks/components/Divider/DividerVertical.tsxindex 8c83b00395..fd8f478cb8 100644--- a/packages/cli/templates/blocks/components/Divider/DividerVertical.tsx+++ b/packages/cli/templates/blocks/components/Divider/DividerVertical.tsx@@ -2,19 +2,17 @@'use client';-import * as stylex from '@stylexjs/stylex';+import type {CSSProperties} from 'react';import {Divider} from '@astryxdesign/core/Divider';import {Card} from '@astryxdesign/core/Card';import {Section} from '@astryxdesign/core/Section';import {HStack, VStack, StackItem} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';-const styles = stylex.create({- dividerFill: {- alignSelf: 'stretch',- height: 'auto',- },-});+const dividerFill: CSSProperties = {+ alignSelf: 'stretch',+ height: 'auto',+};export default function DividerVertical() {return (@@ -30,7 +28,7 @@ export default function DividerVertical() {</Text></VStack></StackItem>- <Divider orientation="vertical" xstyle={styles.dividerFill} />+ <Divider orientation="vertical" style={dividerFill} /><StackItem size="fill"><VStack gap={1}><Text type="label">Users</Text>@@ -40,7 +38,7 @@ export default function DividerVertical() {</Text></VStack></StackItem>- <Divider orientation="vertical" xstyle={styles.dividerFill} />+ <Divider orientation="vertical" style={dividerFill} /><StackItem size="fill"><VStack gap={1}><Text type="label">Conversion</Text>diff --git a/packages/cli/templates/blocks/components/Field/FieldShowcase.tsx b/packages/cli/templates/blocks/components/Field/FieldShowcase.tsxindex cb0485c748..525d41f6ae 100644--- a/packages/cli/templates/blocks/components/Field/FieldShowcase.tsx+++ b/packages/cli/templates/blocks/components/Field/FieldShowcase.tsx@@ -6,13 +6,6 @@ import {useState} from 'react';import {Field} from '@astryxdesign/core/Field';import {TextInput} from '@astryxdesign/core/TextInput';import {Stack} from '@astryxdesign/core/Layout';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- root: {- width: 320,- },-});export default function FieldShowcase() {const [email, setEmail] = useState('');@@ -23,7 +16,7 @@ export default function FieldShowcase() {: undefined;return (- <Stack direction="vertical" gap={3} xstyle={styles.root}>+ <Stack direction="vertical" gap={3} style={{width: 320}}><Fieldlabel="Email"inputID="field-email"diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx b/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsxindex 8bbdf5535a..89197ff166 100644--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx+++ b/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx@@ -3,20 +3,15 @@'use client';import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';import {FormLayout} from '@astryxdesign/core/FormLayout';import {TextInput} from '@astryxdesign/core/TextInput';-const styles = stylex.create({- layout: {width: '100%', maxWidth: 400},-});-export default function FormLayoutHorizontal() {const [first, setFirst] = useState('Jordan');const [last, setLast] = useState('Rivera');return (- <FormLayout direction="horizontal" xstyle={styles.layout}>+ <FormLayout direction="horizontal" style={{width: '100%', maxWidth: 400}}><TextInput label="First Name" value={first} onChange={setFirst} /><TextInput label="Last Name" value={last} onChange={setLast} /></FormLayout>diff --git a/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx b/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.tsxindex 543cbad142..1082eafc22 100644--- a/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx+++ b/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx@@ -2,20 +2,12 @@'use client';-import {spacingVars} from '@astryxdesign/core/theme/tokens.stylex';import {Grid} from '@astryxdesign/core/Grid';import {Card} from '@astryxdesign/core/Card';import {Layout, LayoutContent, LayoutPanel} from '@astryxdesign/core/Layout';import {useResizable, ResizeHandle} from '@astryxdesign/core/Resizable';import {VStack} from '@astryxdesign/core/Stack';import {Text} from '@astryxdesign/core/Text';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- panel: {- padding: spacingVars['--spacing-4'],- },-});const teams = [{name: 'Design Systems', members: 8},@@ -47,7 +39,7 @@ export default function GridResponsiveAutoFit() {<LayoutPanelwidth={gridPanel.size}hasDivider={false}- xstyle={styles.panel}>+ style={{padding: 'var(--spacing-4)'}}><Gridcolumns={{minWidth: 180, repeat: 'fit'}}gap={4}diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsxindex 547b670f59..1eff4d412d 100644--- a/packages/cli/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx@@ -2,21 +2,19 @@'use client';-import * as stylex from '@stylexjs/stylex';+import type {CSSProperties} from 'react';import {HoverCard} from '@astryxdesign/core/HoverCard';import {VStack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';-const styles = stylex.create({- content: {maxWidth: 200},-});+const content: CSSProperties = {maxWidth: 200};export default function HoverCardInlineTextHoverCard() {return (<Text type="body">The component uses a{' '}<HoverCardcontent={- <VStack gap={1} xstyle={styles.content}>+ <VStack gap={1} style={content}><Text type="label">Focus trap</Text><Text type="body" color="secondary">A pattern that keeps keyboard focus inside a container, preventing@@ -30,7 +28,7 @@ export default function HoverCardInlineTextHoverCard() {</HoverCard>{' '}to keep keyboard navigation inside the{' '}<HoverCardcontent={- <VStack gap={1} xstyle={styles.content}>+ <VStack gap={1} style={content}><Text type="label">Modal dialog</Text><Text type="body" color="secondary">An overlay that blocks interaction with the rest of the page untildiff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsxindex 3edf5ba66e..172a12186b 100644--- a/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx@@ -2,24 +2,19 @@'use client';-import * as stylex from '@stylexjs/stylex';import {HoverCard} from '@astryxdesign/core/HoverCard';import {Icon} from '@astryxdesign/core/Icon';import {VStack, HStack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';import {LinkIcon} from '@heroicons/react/24/outline';-const styles = stylex.create({- content: {maxWidth: 280},-});-export default function HoverCardInteractiveContent() {return (<Text type="body">Read more in the{' '}<HoverCardplacement="below"content={- <VStack gap={2} xstyle={styles.content}>+ <VStack gap={2} style={{maxWidth: 280}}><HStack gap={2} vAlign="start"><Icon icon={LinkIcon} size="sm" color="secondary" /><VStack gap={1}>diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsxindex 15eb0b7770..8b8a69c1f2 100644--- a/packages/cli/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx@@ -2,7 +2,6 @@'use client';-import * as stylex from '@stylexjs/stylex';import {HoverCard} from '@astryxdesign/core/HoverCard';import {Avatar} from '@astryxdesign/core/Avatar';import {Button} from '@astryxdesign/core/Button';@@ -11,18 +10,13 @@ import {VStack, HStack} from '@astryxdesign/core/Layout';import {Text, Heading} from '@astryxdesign/core/Text';import {CalendarIcon} from '@heroicons/react/24/outline';-const styles = stylex.create({- avatar: {flexShrink: 0},- content: {maxWidth: 280},-});-export default function HoverCardProfileHoverCard() {return (<HoverCardplacement="below"content={- <HStack gap={3} vAlign="start" xstyle={styles.content}>- <Avatar name="Jane Doe" size={48} xstyle={styles.avatar} />+ <HStack gap={3} vAlign="start" style={{maxWidth: 280}}>+ <Avatar name="Jane Doe" size={48} style={{flexShrink: 0}} /><VStack gap={1}><Heading level={3}>@janedoe</Heading><Text type="body" color="secondary">diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardShowcase.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardShowcase.tsxindex 5b9924fc52..6a6209595b 100644--- a/packages/cli/templates/blocks/components/HoverCard/HoverCardShowcase.tsx+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardShowcase.tsx@@ -7,20 +7,13 @@ import {Button} from '@astryxdesign/core/Button';import {Stack} from '@astryxdesign/core/Layout';import {Text, Heading} from '@astryxdesign/core/Text';import {Avatar} from '@astryxdesign/core/Avatar';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- card: {- width: 240,- },-});export default function HoverCardShowcase() {return (<HoverCardplacement="above"content={- <Stack direction="vertical" gap={2} xstyle={styles.card}>+ <Stack direction="vertical" gap={2} style={{width: 240}}><Stack direction="horizontal" gap={2} vAlign="center"><Avatar name="Jane Doe" size="medium" /><Stack direction="vertical" gap={0}>diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsxindex d698da4c04..77230b2783 100644--- a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx+++ b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx@@ -15,20 +15,10 @@ import {ShareIcon,TrashIcon,} from '@heroicons/react/24/outline';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- card: {- marginTop: 100,- },- moreMenuWrapper: {- marginInlineEnd: 8,- },-});export default function MoreMenuInToolbar() {return (- <Card width="100%" height="100%" xstyle={styles.card}>+ <Card width="100%" height="100%" style={{marginTop: 100}}><Toolbarlabel="Project actions"size="sm"@@ -44,7 +34,7 @@ export default function MoreMenuInToolbar() {centerContent={<Heading level={5}>Title</Heading>}endContent={<>- <div {...stylex.props(styles.moreMenuWrapper)}>+ <div style={{marginInlineEnd: 8}}><MoreMenulabel="More actions"size="sm"diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsxindex 96ffb61045..ac8b97802f 100644--- a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx+++ b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx@@ -2,23 +2,20 @@'use client';-import * as stylex from '@stylexjs/stylex';import {OverflowList} from '@astryxdesign/core/OverflowList';import {Badge} from '@astryxdesign/core/Badge';import {Card} from '@astryxdesign/core/Card';-const styles = stylex.create({- resizable: {- resize: 'horizontal',- overflow: 'hidden',- minWidth: 80,- width: 300,- },-});-export default function OverflowListOverflowBadges() {return (- <Card padding={2} xstyle={styles.resizable}>+ <Card+ padding={2}+ style={{+ resize: 'horizontal',+ overflow: 'hidden',+ minWidth: 80,+ width: 300,+ }}><OverflowListgap={1}overflowRenderer={overflowItems => (diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsxindex 5d995cce0d..1a9c9d4931 100644--- a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx+++ b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx@@ -2,7 +2,6 @@'use client';-import * as stylex from '@stylexjs/stylex';import {OverflowList} from '@astryxdesign/core/OverflowList';import {Button} from '@astryxdesign/core/Button';import {DropdownMenu} from '@astryxdesign/core/DropdownMenu';@@ -10,19 +9,17 @@ import {Card} from '@astryxdesign/core/Card';const actions = ['Save', 'Edit', 'Duplicate', 'Share', 'Archive', 'Delete'];-const styles = stylex.create({- resizable: {- resize: 'horizontal',- overflow: 'hidden',- minWidth: 100,- width: 350,- maxWidth: '100%',- },-});-export default function OverflowListOverflowDropdownActions() {return (- <Card padding={2} xstyle={styles.resizable}>+ <Card+ padding={2}+ style={{+ resize: 'horizontal',+ overflow: 'hidden',+ minWidth: 100,+ width: 350,+ maxWidth: '100%',+ }}><OverflowListgap={2}overflowRenderer={overflowItems => (diff --git a/packages/cli/templates/blocks/components/Overlay/OverlayBottomStrip.tsx b/packages/cli/templates/blocks/components/Overlay/OverlayBottomStrip.tsxindex 057c7a988e..15be8de454 100644--- a/packages/cli/templates/blocks/components/Overlay/OverlayBottomStrip.tsx+++ b/packages/cli/templates/blocks/components/Overlay/OverlayBottomStrip.tsx@@ -2,27 +2,12 @@'use client';-import * as stylex from '@stylexjs/stylex';import {Overlay} from '@astryxdesign/core/Overlay';import {AspectRatio} from '@astryxdesign/core/AspectRatio';import {Badge} from '@astryxdesign/core/Badge';import {VStack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';-const styles = stylex.create({- frame: {- width: 420,- maxWidth: '100%',- borderRadius: 12,- overflow: 'clip',- },- image: {- width: '100%',- height: '100%',- objectFit: 'cover',- },-});-export default function OverlayBottomStrip() {return (<Overlay@@ -39,11 +24,13 @@ export default function OverlayBottomStrip() {</Text></VStack>}>- <AspectRatio ratio={16 / 9} xstyle={styles.frame}>+ <AspectRatio+ ratio={16 / 9}+ style={{width: 420, maxWidth: '100%', borderRadius: 12, overflow: 'clip'}}><imgsrc="https://lookaside.facebook.com/assets/astryx/illustrative-horizontal-1.png"alt="Product highlight preview"- {...stylex.props(styles.image)}+ style={{width: '100%', height: '100%', objectFit: 'cover'}}/></AspectRatio></Overlay>diff --git a/packages/cli/templates/blocks/components/Overlay/OverlayHoverReveal.tsx b/packages/cli/templates/blocks/components/Overlay/OverlayHoverReveal.tsxindex 8ca4b23fb9..d0c6f97247 100644--- a/packages/cli/templates/blocks/components/Overlay/OverlayHoverReveal.tsx+++ b/packages/cli/templates/blocks/components/Overlay/OverlayHoverReveal.tsx@@ -2,24 +2,23 @@'use client';-import * as stylex from '@stylexjs/stylex';+import type {CSSProperties} from 'react';import {Overlay} from '@astryxdesign/core/Overlay';import {AspectRatio} from '@astryxdesign/core/AspectRatio';import {Button} from '@astryxdesign/core/Button';-const styles = stylex.create({- frame: {- width: 420,- maxWidth: '100%',- borderRadius: 12,- overflow: 'clip',- },- image: {- width: '100%',- height: '100%',- objectFit: 'cover',- },-});+const frame: CSSProperties = {+ width: 420,+ maxWidth: '100%',+ borderRadius: 12,+ overflow: 'clip',+};++const image: CSSProperties = {+ width: '100%',+ height: '100%',+ objectFit: 'cover',+};export default function OverlayHoverReveal() {return (@@ -27,11 +26,11 @@ export default function OverlayHoverReveal() {showOn="hover"align="center"content={<Button label="Quick view" variant="secondary" size="sm" />}>- <AspectRatio ratio={16 / 9} xstyle={styles.frame}>+ <AspectRatio ratio={16 / 9} style={frame}><imgsrc="https://lookaside.facebook.com/assets/astryx/light-working-horizontal-1.png"alt="Workspace preview"- {...stylex.props(styles.image)}+ style={image}/></AspectRatio></Overlay>diff --git a/packages/cli/templates/blocks/components/Overlay/OverlayShowcase.tsx b/packages/cli/templates/blocks/components/Overlay/OverlayShowcase.tsxindex e0f2f1b04d..76242ab3cc 100644--- a/packages/cli/templates/blocks/components/Overlay/OverlayShowcase.tsx+++ b/packages/cli/templates/blocks/components/Overlay/OverlayShowcase.tsx@@ -2,47 +2,31 @@'use client';-import * as stylex from '@stylexjs/stylex';import {Overlay} from '@astryxdesign/core/Overlay';import {AspectRatio} from '@astryxdesign/core/AspectRatio';import {Button} from '@astryxdesign/core/Button';import {VStack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';-const styles = stylex.create({- frame: {- width: 520,- maxWidth: '100%',- borderRadius: 16,- overflow: 'clip',- },- image: {- width: '100%',- height: '100%',- objectFit: 'cover',- },- content: {- textAlign: 'center',- },-});-export default function OverlayShowcase() {return (<Overlayalign="center"content={- <VStack gap={2} xstyle={styles.content}>+ <VStack gap={2} style={{textAlign: 'center'}}><Text type="supporting" weight="bold" color="inherit">Design system foundations</Text><Button label="Open gallery" variant="secondary" size="sm" /></VStack>}>- <AspectRatio ratio={16 / 9} xstyle={styles.frame}>+ <AspectRatio+ ratio={16 / 9}+ style={{width: 520, maxWidth: '100%', borderRadius: 16, overflow: 'clip'}}><imgsrc="https://lookaside.facebook.com/assets/astryx/light-scene-horizontal-1.png"alt="Abstract landscape"- {...stylex.props(styles.image)}+ style={{width: '100%', height: '100%', objectFit: 'cover'}}/></AspectRatio></Overlay>diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationDotsCarousel.tsxindex 2cb5caa66d..04377128a3 100644--- a/packages/cli/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx+++ b/packages/cli/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx@@ -10,7 +10,6 @@ import {Stack} from '@astryxdesign/core/Layout';import {Avatar} from '@astryxdesign/core/Avatar';import {Icon} from '@astryxdesign/core/Icon';import {StarIcon} from '@heroicons/react/24/solid';-import * as stylex from '@stylexjs/stylex';const REVIEWS = [{@@ -43,17 +42,6 @@ const REVIEWS = [},];-const styles = stylex.create({- root: {- maxWidth: 480,- width: '100%',- },- pagination: {- justifyContent: 'center',- paddingTop: 4,- },-});-function Stars({count}: {count: number}) {return (<Stack direction="horizontal" gap={0}>@@ -69,7 +57,7 @@ export default function PaginationDotsCarousel() {const review = REVIEWS[page - 1];return (- <Stack direction="vertical" gap={3} xstyle={styles.root}>+ <Stack direction="vertical" gap={3} style={{maxWidth: 480, width: '100%'}}><Card padding={5}><Stack direction="vertical" gap={3}><Stars count={review.stars} />@@ -96,7 +84,7 @@ export default function PaginationDotsCarousel() {onChange={setPage}totalPages={REVIEWS.length}variant="dots"- xstyle={styles.pagination}+ style={{justifyContent: 'center', paddingTop: 4}}/></Stack>);diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationPageSize.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationPageSize.tsxindex ae92c94f31..d15a5e9c00 100644--- a/packages/cli/templates/blocks/components/Pagination/PaginationPageSize.tsx+++ b/packages/cli/templates/blocks/components/Pagination/PaginationPageSize.tsx@@ -2,23 +2,21 @@'use client';-import {useState} from 'react';+import {useState, type CSSProperties} from 'react';import {Pagination} from '@astryxdesign/core/Pagination';import {Heading} from '@astryxdesign/core/Text';import {Stack} from '@astryxdesign/core/Layout';import {Table} from '@astryxdesign/core/Table';-import * as stylex from '@stylexjs/stylex';-const styles = stylex.create({- root: {- width: '100%',- maxWidth: 500,- },- pagination: {- paddingTop: 8,- flexDirection: 'row-reverse',- },-});+const root: CSSProperties = {+ width: '100%',+ maxWidth: 500,+};++const pagination: CSSProperties = {+ paddingTop: 8,+ flexDirection: 'row-reverse',+};const DATA = [{@@ -42,7 +40,7 @@ export default function PaginationPageSize() {const [pageSize, setPageSize] = useState(10);return (- <Stack direction="vertical" xstyle={styles.root}>+ <Stack direction="vertical" style={root}><Heading level={4}>Transactions</Heading><TableidKey="id"@@ -61,7 +59,7 @@ export default function PaginationPageSize() {onPageSizeChange={setPageSize}pageSizeOptions={[10, 25, 50, 100]}variant="count"- xstyle={styles.pagination}+ style={pagination}/></Stack>);diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationVariants.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationVariants.tsxindex 49d63624a0..ebbd355793 100644--- a/packages/cli/templates/blocks/components/Pagination/PaginationVariants.tsx+++ b/packages/cli/templates/blocks/components/Pagination/PaginationVariants.tsx@@ -5,13 +5,6 @@import {useState} from 'react';import {Pagination} from '@astryxdesign/core/Pagination';import {Stack} from '@astryxdesign/core/Layout';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- root: {- width: '100%',- },-});export default function PaginationVariants() {const [pagesPage, setPagesPage] = useState(3);@@ -20,7 +13,7 @@ export default function PaginationVariants() {const [dotsPage, setDotsPage] = useState(3);return (- <Stack direction="vertical" gap={5} hAlign="center" xstyle={styles.root}>+ <Stack direction="vertical" gap={5} hAlign="center" style={{width: '100%'}}><Paginationpage={dotsPage}onChange={setDotsPage}diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationWithTable.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationWithTable.tsxindex 9f5bd35d98..54c1df7393 100644--- a/packages/cli/templates/blocks/components/Pagination/PaginationWithTable.tsx+++ b/packages/cli/templates/blocks/components/Pagination/PaginationWithTable.tsx@@ -6,18 +6,6 @@ import {useState} from 'react';import {Pagination} from '@astryxdesign/core/Pagination';import {Table} from '@astryxdesign/core/Table';import {Stack} from '@astryxdesign/core/Layout';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- root: {- width: '100%',- maxWidth: 500,- },- pagination: {- justifyContent: 'center',- paddingTop: 8,- },-});const ALL_DATA = [{id: '1', name: 'Olivia Chen', role: 'Engineer', status: 'Active'},@@ -42,7 +30,7 @@ export default function PaginationWithTable() {const pageData = ALL_DATA.slice(start, start + PAGE_SIZE);return (- <Stack direction="vertical" xstyle={styles.root}>+ <Stack direction="vertical" style={{width: '100%', maxWidth: 500}}><TableidKey="id"columns={[@@ -59,7 +47,7 @@ export default function PaginationWithTable() {pageSize={PAGE_SIZE}variant="count"size="sm"- xstyle={styles.pagination}+ style={{justifyContent: 'center', paddingTop: 8}}/></Stack>);diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerClear.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerClear.tsxindex 8d3361f13f..fd471153b1 100644--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerClear.tsx+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerClear.tsx@@ -3,16 +3,11 @@'use client';import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';import {Tokenizer} from '@astryxdesign/core/Tokenizer';import {Stack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';-const styles = stylex.create({- fixed: {width: 400},-});-const users: SearchableItem[] = [{id: '1', label: 'Alice Johnson'},{id: '2', label: 'Bob Smith'},@@ -42,7 +37,7 @@ export default function TokenizerClear() {value={value}onChange={items => setValue(items)}hasClear- xstyle={styles.fixed}+ style={{width: 400}}/></Stack>);diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerCreatable.tsxindex ac73ffe645..7cec358984 100644--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx@@ -3,16 +3,11 @@'use client';import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';import {Tokenizer} from '@astryxdesign/core/Tokenizer';import {Stack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';-const styles = stylex.create({- fixed: {width: 400},-});-const emptySource: SearchSource = {search: () => [],bootstrap: () => [],@@ -49,7 +44,7 @@ export default function TokenizerCreatable() {onChange={items => setTags(items)}hasCreateplaceholder="Type a tag and press Enter..."- xstyle={styles.fixed}+ style={{width: 400}}/></Stack><Stack direction="vertical" gap={1}>@@ -64,7 +59,7 @@ export default function TokenizerCreatable() {hasCreatehasEntriesOnFocusplaceholder="Search or type a new name..."- xstyle={styles.fixed}+ style={{width: 400}}/></Stack></Stack>diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerEndContent.tsxindex abd8a86493..04c8e1a7de 100644--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx@@ -3,17 +3,12 @@'use client';import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';import {Tokenizer} from '@astryxdesign/core/Tokenizer';import {Button} from '@astryxdesign/core/Button';import {Stack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';-const styles = stylex.create({- fixed: {width: 400},-});-const users: SearchableItem[] = [{id: '1', label: 'Alice Johnson'},{id: '2', label: 'Bob Smith'},@@ -44,7 +39,7 @@ export default function TokenizerEndContent() {value={value}onChange={items => setValue(items)}endContent={<Button label="Apply" variant="primary" size="sm" />}- xstyle={styles.fixed}+ style={{width: 400}}/></Stack>);diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerIcon.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerIcon.tsxindex 8c4758b789..60f8fd724f 100644--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerIcon.tsx+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerIcon.tsx@@ -3,17 +3,12 @@'use client';import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';import {Tokenizer} from '@astryxdesign/core/Tokenizer';import {Stack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';import {MagnifyingGlassIcon} from '@heroicons/react/24/outline';import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';-const styles = stylex.create({- fixed: {width: 400},-});-const users: SearchableItem[] = [{id: '1', label: 'Alice Johnson'},{id: '2', label: 'Bob Smith'},@@ -43,7 +38,7 @@ export default function TokenizerIcon() {value={value}onChange={items => setValue(items)}startIcon={MagnifyingGlassIcon}- xstyle={styles.fixed}+ style={{width: 400}}/></Stack>);diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerMaxEntries.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerMaxEntries.tsxindex a6cbc288ef..4ebf69c2e9 100644--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerMaxEntries.tsx+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerMaxEntries.tsx@@ -3,16 +3,11 @@'use client';import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';import {Tokenizer} from '@astryxdesign/core/Tokenizer';import {Stack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';-const styles = stylex.create({- fixed: {width: 400},-});-const skills: SearchableItem[] = [{id: '1', label: 'React'},{id: '2', label: 'TypeScript'},@@ -52,7 +47,7 @@ export default function TokenizerMaxEntries() {value={value}onChange={items => setValue(items)}maxEntries={MAX_SKILLS}- xstyle={styles.fixed}+ style={{width: 400}}/></Stack>);diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerOverflow.tsxindex f39e33d596..17cf0beebf 100644--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx@@ -3,16 +3,11 @@'use client';import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';import {Tokenizer} from '@astryxdesign/core/Tokenizer';import {Stack} from '@astryxdesign/core/Layout';import {Text} from '@astryxdesign/core/Text';import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';-const styles = stylex.create({- fixed: {width: 400, maxWidth: 400},-});-const users: SearchableItem[] = [{id: '1', label: 'Alice Johnson'},{id: '2', label: 'Bob Smith'},@@ -45,7 +40,7 @@ export default function TokenizerOverflow() {value={inlineValue}onChange={items => setInlineValue(items)}tokenOverflowBehavior="unfocusedInline"- xstyle={styles.fixed}+ style={{width: 400, maxWidth: 400}}/></Stack><Stack direction="vertical" gap={1}>@@ -59,7 +54,7 @@ export default function TokenizerOverflow() {value={layerValue}onChange={items => setLayerValue(items)}tokenOverflowBehavior="unfocusedLayer"- xstyle={styles.fixed}+ style={{width: 400, maxWidth: 400}}/></Stack></Stack>diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerShowcase.tsxindex 713d99dcf4..751161345d 100644--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx@@ -2,14 +2,9 @@'use client';-import * as stylex from '@stylexjs/stylex';import {Tokenizer} from '@astryxdesign/core/Tokenizer';import type {SearchSource} from '@astryxdesign/core/Typeahead';-const styles = stylex.create({- fixed: {width: 400},-});-const source: SearchSource = {search: () => [],bootstrap: () => [],@@ -26,7 +21,7 @@ export default function TokenizerShowcase() {{id: '2', label: 'Engineering'},]}onChange={() => {}}- xstyle={styles.fixed}+ style={{width: 400}}/>);}diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerStates.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerStates.tsxindex f346c89854..1897592038 100644--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerStates.tsx+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerStates.tsx@@ -3,15 +3,10 @@'use client';import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';import {Tokenizer} from '@astryxdesign/core/Tokenizer';import {Stack} from '@astryxdesign/core/Layout';import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';-const styles = stylex.create({- fixed: {width: 400},-});-const users: SearchableItem[] = [{id: '1', label: 'Alice Johnson'},{id: '2', label: 'Bob Smith'},@@ -44,7 +39,7 @@ export default function TokenizerStates() {value={[users[0], users[2]]}onChange={() => {}}isDisabled- xstyle={styles.fixed}+ style={{width: 400}}/><Tokenizerlabel="Error message"@@ -54,7 +49,7 @@ export default function TokenizerStates() {onChange={items => setErrorValue(items)}isRequiredstatus={{type: 'error', message: 'At least one reviewer is required'}}- xstyle={styles.fixed}+ style={{width: 400}}/><Tokenizerlabel="Warning message"@@ -66,7 +61,7 @@ export default function TokenizerStates() {type: 'warning',message: 'Consider adding at least 2 approvers',}}- xstyle={styles.fixed}+ style={{width: 400}}/><Tokenizerlabel="Success message"@@ -75,7 +70,7 @@ export default function TokenizerStates() {value={successValue}onChange={items => setSuccessValue(items)}status={{type: 'success', message: 'All required reviewers added'}}- xstyle={styles.fixed}+ style={{width: 400}}/></Stack>);diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeader.tsxindex 35d3557a1a..a8e124d4bf 100644--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx@@ -9,19 +9,10 @@ import {Heading} from '@astryxdesign/core/Text';import {Card} from '@astryxdesign/core/Card';import {Section} from '@astryxdesign/core/Section';import {FunnelIcon, PlusIcon} from '@heroicons/react/24/outline';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- card: {- width: 500,- height: '100%',- marginTop: 260,- },-});export default function ToolbarCardHeader() {return (- <Card xstyle={styles.card}>+ <Card style={{width: 500, height: '100%', marginTop: 260}}><Toolbarlabel="User list actions"size="sm"diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarSizes.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarSizes.tsxindex 9f85e079c0..2dd38fb7e4 100644--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarSizes.tsx+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarSizes.tsx@@ -9,13 +9,6 @@ import {Heading} from '@astryxdesign/core/Text';import {Stack} from '@astryxdesign/core/Layout';import {Card} from '@astryxdesign/core/Card';import {FunnelIcon, PlusIcon} from '@heroicons/react/24/outline';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- container: {- width: 500,- },-});const SIZES = [{size: 'sm' as const, label: 'Small'},@@ -25,7 +18,7 @@ const SIZES = [export default function ToolbarSizes() {return (- <Stack direction="vertical" gap={4} xstyle={styles.container}>+ <Stack direction="vertical" gap={4} style={{width: 500}}>{SIZES.map(({size, label}) => (<Card key={size}><Toolbardiff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarTableFilter.tsxindex d1b418290d..8c7ebb2b62 100644--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx@@ -9,21 +9,14 @@ import {TextInput} from '@astryxdesign/core/TextInput';import {MoreMenu} from '@astryxdesign/core/MoreMenu';import {Stack} from '@astryxdesign/core/Layout';import {Table} from '@astryxdesign/core/Table';-import * as stylex from '@stylexjs/stylex';import {MagnifyingGlassIcon,ChevronDownIcon,} from '@heroicons/react/24/outline';-const styles = stylex.create({- container: {- width: '100%',- },-});-export default function ToolbarTableFilter() {return (- <Stack direction="vertical" xstyle={styles.container}>+ <Stack direction="vertical" style={{width: '100%'}}><Toolbarlabel="Table filters"size="sm"diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsxindex 4a62de9fcd..d3653449cf 100644--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx@@ -9,19 +9,10 @@ import {Heading} from '@astryxdesign/core/Text';import {Card} from '@astryxdesign/core/Card';import {Section} from '@astryxdesign/core/Section';import {ArrowLeftIcon} from '@heroicons/react/24/outline';-import * as stylex from '@stylexjs/stylex';--const styles = stylex.create({- card: {- width: 600,- height: '100%',- marginTop: 260,- },-});export default function ToolbarThreeSlot() {return (- <Card xstyle={styles.card}>+ <Card style={{width: 600, height: '100%', marginTop: 260}}><Toolbarlabel="Document toolbar"dividers={['bottom']}diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarWithTabs.tsxindex efd37a3430..d475b14d42 100644--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx@@ -2,7 +2,7 @@'use client';-import {useState} from 'react';+import {useState, type CSSProperties} from 'react';import {Toolbar} from '@astryxdesign/core/Toolbar';import {Button} from '@astryxdesign/core/Button';import {Icon} from '@astryxdesign/core/Icon';@@ -10,21 +10,18 @@ import {TabList, Tab} from '@astryxdesign/core/TabList';import {Card} from '@astryxdesign/core/Card';import {Section} from '@astryxdesign/core/Section';import {PlusIcon} from '@heroicons/react/24/outline';-import * as stylex from '@stylexjs/stylex';-const styles = stylex.create({- card: {- width: '100%',- maxWidth: 500,- height: '100%',- marginTop: 200,- },-});+const card: CSSProperties = {+ width: '100%',+ maxWidth: 500,+ height: '100%',+ marginTop: 200,+};export default function ToolbarWithTabs() {const [tab, setTab] = useState('overview');return (- <Card xstyle={styles.card}>+ <Card style={card}><Toolbarlabel="Section navigation"dividers={['bottom']}diff --git a/packages/cli/templates/pages/ai-chat-landing/page.tsx b/packages/cli/templates/pages/ai-chat-landing/page.tsxindex cbdae2740d..36b162ca93 100644--- a/packages/cli/templates/pages/ai-chat-landing/page.tsx+++ b/packages/cli/templates/pages/ai-chat-landing/page.tsx@@ -2,9 +2,7 @@'use client';-import {useRef, useState} from 'react';-import * as stylex from '@stylexjs/stylex';-import {spacingVars} from '@astryxdesign/core/theme/tokens.stylex';+import {useRef, useState, type CSSProperties} from 'react';import {Layout, LayoutContent, VStack, HStack} from '@astryxdesign/core/Layout';import {Text, Heading} from '@astryxdesign/core/Text';@@ -40,12 +38,10 @@ import {LightBulbIcon,} from '@heroicons/react/24/outline';-const styles = stylex.create({- // Fill the content area so the greeting and composer stay vertically centered.- page: {minHeight: '100%'},- composerInput: {minHeight: 84},- categories: {paddingInline: spacingVars['--spacing-3']},-});+// Fill the content area so the greeting and composer stay vertically centered.+const pageStyle: CSSProperties = {minHeight: '100%'};+const composerInput: CSSProperties = {minHeight: 84};+const categories: CSSProperties = {paddingInline: 'var(--spacing-3)'};// Suggestion cards shown once a category is selected.const CATEGORY_SUGGESTIONS: Record<@@ -311,7 +307,7 @@ export default function AIChatTemplate() {padding={6}content={<LayoutContent>- <VStack gap={8} vAlign="center" xstyle={styles.page}>+ <VStack gap={8} vAlign="center" style={pageStyle}>{/* Greeting */}<VStack gap={1}><HStack gap={2} vAlign="center">@@ -333,7 +329,7 @@ export default function AIChatTemplate() {<ChatComposerInputhandleRef={composerInputRef}triggers={composerTriggers}- xstyle={styles.composerInput}+ style={composerInput}onFiles={files =>setAttachments(prev => [...prev, ...files.map(f => f.name)])}@@ -435,7 +431,7 @@ export default function AIChatTemplate() {/>{/* Category filters + suggestion cards */}- <VStack gap={6} xstyle={styles.categories}>+ <VStack gap={6} style={categories}><ToggleButtonGrouplabel="Category"value={category}diff --git a/packages/cli/templates/pages/ai-chat/page.tsx b/packages/cli/templates/pages/ai-chat/page.tsxindex da6ef8a3cf..a7f1ff7604 100644--- a/packages/cli/templates/pages/ai-chat/page.tsx+++ b/packages/cli/templates/pages/ai-chat/page.tsx@@ -2,9 +2,7 @@'use client';-import {useRef, useState} from 'react';-import * as stylex from '@stylexjs/stylex';-import {spacingVars} from '@astryxdesign/core/theme/tokens.stylex';+import {useRef, useState, type CSSProperties} from 'react';import {HStack,@@ -55,56 +53,66 @@ import {// Below this width the split-pane collapses to a single chat column. Shared by// the CSS container query and the JS check in openArtifact so they can't drift.const MOBILE_MAX_WIDTH = 767;-const MOBILE = `@container artifact (max-width: ${MOBILE_MAX_WIDTH}px)`;--const styles = stylex.create({- root: {- height: '100dvh',- width: '100%',- containerType: 'inline-size',- containerName: 'artifact',- },- chatColumn: {- flex: 1,- width: '100%',- minWidth: 0,- height: '100%',- },- chatLayout: {- flex: 1,- minHeight: 0,- },- artifactPanel: {- overflow: 'hidden',- flexDirection: 'column',- display: {default: 'flex', [MOBILE]: 'none'},- },- resizeHandle: {- display: {default: 'flex', [MOBILE]: 'none'},- },- artifactCard: {- marginBlockStart: spacingVars['--spacing-2'],- },- artifactScroll: {- flex: 1,- overflowY: 'auto',- },- articleBody: {- maxWidth: 720,- marginInline: 'auto',- },-});--// Runtime width for the artifact panel; the MOBILE override forces full width.-const dynamicStyles = stylex.create({- artifactPanelWidth: (size: number | string) => ({- width: {- default: typeof size === 'number' ? `${size}px` : size,- [MOBILE]: '100%',- },- flexShrink: {default: 0, [MOBILE]: 1},- }),-});++const root: CSSProperties = {+ height: '100dvh',+ width: '100%',+ containerType: 'inline-size',+ containerName: 'artifact',+};+const chatColumn: CSSProperties = {+ flex: 1,+ width: '100%',+ minWidth: 0,+ height: '100%',+};+const chatLayout: CSSProperties = {+ flex: 1,+ minHeight: 0,+};+const artifactCard: CSSProperties = {+ marginBlockStart: 'var(--spacing-2)',+};+const artifactScroll: CSSProperties = {+ flex: 1,+ overflowY: 'auto',+};+const articleBody: CSSProperties = {+ maxWidth: 720,+ marginInline: 'auto',+};++// Runtime width for the artifact panel, passed in via the --artifact-panel-width+// custom property so the MOBILE container query can still override it to 100%+// (an inline `width` would beat the class rule). The container query lives in a+// plain <style> tag below so it needs NO CSS compiler.+const artifactPanelWidthVar = (size: number | string): CSSProperties =>+ ({+ '--artifact-panel-width': typeof size === 'number' ? `${size}px` : size,+ }) as CSSProperties;++const AI_CHAT_CSS = `+.ai-chat-resize-handle {+ display: flex;+}+.ai-chat-artifact-panel {+ overflow: hidden;+ display: flex;+ flex-direction: column;+ width: var(--artifact-panel-width);+ flex-shrink: 0;+}+@container artifact (max-width: ${MOBILE_MAX_WIDTH}px) {+ .ai-chat-resize-handle {+ display: none;+ }+ .ai-chat-artifact-panel {+ display: none;+ width: 100%;+ flex-shrink: 1;+ }+}+`;// Artifact content@@ -225,8 +233,8 @@ function MobileArtifactActions() {// Scrollable artifact body — the formatted document.function ArtifactBody() {return (- <Section variant="transparent" xstyle={styles.artifactScroll}>- <VStack gap={2} xstyle={styles.articleBody}>+ <Section variant="transparent" style={artifactScroll}>+ <VStack gap={2} style={articleBody}><Heading level={1}>{ARTIFACT_TITLE}</Heading><Markdown>{ARTIFACT_CONTENT}</Markdown></VStack>@@ -243,7 +251,7 @@ function ArtifactCard({onOpen}: {onOpen: () => void}) {variant="muted"padding={3}maxWidth={360}- xstyle={styles.artifactCard}>+ style={artifactCard}><HStack gap={3} vAlign="center" width="100%"><Icon icon={DocumentTextIcon} size="md" color="secondary" /><StackItem size="fill">@@ -288,17 +296,18 @@ export default function AIChatConversationTemplate() {};return (- <VStack ref={rootRef} xstyle={styles.root}>+ <VStack ref={rootRef} style={root}>+ <style>{AI_CHAT_CSS}</style><Layoutheight="fill"content={<LayoutContent padding={0}><HStack height="100%">{/* Chat column — flexes to fill the space the artifact leaves */}- <VStack xstyle={styles.chatColumn}>+ <VStack style={chatColumn}><ChatLayoutdensity="spacious"- xstyle={styles.chatLayout}+ style={chatLayout}composer={<ChatComposeronSubmit={() => {}}@@ -677,17 +686,15 @@ The fix is to catch \`TokenExpiredError\` specifically and attempt a refresh befpillPlacement="start"hasDividerlabel="Resize artifact panel"- xstyle={styles.resizeHandle}+ className="ai-chat-resize-handle"/>{/* Toolbar as the card header, body below */}<Cardvariant="transparent"height="100%"- xstyle={[- styles.artifactPanel,- dynamicStyles.artifactPanelWidth(artifactResize.size),- ]}>+ className="ai-chat-artifact-panel"+ style={artifactPanelWidthVar(artifactResize.size)}><Toolbarlabel="Artifact actions"dividers={['bottom']}diff --git a/packages/cli/templates/pages/centered-hero/page.tsx b/packages/cli/templates/pages/centered-hero/page.tsxindex 41c753b0df..0deace979e 100644--- a/packages/cli/templates/pages/centered-hero/page.tsx+++ b/packages/cli/templates/pages/centered-hero/page.tsx@@ -2,7 +2,7 @@'use client';-import * as stylex from '@stylexjs/stylex';+import type {CSSProperties} from 'react';import {VStack,HStack,@@ -19,18 +19,16 @@ import {ArrowRightIcon} from '@heroicons/react/20/solid';const IMAGE_URL ='https://lookaside.facebook.com/assets/astryx/light-scene-horizontal-1.png';-const styles = stylex.create({- heroImage: {- width: '100%',- height: '100%',- objectFit: 'cover',- },- heroFrame: {- maxWidth: 1200,- marginInline: 'auto',- borderRadius: 'var(--radius-page)',- },-});+const heroImage: CSSProperties = {+ width: '100%',+ height: '100%',+ objectFit: 'cover',+};+const heroFrame: CSSProperties = {+ maxWidth: 1200,+ marginInline: 'auto',+ borderRadius: 'var(--radius-page)',+};export default function CenteredHero() {return (@@ -68,9 +66,9 @@ export default function CenteredHero() {</HStack></VStack><Section variant="transparent" padding={0}>- <AspectRatio ratio={16 / 9} xstyle={styles.heroFrame}>+ <AspectRatio ratio={16 / 9} style={heroFrame}><img- {...stylex.props(styles.heroImage)}+ style={heroImage}src={IMAGE_URL}alt="A bright, colorful lifestyle scene"/>diff --git a/packages/cli/templates/pages/classic-gallery/page.tsx b/packages/cli/templates/pages/classic-gallery/page.tsxindex 1c45bf9076..43314e8c5b 100644--- a/packages/cli/templates/pages/classic-gallery/page.tsx+++ b/packages/cli/templates/pages/classic-gallery/page.tsx@@ -2,41 +2,38 @@'use client';-import {useState} from 'react';+import {useState, type CSSProperties} from 'react';import {VStack, Layout, LayoutContent} from '@astryxdesign/core/Layout';import {Center} from '@astryxdesign/core/Center';import {Text, Heading} from '@astryxdesign/core/Text';import {Grid} from '@astryxdesign/core/Grid';import {Section} from '@astryxdesign/core/Section';import {TabList, Tab} from '@astryxdesign/core/TabList';-import * as stylex from '@stylexjs/stylex';// ─── Styles ─────────────────────────────────────────────────────────────────-const styles = stylex.create({- outer: {- maxWidth: 1200,- width: '100%',- paddingInline: 'var(--spacing-6)',- paddingBlock: 'var(--spacing-8)',- },- imageWrapper: {- position: 'relative',- aspectRatio: '3/2',- borderRadius: 'var(--radius-container)',- overflow: 'clip',- },- textCenter: {- textAlign: 'center',- },- imgFill: {- position: 'absolute',- inset: 0,- width: '100%',- height: '100%',- objectFit: 'cover',- },-});+const outer: CSSProperties = {+ maxWidth: 1200,+ width: '100%',+ paddingInline: 'var(--spacing-6)',+ paddingBlock: 'var(--spacing-8)',+};+const imageWrapper: CSSProperties = {+ position: 'relative',+ aspectRatio: '3/2',+ borderRadius: 'var(--radius-container)',+ overflow: 'clip',+};+const textCenter: CSSProperties = {+ textAlign: 'center',+};+const imgFill: CSSProperties = {+ position: 'absolute',+ inset: 0,+ width: '100%',+ height: '100%',+ objectFit: 'cover',+};// ─── Gallery Data ───────────────────────────────────────────────────────────@@ -117,11 +114,11 @@ export default function ClassicGalleryTemplate() {content={<LayoutContent padding={0}><Center axis="horizontal">- <VStack gap={8} xstyle={styles.outer}>+ <VStack gap={8} style={outer}>{/* Header */}<Center axis="horizontal"><Section variant="transparent" maxWidth={680} padding={0}>- <VStack gap={4} hAlign="center" xstyle={styles.textCenter}>+ <VStack gap={4} hAlign="center" style={textCenter}><VStack gap={2} hAlign="center"><Heading level={1}>Make every day a little more delightful, one detail at a@@ -150,12 +147,8 @@ export default function ClassicGalleryTemplate() {{/* Gallery Grid */}<Grid columns={{minWidth: 260, repeat: 'fit'}} gap={4}>{filteredImages.map((image, i) => (- <div key={i} {...stylex.props(styles.imageWrapper)}>- <img- src={image.src}- alt={image.alt}- {...stylex.props(styles.imgFill)}- />+ <div key={i} style={imageWrapper}>+ <img src={image.src} alt={image.alt} style={imgFill} /></div>))}</Grid>diff --git a/packages/cli/templates/pages/detail-page/page.tsx b/packages/cli/templates/pages/detail-page/page.tsxindex 912b32ad20..b71b2b1739 100644--- a/packages/cli/templates/pages/detail-page/page.tsx+++ b/packages/cli/templates/pages/detail-page/page.tsx@@ -41,26 +41,26 @@ import {} from '@heroicons/react/24/outline';// ─── Styles ─────────────────────────────────────────────────────────────────-import * as stylex from '@stylexjs/stylex';+import type {CSSProperties} from 'react';// The only custom CSS in this template is small optical-alignment negative// margins: LayoutHeader/TabList have no edge-dock prop (#2622) and List// has no "bleed to container edge" prop (#2626). Everything else uses props.-const pageStyles = stylex.create({- // Bleed the tab bar to the header's content edges so the active-tab underline- // meets the header divider. No edge-dock prop on TabList (#2622).- tabsRow: {- marginInline: -12,- marginBottom: -16,- marginTop: 12,- },- // Pull the list items' inner padding back so their content optically aligns- // with the section heading above (ListItem insets content by ~8px). No- // edge/inset prop on List (#2626).- itemsList: {- marginInline: -8,- },-});+// Plain inline styles — no StyleX compiler required.++// Bleed the tab bar to the header's content edges so the active-tab underline+// meets the header divider. No edge-dock prop on TabList (#2622).+const tabsRow: CSSProperties = {+ marginInline: -12,+ marginBottom: -16,+ marginTop: 12,+};+// Pull the list items' inner padding back so their content optically aligns+// with the section heading above (ListItem insets content by ~8px). No+// edge/inset prop on List (#2626).+const itemsList: CSSProperties = {+ marginInline: -8,+};// ─── Product data ───────────────────────────────────────────────────────────const PRODUCT_IMAGES = [@@ -258,7 +258,7 @@ function PageHeader({</HStack>)}- <HStack vAlign="center" xstyle={pageStyles.tabsRow}>+ <HStack vAlign="center" style={tabsRow}><StackItem size="fill"><TabList value={activeTab} onChange={onTabChange} size="lg"><Tab value="details" label="Details" />@@ -305,7 +305,7 @@ function ItemsCard() {</HStack></HStack>- <List density="spacious" xstyle={pageStyles.itemsList}>+ <List density="spacious" style={itemsList}>{PRODUCTS.map((product, i) => (<ListItemkey={i}diff --git a/packages/cli/templates/pages/documentation-design/page.tsx b/packages/cli/templates/pages/documentation-design/page.tsxindex 5f919dc47a..35089034aa 100644--- a/packages/cli/templates/pages/documentation-design/page.tsx+++ b/packages/cli/templates/pages/documentation-design/page.tsx@@ -2,8 +2,7 @@'use client';-import {useCallback, useState, useMemo} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useCallback, useState, useMemo, type CSSProperties} from 'react';import {Heading, Text} from '@astryxdesign/core/Text';import {Button} from '@astryxdesign/core/Button';import {IconButton} from '@astryxdesign/core/IconButton';@@ -32,15 +31,13 @@ import {PlusIcon,} from '@heroicons/react/24/outline';-const styles = stylex.create({- tabListFlush: {marginInlineStart: '-12px'},- outlinePanel: {- position: 'sticky',- top: 24,- alignSelf: 'start',- paddingBlockStart: 120,- },-});+const tabListFlush: CSSProperties = {marginInlineStart: '-12px'};+const outlinePanel: CSSProperties = {+ position: 'sticky',+ top: 24,+ alignSelf: 'start',+ paddingBlockStart: 120,+};const COMPONENT_OUTLINE_ITEMS: OutlineItem[] = [{id: 'usage', label: 'Usage', level: 2},@@ -585,7 +582,7 @@ function ComponentDetailView({activeNav}: {activeNav: string}) {isScrollable={false}label="On this page"role="complementary"- xstyle={styles.outlinePanel}>+ style={outlinePanel}><Outlineitems={COMPONENT_OUTLINE_ITEMS}onActiveIdChange={setActiveId}@@ -725,7 +722,7 @@ function ComponentDetailView({activeNav}: {activeNav: string}) {}))}size="sm"- xstyle={styles.tabListFlush}>+ style={tabListFlush}><Tab value="description" label="Description" /><Tab value="code" label="Code" /></TabList>diff --git a/packages/cli/templates/pages/documentation-technical/page.tsx b/packages/cli/templates/pages/documentation-technical/page.tsxindex c571b4c071..e6e1b49178 100644--- a/packages/cli/templates/pages/documentation-technical/page.tsx+++ b/packages/cli/templates/pages/documentation-technical/page.tsx@@ -2,8 +2,7 @@'use client';-import {useCallback, useState} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useCallback, useState, type CSSProperties} from 'react';import {Heading, Text} from '@astryxdesign/core/Text';import {Button} from '@astryxdesign/core/Button';import {Card} from '@astryxdesign/core/Card';@@ -39,14 +38,12 @@ const OUTLINE_OPTIONS = OUTLINE_ITEMS.map(item => ({label: item.label,}));-const styles = stylex.create({- outlinePanel: {- position: 'sticky',- top: 24,- alignSelf: 'start',- paddingBlockStart: 120,- },-});+const outlinePanel: CSSProperties = {+ position: 'sticky',+ top: 24,+ alignSelf: 'start',+ paddingBlockStart: 120,+};export default function TechnicalDocumentationPage() {const [activeId, setActiveId] = useState<string | undefined>(@@ -73,7 +70,7 @@ export default function TechnicalDocumentationPage() {isScrollable={false}label="On this page"role="complementary"- xstyle={styles.outlinePanel}>+ style={outlinePanel}><Outline items={OUTLINE_ITEMS} onActiveIdChange={setActiveId} /></LayoutPanel>)@@ -178,15 +175,17 @@ export default function TechnicalDocumentationPage() {</VStack><VStack gap={2}><Text type="body" weight="bold">- Step 2: Add the StyleX compiler+ Step 2: Import the precompiled styles</Text><Text type="body" color="secondary">- Astryx uses StyleX for styling. Add the compiler plugin to- your build configuration.+ Astryx ships precompiled CSS, so there is no build plugin to+ configure. Import the reset and component stylesheets once at+ your app entry point.</Text><CodeBlock- code="npm install @stylexjs/babel-plugin"- language="bash"+ code={`import '@astryxdesign/core/reset.css';+import '@astryxdesign/core/astryx.css';`}+ language="tsx"width="100%"/></VStack>diff --git a/packages/cli/templates/pages/documentation/page.tsx b/packages/cli/templates/pages/documentation/page.tsxindex 9de3fdd891..6189832253 100644--- a/packages/cli/templates/pages/documentation/page.tsx+++ b/packages/cli/templates/pages/documentation/page.tsx@@ -2,7 +2,7 @@'use client';-import * as stylex from '@stylexjs/stylex';+import type {CSSProperties} from 'react';import {Heading, Text} from '@astryxdesign/core/Text';import {Button} from '@astryxdesign/core/Button';import {Card} from '@astryxdesign/core/Card';@@ -10,18 +10,15 @@ import {ClickableCard} from '@astryxdesign/core/ClickableCard';import {HStack, VStack, StackItem} from '@astryxdesign/core/Stack';import {Layout, LayoutContent} from '@astryxdesign/core/Layout';import {Grid} from '@astryxdesign/core/Grid';-import {radiusVars} from '@astryxdesign/core/theme/tokens.stylex';-const styles = stylex.create({- previewCard: {- borderRadius: radiusVars['--radius-element'],- },- // Negative margin offsets each card's 8px padding so the grid content stays- // visually aligned while giving every card a padded hover/click target.- cardGrid: {- margin: -8,- },-});+const previewCard: CSSProperties = {+ borderRadius: 'var(--radius-element)',+};+// Negative margin offsets each card's 8px padding so the grid content stays+// visually aligned while giving every card a padded hover/click target.+const cardGrid: CSSProperties = {+ margin: -8,+};// ---------------------------------------------------------------------------// Data@@ -241,7 +238,7 @@ export default function DocumentationOverviewPage() {<Gridcolumns={{minWidth: 260}}gap={2}- xstyle={styles.cardGrid}>+ style={cardGrid}>{category.items.map(item => (<ClickableCardkey={item.key}@@ -254,7 +251,7 @@ export default function DocumentationOverviewPage() {variant="muted"padding={0}minHeight={160}- xstyle={styles.previewCard}+ style={previewCard}/><VStack gap={0.5}><Text type="body" weight="bold">diff --git a/packages/cli/templates/pages/editor/page.tsx b/packages/cli/templates/pages/editor/page.tsxindex b5b060cbc7..090b40b5c5 100644--- a/packages/cli/templates/pages/editor/page.tsx+++ b/packages/cli/templates/pages/editor/page.tsx@@ -2,9 +2,7 @@'use client';-import {useState, useCallback} from 'react';-import * as stylex from '@stylexjs/stylex';-import {colorVars} from '@astryxdesign/core/theme/tokens.stylex';+import {useState, useCallback, type CSSProperties} from 'react';import {useMediaQuery} from '@astryxdesign/core/hooks';import {Button} from '@astryxdesign/core/Button';import {Card} from '@astryxdesign/core/Card';@@ -307,42 +305,32 @@ function defaultProps(type: BlockType): Record<string, unknown> {// the responsive canvas max-width, a selection ring on the active block card,// and the circular icon chip's surface.-const editorStyles = stylex.create({- // Fill the window. Layout height="fill" is height:100%, which only resolves- // against a definite height — and the host's <html>/<body> don't set one, so- // the layout anchors a definite viewport height itself. No background; the- // host owns the page surface.- page: {height: '100dvh'},- // Pin the panel to a fixed 320px on desktop (so it doesn't resize to its- // content when switching tabs) and full width on mobile, where it moves into- // the header slot. LayoutPanel width is a single fixed value with no- // responsive form, and this xstyle wins over the width prop.- panelWidth: {- width: {default: 320, '@media (max-width: 768px)': '100%'},- flexShrink: 0,- },- // Canvas reflows to the chosen viewport width; VStack has no maxWidth prop.- canvas: (maxWidth: number) => ({- maxWidth,- width: '100%',- marginInline: 'auto',- }),- clickable: {- cursor: 'pointer',- },- // Selection ring on the active block — Card has no `isSelected` state.- selectedCard: {- outline: '2px solid',- outlineColor: colorVars['--color-border-blue'],- outlineOffset: -2,- },- // Circular muted chip behind the CTA icon — Center handles the centering- // and sizing; only the surface (radius + fill) needs custom CSS.- iconCircle: {- borderRadius: '50%',- backgroundColor: colorVars['--color-background-muted'],- },+// Fill the window. Layout height="fill" is height:100%, which only resolves+// against a definite height — and the host's <html>/<body> don't set one, so+// the layout anchors a definite viewport height itself. No background; the+// host owns the page surface.+const pageStyle: CSSProperties = {height: '100dvh'};+// Canvas reflows to the chosen viewport width; VStack has no maxWidth prop.+const canvasStyle = (maxWidth: number): CSSProperties => ({+ maxWidth,+ width: '100%',+ marginInline: 'auto',});+const clickable: CSSProperties = {+ cursor: 'pointer',+};+// Selection ring on the active block — Card has no `isSelected` state.+const selectedCard: CSSProperties = {+ outline: '2px solid',+ outlineColor: 'var(--color-border-blue)',+ outlineOffset: -2,+};+// Circular muted chip behind the CTA icon — Center handles the centering+// and sizing; only the surface (radius + fill) needs custom CSS.+const iconCircle: CSSProperties = {+ borderRadius: '50%',+ backgroundColor: 'var(--color-background-muted)',+};// ---------------------------------------------------------------------------// Properties Form@@ -477,15 +465,15 @@ function BlockPreview({onSelect: () => void;}) {const {type, props} = block;- const cardXstyle = [- editorStyles.clickable,- isSelected && editorStyles.selectedCard,- ];+ const cardStyle: CSSProperties = {+ ...clickable,+ ...(isSelected ? selectedCard : null),+ };switch (type) {case 'hero':return (- <Card padding={6} xstyle={cardXstyle} onClick={onSelect}>+ <Card padding={6} style={cardStyle} onClick={onSelect}><VStack gap={4}><Heading level={2}>{(props.heading as string) || 'Hero Heading'}@@ -503,7 +491,7 @@ function BlockPreview({case 'text':if (props.heading) {return (- <Card padding={6} xstyle={cardXstyle} onClick={onSelect}>+ <Card padding={6} style={cardStyle} onClick={onSelect}><EmptyStatetitle={props.heading as string}description={props.description as string}@@ -521,7 +509,7 @@ function BlockPreview({);}return (- <Card xstyle={cardXstyle} onClick={onSelect}>+ <Card style={cardStyle} onClick={onSelect}><Text type="body">{(props.content as string) || 'Text content goes here'}</Text>@@ -530,7 +518,7 @@ function BlockPreview({case 'image':return (- <Card xstyle={cardXstyle} onClick={onSelect}>+ <Card style={cardStyle} onClick={onSelect}><EmptyStatetitle="Image Block"description="Drop an image or enter a URL"@@ -542,7 +530,7 @@ function BlockPreview({case 'button':return (- <Card padding={6} xstyle={cardXstyle} onClick={onSelect}>+ <Card padding={6} style={cardStyle} onClick={onSelect}><Center><Buttonlabel={(props.label as string) || 'Button'}@@ -559,7 +547,7 @@ function BlockPreview({case 'features': {const items = (props.items as Transaction[]) || [];return (- <Card padding={6} xstyle={cardXstyle} onClick={onSelect}>+ <Card padding={6} style={cardStyle} onClick={onSelect}><VStack gap={4}><HStack gap={3} vAlign="start" hAlign="between"><VStack gap={1}>@@ -589,7 +577,7 @@ function BlockPreview({const cardItems =(props.cards as Array<{title: string; description: string}>) || [];return (- <Card xstyle={cardXstyle} onClick={onSelect}>+ <Card style={cardStyle} onClick={onSelect}><VStack gap={4}><Heading level={3}>Cards</Heading><Divider />@@ -609,9 +597,9 @@ function BlockPreview({case 'cta':return (- <Card padding={6} xstyle={cardXstyle} onClick={onSelect}>+ <Card padding={6} style={cardStyle} onClick={onSelect}><HStack gap={4} vAlign="start">- <Center width={40} height={40} xstyle={editorStyles.iconCircle}>+ <Center width={40} height={40} style={iconCircle}><Icon icon={LockClosedIcon} color="secondary" /></Center><VStack gap={1}>@@ -828,7 +816,7 @@ export default function EditorPage() {<LayoutPanelhasDivider={!isMobile}padding={0}- xstyle={editorStyles.panelWidth}>+ style={{width: isMobile ? '100%' : 320, flexShrink: 0}}><VStack gap={4}>{/* Panel Header */}<Section variant="transparent" padding={4}>@@ -919,7 +907,7 @@ export default function EditorPage() {return (<><Layout- xstyle={editorStyles.page}+ style={pageStyle}height="fill"header={isMobile ? sidebar : undefined}start={isMobile ? undefined : sidebar}@@ -927,7 +915,7 @@ export default function EditorPage() {<LayoutContent padding={8}><VStackgap={4}- xstyle={editorStyles.canvas(VIEWPORT_MAX[viewport])}>+ style={canvasStyle(VIEWPORT_MAX[viewport])}>{blocks.length > 0 ? (blocks.map(block => (<BlockPreviewdiff --git a/packages/cli/templates/pages/file-explorer/page.tsx b/packages/cli/templates/pages/file-explorer/page.tsxindex 2de952f3e0..009c3d5399 100644--- a/packages/cli/templates/pages/file-explorer/page.tsx+++ b/packages/cli/templates/pages/file-explorer/page.tsx@@ -2,8 +2,7 @@'use client';-import {useState, useMemo} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useState, useMemo, type CSSProperties} from 'react';import {Layout, LayoutContent} from '@astryxdesign/core/Layout';import {Toolbar} from '@astryxdesign/core/Toolbar';import {List, ListItem} from '@astryxdesign/core/List';@@ -145,10 +144,10 @@ const FILESYSTEM: FileSystemItem[] = [children: [{id: 'react-index', name: 'index.js', type: 'file'}],},{- id: 'stylex',- name: '@stylexjs',+ id: 'react-dom',+ name: 'react-dom',type: 'folder',- children: [{id: 'stylex-index', name: 'stylex.js', type: 'file'}],+ children: [{id: 'react-dom-index', name: 'index.js', type: 'file'}],},],},@@ -260,13 +259,11 @@ const FILESYSTEM: FileSystemItem[] = [},];-const styles = stylex.create({- page: {height: '100dvh'},- columnRow: {overflowX: 'auto', overflowY: 'hidden'},- scrollable: {overflowY: 'auto'},- fixedColumn: {flexShrink: 0},- detailColumn: {flexGrow: 1, flexShrink: 0, flexBasis: 320},-});+const page: CSSProperties = {height: '100dvh'};+const columnRow: CSSProperties = {overflowX: 'auto', overflowY: 'hidden'};+const scrollable: CSSProperties = {overflowY: 'auto'};+const fixedColumn: CSSProperties = {flexShrink: 0};+const detailColumn: CSSProperties = {flexGrow: 1, flexShrink: 0, flexBasis: 320};function findItem(items: FileSystemItem[], id: string): FileSystemItem | null {for (const item of items) {@@ -348,7 +345,7 @@ export default function FileExplorerPage() {return (<Layout- xstyle={styles.page}+ style={page}height="fill"header={<Toolbar@@ -448,7 +445,7 @@ export default function FileExplorerPage() {}content={<LayoutContent padding={0} isScrollable={false}>- <HStack height="100%" xstyle={styles.columnRow}>+ <HStack height="100%" style={columnRow}>{columns.map((col, colIndex) => {const showDivider =colIndex < columns.length - 1 || selectedFile != null;@@ -459,7 +456,7 @@ export default function FileExplorerPage() {padding={2}variant="transparent"dividers={showDivider ? ['end'] : undefined}- xstyle={[styles.scrollable, styles.fixedColumn]}>+ style={{...scrollable, ...fixedColumn}}><List density="compact" hasDividers={false}>{col.items.map(item => {const isSelected = col.selectedId === item.id;@@ -506,7 +503,7 @@ export default function FileExplorerPage() {<Sectionpadding={6}variant="transparent"- xstyle={[styles.scrollable, styles.detailColumn]}>+ style={{...scrollable, ...detailColumn}}><VStack gap={4} hAlign="center"><Avatar name={selectedFile.name} size={96} /><VStack gap={1} hAlign="center">diff --git a/packages/cli/templates/pages/form-two-column/page.tsx b/packages/cli/templates/pages/form-two-column/page.tsxindex ea3727c33d..40cdc1058a 100644--- a/packages/cli/templates/pages/form-two-column/page.tsx+++ b/packages/cli/templates/pages/form-two-column/page.tsx@@ -2,8 +2,7 @@'use client';-import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useState, type CSSProperties} from 'react';import {VStack, HStack} from '@astryxdesign/core/Layout';import {Center} from '@astryxdesign/core/Center';import {Section} from '@astryxdesign/core/Section';@@ -18,7 +17,6 @@ import {Link} from '@astryxdesign/core/Link';import {Divider} from '@astryxdesign/core/Divider';import {Card} from '@astryxdesign/core/Card';import {Selector} from '@astryxdesign/core/Selector';-import {radiusVars} from '@astryxdesign/core/theme/tokens.stylex';const ILLUSTRATION_URL ='https://lookaside.facebook.com/assets/astryx/light-working-vertical-2.png';@@ -51,18 +49,16 @@ const CONTACT_COLUMNS = [// AspectRatio has no objectFit/radius prop and there's no Image primitive// (#2582), so the cover photo is styled directly. overflow:hidden masks the// cover crop to the rounded corners.-const styles = stylex.create({- page: {- minHeight: '100%',- },- illustrationImg: {- width: '100%',- height: '100%',- objectFit: 'cover',- borderRadius: radiusVars['--radius-container'],- overflow: 'hidden',- },-});+const pageStyle: CSSProperties = {+ minHeight: '100%',+};+const illustrationImg: CSSProperties = {+ width: '100%',+ height: '100%',+ objectFit: 'cover',+ borderRadius: 'var(--radius-container)',+ overflow: 'hidden',+};/*** Form (Two-column) — marketing contact form template.@@ -95,7 +91,7 @@ export default function FormTwoColumnPage() {const handleSubmit = () => setSubmitted(true);return (- <Center xstyle={styles.page}>+ <Center style={pageStyle}><Section maxWidth={1100} width="100%" padding={10} variant="transparent"><VStack gap={10}>{/* Two-column; stacks to one column below ~520px. */}@@ -114,7 +110,7 @@ export default function FormTwoColumnPage() {<imgsrc={ILLUSTRATION_URL}alt="Two people working at a desk"- {...stylex.props(styles.illustrationImg)}+ style={illustrationImg}/></AspectRatio></VStack>diff --git a/packages/cli/templates/pages/gallery-hero/page.tsx b/packages/cli/templates/pages/gallery-hero/page.tsxindex c99ed8065c..bc30dae6b0 100644--- a/packages/cli/templates/pages/gallery-hero/page.tsx+++ b/packages/cli/templates/pages/gallery-hero/page.tsx@@ -2,7 +2,7 @@'use client';-import * as stylex from '@stylexjs/stylex';+import type {CSSProperties} from 'react';import {VStack,HStack,@@ -35,18 +35,16 @@ const IMAGES = [// because Astryx has no image primitive — AspectRatio exposes no objectFit or// radius props and there's no Image. Tracked in issue #2582; replace these// with component props once it lands.-const styles = stylex.create({- // Fills the AspectRatio box. No objectFit prop on AspectRatio (#2582).- galleryImage: {- width: '100%',- height: '100%',- objectFit: 'cover',- },- // Rounds the image corners. No radius prop on AspectRatio (#2582).- galleryImageClip: {- borderRadius: 'var(--radius-container)',- },-});+// Fills the AspectRatio box. No objectFit prop on AspectRatio (#2582).+const galleryImage: CSSProperties = {+ width: '100%',+ height: '100%',+ objectFit: 'cover',+};+// Rounds the image corners. No radius prop on AspectRatio (#2582).+const galleryImageClip: CSSProperties = {+ borderRadius: 'var(--radius-container)',+};export default function GalleryHero() {return (@@ -88,9 +86,9 @@ export default function GalleryHero() {<AspectRatiokey={image.src}ratio={4 / 5}- xstyle={styles.galleryImageClip}>+ style={galleryImageClip}><img- {...stylex.props(styles.galleryImage)}+ style={galleryImage}src={image.src}alt={image.alt}/>diff --git a/packages/cli/templates/pages/ide/page.tsx b/packages/cli/templates/pages/ide/page.tsxindex 80f239808a..0b0f94859e 100644--- a/packages/cli/templates/pages/ide/page.tsx+++ b/packages/cli/templates/pages/ide/page.tsx@@ -2,14 +2,12 @@'use client';-import {useState, useMemo} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useState, useMemo, type CSSProperties} from 'react';import {Layout, LayoutContent, LayoutPanel} from '@astryxdesign/core/Layout';import {ResizeHandle, useResizable} from '@astryxdesign/core/Resizable';import {Text, Heading} from '@astryxdesign/core/Text';import {CodeBlock} from '@astryxdesign/core/CodeBlock';-import {colorVars, spacingVars} from '@astryxdesign/core/theme/tokens.stylex';import {Stack, StackItem} from '@astryxdesign/core/Layout';import {useMediaQuery} from '@astryxdesign/core/hooks';import {TabList, Tab} from '@astryxdesign/core/TabList';@@ -30,7 +28,7 @@ import {MagnifyingGlassIcon,} from '@heroicons/react/24/outline';-const styles = stylex.create({+const styles: Record<string, CSSProperties> = {contentFill: {height: '100%',},@@ -40,16 +38,16 @@ const styles = stylex.create({display: 'grid',},tabListPadding: {- paddingTop: spacingVars['--spacing-2'],+ paddingTop: 'var(--spacing-2)',},metadataCompact: {- gap: `${spacingVars['--spacing-1']} ${spacingVars['--spacing-3']}`,+ gap: 'var(--spacing-1) var(--spacing-3)',},historyTimelineDot: {width: 8,height: 8,borderRadius: '50%',- backgroundColor: colorVars['--color-border-emphasized'],+ backgroundColor: 'var(--color-border-emphasized)',marginTop: 6,flexShrink: 0,},@@ -75,26 +73,23 @@ const styles = stylex.create({height: '100%',overflow: 'hidden',},-});+};const EDITOR_CODE = `import {useState, useCallback} from 'react';-import * as stylex from '@stylexjs/stylex';import {Button} from '@astryxdesign/core/Button';import {Text} from '@astryxdesign/core/Text';-const styles = stylex.create({- container: {- display: 'flex',- flexDirection: 'column',- gap: 8,- padding: 16,- },- counter: {- fontSize: 48,- fontWeight: 700,- fontVariantNumeric: 'tabular-nums',- },-});+const containerStyle = {+ display: 'flex',+ flexDirection: 'column',+ gap: 8,+ padding: 16,+};+const counterStyle = {+ fontSize: 48,+ fontWeight: 700,+ fontVariantNumeric: 'tabular-nums',+};export default function Counter() {const [count, setCount] = useState(0);@@ -108,9 +103,9 @@ export default function Counter() {}, []);return (- <div {...stylex.props(styles.container)}>+ <div style={containerStyle}><Text type="label">Counter</Text>- <span {...stylex.props(styles.counter)}>+ <span style={counterStyle}>{count}</span><Button label="Increment" onClick={increment} />@@ -172,7 +167,7 @@ function buildFileTree(label: label('styles'),startContent: <Icon icon={FolderIcon} size="xsm" />,isExpanded: true,- children: [file('tokens.stylex.ts'), file('theme.ts')],+ children: [file('tokens.ts'), file('theme.ts')],},],},@@ -196,7 +191,7 @@ const PROPERTIES = [const HISTORY_ITEMS = [{label: 'Opened Counter.tsx', time: '2 min ago'},{label: 'Opened Layout.tsx', time: '6 min ago'},- {label: 'Viewed tokens.stylex.ts', time: '11 min ago'},+ {label: 'Viewed tokens.ts', time: '11 min ago'},];export default function ResizableWorkspacePage() {@@ -248,7 +243,7 @@ export default function ResizableWorkspacePage() {padding={0}><Stackdirection="vertical"- xstyle={styles.fileExplorer}+ style={styles.fileExplorer}gap={2}><TextInputlabel="Search files"@@ -278,8 +273,8 @@ export default function ResizableWorkspacePage() {height="fill"content={<LayoutContent padding={0}>- <Stack direction="vertical" xstyle={styles.contentFill}>- <StackItem size="fill" xstyle={styles.editorArea}>+ <Stack direction="vertical" style={styles.contentFill}>+ <StackItem size="fill" style={styles.editorArea}><CodeBlockcode={EDITOR_CODE}language="typescript"@@ -314,13 +309,13 @@ export default function ResizableWorkspacePage() {}}><Stackdirection="vertical"- xstyle={styles.contentFill}>+ style={styles.contentFill}><TabListvalue={activeTermTab}onChange={val => setActiveTermTab(val)}size="sm"hasDivider={false}- xstyle={styles.tabListPadding}>+ style={styles.tabListPadding}><Tab label="Terminal" value="terminal" /><Tab label="Problems" value="problems" /><Tab label="Output" value="output" />@@ -328,7 +323,7 @@ export default function ResizableWorkspacePage() {</TabList><StackItemsize="fill"- xstyle={styles.terminalWrapper}>+ style={styles.terminalWrapper}><CodeBlockcode={TERMINAL_OUTPUT}language="bash"@@ -369,7 +364,7 @@ export default function ResizableWorkspacePage() {<Stackdirection="vertical"gap={3}- xstyle={styles.propertiesPanel}>+ style={styles.propertiesPanel}><SegmentedControllabel="Properties panel sections"value={activePropertiesTab}@@ -389,7 +384,7 @@ export default function ResizableWorkspacePage() {<Stackdirection="vertical"gap={3}- xstyle={styles.propertiesContent}>+ style={styles.propertiesContent}><Stack direction="vertical" gap={1}><Heading level={3} maxLines={1}>{activeFile}@@ -401,7 +396,7 @@ export default function ResizableWorkspacePage() {src/components/{activeFile}</Text></Stack>- <MetadataList xstyle={styles.metadataCompact}>+ <MetadataList style={styles.metadataCompact}>{PROPERTIES.map(prop => (<MetadataListItemkey={prop.label}@@ -413,7 +408,7 @@ export default function ResizableWorkspacePage() {<Stackdirection="vertical"gap={2}- xstyle={styles.propertyActions}>+ style={styles.propertyActions}><Buttonlabel="Format Document"size="sm"@@ -448,9 +443,7 @@ export default function ResizableWorkspacePage() {}startContent={<span- {...stylex.props(- styles.historyTimelineDot,- )}+ style={styles.historyTimelineDot}/>}/>diff --git a/packages/cli/templates/pages/library/page.tsx b/packages/cli/templates/pages/library/page.tsxindex ff8d188e41..3fada55f1f 100644--- a/packages/cli/templates/pages/library/page.tsx+++ b/packages/cli/templates/pages/library/page.tsx@@ -2,8 +2,7 @@'use client';-import {useState, useMemo} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useState, useMemo, type CSSProperties} from 'react';import {Layout, LayoutHeader, LayoutContent} from '@astryxdesign/core/Layout';import {Text, Heading} from '@astryxdesign/core/Text';import {Card} from '@astryxdesign/core/Card';@@ -320,21 +319,19 @@ const ITEMS: LibraryItem[] = [},];-const styles = stylex.create({- thumbnailWrapper: {- position: 'relative',- aspectRatio: '16/9',- overflow: 'clip',- flexShrink: 0,- },- thumbnailImage: {- position: 'absolute',- inset: 0,- width: '100%',- height: '100%',- objectFit: 'cover',- },-});+const thumbnailWrapper: CSSProperties = {+ position: 'relative',+ aspectRatio: '16/9',+ overflow: 'clip',+ flexShrink: 0,+};+const thumbnailImage: CSSProperties = {+ position: 'absolute',+ inset: 0,+ width: '100%',+ height: '100%',+ objectFit: 'cover',+};// =============================================================================// Side Nav@@ -343,12 +340,8 @@ const styles = stylex.create({function LibraryCard({item}: {item: LibraryItem}) {return (<Card padding={0}>- <div {...stylex.props(styles.thumbnailWrapper)}>- <img- src={item.imageUrl}- alt={item.name}- {...stylex.props(styles.thumbnailImage)}- />+ <div style={thumbnailWrapper}>+ <img src={item.imageUrl} alt={item.name} style={thumbnailImage} /></div><Section variant="transparent" padding={4}><VStack gap={1}>diff --git a/packages/cli/templates/pages/login-card/page.tsx b/packages/cli/templates/pages/login-card/page.tsxindex 49d1c0e2c5..bc7f484ec7 100644--- a/packages/cli/templates/pages/login-card/page.tsx+++ b/packages/cli/templates/pages/login-card/page.tsx@@ -2,8 +2,7 @@'use client';-import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useState, type CSSProperties} from 'react';import {CubeIcon} from '@heroicons/react/24/outline';import {VStack} from '@astryxdesign/core/Layout';import {Center} from '@astryxdesign/core/Center';@@ -14,7 +13,6 @@ import {Card} from '@astryxdesign/core/Card';import {Link} from '@astryxdesign/core/Link';import {Divider} from '@astryxdesign/core/Divider';import {Icon} from '@astryxdesign/core/Icon';-import {colorVars, spacingVars} from '@astryxdesign/core/theme/tokens.stylex';// Brand sign-in marks — no heroicons or template-assets equivalent.const AppleIcon = (props: React.SVGProps<SVGSVGElement>) => (@@ -57,19 +55,17 @@ const GoogleIcon = (props: React.SVGProps<SVGSVGElement>) => ();// Standalone auth page paints its own body background (no host shell).-const styles = stylex.create({- page: {- minHeight: '100%',- backgroundColor: colorVars['--color-background-body'],- padding: spacingVars['--spacing-6'],- },- // Cap the column at 400px but let it shrink to fit narrow screens (Stack- // has no maxWidth prop, so it's set here).- content: {- width: '100%',- maxWidth: 400,- },-});+const pageStyle: CSSProperties = {+ minHeight: '100%',+ backgroundColor: 'var(--color-background-body)',+ padding: 'var(--spacing-6)',+};+// Cap the column at 400px but let it shrink to fit narrow screens (Stack+// has no maxWidth prop, so it's set here).+const contentStyle: CSSProperties = {+ width: '100%',+ maxWidth: 400,+};export default function LoginSimple() {const [email, setEmail] = useState('');@@ -91,8 +87,8 @@ export default function LoginSimple() {};return (- <Center axis="both" xstyle={styles.page}>- <VStack gap={4} hAlign="center" xstyle={styles.content}>+ <Center axis="both" style={pageStyle}>+ <VStack gap={4} hAlign="center" style={contentStyle}>{/* Logo */}<VStack gap={2} hAlign="center"><Icon icon={CubeIcon} size="lg" />diff --git a/packages/cli/templates/pages/login-split/page.tsx b/packages/cli/templates/pages/login-split/page.tsxindex 85fb084ad8..284d5888a4 100644--- a/packages/cli/templates/pages/login-split/page.tsx+++ b/packages/cli/templates/pages/login-split/page.tsx@@ -2,8 +2,7 @@'use client';-import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useState, type CSSProperties} from 'react';import {VStack, HStack, StackItem} from '@astryxdesign/core/Layout';import {Grid} from '@astryxdesign/core/Grid';import {Center} from '@astryxdesign/core/Center';@@ -17,7 +16,6 @@ import {TextInput} from '@astryxdesign/core/TextInput';import {Button} from '@astryxdesign/core/Button';import {Link} from '@astryxdesign/core/Link';import {Divider} from '@astryxdesign/core/Divider';-import {colorVars, spacingVars} from '@astryxdesign/core/theme/tokens.stylex';const COVER_IMAGE_URL ='https://lookaside.facebook.com/assets/astryx/light-working-vertical-1.png';@@ -34,47 +32,50 @@ const COLUMN_MIN_WIDTH = 240;// below 2×MIN + 32(gap) = 512px. The container query reorders the image and// tightens the inset at that same point, keyed to the card width (not the// window) so it never desyncs.-const STACK_QUERY = '@container login-split (max-width: 511px)';+// minHeight:100% fills the host so the centered card never leaves an unpainted+// band; padding keeps it off the surface edges.+const pageStyle: CSSProperties = {+ minHeight: '100%',+ backgroundColor: 'var(--color-background-body)',+ padding: 'var(--spacing-6)',+};+const cardWrap: CSSProperties = {+ width: '100%',+ maxWidth: 1000,+ marginInline: 'auto',+};+const coverImage: CSSProperties = {+ width: '100%',+ height: '100%',+ objectFit: 'cover',+};-const styles = stylex.create({- // minHeight:100% fills the host so the centered card never leaves an unpainted- // band; padding keeps it off the surface edges.- page: {- minHeight: '100%',- backgroundColor: colorVars['--color-background-body'],- padding: spacingVars['--spacing-6'],- },- cardWrap: {- width: '100%',- maxWidth: 1000,- marginInline: 'auto',- },- // Pad the grid, not the Card: the form's Section escapes Card's- // --container-padding-* vars, which would cancel the inset on the form side.- // containerType makes this the query container for STACK_QUERY.- splitGrid: {- containerType: 'inline-size',- containerName: 'login-split',- padding: {- default: spacingVars['--spacing-8'],- [STACK_QUERY]: spacingVars['--spacing-4'],- },- },- imageCell: {- // Fill the track: the image's Card is content-width by default.- width: '100%',- // order:-1 moves the image above the form when stacked.- order: {- default: 0,- [STACK_QUERY]: -1,- },- },- coverImage: {- width: '100%',- height: '100%',- objectFit: 'cover' as const,- },-});+// The container query lives in a plain <style> tag so it needs NO CSS compiler.+// - Pad the grid, not the Card: the form's Section escapes Card's+// --container-padding-* vars, which would cancel the inset on the form side.+// container-type makes the grid the query container for the stack point.+// - repeat:'fit' (auto-fit) collapses the two columns to one below 511px; the+// query reorders the image (order:-1) and tightens the inset at that point,+// keyed to the card width (not the window) so it never desyncs.+const LOGIN_SPLIT_CSS = `+.login-split-grid {+ container-type: inline-size;+ container-name: login-split;+ padding: var(--spacing-8);+}+.login-split-image {+ width: 100%;+ order: 0;+}+@container login-split (max-width: 511px) {+ .login-split-grid {+ padding: var(--spacing-4);+ }+ .login-split-image {+ order: -1;+ }+}+`;export default function LoginTwoColumn() {const [email, setEmail] = useState('');@@ -97,15 +98,16 @@ export default function LoginTwoColumn() {};return (- <Center axis="both" xstyle={styles.page}>+ <Center axis="both" style={pageStyle}>+ <style>{LOGIN_SPLIT_CSS}</style><VStack gap={4} width="100%">- <div {...stylex.props(styles.cardWrap)}>+ <div style={cardWrap}><Card padding={0} width="100%"><Gridcolumns={{minWidth: COLUMN_MIN_WIDTH, repeat: 'fit'}}gap={8}align="stretch"- xstyle={styles.splitGrid}>+ className="login-split-grid">{/* Form */}<Section variant="transparent" padding={0} height="100%"><VStack gap={4} height="100%">@@ -237,14 +239,14 @@ export default function LoginTwoColumn() {{/* Cover image — the transparent Card clips it to roundedcorners (overflow:clip + radius), so the image needs no radius. */}- <div {...stylex.props(styles.imageCell)}>+ <div className="login-split-image"><Cardvariant="transparent"padding={0}width="100%"height="100%"><img- {...stylex.props(styles.coverImage)}+ style={coverImage}src={COVER_IMAGE_URL}alt="Two people working at a desk"/>diff --git a/packages/cli/templates/pages/login-sso/page.tsx b/packages/cli/templates/pages/login-sso/page.tsxindex 4d8a50411b..3a09a6cf5f 100644--- a/packages/cli/templates/pages/login-sso/page.tsx+++ b/packages/cli/templates/pages/login-sso/page.tsx@@ -2,8 +2,7 @@'use client';-import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useState, type CSSProperties} from 'react';import {ShieldCheckIcon} from '@heroicons/react/24/outline';import {VStack, HStack} from '@astryxdesign/core/Layout';import {Center} from '@astryxdesign/core/Center';@@ -16,7 +15,6 @@ import {Link} from '@astryxdesign/core/Link';import {Divider} from '@astryxdesign/core/Divider';import {Icon} from '@astryxdesign/core/Icon';import {Avatar} from '@astryxdesign/core/Avatar';-import {spacingVars} from '@astryxdesign/core/theme/tokens.stylex';// ---------------------------------------------------------------------------// Styles@@ -24,15 +22,13 @@ import {spacingVars} from '@astryxdesign/core/theme/tokens.stylex';const BG_URL = 'https://lookaside.facebook.com/assets/astryx/building.png';-const styles = stylex.create({- page: {- minHeight: '100%',- backgroundImage: `url(${BG_URL})`,- backgroundSize: 'cover',- backgroundPosition: 'center',- padding: spacingVars['--spacing-6'],- },-});+const pageStyle: CSSProperties = {+ minHeight: '100%',+ backgroundImage: `url(${BG_URL})`,+ backgroundSize: 'cover',+ backgroundPosition: 'center',+ padding: 'var(--spacing-6)',+};type SSOProvider = {name: string;@@ -102,7 +98,7 @@ export default function LoginSSO() {};return (- <Center axis="both" xstyle={styles.page}>+ <Center axis="both" style={pageStyle}><Card padding={8} width="100%" maxWidth={400}><VStack gap={4} hAlign="stretch">{/* ── Step 1: Email entry ── */}diff --git a/packages/cli/templates/pages/login/page.tsx b/packages/cli/templates/pages/login/page.tsxindex 3578225db8..17165c8450 100644--- a/packages/cli/templates/pages/login/page.tsx+++ b/packages/cli/templates/pages/login/page.tsx@@ -2,8 +2,7 @@'use client';-import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useState, type CSSProperties} from 'react';import {VStack} from '@astryxdesign/core/Layout';import {Center} from '@astryxdesign/core/Center';import {Text, Heading} from '@astryxdesign/core/Text';@@ -13,22 +12,19 @@ import {Card} from '@astryxdesign/core/Card';import {Icon} from '@astryxdesign/core/Icon';import {Banner} from '@astryxdesign/core/Banner';import {CubeIcon} from '@heroicons/react/24/outline';-import {colorVars, spacingVars} from '@astryxdesign/core/theme/tokens.stylex';// Standalone auth page paints its own body background (no host shell).-const styles = stylex.create({- page: {- minHeight: '100%',- backgroundColor: colorVars['--color-background-body'],- padding: spacingVars['--spacing-6'],- },- // Cap the column at 400px but let it shrink to fit narrow screens (Stack- // has no maxWidth prop, so it's set here).- content: {- width: '100%',- maxWidth: 400,- },-});+const pageStyle: CSSProperties = {+ minHeight: '100%',+ backgroundColor: 'var(--color-background-body)',+ padding: 'var(--spacing-6)',+};+// Cap the column at 400px but let it shrink to fit narrow screens (Stack+// has no maxWidth prop, so it's set here).+const contentStyle: CSSProperties = {+ width: '100%',+ maxWidth: 400,+};export default function LoginPage() {const [email, setEmail] = useState('');@@ -47,8 +43,8 @@ export default function LoginPage() {};return (- <Center axis="both" xstyle={styles.page}>- <VStack gap={4} hAlign="center" xstyle={styles.content}>+ <Center axis="both" style={pageStyle}>+ <VStack gap={4} hAlign="center" style={contentStyle}>{/* Logo */}<VStack gap={2} hAlign="center"><Icon icon={CubeIcon} size="lg" />diff --git a/packages/cli/templates/pages/mixed-gallery/page.tsx b/packages/cli/templates/pages/mixed-gallery/page.tsxindex 513a0a6d04..0dc4eb9b2a 100644--- a/packages/cli/templates/pages/mixed-gallery/page.tsx+++ b/packages/cli/templates/pages/mixed-gallery/page.tsx@@ -2,54 +2,59 @@'use client';+import type {CSSProperties} from 'react';import {VStack, Layout, LayoutContent} from '@astryxdesign/core/Layout';import {Text, Heading} from '@astryxdesign/core/Text';import {AspectRatio} from '@astryxdesign/core/AspectRatio';-import * as stylex from '@stylexjs/stylex';// ─── Styles ────────────────────────────────────────────────────────────────// The masonry needs a responsive column count AND a hero that spans 2 columns// on desktop but goes full-width on mobile. Grid forces grid-template-columns// inline, so a responsive span can't be expressed through its props — this is a// @container grid (the sanctioned Astryx pattern for container-responsive layout).-// Image fill + radius are also custom because Astryx has no image primitive (#2582).+// The container query lives in a plain <style> tag below so it needs NO CSS+// compiler. Image fill + radius are custom because Astryx has no image+// primitive (#2582).-const styles = stylex.create({- // Named inline-size container on the page column so the grid responds to the- // available content width (works inside the sandbox's resizable preview).- container: {- containerType: 'inline-size',- containerName: 'gallery',- },- // 3 columns on desktop, dropping straight to 1 column below 720px (no 2-col- // middle state). minmax(0, 1fr) (not 1fr) so tracks split evenly and ignore- // the images' intrinsic min-width.- grid: {- display: 'grid',- gap: 'var(--spacing-3)',- gridTemplateColumns: {- default: 'repeat(3, minmax(0, 1fr))',- '@container gallery (max-width: 720px)': 'minmax(0, 1fr)',- },- },- // Hero spans 2 columns on desktop, then fills the row once it's single-column.- hero: {- gridColumn: {- default: 'span 2',- '@container gallery (max-width: 720px)': '1 / -1',- },- },- // Fills the AspectRatio box. No objectFit prop on AspectRatio (#2582).- img: {- width: '100%',- height: '100%',- objectFit: 'cover',- },- // Rounds the image corners. No radius prop on AspectRatio (#2582).- clip: {- borderRadius: 'var(--radius-element)',- },-});+// Named inline-size container on the page column so the grid responds to the+// available content width (works inside the sandbox's resizable preview).+const containerStyle: CSSProperties = {+ containerType: 'inline-size',+ containerName: 'gallery',+};+// Fills the AspectRatio box. No objectFit prop on AspectRatio (#2582).+const imgStyle: CSSProperties = {+ width: '100%',+ height: '100%',+ objectFit: 'cover',+};+// Rounds the image corners. No radius prop on AspectRatio (#2582).+const clipStyle: CSSProperties = {+ borderRadius: 'var(--radius-element)',+};++// 3 columns on desktop, dropping straight to 1 column below 720px (no 2-col+// middle state). minmax(0, 1fr) (not 1fr) so tracks split evenly and ignore the+// images' intrinsic min-width. The hero spans 2 columns on desktop, then fills+// the row once it's single-column.+const GALLERY_CSS = `+.mixed-gallery-grid {+ display: grid;+ gap: var(--spacing-3);+ grid-template-columns: repeat(3, minmax(0, 1fr));+}+.mixed-gallery-hero {+ grid-column: span 2;+}+@container gallery (max-width: 720px) {+ .mixed-gallery-grid {+ grid-template-columns: minmax(0, 1fr);+ }+ .mixed-gallery-hero {+ grid-column: 1 / -1;+ }+}+`;// ─── Gallery Data ───────────────────────────────────────────────────────────@@ -89,15 +94,15 @@ const IMAGES: GalleryImage[] = [function GalleryCard({image,ratio,- xstyle,+ className,}: {image: GalleryImage;ratio: number;- xstyle?: stylex.StyleXStyles;+ className?: string;}) {return (- <AspectRatio ratio={ratio} xstyle={[styles.clip, xstyle]}>- <img src={image.src} alt={image.title} {...stylex.props(styles.img)} />+ <AspectRatio ratio={ratio} className={className} style={clipStyle}>+ <img src={image.src} alt={image.title} style={imgStyle} /></AspectRatio>);}@@ -111,7 +116,8 @@ export default function MixedGalleryTemplate() {contentWidth={1400}content={<LayoutContent padding={6}>- <VStack gap={6} xstyle={styles.container}>+ <style>{GALLERY_CSS}</style>+ <VStack gap={6} style={containerStyle}>{/* Header */}<VStack gap={2} hAlign="center"><Heading level={1} justify="center">@@ -129,12 +135,12 @@ export default function MixedGalleryTemplate() {(being 2 columns wide) it matches the row height exactly. Allrows are therefore the same height. Responsive via @container:3 columns → 1 column at ≤720px. */}- <div {...stylex.props(styles.grid)}>+ <div className="mixed-gallery-grid">{/* Hero — spans 2 columns; 3:1 keeps it level with the sidebar */}<GalleryCardimage={IMAGES[0]}ratio={3 / 1}- xstyle={styles.hero}+ className="mixed-gallery-hero"/>{/* Sidebar — same height as the hero */}diff --git a/packages/cli/templates/pages/payment-form/page.tsx b/packages/cli/templates/pages/payment-form/page.tsxindex f825a44ffa..471f5b5bdd 100644--- a/packages/cli/templates/pages/payment-form/page.tsx+++ b/packages/cli/templates/pages/payment-form/page.tsx@@ -2,8 +2,7 @@'use client';-import {useState} from 'react';-import * as stylex from '@stylexjs/stylex';+import {useState, type CSSProperties} from 'react';import {VStack,HStack,@@ -36,12 +35,6 @@ import {ShieldCheckIcon} from '@heroicons/react/24/outline';import {LockClosedIcon} from '@heroicons/react/24/outline';import {CheckCircleIcon} from '@heroicons/react/24/outline';import {TruckIcon} from '@heroicons/react/24/outline';-import {- colorVars,- spacingVars,- radiusVars,- borderVars,-} from '@astryxdesign/core/theme/tokens.stylex';// ── Constants ─────────────────────────────────────────────────────────────────@@ -156,51 +149,48 @@ const TAX = 18.4;const fmt = (n: number) => `$${n.toFixed(2)}`;// ── Styles ────────────────────────────────────────────────────────────────────+// Plain inline styles using Astryx design-token CSS variables (declared at+// :root by `@astryxdesign/core/astryx.css`). No StyleX compiler required.-const styles = stylex.create({- fullWidth: {width: '100%'},- // LayoutContent clips overflow by default, which traps position:sticky- // children (the sticky order summary). With height="auto" the page scrolls- // at the window, so let overflow be visible here so sticky can pin.- visibleOverflow: {overflow: 'visible'},- // Form column flex-basis so the two checkout columns share width evenly.- formColBasis: {flexBasis: 0},- // Space the Order Summary content below its collapsible trigger title.- summaryContent: {paddingBlockStart: spacingVars['--spacing-2']},- // Order-summary column: sticky beside the form on desktop.- summarySticky: {- flexBasis: 0,- position: 'sticky',- top: spacingVars['--spacing-4'],- alignSelf: 'flex-start',- },- // On mobile the summary moves above the form.- summaryMobileOrder: {order: -1},- // Express-checkout brand buttons (fixed brand colors).- paypalButton: {backgroundColor: '#FFC439', borderColor: '#FFC439'},- // Official Google Pay dark button: black background with the unaltered- // dark-variant mark (white "Google Pay" text + full-color G), per the- // Google Pay brand guidelines.- gpayButton: {backgroundColor: '#000', borderColor: '#000'},- // Brand logos inside the express-checkout buttons.- paypalLogo: {height: spacingVars['--spacing-5'], width: 'auto'},- // Unaltered Google Pay mark (no filter/recolor — brand requirement),- // sized so it keeps comfortable clear space inside the lg button.- gpayLogo: {- height: spacingVars['--spacing-5'],- width: 'auto',- },- // Accepted card-network marks (Visa/Mastercard/Amex), shared style.- cardLogo: {- height: spacingVars['--spacing-7'],- width: 'auto',- borderRadius: radiusVars['--radius-element'],- borderWidth: borderVars['--border-width'],- borderStyle: 'solid',- borderColor: colorVars['--color-border'],- backgroundColor: colorVars['--color-background-surface'],- },-});+const fullWidth: CSSProperties = {width: '100%'};+// LayoutContent clips overflow by default, which traps position:sticky+// children (the sticky order summary). With height="auto" the page scrolls+// at the window, so let overflow be visible here so sticky can pin.+const visibleOverflow: CSSProperties = {overflow: 'visible'};+// Form column flex-basis so the two checkout columns share width evenly.+const formColBasis: CSSProperties = {flexBasis: 0};+// Space the Order Summary content below its collapsible trigger title.+const summaryContent: CSSProperties = {paddingBlockStart: 'var(--spacing-2)'};+// Order-summary column: sticky beside the form on desktop.+const summarySticky: CSSProperties = {+ flexBasis: 0,+ position: 'sticky',+ top: 'var(--spacing-4)',+ alignSelf: 'flex-start',+};+// On mobile the summary moves above the form.+const summaryMobileOrder: CSSProperties = {order: -1};+// Express-checkout brand buttons (fixed brand colors).+const paypalButton: CSSProperties = {+ backgroundColor: '#FFC439',+ borderColor: '#FFC439',+};+// Official Google Pay dark button: black background with the unaltered+// dark-variant mark (white "Google Pay" text + full-color G), per the+// Google Pay brand guidelines.+const gpayButton: CSSProperties = {backgroundColor: '#000', borderColor: '#000'};+// Brand logos inside the express-checkout buttons.+const brandLogo: CSSProperties = {height: 'var(--spacing-5)', width: 'auto'};+// Accepted card-network marks (Visa/Mastercard/Amex), shared style.+const cardLogo: CSSProperties = {+ height: 'var(--spacing-7)',+ width: 'auto',+ borderRadius: 'var(--radius-element)',+ borderWidth: 'var(--border-width)',+ borderStyle: 'solid',+ borderColor: 'var(--color-border)',+ backgroundColor: 'var(--color-background-surface)',+};export default function PaymentFormPage() {const isMobile = useMediaQuery('(max-width: 767px)');@@ -278,7 +268,7 @@ export default function PaymentFormPage() {<Layoutheight="auto"content={- <LayoutContent padding={0} xstyle={styles.visibleOverflow}>+ <LayoutContent padding={0} style={visibleOverflow}><Center axis="horizontal"><Sectionvariant="transparent"@@ -306,7 +296,7 @@ export default function PaymentFormPage() {vAlign="start"><StackItemsize="fill"- xstyle={isMobile ? undefined : styles.formColBasis}>+ style={isMobile ? undefined : formColBasis}><VStack gap={8}>{/* Sign in */}<VStack gap={1}>@@ -509,11 +499,11 @@ export default function PaymentFormPage() {variant="primary"size="lg"onClick={() => {}}- xstyle={styles.paypalButton}>+ style={paypalButton}><imgsrc="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-100px.png"alt="PayPal"- {...stylex.props(styles.paypalLogo)}+ style={brandLogo}/></Button>{/* Google Pay */}@@ -522,11 +512,11 @@ export default function PaymentFormPage() {variant="primary"size="lg"onClick={() => {}}- xstyle={styles.gpayButton}>+ style={gpayButton}><imgsrc="https://pay.google.com/about/static_kcs/images/logos/google-pay-logo.svg"alt="Google Pay"- {...stylex.props(styles.gpayLogo)}+ style={brandLogo}/></Button></Grid>@@ -552,17 +542,17 @@ export default function PaymentFormPage() {<imgsrc="https://raw.githubusercontent.com/aaronfagan/svg-credit-card-payment-icons/main/flat/visa.svg"alt="Visa"- {...stylex.props(styles.cardLogo)}+ style={cardLogo}/><imgsrc="https://raw.githubusercontent.com/aaronfagan/svg-credit-card-payment-icons/main/flat/mastercard.svg"alt="Mastercard"- {...stylex.props(styles.cardLogo)}+ style={cardLogo}/><imgsrc="https://raw.githubusercontent.com/aaronfagan/svg-credit-card-payment-icons/main/flat/amex.svg"alt="Amex"- {...stylex.props(styles.cardLogo)}+ style={cardLogo}/></HStack><TextInput@@ -719,7 +709,7 @@ export default function PaymentFormPage() {placeholder="Enter promo code"value={promo}onChange={setPromo}- xstyle={styles.fullWidth}+ style={fullWidth}/></StackItem><Button@@ -811,14 +801,14 @@ export default function PaymentFormPage() {label="Place Order"variant="primary"size="lg"- xstyle={styles.fullWidth}+ style={fullWidth}onClick={() => setSubmitted(true)}/><Buttonlabel="Continue Shopping"variant="secondary"size="lg"- xstyle={styles.fullWidth}+ style={fullWidth}onClick={() => {}}/></VStack>@@ -843,18 +833,14 @@ export default function PaymentFormPage() {<StackItemsize="fill"- xstyle={- isMobile- ? styles.summaryMobileOrder- : styles.summarySticky- }>+ style={isMobile ? summaryMobileOrder : summarySticky}><Card padding={5}><VStack gap={4}>{/* Accordion header — clickable on mobile only */}<Collapsibletrigger="Order Summary"defaultIsOpen={true}>- <VStack gap={4} xstyle={styles.summaryContent}>+ <VStack gap={4} style={summaryContent}>{/* Line items */}{ORDER_ITEMS.map(item => (<VStack key={item.id} gap={3}>diff --git a/packages/cli/templates/pages/product-detail/page.tsx b/packages/cli/templates/pages/product-detail/page.tsxindex cc64b048df..ef45e3d50a 100644--- a/packages/cli/templates/pages/product-detail/page.tsx+++ b/packages/cli/templates/pages/product-detail/page.tsx@@ -24,36 +24,34 @@ import {Divider} from '@astryxdesign/core/Divider';import {Collapsible, CollapsibleGroup} from '@astryxdesign/core/Collapsible';import {AspectRatio} from '@astryxdesign/core/AspectRatio';import {SelectableCard} from '@astryxdesign/core/SelectableCard';-import * as stylex from '@stylexjs/stylex';+import type {CSSProperties} from 'react';// Custom CSS here is limited to what Astryx components can't express today:// - image fill + corner radius (no Image primitive — #2582)// - the sticky info column (no sticky prop on Astryx layout primitives — #2613)-const pageStyles = stylex.create({- // Keeps the info column in view while the gallery scrolls. No sticky prop on- // Astryx layout primitives.- stickyInfo: {- position: 'sticky',- top: 'var(--spacing-8)',- alignSelf: 'start',- },- // Fills the AspectRatio box + rounds corners. No objectFit/radius props on- // AspectRatio (#2582).- heroImage: {- width: '100%',- height: '100%',- objectFit: 'cover',- borderRadius: 'var(--radius-container)',- },- // Fills the thumbnail card. Corner radius + selection ring come from- // SelectableCard; the image only needs to fill and cover (#2582).- thumbImage: {- width: '100%',- height: '100%',- objectFit: 'cover',- display: 'block',- },-});+// Keeps the info column in view while the gallery scrolls. No sticky prop on+// Astryx layout primitives.+const stickyInfo: CSSProperties = {+ position: 'sticky',+ top: 'var(--spacing-8)',+ alignSelf: 'start',+};+// Fills the AspectRatio box + rounds corners. No objectFit/radius props on+// AspectRatio (#2582).+const heroImage: CSSProperties = {+ width: '100%',+ height: '100%',+ objectFit: 'cover',+ borderRadius: 'var(--radius-container)',+};+// Fills the thumbnail card. Corner radius + selection ring come from+// SelectableCard; the image only needs to fill and cover (#2582).+const thumbImage: CSSProperties = {+ width: '100%',+ height: '100%',+ objectFit: 'cover',+ display: 'block',+};import {MinusIcon, PlusIcon, StarIcon} from '@heroicons/react/24/outline';import {StarIcon as StarIconSolid} from '@heroicons/react/24/solid';@@ -133,11 +131,7 @@ function ImageGallery({return (<VStack gap={3}><AspectRatio ratio={4 / 5}>- <img- {...stylex.props(pageStyles.heroImage)}- src={heroSrc}- alt={PRODUCT.name}- />+ <img style={heroImage} src={heroSrc} alt={PRODUCT.name} /></AspectRatio><Grid columns={3} gap={2}>{thumbnails.map((src, i) => (@@ -151,7 +145,7 @@ function ImageGallery({width="100%"height="100%"><img- {...stylex.props(pageStyles.thumbImage)}+ style={thumbImage}src={src}alt={`Product image ${i + 1}`}/>@@ -301,7 +295,7 @@ export default function ProductDetailTemplate() {selected={selectedThumb}onSelect={setSelectedThumb}/>- <VStack gap={0} xstyle={pageStyles.stickyInfo}>+ <VStack gap={0} style={stickyInfo}><ProductInfo /></VStack></Grid>diff --git a/packages/cli/templates/pages/product-gallery/page.tsx b/packages/cli/templates/pages/product-gallery/page.tsxindex 59404c6e6c..108d7f4def 100644--- a/packages/cli/templates/pages/product-gallery/page.tsx+++ b/packages/cli/templates/pages/product-gallery/page.tsx@@ -10,19 +10,17 @@ import {AspectRatio} from '@astryxdesign/core/AspectRatio';import {Card} from '@astryxdesign/core/Card';import {Icon} from '@astryxdesign/core/Icon';import {ArrowRightIcon} from '@heroicons/react/24/outline';-import * as stylex from '@stylexjs/stylex';+import type {CSSProperties} from 'react';// ─── Styles ─────────────────────────────────────────────────────────────────// The only custom CSS is the image fill — there is no Image primitive to// fill the AspectRatio box with `object-fit` (#2582).-const styles = stylex.create({- image: {- width: '100%',- height: '100%',- objectFit: 'cover',- },-});+const image: CSSProperties = {+ width: '100%',+ height: '100%',+ objectFit: 'cover',+};// ─── Product Data ───────────────────────────────────────────────────────────@@ -100,11 +98,7 @@ function ProductCard({product}: {product: Product}) {<VStack gap={3}><Card padding={0}><AspectRatio ratio={1}>- <img- src={product.image}- alt={product.name}- {...stylex.props(styles.image)}- />+ <img src={product.image} alt={product.name} style={image} /></AspectRatio></Card><VStack gap={1}>diff --git a/packages/cli/templates/pages/settings-dialog/page.tsx b/packages/cli/templates/pages/settings-dialog/page.tsxindex 18be0269e6..8be2c95487 100644--- a/packages/cli/templates/pages/settings-dialog/page.tsx+++ b/packages/cli/templates/pages/settings-dialog/page.tsx@@ -2,8 +2,7 @@'use client';-import React, {useState} from 'react';-import * as stylex from '@stylexjs/stylex';+import React, {useState, type CSSProperties} from 'react';import {VStack,HStack,@@ -26,11 +25,6 @@ import {TabList, Tab} from '@astryxdesign/core/TabList';import {Badge} from '@astryxdesign/core/Badge';import {Icon} from '@astryxdesign/core/Icon';import {Center} from '@astryxdesign/core/Center';-import {- colorVars,- radiusVars,- spacingVars,-} from '@astryxdesign/core/theme/tokens.stylex';import {UserIcon,LockClosedIcon,@@ -46,33 +40,31 @@ import {ShareIcon,} from '@heroicons/react/24/outline';-const styles = stylex.create({- iconBox: {- borderRadius: radiusVars['--radius-container'],- backgroundColor: colorVars['--color-background-surface'],- flexShrink: 0,- },- // Sticky dialog header bar — no Astryx prop for sticky/background/z-index.- // Inline + block padding comes from the parent LayoutContent `padding`.- headerSticky: {- position: 'sticky',- top: 0,- backgroundColor: colorVars['--color-background-surface'],- zIndex: 1,- },- // No `maxWidth` prop on VStack — width only. Inline padding comes from- // the parent LayoutContent `padding`.- contentMaxWidth: {- maxWidth: 680,- },- // Aligns the sidebar heading with list-item label text. No heading margin prop.- sideNavHeading: {- marginInline: spacingVars['--spacing-4'],- },- dialogHeight: {- height: '85vh',- },-});+const iconBox: CSSProperties = {+ borderRadius: 'var(--radius-container)',+ backgroundColor: 'var(--color-background-surface)',+ flexShrink: 0,+};+// Sticky dialog header bar — no Astryx prop for sticky/background/z-index.+// Inline + block padding comes from the parent LayoutContent `padding`.+const headerSticky: CSSProperties = {+ position: 'sticky',+ top: 0,+ backgroundColor: 'var(--color-background-surface)',+ zIndex: 1,+};+// No `maxWidth` prop on VStack — width only. Inline padding comes from+// the parent LayoutContent `padding`.+const contentMaxWidth: CSSProperties = {+ maxWidth: 680,+};+// Aligns the sidebar heading with list-item label text. No heading margin prop.+const sideNavHeading: CSSProperties = {+ marginInline: 'var(--spacing-4)',+};+const dialogHeight: CSSProperties = {+ height: '85vh',+};const NAV_ITEMS = [{label: 'Personal information', icon: UserIcon},@@ -274,7 +266,7 @@ export default function SettingsDialogTemplate() {maxHeight="85vh"padding={0}purpose="form"- xstyle={styles.dialogHeight}>+ style={dialogHeight}><Layoutheight="fill"start={@@ -284,7 +276,7 @@ export default function SettingsDialogTemplate() {role="navigation"padding={3}><VStack gap={4}>- <Heading level={2} xstyle={styles.sideNavHeading}>+ <Heading level={2} style={sideNavHeading}>Account settings</Heading><List density="spacious">@@ -315,7 +307,7 @@ export default function SettingsDialogTemplate() {content={<LayoutContent isScrollable padding={6}><VStack gap={6}>- <VStack xstyle={styles.headerSticky}>+ <VStack style={headerSticky}><DialogHeadertitle={activeNav === 'Personal information'@@ -326,7 +318,7 @@ export default function SettingsDialogTemplate() {hasDivider={false}/></VStack>- <VStack gap={0} xstyle={styles.contentMaxWidth}>+ <VStack gap={0} style={contentMaxWidth}>{activeNav === 'Personal information' && (<VStack gap={6}><VStack gap={4}>@@ -441,7 +433,7 @@ export default function SettingsDialogTemplate() {<Centerwidth={48}height={48}- xstyle={styles.iconBox}>+ style={iconBox}><Icon icon={LockClosedIcon} /></Center><VStack gap={0}>@@ -465,7 +457,7 @@ export default function SettingsDialogTemplate() {<Centerwidth={48}height={48}- xstyle={styles.iconBox}>+ style={iconBox}><Icon icon={PencilSquareIcon} /></Center><VStack gap={0}>@@ -491,7 +483,7 @@ export default function SettingsDialogTemplate() {<Centerwidth={48}height={48}- xstyle={styles.iconBox}>+ style={iconBox}><Icon icon={ShareIcon} /></Center><VStack gap={0}>@@ -620,7 +612,7 @@ export default function SettingsDialogTemplate() {<Centerwidth={48}height={48}- xstyle={styles.iconBox}>+ style={iconBox}><Icon icon={LockClosedIcon} /></Center><VStack gap={1}>@@ -813,7 +805,7 @@ export default function SettingsDialogTemplate() {<Centerwidth={48}height={48}- xstyle={styles.iconBox}>+ style={iconBox}><Icon icon={ShieldCheckIcon} /></Center><VStack gap={1}>diff --git a/packages/cli/templates/pages/settings-sidebar/page.tsx b/packages/cli/templates/pages/settings-sidebar/page.tsxindex 7bd9566acc..ae5a0aaaf0 100644--- a/packages/cli/templates/pages/settings-sidebar/page.tsx+++ b/packages/cli/templates/pages/settings-sidebar/page.tsx@@ -2,9 +2,8 @@'use client';-import {useState} from 'react';+import {useState, type CSSProperties} from 'react';import {useMediaQuery} from '@astryxdesign/core/hooks';-import * as stylex from '@stylexjs/stylex';import {VStack,HStack,@@ -27,11 +26,6 @@ import {TabList, Tab} from '@astryxdesign/core/TabList';import {Badge} from '@astryxdesign/core/Badge';import {Icon} from '@astryxdesign/core/Icon';import {Center} from '@astryxdesign/core/Center';-import {- colorVars,- radiusVars,- spacingVars,-} from '@astryxdesign/core/theme/tokens.stylex';import {UserIcon,LockClosedIcon,@@ -49,29 +43,27 @@ import {ChevronRightIcon,} from '@heroicons/react/24/outline';-const styles = stylex.create({- // Anchor the page to the viewport height so the sidebar + content fill the- // screen. Layout height="fill" is min-height:100% which collapses when the- // host container is content-sized; Layout has no viewport-height prop.- fillViewport: {- minHeight: '100dvh',- },- iconBox: {- borderRadius: radiusVars['--radius-container'],- backgroundColor: colorVars['--color-background-surface'],- flexShrink: 0,- },- rowPadding: {- paddingBlock: spacingVars['--spacing-4'],- },- sideNavPadding: {- paddingBlock: spacingVars['--spacing-4'],- paddingInline: spacingVars['--spacing-3'],- },- sideNavHeading: {- marginInline: spacingVars['--spacing-4'],- },-});+// Anchor the page to the viewport height so the sidebar + content fill the+// screen. Layout height="fill" is min-height:100% which collapses when the+// host container is content-sized; Layout has no viewport-height prop.+const fillViewport: CSSProperties = {+ minHeight: '100dvh',+};+const iconBox: CSSProperties = {+ borderRadius: 'var(--radius-container)',+ backgroundColor: 'var(--color-background-surface)',+ flexShrink: 0,+};+const rowPadding: CSSProperties = {+ paddingBlock: 'var(--spacing-4)',+};+const sideNavPadding: CSSProperties = {+ paddingBlock: 'var(--spacing-4)',+ paddingInline: 'var(--spacing-3)',+};+const sideNavHeading: CSSProperties = {+ marginInline: 'var(--spacing-4)',+};const NAV_ITEMS = [{label: 'Personal information', icon: UserIcon},@@ -129,7 +121,7 @@ const DEVICE_ROWS: {function InfoRowItem({label, value, action}: InfoRow) {return (<>- <HStack hAlign="between" vAlign="start" xstyle={styles.rowPadding}>+ <HStack hAlign="between" vAlign="start" style={rowPadding}><VStack gap={0}><Text type="body" weight="semibold" display="block">{label}@@ -167,7 +159,7 @@ function ExpandableRow({return (<>{isExpanded ? (- <VStack gap={4} xstyle={styles.rowPadding}>+ <VStack gap={4} style={rowPadding}><Text type="body" weight="semibold" display="block">{label}</Text>@@ -178,7 +170,7 @@ function ExpandableRow({</HStack></VStack>) : (- <HStack hAlign="between" vAlign="start" xstyle={styles.rowPadding}>+ <HStack hAlign="between" vAlign="start" style={rowPadding}><VStack gap={0}><Text type="body" weight="semibold" display="block">{label}@@ -263,8 +255,8 @@ export default function SettingsSecurityTemplate() {};const navList = (- <VStack gap={4} xstyle={styles.sideNavPadding}>- <Heading level={2} xstyle={styles.sideNavHeading}>+ <VStack gap={4} style={sideNavPadding}>+ <Heading level={2} style={sideNavHeading}>Account settings</Heading><List density="spacious">@@ -299,7 +291,7 @@ export default function SettingsSecurityTemplate() {return (<Layoutheight="fill"- xstyle={styles.fillViewport}+ style={fillViewport}content={<LayoutContent padding={2}>{navList}</LayoutContent>}/>);@@ -309,7 +301,7 @@ export default function SettingsSecurityTemplate() {<Layoutheight="fill"contentWidth={1200}- xstyle={styles.fillViewport}+ style={fillViewport}start={isNarrow ? undefined : (<LayoutPanel hasDivider padding={0}>@@ -385,7 +377,7 @@ export default function SettingsSecurityTemplate() {key={i}gap={3}vAlign="start"- xstyle={styles.rowPadding}>+ style={rowPadding}><Icon icon={ComputerDesktopIcon} /><StackItem size="fill"><VStack gap={0}>@@ -419,7 +411,7 @@ export default function SettingsSecurityTemplate() {<HStackhAlign="between"vAlign="start"- xstyle={styles.rowPadding}>+ style={rowPadding}><VStack gap={0}><Texttype="body"@@ -459,7 +451,7 @@ export default function SettingsSecurityTemplate() {<Centerwidth={48}height={48}- xstyle={styles.iconBox}>+ style={iconBox}><Icon icon={LockClosedIcon} /></Center><VStack gap={1}>@@ -659,7 +651,7 @@ export default function SettingsSecurityTemplate() {<Card padding={4}><VStack gap={4}><HStack gap={3} vAlign="start">- <Center width={48} height={48} xstyle={styles.iconBox}>+ <Center width={48} height={48} style={iconBox}><Icon icon={LockClosedIcon} /></Center><VStack gap={0}>@@ -677,7 +669,7 @@ export default function SettingsSecurityTemplate() {</HStack><Divider /><HStack gap={3} vAlign="start">- <Center width={48} height={48} xstyle={styles.iconBox}>+ <Center width={48} height={48} style={iconBox}><Icon icon={PencilSquareIcon} /></Center><VStack gap={0}>@@ -697,7 +689,7 @@ export default function SettingsSecurityTemplate() {</HStack><Divider /><HStack gap={3} vAlign="start">- <Center width={48} height={48} xstyle={styles.iconBox}>+ <Center width={48} height={48} style={iconBox}><Icon icon={ShareIcon} /></Center><VStack gap={0}>@@ -725,7 +717,7 @@ export default function SettingsSecurityTemplate() {<VStack gap={8}><VStack gap={0}><Heading level={3}>Messages</Heading>- <VStack xstyle={styles.rowPadding}>+ <VStack style={rowPadding}><Switchlabel="Show people when I've read their messages."value={readReceipts}@@ -737,7 +729,7 @@ export default function SettingsSecurityTemplate() {<HStackhAlign="between"vAlign="center"- xstyle={styles.rowPadding}>+ style={rowPadding}><Text type="body" weight="semibold">Blocked people</Text>@@ -748,7 +740,7 @@ export default function SettingsSecurityTemplate() {<VStack gap={0}><Heading level={3}>Listings</Heading>- <VStack xstyle={styles.rowPadding}>+ <VStack style={rowPadding}><Switchlabel="Include my listing(s) in search engines"description="Turning this on means search engines, like Google, will display your listing page(s) in search results."@@ -833,7 +825,7 @@ export default function SettingsSecurityTemplate() {<Centerwidth={48}height={48}- xstyle={styles.iconBox}>+ style={iconBox}><Icon icon={ShieldCheckIcon} /></Center><VStack gap={1}>diff --git a/packages/cli/templates/pages/side-gallery/page.tsx b/packages/cli/templates/pages/side-gallery/page.tsxindex 411b7d102a..9de01b8e76 100644--- a/packages/cli/templates/pages/side-gallery/page.tsx+++ b/packages/cli/templates/pages/side-gallery/page.tsx@@ -13,21 +13,18 @@ import {Button} from '@astryxdesign/core/Button';import {AspectRatio} from '@astryxdesign/core/AspectRatio';import {Grid} from '@astryxdesign/core/Grid';import {Divider} from '@astryxdesign/core/Divider';-import * as stylex from '@stylexjs/stylex';-// Image fill is a plain inline style (not stylex) so it survives the playground-// preview's runtime TS compile, which doesn't run the StyleX babel plugin.+// Image fill is a plain inline style so it renders without any CSS compiler+// (works in the playground preview's runtime TS compile too).const imageStyle = {width: '100%',height: '100%',objectFit: 'cover' as const,};-const styles = stylex.create({- imageClip: {- borderRadius: 'var(--radius-element)',- },-});+const imageClip = {+ borderRadius: 'var(--radius-element)',+};// ─── Image Data ─────────────────────────────────────────────────────────────@@ -91,7 +88,7 @@ function ImageGrid() {return (<Grid columns={3} gap={3}>{IMAGES.map(img => (- <AspectRatio key={img.src} ratio={1} xstyle={styles.imageClip}>+ <AspectRatio key={img.src} ratio={1} style={imageClip}><img src={img.src} alt={img.alt} style={imageStyle} /></AspectRatio>))}diff --git a/packages/cli/templates/pages/table-grouped/page.tsx b/packages/cli/templates/pages/table-grouped/page.tsxindex d463a1636a..9cb4f8de33 100644--- a/packages/cli/templates/pages/table-grouped/page.tsx+++ b/packages/cli/templates/pages/table-grouped/page.tsx@@ -5,7 +5,6 @@import React, {useState, useMemo} from 'react';import {useResizable, ResizeHandle} from '@astryxdesign/core/Resizable';import type {ResizableProps} from '@astryxdesign/core/Resizable';-import * as stylex from '@stylexjs/stylex';import {Layout,LayoutContent,@@ -56,15 +55,15 @@ import {import {XMarkIcon} from '@heroicons/react/24/outline';import {ChartBarIcon} from '@heroicons/react/24/solid';-const pageStyles = stylex.create({- groupHeaderRow: {- cursor: 'pointer',- backgroundColor: 'var(--color-background-muted)',- },- groupHeaderCell: {- padding: 'var(--spacing-3) var(--spacing-4)',- },-});+// Plain inline styles using Astryx design-token CSS variables (declared at+// :root by `@astryxdesign/core/astryx.css`). No StyleX compiler required.+// The group-header background + cursor live on the colSpan TableCell (which+// reliably forwards `style`) so they fill the full row width.+const groupHeaderCell: React.CSSProperties = {+ cursor: 'pointer',+ backgroundColor: 'var(--color-background-muted)',+ padding: 'var(--spacing-3) var(--spacing-4)',+};// Typestype TaskStatus = 'in_progress' | 'todo' | 'backlog' | 'done';@@ -988,11 +987,8 @@ export default function DataTableTemplate() {e.preventDefault();toggleGroup(key);}- }}- xstyle={[pageStyles.groupHeaderRow]}>- <TableCell- colSpan={COL_COUNT}- xstyle={pageStyles.groupHeaderCell}>+ }}>+ <TableCell colSpan={COL_COUNT} style={groupHeaderCell}><HStack gap={2} vAlign="center"><Iconicon={diff --git a/packages/cli/templates/pages/theme-showcase/page.tsx b/packages/cli/templates/pages/theme-showcase/page.tsxindex 859d346f3b..9e64b077ac 100644--- a/packages/cli/templates/pages/theme-showcase/page.tsx+++ b/packages/cli/templates/pages/theme-showcase/page.tsx@@ -3,7 +3,6 @@'use client';import {type CSSProperties, type ReactNode} from 'react';-import * as stylex from '@stylexjs/stylex';import {Plus,Search,@@ -55,10 +54,10 @@ import {ChatSystemMessage,} from '@astryxdesign/core/Chat';-// Styles passed to Astryx components via their `xstyle` prop. These are-// applied by the components themselves, so they work in compiled builds-// and in the live playground preview alike.-const styles = stylex.create({+// Styles passed to Astryx components via their `style` prop. Astryx components+// forward the DOM `style` prop, so these work with no CSS compiler — in+// compiled builds and in the live playground preview alike.+const styles: Record<string, CSSProperties> = {card: {backgroundColor: 'var(--color-background-body)',color: 'var(--color-text-primary)',@@ -169,14 +168,11 @@ const styles = stylex.create({cartButton: {flex: 1,},-});+};// Styles applied directly to plain DOM elements via the `style` prop.-// Kept as inline styles (rather than stylex.create) so they render in the-// playground preview, which can't compile StyleX — `stylex.props()` is a-// no-op there, so raw `{...stylex.props(...)}` on a <div>/<img> would lose-// these declarations. All are static (no media/pseudo variants), so inline-// styles reproduce them exactly.+// Plain inline styles so they render with no CSS compiler. All are static+// (no media/pseudo variants), so inline styles reproduce them exactly.const inlineStyles: Record<string, CSSProperties> = {inventoryBannerWrap: {paddingInline: 'var(--spacing-6)',@@ -439,10 +435,10 @@ function StorePreview({/><Section padding={6} variant="transparent">- <VStack gap={10} xstyle={[styles.content, styles.contentFluid]}>+ <VStack gap={10} style={{...styles.content, ...styles.contentFluid}}><Center>- <VStack gap={4} hAlign="center" xstyle={styles.heroText}>- <Text type="display-2" xstyle={styles.heroHeadline}>+ <VStack gap={4} hAlign="center" style={styles.heroText}>+ <Text type="display-2" style={styles.heroHeadline}>Little joys,<br />everywhere you go@@ -457,7 +453,7 @@ function StorePreview({<Grid columns={isMobile ? 1 : {minWidth: 200, max: 3}} gap={4}>{products.map((p, i) => (<Card key={p.name} padding={0} height="100%">- <VStack gap={0} xstyle={styles.cardStack}>+ <VStack gap={0} style={styles.cardStack}><AspectRatio ratio={1}><imgsrc={images[PRODUCT_IMAGE_KEYS[i]]}@@ -469,17 +465,17 @@ function StorePreview({<VStackgap={2}hAlign="center"- xstyle={styles.cardStack}>+ style={styles.cardStack}><HStack><Badge label={p.badge} variant={p.badgeVariant} /></HStack>- <Heading level={2} xstyle={styles.centerText}>+ <Heading level={2} style={styles.centerText}>{p.name}</Heading><Texttype="supporting"color="secondary"- xstyle={[styles.cardDescription, styles.centerText]}>+ style={{...styles.cardDescription, ...styles.centerText}}>{p.description}</Text><HStack gap={2} vAlign="center" hAlign="center">@@ -491,14 +487,14 @@ function StorePreview({min={1}max={99}size="sm"- xstyle={styles.quantityInput}+ style={styles.quantityInput}/><Buttonlabel="Add to cart"variant="secondary"size="sm"href="#"- xstyle={styles.cartButton}+ style={styles.cartButton}/></HStack></VStack>@@ -516,11 +512,11 @@ function StorePreview({function CheckoutCard({isMobile}: {isMobile: boolean}) {return (- <Card padding={5} xstyle={styles.card}>- <VStack gap={4} xstyle={styles.checkoutStack}>+ <Card padding={5} style={styles.card}>+ <VStack gap={4} style={styles.checkoutStack}><Heading level={2}>Checkout</Heading>- <VStack gap={3} xstyle={styles.checkoutStack}>+ <VStack gap={3} style={styles.checkoutStack}><TextInputlabel="Email"placeholder="[email protected]"@@ -566,7 +562,7 @@ function CheckoutCard({isMobile}: {isMobile: boolean}) {/></RadioList>- <VStack gap={2} xstyle={styles.checkoutStack}>+ <VStack gap={2} style={styles.checkoutStack}><Text type="supporting" weight="bold">Payment method</Text>@@ -579,7 +575,7 @@ function CheckoutCard({isMobile}: {isMobile: boolean}) {<VStackgap={1}hAlign="center"- xstyle={styles.paymentCardContent}>+ style={styles.paymentCardContent}><CreditCard size={20} /><Text type="supporting" weight="bold">Card@@ -594,7 +590,7 @@ function CheckoutCard({isMobile}: {isMobile: boolean}) {<VStackgap={1}hAlign="center"- xstyle={styles.paymentCardContent}>+ style={styles.paymentCardContent}><Smartphone size={20} /><Text type="supporting" weight="bold">Apple Pay@@ -609,7 +605,7 @@ function CheckoutCard({isMobile}: {isMobile: boolean}) {<VStackgap={1}hAlign="center"- xstyle={styles.paymentCardContent}>+ style={styles.paymentCardContent}><Wallet size={20} /><Text type="supporting" weight="bold">Google Pay@@ -687,12 +683,12 @@ const SUGGESTED_QUESTIONS = [function ChatCard() {return (- <Card padding={0} xstyle={styles.chatCard}>+ <Card padding={0} style={styles.chatCard}><HStackhAlign="between"vAlign="center"gap={3}- xstyle={styles.chatHeader}>+ style={styles.chatHeader}><Heading level={2}>Studio AI</Heading><HStack gap={1} vAlign="center">@@ -894,8 +890,8 @@ function formatAmount(amount: number): string {function LatestActivityCard({isMobile}: {isMobile: boolean}) {return (- <Card padding={5} xstyle={styles.activityCard}>- <VStack gap={4} xstyle={styles.activityCardStack}>+ <Card padding={5} style={styles.activityCard}>+ <VStack gap={4} style={styles.activityCardStack}><Heading level={2}>Revenue</Heading><Grid columns={isMobile ? 1 : 2} gap={3}>@@ -920,7 +916,7 @@ function LatestActivityCard({isMobile}: {isMobile: boolean}) {<Link href="#">See all</Link></HStack>- <VStack gap={1} xstyle={styles.activityListFade}>+ <VStack gap={1} style={styles.activityListFade}>{ACTIVITY.map(item => (<Itemkey={item.id}@@ -1110,11 +1106,11 @@ function InventoryCard({row => row.available < LOW_STOCK_THRESHOLD,).length;return (- <Card padding={0} xstyle={styles.inventoryCard}>+ <Card padding={0} style={styles.inventoryCard}><HStackhAlign="between"vAlign="center"- xstyle={styles.inventoryHeader}>+ style={styles.inventoryHeader}><Heading level={2}>Inventory</Heading><Buttonlabel="Add item"@@ -1130,7 +1126,7 @@ function InventoryCard({gap={3}vAlign="center"hAlign="between"- xstyle={styles.inventoryFilterRow}>+ style={styles.inventoryFilterRow}><HStack gap={2} vAlign="center" style={{flex: 1, minWidth: 0}}><TextInputlabel="Search inventory"@@ -1139,7 +1135,7 @@ function InventoryCard({value=""onChange={() => {}}startIcon={<Search size={16} />}- xstyle={styles.searchInput}+ style={styles.searchInput}/><OverflowListgap={2}@@ -1226,7 +1222,7 @@ function InventoryCard({</div>)}- <div {...stylex.props(styles.inventoryTableWrap)}>+ <div style={styles.inventoryTableWrap}><Table<InventoryRow>data={inventory}columns={[