@motion-proto/live-tokens 0.6.2 → 0.8.0

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 (232) hide show
  1. package/README.md +14 -13
  2. package/dist-plugin/index.cjs +854 -226
  3. package/dist-plugin/index.d.cts +2 -1
  4. package/dist-plugin/index.d.ts +2 -1
  5. package/dist-plugin/index.js +852 -225
  6. package/package.json +26 -40
  7. package/src/{styles → app}/site.css +1 -1
  8. package/src/{component-editor → editor/component-editor}/BadgeEditor.svelte +8 -82
  9. package/src/{component-editor → editor/component-editor}/CalloutEditor.svelte +4 -4
  10. package/src/{component-editor → editor/component-editor}/CardEditor.svelte +28 -76
  11. package/src/{component-editor → editor/component-editor}/CollapsibleSectionEditor.svelte +37 -30
  12. package/src/{component-editor → editor/component-editor}/CornerBadgeEditor.svelte +31 -93
  13. package/src/{component-editor → editor/component-editor}/DialogEditor.svelte +60 -57
  14. package/src/editor/component-editor/ImageEditor.svelte +30 -0
  15. package/src/{component-editor → editor/component-editor}/InlineEditActionsEditor.svelte +6 -4
  16. package/src/editor/component-editor/MenuSelectEditor.svelte +160 -0
  17. package/src/{component-editor → editor/component-editor}/NotificationEditor.svelte +67 -38
  18. package/src/{component-editor → editor/component-editor}/ProgressBarEditor.svelte +5 -4
  19. package/src/{component-editor → editor/component-editor}/RadioButtonEditor.svelte +3 -3
  20. package/src/editor/component-editor/SectionDividerEditor.svelte +565 -0
  21. package/src/{component-editor → editor/component-editor}/SegmentedControlEditor.svelte +2 -2
  22. package/src/{component-editor → editor/component-editor}/StandardButtonsEditor.svelte +29 -21
  23. package/src/{component-editor → editor/component-editor}/TabBarEditor.svelte +9 -14
  24. package/src/{component-editor → editor/component-editor}/TableEditor.svelte +9 -18
  25. package/src/{component-editor → editor/component-editor}/TooltipEditor.svelte +11 -47
  26. package/src/editor/component-editor/editors.d.ts +10 -0
  27. package/src/{component-editor → editor/component-editor}/registry.ts +28 -18
  28. package/src/{component-editor → editor/component-editor}/scaffolding/AngleDial.svelte +54 -15
  29. package/src/{component-editor → editor/component-editor}/scaffolding/ComponentEditorBase.svelte +3 -51
  30. package/src/{component-editor → editor/component-editor}/scaffolding/ComponentFileManager.svelte +151 -424
  31. package/src/{component-editor → editor/component-editor}/scaffolding/ComponentFileMenu.svelte +18 -170
  32. package/src/{component-editor → editor/component-editor}/scaffolding/ComponentsTab.svelte +2 -2
  33. package/src/{component-editor → editor/component-editor}/scaffolding/CopyFromMenu.svelte +44 -4
  34. package/src/{component-editor → editor/component-editor}/scaffolding/FieldsetWrapper.svelte +1 -1
  35. package/src/{component-editor → editor/component-editor}/scaffolding/LinkageChart.svelte +6 -6
  36. package/src/{component-editor → editor/component-editor}/scaffolding/LinkedBlock.svelte +6 -12
  37. package/src/editor/component-editor/scaffolding/NonStylableConfig.svelte +38 -0
  38. package/src/editor/component-editor/scaffolding/RadialShapePad.svelte +483 -0
  39. package/src/{component-editor → editor/component-editor}/scaffolding/SaveAsDialog.svelte +66 -12
  40. package/src/editor/component-editor/scaffolding/ShadowBackdrop.svelte +85 -0
  41. package/src/editor/component-editor/scaffolding/ShadowBackdropControls.svelte +132 -0
  42. package/src/editor/component-editor/scaffolding/StateBlock.svelte +345 -0
  43. package/src/{component-editor → editor/component-editor}/scaffolding/TokenLayout.svelte +17 -12
  44. package/src/{component-editor → editor/component-editor}/scaffolding/TypeEditor.svelte +13 -1
  45. package/src/editor/component-editor/scaffolding/VariantGroup.svelte +858 -0
  46. package/src/{component-editor → editor/component-editor}/scaffolding/buildTypeGroupTokens.ts +1 -0
  47. package/src/{component-editor → editor/component-editor}/scaffolding/editorContext.ts +19 -9
  48. package/src/{component-editor → editor/component-editor}/scaffolding/linkedBlock.ts +2 -2
  49. package/src/{component-editor → editor/component-editor}/scaffolding/types.ts +25 -0
  50. package/src/{lib → editor/core/components}/componentConfigKeys.ts +8 -0
  51. package/src/{lib → editor/core/components}/componentConfigService.ts +3 -3
  52. package/src/{lib → editor/core/components}/componentPersist.ts +11 -9
  53. package/src/editor/core/flashStatus.ts +30 -0
  54. package/src/{lib → editor/core/fonts}/fontLoader.ts +2 -2
  55. package/src/{lib → editor/core/fonts}/fontMigration.ts +4 -4
  56. package/src/{lib → editor/core/fonts}/fontParse.ts +1 -1
  57. package/src/editor/core/manifests/manifestService.ts +171 -0
  58. package/src/editor/core/palettes/familySwap.ts +99 -0
  59. package/src/{lib → editor/core/palettes}/paletteDerivation.ts +71 -2
  60. package/src/{lib → editor/core/palettes}/tokenRegistry.ts +9 -6
  61. package/src/editor/core/productionPulse.ts +37 -0
  62. package/src/{lib → editor/core/routing}/router.ts +1 -1
  63. package/src/{lib/files/versionedFileResource.ts → editor/core/storage/files/versionedFileResourceClient.ts} +8 -1
  64. package/src/{lib → editor/core/store}/editorCore.ts +24 -8
  65. package/src/{lib → editor/core/store}/editorPersistence.ts +3 -3
  66. package/src/{lib → editor/core/store}/editorRenderer.ts +2 -2
  67. package/src/{lib → editor/core/store}/editorStore.ts +222 -28
  68. package/src/{lib → editor/core/store}/editorTypes.ts +56 -13
  69. package/src/editor/core/store/gradientSource.ts +192 -0
  70. package/src/editor/core/themes/migrations/2026-05-19-collapsiblesection-drop-frame-surface.ts +28 -0
  71. package/src/editor/core/themes/migrations/2026-05-19-sectiondivider-rich-gradient.ts +35 -0
  72. package/src/editor/core/themes/migrations/2026-05-20-sectiondivider-slim-variants.ts +82 -0
  73. package/src/editor/core/themes/migrations/2026-05-21-sectiondivider-spacing-to-padding.ts +24 -0
  74. package/src/editor/core/themes/migrations/2026-05-22-sectiondivider-intrinsics-to-css.ts +81 -0
  75. package/src/{lib → editor/core/themes}/migrations/index.ts +10 -0
  76. package/src/{lib → editor/core/themes}/slices/columns.ts +2 -2
  77. package/src/{lib → editor/core/themes}/slices/components.ts +20 -6
  78. package/src/{lib → editor/core/themes}/slices/fonts.ts +1 -1
  79. package/src/{lib → editor/core/themes}/slices/gradients.ts +89 -14
  80. package/src/{lib → editor/core/themes}/slices/overlays.ts +1 -1
  81. package/src/{lib → editor/core/themes}/slices/palettes.ts +1 -1
  82. package/src/{lib → editor/core/themes}/slices/shadows.ts +3 -3
  83. package/src/{lib → editor/core/themes}/themeInit.ts +8 -8
  84. package/src/{lib → editor/core/themes}/themeService.ts +6 -6
  85. package/src/{lib → editor/core/themes}/themeTypes.ts +67 -8
  86. package/src/editor/index.ts +69 -0
  87. package/src/{lib → editor/overlay}/ColumnsOverlay.svelte +0 -1
  88. package/src/{lib → editor/overlay}/LiveEditorOverlay.svelte +80 -129
  89. package/src/{lib → editor/overlay}/columnsOverlay.ts +2 -2
  90. package/src/{pages → editor/pages}/ComponentEditorPage.svelte +12 -12
  91. package/src/{pages → editor/pages}/Editor.svelte +4 -4
  92. package/src/{pages → editor/pages}/EditorShell.svelte +18 -36
  93. package/src/{styles → editor/styles}/ui-editor.css +43 -22
  94. package/src/{styles → editor/styles}/ui-form-controls.css +23 -24
  95. package/src/{ui → editor/ui}/BezierCurveEditor.svelte +119 -68
  96. package/src/{ui → editor/ui}/ColorEditPanel.svelte +13 -13
  97. package/src/{ui → editor/ui}/EditorViewSwitcher.svelte +7 -6
  98. package/src/editor/ui/FileLoadList.svelte +367 -0
  99. package/src/editor/ui/FilePill.svelte +80 -0
  100. package/src/editor/ui/FontStackEditor.svelte +499 -0
  101. package/src/editor/ui/GradientEditor.svelte +690 -0
  102. package/src/{ui → editor/ui}/GradientStopPicker.svelte +12 -4
  103. package/src/editor/ui/ManifestFileManager.svelte +438 -0
  104. package/src/{ui → editor/ui}/PaletteEditor.svelte +180 -673
  105. package/src/editor/ui/ProjectFontsSection.svelte +638 -0
  106. package/src/{ui → editor/ui}/SurfacesTab.svelte +3 -3
  107. package/src/{ui → editor/ui}/TextTab.svelte +3 -3
  108. package/src/editor/ui/ThemeFileManager.svelte +783 -0
  109. package/src/{ui → editor/ui}/UICopyPopover.svelte +4 -4
  110. package/src/{ui → editor/ui}/UIFontFamilySelector.svelte +6 -7
  111. package/src/{ui → editor/ui}/UIFontSizeSelector.svelte +4 -1
  112. package/src/editor/ui/UIInfoPopover.svelte +243 -0
  113. package/src/editor/ui/UILetterSpacingSelector.svelte +65 -0
  114. package/src/{ui → editor/ui}/UILineHeightSelector.svelte +5 -5
  115. package/src/{ui → editor/ui}/UILinkToggle.svelte +2 -2
  116. package/src/{ui → editor/ui}/UIPaddingSelector.svelte +6 -6
  117. package/src/{ui → editor/ui}/UIPaletteSelector.svelte +57 -30
  118. package/src/editor/ui/UIPillButton.svelte +168 -0
  119. package/src/{ui → editor/ui}/UIRadio.svelte +2 -2
  120. package/src/{ui → editor/ui}/UIRelinkConfirmPopover.svelte +4 -4
  121. package/src/editor/ui/UISegmentedControl.svelte +114 -0
  122. package/src/editor/ui/UISquareButton.svelte +172 -0
  123. package/src/{ui → editor/ui}/UITokenSelector.svelte +14 -11
  124. package/src/{ui → editor/ui}/UIVariantSelector.svelte +1 -1
  125. package/src/{ui → editor/ui}/VariablesTab.svelte +46 -17
  126. package/src/{ui → editor/ui}/palette/GradientStopEditor.svelte +13 -13
  127. package/src/{ui → editor/ui}/palette/OverridesPanel.svelte +24 -47
  128. package/src/{ui → editor/ui}/palette/PaletteBase.svelte +11 -8
  129. package/src/{ui → editor/ui}/palette/paletteEditorState.ts +1 -1
  130. package/src/editor/ui/palette/paletteMath.ts +275 -0
  131. package/src/{ui → editor/ui}/sections/ColumnsSection.svelte +137 -18
  132. package/src/{ui → editor/ui}/sections/GradientsSection.svelte +8 -8
  133. package/src/{ui → editor/ui}/sections/OverlaysSection.svelte +18 -18
  134. package/src/{ui → editor/ui}/sections/ShadowsSection.svelte +23 -23
  135. package/src/{ui → editor/ui}/sections/TokenScaleTable.svelte +3 -3
  136. package/src/{components → system/components}/Badge.svelte +0 -36
  137. package/src/{components → system/components}/Button.svelte +2 -2
  138. package/src/{components → system/components}/Card.svelte +34 -60
  139. package/src/{components → system/components}/CollapsibleSection.svelte +25 -2
  140. package/src/{components → system/components}/CornerBadge.svelte +8 -24
  141. package/src/{components → system/components}/Dialog.svelte +1 -1
  142. package/src/system/components/FloatingTokenTags.css +275 -0
  143. package/src/system/components/FloatingTokenTags.svelte +543 -0
  144. package/src/{components → system/components}/InlineEditActions.svelte +6 -4
  145. package/src/system/components/MenuSelect.svelte +229 -0
  146. package/src/{components → system/components}/Notification.svelte +8 -1
  147. package/src/{components → system/components}/ProgressBar.svelte +29 -11
  148. package/src/system/components/SectionDivider.svelte +560 -0
  149. package/src/{components → system/components}/SegmentedControl.svelte +49 -43
  150. package/src/{components → system/components}/TabBar.svelte +81 -65
  151. package/src/{components → system/components}/Table.svelte +17 -3
  152. package/src/{components → system/components}/Tooltip.svelte +6 -4
  153. package/src/system/styles/CONVENTIONS.md +178 -0
  154. package/src/system/styles/fonts.css +20 -0
  155. package/src/system/styles/tokens.css +601 -0
  156. package/src/system/styles/tokens.generated.css +544 -0
  157. package/src/component-editor/ImageEditor.svelte +0 -74
  158. package/src/component-editor/SectionDividerEditor.svelte +0 -265
  159. package/src/component-editor/scaffolding/DividerEditor.svelte +0 -94
  160. package/src/component-editor/scaffolding/GradientCard.svelte +0 -296
  161. package/src/component-editor/scaffolding/NonStylableConfig.svelte +0 -62
  162. package/src/component-editor/scaffolding/ShadowBackdrop.svelte +0 -37
  163. package/src/component-editor/scaffolding/ShadowBackdropControls.svelte +0 -61
  164. package/src/component-editor/scaffolding/StateBlock.svelte +0 -132
  165. package/src/component-editor/scaffolding/VariantGroup.svelte +0 -310
  166. package/src/components/SectionDivider.svelte +0 -483
  167. package/src/data/google-fonts.json +0 -75
  168. package/src/lib/index.ts +0 -68
  169. package/src/lib/presetService.ts +0 -214
  170. package/src/lib/productionPulse.ts +0 -32
  171. package/src/styles/fonts.css +0 -30
  172. package/src/styles/tokens.css +0 -1324
  173. package/src/ui/FontStackEditor.svelte +0 -361
  174. package/src/ui/GradientEditor.svelte +0 -470
  175. package/src/ui/PresetFileManager.svelte +0 -1116
  176. package/src/ui/ProjectFontsSection.svelte +0 -645
  177. package/src/ui/ThemeFileManager.svelte +0 -1020
  178. package/src/ui/UnsavedComponentsDialog.svelte +0 -315
  179. /package/src/{component-editor → editor/component-editor}/index.ts +0 -0
  180. /package/src/{component-editor → editor/component-editor}/scaffolding/DemoHeader.svelte +0 -0
  181. /package/src/{component-editor → editor/component-editor}/scaffolding/componentSectionType.ts +0 -0
  182. /package/src/{component-editor → editor/component-editor}/scaffolding/componentSources.ts +0 -0
  183. /package/src/{component-editor → editor/component-editor}/scaffolding/defaultSections.ts +0 -0
  184. /package/src/{component-editor → editor/component-editor}/scaffolding/siblings.ts +0 -0
  185. /package/src/{lib → editor/core}/cssVarSync.ts +0 -0
  186. /package/src/{lib → editor/core/palettes}/oklch.ts +0 -0
  187. /package/src/{lib → editor/core/routing}/navLinkTypes.ts +0 -0
  188. /package/src/{lib → editor/core/routing}/parentRouteStore.ts +0 -0
  189. /package/src/{lib → editor/core/storage}/storage.ts +0 -0
  190. /package/src/{lib → editor/core/store}/editorConfig.ts +0 -0
  191. /package/src/{lib → editor/core/store}/editorConfigStore.ts +0 -0
  192. /package/src/{lib → editor/core/store}/editorKeybindings.ts +0 -0
  193. /package/src/{lib → editor/core/store}/editorViewStore.ts +0 -0
  194. /package/src/{lib → editor/core/themes}/migrations/2026-04-24-component-prefix-and-suffix-renames.ts +0 -0
  195. /package/src/{lib → editor/core/themes}/migrations/2026-04-24-legacy-keys-and-bg-to-canvas.ts +0 -0
  196. /package/src/{lib → editor/core/themes}/migrations/2026-04-27-segmentedcontrol-disabled-flatten.ts +0 -0
  197. /package/src/{lib → editor/core/themes}/migrations/2026-05-08-collapsiblesection-frame-and-cleanup.ts +0 -0
  198. /package/src/{lib → editor/core/themes}/migrations/2026-05-08-collapsiblesection-variant-namespace.ts +0 -0
  199. /package/src/{lib → editor/core/themes}/migrations/2026-05-10-sectiondivider-gradient-stops.ts +0 -0
  200. /package/src/{lib → editor/core/themes}/migrations/2026-05-13-primary-to-brand.ts +0 -0
  201. /package/src/{lib → editor/core/themes}/parsers/globalRootBlock.ts +0 -0
  202. /package/src/{lib → editor/core/themes}/slices/domainVars.ts +0 -0
  203. /package/src/{lib → editor/overlay}/overlayState.ts +0 -0
  204. /package/src/{pages → editor/pages}/ComponentEditorPage.svelte.d.ts +0 -0
  205. /package/src/{pages → editor/pages}/Editor.svelte.d.ts +0 -0
  206. /package/src/{ui → editor/ui}/Toggle.svelte +0 -0
  207. /package/src/{ui → editor/ui}/UIDialog.svelte +0 -0
  208. /package/src/{ui → editor/ui}/UIFontWeightSelector.svelte +0 -0
  209. /package/src/{ui → editor/ui}/UIOptionItem.svelte +0 -0
  210. /package/src/{ui → editor/ui}/UIOptionList.svelte +0 -0
  211. /package/src/{ui → editor/ui}/UIRadioGroup.svelte +0 -0
  212. /package/src/{lib → editor/ui}/copyPopover.ts +0 -0
  213. /package/src/{ui → editor/ui}/curveEngine.ts +0 -0
  214. /package/src/{ui → editor/ui}/index.ts +0 -0
  215. /package/src/{ui → editor/ui}/keepInViewport.ts +0 -0
  216. /package/src/{ui → editor/ui}/palette/ScaleCurveEditor.svelte +0 -0
  217. /package/src/{lib → editor/ui}/scrollSection.ts +0 -0
  218. /package/src/{ui → editor/ui}/sections/tokenScales.ts +0 -0
  219. /package/src/{ui → editor/ui}/variantScales.ts +0 -0
  220. /package/src/{assets → system/assets}/newspaper.webp +0 -0
  221. /package/src/{assets → system/assets}/offering.webp +0 -0
  222. /package/src/{components → system/components}/Callout.svelte +0 -0
  223. /package/src/{components → system/components}/Image.svelte +0 -0
  224. /package/src/{components → system/components}/RadioButton.svelte +0 -0
  225. /package/src/{components → system/components}/types.ts +0 -0
  226. /package/src/{styles → system/styles}/_padding.scss +0 -0
  227. /package/src/{styles → system/styles}/fonts/Fraunces/Fraunces-italic-latin-ext.woff2 +0 -0
  228. /package/src/{styles → system/styles}/fonts/Fraunces/Fraunces-italic-latin.woff2 +0 -0
  229. /package/src/{styles → system/styles}/fonts/Fraunces/Fraunces-roman-latin-ext.woff2 +0 -0
  230. /package/src/{styles → system/styles}/fonts/Fraunces/Fraunces-roman-latin.woff2 +0 -0
  231. /package/src/{styles → system/styles}/fonts/Manrope/Manrope-latin-ext.woff2 +0 -0
  232. /package/src/{styles → system/styles}/fonts/Manrope/Manrope-latin.woff2 +0 -0
