@motion-proto/live-tokens 0.6.2 → 0.7.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.
- package/README.md +14 -13
- package/dist-plugin/index.cjs +147 -136
- package/dist-plugin/index.d.cts +1 -1
- package/dist-plugin/index.d.ts +1 -1
- package/dist-plugin/index.js +145 -135
- package/package.json +25 -40
- package/src/{component-editor → editor/component-editor}/BadgeEditor.svelte +8 -82
- package/src/{component-editor → editor/component-editor}/CalloutEditor.svelte +4 -4
- package/src/{component-editor → editor/component-editor}/CardEditor.svelte +28 -76
- package/src/{component-editor → editor/component-editor}/CollapsibleSectionEditor.svelte +3 -3
- package/src/{component-editor → editor/component-editor}/CornerBadgeEditor.svelte +31 -93
- package/src/{component-editor → editor/component-editor}/DialogEditor.svelte +60 -57
- package/src/editor/component-editor/ImageEditor.svelte +30 -0
- package/src/{component-editor → editor/component-editor}/InlineEditActionsEditor.svelte +6 -4
- package/src/editor/component-editor/MenuSelectEditor.svelte +160 -0
- package/src/{component-editor → editor/component-editor}/NotificationEditor.svelte +64 -37
- package/src/{component-editor → editor/component-editor}/ProgressBarEditor.svelte +5 -4
- package/src/{component-editor → editor/component-editor}/RadioButtonEditor.svelte +3 -3
- package/src/{component-editor → editor/component-editor}/SectionDividerEditor.svelte +57 -84
- package/src/{component-editor → editor/component-editor}/SegmentedControlEditor.svelte +2 -2
- package/src/{component-editor → editor/component-editor}/StandardButtonsEditor.svelte +16 -20
- package/src/{component-editor → editor/component-editor}/TabBarEditor.svelte +9 -14
- package/src/{component-editor → editor/component-editor}/TableEditor.svelte +9 -18
- package/src/{component-editor → editor/component-editor}/TooltipEditor.svelte +11 -47
- package/src/{component-editor → editor/component-editor}/registry.ts +28 -18
- package/src/{component-editor → editor/component-editor}/scaffolding/AngleDial.svelte +2 -2
- package/src/{component-editor → editor/component-editor}/scaffolding/ComponentEditorBase.svelte +3 -51
- package/src/{component-editor → editor/component-editor}/scaffolding/ComponentFileManager.svelte +144 -416
- package/src/{component-editor → editor/component-editor}/scaffolding/ComponentFileMenu.svelte +18 -170
- package/src/{component-editor → editor/component-editor}/scaffolding/ComponentsTab.svelte +2 -2
- package/src/{component-editor → editor/component-editor}/scaffolding/CopyFromMenu.svelte +44 -4
- package/src/{component-editor → editor/component-editor}/scaffolding/DividerEditor.svelte +1 -1
- package/src/{component-editor → editor/component-editor}/scaffolding/FieldsetWrapper.svelte +1 -1
- package/src/{component-editor → editor/component-editor}/scaffolding/GradientCard.svelte +6 -6
- package/src/{component-editor → editor/component-editor}/scaffolding/LinkageChart.svelte +6 -6
- package/src/{component-editor → editor/component-editor}/scaffolding/LinkedBlock.svelte +6 -11
- package/src/editor/component-editor/scaffolding/NonStylableConfig.svelte +38 -0
- package/src/{component-editor → editor/component-editor}/scaffolding/SaveAsDialog.svelte +66 -12
- package/src/editor/component-editor/scaffolding/ShadowBackdrop.svelte +72 -0
- package/src/editor/component-editor/scaffolding/ShadowBackdropControls.svelte +132 -0
- package/src/editor/component-editor/scaffolding/StateBlock.svelte +257 -0
- package/src/{component-editor → editor/component-editor}/scaffolding/TokenLayout.svelte +9 -7
- package/src/editor/component-editor/scaffolding/VariantGroup.svelte +644 -0
- package/src/{component-editor → editor/component-editor}/scaffolding/editorContext.ts +19 -9
- package/src/{component-editor → editor/component-editor}/scaffolding/linkedBlock.ts +2 -2
- package/src/{component-editor → editor/component-editor}/scaffolding/types.ts +14 -0
- package/src/{lib → editor/core/components}/componentConfigService.ts +2 -2
- package/src/{lib → editor/core/components}/componentPersist.ts +5 -5
- package/src/editor/core/flashStatus.ts +30 -0
- package/src/{lib → editor/core/fonts}/fontLoader.ts +2 -2
- package/src/{lib → editor/core/fonts}/fontMigration.ts +4 -4
- package/src/{lib → editor/core/fonts}/fontParse.ts +1 -1
- package/src/editor/core/manifests/manifestService.ts +116 -0
- package/src/{lib → editor/core/palettes}/paletteDerivation.ts +2 -2
- package/src/{lib → editor/core/palettes}/tokenRegistry.ts +5 -5
- package/src/editor/core/productionPulse.ts +37 -0
- package/src/{lib → editor/core/routing}/router.ts +1 -1
- package/src/{lib/files/versionedFileResource.ts → editor/core/storage/files/versionedFileResourceClient.ts} +8 -1
- package/src/{lib → editor/core/store}/editorCore.ts +24 -8
- package/src/{lib → editor/core/store}/editorPersistence.ts +3 -3
- package/src/{lib → editor/core/store}/editorRenderer.ts +2 -2
- package/src/{lib → editor/core/store}/editorStore.ts +17 -17
- package/src/{lib → editor/core/store}/editorTypes.ts +1 -1
- package/src/{lib → editor/core/themes}/slices/columns.ts +2 -2
- package/src/{lib → editor/core/themes}/slices/components.ts +2 -2
- package/src/{lib → editor/core/themes}/slices/fonts.ts +1 -1
- package/src/{lib → editor/core/themes}/slices/gradients.ts +2 -2
- package/src/{lib → editor/core/themes}/slices/overlays.ts +1 -1
- package/src/{lib → editor/core/themes}/slices/palettes.ts +1 -1
- package/src/{lib → editor/core/themes}/slices/shadows.ts +3 -3
- package/src/{lib → editor/core/themes}/themeInit.ts +6 -6
- package/src/{lib → editor/core/themes}/themeService.ts +6 -6
- package/src/{lib → editor/core/themes}/themeTypes.ts +11 -7
- package/src/editor/index.ts +69 -0
- package/src/{lib → editor/overlay}/LiveEditorOverlay.svelte +79 -125
- package/src/{lib → editor/overlay}/columnsOverlay.ts +2 -2
- package/src/{pages → editor/pages}/ComponentEditorPage.svelte +12 -12
- package/src/{pages → editor/pages}/Editor.svelte +4 -4
- package/src/{pages → editor/pages}/EditorShell.svelte +18 -36
- package/src/{styles → editor/styles}/ui-editor.css +41 -21
- package/src/{styles → editor/styles}/ui-form-controls.css +8 -8
- package/src/{ui → editor/ui}/BezierCurveEditor.svelte +8 -8
- package/src/{ui → editor/ui}/ColorEditPanel.svelte +13 -13
- package/src/{ui → editor/ui}/EditorViewSwitcher.svelte +8 -6
- package/src/editor/ui/FileLoadList.svelte +350 -0
- package/src/editor/ui/FilePill.svelte +80 -0
- package/src/{ui → editor/ui}/FontStackEditor.svelte +7 -7
- package/src/{ui → editor/ui}/GradientEditor.svelte +11 -11
- package/src/{ui → editor/ui}/GradientStopPicker.svelte +1 -1
- package/src/editor/ui/ManifestFileManager.svelte +371 -0
- package/src/{ui → editor/ui}/PaletteEditor.svelte +132 -598
- package/src/{ui → editor/ui}/ProjectFontsSection.svelte +102 -144
- package/src/{ui → editor/ui}/SurfacesTab.svelte +3 -3
- package/src/{ui → editor/ui}/TextTab.svelte +3 -3
- package/src/{ui → editor/ui}/ThemeFileManager.svelte +286 -519
- package/src/{ui → editor/ui}/UICopyPopover.svelte +4 -4
- package/src/{ui → editor/ui}/UIFontFamilySelector.svelte +6 -6
- package/src/{ui → editor/ui}/UIFontSizeSelector.svelte +1 -1
- package/src/editor/ui/UIInfoPopover.svelte +244 -0
- package/src/{ui → editor/ui}/UILineHeightSelector.svelte +5 -5
- package/src/{ui → editor/ui}/UILinkToggle.svelte +2 -2
- package/src/{ui → editor/ui}/UIPaddingSelector.svelte +6 -6
- package/src/{ui → editor/ui}/UIPaletteSelector.svelte +26 -26
- package/src/editor/ui/UIPillButton.svelte +138 -0
- package/src/{ui → editor/ui}/UIRadio.svelte +2 -2
- package/src/{ui → editor/ui}/UIRelinkConfirmPopover.svelte +4 -4
- package/src/editor/ui/UISquareButton.svelte +172 -0
- package/src/{ui → editor/ui}/UITokenSelector.svelte +10 -10
- package/src/{ui → editor/ui}/UIVariantSelector.svelte +1 -1
- package/src/{ui → editor/ui}/VariablesTab.svelte +31 -8
- package/src/{ui → editor/ui}/palette/GradientStopEditor.svelte +13 -13
- package/src/{ui → editor/ui}/palette/OverridesPanel.svelte +13 -13
- package/src/{ui → editor/ui}/palette/PaletteBase.svelte +8 -5
- package/src/{ui → editor/ui}/palette/paletteEditorState.ts +1 -1
- package/src/editor/ui/palette/paletteMath.ts +275 -0
- package/src/{ui → editor/ui}/sections/ColumnsSection.svelte +137 -17
- package/src/{ui → editor/ui}/sections/GradientsSection.svelte +7 -7
- package/src/{ui → editor/ui}/sections/OverlaysSection.svelte +17 -17
- package/src/{ui → editor/ui}/sections/ShadowsSection.svelte +22 -22
- package/src/{ui → editor/ui}/sections/TokenScaleTable.svelte +3 -3
- package/src/{components → system/components}/Badge.svelte +0 -36
- package/src/{components → system/components}/Card.svelte +8 -62
- package/src/{components → system/components}/CornerBadge.svelte +8 -24
- package/src/{components → system/components}/Dialog.svelte +1 -1
- package/src/system/components/FloatingTokenTags.css +256 -0
- package/src/system/components/FloatingTokenTags.svelte +592 -0
- package/src/{components → system/components}/InlineEditActions.svelte +6 -4
- package/src/system/components/MenuSelect.svelte +229 -0
- package/src/{components → system/components}/ProgressBar.svelte +29 -11
- package/src/{components → system/components}/SegmentedControl.svelte +49 -43
- package/src/{components → system/components}/TabBar.svelte +81 -65
- package/src/{components → system/components}/Table.svelte +17 -3
- package/src/{components → system/components}/Tooltip.svelte +6 -4
- package/src/system/styles/CONVENTIONS.md +178 -0
- package/src/{styles → system/styles}/fonts.css +6 -3
- package/src/{styles → system/styles}/tokens.css +149 -29
- package/src/component-editor/ImageEditor.svelte +0 -74
- package/src/component-editor/scaffolding/NonStylableConfig.svelte +0 -62
- package/src/component-editor/scaffolding/ShadowBackdrop.svelte +0 -37
- package/src/component-editor/scaffolding/ShadowBackdropControls.svelte +0 -61
- package/src/component-editor/scaffolding/StateBlock.svelte +0 -132
- package/src/component-editor/scaffolding/VariantGroup.svelte +0 -310
- package/src/data/google-fonts.json +0 -75
- package/src/lib/index.ts +0 -68
- package/src/lib/presetService.ts +0 -214
- package/src/lib/productionPulse.ts +0 -32
- package/src/ui/PresetFileManager.svelte +0 -1116
- package/src/ui/UnsavedComponentsDialog.svelte +0 -315
- /package/src/{styles → app}/site.css +0 -0
- /package/src/{component-editor → editor/component-editor}/index.ts +0 -0
- /package/src/{component-editor → editor/component-editor}/scaffolding/DemoHeader.svelte +0 -0
- /package/src/{component-editor → editor/component-editor}/scaffolding/TypeEditor.svelte +0 -0
- /package/src/{component-editor → editor/component-editor}/scaffolding/buildTypeGroupTokens.ts +0 -0
- /package/src/{component-editor → editor/component-editor}/scaffolding/componentSectionType.ts +0 -0
- /package/src/{component-editor → editor/component-editor}/scaffolding/componentSources.ts +0 -0
- /package/src/{component-editor → editor/component-editor}/scaffolding/defaultSections.ts +0 -0
- /package/src/{component-editor → editor/component-editor}/scaffolding/siblings.ts +0 -0
- /package/src/{lib → editor/core/components}/componentConfigKeys.ts +0 -0
- /package/src/{lib → editor/core}/cssVarSync.ts +0 -0
- /package/src/{lib → editor/core/palettes}/oklch.ts +0 -0
- /package/src/{lib → editor/core/routing}/navLinkTypes.ts +0 -0
- /package/src/{lib → editor/core/routing}/parentRouteStore.ts +0 -0
- /package/src/{lib → editor/core/storage}/storage.ts +0 -0
- /package/src/{lib → editor/core/store}/editorConfig.ts +0 -0
- /package/src/{lib → editor/core/store}/editorConfigStore.ts +0 -0
- /package/src/{lib → editor/core/store}/editorKeybindings.ts +0 -0
- /package/src/{lib → editor/core/store}/editorViewStore.ts +0 -0
- /package/src/{lib → editor/core/themes}/migrations/2026-04-24-component-prefix-and-suffix-renames.ts +0 -0
- /package/src/{lib → editor/core/themes}/migrations/2026-04-24-legacy-keys-and-bg-to-canvas.ts +0 -0
- /package/src/{lib → editor/core/themes}/migrations/2026-04-27-segmentedcontrol-disabled-flatten.ts +0 -0
- /package/src/{lib → editor/core/themes}/migrations/2026-05-08-collapsiblesection-frame-and-cleanup.ts +0 -0
- /package/src/{lib → editor/core/themes}/migrations/2026-05-08-collapsiblesection-variant-namespace.ts +0 -0
- /package/src/{lib → editor/core/themes}/migrations/2026-05-10-sectiondivider-gradient-stops.ts +0 -0
- /package/src/{lib → editor/core/themes}/migrations/2026-05-13-primary-to-brand.ts +0 -0
- /package/src/{lib → editor/core/themes}/migrations/index.ts +0 -0
- /package/src/{lib → editor/core/themes}/parsers/globalRootBlock.ts +0 -0
- /package/src/{lib → editor/core/themes}/slices/domainVars.ts +0 -0
- /package/src/{lib → editor/overlay}/ColumnsOverlay.svelte +0 -0
- /package/src/{lib → editor/overlay}/overlayState.ts +0 -0
- /package/src/{pages → editor/pages}/ComponentEditorPage.svelte.d.ts +0 -0
- /package/src/{pages → editor/pages}/Editor.svelte.d.ts +0 -0
- /package/src/{ui → editor/ui}/Toggle.svelte +0 -0
- /package/src/{ui → editor/ui}/UIDialog.svelte +0 -0
- /package/src/{ui → editor/ui}/UIFontWeightSelector.svelte +0 -0
- /package/src/{ui → editor/ui}/UIOptionItem.svelte +0 -0
- /package/src/{ui → editor/ui}/UIOptionList.svelte +0 -0
- /package/src/{ui → editor/ui}/UIRadioGroup.svelte +0 -0
- /package/src/{lib → editor/ui}/copyPopover.ts +0 -0
- /package/src/{ui → editor/ui}/curveEngine.ts +0 -0
- /package/src/{ui → editor/ui}/index.ts +0 -0
- /package/src/{ui → editor/ui}/keepInViewport.ts +0 -0
- /package/src/{ui → editor/ui}/palette/ScaleCurveEditor.svelte +0 -0
- /package/src/{lib → editor/ui}/scrollSection.ts +0 -0
- /package/src/{ui → editor/ui}/sections/tokenScales.ts +0 -0
- /package/src/{ui → editor/ui}/variantScales.ts +0 -0
- /package/src/{assets → system/assets}/newspaper.webp +0 -0
- /package/src/{assets → system/assets}/offering.webp +0 -0
- /package/src/{components → system/components}/Button.svelte +0 -0
- /package/src/{components → system/components}/Callout.svelte +0 -0
- /package/src/{components → system/components}/CollapsibleSection.svelte +0 -0
- /package/src/{components → system/components}/Image.svelte +0 -0
- /package/src/{components → system/components}/Notification.svelte +0 -0
- /package/src/{components → system/components}/RadioButton.svelte +0 -0
- /package/src/{components → system/components}/SectionDivider.svelte +0 -0
- /package/src/{components → system/components}/types.ts +0 -0
- /package/src/{styles → system/styles}/_padding.scss +0 -0
- /package/src/{styles → system/styles}/fonts/Fraunces/Fraunces-italic-latin-ext.woff2 +0 -0
- /package/src/{styles → system/styles}/fonts/Fraunces/Fraunces-italic-latin.woff2 +0 -0
- /package/src/{styles → system/styles}/fonts/Fraunces/Fraunces-roman-latin-ext.woff2 +0 -0
- /package/src/{styles → system/styles}/fonts/Fraunces/Fraunces-roman-latin.woff2 +0 -0
- /package/src/{styles → system/styles}/fonts/Manrope/Manrope-latin-ext.woff2 +0 -0
- /package/src/{styles → system/styles}/fonts/Manrope/Manrope-latin.woff2 +0 -0
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
3
|
import EditorShell from './EditorShell.svelte';
|
|
4
4
|
import UICopyPopover from '../ui/UICopyPopover.svelte';
|
|
5
|
-
import { installEditorKeybindings } from '../
|
|
6
|
-
import { initializeEditorStore } from '../
|
|
7
|
-
import { storageKey } from '../
|
|
5
|
+
import { installEditorKeybindings } from '../core/store/editorKeybindings';
|
|
6
|
+
import { initializeEditorStore } from '../core/store/editorStore';
|
|
7
|
+
import { storageKey } from '../core/store/editorConfig';
|
|
8
8
|
// Editor chrome + form controls + icon font must be JS imports (not @import
|
|
9
9
|
// inside the style block) so Vite resolves them via the module graph
|
|
10
10
|
// regardless of how the consumer compiles Svelte CSS (external ?lang.css vs
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
gap: var(--ui-space-16);
|
|
66
66
|
padding: var(--ui-space-10) var(--ui-space-16);
|
|
67
67
|
background: black;
|
|
68
|
-
border-bottom: 1px solid var(--ui-border-
|
|
68
|
+
border-bottom: 1px solid var(--ui-border-low);
|
|
69
69
|
min-height: 52px;
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { run } from 'svelte/legacy';
|
|
3
3
|
|
|
4
|
-
import { onMount
|
|
4
|
+
import { onMount } from 'svelte';
|
|
5
5
|
import { get } from 'svelte/store';
|
|
6
6
|
import VariablesTab from '../ui/VariablesTab.svelte';
|
|
7
7
|
import ThemeFileManager from '../ui/ThemeFileManager.svelte';
|
|
8
8
|
import EditorViewSwitcher from '../ui/EditorViewSwitcher.svelte';
|
|
9
9
|
import ComponentsTab from '../component-editor/scaffolding/ComponentsTab.svelte';
|
|
10
|
-
import
|
|
11
|
-
import { persistTheme, hydrateTheme } from '../
|
|
12
|
-
import { scrollSectionIntoView } from '../
|
|
13
|
-
import { editorState } from '../
|
|
14
|
-
import { editorView, sidebarCondensed, selectedComponent } from '../
|
|
15
|
-
import { componentDirty } from '../
|
|
10
|
+
import ManifestFileManager from '../ui/ManifestFileManager.svelte';
|
|
11
|
+
import { persistTheme, hydrateTheme } from '../core/themes/themeService';
|
|
12
|
+
import { scrollSectionIntoView } from '../ui/scrollSection';
|
|
13
|
+
import { editorState } from '../core/store/editorStore';
|
|
14
|
+
import { editorView, sidebarCondensed, selectedComponent } from '../core/store/editorViewStore';
|
|
15
|
+
import { componentDirty } from '../core/store/editorStore';
|
|
16
16
|
import { componentRegistryEntries, validateRegistryAgainstServerScan } from '../component-editor/registry';
|
|
17
|
-
import { listComponents } from '../
|
|
17
|
+
import { listComponents } from '../core/components/componentConfigService';
|
|
18
18
|
|
|
19
19
|
const tokenNavItems = [
|
|
20
20
|
{ id: 'palette-editor', label: 'Palette Editor', icon: 'fas fa-palette' },
|
|
@@ -34,11 +34,9 @@
|
|
|
34
34
|
let selectedTokenSection: string | null = $state(null);
|
|
35
35
|
let saveStatus: 'idle' | 'saving' | 'saved' | 'error' = $state('idle');
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
let condensed = $derived($sidebarCondensed === 'auto' ? shellWidth < CONDENSE_BELOW : $sidebarCondensed);
|
|
37
|
+
// 'auto' = open by default. Auto-condensing on shellWidth caused a bounce
|
|
38
|
+
// as the overlay panel grew past the threshold mid-animation.
|
|
39
|
+
let condensed = $derived($sidebarCondensed === 'auto' ? false : $sidebarCondensed);
|
|
42
40
|
|
|
43
41
|
const HINT_DELAY_MS = 80;
|
|
44
42
|
let hintLabel: string | null = $state(null);
|
|
@@ -79,10 +77,7 @@
|
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
function toggleCondensed() {
|
|
82
|
-
sidebarCondensed.update((v) =>
|
|
83
|
-
const isCondensedNow = v === 'auto' ? shellWidth < CONDENSE_BELOW : v;
|
|
84
|
-
return !isCondensedNow;
|
|
85
|
-
});
|
|
80
|
+
sidebarCondensed.update((v) => !(v === true));
|
|
86
81
|
}
|
|
87
82
|
|
|
88
83
|
async function handleSave(detail: { fileName: string; displayName: string }) {
|
|
@@ -106,16 +101,7 @@
|
|
|
106
101
|
}
|
|
107
102
|
}
|
|
108
103
|
|
|
109
|
-
let ro: ResizeObserver | null = null;
|
|
110
104
|
onMount(async () => {
|
|
111
|
-
if (shellEl && typeof ResizeObserver !== 'undefined') {
|
|
112
|
-
ro = new ResizeObserver((entries) => {
|
|
113
|
-
const w = entries[0]?.contentRect.width;
|
|
114
|
-
if (typeof w === 'number') shellWidth = w;
|
|
115
|
-
});
|
|
116
|
-
ro.observe(shellEl);
|
|
117
|
-
shellWidth = shellEl.clientWidth;
|
|
118
|
-
}
|
|
119
105
|
try {
|
|
120
106
|
const summaries = await listComponents();
|
|
121
107
|
validateRegistryAgainstServerScan(summaries.map((s) => s.name));
|
|
@@ -123,13 +109,9 @@
|
|
|
123
109
|
// server unreachable — skip validation
|
|
124
110
|
}
|
|
125
111
|
});
|
|
126
|
-
|
|
127
|
-
onDestroy(() => {
|
|
128
|
-
ro?.disconnect();
|
|
129
|
-
});
|
|
130
112
|
</script>
|
|
131
113
|
|
|
132
|
-
<div class="layout" class:condensed
|
|
114
|
+
<div class="layout" class:condensed>
|
|
133
115
|
<nav class="sidebar" class:condensed>
|
|
134
116
|
<div class="rail-toggle-row">
|
|
135
117
|
<button
|
|
@@ -186,7 +168,7 @@
|
|
|
186
168
|
</div>
|
|
187
169
|
{#if !condensed}
|
|
188
170
|
<div class="sidebar-footer">
|
|
189
|
-
<
|
|
171
|
+
<ManifestFileManager />
|
|
190
172
|
</div>
|
|
191
173
|
{/if}
|
|
192
174
|
{/if}
|
|
@@ -228,7 +210,7 @@
|
|
|
228
210
|
overflow-y: auto;
|
|
229
211
|
overflow-x: hidden;
|
|
230
212
|
background: black;
|
|
231
|
-
border-right: 1px solid var(--ui-border-
|
|
213
|
+
border-right: 1px solid var(--ui-border-low);
|
|
232
214
|
display: flex;
|
|
233
215
|
z-index: 1;
|
|
234
216
|
flex-direction: column;
|
|
@@ -238,7 +220,7 @@
|
|
|
238
220
|
.rail-toggle-row {
|
|
239
221
|
display: flex;
|
|
240
222
|
justify-content: flex-end;
|
|
241
|
-
border-bottom: 1px solid var(--ui-border-
|
|
223
|
+
border-bottom: 1px solid var(--ui-border-low);
|
|
242
224
|
}
|
|
243
225
|
|
|
244
226
|
.rail-toggle {
|
|
@@ -356,7 +338,7 @@
|
|
|
356
338
|
flex-shrink: 0;
|
|
357
339
|
margin-top: auto;
|
|
358
340
|
padding: var(--ui-space-12) var(--ui-space-8) var(--ui-space-16);
|
|
359
|
-
border-top: 1px solid var(--ui-border-
|
|
341
|
+
border-top: 1px solid var(--ui-border-low);
|
|
360
342
|
}
|
|
361
343
|
|
|
362
344
|
.rail-hint {
|
|
@@ -366,7 +348,7 @@
|
|
|
366
348
|
z-index: 50;
|
|
367
349
|
padding: var(--ui-space-4) var(--ui-space-8);
|
|
368
350
|
background: var(--ui-surface-low);
|
|
369
|
-
border: 1px solid var(--ui-border
|
|
351
|
+
border: 1px solid var(--ui-border);
|
|
370
352
|
border-radius: var(--ui-radius-sm);
|
|
371
353
|
color: var(--ui-text-primary);
|
|
372
354
|
font-size: var(--ui-font-size-sm);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
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
|
|
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
|
-
/*
|
|
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
|
|
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-
|
|
54
|
-
--ui-border-
|
|
55
|
-
--ui-border
|
|
56
|
-
--ui-border-
|
|
57
|
-
--ui-border-
|
|
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,14 +87,14 @@
|
|
|
91
87
|
--ui-space-32: 2rem;
|
|
92
88
|
--ui-space-48: 3rem;
|
|
93
89
|
|
|
94
|
-
--ui-font-size-xs: 0.
|
|
90
|
+
--ui-font-size-xs: 0.75rem; /* 12px */
|
|
95
91
|
--ui-font-size-sm: 0.875rem; /* 14px */
|
|
96
|
-
--ui-font-size-md:
|
|
97
|
-
--ui-font-size-lg: 1.
|
|
98
|
-
--ui-font-size-xl: 1.
|
|
99
|
-
--ui-font-size-2xl: 1.
|
|
100
|
-
--ui-font-size-3xl: 1.
|
|
101
|
-
--ui-font-size-4xl:
|
|
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 */
|
|
102
98
|
|
|
103
99
|
--ui-font-weight-normal: 400;
|
|
104
100
|
--ui-font-weight-medium: 500;
|
|
@@ -118,9 +114,33 @@
|
|
|
118
114
|
--ui-opacity-disabled: 0.5;
|
|
119
115
|
}
|
|
120
116
|
|
|
121
|
-
/* Dev overlay tokens
|
|
117
|
+
/* Dev overlay tokens, scoped to .lt-app for chrome outside .editor-page. */
|
|
122
118
|
.lt-app {
|
|
123
119
|
--ui-overlay-fill: rgba(128, 128, 128, 0.06);
|
|
124
120
|
--ui-overlay-border: rgba(128, 128, 128, 0.32);
|
|
125
121
|
--ui-overlay-num: rgba(128, 128, 128, 0.75);
|
|
126
122
|
}
|
|
123
|
+
|
|
124
|
+
/* Section primitives: shared chrome for "named section in a bordered card". Body layout stays per-call-site. */
|
|
125
|
+
.editor-section-card {
|
|
126
|
+
display: flex;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
padding: var(--ui-space-20);
|
|
129
|
+
background: var(--ui-surface-low);
|
|
130
|
+
border: 1px solid var(--ui-border-low);
|
|
131
|
+
border-radius: var(--ui-radius-md);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.editor-section-title {
|
|
135
|
+
margin: 0;
|
|
136
|
+
font-size: var(--ui-font-size-xl);
|
|
137
|
+
font-weight: var(--ui-font-weight-semibold);
|
|
138
|
+
color: var(--ui-text-primary);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.editor-subsection-title {
|
|
142
|
+
margin: 0;
|
|
143
|
+
font-size: var(--ui-font-size-lg);
|
|
144
|
+
font-weight: var(--ui-font-weight-semibold);
|
|
145
|
+
color: var(--ui-text-primary);
|
|
146
|
+
}
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
padding: 0 var(--ui-space-16);
|
|
62
62
|
min-height: 2.375rem; /* ~38px to match button height */
|
|
63
63
|
background: var(--ui-surface-lowest) !important;
|
|
64
|
-
border: 1px solid var(--ui-border
|
|
64
|
+
border: 1px solid var(--ui-border) !important;
|
|
65
65
|
border-radius: var(--ui-radius-md);
|
|
66
66
|
color: var(--ui-text-primary) !important;
|
|
67
67
|
font-family: var(--ui-font-sans);
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
|
|
88
88
|
.ui-form-select:hover:not(:disabled) {
|
|
89
89
|
background-color: var(--ui-surface-low) !important;
|
|
90
|
-
border-color: var(--ui-border-
|
|
90
|
+
border-color: var(--ui-border-high) !important;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.ui-form-select:focus {
|
|
94
94
|
outline: none;
|
|
95
|
-
border-color: var(--ui-border-
|
|
95
|
+
border-color: var(--ui-border-higher) !important;
|
|
96
96
|
box-shadow: 0 0 0 2px hsla(0, 58%, 50%, 0.2);
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
|
|
108
108
|
.ui-form-select:disabled {
|
|
109
109
|
background-color: var(--ui-surface-lowest) !important;
|
|
110
|
-
border-color: var(--ui-border-
|
|
110
|
+
border-color: var(--ui-border-low) !important;
|
|
111
111
|
color: var(--ui-text-disabled) !important;
|
|
112
112
|
cursor: not-allowed;
|
|
113
113
|
}
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
.ui-form-input {
|
|
135
135
|
padding: var(--ui-space-8);
|
|
136
136
|
background: var(--ui-surface-lowest);
|
|
137
|
-
border: 1px solid var(--ui-border
|
|
137
|
+
border: 1px solid var(--ui-border);
|
|
138
138
|
border-radius: var(--ui-radius-md);
|
|
139
139
|
color: var(--ui-text-primary);
|
|
140
140
|
font-family: var(--ui-font-sans);
|
|
@@ -143,19 +143,19 @@
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.ui-form-input:hover:not(:disabled) {
|
|
146
|
-
border-color: var(--ui-border-
|
|
146
|
+
border-color: var(--ui-border-higher);
|
|
147
147
|
background: var(--ui-surface-low);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
.ui-form-input:focus {
|
|
151
151
|
outline: none;
|
|
152
|
-
border-color: var(--ui-border-
|
|
152
|
+
border-color: var(--ui-border-higher);
|
|
153
153
|
box-shadow: 0 0 0 3px hsla(240, 5%, 38%, 0.2);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.ui-form-input:disabled {
|
|
157
157
|
background: var(--ui-surface-lowest);
|
|
158
|
-
border-color: var(--ui-border-
|
|
158
|
+
border-color: var(--ui-border-low);
|
|
159
159
|
color: var(--ui-text-disabled);
|
|
160
160
|
cursor: not-allowed;
|
|
161
161
|
}
|
|
@@ -454,7 +454,7 @@
|
|
|
454
454
|
width: 100%;
|
|
455
455
|
height: 100%;
|
|
456
456
|
background: transparent;
|
|
457
|
-
border: 1px solid var(--ui-border-
|
|
457
|
+
border: 1px solid var(--ui-border-low);
|
|
458
458
|
border-radius: var(--ui-radius-sm);
|
|
459
459
|
cursor: crosshair;
|
|
460
460
|
display: block;
|
|
@@ -467,7 +467,7 @@
|
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
.curve-grid {
|
|
470
|
-
stroke: var(--ui-border-
|
|
470
|
+
stroke: var(--ui-border-low);
|
|
471
471
|
stroke-width: 0.5;
|
|
472
472
|
vector-effect: non-scaling-stroke;
|
|
473
473
|
}
|
|
@@ -477,7 +477,7 @@
|
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
.curve-step-line {
|
|
480
|
-
stroke: var(--ui-border-
|
|
480
|
+
stroke: var(--ui-border-low);
|
|
481
481
|
stroke-width: 0.5;
|
|
482
482
|
vector-effect: non-scaling-stroke;
|
|
483
483
|
|
|
@@ -581,7 +581,7 @@
|
|
|
581
581
|
align-items: center;
|
|
582
582
|
gap: var(--ui-space-4);
|
|
583
583
|
padding: var(--ui-space-2) var(--ui-space-6);
|
|
584
|
-
border: 1px solid var(--ui-border-
|
|
584
|
+
border: 1px solid var(--ui-border-low);
|
|
585
585
|
border-radius: var(--ui-radius-sm);
|
|
586
586
|
background: var(--ui-surface-lowest);
|
|
587
587
|
cursor: pointer;
|
|
@@ -590,13 +590,13 @@
|
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
.curve-tool-btn:hover {
|
|
593
|
-
border-color: var(--ui-border-
|
|
593
|
+
border-color: var(--ui-border-high);
|
|
594
594
|
color: var(--ui-text-secondary);
|
|
595
595
|
background: var(--ui-surface-high);
|
|
596
596
|
}
|
|
597
597
|
|
|
598
598
|
.curve-tool-btn.active {
|
|
599
|
-
border-color: var(--ui-border-
|
|
599
|
+
border-color: var(--ui-border-high);
|
|
600
600
|
background: var(--ui-surface-highest);
|
|
601
601
|
color: var(--ui-text-primary);
|
|
602
602
|
}
|
|
@@ -634,14 +634,14 @@
|
|
|
634
634
|
width: 1.5rem;
|
|
635
635
|
height: 1rem;
|
|
636
636
|
padding: 0;
|
|
637
|
-
border: 1px solid var(--ui-border-
|
|
637
|
+
border: 1px solid var(--ui-border-low);
|
|
638
638
|
border-radius: var(--ui-radius-sm);
|
|
639
639
|
background: var(--ui-surface-lowest);
|
|
640
640
|
cursor: pointer;
|
|
641
641
|
}
|
|
642
642
|
|
|
643
643
|
.curve-template-btn:hover {
|
|
644
|
-
border-color: var(--ui-border-
|
|
644
|
+
border-color: var(--ui-border-high);
|
|
645
645
|
background: var(--ui-surface-high);
|
|
646
646
|
}
|
|
647
647
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { hexToOklch, oklchToHex, gamutClamp } from '../
|
|
3
|
-
import InlineEditActions from '
|
|
4
|
-
import Button from '
|
|
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-
|
|
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-
|
|
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
|
|
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-
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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 '../
|
|
3
|
-
import { parentRoute } from '../
|
|
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,21 @@
|
|
|
77
77
|
.seg-label {
|
|
78
78
|
font-size: 10px;
|
|
79
79
|
font-weight: var(--ui-font-weight-semibold);
|
|
80
|
-
letter-spacing: 0.
|
|
80
|
+
letter-spacing: 0.04em;
|
|
81
81
|
text-transform: uppercase;
|
|
82
82
|
color: #fff;
|
|
83
83
|
padding-left: var(--ui-space-2);
|
|
84
|
+
margin-bottom: 2px;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
.seg {
|
|
87
88
|
display: flex;
|
|
88
89
|
flex-direction: column;
|
|
89
90
|
gap: 2px;
|
|
90
|
-
padding:
|
|
91
|
+
padding: 4px;
|
|
92
|
+
margin-bottom: 4px;
|
|
91
93
|
background: var(--ui-surface-low);
|
|
92
|
-
border: 1px solid var(--ui-
|
|
94
|
+
border: 1px solid var(--ui-text-primary);
|
|
93
95
|
border-radius: var(--ui-radius-lg);
|
|
94
96
|
/* Fill the sidebar's content area so the box width is fixed by the rail,
|
|
95
97
|
not by which label happens to be active. Buttons inherit this width via
|