@newtone-dev/ui-react-web 0.44.0 → 0.46.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 +5 -3
- package/dist/app-frame/app-frame.css +77 -25
- package/dist/app-frame/app-frame.d.ts +2 -1
- package/dist/app-frame/app-frame.d.ts.map +1 -1
- package/dist/app-frame/app-frame.js +2 -1
- package/dist/app-frame/app-frame.js.map +1 -1
- package/dist/app-frame/index.d.ts +1 -1
- package/dist/app-frame/index.d.ts.map +1 -1
- package/dist/app-frame/launcher/launcher.d.ts.map +1 -1
- package/dist/app-frame/launcher/launcher.js +5 -3
- package/dist/app-frame/launcher/launcher.js.map +1 -1
- package/dist/app-frame/main-menu/main-menu.js +5 -1
- package/dist/app-frame/main-menu/main-menu.js.map +1 -1
- package/dist/app-frame/parts.d.ts +26 -1
- package/dist/app-frame/parts.d.ts.map +1 -1
- package/dist/app-frame/parts.js +17 -3
- package/dist/app-frame/parts.js.map +1 -1
- package/dist/ask-button/ask-button.css +7 -1
- package/dist/beside/beside.css +4 -0
- package/dist/button/button.css +14 -4
- package/dist/button/button.d.ts +12 -1
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/button.js +49 -3
- package/dist/button/button.js.map +1 -1
- package/dist/canvas/canvas.css +20 -5
- package/dist/canvas/cells/cells.d.ts +12 -1
- package/dist/canvas/cells/cells.d.ts.map +1 -1
- package/dist/canvas/cells/cells.js +16 -2
- package/dist/canvas/cells/cells.js.map +1 -1
- package/dist/canvas/cells/grid.d.ts +8 -2
- package/dist/canvas/cells/grid.d.ts.map +1 -1
- package/dist/canvas/cells/grid.js +8 -5
- package/dist/canvas/cells/grid.js.map +1 -1
- package/dist/canvas/dock/dock.d.ts +2 -2
- package/dist/canvas/dock/dock.js +2 -2
- package/dist/canvas/dock/dock.js.map +1 -1
- package/dist/card-box/card-box.css +8 -2
- package/dist/card-box/card-box.d.ts.map +1 -1
- package/dist/card-box/card-box.js +1 -1
- package/dist/card-box/card-box.js.map +1 -1
- package/dist/color/index.d.ts +4 -4
- package/dist/color/index.d.ts.map +1 -1
- package/dist/color/index.js +17 -15
- package/dist/color/index.js.map +1 -1
- package/dist/color/oklch.d.ts +6 -27
- package/dist/color/oklch.d.ts.map +1 -1
- package/dist/color/oklch.js +23 -61
- package/dist/color/oklch.js.map +1 -1
- package/dist/color/scale.d.ts +3 -18
- package/dist/color/scale.d.ts.map +1 -1
- package/dist/color/scale.js +13 -70
- package/dist/color/scale.js.map +1 -1
- package/dist/color/seeds.d.ts +51 -11
- package/dist/color/seeds.d.ts.map +1 -1
- package/dist/color/seeds.js +127 -41
- package/dist/color/seeds.js.map +1 -1
- package/dist/curve-field/curve-field.css +280 -0
- package/dist/curve-field/curve-field.d.ts +105 -0
- package/dist/curve-field/curve-field.d.ts.map +1 -0
- package/dist/curve-field/curve-field.js +532 -0
- package/dist/curve-field/curve-field.js.map +1 -0
- package/dist/curve-field/index.d.ts +3 -0
- package/dist/curve-field/index.d.ts.map +1 -0
- package/dist/curve-field/index.js +2 -0
- package/dist/curve-field/index.js.map +1 -0
- package/dist/diagram/diagram.css +63 -0
- package/dist/diagram/diagram.d.ts +63 -0
- package/dist/diagram/diagram.d.ts.map +1 -0
- package/dist/diagram/diagram.js +73 -0
- package/dist/diagram/diagram.js.map +1 -0
- package/dist/diagram/geometry.d.ts +60 -0
- package/dist/diagram/geometry.d.ts.map +1 -0
- package/dist/diagram/geometry.js +93 -0
- package/dist/diagram/geometry.js.map +1 -0
- package/dist/diagram/index.d.ts +7 -0
- package/dist/diagram/index.d.ts.map +1 -0
- package/dist/diagram/index.js +4 -0
- package/dist/diagram/index.js.map +1 -0
- package/dist/diagram/layout.d.ts +41 -0
- package/dist/diagram/layout.d.ts.map +1 -0
- package/dist/diagram/layout.js +157 -0
- package/dist/diagram/layout.js.map +1 -0
- package/dist/document/document.d.ts +7 -2
- package/dist/document/document.d.ts.map +1 -1
- package/dist/document/document.js +22 -4
- package/dist/document/document.js.map +1 -1
- package/dist/dynamic-range/dynamic-range.css +100 -0
- package/dist/dynamic-range/dynamic-range.d.ts +27 -0
- package/dist/dynamic-range/dynamic-range.d.ts.map +1 -0
- package/dist/dynamic-range/dynamic-range.js +20 -0
- package/dist/dynamic-range/dynamic-range.js.map +1 -0
- package/dist/dynamic-range/index.d.ts +3 -0
- package/dist/dynamic-range/index.d.ts.map +1 -0
- package/dist/dynamic-range/index.js +2 -0
- package/dist/dynamic-range/index.js.map +1 -0
- package/dist/file-grid/file-grid.css +65 -0
- package/dist/file-grid/file-grid.d.ts +35 -2
- package/dist/file-grid/file-grid.d.ts.map +1 -1
- package/dist/file-grid/file-grid.js +64 -3
- package/dist/file-grid/file-grid.js.map +1 -1
- package/dist/file-grid/index.d.ts +2 -2
- package/dist/file-grid/index.d.ts.map +1 -1
- package/dist/file-grid/index.js +1 -1
- package/dist/file-grid/index.js.map +1 -1
- package/dist/floating-bar/floating-bar.css +122 -32
- package/dist/floating-bar/floating-bar.d.ts +21 -2
- package/dist/floating-bar/floating-bar.d.ts.map +1 -1
- package/dist/floating-bar/floating-bar.js +64 -20
- package/dist/floating-bar/floating-bar.js.map +1 -1
- package/dist/floating-bar/index.d.ts +1 -1
- package/dist/floating-bar/index.d.ts.map +1 -1
- package/dist/font-picker/font-picker.css +4 -2
- package/dist/font-picker/font-picker.d.ts +34 -4
- package/dist/font-picker/font-picker.d.ts.map +1 -1
- package/dist/font-picker/font-picker.js +45 -9
- package/dist/font-picker/font-picker.js.map +1 -1
- package/dist/font-picker/index.d.ts +2 -2
- package/dist/font-picker/index.d.ts.map +1 -1
- package/dist/font-picker/index.js +1 -1
- package/dist/font-picker/index.js.map +1 -1
- package/dist/hint/hint.css +2 -6
- package/dist/icon/glyphs.d.ts +18 -0
- package/dist/icon/glyphs.d.ts.map +1 -0
- package/dist/icon/glyphs.js +17 -0
- package/dist/icon/glyphs.js.map +1 -0
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.d.ts.map +1 -1
- package/dist/icon/index.js +1 -0
- package/dist/icon/index.js.map +1 -1
- package/dist/identity/identity.d.ts +11 -3
- package/dist/identity/identity.d.ts.map +1 -1
- package/dist/identity/identity.js +8 -4
- package/dist/identity/identity.js.map +1 -1
- package/dist/index.d.ts +33 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/inspector/index.d.ts +1 -1
- package/dist/inspector/index.d.ts.map +1 -1
- package/dist/inspector/inspector.css +368 -7
- package/dist/inspector/inspector.d.ts +182 -5
- package/dist/inspector/inspector.d.ts.map +1 -1
- package/dist/inspector/inspector.js +85 -7
- package/dist/inspector/inspector.js.map +1 -1
- package/dist/look-picker/look-picker.css +62 -2
- package/dist/look-picker/look-picker.d.ts +34 -2
- package/dist/look-picker/look-picker.d.ts.map +1 -1
- package/dist/look-picker/look-picker.js +51 -42
- package/dist/look-picker/look-picker.js.map +1 -1
- package/dist/material/material.css +128 -57
- package/dist/number-field/number-field.css +34 -0
- package/dist/number-field/number-field.d.ts +29 -3
- package/dist/number-field/number-field.d.ts.map +1 -1
- package/dist/number-field/number-field.js +61 -10
- package/dist/number-field/number-field.js.map +1 -1
- package/dist/page-editor/page-editor.css +2 -6
- package/dist/picker/picker.css +42 -0
- package/dist/picker/picker.d.ts +10 -1
- package/dist/picker/picker.d.ts.map +1 -1
- package/dist/picker/picker.js +40 -5
- package/dist/picker/picker.js.map +1 -1
- package/dist/pop-menu/index.d.ts +7 -0
- package/dist/pop-menu/index.d.ts.map +1 -0
- package/dist/pop-menu/index.js +6 -0
- package/dist/pop-menu/index.js.map +1 -0
- package/dist/{floating-bar/menu.d.ts → pop-menu/pop-menu.d.ts} +10 -2
- package/dist/pop-menu/pop-menu.d.ts.map +1 -0
- package/dist/{floating-bar/menu.js → pop-menu/pop-menu.js} +35 -12
- package/dist/pop-menu/pop-menu.js.map +1 -0
- package/dist/prompt-field/prompt-field.css +3 -3
- package/dist/prompt-field/prompt-field.d.ts +3 -3
- package/dist/prompt-field/prompt-field.d.ts.map +1 -1
- package/dist/prompt-field/prompt-field.js +10 -4
- package/dist/prompt-field/prompt-field.js.map +1 -1
- package/dist/quick-action/quick-action.css +1 -1
- package/dist/seed-color-field/seed-color-field.css +8 -10
- package/dist/seed-color-field/seed-color-field.d.ts +9 -0
- package/dist/seed-color-field/seed-color-field.d.ts.map +1 -1
- package/dist/seed-color-field/seed-color-field.js +37 -10
- package/dist/seed-color-field/seed-color-field.js.map +1 -1
- package/dist/seed-contrast-field/index.d.ts +5 -0
- package/dist/seed-contrast-field/index.d.ts.map +1 -0
- package/dist/seed-contrast-field/index.js +3 -0
- package/dist/seed-contrast-field/index.js.map +1 -0
- package/dist/seed-contrast-field/seed-contrast-field.css +11 -0
- package/dist/seed-contrast-field/seed-contrast-field.d.ts +36 -0
- package/dist/seed-contrast-field/seed-contrast-field.d.ts.map +1 -0
- package/dist/seed-contrast-field/seed-contrast-field.js +18 -0
- package/dist/seed-contrast-field/seed-contrast-field.js.map +1 -0
- package/dist/seed-contrast-field/seed-contrast-slider.css +112 -0
- package/dist/seed-contrast-field/seed-contrast-slider.d.ts +22 -0
- package/dist/seed-contrast-field/seed-contrast-slider.d.ts.map +1 -0
- package/dist/seed-contrast-field/seed-contrast-slider.js +75 -0
- package/dist/seed-contrast-field/seed-contrast-slider.js.map +1 -0
- package/dist/seed-roundness-field/index.d.ts +3 -0
- package/dist/seed-roundness-field/index.d.ts.map +1 -0
- package/dist/seed-roundness-field/index.js +2 -0
- package/dist/seed-roundness-field/index.js.map +1 -0
- package/dist/seed-roundness-field/seed-roundness-field.css +23 -0
- package/dist/seed-roundness-field/seed-roundness-field.d.ts +39 -0
- package/dist/seed-roundness-field/seed-roundness-field.d.ts.map +1 -0
- package/dist/seed-roundness-field/seed-roundness-field.js +15 -0
- package/dist/seed-roundness-field/seed-roundness-field.js.map +1 -0
- package/dist/seed-steps/index.d.ts +8 -0
- package/dist/seed-steps/index.d.ts.map +1 -0
- package/dist/seed-steps/index.js +7 -0
- package/dist/seed-steps/index.js.map +1 -0
- package/dist/seed-steps/reset-focus.d.ts +16 -0
- package/dist/seed-steps/reset-focus.d.ts.map +1 -0
- package/dist/seed-steps/reset-focus.js +53 -0
- package/dist/seed-steps/reset-focus.js.map +1 -0
- package/dist/seed-steps/seed-steps.css +83 -0
- package/dist/seed-steps/seed-steps.d.ts +47 -0
- package/dist/seed-steps/seed-steps.d.ts.map +1 -0
- package/dist/seed-steps/seed-steps.js +95 -0
- package/dist/seed-steps/seed-steps.js.map +1 -0
- package/dist/shell/shell.css +31 -33
- package/dist/slide-list/slide-list.css +23 -2
- package/dist/slide-list/slide-list.d.ts +11 -2
- package/dist/slide-list/slide-list.d.ts.map +1 -1
- package/dist/slide-list/slide-list.js +6 -6
- package/dist/slide-list/slide-list.js.map +1 -1
- package/dist/split/split.css +11 -8
- package/dist/split/split.d.ts +2 -0
- package/dist/split/split.d.ts.map +1 -1
- package/dist/split/split.js +21 -3
- package/dist/split/split.js.map +1 -1
- package/dist/stage/stage.d.ts +11 -4
- package/dist/stage/stage.d.ts.map +1 -1
- package/dist/stage/stage.js +30 -9
- package/dist/stage/stage.js.map +1 -1
- package/dist/step-list/index.d.ts +3 -0
- package/dist/step-list/index.d.ts.map +1 -0
- package/dist/step-list/index.js +2 -0
- package/dist/step-list/index.js.map +1 -0
- package/dist/step-list/step-list.css +224 -0
- package/dist/step-list/step-list.d.ts +211 -0
- package/dist/step-list/step-list.d.ts.map +1 -0
- package/dist/step-list/step-list.js +242 -0
- package/dist/step-list/step-list.js.map +1 -0
- package/dist/step-strip/index.d.ts +3 -0
- package/dist/step-strip/index.d.ts.map +1 -0
- package/dist/step-strip/index.js +2 -0
- package/dist/step-strip/index.js.map +1 -0
- package/dist/step-strip/step-strip.css +118 -0
- package/dist/step-strip/step-strip.d.ts +52 -0
- package/dist/step-strip/step-strip.d.ts.map +1 -0
- package/dist/step-strip/step-strip.js +47 -0
- package/dist/step-strip/step-strip.js.map +1 -0
- package/dist/suggestion/index.d.ts +3 -0
- package/dist/suggestion/index.d.ts.map +1 -0
- package/dist/suggestion/index.js +2 -0
- package/dist/suggestion/index.js.map +1 -0
- package/dist/suggestion/suggestion.css +45 -0
- package/dist/suggestion/suggestion.d.ts +23 -0
- package/dist/suggestion/suggestion.d.ts.map +1 -0
- package/dist/suggestion/suggestion.js +45 -0
- package/dist/suggestion/suggestion.js.map +1 -0
- package/dist/surface/surface.css +112 -0
- package/dist/switch/switch.css +1 -6
- package/dist/text-field/text-field.css +11 -2
- package/dist/thread/thread.css +2 -10
- package/dist/thread/thread.js +1 -1
- package/dist/thread/thread.js.map +1 -1
- package/dist/tile-picker/index.d.ts +1 -1
- package/dist/tile-picker/index.d.ts.map +1 -1
- package/dist/tile-picker/tile-picker.css +56 -10
- package/dist/tile-picker/tile-picker.d.ts +64 -7
- package/dist/tile-picker/tile-picker.d.ts.map +1 -1
- package/dist/tile-picker/tile-picker.js +79 -47
- package/dist/tile-picker/tile-picker.js.map +1 -1
- package/dist/tile-search/index.d.ts +7 -0
- package/dist/tile-search/index.d.ts.map +1 -0
- package/dist/tile-search/index.js +7 -0
- package/dist/tile-search/index.js.map +1 -0
- package/dist/tile-search/narrow.d.ts +22 -0
- package/dist/tile-search/narrow.d.ts.map +1 -0
- package/dist/tile-search/narrow.js +62 -0
- package/dist/tile-search/narrow.js.map +1 -0
- package/dist/tile-search/search-box.d.ts +19 -0
- package/dist/tile-search/search-box.d.ts.map +1 -0
- package/dist/tile-search/search-box.js +47 -0
- package/dist/tile-search/search-box.js.map +1 -0
- package/dist/tooltip/tooltip.css +13 -20
- package/dist/tooltip/tooltip.d.ts +2 -2
- package/dist/tooltip/tooltip.d.ts.map +1 -1
- package/dist/tooltip/tooltip.js +15 -2
- package/dist/tooltip/tooltip.js.map +1 -1
- package/dist/workbench/workbench.css +128 -4
- package/dist/workbench/workbench.d.ts +28 -1
- package/dist/workbench/workbench.d.ts.map +1 -1
- package/dist/workbench/workbench.js +13 -4
- package/dist/workbench/workbench.js.map +1 -1
- package/package.json +43 -1
- package/dist/color/gamut.d.ts +0 -20
- package/dist/color/gamut.d.ts.map +0 -1
- package/dist/color/gamut.js +0 -72
- package/dist/color/gamut.js.map +0 -1
- package/dist/floating-bar/menu.d.ts.map +0 -1
- package/dist/floating-bar/menu.js.map +0 -1
package/dist/color/seeds.js
CHANGED
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
// This is the boundary the rest of the library meets: `Identity` writes what
|
|
4
4
|
// `seedProperties` returns onto an element, and CSS inherits it down.
|
|
5
5
|
//
|
|
6
|
+
// The palettes come from Newtone's palette engine itself (scale.ts: `deriveScale` is the engine's `createScale`,
|
|
7
|
+
// imported live from `@newtone-dev/ui-tokens/engine` since 2026-11-14 -- Joshua's decision, the HuevOS Core, page
|
|
8
|
+
// palette-engine). So a seed's `h` and `c` may each be a curve, as in seed.json, and a preview writes the same two
|
|
9
|
+
// ladders the build emits: the absolute one, and the one Contrast sets, which the roles read.
|
|
10
|
+
//
|
|
6
11
|
// Private to `color/`. What leaves the folder is decided by index.ts.
|
|
7
|
-
import { cssNumber } from '
|
|
12
|
+
import { cssNumber } from '@newtone-dev/ui-tokens/engine/vector';
|
|
8
13
|
import { deriveScale, STEPS } from './scale.js';
|
|
9
14
|
/**
|
|
10
15
|
* Whether to write `oklch()` or a hex.
|
|
@@ -17,13 +22,6 @@ import { deriveScale, STEPS } from './scale.js';
|
|
|
17
22
|
function prefersOklch() {
|
|
18
23
|
return typeof CSS !== 'undefined' && CSS.supports?.('color', 'oklch(0% 0 0)') === true;
|
|
19
24
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Turn a set of seeds into the custom properties that re-derive those palettes.
|
|
22
|
-
*
|
|
23
|
-
* Derivation is atomic: a palette named here has all fifty-one steps recomputed, and one
|
|
24
|
-
* not named is untouched, so it inherits from the enclosing scope. That inheritance is
|
|
25
|
-
* CSS's, not ours -- which is why nesting works to any depth for free.
|
|
26
|
-
*/
|
|
27
25
|
// ---------------------------------------------------------------------------
|
|
28
26
|
// The clamps -- contracts/seeds.md sections 3 and 4
|
|
29
27
|
// ---------------------------------------------------------------------------
|
|
@@ -33,9 +31,13 @@ function prefersOklch() {
|
|
|
33
31
|
// dull blue.
|
|
34
32
|
//
|
|
35
33
|
// Duplicated from build.mjs rather than shared, and that is a real cost stated plainly: two
|
|
36
|
-
// copies of fourteen ranges can drift.
|
|
37
|
-
// the tokens repo, which
|
|
38
|
-
//
|
|
34
|
+
// copies of fourteen ranges can drift. Until 2026-11-14 they could not be shared without this
|
|
35
|
+
// repo importing from the tokens repo, which the repo blueprint's section 2 ruled out. **Since
|
|
36
|
+
// 2026-11-14 this repo does import from the tokens repo -- the palette engine and nothing else**
|
|
37
|
+
// (Joshua's decision; the HuevOS Core, page palette-engine) -- and the clamps are not the engine's:
|
|
38
|
+
// they live in build.mjs, which is a command rather than a module, and the runtime's custom hue
|
|
39
|
+
// ranges are deliberately not the build's circle until issue 184 is decided. So the tables stay
|
|
40
|
+
// duplicated, guarded as below.
|
|
39
41
|
//
|
|
40
42
|
// ~~**Trigger to unify:** the two disagree once.~~ **THAT TRIGGER FIRED ON 2026-09-13 AND THE
|
|
41
43
|
// ANSWER WAS NO, WHICH IS WHY IT IS REWORDED RATHER THAN DELETED.** The neutral ceiling was raised
|
|
@@ -48,8 +50,8 @@ function prefersOklch() {
|
|
|
48
50
|
// SO THE DUPLICATION IS GUARDED AND THE TRIGGER WAS NAMING THE WRONG EVENT. What makes two copies
|
|
49
51
|
// dangerous is drifting UNNOTICED; these cannot, because neither copy is the source -- the contract
|
|
50
52
|
// is, and a checker executes it against both. A third package to hold fourteen ranges would remove
|
|
51
|
-
// a duplication that costs nothing and add a dependency
|
|
52
|
-
//
|
|
53
|
+
// a duplication that costs nothing and add a dependency nobody has asked for.
|
|
54
|
+
// governance/deferrals/a-trigger-is-a-signal-to-decide-again.md: the trigger
|
|
53
55
|
// fires the question, and the question was answered rather than inherited.
|
|
54
56
|
//
|
|
55
57
|
// **Trigger to unify, reworded:** the two disagree once AND NOTHING REPORTS IT -- a range reaches a
|
|
@@ -92,17 +94,64 @@ const fmt = (v) => (typeof v === 'number' ? String(v) : JSON.stringify(v));
|
|
|
92
94
|
// reached for the same wrong form.
|
|
93
95
|
const isWholeDegree = (n) => Number.isInteger(n);
|
|
94
96
|
const isTwoDecimals = (n) => typeof n === 'number' && n === Number(n.toFixed(2));
|
|
97
|
+
const hueRange = (r) => ({ bounds: r, text: `[${r[0]}, ${r[1]}]` });
|
|
98
|
+
const chromaRange = (r) => ({
|
|
99
|
+
bounds: r,
|
|
100
|
+
text: `[${r[0].toFixed(3)}, ${r[1].toFixed(3)}]`,
|
|
101
|
+
});
|
|
102
|
+
const HUE_GRAIN = { ok: isWholeDegree, text: 'is not a whole degree' };
|
|
103
|
+
const CHROMA_GRAIN = { ok: isTwoDecimals, text: 'is finer than two decimals' };
|
|
104
|
+
const CURVE_KEYS = ['start', 'end', 'curve'];
|
|
105
|
+
const isPlainObject = (v) => v !== null && typeof v === 'object' && !Array.isArray(v);
|
|
106
|
+
function checkSeedValue(errs, where, v, range, grain) {
|
|
107
|
+
// Range first, granularity as an `else if`. A value that is both out of range and badly
|
|
108
|
+
// grained reports the range only -- the precision of a number nobody should be looking at
|
|
109
|
+
// yet is not the thing to tell them. Same shape as the build's checkKey.
|
|
110
|
+
const one = (path, n) => {
|
|
111
|
+
if (!inRange(n, range.bounds))
|
|
112
|
+
errs.push(`seed ${path} ${fmt(n)} outside ${range.text}`);
|
|
113
|
+
else if (!grain.ok(n))
|
|
114
|
+
errs.push(`seed ${path} ${fmt(n)} ${grain.text}`);
|
|
115
|
+
};
|
|
116
|
+
if (!isPlainObject(v))
|
|
117
|
+
return one(where, v);
|
|
118
|
+
for (const key of Object.keys(v))
|
|
119
|
+
if (!CURVE_KEYS.includes(key))
|
|
120
|
+
errs.push(`seed ${where} has unknown key ${JSON.stringify(key)}`);
|
|
121
|
+
one(`${where}.start`, v.start);
|
|
122
|
+
one(`${where}.end`, v.end);
|
|
123
|
+
if (typeof v.start === 'number' && v.start === v.end)
|
|
124
|
+
errs.push(`seed ${where} starts and ends at ${fmt(v.start)}: write ${fmt(v.start)}`);
|
|
125
|
+
if (v.curve === undefined)
|
|
126
|
+
return;
|
|
127
|
+
const c = v.curve;
|
|
128
|
+
if (!Array.isArray(c) || c.length !== 2 || !c.every((x) => typeof x === 'number' && x >= 0 && x <= 1))
|
|
129
|
+
errs.push(`seed ${where}.curve ${fmt(c)} is not two numbers from 0 to 1`);
|
|
130
|
+
else if (!c.every(isTwoDecimals))
|
|
131
|
+
errs.push(`seed ${where}.curve ${fmt(c)} is finer than two decimals`);
|
|
132
|
+
else if (c[0] === 0 && c[1] === 1)
|
|
133
|
+
errs.push(`seed ${where}.curve ${fmt(c)} sits on its ends: write it without a curve`);
|
|
134
|
+
}
|
|
95
135
|
/**
|
|
96
136
|
* Every way this seed set breaks the contract, as the build's own message strings.
|
|
97
137
|
*
|
|
98
138
|
* **Every violation, not the first.** Somebody who has just edited six numbers should not have
|
|
99
139
|
* to run six times to find six mistakes -- contracts/seeds.md section 7.
|
|
100
140
|
*
|
|
101
|
-
*
|
|
141
|
+
* **A curve is checked as the build checks it** (since 2026-11-14): a system palette's `h` and `c`, and a custom
|
|
142
|
+
* palette's `h`, may each be one, and its refusals are the build's seven curve messages, word for word.
|
|
143
|
+
*
|
|
144
|
+
* Four differences from the build, all deliberate. A palette may be ABSENT here: a runtime seed
|
|
102
145
|
* is a partial override and what it does not name inherits, where seed.json must name
|
|
103
|
-
* everything.
|
|
104
|
-
* whatever accepts runtime seeds, because seed.json is the authored
|
|
105
|
-
* saturation is ours and belongs.
|
|
146
|
+
* everything. A `custom` saturation is REJECTED here, a curve as much as a number: section 7
|
|
147
|
+
* delegates that one rule to whatever accepts runtime seeds, because seed.json is the authored
|
|
148
|
+
* default where the saturation is ours and belongs. A `custom` hue is held to its palette's
|
|
149
|
+
* range here and to the circle in the build: section 7 says so, and issue 184 is where the
|
|
150
|
+
* runtime catches up. And a `custom` palette is refused BY NAME when it comes without its
|
|
151
|
+
* saturation, so that no custom palette is ever accepted (since 2026-11-14): the saturation it
|
|
152
|
+
* needs is seed.json's, which no runtime seed carries, so there is nothing to derive it from.
|
|
153
|
+
* Until then the engine itself threw a TypeError on the missing `c`, past a validator that had
|
|
154
|
+
* said yes -- and this function is the type (`Seed` above), so what it accepts must derive.
|
|
106
155
|
*/
|
|
107
156
|
export function validateSeeds(seeds) {
|
|
108
157
|
const errs = [];
|
|
@@ -112,17 +161,8 @@ export function validateSeeds(seeds) {
|
|
|
112
161
|
errs.push(`unknown system palette "${name}"`);
|
|
113
162
|
continue;
|
|
114
163
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
// yet is not the thing to tell them. Same shape as the build's checkKey.
|
|
118
|
-
if (!inRange(seed?.h, rule.h))
|
|
119
|
-
errs.push(`seed color.${name}.h ${fmt(seed?.h)} outside [${rule.h[0]}, ${rule.h[1]}]`);
|
|
120
|
-
else if (!isWholeDegree(seed?.h))
|
|
121
|
-
errs.push(`seed color.${name}.h ${fmt(seed?.h)} is not a whole degree`);
|
|
122
|
-
if (!inRange(seed?.c, rule.c))
|
|
123
|
-
errs.push(`seed color.${name}.c ${fmt(seed?.c)} outside [${rule.c[0].toFixed(3)}, ${rule.c[1].toFixed(3)}]`);
|
|
124
|
-
else if (!isTwoDecimals(seed?.c))
|
|
125
|
-
errs.push(`seed color.${name}.c ${fmt(seed?.c)} is finer than two decimals`);
|
|
164
|
+
checkSeedValue(errs, `color.${name}.h`, seed?.h, hueRange(rule.h), HUE_GRAIN);
|
|
165
|
+
checkSeedValue(errs, `color.${name}.c`, seed?.c, chromaRange(rule.c), CHROMA_GRAIN);
|
|
126
166
|
}
|
|
127
167
|
for (const [name, seed] of Object.entries(seeds.custom ?? {})) {
|
|
128
168
|
const range = CUSTOM[name];
|
|
@@ -130,38 +170,84 @@ export function validateSeeds(seeds) {
|
|
|
130
170
|
errs.push(`unknown custom palette "${name}"`);
|
|
131
171
|
continue;
|
|
132
172
|
}
|
|
133
|
-
|
|
134
|
-
errs.push(`seed color.custom.${name}.h ${fmt(seed?.h)} outside [${range[0]}, ${range[1]}]`);
|
|
135
|
-
else if (!isWholeDegree(seed?.h))
|
|
136
|
-
errs.push(`seed color.custom.${name}.h ${fmt(seed?.h)} is not a whole degree`);
|
|
173
|
+
checkSeedValue(errs, `color.custom.${name}.h`, seed?.h, hueRange(range), HUE_GRAIN);
|
|
137
174
|
// The rule section 7 could not put in the build's list, and said so: a custom palette is
|
|
138
175
|
// "the group you customise" along ONE axis. Hue is the person's; saturation and key are ours.
|
|
139
176
|
if (seed?.c !== undefined)
|
|
140
177
|
errs.push(`seed color.custom.${name}.c may not be seeded`);
|
|
178
|
+
// And without it there is nothing to derive from: ours is seed.json's, which a runtime seed is never handed
|
|
179
|
+
// (issue 184). Refused by name until 184 is settled, never derived into a TypeError inside the engine.
|
|
180
|
+
else
|
|
181
|
+
errs.push(`seed color.custom.${name} cannot be previewed: its c is Newtone's (issue 184)`);
|
|
141
182
|
}
|
|
142
183
|
return errs;
|
|
143
184
|
}
|
|
144
|
-
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
186
|
+
// Contrast (Range until 2026-11-15) -- the HuevOS Core, newtone-color rule 4; build.mjs's `CONTRAST`
|
|
187
|
+
// ---------------------------------------------------------------------------
|
|
188
|
+
const CONTRAST_LEVELS = [-2, -1, 0, 1, 2];
|
|
189
|
+
const CONTRAST_KEYS = ['light', 'dark'];
|
|
190
|
+
const darkEnd = (level) => 8 + 4 * level;
|
|
191
|
+
const lightEnd = (level) => 96 + 2 * level;
|
|
192
|
+
// build.mjs's validateContrastSeed, message for message: a level that is not one of the five would derive a ladder no
|
|
193
|
+
// build can emit, so it is refused rather than drawn.
|
|
194
|
+
function contrastErrors(contrast) {
|
|
195
|
+
const errs = [];
|
|
196
|
+
if (contrast == null)
|
|
197
|
+
return errs;
|
|
198
|
+
if (typeof contrast !== 'object' || Array.isArray(contrast))
|
|
199
|
+
return ['seed contrast must be an object: light, dark'];
|
|
200
|
+
const ends = contrast;
|
|
201
|
+
for (const key of Object.keys(ends))
|
|
202
|
+
if (!CONTRAST_KEYS.includes(key))
|
|
203
|
+
errs.push(`unknown contrast key ${JSON.stringify(key)}; it is one of: ${CONTRAST_KEYS.join(', ')}`);
|
|
204
|
+
for (const end of CONTRAST_KEYS)
|
|
205
|
+
if (ends[end] !== undefined && !CONTRAST_LEVELS.includes(ends[end]))
|
|
206
|
+
errs.push(`seed contrast.${end} is ${JSON.stringify(ends[end])}; it is one of: ${CONTRAST_LEVELS.join(', ')}`);
|
|
207
|
+
return errs;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Turn a set of seeds into the custom properties that re-derive those palettes.
|
|
211
|
+
*
|
|
212
|
+
* Derivation is atomic: a palette named here has all fifty-one steps recomputed, and one
|
|
213
|
+
* not named is untouched, so it inherits from the enclosing scope. That inheritance is
|
|
214
|
+
* CSS's, not ours -- which is why nesting works to any depth for free.
|
|
215
|
+
*
|
|
216
|
+
* **Two ladders per palette, as the build emits them** (since 2026-11-14): the absolute one, L* 100 to 0, as
|
|
217
|
+
* `--newtone-color-<group>-<name>-<step>`, which `fixed()` and ink() reads; and the one `contrast` sets, from its
|
|
218
|
+
* light end down to its dark end, as `--newtone-color-contrast-<group>-<name>-<step>`, which every role reads. `contrast` is
|
|
219
|
+
* the seed's Contrast, 0 and 0 where left out (L* 96 to 8). With light +2 and dark -2 the pulled-in ladder IS the absolute
|
|
220
|
+
* one, the build emits no second group and its roles read the absolute ladder, so nothing more is written here
|
|
221
|
+
* either. Until 2026-11-14 a preview wrote the absolute ladder alone, which the roles no longer read since Range (now Contrast)
|
|
222
|
+
* arrived, so a Style Book or Appearance preview moved a button's ink and not the roles around it.
|
|
223
|
+
*/
|
|
224
|
+
export function seedProperties(seeds, wide = prefersOklch(), contrast = {}) {
|
|
145
225
|
// Throwing is heavier than the build's exit code and is the deliberate choice: a seed is
|
|
146
226
|
// authored by a developer and is never user input, and the alternative -- derive anyway and
|
|
147
227
|
// warn -- is a screen that is subtly wrong beside a console nobody has open. See the repo
|
|
148
228
|
// blueprint, section 7.
|
|
149
|
-
const errs = validateSeeds(seeds);
|
|
229
|
+
const errs = [...validateSeeds(seeds), ...contrastErrors(contrast)];
|
|
150
230
|
if (errs.length)
|
|
151
231
|
throw new Error(`invalid seed:\n${errs.join('\n')}`);
|
|
232
|
+
// Contrast's two ends, as the build sets them, and the build's own test for whether there is a second ladder.
|
|
233
|
+
const floor = darkEnd(contrast?.dark ?? 0);
|
|
234
|
+
const ceiling = lightEnd(contrast?.light ?? 0);
|
|
235
|
+
const pulledIn = floor > 0 || ceiling < 100;
|
|
236
|
+
const paint = ({ oklch, srgb }) => wide ? `oklch(${cssNumber(oklch.l * 100)}% ${cssNumber(oklch.c)} ${cssNumber(oklch.h)})` : srgb;
|
|
152
237
|
const props = {};
|
|
153
238
|
for (const group of ['system', 'custom']) {
|
|
154
239
|
const palettes = seeds[group];
|
|
155
240
|
if (!palettes)
|
|
156
241
|
continue;
|
|
157
242
|
for (const [name, seed] of Object.entries(palettes)) {
|
|
158
|
-
const
|
|
159
|
-
for (let step = 0; step < STEPS; step++)
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
243
|
+
const absolute = deriveScale(seed.h, seed.c);
|
|
244
|
+
for (let step = 0; step < STEPS; step++)
|
|
245
|
+
props[`--newtone-color-${group}-${name}-${step}`] = paint(absolute[step]);
|
|
246
|
+
if (!pulledIn)
|
|
247
|
+
continue;
|
|
248
|
+
const within = deriveScale(seed.h, seed.c, floor, ceiling);
|
|
249
|
+
for (let step = 0; step < STEPS; step++)
|
|
250
|
+
props[`--newtone-color-contrast-${group}-${name}-${step}`] = paint(within[step]);
|
|
165
251
|
}
|
|
166
252
|
}
|
|
167
253
|
return props;
|
package/dist/color/seeds.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seeds.js","sourceRoot":"","sources":["../../src/color/seeds.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,6EAA6E;AAC7E,sEAAsE;AACtE,EAAE;AACF,sEAAsE;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"seeds.js","sourceRoot":"","sources":["../../src/color/seeds.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,6EAA6E;AAC7E,sEAAsE;AACtE,EAAE;AACF,iHAAiH;AACjH,kHAAkH;AAClH,mHAAmH;AACnH,8FAA8F;AAC9F,EAAE;AACF,sEAAsE;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAmD/C;;;;;;;GAOG;AACH,SAAS,YAAY;IACjB,OAAO,OAAO,GAAG,KAAK,WAAW,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,KAAK,IAAI,CAAA;AAC1F,CAAC;AAED,8EAA8E;AAC9E,oDAAoD;AACpD,8EAA8E;AAE9E,4FAA4F;AAC5F,4FAA4F;AAC5F,2FAA2F;AAC3F,aAAa;AACb,EAAE;AACF,4FAA4F;AAC5F,8FAA8F;AAC9F,+FAA+F;AAC/F,iGAAiG;AACjG,oGAAoG;AACpG,gGAAgG;AAChG,gGAAgG;AAChG,gCAAgC;AAChC,EAAE;AACF,8FAA8F;AAC9F,mGAAmG;AACnG,mGAAmG;AACnG,sEAAsE;AACtE,+FAA+F;AAC/F,gGAAgG;AAChG,iCAAiC;AACjC,EAAE;AACF,kGAAkG;AAClG,oGAAoG;AACpG,mGAAmG;AACnG,8EAA8E;AAC9E,6EAA6E;AAC7E,2EAA2E;AAC3E,EAAE;AACF,oGAAoG;AACpG,qGAAqG;AACrG,oEAAoE;AACpE,MAAM,KAAK,GAAG,GAAG,CAAA;AACjB,MAAM,MAA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AK,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAU,EAAE,CAAC;QAChD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;QAC7B,IAAI,CAAC,QAAQ;YAAE,SAAQ;QACvB,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClD,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;YAC5C,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,EAAE,IAAI,EAAE;gBACnC,KAAK,CAAC,mBAAmB,KAAK,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAA;YAC7E,IAAI,CAAC,QAAQ;gBAAE,SAAQ;YACvB,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;YAC1D,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,EAAE,IAAI,EAAE;gBACnC,KAAK,CAAC,4BAA4B,KAAK,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;QACxF,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAA;AAChB,CAAC"}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/* CurveField -- blueprint components/curve-field.md. One value across a palette's ladder: a plot of the steps with the
|
|
2
|
+
* value drawn across them, its Start and End points dragged up and down, two handles on the caps while it is a Curve,
|
|
3
|
+
* and under it its two numbers (NumberField: import number-field.css) and its Linear | Curve choice; the press back is
|
|
4
|
+
* Button's (import button.css). Drawn as Canvas draws (canvas.css): a point 8px and a handle 6px on surface.primary in
|
|
5
|
+
* a text.accent edge, filled while held, a 2px text.accent line, 1px stems. A handle is drawn over a point, so one on its point still shows, and the knob held over every other; the
|
|
6
|
+
* plot isolates that stacking, so no knob rises over the page round it. Roles only, and the choice on
|
|
7
|
+
* SegmentedControl's tokens, as the seed rows' track.
|
|
8
|
+
*
|
|
9
|
+
* LENGTHS IT DECIDES:
|
|
10
|
+
* 8px the plot's corners (radius.md), on surface.secondary to its edge
|
|
11
|
+
* 156px the plot: the frame 12px in from its sides and top (half a knob's reach, so a knob at an end or a bound keeps
|
|
12
|
+
* all of it) and 24px from its foot, where the step numbers stand. curve-field.tsx draws to the same numbers.
|
|
13
|
+
* 24px each knob's reach, on every device (a finger's, as Canvas.Point's); its mark 8px (a point) or 6px (a handle)
|
|
14
|
+
* 2px the value's line, as Canvas.Trace's chosen; the focus ring, 4px inside the reach
|
|
15
|
+
* 1px the frame, the stems and the guides; a measured dot is 3px, drawn in curve-field.tsx
|
|
16
|
+
* 5px over a ground, the line's halo in surface.primary; 1.5px the knobs' ring in it
|
|
17
|
+
* 4 3, 1 3, 8 3 1 3 the three guides' dashes, so two ceilings are told apart
|
|
18
|
+
* 36px the Linear | Curve track, the smallest rung, as the numbers beside it; 9rem the least it keeps
|
|
19
|
+
* 0.35 a disabled track's opacity, as the seed rows'
|
|
20
|
+
* Following its style is said in ink: the line, the stems, the points' edges, the numbers and the chosen Linear or Curve
|
|
21
|
+
* in text.secondary.
|
|
22
|
+
* Disabled is aria-disabled, never the native state, which blurs a focused control. */
|
|
23
|
+
.newtone-curve-field {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
gap: var(--newtone-space-2);
|
|
27
|
+
min-inline-size: 0;
|
|
28
|
+
color: var(--newtone-role-text-primary);
|
|
29
|
+
}
|
|
30
|
+
.newtone-curve-field-head {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
align-items: baseline;
|
|
34
|
+
column-gap: var(--newtone-space-2);
|
|
35
|
+
min-inline-size: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* The plot: the steps run left to right in any writing direction. */
|
|
39
|
+
.newtone-curve-field-plot {
|
|
40
|
+
position: relative;
|
|
41
|
+
block-size: 156px;
|
|
42
|
+
/* Framed (2026-11-14, Joshua): the whole plot, insets and step numbers too, on surface.secondary, so its edge lines
|
|
43
|
+
up with the segments, fields and strips that reach a panel's padding. */
|
|
44
|
+
border-radius: var(--newtone-radius-md);
|
|
45
|
+
background: var(--newtone-role-surface-secondary);
|
|
46
|
+
min-inline-size: 0;
|
|
47
|
+
direction: ltr;
|
|
48
|
+
isolation: isolate;
|
|
49
|
+
user-select: none;
|
|
50
|
+
-webkit-user-select: none;
|
|
51
|
+
}
|
|
52
|
+
.newtone-curve-field-frame {
|
|
53
|
+
position: absolute;
|
|
54
|
+
inset: 12px 12px 24px;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
border: 1px solid var(--newtone-role-divider-secondary);
|
|
57
|
+
border-radius: var(--newtone-radius-sm);
|
|
58
|
+
background: var(--newtone-role-surface-primary);
|
|
59
|
+
}
|
|
60
|
+
/* The ground (2026-11-14): what each value looks like, under the line, inside the frame's edge. */
|
|
61
|
+
.newtone-curve-field:where([data-ground]) .newtone-curve-field-frame {
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
.newtone-curve-field-ground {
|
|
65
|
+
position: absolute;
|
|
66
|
+
inset-block: 0;
|
|
67
|
+
}
|
|
68
|
+
.newtone-curve-field-halo {
|
|
69
|
+
fill: none;
|
|
70
|
+
stroke: var(--newtone-role-surface-primary);
|
|
71
|
+
stroke-width: 5;
|
|
72
|
+
stroke-linecap: round;
|
|
73
|
+
stroke-linejoin: round;
|
|
74
|
+
}
|
|
75
|
+
.newtone-curve-field:where([data-ground]) .newtone-curve-field-knob::before {
|
|
76
|
+
box-shadow: 0 0 0 1.5px var(--newtone-role-surface-primary);
|
|
77
|
+
}
|
|
78
|
+
.newtone-curve-field-drawing {
|
|
79
|
+
position: absolute;
|
|
80
|
+
inset: 0;
|
|
81
|
+
inline-size: 100%;
|
|
82
|
+
block-size: 100%;
|
|
83
|
+
overflow: visible;
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
}
|
|
86
|
+
.newtone-curve-field-guide {
|
|
87
|
+
fill: none;
|
|
88
|
+
stroke: var(--newtone-role-text-secondary);
|
|
89
|
+
stroke-width: 1;
|
|
90
|
+
stroke-dasharray: 4 3;
|
|
91
|
+
}
|
|
92
|
+
.newtone-curve-field-guide:where([data-guide='1']) {
|
|
93
|
+
stroke-dasharray: 1 3;
|
|
94
|
+
}
|
|
95
|
+
.newtone-curve-field-guide:where([data-guide='2']) {
|
|
96
|
+
stroke-dasharray: 8 3 1 3;
|
|
97
|
+
}
|
|
98
|
+
.newtone-curve-field-line {
|
|
99
|
+
fill: none;
|
|
100
|
+
stroke: var(--newtone-role-text-accent);
|
|
101
|
+
stroke-width: 2;
|
|
102
|
+
stroke-linecap: round;
|
|
103
|
+
stroke-linejoin: round;
|
|
104
|
+
}
|
|
105
|
+
.newtone-curve-field-hit {
|
|
106
|
+
fill: none;
|
|
107
|
+
stroke: transparent;
|
|
108
|
+
stroke-width: 16;
|
|
109
|
+
stroke-linecap: round;
|
|
110
|
+
pointer-events: stroke;
|
|
111
|
+
cursor: ns-resize;
|
|
112
|
+
touch-action: none;
|
|
113
|
+
}
|
|
114
|
+
.newtone-curve-field:where([data-disabled]) .newtone-curve-field-hit {
|
|
115
|
+
cursor: default;
|
|
116
|
+
}
|
|
117
|
+
.newtone-curve-field-dot {
|
|
118
|
+
fill: var(--newtone-role-text-primary);
|
|
119
|
+
}
|
|
120
|
+
.newtone-curve-field-arms {
|
|
121
|
+
stroke: var(--newtone-role-text-accent);
|
|
122
|
+
stroke-width: 1;
|
|
123
|
+
}
|
|
124
|
+
.newtone-curve-field-steps {
|
|
125
|
+
position: absolute;
|
|
126
|
+
inset: 0;
|
|
127
|
+
pointer-events: none;
|
|
128
|
+
}
|
|
129
|
+
.newtone-curve-field-step {
|
|
130
|
+
position: absolute;
|
|
131
|
+
transform: translateX(-50%);
|
|
132
|
+
white-space: nowrap;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* A point or a handle: its whole reach takes a press, its mark drawn in the middle. */
|
|
136
|
+
.newtone-curve-field-knob {
|
|
137
|
+
position: absolute;
|
|
138
|
+
box-sizing: border-box;
|
|
139
|
+
display: grid;
|
|
140
|
+
place-items: center;
|
|
141
|
+
inline-size: 24px;
|
|
142
|
+
block-size: 24px;
|
|
143
|
+
margin: -12px 0 0 -12px;
|
|
144
|
+
border-radius: 50%;
|
|
145
|
+
touch-action: none;
|
|
146
|
+
cursor: ns-resize;
|
|
147
|
+
outline: none;
|
|
148
|
+
}
|
|
149
|
+
.newtone-curve-field-knob:where([data-knob='handle']) {
|
|
150
|
+
z-index: 1;
|
|
151
|
+
cursor: ew-resize;
|
|
152
|
+
}
|
|
153
|
+
.newtone-curve-field-knob:where([data-held]) {
|
|
154
|
+
z-index: 2;
|
|
155
|
+
}
|
|
156
|
+
.newtone-curve-field-knob:where([aria-disabled='true']) {
|
|
157
|
+
cursor: default;
|
|
158
|
+
}
|
|
159
|
+
.newtone-curve-field-knob::before {
|
|
160
|
+
content: '';
|
|
161
|
+
box-sizing: border-box;
|
|
162
|
+
inline-size: 8px;
|
|
163
|
+
block-size: 8px;
|
|
164
|
+
border: 1px solid var(--newtone-role-text-accent);
|
|
165
|
+
border-radius: 50%;
|
|
166
|
+
background: var(--newtone-role-surface-primary);
|
|
167
|
+
}
|
|
168
|
+
.newtone-curve-field-knob:where([data-knob='handle'])::before {
|
|
169
|
+
inline-size: 6px;
|
|
170
|
+
block-size: 6px;
|
|
171
|
+
}
|
|
172
|
+
.newtone-curve-field-knob:where([data-held])::before {
|
|
173
|
+
background: var(--newtone-role-text-accent);
|
|
174
|
+
}
|
|
175
|
+
.newtone-curve-field-knob:focus-visible {
|
|
176
|
+
outline: 2px solid var(--newtone-role-text-accent);
|
|
177
|
+
outline-offset: -4px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Following its style: the value in the secondary ink (ink, not opacity, so it keeps its contrast), the words said
|
|
181
|
+
* beside the name. A change departs. */
|
|
182
|
+
.newtone-curve-field:where([data-same]) .newtone-curve-field-line,
|
|
183
|
+
.newtone-curve-field:where([data-same]) .newtone-curve-field-arms {
|
|
184
|
+
stroke: var(--newtone-role-text-secondary);
|
|
185
|
+
}
|
|
186
|
+
.newtone-curve-field:where([data-same]) .newtone-curve-field-knob::before {
|
|
187
|
+
border-color: var(--newtone-role-text-secondary);
|
|
188
|
+
}
|
|
189
|
+
.newtone-curve-field[data-same] .newtone-curve-field-number:not([data-disabled]) {
|
|
190
|
+
color: var(--newtone-role-text-secondary);
|
|
191
|
+
}
|
|
192
|
+
/* Disabled: the value in the disabled ink; the numbers dim as NumberField's own. */
|
|
193
|
+
.newtone-curve-field:where([data-disabled]) .newtone-curve-field-line,
|
|
194
|
+
.newtone-curve-field:where([data-disabled]) .newtone-curve-field-arms {
|
|
195
|
+
stroke: var(--newtone-role-text-disabled);
|
|
196
|
+
}
|
|
197
|
+
.newtone-curve-field:where([data-disabled]) .newtone-curve-field-knob::before {
|
|
198
|
+
border-color: var(--newtone-role-text-disabled);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* The guides' names, each beside its line. */
|
|
202
|
+
.newtone-curve-field-guides {
|
|
203
|
+
display: flex;
|
|
204
|
+
flex-wrap: wrap;
|
|
205
|
+
gap: var(--newtone-space-1) var(--newtone-space-3);
|
|
206
|
+
margin: 0;
|
|
207
|
+
padding: 0;
|
|
208
|
+
list-style: none;
|
|
209
|
+
}
|
|
210
|
+
.newtone-curve-field-guide-name {
|
|
211
|
+
display: inline-flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
gap: var(--newtone-space-1);
|
|
214
|
+
min-inline-size: 0;
|
|
215
|
+
}
|
|
216
|
+
.newtone-curve-field-sample {
|
|
217
|
+
flex: none;
|
|
218
|
+
overflow: visible;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* Under the plot: the two numbers, the choice and the press back, wrapping where the row is narrow. */
|
|
222
|
+
.newtone-curve-field-row {
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-wrap: wrap;
|
|
225
|
+
align-items: center;
|
|
226
|
+
gap: var(--newtone-space-2);
|
|
227
|
+
min-inline-size: 0;
|
|
228
|
+
}
|
|
229
|
+
.newtone-curve-field-number {
|
|
230
|
+
flex: 1 1 0;
|
|
231
|
+
min-inline-size: 5rem;
|
|
232
|
+
}
|
|
233
|
+
/* Linear | Curve: the seed rows' track (seed-steps.css), by SegmentedControl's own tokens. */
|
|
234
|
+
.newtone-curve-field-forms {
|
|
235
|
+
display: flex;
|
|
236
|
+
flex: 1 1 9rem;
|
|
237
|
+
align-items: stretch;
|
|
238
|
+
gap: var(--newtone-segmented-control-gap);
|
|
239
|
+
padding: var(--newtone-segmented-control-padding);
|
|
240
|
+
box-sizing: border-box;
|
|
241
|
+
block-size: 36px;
|
|
242
|
+
min-inline-size: 0;
|
|
243
|
+
border-radius: calc(
|
|
244
|
+
var(--newtone-segmented-control-radius) + var(--newtone-segmented-control-padding)
|
|
245
|
+
);
|
|
246
|
+
background: var(--newtone-segmented-control-track-fill);
|
|
247
|
+
}
|
|
248
|
+
.newtone-curve-field-forms:where([aria-disabled='true']) {
|
|
249
|
+
opacity: 0.35;
|
|
250
|
+
}
|
|
251
|
+
.newtone-curve-field-form {
|
|
252
|
+
all: unset;
|
|
253
|
+
box-sizing: border-box;
|
|
254
|
+
display: grid;
|
|
255
|
+
flex: 1 1 0;
|
|
256
|
+
place-items: center;
|
|
257
|
+
min-inline-size: 0;
|
|
258
|
+
padding-inline: var(--newtone-space-2);
|
|
259
|
+
border-radius: var(--newtone-segmented-control-segment-radius);
|
|
260
|
+
color: var(--newtone-segmented-control-segment-rest-text);
|
|
261
|
+
cursor: pointer;
|
|
262
|
+
}
|
|
263
|
+
.newtone-curve-field-form:where(:hover:not([aria-disabled='true'])) {
|
|
264
|
+
color: var(--newtone-segmented-control-segment-hover-text);
|
|
265
|
+
}
|
|
266
|
+
.newtone-curve-field-form:where([aria-checked='true']) {
|
|
267
|
+
background: var(--newtone-segmented-control-segment-chosen-fill);
|
|
268
|
+
color: var(--newtone-segmented-control-segment-chosen-text);
|
|
269
|
+
}
|
|
270
|
+
.newtone-curve-field-form:focus-visible {
|
|
271
|
+
outline: 2px solid var(--newtone-role-text-accent);
|
|
272
|
+
outline-offset: 0;
|
|
273
|
+
}
|
|
274
|
+
.newtone-curve-field-form:where([aria-disabled='true']) {
|
|
275
|
+
cursor: default;
|
|
276
|
+
}
|
|
277
|
+
/* Following its style: the chosen Linear or Curve in the secondary ink, as the seed rows' chosen step. */
|
|
278
|
+
.newtone-curve-field[data-same] .newtone-curve-field-form[aria-checked='true'] {
|
|
279
|
+
color: var(--newtone-role-text-secondary);
|
|
280
|
+
}
|