@@ -1,4 +1,4 @@
1
- /* Editor UI chrome — `--ui-*` tokens. Theme-immune; see CONVENTIONS.md. */
1
+ /* `--ui-*` tokens, theme-immune. See CONVENTIONS.md. */
2
2
 
3
3
  .editor-page {
4
4
  --ui-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
@@ -13,7 +13,7 @@
13
13
  }
14
14
 
15
15
  .editor-page {
16
- /* Grayscale ramp — source of truth; lower number = darker. */
16
+ /* Grayscale ramp; lower number = darker. */
17
17
  --ui-gray-50: #050505;
18
18
  --ui-gray-100: #0a0a0a;
19
19
  --ui-gray-150: #0f0f0f;
@@ -38,23 +38,19 @@
38
38
  --ui-text-accent: var(--ui-gray-950);
39
39
  --ui-text-success: var(--ui-gray-850);
40
40
 
41
- /* Bright amber used for selection dots, focus halos, and "unsaved" / "dirty"
42
- state indicators. Single token shared by all "this is the live thing"
43
- surfaces so the editor speaks one selection language. */
41
+ /* Shared "this is live" amber: selection, focus, dirty state. */
44
42
  --ui-highlight: #ffac28;
45
43
 
46
- /* Link-state signals bar attached to a control's left edge when its value
47
- is shared with siblings (active), popped off into the column gap when the
48
- control has broken away from its sibling group (broken). */
44
+ /* Link-state bar: active = attached to control edge, broken = popped into column gap. */
49
45
  --ui-link-active: #6cd0c2;
50
46
  --ui-link-broken: #f0c34a;
51
47
  --ui-link-broken-glow: rgba(240, 195, 74, 0.28);
52
48
 
53
- --ui-border-faint: var(--ui-gray-400);
54
- --ui-border-subtle: var(--ui-gray-500);
55
- --ui-border-default: var(--ui-gray-600);
56
- --ui-border-medium: var(--ui-gray-700);
57
- --ui-border-strong: var(--ui-gray-800);
49
+ --ui-border-low: var(--ui-gray-400);
50
+ --ui-border-low: var(--ui-gray-500);
51
+ --ui-border: var(--ui-gray-600);
52
+ --ui-border-high: var(--ui-gray-700);
53
+ --ui-border-higher: var(--ui-gray-800);
58
54
 
59
55
  --ui-surface-lowest: var(--ui-gray-50);
60
56
  --ui-surface-lower: var(--ui-gray-100);
@@ -91,15 +87,16 @@
91
87
  --ui-space-32: 2rem;
92
88
  --ui-space-48: 3rem;
93
89
 
94
- --ui-font-size-xs: 0.8125rem; /* 13px */
90
+ --ui-font-size-xs: 0.75rem; /* 12px */
95
91
  --ui-font-size-sm: 0.875rem; /* 14px */
96
- --ui-font-size-md: 0.9375rem; /* 15px */
97
- --ui-font-size-lg: 1.0625rem; /* 17px */
98
- --ui-font-size-xl: 1.1875rem; /* 19px */
99
- --ui-font-size-2xl: 1.3125rem; /* 21px */
100
- --ui-font-size-3xl: 1.625rem; /* 26px */
101
- --ui-font-size-4xl: 2rem; /* 32px */
102
-
92
+ --ui-font-size-md: 1rem; /* 16px — base */
93
+ --ui-font-size-lg: 1.125rem; /* 18px */
94
+ --ui-font-size-xl: 1.25rem; /* 20px */
95
+ --ui-font-size-2xl: 1.5rem; /* 24px */
96
+ --ui-font-size-3xl: 1.75rem; /* 28px */
97
+ --ui-font-size-4xl: 2.25rem; /* 36px */
98
+
99
+ --ui-font-weight-light: 200;
103
100
  --ui-font-weight-normal: 400;
104
101
  --ui-font-weight-medium: 500;
105
102
  --ui-font-weight-semibold: 600;
@@ -118,9 +115,33 @@
118
115
  --ui-opacity-disabled: 0.5;
119
116
  }
