@takazudo/zdtp 0.4.11 → 0.4.13
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/CHANGELOG.md +103 -26
- package/PORTABLE-CONTRACT.md +90 -19
- package/README.md +3 -3
- package/dist/astro/host-adapter.js +3 -3
- package/dist/astro/index.js +1 -1
- package/dist/{autoload-state-CTDDBxI8.js → autoload-state-CfL2VUe1.js} +1 -1
- package/dist/components/palette-chart/palette-chart.d.ts +14 -3
- package/dist/{index-C8GR1TU-.js → index-BAY1JOUl.js} +2 -2
- package/dist/index-U7Ol7tgA.js +7591 -0
- package/dist/index.js +6 -6
- package/dist/{panel-config-7Xg59uKj.js → panel-config-COHesW2B.js} +4 -0
- package/dist/tabs/palette/palette-check-view.d.ts +0 -13
- package/dist/testing.js +2 -2
- package/dist/tokens/tier-model.d.ts +7 -5
- package/dist/{tweak-state-DRKV1uYj.js → tweak-state-BKNxtHzb.js} +259 -237
- package/dist/utils/color-oklch.d.ts +13 -0
- package/dist/zdtp.css +1 -1
- package/package.json +1 -1
- package/dist/index-BeYH-tJD.js +0 -7582
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "preact/jsx-runtime";
|
|
2
2
|
import "preact";
|
|
3
|
-
import { S as t, c as i, d as n, _ as l, e as d, f as _, g as p, h as g, i as m, j as P, k as u, l as A, m as C, n as S, o as T, q as c, r as f, s as K, t as M, v, w as E, x as F, y as h, z as w } from "./index-
|
|
4
|
-
import { Z as y,
|
|
5
|
-
import { c as
|
|
6
|
-
import "./autoload-state-
|
|
3
|
+
import { S as t, c as i, d as n, _ as l, e as d, f as _, g as p, h as g, i as m, j as P, k as u, l as A, m as C, n as S, o as T, q as c, r as f, s as K, t as M, v, w as E, x as F, y as h, z as w } from "./index-U7Ol7tgA.js";
|
|
4
|
+
import { Z as y, V as D, v as k, u as H, Y as L } from "./tweak-state-BKNxtHzb.js";
|
|
5
|
+
import { c as Y, s as b } from "./panel-config-COHesW2B.js";
|
|
6
|
+
import "./autoload-state-CfL2VUe1.js";
|
|
7
7
|
export {
|
|
8
8
|
t as SCHEMA_V1,
|
|
9
9
|
i as SCHEMA_V2,
|
|
@@ -14,7 +14,7 @@ export {
|
|
|
14
14
|
_ as __reapplyFromStorageForTests,
|
|
15
15
|
p as __resetInstanceBindingsForTests,
|
|
16
16
|
g as __resetSpawnSlotsForTests,
|
|
17
|
-
|
|
17
|
+
Y as configurePanel,
|
|
18
18
|
m as disableAutoload,
|
|
19
19
|
D as emptyOverrides,
|
|
20
20
|
P as enableAutoload,
|
|
@@ -32,7 +32,7 @@ export {
|
|
|
32
32
|
H as resolvePerModeLiteral,
|
|
33
33
|
L as resolveSemanticPreviewColor,
|
|
34
34
|
E as setLifecycleAdapter,
|
|
35
|
-
|
|
35
|
+
b as setPanelColorPresets,
|
|
36
36
|
F as shouldAutoload,
|
|
37
37
|
h as showDesignTokenPanel,
|
|
38
38
|
w as toggleDesignPanel
|
|
@@ -737,6 +737,10 @@ function W(e, t, n) {
|
|
|
737
737
|
throw new Error(
|
|
738
738
|
`[design-token-panel] PanelConfig.tabs["${e}"].tiers["${l}"].referencesRamps must be an array`
|
|
739
739
|
);
|
|
740
|
+
if (e !== "color" && e !== "color-secondary")
|
|
741
|
+
throw new Error(
|
|
742
|
+
`[design-token-panel] PanelConfig.tabs["${e}"].tiers["${l}"].referencesRamps is only supported on tabs with id "color" or "color-secondary" (got "${e}")`
|
|
743
|
+
);
|
|
740
744
|
const f = g.get(l), r = a.referencesRamps;
|
|
741
745
|
for (let o = 0; o < r.length; o++) {
|
|
742
746
|
const d = r[o];
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PaletteCheckView — Check mode Left/Right contrast checker (#394).
|
|
3
|
-
*
|
|
4
|
-
* Left column: full palette as selectable base rows (div[role="button"]).
|
|
5
|
-
* Right column: every palette color annotated against the selected base:
|
|
6
|
-
* - Live "Aa" sample (candidate foreground on base background)
|
|
7
|
-
* - WCAG ratio (contrastRatio)
|
|
8
|
-
* - Fail/AA/AAA chip using fixed semantic colors (not theme tokens)
|
|
9
|
-
*
|
|
10
|
-
* WCAG contrast is symmetric; ratio is computed once per candidate pair.
|
|
11
|
-
*
|
|
12
|
-
* Toggles: grouped↔flat listing; normal/large text thresholds.
|
|
13
|
-
*/
|
|
14
1
|
import type { TabConfig } from '../../tokens/tier-model';
|
|
15
2
|
import type { TabOverrides } from '../../apply/tier-resolver';
|
|
16
3
|
export interface PaletteCheckViewProps {
|
package/dist/testing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as r, c as _, d as i, e as n, f as g, h as R, a as p } from "./panel-config-
|
|
2
|
-
import { a as l, b as y, l as O } from "./tweak-state-
|
|
1
|
+
import { _ as r, c as _, d as i, e as n, f as g, h as R, a as p } from "./panel-config-COHesW2B.js";
|
|
2
|
+
import { a as l, b as y, l as O } from "./tweak-state-BKNxtHzb.js";
|
|
3
3
|
import { F as K, G as E, a as S, S as u } from "./manifest-DCReQE0k.js";
|
|
4
4
|
async function s(e, a) {
|
|
5
5
|
await e.fill(a), await e.dispatchEvent("input");
|
|
@@ -119,11 +119,13 @@ export interface TierConfig {
|
|
|
119
119
|
*/
|
|
120
120
|
semantic?: true;
|
|
121
121
|
/**
|
|
122
|
-
* Cross-tab ramp-source declaration for a semantic tier
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* `
|
|
126
|
-
* tab
|
|
122
|
+
* Cross-tab ramp-source declaration for a semantic tier owned by a tab whose
|
|
123
|
+
* id is exactly `color` or `color-secondary`; `assertValidPanelConfig`
|
|
124
|
+
* rejects every other owning tab id. The ramp tier(s) are the sources this
|
|
125
|
+
* tier's `{ ref }` mappings may point into. Each entry names a tier id and an
|
|
126
|
+
* optional tab id (omitted `tab` means "this tab"). The validator also checks
|
|
127
|
+
* every declared source up front (the tab/tier must exist and share this
|
|
128
|
+
* tier's kind); `resolveColorClusterFromTab`
|
|
127
129
|
* (`config/cluster-config.ts`) uses the allow-list to derive each row's
|
|
128
130
|
* `SemanticValue`; the grouped `TierRefSelector` picker
|
|
129
131
|
* (`controls/tier-ref-selector.tsx`) renders one `<optgroup>` per declared
|