@app-studio/components 0.10.17 → 0.10.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/index.d.ts +41 -0
  2. package/dist/native/components/Alert/Alert/Alert.style.js +20 -20
  3. package/dist/native/components/Alert/Alert/Alert.style.js.map +1 -1
  4. package/dist/native/components/Alert/Alert/Alert.view.native.js.map +1 -1
  5. package/dist/native/components/AudioInput/AudioInput/AudioInput.view.js +7 -4
  6. package/dist/native/components/AudioInput/AudioInput/AudioInput.view.js.map +1 -1
  7. package/dist/native/components/Background/Background/Background.view.native.js.map +1 -1
  8. package/dist/native/components/Badge/Badge/Badge.style.js +7 -11
  9. package/dist/native/components/Badge/Badge/Badge.style.js.map +1 -1
  10. package/dist/native/components/Badge/Badge/Badge.view.js +2 -6
  11. package/dist/native/components/Badge/Badge/Badge.view.js.map +1 -1
  12. package/dist/native/components/Button/Button/Button.view.js +2 -2
  13. package/dist/native/components/Button/Button/Button.view.js.map +1 -1
  14. package/dist/native/components/Button/Button/Button.view.native.js.map +1 -1
  15. package/dist/native/components/Card/Card/Card.style.js +10 -10
  16. package/dist/native/components/Card/Card/Card.style.js.map +1 -1
  17. package/dist/native/components/Carousel/Carousel/Carousel.view.native.js +10 -6
  18. package/dist/native/components/Carousel/Carousel/Carousel.view.native.js.map +1 -1
  19. package/dist/native/components/Chart/Chart/Chart.style.js +3 -3
  20. package/dist/native/components/Chart/Chart/Chart.style.js.map +1 -1
  21. package/dist/native/components/ChatInput/ChatInput/ChatInput.style.js +1 -1
  22. package/dist/native/components/ChatInput/ChatInput/ChatInput.style.js.map +1 -1
  23. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.style.js +16 -16
  24. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.style.js.map +1 -1
  25. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.js +2 -2
  26. package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.js.map +1 -1
  27. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.style.js +6 -6
  28. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.style.js.map +1 -1
  29. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.js +1 -1
  30. package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.js.map +1 -1
  31. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js +4 -4
  32. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js.map +1 -1
  33. package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.style.js +18 -20
  34. package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.style.js.map +1 -1
  35. package/dist/native/components/DropZone/DropZone/DropZone.view.js +3 -3
  36. package/dist/native/components/DropZone/DropZone/DropZone.view.js.map +1 -1
  37. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.js +4 -4
  38. package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.js.map +1 -1
  39. package/dist/native/components/EditComponent/EditPanel.js.map +1 -1
  40. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js +3 -3
  41. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js.map +1 -1
  42. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.js +1 -5
  43. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.js.map +1 -1
  44. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js +2 -8
  45. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js.map +1 -1
  46. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js +1 -7
  47. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js.map +1 -1
  48. package/dist/native/components/Form/Radio/Radio/Radio.view.native.js +1 -5
  49. package/dist/native/components/Form/Radio/Radio/Radio.view.native.js.map +1 -1
  50. package/dist/native/components/Form/Select/Select/Select.view.native.js +3 -9
  51. package/dist/native/components/Form/Select/Select/Select.view.native.js.map +1 -1
  52. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.js.map +1 -1
  53. package/dist/native/components/Form/TextField/TextField/TextField.view.native.js.map +1 -1
  54. package/dist/native/components/Gradient/Gradient/Gradient.view.native.js +2 -6
  55. package/dist/native/components/Gradient/Gradient/Gradient.view.native.js.map +1 -1
  56. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.js +1 -1
  57. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.js.map +1 -1
  58. package/dist/native/components/HoverCard/HoverCard/HoverCard.view.native.js.map +1 -1
  59. package/dist/native/components/Icon/Icon.js.map +1 -1
  60. package/dist/native/components/Icon/Icon.native.js.map +1 -1
  61. package/dist/native/components/IconPicker/IconPicker/IconPicker.view.js +2 -2
  62. package/dist/native/components/IconPicker/IconPicker/IconPicker.view.js.map +1 -1
  63. package/dist/native/components/Input/FieldLayout/FieldLayout.js +1 -1
  64. package/dist/native/components/Input/FieldLayout/FieldLayout.js.map +1 -1
  65. package/dist/native/components/Link/Link/Link.view.native.js +1 -3
  66. package/dist/native/components/Link/Link/Link.view.native.js.map +1 -1
  67. package/dist/native/components/Loader/Loader/Loader.view.native.js +4 -4
  68. package/dist/native/components/Loader/Loader/Loader.view.native.js.map +1 -1
  69. package/dist/native/components/Menubar/Menubar/Menubar.view.native.js +2 -2
  70. package/dist/native/components/Menubar/Menubar/Menubar.view.native.js.map +1 -1
  71. package/dist/native/components/Message/Message/Message.view.js +1 -1
  72. package/dist/native/components/Message/Message/Message.view.js.map +1 -1
  73. package/dist/native/components/Modal/Modal/Modal.style.js +1 -1
  74. package/dist/native/components/Modal/Modal/Modal.style.js.map +1 -1
  75. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.native.js +2 -2
  76. package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.native.js.map +1 -1
  77. package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.js +18 -2
  78. package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.js.map +1 -1
  79. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.js +2 -2
  80. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.js.map +1 -1
  81. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.js +6 -3
  82. package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.js.map +1 -1
  83. package/dist/native/components/Resizable/Resizable/Resizable.view.native.js +9 -1
  84. package/dist/native/components/Resizable/Resizable/Resizable.view.native.js.map +1 -1
  85. package/dist/native/components/Sidebar/Sidebar/Sidebar.style.js +11 -11
  86. package/dist/native/components/Sidebar/Sidebar/Sidebar.style.js.map +1 -1
  87. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.native.js.map +1 -1
  88. package/dist/native/components/Slider/Slider/Slider.view.native.js +3 -1
  89. package/dist/native/components/Slider/Slider/Slider.view.native.js.map +1 -1
  90. package/dist/native/components/Tabs/Tabs/Tabs.view.js +10 -10
  91. package/dist/native/components/Tabs/Tabs/Tabs.view.js.map +1 -1
  92. package/dist/native/components/Tabs/Tabs/Tabs.view.native.js +2 -2
  93. package/dist/native/components/Tabs/Tabs/Tabs.view.native.js.map +1 -1
  94. package/dist/native/components/Title/Title/Title.view.native.js.map +1 -1
  95. package/dist/native/components/Title/Title/TypewriterEffect.native.js +1 -3
  96. package/dist/native/components/Title/Title/TypewriterEffect.native.js.map +1 -1
  97. package/dist/native/components/Toast/Toast/Toast.view.native.js.map +1 -1
  98. package/dist/native/components/Toggle/Toggle/Toggle.style.js +7 -7
  99. package/dist/native/components/Toggle/Toggle/Toggle.style.js.map +1 -1
  100. package/dist/native/components/Toggle/Toggle/Toggle.view.js +2 -2
  101. package/dist/native/components/Toggle/Toggle/Toggle.view.js.map +1 -1
  102. package/dist/native/components/Toggle/Toggle/Toggle.view.native.js +3 -1
  103. package/dist/native/components/Toggle/Toggle/Toggle.view.native.js.map +1 -1
  104. package/dist/native/components/Uploader/Uploader/Uploader.view.js +2 -2
  105. package/dist/native/design-system/DesignSystemProvider.d.ts +8 -1
  106. package/dist/native/design-system/DesignSystemProvider.js +10 -4
  107. package/dist/native/design-system/DesignSystemProvider.js.map +1 -1
  108. package/dist/native/design-system/configs/airbnb.json +87 -87
  109. package/dist/native/design-system/configs/apple.json +89 -89
  110. package/dist/native/design-system/configs/coinbase.json +89 -89
  111. package/dist/native/design-system/configs/default.json +556 -0
  112. package/dist/native/design-system/configs/figma.json +63 -63
  113. package/dist/native/design-system/configs/index.d.ts +6 -0
  114. package/dist/native/design-system/configs/index.js +8 -1
  115. package/dist/native/design-system/configs/index.js.map +1 -1
  116. package/dist/native/design-system/configs/linear.json +86 -86
  117. package/dist/native/design-system/configs/nike.json +60 -60
  118. package/dist/native/design-system/configs/notion.json +88 -88
  119. package/dist/native/design-system/configs/revolut.json +89 -89
  120. package/dist/native/design-system/configs/shopify.json +76 -76
  121. package/dist/native/design-system/configs/spacex.json +68 -68
  122. package/dist/native/design-system/configs/spotify.json +89 -89
  123. package/dist/native/design-system/configs/stripe.json +88 -88
  124. package/dist/native/design-system/configs/tesla.json +75 -75
  125. package/dist/native/design-system/configs/uber.json +41 -41
  126. package/dist/native/design-system/configs/vercel.json +65 -65
  127. package/dist/native/design-system/types.d.ts +28 -0
  128. package/dist/native/pages/designSystem.page.js +103 -85
  129. package/dist/native/pages/designSystem.page.js.map +1 -1
  130. package/dist/web.cjs.js +8 -8
  131. package/dist/web.cjs.js.map +1 -1
  132. package/dist/web.esm.js +11786 -10987
  133. package/dist/web.esm.js.map +1 -1
  134. package/dist/web.umd.js +10 -10
  135. package/dist/web.umd.js.map +1 -1
  136. package/docs/README.md +1 -0
  137. package/docs/app-studio/Theming.md +7 -0
  138. package/docs/design-system/component-library.md +78 -42
  139. package/docs/design-system/llm-design-system.md +426 -0
  140. package/docs/design-system/theming.md +73 -13
  141. package/package.json +4 -4