120
117
 
121
- /* Dev overlay tokens scoped to .lt-app to reach chrome outside .editor-page. */
118
+ /* Dev overlay tokens, scoped to .lt-app for chrome outside .editor-page. */
122
119
  .lt-app {
123
120
  --ui-overlay-fill: rgba(128, 128, 128, 0.06);
124
121
  --ui-overlay-border: rgba(128, 128, 128, 0.32);
125
122
  --ui-overlay-num: rgba(128, 128, 128, 0.75);
126
123
  }
124
+
125
+ /* Section primitives: shared chrome for "named section in a bordered card". Body layout stays per-call-site. */
126
+ .editor-section-card {
127
+ display: flex;
128
+ flex-direction: column;
129
+ padding: var(--ui-space-20);
130
+ background: var(--ui-surface-low);
131
+ border: 1px solid var(--ui-border-low);
132
+ border-radius: var(--ui-radius-md);
133
+ }
134
+
135
+ .editor-section-title {
136
+ margin: 0;
137
+ font-size: var(--ui-font-size-xl);
138
+ font-weight: var(--ui-font-weight-semibold);
139
+ color: var(--ui-text-primary);
140
+ }
141
+
142
+ .editor-subsection-title {
143
+ margin: 0;
144
+ font-size: var(--ui-font-size-lg);
145
+ font-weight: var(--ui-font-weight-semibold);
146
+ color: var(--ui-text-primary);
147
+ }
@@ -59,11 +59,12 @@
59
59
  .ui-form-select {
60
60
  /* No vertical padding - let min-height and line-height center text naturally */
61
61
  padding: 0 var(--ui-space-16);
62
+ padding-right: var(--ui-space-32);
62
63
  min-height: 2.375rem; /* ~38px to match button height */
63
- background: var(--ui-surface-lowest) !important;
64
- border: 1px solid var(--ui-border-default) !important;
64
+ background-color: var(--ui-surface-lowest);
65
+ border: 1px solid var(--ui-border);
65
66
  border-radius: var(--ui-radius-md);
66
- color: var(--ui-text-primary) !important;
67
+ color: var(--ui-text-primary);
67
68
  font-family: var(--ui-font-sans);
68
69
  font-size: var(--ui-font-size-md);
69
70
  font-weight: var(--ui-font-weight-normal);
@@ -71,28 +72,26 @@
71
72
  vertical-align: middle;
72
73
  cursor: pointer;
73
74
  transition: all var(--ui-transition-fast);
74
- /* Prevent clipping */
75
- overflow: visible !important;
76
- box-sizing: border-box !important;
75
+ overflow: visible;
76
+ box-sizing: border-box;
77
77
  /* Reset browser defaults */
78
78
  -webkit-appearance: none;
79
79
  -moz-appearance: none;
80
80
  appearance: none;
81
81
  /* Custom dropdown arrow */
82
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
83
- background-repeat: no-repeat !important;
84
- background-position: right var(--ui-space-12) center !important;
85
- padding-right: var(--ui-space-32) !important;
82
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
83
+ background-repeat: no-repeat;
84
+ background-position: right var(--ui-space-12) center;
86
85
  }
