@takazudo/zdtp 0.4.0 → 0.4.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/CHANGELOG.md +37 -0
- package/README.md +58 -10
- package/dist/apply/build-apply-overrides.d.ts +4 -2
- package/dist/apply/build-apply-overrides.d.ts.map +1 -1
- package/dist/astro/host-adapter.js +67 -44
- package/dist/astro/index.js +1 -1
- package/dist/autoload-state-DsvvPDih.js +46 -0
- package/dist/components/palette-chart/palette-chart.d.ts +0 -1
- package/dist/components/palette-chart/palette-chart.d.ts.map +1 -1
- package/dist/config/panel-config.d.ts +8 -0
- package/dist/config/panel-config.d.ts.map +1 -1
- package/dist/element-path/element-path-state.d.ts +3 -2
- package/dist/element-path/element-path-state.d.ts.map +1 -1
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2596 -3626
- package/dist/{panel-config-066BPYJD.js → panel-config-DyVRQ2n1.js} +37 -33
- package/dist/panel.d.ts.map +1 -1
- package/dist/state/autoload-state.d.ts +92 -0
- package/dist/state/autoload-state.d.ts.map +1 -0
- package/dist/state/tweak-state.d.ts +18 -1
- package/dist/state/tweak-state.d.ts.map +1 -1
- package/dist/tabs/color-tab.d.ts +7 -4
- package/dist/tabs/color-tab.d.ts.map +1 -1
- package/dist/tabs/generic-tab.d.ts +1 -1
- package/dist/tabs/palette/palette-edit-view.d.ts +0 -1
- package/dist/tabs/palette/palette-edit-view.d.ts.map +1 -1
- package/dist/testing.js +2 -2
- package/dist/tweak-state-DzZVbY25.js +1779 -0
- package/dist/utils/design-token-serde.d.ts +2 -1
- package/dist/utils/design-token-serde.d.ts.map +1 -1
- package/dist/zdtp.css +1 -1
- package/package.json +1 -1
- package/dist/tweak-state-Do5gj6Nw.js +0 -730
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function v(e, n) {
|
|
2
2
|
return e.paletteCssVarTemplate.replace("{n}", String(n));
|
|
3
3
|
}
|
|
4
4
|
function m(e) {
|
|
@@ -180,13 +180,13 @@ function H() {
|
|
|
180
180
|
function V(e = P()) {
|
|
181
181
|
return C(e.tabs);
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function K(e) {
|
|
184
184
|
return `${e.storagePrefix}-state-v2`;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function O(e) {
|
|
187
187
|
return `${e.storagePrefix}-state-v3`;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function z(e) {
|
|
190
190
|
return `${e.storagePrefix}-state`;
|
|
191
191
|
}
|
|
192
192
|
function N(e) {
|
|
@@ -205,23 +205,26 @@ function M(e) {
|
|
|
205
205
|
return `${e.storagePrefix}:visible`;
|
|
206
206
|
}
|
|
207
207
|
function L(e) {
|
|
208
|
+
return `${e.storagePrefix}:autoload`;
|
|
209
|
+
}
|
|
210
|
+
function B(e) {
|
|
208
211
|
return `${e.storagePrefix}-root`;
|
|
209
212
|
}
|
|
210
213
|
const k = h.storagePrefix, $ = "toggle-design-token-panel";
|
|
211
|
-
function
|
|
214
|
+
function G(e) {
|
|
212
215
|
return e.storagePrefix === k ? $ : e.toggleEvent ?? `toggle-${e.storagePrefix}`;
|
|
213
216
|
}
|
|
214
217
|
const E = "__zdtp:open-state-changed";
|
|
215
|
-
function
|
|
218
|
+
function U(e) {
|
|
216
219
|
return `${E}:${e.storagePrefix}`;
|
|
217
220
|
}
|
|
218
|
-
function
|
|
221
|
+
function q(e, n) {
|
|
219
222
|
return `${e.modalClassPrefix}${n}`;
|
|
220
223
|
}
|
|
221
|
-
function
|
|
224
|
+
function J(e) {
|
|
222
225
|
return `${e.exportFilenameBase}.json`;
|
|
223
226
|
}
|
|
224
|
-
function
|
|
227
|
+
function Y(e) {
|
|
225
228
|
if (e === null || typeof e != "object" || Array.isArray(e))
|
|
226
229
|
throw new Error("[design-token-panel] PanelConfig must be a non-null object");
|
|
227
230
|
const n = e;
|
|
@@ -277,10 +280,10 @@ function x(e) {
|
|
|
277
280
|
throw new Error(
|
|
278
281
|
`[design-token-panel] PanelConfig.tabs: duplicate tab id "${r.id}"`
|
|
279
282
|
);
|
|
280
|
-
n.add(r.id),
|
|
283
|
+
n.add(r.id), A(r.id, r);
|
|
281
284
|
}
|
|
282
285
|
}
|
|
283
|
-
function
|
|
286
|
+
function A(e, n) {
|
|
284
287
|
if (!Array.isArray(n.tiers))
|
|
285
288
|
throw new Error(
|
|
286
289
|
`[design-token-panel] PanelConfig.tabs["${e}"].tiers must be an array`
|
|
@@ -368,10 +371,10 @@ function v(e, n) {
|
|
|
368
371
|
}
|
|
369
372
|
}
|
|
370
373
|
}
|
|
371
|
-
function
|
|
374
|
+
function W(e = P()) {
|
|
372
375
|
return e.applyRouting ?? {};
|
|
373
376
|
}
|
|
374
|
-
function
|
|
377
|
+
function X(e) {
|
|
375
378
|
const n = p();
|
|
376
379
|
if (n === null) {
|
|
377
380
|
c().pendingColorPresets = e;
|
|
@@ -380,32 +383,33 @@ function W(e) {
|
|
|
380
383
|
n.config = { ...n.config, colorPresets: e };
|
|
381
384
|
}
|
|
382
385
|
export {
|
|
386
|
+
D as A,
|
|
383
387
|
$ as D,
|
|
384
388
|
H as _,
|
|
385
389
|
M as a,
|
|
386
|
-
|
|
390
|
+
K as b,
|
|
387
391
|
R as c,
|
|
388
|
-
|
|
389
|
-
|
|
392
|
+
O as d,
|
|
393
|
+
Y as e,
|
|
390
394
|
N as f,
|
|
391
395
|
P as g,
|
|
392
396
|
I as h,
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
397
|
+
z as i,
|
|
398
|
+
L as j,
|
|
399
|
+
J as k,
|
|
400
|
+
d as l,
|
|
401
|
+
q as m,
|
|
402
|
+
V as n,
|
|
403
|
+
W as o,
|
|
404
|
+
m as p,
|
|
405
|
+
U as q,
|
|
406
|
+
v as r,
|
|
407
|
+
X as s,
|
|
408
|
+
S as t,
|
|
409
|
+
_ as u,
|
|
410
|
+
G as v,
|
|
411
|
+
j as w,
|
|
408
412
|
B as x,
|
|
409
|
-
|
|
410
|
-
|
|
413
|
+
T as y,
|
|
414
|
+
F as z
|
|
411
415
|
};
|
package/dist/panel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../src/panel.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../src/panel.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAsF/B;;;;;;;;;;;GAWG;AACH,UAAU,0BAA0B;IAClC,cAAc,CAAC,EAAE,WAAW,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,cAAc,EAAE,kBAAkB,GACnC,GAAE,0BAA+B,gCA4tBjC;AAED,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owner-autoload — persisted feature state and feature contract.
|
|
3
|
+
*
|
|
4
|
+
* ## Flag semantics
|
|
5
|
+
*
|
|
6
|
+
* `${storagePrefix}:autoload` (written as `'1'` when armed, `'0'` or absent
|
|
7
|
+
* when not) is the owner-mode flag. It means:
|
|
8
|
+
* "This browser visited the site as the site owner — autoload the
|
|
9
|
+
* design-token panel on every subsequent page visit."
|
|
10
|
+
*
|
|
11
|
+
* ## General-visitor vs owner behavior
|
|
12
|
+
*
|
|
13
|
+
* - **General visitor** (flag absent or `!== '1'`): the panel bundle is NOT
|
|
14
|
+
* eagerly fetched. Gate #1 (`shouldAutoload`) returns false, so no bundle
|
|
15
|
+
* request fires on page load. The panel remains entirely invisible.
|
|
16
|
+
* - **Owner** (flag === `'1'`): Gate #1 fires, the host-adapter fetches the
|
|
17
|
+
* bundle eagerly, and Gate #2 (`reapplyFromStorage` in `index.tsx`) mounts
|
|
18
|
+
* the Preact shell CLOSED so the element-path inspector is available even
|
|
19
|
+
* while the panel UI is hidden.
|
|
20
|
+
*
|
|
21
|
+
* ## enableAutoload() / disableAutoload() contract (implemented by S2 #419)
|
|
22
|
+
*
|
|
23
|
+
* `enableAutoload()` (console API, wired by S2):
|
|
24
|
+
* 1. Sets `:autoload = '1'`.
|
|
25
|
+
* 2. Sets `-elpath-enabled = '1'` once (arms the alt+click inspector).
|
|
26
|
+
* 3. Loads the panel bundle (if not already loaded).
|
|
27
|
+
* 4. Mounts the Preact shell CLOSED via `hideInstance`.
|
|
28
|
+
*
|
|
29
|
+
* `disableAutoload()` (console API, wired by S2):
|
|
30
|
+
* 1. Clears `:autoload`.
|
|
31
|
+
* 2. Clears `:visible`.
|
|
32
|
+
* 3. Clears `-elpath-enabled`.
|
|
33
|
+
* 4. Clears the open-state key (`getOpenKey(cfg)` from `state/tweak-state`).
|
|
34
|
+
* 5. Unmounts the Preact shell.
|
|
35
|
+
*
|
|
36
|
+
* ## Auto-remember
|
|
37
|
+
*
|
|
38
|
+
* Any action that shows the panel (console `showDesignPanel()`, the header-
|
|
39
|
+
* button open event, or the `showInstance` path in `index.tsx`) MUST also
|
|
40
|
+
* write `:autoload = '1'`. Once an owner opens the panel the flag is set so
|
|
41
|
+
* subsequent page loads reload it automatically. (Wired by S2 / S3.)
|
|
42
|
+
*
|
|
43
|
+
* ## Element-path coupling
|
|
44
|
+
*
|
|
45
|
+
* `enableAutoload()` arms the element-path inspector by writing
|
|
46
|
+
* `-elpath-enabled = '1'` once. The user can still turn it off later via the
|
|
47
|
+
* in-panel toggle. The inspector overlay requires the Preact shell to be
|
|
48
|
+
* mounted (it runs inside `ElementPathOrchestrator`), so the CLOSED mount
|
|
49
|
+
* keeps the overlay functional even when the panel UI itself is hidden.
|
|
50
|
+
*
|
|
51
|
+
* ## The two gates that must consider autoload
|
|
52
|
+
*
|
|
53
|
+
* Gate #1 — host-adapter eager-load gate: the host adapter (e.g.
|
|
54
|
+
* `astro/host-adapter.ts`) decides whether to FETCH the panel bundle on page
|
|
55
|
+
* load. It MUST call `shouldAutoload(cfg)` and skip the fetch when the result
|
|
56
|
+
* is false. This keeps general-visitor page loads entirely free of the bundle
|
|
57
|
+
* request.
|
|
58
|
+
*
|
|
59
|
+
* Gate #2 — `index.tsx reapplyFromStorage`: the existing `reapplyFromStorage`
|
|
60
|
+
* function mounts the shell CLOSED when `hasPersistedOverrides(cfg)` or
|
|
61
|
+
* `loadElementPathEnabled()` is true. It MUST also trigger on
|
|
62
|
+
* `shouldAutoload(cfg)` so an owner-mode page load mounts the Preact shell
|
|
63
|
+
* (and therefore the element-path inspector) even when no token overrides
|
|
64
|
+
* are persisted yet.
|
|
65
|
+
*/
|
|
66
|
+
import type { PanelConfig } from '../config/panel-config';
|
|
67
|
+
/**
|
|
68
|
+
* Return `true` iff this browser has the owner-autoload flag set.
|
|
69
|
+
*
|
|
70
|
+
* SSR-safe (returns `false` when `window` is not available) and quota-
|
|
71
|
+
* tolerant (returns `false` on any storage error). Reads exactly
|
|
72
|
+
* `${cfg.storagePrefix}:autoload` and matches against the literal string
|
|
73
|
+
* `'1'`; any other stored value (including `'0'` or an absent key) is `false`.
|
|
74
|
+
*/
|
|
75
|
+
export declare function shouldAutoload(cfg: PanelConfig): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Write the owner-autoload flag. Pass `true` to arm autoload (`'1'`), `false`
|
|
78
|
+
* to disarm (`'0'`). SSR-safe and quota-tolerant — errors are swallowed
|
|
79
|
+
* silently so this never throws in restricted storage contexts.
|
|
80
|
+
*
|
|
81
|
+
* Prefer `clearAutoload` when you want to fully remove the key (e.g. on
|
|
82
|
+
* `disableAutoload`) rather than leave a `'0'` sentinel.
|
|
83
|
+
*/
|
|
84
|
+
export declare function setAutoload(cfg: PanelConfig, on: boolean): void;
|
|
85
|
+
/**
|
|
86
|
+
* Remove the owner-autoload flag from storage entirely.
|
|
87
|
+
*
|
|
88
|
+
* Called by `disableAutoload()` (S2) as part of the full owner-mode teardown.
|
|
89
|
+
* SSR-safe and quota-tolerant.
|
|
90
|
+
*/
|
|
91
|
+
export declare function clearAutoload(cfg: PanelConfig): void;
|
|
92
|
+
//# sourceMappingURL=autoload-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoload-state.d.ts","sourceRoot":"","sources":["../../src/state/autoload-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAOxD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,GAAG,IAAI,CAO/D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAOpD"}
|
|
@@ -128,7 +128,10 @@ export declare const DEFAULT_SIZE: PanelSize;
|
|
|
128
128
|
/**
|
|
129
129
|
* Compute the first-open panel size in px. Mirrors the historical CSS
|
|
130
130
|
* `min(1200, 0.8 * vw)` × `min(800, 0.8 * vh)` rule so existing users
|
|
131
|
-
* experience the same default size
|
|
131
|
+
* experience the same default size, then clamps through `clampSize` so the
|
|
132
|
+
* result respects the MIN_PANEL_* floor and the viewport cap. The floor only
|
|
133
|
+
* bites on phone-width viewports (e.g. 375px → 0.8*375 = 300, raised to the
|
|
134
|
+
* 320 min); on normal viewports the clamp is a no-op.
|
|
132
135
|
*/
|
|
133
136
|
export declare function defaultSize(): PanelSize;
|
|
134
137
|
/**
|
|
@@ -263,6 +266,20 @@ export declare function setCssVar(name: string, value: string): void;
|
|
|
263
266
|
* Resolve a `ColorRef` to a palette index. If it's already a number, use it.
|
|
264
267
|
* If it's a string, find an exact palette match or the nearest color by RGB
|
|
265
268
|
* distance. `fallback` is returned only when `ref` is undefined.
|
|
269
|
+
*
|
|
270
|
+
* Match order (format-tolerant + alpha-aware):
|
|
271
|
+
* (a) exact raw-string match — preserves byte-for-byte `oklch()`/hex refs
|
|
272
|
+
* without any lossy normalization (palette refs are usually canonical);
|
|
273
|
+
* (b) OKLCH-aware match — when the ref AND a palette entry both parse as CSS
|
|
274
|
+
* Color 4 `oklch()`, compare canonical `cssToOklcha` forms with a
|
|
275
|
+
* per-channel epsilon (alpha included). This keeps a wide-gamut oklch ref
|
|
276
|
+
* from collapsing to '#000000' under the hex path (jsdom / engines whose
|
|
277
|
+
* canvas can't parse oklch) and keeps a same-L/C/H-different-alpha ref
|
|
278
|
+
* bound to the correct slot;
|
|
279
|
+
* (c) hex fallback — normalize ref + palette to canonical hex for an exact
|
|
280
|
+
* match, else nearest color by base-RGB distance. This is the path for
|
|
281
|
+
* genuine hex/rgb refs; the nearest-distance step intentionally drops
|
|
282
|
+
* alpha, so the exact matches above must run first when alpha matters.
|
|
266
283
|
*/
|
|
267
284
|
export declare function colorRefToIndex(ref: ColorRef | undefined, palette: string[], fallback: number): number;
|
|
268
285
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tweak-state.d.ts","sourceRoot":"","sources":["../../src/state/tweak-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CA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,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CASrF,CAAC;AA2KF,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,WAA0B,EACnC,aAAa,CAAC,EAAE,eAAe,EAC/B,OAAO,GAAE,sBAAkD,EAC3D,GAAG,GAAE,WAA8B,GAClC,UAAU,GAAG,IAAI,CAgHnB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,WAA0B,EACnC,GAAG,GAAE,WAA8B,QAOpC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,GAAE,WAA0B,EACnC,GAAG,GAAE,WAA8B,QAiBpC"}
|
package/dist/tabs/color-tab.d.ts
CHANGED
|
@@ -11,10 +11,13 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Acceptance criterion (rejection-fix): every Base / Semantic Tokens row is
|
|
13
13
|
* a `PaletteSelector` — the only way to edit those values is to pick a
|
|
14
|
-
* palette index (p0–p15) or one of the `bg`/`fg` extras. The
|
|
15
|
-
* swatches themselves are the only inputs that edit a
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* palette index (p0–p15) or one of the `bg`/`fg` extras. The Palette
|
|
15
|
+
* swatches themselves are the only inputs that edit a color directly — a
|
|
16
|
+
* hex by default, or an `oklch(...)` string when the palette tier declares
|
|
17
|
+
* `type.format: 'oklch'` — via the color-picker popover. No raw-color
|
|
18
|
+
* inputs (rgb / hex text field / lab) are exposed for Base or Semantic rows;
|
|
19
|
+
* those rows reference palette slots, so they inherit OKLCH transitively the
|
|
20
|
+
* moment the palette holds `oklch()` values.
|
|
18
21
|
*
|
|
19
22
|
* Shiki integration is out of scope — the `shikiTheme` field stays on
|
|
20
23
|
* state + persist + serde for envelope round-tripping with upstream
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-tab.d.ts","sourceRoot":"","sources":["../../src/tabs/color-tab.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"color-tab.d.ts","sourceRoot":"","sources":["../../src/tabs/color-tab.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAMH,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AA6XvE,UAAU,aAAa;IACrB;;;OAGG;IACH,GAAG,EAAE,SAAS,CAAC;IACf,KAAK,EAAE,eAAe,CAAC;IACvB,YAAY,EAAE,YAAY,CAAC;IAC3B;;;OAGG;IACH,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,eAAe,GAAG,IAAI,CAAC;IACvC,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,GAAG,EACH,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,gBAAgB,GACjB,EAAE,aAAa,gCAsWf"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* length / number → number input with unit suffix (numeric range)
|
|
10
10
|
* select → native <select>
|
|
11
11
|
* text → free-form text input
|
|
12
|
-
* color → native <input type="color"> by default; with format:'oklch' → OKLCH picker emitting oklch()
|
|
12
|
+
* color → native <input type="color"> by default (emits hex); with format:'oklch' → OKLCH picker emitting an oklch() string. Color values therefore persist as hex OR oklch(), not hex-only.
|
|
13
13
|
*
|
|
14
14
|
* For items in a tier with `referencesTier`, TierRefSelector is rendered
|
|
15
15
|
* instead, so the user can either pick a tier-1 item id (emitted as
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette-edit-view.d.ts","sourceRoot":"","sources":["../../../src/tabs/palette/palette-edit-view.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAwB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"palette-edit-view.d.ts","sourceRoot":"","sources":["../../../src/tabs/palette/palette-edit-view.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAwB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAkB9D,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,SAAS,CAAC;IACf,SAAS,EAAE,YAAY,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;CACzE;AAsHD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,oBAAoB,gCAuLxG"}
|
package/dist/testing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as r, c as i, f as _, h as n, i as g, b as R, a as p } from "./panel-config-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as r, c as i, f as _, h as n, i as g, b as R, a as p } from "./panel-config-DyVRQ2n1.js";
|
|
2
|
+
import { a as l, b as y, l as O } from "./tweak-state-DzZVbY25.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(a, e) {
|
|
5
5
|
await a.fill(e), await a.dispatchEvent("input");
|