@@ -94,49 +94,67 @@ const defaultBrandTitleStyle = {
94
94
  letterSpacing: '-0.02em',
95
95
  };
96
96
  const getBrandTitleStyle = (config) => brandTitleStyles[config.metadata.id] ?? defaultBrandTitleStyle;
97
- const getLightPalette = (config) => {
98
- const isDark = config.metadata.defaultAppearance === 'dark';
99
- if (!isDark)
100
- return { ...config.theme, appearance: 'light' };
97
+ // Both palettes carry the brand's theme slots as CSS-ready values: a token
98
+ // (`color-black`) becomes `var(--color-black)`, a literal (`#2563eb`) passes
99
+ // through. The frame wraps its content in a DesignSystemProvider pinned to
100
+ // `appearance`, so every `var(--…)` flips for that mode (`data-theme`). Because
101
+ // the values are already CSS-ready, samples can drop them into a component prop
102
+ // OR a raw inline `style` / gradient string and they resolve the same way — no
103
+ // per-sample color detection, no light/dark branching. app-studio owns the flip.
104
+ const buildPalette = (config, appearance) => {
105
+ const t = config.theme;
101
106
  return {
102
- ...config.theme,
103
- canvas: '#ffffff',
104
- surface: '#f5f5f5',
105
- text: '#1a1a1a',
106
- muted: 'rgba(0,0,0,0.6)',
107
- border: 'rgba(0,0,0,0.1)',
108
- appearance: 'light',
107
+ canvas: toCss(t.canvas),
108
+ surface: toCss(t.surface),
109
+ text: toCss(t.text),
110
+ muted: toCss(t.muted),
111
+ border: toCss(t.border),
112
+ primary: toCss(t.primary),
113
+ secondary: toCss(t.secondary),
114
+ success: toCss(t.success),
115
+ warning: toCss(t.warning),
116
+ error: toCss(t.error),
117
+ onPrimary: toCss(t.onPrimary),
118
+ appearance,
109
119
  };
110
120
  };
111
- const getDarkPalette = (config) => {
112
- const isDark = config.metadata.defaultAppearance === 'dark';
113
- if (isDark)
114
- return { ...config.theme, appearance: 'dark' };
115
- return {
116
- ...config.theme,
117
- canvas: '#0d0d0d',
118
- surface: '#1a1a1a',
119
- text: '#ffffff',
120
- muted: 'rgba(255,255,255,0.62)',
121
- border: 'rgba(255,255,255,0.14)',
122
- appearance: 'dark',
123
- };
124
- };
125
- const PaletteFrame = ({ palette, label, children, }) => (<Vertical gap={10} flex="1 1 320px" minWidth={0}>
121
+ const getLightPalette = (config) => buildPalette(config, 'light');
122
+ const getDarkPalette = (config) => buildPalette(config, 'dark');
123
+ const PaletteFrame = ({ palette, label, config, children, }) => (<Vertical gap={10} flex="1 1 320px" minWidth={0}>
126
124
  <Horizontal gap={8} alignItems="center">
127
125
  <View width={10} height={10} borderRadius={9999} backgroundColor={palette.appearance === 'dark' ? '#111111' : '#ffffff'} borderWidth={1} borderStyle="solid" borderColor="rgba(0,0,0,0.15)"/>
128
126
  <Text fontSize={11} fontWeight="700" letterSpacing="0.08em" textTransform="uppercase">
129
127
  {label}
130
128
  </Text>
131
129
  </Horizontal>
132
- <View padding={20} borderRadius={16} borderWidth={1} borderStyle="solid" style={{
133
- backgroundColor: palette.canvas,
134
- borderColor: palette.border,
135
- color: palette.text,
136
- }}>
137
- {children}
138
- </View>
130
+ {/* Pin this frame to its appearance; app-studio resolves every theme/color
131
+ token inside it for that mode — light tokens render light here, dark
132
+ tokens render dark in the sibling frame. No manual color resolution. */}
133
+ <DesignSystemProvider config={config} mode={palette.appearance}>
134
+ <View padding={20} borderRadius={16} borderWidth={1} borderStyle="solid" backgroundColor="color-white" borderColor="color-gray-200" color="color-black">
135
+ {children}
136
+ </View>
137
+ </DesignSystemProvider>
139
138
  </Vertical>);
139
+ // Token → CSS boundary. app-studio resolves design tokens (`color-*`,
140
+ // `theme-*`, `light-*`, `dark-*`) only on component PROPS, never inside a raw
141
+ // inline `style` object or a gradient/box-shadow string. Anything that has to
142
+ // live in raw CSS must cross this boundary first: a token becomes the matching
143
+ // `var(--token)` (which still flips per mode via `data-theme`), and any literal
144
+ // (hex / rgba) passes through untouched. This is the ONLY place the showcase
145
+ // translates a token — samples never inspect or branch on the color itself.
146
+ const toCss = (value) => {
147
+ if (!value || typeof value !== 'string')
148
+ return value;
149
+ return /^(color|theme|light|dark)-/.test(value) ? `var(--${value})` : value;
150
+ };
151
+ // Translucent fill from any color (token or literal) for use in raw CSS.
152
+ // `color-mix` accepts both `var(--token)` and hex, so the result flips per mode
153
+ // when fed a token — no light/dark branching required.
154
+ const softCss = (value, percent) => `color-mix(in srgb, ${toCss(value)} ${percent}%, transparent)`;
155
+ // Inverse of `toCss` for DISPLAY only: turn `var(--color-black)` back into the
156
+ // readable token name (`color-black`) when we want to show the token as text.
157
+ const tokenLabel = (value) => value && value.startsWith('var(--') ? value.slice(6, -1) : value;
140
158
  const defaultPersonality = {
141
159
  cornerStyle: 'soft',
142
160
  typeWeight: 'bold',
@@ -190,7 +208,7 @@ const personalitySurfaceStyle = (p, palette) => {
190
208
  };
191
209
  case 'mono':
192
210
  return {
193
- backgroundColor: palette.appearance === 'dark' ? '#0a0a0a' : palette.surface,
211
+ backgroundColor: palette.appearance === 'dark' ? '#0a0a0a' : toCss(palette.surface),
194
212
  };
195
213
  case 'matte':
196
214
  return {
@@ -198,27 +216,30 @@ const personalitySurfaceStyle = (p, palette) => {
198
216
  };
199
217
  case 'paper':
200
218
  default:
201
- return { backgroundColor: palette.surface };
219
+ // `surface` already flips per mode via its token — no branching needed.
220
+ return { backgroundColor: toCss(palette.surface) };
202
221
  }
203
222
  };
204
223
  const personalityAccentBackground = (p, palette) => {
224
+ const primary = toCss(palette.primary);
225
+ const secondary = toCss(palette.secondary || palette.primary);
205
226
  switch (p.accentTreatment) {
206
227
  case 'gradient':
207
- return `linear-gradient(135deg, ${palette.primary} 0%, ${palette.secondary || palette.primary} 100%)`;
228
+ return `linear-gradient(135deg, ${primary} 0%, ${secondary} 100%)`;
208
229
  case 'glow':
209
- return palette.primary;
230
+ return primary;
210
231
  case 'stripe':
211
- return `repeating-linear-gradient(45deg, ${palette.primary} 0 8px, ${palette.secondary || palette.primary} 8px 16px)`;
232
+ return `repeating-linear-gradient(45deg, ${primary} 0 8px, ${secondary} 8px 16px)`;
212
233
  case 'halftone':
213
- return `radial-gradient(circle at 30% 30%, ${palette.primary} 0%, ${palette.secondary || palette.primary} 70%)`;
234
+ return `radial-gradient(circle at 30% 30%, ${primary} 0%, ${secondary} 70%)`;
214
235
  case 'flat':
215
236
  default:
216
- return palette.primary;
237
+ return primary;
217
238
  }
218
239
  };
219
240
  const personalityAccentShadow = (p, palette) => {
220
241
  if (p.accentTreatment === 'glow') {
221
- return `0 0 24px ${palette.primary}66, 0 0 4px ${palette.primary}`;
242
+ return `0 0 24px ${softCss(palette.primary, 40)}, 0 0 4px ${toCss(palette.primary)}`;
222
243
  }
223
244
  return undefined;
224
245
  };
@@ -371,10 +392,7 @@ const Swatch = ({ color, name, role, border, }) => (<View borderWidth={1} border
371
392
  </Text>
372
393
  </Vertical>
373
394
  </View>);
374
- const Section = ({ title, children, config, }) => (<Vertical gap={18} padding={24} borderWidth={1} borderStyle="solid" borderRadius={12} style={{
375
- backgroundColor: config.theme.canvas,
376
- borderColor: config.theme.border,
377
- }}>
395
+ const Section = ({ title, children, config, }) => (<Vertical gap={18} padding={24} borderWidth={1} borderStyle="solid" borderRadius={12} backgroundColor={config.theme.canvas} borderColor={config.theme.border}>
378
396
  <Text fontSize={18} lineHeight="24px" fontWeight="700" color={config.theme.text}>
379
397
  {title}
380
398
  </Text>
@@ -385,9 +403,7 @@ const HeroSection = ({ config }) => {
385
403
  const highlightTextColor = t.highlightStyle === 'background'
386
404
  ? config.theme.onPrimary
387
405
  : config.theme.primary;
388
- return (<View width="100%" borderRadius={20} overflow="hidden" borderWidth={1} borderStyle="solid" borderColor={config.theme.border} style={{
389
- backgroundColor: config.theme.surface,
390
- }}>
406
+ return (<View width="100%" borderRadius={20} overflow="hidden" borderWidth={1} borderStyle="solid" borderColor={config.theme.border} backgroundColor={config.theme.surface}>
391
407
  <Horizontal width="100%" flexWrap="wrap" alignItems="stretch" gap={0}>
392
408
  <Vertical flex="1 1 360px" minWidth={0} padding={36} gap={20} justifyContent="center">
393
409
  <Badge variant="outline" content={`${config.metadata.label} hero`}/>
@@ -724,7 +740,7 @@ const TierPricingCardSample = ({ palette, tier, personality, }) => {
724
740
  <Text fontSize={13} color={tier.featured ? palette.onPrimary : palette.text} style={personalityLabelStyle(personality)}>
725
741
  {tier.name}
726
742
  </Text>
727
- {tier.featured ? (<View paddingHorizontal={10} paddingVertical={4} borderRadius={personality.badgeRadius} backgroundColor="rgba(255,255,255,0.22)">
743
+ {tier.featured ? (<View paddingHorizontal={10} paddingVertical={4} borderRadius={personality.badgeRadius} backgroundColor={softCss(palette.onPrimary, 22)}>
728
744
  <Horizontal gap={4} alignItems="center">
729
745
  <Text fontSize={11} color={palette.onPrimary} style={{ lineHeight: 1 }}>
730
746
  {personality.signatureMotif}
@@ -737,7 +753,7 @@ const TierPricingCardSample = ({ palette, tier, personality, }) => {
737
753
  </Horizontal>
738
754
  </View>) : null}
739
755
  </Horizontal>
740
- <Text fontSize={13} lineHeight="18px" color={tier.featured ? 'rgba(255,255,255,0.85)' : palette.muted} style={{ fontStyle: personality.typeStyle }}>
756
+ <Text fontSize={13} lineHeight="18px" color={tier.featured ? softCss(palette.onPrimary, 85) : palette.muted} style={{ fontStyle: personality.typeStyle }}>
741
757
  {tier.tagline}
742
758
  </Text>
743
759
  </Vertical>
@@ -745,13 +761,15 @@ const TierPricingCardSample = ({ palette, tier, personality, }) => {
745
761
  <Text fontSize={density.large + 8} color={tier.featured ? palette.onPrimary : palette.text} style={personalityHeadingStyle(personality)}>
746
762
  {tier.price}
747
763
  </Text>
748
- {tier.period ? (<Text fontSize={14} color={tier.featured ? 'rgba(255,255,255,0.85)' : palette.muted} style={{ fontStyle: personality.typeStyle }}>
764
+ {tier.period ? (<Text fontSize={14} color={tier.featured ? softCss(palette.onPrimary, 85) : palette.muted} style={{ fontStyle: personality.typeStyle }}>
749
765
  {tier.period}
750
766
  </Text>) : null}
751
767
  </Horizontal>
752
768
  <Vertical gap={8}>
753
769
  {tier.features.map((feature) => (<Horizontal key={feature} gap={8} alignItems="center">
754
- <View width={18} height={18} borderRadius={personality.cornerStyle === 'sharp' ? 2 : 9999} backgroundColor={tier.featured ? 'rgba(255,255,255,0.22)' : palette.primary} alignItems="center" justifyContent="center" style={{ display: 'flex', flexShrink: 0 }}>
770
+ <View width={18} height={18} borderRadius={personality.cornerStyle === 'sharp' ? 2 : 9999} backgroundColor={tier.featured
771
+ ? softCss(palette.onPrimary, 22)
772
+ : palette.primary} alignItems="center" justifyContent="center" style={{ display: 'flex', flexShrink: 0 }}>
755
773
  <Text fontSize={11} color={palette.onPrimary} style={{
756
774
  lineHeight: 1,
757
775
  fontWeight: personalityFontWeight(personality, 'heavy'),
@@ -771,11 +789,12 @@ const TierPricingCardSample = ({ palette, tier, personality, }) => {
771
789
  <View alignSelf="stretch" paddingHorizontal={20} paddingVertical={12} borderRadius={personality.pillRadius} alignItems="center" justifyContent="center" style={{
772
790
  display: 'flex',
773
791
  cursor: 'pointer',
774
- backgroundColor: tier.featured
775
- ? 'rgba(255,255,255,0.95)'
776
- : palette.text,
792
+ // Featured card sits on `primary`, so its CTA is the inverse chip
793
+ // (`onPrimary` ground, `primary` ink). Both flip together with the
794
+ // card, so contrast holds in light AND dark with no branching.
795
+ backgroundColor: tier.featured ? palette.onPrimary : palette.text,
777
796
  }}>
778
- <Text fontSize={14} color={tier.featured ? palette.text : palette.canvas} style={{
797
+ <Text fontSize={14} color={tier.featured ? palette.primary : palette.canvas} style={{
779
798
  ...personalityLabelStyle(personality),
780
799
  letterSpacing: personality.typeCase === 'uppercase' ? '0.08em' : '0.02em',
781
800
  }}>
@@ -806,7 +825,7 @@ const ProductPricingCardSample = ({ palette, personality, }) => {
806
825
  <Vertical gap={density.gap} padding={density.padding}>
807
826
  <View height={120} borderRadius={personality.cardRadius} style={{
808
827
  background: personality.accentTreatment === 'gradient'
809
- ? `linear-gradient(135deg, ${palette.primary}33 0%, ${palette.secondary || palette.primary}33 100%)`
828
+ ? `linear-gradient(135deg, ${softCss(palette.primary, 20)} 0%, ${softCss(palette.secondary || palette.primary, 20)} 100%)`
810
829
  : palette.appearance === 'dark'
811
830
  ? 'rgba(255,255,255,0.06)'
812
831
  : 'rgba(0,0,0,0.04)',
@@ -933,7 +952,7 @@ const FeaturedPricingCardSample = ({ palette, personality, }) => {
933
952
  <Vertical gap={density.gap} padding={density.padding}>
934
953
  <View height={140} borderRadius={personality.cardRadius} style={{
935
954
  background: personality.accentTreatment === 'gradient'
936
- ? `linear-gradient(135deg, ${palette.primary}33 0%, ${palette.secondary || palette.primary}33 100%)`
955
+ ? `linear-gradient(135deg, ${softCss(palette.primary, 20)} 0%, ${softCss(palette.secondary || palette.primary, 20)} 100%)`
937
956
  : palette.appearance === 'dark'
938
957
  ? 'rgba(255,255,255,0.06)'
939
958
  : 'rgba(0,0,0,0.04)',
@@ -1438,7 +1457,7 @@ const BrandSnapshotSample = ({ palette, personality, config, }) => {
1438
1457
  <Text fontSize={11} color={palette.text} style={{
1439
1458
  fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',
1440
1459
  }}>
1441
- {swatch.value}
1460
+ {tokenLabel(swatch.value)}
1442
1461
  </Text>
1443
1462
  </Vertical>
1444
1463
  </Horizontal>))}
@@ -1629,10 +1648,10 @@ const ComponentPreview = ({ config }) => {
1629
1648
  return (<Vertical gap={24}>
1630
1649
  <Section title="Brand Snapshot (Light & Dark)" config={config}>
1631
1650
  <Vertical gap={20}>
1632
- <PaletteFrame palette={lightPalette} label="On light surface">
1651
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1633
1652
  <BrandSnapshotSample palette={lightPalette} personality={personality} config={config}/>
1634
1653
  </PaletteFrame>
1635
- <PaletteFrame palette={darkPalette} label="On dark surface">
1654
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1636
1655
  <BrandSnapshotSample palette={darkPalette} personality={personality} config={config}/>
1637
1656
  </PaletteFrame>
1638
1657
  </Vertical>
@@ -1640,10 +1659,10 @@ const ComponentPreview = ({ config }) => {
1640
1659
 
1641
1660
  <Section title="Buttons — Light & Dark" config={config}>
1642
1661
  <Horizontal gap={20} flexWrap="wrap" alignItems="flex-start">
1643
- <PaletteFrame palette={lightPalette} label="On light surface">
1662
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1644
1663
  <ButtonsSample palette={lightPalette}/>
1645
1664
  </PaletteFrame>
1646
- <PaletteFrame palette={darkPalette} label="On dark surface">
1665
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1647
1666
  <ButtonsSample palette={darkPalette}/>
1648
1667
  </PaletteFrame>
1649
1668
  </Horizontal>
@@ -1651,10 +1670,10 @@ const ComponentPreview = ({ config }) => {
1651
1670
 
1652
1671
  <Section title="Status & Feedback — Light & Dark" config={config}>
1653
1672
  <Horizontal gap={20} flexWrap="wrap" alignItems="flex-start">
1654
- <PaletteFrame palette={lightPalette} label="On light surface">
1673
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1655
1674
  <StatusFeedbackSample palette={lightPalette} config={config}/>
1656
1675
  </PaletteFrame>
1657
- <PaletteFrame palette={darkPalette} label="On dark surface">
1676
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1658
1677
  <StatusFeedbackSample palette={darkPalette} config={config}/>
1659
1678
  </PaletteFrame>
1660
1679
  </Horizontal>
@@ -1662,10 +1681,10 @@ const ComponentPreview = ({ config }) => {
1662
1681
 
1663
1682
  <Section title="Forms — Light & Dark" config={config}>
1664
1683
  <Horizontal gap={20} flexWrap="wrap" alignItems="flex-start">
1665
- <PaletteFrame palette={lightPalette} label="On light surface">
1684
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1666
1685
  <FormsSample palette={lightPalette} config={config} mode="light"/>
1667
1686
  </PaletteFrame>
1668
- <PaletteFrame palette={darkPalette} label="On dark surface">
1687
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1669
1688
  <FormsSample palette={darkPalette} config={config} mode="dark"/>
1670
1689
  </PaletteFrame>
1671
1690
  </Horizontal>
@@ -1778,10 +1797,10 @@ const ComponentPreview = ({ config }) => {
1778
1797
 
1779
1798
  <Section title="Pricing — Booking (Light & Dark)" config={config}>
1780
1799
  <Horizontal gap={20} flexWrap="wrap" alignItems="flex-start">
1781
- <PaletteFrame palette={lightPalette} label="On light surface">
1800
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1782
1801
  <PricingCardSample palette={lightPalette}/>
1783
1802
  </PaletteFrame>
1784
- <PaletteFrame palette={darkPalette} label="On dark surface">
1803
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1785
1804
  <PricingCardSample palette={darkPalette}/>
1786
1805
  </PaletteFrame>
1787
1806
  </Horizontal>
@@ -1789,12 +1808,12 @@ const ComponentPreview = ({ config }) => {
1789
1808
 
1790
1809
  <Section title="Pricing — SaaS Tiers (Light & Dark)" config={config}>
1791
1810
  <Vertical gap={20}>
1792
- <PaletteFrame palette={lightPalette} label="On light surface">
1811
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1793
1812
  <Horizontal gap={16} flexWrap="wrap" alignItems="stretch">
1794
1813
  {tierPricingPlans.map((tier) => (<TierPricingCardSample key={tier.name} palette={lightPalette} tier={tier} personality={personality}/>))}
1795
1814
  </Horizontal>
1796
1815
  </PaletteFrame>
1797
- <PaletteFrame palette={darkPalette} label="On dark surface">
1816
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1798
1817
  <Horizontal gap={16} flexWrap="wrap" alignItems="stretch">
1799
1818
  {tierPricingPlans.map((tier) => (<TierPricingCardSample key={tier.name} palette={darkPalette} tier={tier} personality={personality}/>))}
1800
1819
  </Horizontal>
@@ -1804,10 +1823,10 @@ const ComponentPreview = ({ config }) => {
1804
1823
 
1805
1824
  <Section title="Pricing — Product (Light & Dark)" config={config}>
1806
1825
  <Horizontal gap={20} flexWrap="wrap" alignItems="flex-start">
1807
- <PaletteFrame palette={lightPalette} label="On light surface">
1826
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1808
1827
  <ProductPricingCardSample palette={lightPalette} personality={personality}/>
1809
1828
  </PaletteFrame>
1810
- <PaletteFrame palette={darkPalette} label="On dark surface">
1829
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1811
1830
  <ProductPricingCardSample palette={darkPalette} personality={personality}/>
1812
1831
  </PaletteFrame>
1813
1832
  </Horizontal>
@@ -1815,10 +1834,10 @@ const ComponentPreview = ({ config }) => {
1815
1834
 
1816
1835
  <Section title="Pricing — Featured w/ Badge & Favorite (Light & Dark)" config={config}>
1817
1836
  <Horizontal gap={20} flexWrap="wrap" alignItems="flex-start">
1818
- <PaletteFrame palette={lightPalette} label="On light surface">
1837
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1819
1838
  <FeaturedPricingCardSample palette={lightPalette} personality={personality}/>
1820
1839
  </PaletteFrame>
1821
- <PaletteFrame palette={darkPalette} label="On dark surface">
1840
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1822
1841
  <FeaturedPricingCardSample palette={darkPalette} personality={personality}/>
1823
1842
  </PaletteFrame>
1824
1843
  </Horizontal>
@@ -1832,12 +1851,12 @@ const ComponentPreview = ({ config }) => {
1832
1851
 
1833
1852
  <Section title="Content — Article Cards w/ Badge & Favorite (Light & Dark)" config={config}>
1834
1853
  <Vertical gap={20}>
1835
- <PaletteFrame palette={lightPalette} label="On light surface">
1854
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1836
1855
  <Horizontal gap={16} flexWrap="wrap" alignItems="stretch">
1837
1856
  {contentArticles.map((article) => (<ContentCardWithBadgeSample key={article.id} palette={lightPalette} article={article} personality={personality}/>))}
1838
1857
  </Horizontal>
1839
1858
  </PaletteFrame>
1840
- <PaletteFrame palette={darkPalette} label="On dark surface">
1859
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1841
1860
  <Horizontal gap={16} flexWrap="wrap" alignItems="stretch">
1842
1861
  {contentArticles.map((article) => (<ContentCardWithBadgeSample key={article.id} palette={darkPalette} article={article} personality={personality}/>))}
1843
1862
  </Horizontal>
@@ -1847,10 +1866,10 @@ const ComponentPreview = ({ config }) => {
1847
1866
 
1848
1867
  <Section title="CTA Card — Light & Dark" config={config}>
1849
1868
  <Horizontal gap={20} flexWrap="wrap" alignItems="flex-start">
1850
- <PaletteFrame palette={lightPalette} label="On light surface">
1869
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1851
1870
  <CTACardSample palette={lightPalette} config={config}/>
1852
1871
  </PaletteFrame>
1853
- <PaletteFrame palette={darkPalette} label="On dark surface">
1872
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1854
1873
  <CTACardSample palette={darkPalette} config={config}/>
1855
1874
  </PaletteFrame>
1856
1875
  </Horizontal>
@@ -1858,10 +1877,10 @@ const ComponentPreview = ({ config }) => {
1858
1877
 
1859
1878
  <Section title="Product Card — Light & Dark" config={config}>
1860
1879
  <Horizontal gap={20} flexWrap="wrap" alignItems="flex-start">
1861
- <PaletteFrame palette={lightPalette} label="On light surface">
1880
+ <PaletteFrame config={config} palette={lightPalette} label="On light surface">
1862
1881
  <ProductCardSample palette={lightPalette} config={config}/>
1863
1882
  </PaletteFrame>
1864
- <PaletteFrame palette={darkPalette} label="On dark surface">
1883
+ <PaletteFrame config={config} palette={darkPalette} label="On dark surface">
1865
1884
  <ProductCardSample palette={darkPalette} config={config}/>
1866
1885
  </PaletteFrame>
1867
1886
  </Horizontal>
@@ -2103,9 +2122,7 @@ export const DesignSystem = ({ config }) => {
2103
2122
  <Helmet>
2104
2123
  {config.metadata.googleFontLinks?.map((link) => (<link key={link} rel="stylesheet" href={link}/>))}
2105
2124
  </Helmet>
2106
- <View minHeight="100vh" padding={28} fontFamily={config.tokens.typography.fontFamily} style={{
2107
- backgroundColor: config.theme.canvas,
2108
- color: config.theme.text,
2125
+ <View minHeight="100vh" padding={28} fontFamily={config.tokens.typography.fontFamily} backgroundColor={config.theme.canvas} color={config.theme.text} style={{
2109
2126
  textTransform: config.metadata.id === 'spacex' ? 'uppercase' : 'none',
2110
2127
  }}>
2111
2128
  <Vertical gap={28}>
@@ -2114,7 +2131,8 @@ export const DesignSystem = ({ config }) => {
2114
2131
  {config.metadata.label} Design System
2115
2132
  </Text>
2116
2133
  <Text fontSize={16} lineHeight="24px" color={config.theme.muted} fontFamily={config.tokens.typography.fontFamily}>
2117
- Live App Studio components rendered with the {config.metadata.label} config defaults.
2134
+ Live App Studio components rendered with the{' '}
2135
+ {config.metadata.label} config defaults.
2118
2136
  </Text>
2119
2137
  </Vertical>
2120
2138