87
86
 
88
87
  .ui-form-select:hover:not(:disabled) {
89
- background-color: var(--ui-surface-low) !important;
90
- border-color: var(--ui-border-medium) !important;
88
+ background-color: var(--ui-surface-low);
89
+ border-color: var(--ui-border-high);
91
90
  }
92
91
 
93
92
  .ui-form-select:focus {
94
93
  outline: none;
95
- border-color: var(--ui-border-strong) !important;
94
+ border-color: var(--ui-border-higher);
96
95
  box-shadow: 0 0 0 2px hsla(0, 58%, 50%, 0.2);
97
96
  }
98
97
 
@@ -102,13 +101,13 @@
102
101
  }
103
102
 
104
103
  .ui-form-select:active:not(:disabled) {
105
- background-color: var(--ui-surface) !important;
104
+ background-color: var(--ui-surface);
106
105
  }
107
106
 
108
107
  .ui-form-select:disabled {
109
- background-color: var(--ui-surface-lowest) !important;
110
- border-color: var(--ui-border-faint) !important;
111
- color: var(--ui-text-disabled) !important;
108
+ background-color: var(--ui-surface-lowest);
109
+ border-color: var(--ui-border-low);
110
+ color: var(--ui-text-disabled);
112
111
  cursor: not-allowed;
113
112
  }
