@motion-proto/live-tokens 0.53.0 → 0.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The single source of truth for the CSS form of a shadow scale token:
3
+ *
4
+ * <x>px <y>px <blur>px <spread>px hsla(<h>, <s>%, <l>%, <a>)
5
+ *
6
+ * Everything that reads or writes that form goes through `parseShadowCss` /
7
+ * `shadowTokenCss`, so the theme generator (Node, no store) and the editor
8
+ * (store, DOM) agree on the shape without sharing a graph.
9
+ */
10
+ import type { ShadowToken } from '../../store/editorTypes';
11
+
12
+ export const SHADOW_VAR_NAMES = [
13
+ '--shadow-sm', '--shadow-md', '--shadow-lg', '--shadow-xl', '--shadow-2xl',
14
+ ] as const;
15
+
16
+ /** What the CSS form needs; `ShadowToken` adds the editor's polar controls. */
17
+ export type ShadowValue = Omit<ShadowToken, 'variable' | 'angle' | 'distance'>;
18
+
19
+ export function computeShadowXY(angle: number, distance: number): { x: number; y: number } {
20
+ const rad = angle * (Math.PI / 180);
21
+ return {
22
+ x: Math.round(-distance * Math.cos(rad)),
23
+ y: Math.round(distance * Math.sin(rad)),
24
+ };
25
+ }
26
+
27
+ export function computeAngleDistance(x: number, y: number): { angle: number; distance: number } {
28
+ const distance = Math.round(Math.sqrt(x * x + y * y));
29
+ if (distance === 0) return { angle: 135, distance: 0 };
30
+ let angle = Math.atan2(y, -x) * (180 / Math.PI);
31
+ if (angle < 0) angle += 360;
32
+ return { angle: Math.round(angle), distance };
33
+ }
34
+
35
+ export function shadowTokenCss(t: ShadowValue): string {
36
+ return `${t.x}px ${t.y}px ${t.blur}px ${t.spread}px hsla(${t.hue}, ${t.saturation}%, ${t.lightness}%, ${t.opacity})`;
37
+ }
38
+
39
+ export function parseShadowCss(variable: string, raw: string): ShadowToken | null {
40
+ const m = raw.trim().match(/^(-?\d+)px\s+(-?\d+)px\s+(\d+)px\s+(-?\d+)px\s+hsla\(([\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)$/);
41
+ if (!m) return null;
42
+ const x = parseInt(m[1], 10);
43
+ const y = parseInt(m[2], 10);
44
+ const blur = parseInt(m[3], 10);
45
+ const spread = parseInt(m[4], 10);
46
+ const hue = Math.round(parseFloat(m[5]));
47
+ const saturation = Math.round(parseFloat(m[6]));
48
+ const lightness = Math.round(parseFloat(m[7]));
49
+ const opacity = parseFloat(m[8]);
50
+ const { angle, distance } = computeAngleDistance(x, y);
51
+ return { variable, x, y, blur, spread, opacity, hue, saturation, lightness, angle, distance };
52
+ }
@@ -10,53 +10,17 @@
10
10
  import { get } from 'svelte/store';
11
11
  import type { EditorState, ShadowToken } from '../../store/editorTypes';
12
12
  import { store, persist } from '../../store/editorCore';
13
+ import { SHADOW_VAR_NAMES, computeShadowXY, parseShadowCss, shadowTokenCss } from '../parsers/shadow';
13
14
 
14
- export const SHADOW_VAR_NAMES = [
15
- '--shadow-sm', '--shadow-md', '--shadow-lg', '--shadow-xl', '--shadow-2xl',
16
- ] as const;
15
+ export { SHADOW_VAR_NAMES, computeShadowXY, parseShadowCss, shadowTokenCss };
17
16
 
18
17
  // Identical literal set as SHADOW_VAR_NAMES — derived to avoid drift.
19
18
  export const SCALE_SHADOW_VARIABLES: ReadonlySet<string> = new Set(SHADOW_VAR_NAMES);
20
19
 
21
- export function computeShadowXY(angle: number, distance: number): { x: number; y: number } {
22
- const rad = angle * (Math.PI / 180);
23
- return {
24
- x: Math.round(-distance * Math.cos(rad)),
25
- y: Math.round(distance * Math.sin(rad)),
26
- };
27
- }
28
-
29
- function computeAngleDistance(x: number, y: number): { angle: number; distance: number } {
30
- const distance = Math.round(Math.sqrt(x * x + y * y));
31
- if (distance === 0) return { angle: 135, distance: 0 };
32
- let angle = Math.atan2(y, -x) * (180 / Math.PI);
33
- if (angle < 0) angle += 360;
34
- return { angle: Math.round(angle), distance };
35
- }
36
-
37
- export function shadowTokenCss(t: ShadowToken): string {
38
- return `${t.x}px ${t.y}px ${t.blur}px ${t.spread}px hsla(${t.hue}, ${t.saturation}%, ${t.lightness}%, ${t.opacity})`;
39
- }
40
-
41
20
  export function defaultShadowOverride(): import('../../store/editorTypes').ShadowOverrideFlags {
42
21
  return { angle: false, opacity: false, color: false, distance: false, blur: false, size: false };
43
22
  }
44
23
 
45
- export function parseShadowCss(variable: string, raw: string): ShadowToken | null {
46
- const m = raw.trim().match(/^(-?\d+)px\s+(-?\d+)px\s+(\d+)px\s+(-?\d+)px\s+hsla\(([\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)$/);
47
- if (!m) return null;
48
- const x = parseInt(m[1], 10);
49
- const y = parseInt(m[2], 10);
50
- const blur = parseInt(m[3], 10);
51
- const spread = parseInt(m[4], 10);
52
- const hue = Math.round(parseFloat(m[5]));
53
- const saturation = Math.round(parseFloat(m[6]));
54
- const lightness = Math.round(parseFloat(m[7]));
55
- const opacity = parseFloat(m[8]);
56
- const { angle, distance } = computeAngleDistance(x, y);
57
- return { variable, x, y, blur, spread, opacity, hue, saturation, lightness, angle, distance };
58
- }
59
-
60
24
  export function shadowsToVars(shadows: EditorState['shadows']): Record<string, string> {
61
25
  const out: Record<string, string> = {};
62
26
  for (const t of shadows.tokens) out[t.variable] = shadowTokenCss(t);
@@ -545,7 +545,7 @@
545
545
  {/snippet}
546
546
  </PaletteBase>
547
547
 
548
- {#if paletteEditorOpen || (isEditingBase && panelOpen && editingColor)}
548
+ <UIReveal open={paletteEditorOpen || (isEditingBase && panelOpen && !!editingColor)}>
549
549
  <div class="swatch-grid" style="--swatch-cols: {paletteStepLightness.length + 2}">
550
550
  <div class="base-panel" style="grid-column: 2 / {paletteStepLightness.length + 2}">
551
551
  <ColorEditPanel
@@ -577,7 +577,7 @@
577
577
  </ColorEditPanel>
578
578
  </div>
579
579
  </div>
580
- {/if}
580
+ </UIReveal>
581
581
 
582
582
  <!-- Palette + Text row -->
583
583
  <div class="scales-row">
@@ -2265,11 +2265,11 @@
2265
2265
  "--hover-low": "color-mix(in srgb, var(--text-primary) 5%, transparent)",
2266
2266
  "--hover": "color-mix(in srgb, var(--text-primary) 10%, transparent)",
2267
2267
  "--hover-high": "color-mix(in srgb, var(--text-primary) 15%, transparent)",
2268
- "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.9)",
2269
- "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.9)",
2270
- "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.9)",
2271
- "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.9)",
2272
- "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.9)"
2268
+ "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.25)",
2269
+ "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.25)",
2270
+ "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.25)",
2271
+ "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.25)",
2272
+ "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.25)"
2273
2273
  },
2274
2274
  "fontSources": [
2275
2275
  {
@@ -2265,11 +2265,11 @@
2265
2265
  "--hover-low": "color-mix(in srgb, var(--text-primary) 5%, transparent)",
2266
2266
  "--hover": "color-mix(in srgb, var(--text-primary) 10%, transparent)",
2267
2267
  "--hover-high": "color-mix(in srgb, var(--text-primary) 15%, transparent)",
2268
- "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.9)",
2269
- "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.9)",
2270
- "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.9)",
2271
- "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.9)",
2272
- "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.9)"
2268
+ "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.2)",
2269
+ "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.2)",
2270
+ "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.2)",
2271
+ "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.2)",
2272
+ "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.2)"
2273
2273
  },
2274
2274
  "fontSources": [
2275
2275
  {
@@ -2251,11 +2251,11 @@
2251
2251
  "--hover-low": "color-mix(in srgb, var(--text-primary) 5%, transparent)",
2252
2252
  "--hover": "color-mix(in srgb, var(--text-primary) 10%, transparent)",
2253
2253
  "--hover-high": "color-mix(in srgb, var(--text-primary) 15%, transparent)",
2254
- "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.9)",
2255
- "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.9)",
2256
- "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.9)",
2257
- "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.9)",
2258
- "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.9)"
2254
+ "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.2)",
2255
+ "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.2)",
2256
+ "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.2)",
2257
+ "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.2)",
2258
+ "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.2)"
2259
2259
  },
2260
2260
  "fontSources": [
2261
2261
  {
@@ -2270,11 +2270,11 @@
2270
2270
  "--hover-low": "color-mix(in srgb, var(--text-primary) 5%, transparent)",
2271
2271
  "--hover": "color-mix(in srgb, var(--text-primary) 10%, transparent)",
2272
2272
  "--hover-high": "color-mix(in srgb, var(--text-primary) 15%, transparent)",
2273
- "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.9)",
2274
- "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.9)",
2275
- "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.9)",
2276
- "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.9)",
2277
- "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.9)"
2273
+ "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.25)",
2274
+ "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.25)",
2275
+ "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.25)",
2276
+ "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.25)",
2277
+ "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.25)"
2278
2278
  },
2279
2279
  "fontSources": [
2280
2280
  {
@@ -2544,7 +2544,7 @@
2544
2544
  "name": "midnight-study",
2545
2545
  "component": "badge",
2546
2546
  "createdAt": "2026-05-01T08:28:00.345Z",
2547
- "updatedAt": "2026-08-19T22:39:32.785Z",
2547
+ "updatedAt": "2026-08-20T00:00:00.000Z",
2548
2548
  "aliases": {
2549
2549
  "--badge-primary-surface": "--surface-brand",
2550
2550
  "--badge-primary-text": "--text-brand",
@@ -2555,7 +2555,7 @@
2555
2555
  "--badge-primary-text-line-height": "--line-height-none",
2556
2556
  "--badge-primary-border-width": "--border-width-1",
2557
2557
  "--badge-primary-radius": "--radius-full",
2558
- "--badge-primary-padding": "--space-4",
2558
+ "--badge-primary-padding": "--space-6",
2559
2559
  "--badge-primary-shadow": "--shadow-none",
2560
2560
  "--badge-primary-blur": "--blur-none",
2561
2561
  "--badge-primary-icon-size": "--icon-size-sm",
@@ -2568,7 +2568,7 @@
2568
2568
  "--badge-accent-text-line-height": "--line-height-none",
2569
2569
  "--badge-accent-border-width": "--border-width-1",
2570
2570
  "--badge-accent-radius": "--radius-full",
2571
- "--badge-accent-padding": "--space-4",
2571
+ "--badge-accent-padding": "--space-6",
2572
2572
  "--badge-accent-shadow": "--shadow-none",
2573
2573
  "--badge-accent-blur": "--blur-none",
2574
2574
  "--badge-accent-icon-size": "--icon-size-sm",
@@ -2581,7 +2581,7 @@
2581
2581
  "--badge-neutral-text-line-height": "--line-height-none",
2582
2582
  "--badge-neutral-border-width": "--border-width-1",
2583
2583
  "--badge-neutral-radius": "--radius-full",
2584
- "--badge-neutral-padding": "--space-4",
2584
+ "--badge-neutral-padding": "--space-6",
2585
2585
  "--badge-neutral-shadow": "--shadow-none",
2586
2586
  "--badge-neutral-blur": "--blur-none",
2587
2587
  "--badge-neutral-icon-size": "--icon-size-sm",
@@ -2594,7 +2594,7 @@
2594
2594
  "--badge-alternate-text-line-height": "--line-height-none",
2595
2595
  "--badge-alternate-border-width": "--border-width-1",
2596
2596
  "--badge-alternate-radius": "--radius-full",
2597
- "--badge-alternate-padding": "--space-4",
2597
+ "--badge-alternate-padding": "--space-6",
2598
2598
  "--badge-alternate-shadow": "--shadow-none",
2599
2599
  "--badge-alternate-blur": "--blur-none",
2600
2600
  "--badge-alternate-icon-size": "--icon-size-sm",
@@ -2607,7 +2607,7 @@
2607
2607
  "--badge-canvas-text-line-height": "--line-height-none",
2608
2608
  "--badge-canvas-border-width": "--border-width-1",
2609
2609
  "--badge-canvas-radius": "--radius-full",
2610
- "--badge-canvas-padding": "--space-4",
2610
+ "--badge-canvas-padding": "--space-6",
2611
2611
  "--badge-canvas-shadow": "--shadow-none",
2612
2612
  "--badge-canvas-blur": "--blur-none",
2613
2613
  "--badge-canvas-icon-size": "--icon-size-sm",
@@ -2620,7 +2620,7 @@
2620
2620
  "--badge-special-text-line-height": "--line-height-none",
2621
2621
  "--badge-special-border-width": "--border-width-1",
2622
2622
  "--badge-special-radius": "--radius-full",
2623
- "--badge-special-padding": "--space-4",
2623
+ "--badge-special-padding": "--space-6",
2624
2624
  "--badge-special-shadow": "--shadow-none",
2625
2625
  "--badge-special-blur": "--blur-none",
2626
2626
  "--badge-special-icon-size": "--icon-size-sm",
@@ -2633,7 +2633,7 @@
2633
2633
  "--badge-success-text-line-height": "--line-height-none",
2634
2634
  "--badge-success-border-width": "--border-width-1",
2635
2635
  "--badge-success-radius": "--radius-full",
2636
- "--badge-success-padding": "--space-4",
2636
+ "--badge-success-padding": "--space-6",
2637
2637
  "--badge-success-shadow": "--shadow-none",
2638
2638
  "--badge-success-blur": "--blur-none",
2639
2639
  "--badge-success-icon-size": "--icon-size-sm",
@@ -2646,7 +2646,7 @@
2646
2646
  "--badge-warning-text-line-height": "--line-height-none",
2647
2647
  "--badge-warning-border-width": "--border-width-1",
2648
2648
  "--badge-warning-radius": "--radius-full",
2649
- "--badge-warning-padding": "--space-4",
2649
+ "--badge-warning-padding": "--space-6",
2650
2650
  "--badge-warning-shadow": "--shadow-none",
2651
2651
  "--badge-warning-blur": "--blur-none",
2652
2652
  "--badge-warning-icon-size": "--icon-size-sm",
@@ -2659,7 +2659,7 @@
2659
2659
  "--badge-danger-text-line-height": "--line-height-none",
2660
2660
  "--badge-danger-border-width": "--border-width-1",
2661
2661
  "--badge-danger-radius": "--radius-full",
2662
- "--badge-danger-padding": "--space-4",
2662
+ "--badge-danger-padding": "--space-6",
2663
2663
  "--badge-danger-shadow": "--shadow-none",
2664
2664
  "--badge-danger-blur": "--blur-none",
2665
2665
  "--badge-danger-icon-size": "--icon-size-sm",
@@ -2672,7 +2672,7 @@
2672
2672
  "--badge-info-text-line-height": "--line-height-none",
2673
2673
  "--badge-info-border-width": "--border-width-1",
2674
2674
  "--badge-info-radius": "--radius-full",
2675
- "--badge-info-padding": "--space-4",
2675
+ "--badge-info-padding": "--space-6",
2676
2676
  "--badge-info-shadow": "--shadow-none",
2677
2677
  "--badge-info-blur": "--blur-none",
2678
2678
  "--badge-info-icon-size": "--icon-size-sm"
@@ -2682,7 +2682,7 @@
2682
2682
  "name": "midnight-study",
2683
2683
  "component": "button",
2684
2684
  "createdAt": "2026-05-10T19:28:06.893Z",
2685
- "updatedAt": "2026-08-19T22:39:32.785Z",
2685
+ "updatedAt": "2026-08-20T00:00:00.000Z",
2686
2686
  "aliases": {
2687
2687
  "--button-primary-surface": "--surface-brand-high",
2688
2688
  "--button-primary-text": "--text-primary",
@@ -2693,7 +2693,7 @@
2693
2693
  "--button-primary-border": "--border-brand",
2694
2694
  "--button-primary-border-width": "--border-width-1",
2695
2695
  "--button-primary-radius": "--radius-full",
2696
- "--button-primary-padding": "--space-4",
2696
+ "--button-primary-padding": "--space-8",
2697
2697
  "--button-primary-hover-surface": "--surface-brand-higher",
2698
2698
  "--button-primary-hover-text": "--text-primary",
2699
2699
  "--button-primary-hover-border": "--border-brand-strong",
@@ -2710,7 +2710,7 @@
2710
2710
  "--button-secondary-border": "--border-neutral",
2711
2711
  "--button-secondary-border-width": "--border-width-1",
2712
2712
  "--button-secondary-radius": "--radius-full",
2713
- "--button-secondary-padding": "--space-4",
2713
+ "--button-secondary-padding": "--space-8",
2714
2714
  "--button-secondary-hover-surface": "--surface-neutral-higher",
2715
2715
  "--button-secondary-hover-text": "--text-primary",
2716
2716
  "--button-secondary-hover-border": "--border-neutral-strong",
@@ -2727,7 +2727,7 @@
2727
2727
  "--button-outline-border": "--border-neutral",
2728
2728
  "--button-outline-border-width": "--border-width-1",
2729
2729
  "--button-outline-radius": "--radius-full",
2730
- "--button-outline-padding": "--space-4",
2730
+ "--button-outline-padding": "--space-8",
2731
2731
  "--button-outline-hover-surface": "--surface-neutral-lower",
2732
2732
  "--button-outline-hover-text": "--text-primary",
2733
2733
  "--button-outline-hover-border": "--border-neutral-strong",
@@ -2745,7 +2745,7 @@
2745
2745
  "--button-success-border": "--border-success",
2746
2746
  "--button-success-border-width": "--border-width-1",
2747
2747
  "--button-success-radius": "--radius-full",
2748
- "--button-success-padding": "--space-4",
2748
+ "--button-success-padding": "--space-8",
2749
2749
  "--button-success-hover-surface": "--surface-success-higher",
2750
2750
  "--button-success-hover-text": "--text-primary",
2751
2751
  "--button-success-hover-border": "--border-success-strong",
@@ -2762,7 +2762,7 @@
2762
2762
  "--button-danger-border": "--border-danger",
2763
2763
  "--button-danger-border-width": "--border-width-1",
2764
2764
  "--button-danger-radius": "--radius-full",
2765
- "--button-danger-padding": "--space-4",
2765
+ "--button-danger-padding": "--space-8",
2766
2766
  "--button-danger-hover-surface": "--surface-danger-high",
2767
2767
  "--button-danger-hover-text": "--text-primary",
2768
2768
  "--button-danger-hover-border": "--border-danger-medium",
@@ -2779,7 +2779,7 @@
2779
2779
  "--button-warning-border": "--border-warning",
2780
2780
  "--button-warning-border-width": "--border-width-1",
2781
2781
  "--button-warning-radius": "--radius-full",
2782
- "--button-warning-padding": "--space-4",
2782
+ "--button-warning-padding": "--space-8",
2783
2783
  "--button-warning-hover-surface": "--surface-warning-high",
2784
2784
  "--button-warning-hover-text": "--text-primary",
2785
2785
  "--button-warning-hover-border": "--border-warning-medium",
@@ -2787,7 +2787,7 @@
2787
2787
  "--button-warning-disabled-text": "--text-tertiary",
2788
2788
  "--button-warning-disabled-border": "--border-neutral-faint",
2789
2789
  "--button-warning-icon-size": "--icon-size-md",
2790
- "--button-small-padding": "--space-4",
2790
+ "--button-small-padding": "--space-6",
2791
2791
  "--button-small-text-font-size": "--font-size-sm",
2792
2792
  "--button-small-text-font-weight": "--font-weight-normal",
2793
2793
  "--button-small-text-line-height": "--line-height-tighter",
@@ -3008,14 +3008,14 @@
3008
3008
  "name": "midnight-study",
3009
3009
  "component": "cornerbadge",
3010
3010
  "createdAt": "2026-05-12T15:31:06.313Z",
3011
- "updatedAt": "2026-08-19T22:39:32.785Z",
3011
+ "updatedAt": "2026-08-20T00:00:00.000Z",
3012
3012
  "aliases": {
3013
3013
  "--corner-badge-margin": "--space-0",
3014
3014
  "--corner-badge-outer-radius": "--radius-none",
3015
3015
  "--corner-badge-inner-radius": "--radius-none",
3016
3016
  "--corner-badge-h-axis-radius": "--radius-none",
3017
3017
  "--corner-badge-v-axis-radius": "--radius-none",
3018
- "--corner-badge-padding": "--space-4",
3018
+ "--corner-badge-padding": "--space-6",
3019
3019
  "--corner-badge-text-font-family": "--font-sans",
3020
3020
  "--corner-badge-text-font-size": "--font-size-sm",
3021
3021
  "--corner-badge-text-font-weight": "--font-weight-medium",
@@ -3624,7 +3624,7 @@
3624
3624
  "name": "midnight-study",
3625
3625
  "component": "segmentedcontrol",
3626
3626
  "createdAt": "2026-04-28T21:13:17.669Z",
3627
- "updatedAt": "2026-08-19T22:39:32.785Z",
3627
+ "updatedAt": "2026-08-20T00:00:00.000Z",
3628
3628
  "aliases": {
3629
3629
  "--segmentedcontrol-bar-surface": "color-mix(in srgb, var(--surface-neutral-lowest) 75%, transparent)",
3630
3630
  "--segmentedcontrol-bar-border": "--border-neutral",
@@ -3635,7 +3635,7 @@
3635
3635
  "--segmentedcontrol-divider-color": "--border-neutral",
3636
3636
  "--segmentedcontrol-divider-thickness": "--border-width-1",
3637
3637
  "--segmentedcontrol-divider-inset": "--space-6",
3638
- "--segmentedcontrol-option-padding": "--space-4",
3638
+ "--segmentedcontrol-option-padding": "--space-6",
3639
3639
  "--segmentedcontrol-option-gap": "--space-6",
3640
3640
  "--segmentedcontrol-option-text": "--text-primary",
3641
3641
  "--segmentedcontrol-option-text-font-family": "--font-sans",
@@ -3672,7 +3672,7 @@
3672
3672
  "--segmentedcontrol-bar-small-radius": "--radius-md",
3673
3673
  "--segmentedcontrol-small-divider-inset": "--space-4",
3674
3674
  "--segmentedcontrol-small-divider-thickness": "--border-width-1",
3675
- "--segmentedcontrol-option-small-padding": "--space-4",
3675
+ "--segmentedcontrol-option-small-padding": "--space-6",
3676
3676
  "--segmentedcontrol-option-small-gap": "--space-4",
3677
3677
  "--segmentedcontrol-option-small-icon-size": "--icon-size-sm",
3678
3678
  "--segmentedcontrol-option-small-text-font-size": "--font-size-sm",
@@ -3684,7 +3684,7 @@
3684
3684
  "name": "midnight-study",
3685
3685
  "component": "sidenavigation",
3686
3686
  "createdAt": "2026-05-25T19:34:09.771Z",
3687
- "updatedAt": "2026-08-19T22:39:32.785Z",
3687
+ "updatedAt": "2026-08-20T00:00:00.000Z",
3688
3688
  "aliases": {
3689
3689
  "--sidenavigation-panel-surface": "--surface-canvas-lower",
3690
3690
  "--sidenavigation-panel-border": "--border-canvas-faint",
@@ -3776,7 +3776,7 @@
3776
3776
  "--sidenavigation-section-active-text-font-weight": "--font-weight-medium",
3777
3777
  "--sidenavigation-section-active-text-line-height": "--line-height-normal",
3778
3778
  "--sidenavigation-item-default-surface": "--color-transparent",
3779
- "--sidenavigation-item-default-padding": "--space-4",
3779
+ "--sidenavigation-item-default-padding": "--space-6",
3780
3780
  "--sidenavigation-item-default-accent": "--color-transparent",
3781
3781
  "--sidenavigation-item-default-accent-width": "--border-width-3",
3782
3782
  "--sidenavigation-item-default-text": "--text-tertiary",
@@ -3785,7 +3785,7 @@
3785
3785
  "--sidenavigation-item-default-text-font-weight": "--font-weight-semibold",
3786
3786
  "--sidenavigation-item-default-text-line-height": "--line-height-normal",
3787
3787
  "--sidenavigation-item-hover-surface": "--surface-canvas",
3788
- "--sidenavigation-item-hover-padding": "--space-4",
3788
+ "--sidenavigation-item-hover-padding": "--space-6",
3789
3789
  "--sidenavigation-item-hover-accent": "--color-transparent",
3790
3790
  "--sidenavigation-item-hover-accent-width": "--border-width-3",
3791
3791
  "--sidenavigation-item-hover-text": "--text-secondary",
@@ -3794,7 +3794,7 @@
3794
3794
  "--sidenavigation-item-hover-text-font-weight": "--font-weight-light",
3795
3795
  "--sidenavigation-item-hover-text-line-height": "--line-height-normal",
3796
3796
  "--sidenavigation-item-active-surface": "--surface-canvas-low",
3797
- "--sidenavigation-item-active-padding": "--space-4",
3797
+ "--sidenavigation-item-active-padding": "--space-6",
3798
3798
  "--sidenavigation-item-active-accent": "--border-brand-medium",
3799
3799
  "--sidenavigation-item-active-accent-width": "--border-width-3",
3800
3800
  "--sidenavigation-item-active-text": "--text-primary",
@@ -3803,7 +3803,7 @@
3803
3803
  "--sidenavigation-item-active-text-font-weight": "--font-weight-normal",
3804
3804
  "--sidenavigation-item-active-text-line-height": "--line-height-normal",
3805
3805
  "--sidenavigation-footer-default-surface": "--color-transparent",
3806
- "--sidenavigation-footer-default-padding": "--space-4",
3806
+ "--sidenavigation-footer-default-padding": "--space-6",
3807
3807
  "--sidenavigation-footer-default-gap": "--space-6",
3808
3808
  "--sidenavigation-footer-default-accent": "--color-transparent",
3809
3809
  "--sidenavigation-footer-default-accent-width": "--border-width-3",
@@ -3815,7 +3815,7 @@
3815
3815
  "--sidenavigation-footer-default-text-font-weight": "--font-weight-light",
3816
3816
  "--sidenavigation-footer-default-text-line-height": "--line-height-normal",
3817
3817
  "--sidenavigation-footer-hover-surface": "--surface-canvas",
3818
- "--sidenavigation-footer-hover-padding": "--space-4",
3818
+ "--sidenavigation-footer-hover-padding": "--space-6",
3819
3819
  "--sidenavigation-footer-hover-gap": "--space-6",
3820
3820
  "--sidenavigation-footer-hover-accent": "--color-transparent",
3821
3821
  "--sidenavigation-footer-hover-accent-width": "--border-width-3",
@@ -3827,7 +3827,7 @@
3827
3827
  "--sidenavigation-footer-hover-text-font-weight": "--font-weight-light",
3828
3828
  "--sidenavigation-footer-hover-text-line-height": "--line-height-normal",
3829
3829
  "--sidenavigation-footer-active-surface": "--surface-canvas-low",
3830
- "--sidenavigation-footer-active-padding": "--space-4",
3830
+ "--sidenavigation-footer-active-padding": "--space-6",
3831
3831
  "--sidenavigation-footer-active-gap": "--space-6",
3832
3832
  "--sidenavigation-footer-active-accent": "--border-brand-medium",
3833
3833
  "--sidenavigation-footer-active-accent-width": "--border-width-3",
@@ -3844,7 +3844,7 @@
3844
3844
  "name": "midnight-study",
3845
3845
  "component": "tabbar",
3846
3846
  "createdAt": "2026-05-12T01:57:26.390Z",
3847
- "updatedAt": "2026-08-19T22:39:32.785Z",
3847
+ "updatedAt": "2026-08-20T00:00:00.000Z",
3848
3848
  "aliases": {
3849
3849
  "--tabbar-bar-divider": "--border-neutral-subtle",
3850
3850
  "--tabbar-bar-divider-thickness": "--border-width-1",
@@ -3858,7 +3858,7 @@
3858
3858
  "--tabbar-default-text-font-weight": "--font-weight-light",
3859
3859
  "--tabbar-default-text-line-height": "--line-height-normal",
3860
3860
  "--tabbar-default-icon-size": "--icon-size-md",
3861
- "--tabbar-default-padding": "--space-4",
3861
+ "--tabbar-default-padding": "--space-6",
3862
3862
  "--tabbar-default-border": "--color-transparent",
3863
3863
  "--tabbar-default-surface": "--color-transparent",
3864
3864
  "--tabbar-default-tab-border-color": "--color-transparent",
@@ -3873,7 +3873,7 @@
3873
3873
  "--tabbar-hover-text-font-weight": "--font-weight-light",
3874
3874
  "--tabbar-hover-text-line-height": "--line-height-normal",
3875
3875
  "--tabbar-hover-icon-size": "--icon-size-md",
3876
- "--tabbar-hover-padding": "--space-4",
3876
+ "--tabbar-hover-padding": "--space-6",
3877
3877
  "--tabbar-hover-border": "--color-transparent",
3878
3878
  "--tabbar-hover-tab-border-color": "--color-transparent",
3879
3879
  "--tabbar-hover-tab-border-width": "--border-width-0",
@@ -3888,7 +3888,7 @@
3888
3888
  "--tabbar-active-text-font-weight": "--font-weight-light",
3889
3889
  "--tabbar-active-text-line-height": "--line-height-normal",
3890
3890
  "--tabbar-active-icon-size": "--icon-size-md",
3891
- "--tabbar-active-padding": "--space-4",
3891
+ "--tabbar-active-padding": "--space-6",
3892
3892
  "--tabbar-active-tab-border-color": "--color-transparent",
3893
3893
  "--tabbar-active-tab-border-width": "--border-width-0",
3894
3894
  "--tabbar-active-tab-top-radius": "--radius-none",
@@ -3900,7 +3900,7 @@
3900
3900
  "--tabbar-disabled-text-font-weight": "--font-weight-light",
3901
3901
  "--tabbar-disabled-text-line-height": "--line-height-normal",
3902
3902
  "--tabbar-disabled-icon-size": "--icon-size-md",
3903
- "--tabbar-disabled-padding": "--space-4",
3903
+ "--tabbar-disabled-padding": "--space-6",
3904
3904
  "--tabbar-disabled-border": "--color-transparent",
3905
3905
  "--tabbar-disabled-surface": "--color-transparent",
3906
3906
  "--tabbar-disabled-tab-border-color": "--color-transparent",
@@ -3980,7 +3980,7 @@
3980
3980
  "name": "midnight-study",
3981
3981
  "component": "tooltip",
3982
3982
  "createdAt": "2026-04-18T02:43:11.333Z",
3983
- "updatedAt": "2026-08-19T22:39:32.785Z",
3983
+ "updatedAt": "2026-08-20T00:00:00.000Z",
3984
3984
  "aliases": {
3985
3985
  "--tooltip-surface": "color-mix(in srgb, var(--surface-canvas-lowest) 75%, transparent)",
3986
3986
  "--tooltip-text": "--text-primary",
@@ -3991,10 +3991,10 @@
3991
3991
  "--tooltip-border": "--border-neutral",
3992
3992
  "--tooltip-border-width": "--border-width-1",
3993
3993
  "--tooltip-radius": "--radius-md",
3994
- "--tooltip-padding": "--space-4",
3994
+ "--tooltip-padding": "--space-6",
3995
3995
  "--tooltip-shadow": "--shadow-md"
3996
3996
  }
3997
3997
  }
3998
3998
  },
3999
3999
  "componentSchemaVersion": 21
4000
- }
4000
+ }
@@ -2270,11 +2270,11 @@
2270
2270
  "--hover-low": "color-mix(in srgb, var(--text-primary) 5%, transparent)",
2271
2271
  "--hover": "color-mix(in srgb, var(--text-primary) 10%, transparent)",
2272
2272
  "--hover-high": "color-mix(in srgb, var(--text-primary) 15%, transparent)",
2273
- "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.9)",
2274
- "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.9)",
2275
- "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.9)",
2276
- "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.9)",
2277
- "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.9)"
2273
+ "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.2)",
2274
+ "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.2)",
2275
+ "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.2)",
2276
+ "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.2)",
2277
+ "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.2)"
2278
2278
  },
2279
2279
  "fontSources": [
2280
2280
  {
@@ -2256,11 +2256,11 @@
2256
2256
  "--hover-low": "color-mix(in srgb, var(--text-primary) 5%, transparent)",
2257
2257
  "--hover": "color-mix(in srgb, var(--text-primary) 10%, transparent)",
2258
2258
  "--hover-high": "color-mix(in srgb, var(--text-primary) 15%, transparent)",
2259
- "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.9)",
2260
- "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.9)",
2261
- "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.9)",
2262
- "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.9)",
2263
- "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.9)"
2259
+ "--shadow-sm": "1px 1px 2px 0px hsla(237, 18%, 3%, 0.2)",
2260
+ "--shadow-md": "3px 3px 6px 0px hsla(237, 18%, 3%, 0.2)",
2261
+ "--shadow-lg": "5px 5px 9px 0px hsla(237, 18%, 3%, 0.2)",
2262
+ "--shadow-xl": "6px 7px 13px 0px hsla(237, 18%, 3%, 0.2)",
2263
+ "--shadow-2xl": "8px 9px 16px 0px hsla(237, 18%, 3%, 0.2)"
2264
2264
  },
2265
2265
  "fontSources": [
2266
2266
  {
@@ -1,13 +1,15 @@
1
1
  /*
2
2
  * Decoupled from the design system: pills, knots, strings, balls, and
3
3
  * animations are hardcoded so token edits don't repaint our chrome. The
4
- * two exceptions are intentional and ARE the demo: the central box's
5
- * surface/radius/border (set inline) and the dropdown (rendered through
6
- * <MenuSelect>). File is global; keep selectors `ftt-` prefixed.
4
+ * exceptions are intentional and ARE the demo: the central box's
5
+ * surface/radius/border (set inline), the dropdown (rendered through
6
+ * <MenuSelect>), and elevation, which reads from the --shadow-* scale.
7
+ * File is global; keep selectors `ftt-` prefixed.
7
8
  */
8
9
 
9
10
  .ftt-stage {
10
11
  --ftt-contrast-color: var(--color-white);
12
+ --ftt-string-opacity: 0.5;
11
13
  position: relative;
12
14
  width: 100%;
13
15
  height: 100%;
@@ -34,7 +36,7 @@
34
36
  border-color: #52726e;
35
37
  border-width: 2px;
36
38
  border-radius: 0.25rem;
37
- box-shadow: 3px 3px 6px 0px hsla(237, 18%, 3%, 0.9);
39
+ box-shadow: var(--shadow-md);
38
40
  transition:
39
41
  background 300ms ease,
40
42
  border-color 300ms ease,
@@ -78,7 +80,7 @@
78
80
  stroke-width: 2;
79
81
  stroke-linecap: round;
80
82
  vector-effect: non-scaling-stroke;
81
- opacity: 0.5;
83
+ opacity: var(--ftt-string-opacity);
82
84
  transition: opacity 150ms ease, stroke 150ms ease;
83
85
  }
84
86
 
@@ -177,17 +179,20 @@
177
179
  align-items: center;
178
180
  gap: 0.25rem;
179
181
  padding: 0.375rem 0.75rem;
180
- /* Darkest stop stays ≥ #8f9090 so black text keeps ~6:1 AA contrast. */
182
+ /* Polished chrome, not brushed steel: the bands keep their spacing but sit
183
+ high in the scale, so the pill stays bright against a cream page. Keep
184
+ the darkest stop ≥ #8f9090 or the black label loses AA. */
181
185
  background: linear-gradient(
182
186
  135deg,
183
- #e4e5e5 0%,
184
- #a2a3a3 38%,
185
- #cdcece 62%,
186
- #8f9090 100%
187
+ #fbfbfb 0%,
188
+ #c9cbcb 38%,
189
+ #eff0f0 62%,
190
+ #b6b8b8 100%
187
191
  );
188
192
  color: #000;
189
- border: 1px solid rgba(255, 255, 255, 0.55);
193
+ border: 1px solid rgba(86, 96, 104, 0.45);
190
194
  border-radius: 9999px;
195
+ box-shadow: var(--shadow-md);
191
196
  font-family: Manrope, system-ui, -apple-system, sans-serif;
192
197
  font-size: 0.875rem;
193
198
  font-weight: 600;