@motion-proto/live-tokens 0.3.2 → 0.3.6
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
CHANGED
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* UIPaletteSelector. Reads resolve through `tokenRegistry$` so values
|
|
12
12
|
* authored as `var(--gradient-angle-diagonal)` show their resolved degrees.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { setComponentAlias } from '../../lib/editorStore';
|
|
15
15
|
import { tokenRegistry$ } from '../../lib/tokenRegistry';
|
|
16
16
|
import UIPaletteSelector from '../../ui/UIPaletteSelector.svelte';
|
|
17
17
|
import AngleDial from './AngleDial.svelte';
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
parseNumberFromCss(resolveLiteralWith($tokenRegistry$, stopPositionVar(3)), '%') ?? 100,
|
|
60
60
|
] as [number, number, number];
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}) as [string, string, string];
|
|
62
|
+
// Reference the per-stop CSS var directly so the cascade fills in the
|
|
63
|
+
// component's CSS defaults when the user hasn't overridden a stop. Reading
|
|
64
|
+
// `aliases[...]` alone would miss defaults (no override → `#888`) even
|
|
65
|
+
// though the component is rendering the color via its own `:root` block.
|
|
66
|
+
$: stopColors = ([1, 2, 3] as StopIndex[]).map((i) => `var(${stopColorVar(i)})`) as [string, string, string];
|
|
67
67
|
|
|
68
68
|
// Build the live gradient string from current positions + colors so the
|
|
69
69
|
// ribbon reflects edits even mid-drag (before the component re-renders via
|