114
113
 
@@ -116,8 +115,8 @@
116
115
  /* Note: Most option styling is controlled by browser/OS and cannot be fully overridden */
117
116
  /* These styles apply where browsers allow (limited support in Chrome/Firefox) */
118
117
  .ui-form-select option {
119
- background-color: var(--ui-surface-lowest) !important;
120
- color: var(--ui-text-primary) !important;
118
+ background-color: var(--ui-surface-lowest);
119
+ color: var(--ui-text-primary);
121
120
  padding: var(--ui-space-8) var(--ui-space-12);
122
121
  min-height: 2rem;
123
122
  font-size: var(--ui-font-size-md);
@@ -127,14 +126,14 @@
127
126
 
128
127
  /* Disabled options */
129
128
  .ui-form-select option:disabled {
130
- color: var(--ui-text-disabled) !important;
129
+ color: var(--ui-text-disabled);
131
130
  }
132
131
 
133
132
  /* Input Field Styling */
134
133
  .ui-form-input {
135
134
  padding: var(--ui-space-8);
136
135
  background: var(--ui-surface-lowest);
137
- border: 1px solid var(--ui-border-default);
136
+ border: 1px solid var(--ui-border);
138
137
  border-radius: var(--ui-radius-md);
139
138
  color: var(--ui-text-primary);
140
139
  font-family: var(--ui-font-sans);
@@ -143,19 +142,19 @@
143
142
  }
144
143
 
145
144
  .ui-form-input:hover:not(:disabled) {
146
- border-color: var(--ui-border-strong);
145
+ border-color: var(--ui-border-higher);
147
146
  background: var(--ui-surface-low);
148
147
  }
149
148
 
150
149
  .ui-form-input:focus {
151
150
  outline: none;
152
- border-color: var(--ui-border-strong);
151
+ border-color: var(--ui-border-higher);
153
152
  box-shadow: 0 0 0 3px hsla(240, 5%, 38%, 0.2);
154
153
  }
155
154
 
156
155
  .ui-form-input:disabled {
157
156
  background: var(--ui-surface-lowest);
158
- border-color: var(--ui-border-faint);
157
+ border-color: var(--ui-border-low);
159
158
  color: var(--ui-text-disabled);
160
159
  cursor: not-allowed;
161
160
  }
@@ -8,6 +8,7 @@
8
8
  evalBezier, buildCurvePath, curveTemplates,
9
9
  serializeCurve, deserializeCurve,
10
10
  } from './curveEngine';
