@takazudo/zdtp 0.8.0 → 0.8.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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as y, jsxs as K, Fragment as kt } from "preact/jsx-runtime";
2
2
  import { useEffect as P, useState as Y, useRef as O, useMemo as J, useCallback as X } from "preact/hooks";
3
- import { b as ft, p as wt, u as ht, a as Ne, A as bt, Z as gt } from "./index-blRjSavc.js";
3
+ import { b as ft, p as wt, u as ht, a as Ne, A as bt, Z as gt } from "./index-CXkidCHj.js";
4
4
  import { g as vt, m as j } from "./panel-config-DKfob-1r.js";
5
5
  const xt = (e, o) => {
6
6
  const t = new Array(e.length + o.length);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "preact/jsx-runtime";
2
2
  import "preact";
3
- import { D as t, S as n, c as l, d, _ as p, e as _, f as g, g as m, h as S, i as P, j as C, k as T, l as A, m as c, n as f, o as u, q as D, r as M, s as E, t as K, v as h, w as k, x as v, y as w, z as x, B as F, C as y, E as L } from "./index-blRjSavc.js";
3
+ import { D as t, S as n, c as l, d, _ as p, e as _, f as g, g as m, h as S, i as P, j as C, k as T, l as A, m as c, n as f, o as u, q as D, r as M, s as E, t as K, v as h, w as k, x as v, y as w, z as x, B as F, C as y, E as L } from "./index-CXkidCHj.js";
4
4
  import { Z as H, a3 as V, x as z, w as O, a6 as Y } from "./tweak-state-BiaKbhXN.js";
5
5
  import { b as G, c as I, s as N } from "./panel-config-DKfob-1r.js";
6
6
  import "./autoload-state-CtB0e8mY.js";
@@ -17,6 +17,9 @@ export interface GenericItemEditorProps {
17
17
  value: string;
18
18
  /** Called with (itemId, newValue). */
19
19
  onChange: (itemId: string, next: string) => void;
20
+ /** Stored override, if any. Distinct from `value` so a loaded override
21
+ * equal to `item.default` still wins over the manifest pair. */
22
+ override?: string;
20
23
  }
21
24
  declare function GenericItemEditor(props: GenericItemEditorProps): import("preact").JSX.Element;
22
25
  declare const _default: typeof GenericItemEditor;
@@ -20,6 +20,24 @@ export interface ModesValuePairProps {
20
20
  }
21
21
  /** Render the two authored values with mode-labelled swatches. */
22
22
  export declare function ModesValuePair({ sides, testIdPrefix }: ModesValuePairProps): import("preact").JSX.Element;
23
+ /**
24
+ * Commit one side of a mode pair as `light-dark(light, dark)`. The untouched
25
+ * side is copied byte-for-byte so a mixed-format pair such as
26
+ * `light-dark(rgb(10, 20, 30), oklch(0.8 0.1 240))` keeps the other side's
27
+ * authored syntax.
28
+ */
29
+ export declare function commitModePair(sides: ModeSides, side: keyof ModeSides, next: string): string;
30
+ export interface ModesEditorFieldsProps {
31
+ item: TierItem;
32
+ sides: ModeSides;
33
+ onChange: (next: string) => void;
34
+ }
35
+ /**
36
+ * Compact light/dark ColorField pair for a manifest `modes` row. Palette Check
37
+ * reuses this without ModesRow chrome. Manifest `modes` is always a pair — no
38
+ * SemanticLiteralRow "Per-mode" checkbox.
39
+ */
40
+ export declare function ModesEditorFields({ item, sides, onChange }: ModesEditorFieldsProps): import("preact").JSX.Element;
23
41
  export interface ModesRowProps {
24
42
  item: TierItem;
25
43
  sides?: ModeSides;
@@ -29,11 +47,12 @@ export interface ModesRowProps {
29
47
  leading?: ComponentChildren;
30
48
  trailing?: ComponentChildren;
31
49
  tail?: ComponentChildren;
50
+ /** Parents close over address/ids. Absent or a readonly item keeps chips. */
51
+ onChange?: (next: string) => void;
32
52
  }
33
53
  /**
34
- * Display-only row for a manifest `modes` item. It deliberately carries an
35
- * editor-disabled state class while retaining ordinary row actions such as
36
- * highlighting and token-chain navigation. The pair itself contains no
37
- * input, select, picker, or other editing affordance.
54
+ * Row for a manifest `modes` item. With `onChange` (and not readonly) the pair
55
+ * is edited via `ModesEditorFields`; otherwise chips stay and the row keeps
56
+ * `tokenpanel-row--editor-disabled` while retaining ordinary row actions.
38
57
  */
39
- export declare function ModesRow({ item, sides, className, dataTestId, address, leading, trailing, tail, }: ModesRowProps): import("preact").JSX.Element;
58
+ export declare function ModesRow({ item, sides, className, dataTestId, address, leading, trailing, tail, onChange, }: ModesRowProps): import("preact").JSX.Element;
@@ -9,4 +9,4 @@ export interface PaletteCheckViewProps {
9
9
  changedOnly?: boolean;
10
10
  isChanged?: (address: TokenAddress) => boolean;
11
11
  }
12
- export default function PaletteCheckView({ tab, overrides, searchQuery, changedOnly, isChanged, }: PaletteCheckViewProps): import("preact").JSX.Element;
12
+ export default function PaletteCheckView({ tab, overrides, onChange, searchQuery, changedOnly, isChanged, }: PaletteCheckViewProps): import("preact").JSX.Element;