@svadmin/core 0.84.0 → 0.84.2
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/package.json +1 -1
- package/src/color-scale.ts +6 -6
- package/src/copy-format.ts +1 -1
- package/src/theme.svelte.ts +1 -1
package/package.json
CHANGED
package/src/color-scale.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Color scale generation and theme-token exchange.
|
|
3
3
|
*
|
|
4
|
-
* Capability parity with the
|
|
5
|
-
* editor: derive a tonal scale from one brand color, build light/dark CSS
|
|
4
|
+
* Capability parity with the reference ecosystem's tone-scale generator and
|
|
5
|
+
* theme editor: derive a tonal scale from one brand color, build light/dark CSS
|
|
6
6
|
* variable bundles, and exchange presets as portable JSON.
|
|
7
7
|
*
|
|
8
8
|
* Boundaries (intentional):
|
|
@@ -220,10 +220,10 @@ function contrastAdjusted(
|
|
|
220
220
|
const SCALE_LIGHTNESS_STEP = (0.975 - 0.26) / 9;
|
|
221
221
|
|
|
222
222
|
/**
|
|
223
|
-
*
|
|
223
|
+
* Reference hover (5) / pressed (7) / disabled fill (3) for the written
|
|
224
224
|
* product bases. `#165DFF` is the CSS default and must not be regenerated.
|
|
225
|
-
* Dark values are the compiled
|
|
226
|
-
*
|
|
225
|
+
* Dark values are the compiled dark-theme channels of the reference component
|
|
226
|
+
* library 2.66.1, not the light scale reversed by hand.
|
|
227
227
|
*/
|
|
228
228
|
const OFFICIAL_INTERACTION_RAMPS: Record<string, { hover: string; pressed: string; disabled: string }> = {
|
|
229
229
|
'#165DFF': { hover: '#4080FF', pressed: '#0E42D2', disabled: '#94BFFF' },
|
|
@@ -263,7 +263,7 @@ function parseOklchColor(color: string): { l: number; c: number; h: number } | u
|
|
|
263
263
|
|
|
264
264
|
/**
|
|
265
265
|
* Hover / pressed / disabled fills for one brand color.
|
|
266
|
-
* Known
|
|
266
|
+
* Known reference bases return the pinned hex. Every other color shifts lightness
|
|
267
267
|
* by the existing OKLCH scale step so imported themes stay on the same ramp.
|
|
268
268
|
*/
|
|
269
269
|
export function interactionRamps(color: string): InteractionRamps {
|
package/src/copy-format.ts
CHANGED
package/src/theme.svelte.ts
CHANGED
|
@@ -623,7 +623,7 @@ export function unregisterThemeOwner(token: ThemeOwnerToken|undefined): void {
|
|
|
623
623
|
|
|
624
624
|
/**
|
|
625
625
|
* Derive a full tonal palette from one brand color and register it.
|
|
626
|
-
* Mirrors the
|
|
626
|
+
* Mirrors the reference tone-scale capability without a Less variable layer.
|
|
627
627
|
*/
|
|
628
628
|
export function registerColorTheme(input: { name: string; label?: string; color: string }): ColorPreset {
|
|
629
629
|
const derived=deriveColorPreset(input);
|