11
+ import UIPillButton from './UIPillButton.svelte';
11
12
 
12
13
  interface Props {
13
14
  anchors: CurveAnchor[];
@@ -257,8 +258,31 @@
257
258
  <div class="curve-panel">
258
259
  <div class="curve-panel-header">
259
260
  <span class="curve-panel-label">{cfg.label}</span>
261
+ <div class="curve-help">
262
+ <button class="curve-help-badge" type="button" aria-label="Curve editor help">
263
+ <i class="fas fa-circle-info" aria-hidden="true"></i>
264
+ </button>
265
+ <div class="curve-help-popover" role="tooltip">
266
+ <div><strong>Click</strong> path to add a point</div>
267
+ <div><strong>&#x2325; Click</strong> a point to remove</div>
268
+ <div><strong>Double-click</strong> a point to toggle smooth/corner</div>
269
+ </div>
270
+ </div>
260
271
  </div>
261
- <div class="curve-container" style="padding-inline: calc(50% / {stepCount})">
272
+ <div class="curve-container">
273
+ <div class="curve-chart-overlay">
274
+ <UIPillButton
275
+ size="compact"
276
+ variant={shiftActive ? 'default' : 'outline'}
277
+ title="Vertical offset"
278
+ onclick={() => shiftActive = !shiftActive}
279
+ >
280
+ <svg viewBox="0 0 12 20" class="curve-tool-icon">
281
+ <path d="M6,2 L10,7 L7,7 L7,13 L10,13 L6,18 L2,13 L5,13 L5,7 L2,7 Z" />
282
+ </svg>
283
+ <span>Offset{offset !== 0 ? ` ${offset > 0 ? '+' : ''}${offset}` : ''}</span>
284
+ </UIPillButton>
285
+ </div>
262
286
  <svg
263
287
  bind:this={svgEl}
264
288
  class="curve-svg"
@@ -383,22 +407,9 @@
383
407
  </svg>
384
408
  </div>
385
409
  <div class="curve-toolbar">
386
- <div class="curve-toolbar-left">
387
- <button
388
- class="curve-tool-btn"
389
- class:active={shiftActive}
390
- type="button"
391
- title="Vertical offset"
392
- onclick={() => shiftActive = !shiftActive}
393
- >
394
- <svg viewBox="0 0 12 20" class="curve-tool-icon">
395
- <path d="M6,2 L10,7 L7,7 L7,13 L10,13 L6,18 L2,13 L5,13 L5,7 L2,7 Z" />
396
- </svg>
397
- <span>Offset{offset !== 0 ? ` ${offset > 0 ? '+' : ''}${offset}` : ''}</span>
398
- </button>
399
- <span class="curve-hint">&x2325;-click to remove point</span>
400
- <button class="curve-tool-btn" type="button" title="Copy curve" onclick={copyToClipboard}>Copy</button>
401
- <button class="curve-tool-btn" type="button" title="Paste curve" onclick={pasteFromClipboard}>Paste</button>
410
+ <div class="curve-toolbar-group">
411
+ <UIPillButton size="compact" variant="outline" title="Copy curve" onclick={copyToClipboard}>Copy</UIPillButton>
412
+ <UIPillButton size="compact" variant="outline" title="Paste curve" onclick={pasteFromClipboard}>Paste</UIPillButton>
402
413
  </div>
403
414
  <div class="curve-templates">
404
415
  {#each curveTemplates as tpl}
@@ -413,13 +424,12 @@
413
424
  </svg>
414
425
  </button>
415
426
  {/each}
427
+ </div>
428
+ <div class="curve-toolbar-group">
416
429
  {#if defaultAnchors}
417
- <button
418
- class="curve-tool-btn"
419
- type="button"
420
- title="Reset to default"
421
- onclick={resetToDefault}
422
- >Reset</button>
430
+ <UIPillButton size="compact" variant="outline" title="Reset to default" onclick={resetToDefault}>
431
+ Reset
432
+ </UIPillButton>
423
433
  {/if}
424
434
  </div>
425
435
  </div>
@@ -435,7 +445,7 @@
435
445
  .curve-panel-header {
436
446
  display: flex;
437
447
  align-items: center;
438
- justify-content: space-between;
448
+ gap: var(--ui-space-6);
439
449
  }
440
450
 
441
451
  .curve-panel-label {
@@ -445,16 +455,94 @@
445
455
  }
446
456
 
447
457
  .curve-container {
458
+ position: relative;
448
459
  width: 100%;
449
460
  height: 250px;
450
461
  box-sizing: border-box;
451
462
  }
452
463
 
464
+ .curve-chart-overlay {
465
+ position: absolute;
466
+ inset: var(--ui-space-8);
467
+ display: flex;
468
+ align-items: flex-end;
469
+ pointer-events: none;
470
+ }
471
+
472
+ .curve-chart-overlay > :global(*) {
473
+ pointer-events: auto;
474
+ }
475
+
476
+ .curve-help {
477
+ position: relative;
478
+ margin-left: auto;
479
+ }
480
+
481
+ .curve-help-badge {
482
+ display: inline-flex;
483
+ align-items: center;
484
+ justify-content: center;
485
+ width: 1.25rem;
486
+ height: 1.25rem;
487
+ padding: 0;
488
+ border: none;
489
+ background: transparent;
490
+ color: var(--ui-text-muted);
491
+ cursor: help;
492
+ border-radius: var(--ui-radius-full);
493
+ transition: color var(--ui-transition-fast, 120ms ease);
494
+ }
495
+
496
+ .curve-help-badge:hover,
497
+ .curve-help-badge:focus-visible {
498
+ color: var(--ui-text-primary);
499
+ outline: none;
500
+ }
501
+
502
+ .curve-help-badge i {
503
+ font-size: var(--ui-font-size-md);
504
+ }
505
+
506
+ .curve-help-popover {
507
+ position: absolute;
508
+ top: calc(100% + var(--ui-space-4));
509
+ right: 0;
510
+ display: grid;
511
+ gap: var(--ui-space-4);
512
+ min-width: 14rem;
513
+ padding: var(--ui-space-8) var(--ui-space-12);
514
+ background: var(--ui-surface-highest);
515
+ border: 1px solid var(--ui-border-low);
516
+ border-radius: var(--ui-radius-sm);
517
+ color: var(--ui-text-secondary);
518
+ font-size: var(--ui-font-size-sm);
519
+ line-height: 1.4;
520
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
521
+ opacity: 0;
522
+ transform: translateY(-2px);
523
+ pointer-events: none;
524
+ transition:
525
+ opacity var(--ui-transition-fast, 120ms ease),
526
+ transform var(--ui-transition-fast, 120ms ease);
527
+ z-index: 2;
528
+ }
529
+
530
+ .curve-help-popover strong {
531
+ color: var(--ui-text-primary);
532
+ font-weight: var(--ui-font-weight-medium);
533
+ }
534
+
535
+ .curve-help:hover .curve-help-popover,
536
+ .curve-help:focus-within .curve-help-popover {
537
+ opacity: 1;
538
+ transform: translateY(0);
539
+ }
540
+
453
541
  .curve-svg {
454
542
  width: 100%;
455
543
  height: 100%;
456
544
  background: transparent;
457
- border: 1px solid var(--ui-border-subtle);
545
+ border: 1px solid var(--ui-border-low);
458
546
  border-radius: var(--ui-radius-sm);
459
547
  cursor: crosshair;
460
548
  display: block;
@@ -467,7 +555,7 @@
467
555
  }
468
556
 
469
557
  .curve-grid {
470
- stroke: var(--ui-border-faint);
558
+ stroke: var(--ui-border-low);
471
559
  stroke-width: 0.5;
472
560
  vector-effect: non-scaling-stroke;
473
561
  }
@@ -477,7 +565,7 @@
477
565
  }
478
566
 
479
567
  .curve-step-line {
480
- stroke: var(--ui-border-faint);
568
+ stroke: var(--ui-border-low);
481
569
  stroke-width: 0.5;
482
570
  vector-effect: non-scaling-stroke;
483
571
 
@@ -565,48 +653,17 @@
565
653
  align-items: center;
566
654
  justify-content: space-between;
567
655
  flex-wrap: wrap;
568
- gap: var(--ui-space-2);
656
+ gap: var(--ui-space-8);
569
657
  padding-top: var(--ui-space-2);
570
658
  }
571
659
 
572
- .curve-toolbar-left {
660
+ .curve-toolbar-group {
573
661
  display: flex;
574
662
  align-items: center;
575
663
  gap: var(--ui-space-4);
576
664
  flex-wrap: wrap;
577
665
  }
578
666
 
579
- .curve-tool-btn {
580
- display: flex;
581
- align-items: center;
582
- gap: var(--ui-space-4);
583
- padding: var(--ui-space-2) var(--ui-space-6);
584
- border: 1px solid var(--ui-border-subtle);
585
- border-radius: var(--ui-radius-sm);
586
- background: var(--ui-surface-lowest);
587
- cursor: pointer;
588
- color: var(--ui-text-muted);
589
- font-size: var(--ui-font-size-md);
590
- }
591
-
592
- .curve-tool-btn:hover {
593
- border-color: var(--ui-border-medium);
594
- color: var(--ui-text-secondary);
595
- background: var(--ui-surface-high);
596
- }
597
-
598
- .curve-tool-btn.active {
599
- border-color: var(--ui-border-medium);
600
- background: var(--ui-surface-highest);
601
- color: var(--ui-text-primary);
602
- }
603
-
604
- .curve-tool-btn:disabled {
605
- opacity: 0.35;
606
- cursor: default;
607
- pointer-events: none;
608
- }
609
-
610
667
  .curve-tool-icon {
611
668
  width: 0.625rem;
612
669
  height: 1rem;
@@ -616,12 +673,6 @@
616
673
  fill: currentColor;
617
674
  }
618
675
 
619
- .curve-hint {
620
- font-size: var(--ui-font-size-md);
621
- color: var(--ui-text-muted);
622
- opacity: 0.6;
623
- }
624
-
625
676
  .curve-templates {
626
677
  display: flex;
627
678
  gap: var(--ui-space-2);
@@ -634,14 +685,14 @@
634
685
  width: 1.5rem;
635
686
  height: 1rem;
636
687
  padding: 0;
637
- border: 1px solid var(--ui-border-subtle);
688
+ border: 1px solid var(--ui-border-low);
638
689
  border-radius: var(--ui-radius-sm);
639
690
  background: var(--ui-surface-lowest);
640
691
  cursor: pointer;
641
692
  }
642
693
 
643
694
  .curve-template-btn:hover {
644
- border-color: var(--ui-border-medium);
695
+ border-color: var(--ui-border-high);
645
696
  background: var(--ui-surface-high);
646
697
  }
647
698
 
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
- import { hexToOklch, oklchToHex, gamutClamp } from '../lib/oklch';
3
- import InlineEditActions from '../components/InlineEditActions.svelte';
4
- import Button from '../components/Button.svelte';
2
+ import { hexToOklch, oklchToHex, gamutClamp } from '../core/palettes/oklch';
3
+ import InlineEditActions from '../../system/components/InlineEditActions.svelte';
4
+ import Button from '../../system/components/Button.svelte';
5
5
 
6
6
 
7
7
 
@@ -323,7 +323,7 @@
323
323
  gap: var(--ui-space-12);
324
324
  padding: var(--ui-space-12);
325
325
  background: var(--ui-surface-lowest);
326
- border: 1px solid var(--ui-border-subtle);
326
+ border: 1px solid var(--ui-border-low);
327
327
  border-radius: var(--ui-radius-md);
328
328
  }
329
329
 
@@ -338,7 +338,7 @@
338
338
  width: 1.5rem;
339
339
  height: 1.5rem;
340
340
  border-radius: var(--ui-radius-sm);
341
- border: 1px solid var(--ui-border-faint);
341
+ border: 1px solid var(--ui-border-low);
342
342
  flex-shrink: 0;
343
343
  }
344
344
 
@@ -349,7 +349,7 @@
349
349
  width: 1.5rem;
350
350
  height: 1.5rem;
351
351
  padding: 0;
352
- border: 1px solid var(--ui-border-default);
352
+ border: 1px solid var(--ui-border);
353
353
  border-radius: var(--ui-radius-sm);
354
354
  background: var(--ui-hover);
355
355
  color: var(--ui-text-secondary);
@@ -360,7 +360,7 @@
360
360
  &:hover {
361
361
  background: var(--ui-hover-high);
362
362
  color: var(--ui-text-primary);
363
- border-color: var(--ui-border-strong);
363
+ border-color: var(--ui-border-higher);
364
364
  }
365
365
  }
366
366
 
@@ -383,7 +383,7 @@
383
383
  }
384
384
 
385
385
  .hsl-hex:hover {
386
- border-color: var(--ui-border-default);
386
+ border-color: var(--ui-border);
387
387
  background: var(--ui-surface-low);
388
388
  }
389
389
 
@@ -392,7 +392,7 @@
392
392
  color: var(--ui-text-accent);
393
393
  font-family: var(--ui-font-mono);
394
394
  background: var(--ui-surface-low);
395
- border: 1px solid var(--ui-border-strong);
395
+ border: 1px solid var(--ui-border-higher);
396
396
  border-radius: var(--ui-radius-sm);
397
397
  padding: var(--ui-space-2) var(--ui-space-4);
398
398
  width: 5.5rem;
@@ -438,7 +438,7 @@
438
438
  position: relative;
439
439
  height: 1.25rem;
440
440
  border-radius: var(--ui-radius-md);
441
- border: 1px solid var(--ui-border-faint);
441
+ border: 1px solid var(--ui-border-low);
442
442
  flex: 1;
443
443
  min-width: 6rem;
444
444
  }
@@ -487,7 +487,7 @@
487
487
  }
488
488
 
489
489
  .slider-track input[type="range"]:focus-visible {
490
- outline: 2px solid var(--ui-border-medium);
490
+ outline: 2px solid var(--ui-border-high);
491
491
  outline-offset: 2px;
492
492
  }
493
493
 
@@ -499,7 +499,7 @@
499
499
  text-align: right;
500
500
  flex-shrink: 0;
501
501
  background: var(--ui-surface-lowest);
502
- border: 1px solid var(--ui-border-subtle);
502
+ border: 1px solid var(--ui-border-low);
503
503
  border-radius: var(--ui-radius-sm);
504
504
  padding: var(--ui-space-2) var(--ui-space-4);
505
505
  -moz-appearance: textfield;
@@ -518,7 +518,7 @@
518
518
 
519
519
  .hsl-slider-input:focus {
520
520
  outline: none;
521
- border-color: var(--ui-border-medium);
521
+ border-color: var(--ui-border-high);
522
522
  }
523
523
 
524
524
  .hsl-slider-unit {
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
- import { editorView } from '../lib/editorViewStore';
3
- import { parentRoute } from '../lib/parentRouteStore';
2
+ import { editorView } from '../core/store/editorViewStore';
3
+ import { parentRoute } from '../core/routing/parentRouteStore';
4
4
 
5
5
  interface Props {
6
6
  condensed?: boolean;
@@ -36,7 +36,7 @@
36
36
  </button>
37
37
  {:else}
38
38
  <div class="seg-group">
39
- <span class="seg-label">Editor</span>
39
+ <span class="seg-label">Editor Mode</span>
40
40
  <div class="seg" role="tablist" aria-label="Editor view">
41
41
  <button
42
42
  type="button"
@@ -77,19 +77,20 @@
77
77
  .seg-label {
78
78
  font-size: 10px;
79
79
  font-weight: var(--ui-font-weight-semibold);
80
- letter-spacing: 0.08em;
81
80
  text-transform: uppercase;
82
81
  color: #fff;
83
82
  padding-left: var(--ui-space-2);
83
+ margin-bottom: 2px;
84
84
  }
85
85
 
86
86
  .seg {
87
87
  display: flex;
88
88
  flex-direction: column;
89
89
  gap: 2px;
90
- padding: 3px;
90
+ padding: 4px;
91
+ margin-bottom: 4px;
91
92
  background: var(--ui-surface-low);
92
- border: 1px solid var(--ui-border-faint);
93
+ border: 1px solid var(--ui-text-primary);
93
94
  border-radius: var(--ui-radius-lg);
94
95
  /* Fill the sidebar's content area so the box width is fixed by the rail,
95
96
  not by which label happens to be active. Buttons inherit this width via