@plitzi/sdk-style 0.32.19 → 0.32.21

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/components/StyleInspector/Inspector.mjs +137 -131
  3. package/dist/components/StyleInspector/categories/Background/Background.mjs +151 -69
  4. package/dist/components/StyleInspector/categories/Effects/Effects.mjs +257 -84
  5. package/dist/components/StyleInspector/categories/Effects/Filters/Filter.d.ts +3 -1
  6. package/dist/components/StyleInspector/categories/Effects/Filters/Filter.mjs +17 -17
  7. package/dist/components/StyleInspector/categories/Others/Others.d.ts +7 -0
  8. package/dist/components/StyleInspector/categories/Others/Others.mjs +103 -0
  9. package/dist/components/StyleInspector/categories/Others/OthersForm.d.ts +9 -0
  10. package/dist/components/StyleInspector/categories/Others/OthersForm.mjs +48 -0
  11. package/dist/components/StyleInspector/categories/Others/OthersInteraction.d.ts +13 -0
  12. package/dist/components/StyleInspector/categories/Others/OthersInteraction.mjs +162 -0
  13. package/dist/components/StyleInspector/categories/Others/OthersOutline.d.ts +10 -0
  14. package/dist/components/StyleInspector/categories/Others/OthersOutline.mjs +75 -0
  15. package/dist/components/StyleInspector/categories/Others/OthersSvg.d.ts +9 -0
  16. package/dist/components/StyleInspector/categories/Others/OthersSvg.mjs +31 -0
  17. package/dist/components/StyleInspector/categories/Others/OthersTable.d.ts +9 -0
  18. package/dist/components/StyleInspector/categories/Others/OthersTable.mjs +44 -0
  19. package/dist/components/StyleInspector/categories/Others/index.d.ts +3 -0
  20. package/dist/components/StyleInspector/categories/Others/index.mjs +5 -0
  21. package/dist/components/StyleInspector/categories/Position/Position.mjs +70 -69
  22. package/dist/components/StyleInspector/categories/Size/Size.mjs +82 -52
  23. package/dist/components/StyleInspector/categories/Typography/Typography.mjs +139 -158
  24. package/dist/components/StyleInspector/categories/Typography/TypographyBreaking.d.ts +12 -0
  25. package/dist/components/StyleInspector/categories/Typography/TypographyBreaking.mjs +181 -0
  26. package/dist/components/StyleInspector/categories/Typography/TypographyClamp.d.ts +7 -0
  27. package/dist/components/StyleInspector/categories/Typography/TypographyClamp.mjs +35 -0
  28. package/dist/components/StyleInspector/categories/Typography/TypographyStyle.d.ts +3 -1
  29. package/dist/components/StyleInspector/categories/Typography/TypographyStyle.mjs +47 -32
  30. package/dist/components/StyleInspector/categories/Typography/TypographyTransform.mjs +10 -11
  31. package/dist/components/StyleInspector/components/CategoryAdvanced/CategoryAdvanced.d.ts +6 -0
  32. package/dist/components/StyleInspector/components/CategoryAdvanced/CategoryAdvanced.mjs +6 -0
  33. package/dist/components/StyleInspector/components/CategoryAdvanced/CategoryAdvancedContext.d.ts +2 -0
  34. package/dist/components/StyleInspector/components/CategoryAdvanced/CategoryAdvancedContext.mjs +5 -0
  35. package/dist/components/StyleInspector/components/CategoryAdvanced/index.d.ts +4 -0
  36. package/dist/components/StyleInspector/components/CategoryAdvanced/index.mjs +6 -0
  37. package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.d.ts +2 -1
  38. package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +52 -25
  39. package/package.json +60 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @plitzi/sdk-style
2
2
 
3
+ ## 0.32.21
4
+
5
+ ### Patch Changes
6
+
7
+ - v0.32.21
8
+ - Updated dependencies
9
+ - @plitzi/sdk-plugins@0.32.21
10
+ - @plitzi/sdk-shared@0.32.21
11
+ - @plitzi/sdk-variables@0.32.21
12
+
13
+ ## 0.32.20
14
+
15
+ ### Patch Changes
16
+
17
+ - v0.32.20
18
+ - Updated dependencies
19
+ - @plitzi/sdk-plugins@0.32.20
20
+ - @plitzi/sdk-shared@0.32.20
21
+ - @plitzi/sdk-variables@0.32.20
22
+
3
23
  ## 0.32.19
4
24
 
5
25
  ### Patch Changes
@@ -6,173 +6,179 @@ import i from "./categories/DisplayFlexChild/index.mjs";
6
6
  import a from "./categories/Effects/index.mjs";
7
7
  import o from "./categories/List/index.mjs";
8
8
  import s from "./categories/ListItem/index.mjs";
9
- import c from "./categories/Position/index.mjs";
10
- import l from "./categories/RawStyle/index.mjs";
11
- import u from "./categories/Size/index.mjs";
12
- import d from "./categories/Spacing/index.mjs";
13
- import f from "./categories/Typography/index.mjs";
14
- import p from "./categories/Variables/index.mjs";
15
- import m from "./hooks/useStyleInherit.mjs";
16
- import h from "./StyleInspectorProvider.mjs";
17
- import { get as g, set as _ } from "@plitzi/plitzi-ui/helpers";
18
- import { use as v, useCallback as y, useMemo as b } from "react";
19
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
20
- import { produce as C } from "immer";
21
- import w from "@plitzi/sdk-shared/builder/contexts/BuilderContext";
22
- import T from "@plitzi/plitzi-ui/hooks/useStorage";
23
- import E from "@plitzi/plitzi-ui/Switch";
9
+ import c from "./categories/Others/index.mjs";
10
+ import l from "./categories/Position/index.mjs";
11
+ import u from "./categories/RawStyle/index.mjs";
12
+ import d from "./categories/Size/index.mjs";
13
+ import f from "./categories/Spacing/index.mjs";
14
+ import p from "./categories/Typography/index.mjs";
15
+ import m from "./categories/Variables/index.mjs";
16
+ import h from "./hooks/useStyleInherit.mjs";
17
+ import g from "./StyleInspectorProvider.mjs";
18
+ import { get as _, set as v } from "@plitzi/plitzi-ui/helpers";
19
+ import { use as y, useCallback as b, useMemo as x } from "react";
20
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
21
+ import { produce as w } from "immer";
22
+ import T from "@plitzi/sdk-shared/builder/contexts/BuilderContext";
23
+ import E from "@plitzi/plitzi-ui/hooks/useStorage";
24
+ import D from "@plitzi/plitzi-ui/Switch";
24
25
  //#region src/components/StyleInspector/Inspector.tsx
25
- var D = ({ selectors: D, componentType: O, componentSubType: k, selector: A, styleState: j, styleVariant: M, styleSelector: N = "base", element: P, displayMode: F, mode: I = "element" }) => {
26
- let { builderHandler: L } = v(w), [R, z] = T(`builder-state.styleInspector.${I}.collapsedCache`, {}), [B, V] = T(`builder-state.styleInspector.${I}.showAllOptions`, !1), [H, U] = T(`builder-state.styleInspector.${I}.replaceTokens`, !1), W = m({
27
- element: P,
28
- componentType: O,
29
- componentSubType: k,
30
- selector: A?.name,
31
- styleSelector: N,
32
- styleState: j,
33
- styleVariant: M
34
- }), G = y((e, t) => z((n) => ({
26
+ var O = ({ selectors: O, componentType: k, componentSubType: A, selector: j, styleState: M, styleVariant: N, styleSelector: P = "base", element: F, displayMode: I, mode: L = "element" }) => {
27
+ let { builderHandler: R } = y(T), [z, B] = E(`builder-state.styleInspector.${L}.collapsedCache`, {}), [V, H] = E(`builder-state.styleInspector.${L}.showAllOptions`, !1), [U, W] = E(`builder-state.styleInspector.${L}.replaceTokens`, !1), G = h({
28
+ element: F,
29
+ componentType: k,
30
+ componentSubType: A,
31
+ selector: j?.name,
32
+ styleSelector: P,
33
+ styleState: M,
34
+ styleVariant: N
35
+ }), K = b((e, t) => B((n) => ({
35
36
  ...n,
36
37
  [e]: t
37
- })), [z]), K = y((e) => V(e.target.checked), [V]), q = y((e) => U(e.target.checked), [U]), J = y((t, n) => {
38
- if (A) {
39
- L("styleUpdateSelector", F, A.name, t, n, {
40
- componentType: A.type === "element" ? O : void 0,
41
- styleSelector: N,
42
- styleState: j,
43
- styleVariant: M
38
+ })), [B]), q = b((e) => H(e.target.checked), [H]), J = b((e) => W(e.target.checked), [W]), Y = b((t, n) => {
39
+ if (j) {
40
+ R("styleUpdateSelector", I, j.name, t, n, {
41
+ componentType: j.type === "element" ? k : void 0,
42
+ styleSelector: P,
43
+ styleState: M,
44
+ styleVariant: N
44
45
  });
45
46
  return;
46
47
  }
47
- if (!O) return;
48
- let r = e(O, N);
49
- if (L("styleAddSelector", F, r, "class", t, n, {
50
- styleSelector: N,
51
- styleState: j,
52
- styleVariant: M
53
- }), !P) return;
54
- let i = g(P, `definition.styleSelectors.${N}`);
55
- L("schemaUpdateElement", C(P, (e) => {
56
- i ? _(e, `definition.styleSelectors.${N}`, `${i} ${r}`) : _(e, `definition.styleSelectors.${N}`, r);
48
+ if (!k) return;
49
+ let r = e(k, P);
50
+ if (R("styleAddSelector", I, r, "class", t, n, {
51
+ styleSelector: P,
52
+ styleState: M,
53
+ styleVariant: N
54
+ }), !F) return;
55
+ let i = _(F, `definition.styleSelectors.${P}`);
56
+ R("schemaUpdateElement", w(F, (e) => {
57
+ i ? v(e, `definition.styleSelectors.${P}`, `${i} ${r}`) : v(e, `definition.styleSelectors.${P}`, r);
57
58
  }));
58
59
  }, [
59
- L,
60
- O,
60
+ R,
61
+ k,
62
+ I,
61
63
  F,
62
- P,
63
- A,
64
- N,
65
64
  j,
66
- M
67
- ]), Y = b(() => {
68
- let e = P?.definition.type;
69
- return B || I === "manager" || e === "list" || e === "listItem";
65
+ P,
66
+ M,
67
+ N
68
+ ]), X = x(() => {
69
+ let e = F?.definition.type;
70
+ return V || L === "manager" || e === "list" || e === "listItem";
70
71
  }, [
71
- P?.definition.type,
72
- I,
73
- B
74
- ]), X = b(() => B || I === "manager" || g(W, "parentStyle.display", "block") === "flex", [
75
- W,
76
- I,
77
- B
78
- ]), Z = b(() => g(W, "parentStyle.flex-direction", "row") === "column", [W]);
79
- return /* @__PURE__ */ x(h, {
80
- componentType: O,
81
- displayMode: F,
82
- styleSelector: N,
83
- styleState: j,
84
- styleVariant: M,
85
- selector: A,
86
- element: P,
87
- inheritData: W,
88
- onChange: J,
89
- children: /* @__PURE__ */ S("div", {
72
+ F?.definition.type,
73
+ L,
74
+ V
75
+ ]), Z = x(() => V || L === "manager" || _(G, "parentStyle.display", "block") === "flex", [
76
+ G,
77
+ L,
78
+ V
79
+ ]), Q = x(() => _(G, "parentStyle.flex-direction", "row") === "column", [G]);
80
+ return /* @__PURE__ */ S(g, {
81
+ componentType: k,
82
+ displayMode: I,
83
+ styleSelector: P,
84
+ styleState: M,
85
+ styleVariant: N,
86
+ selector: j,
87
+ element: F,
88
+ inheritData: G,
89
+ onChange: Y,
90
+ children: /* @__PURE__ */ C("div", {
90
91
  className: "flex grow flex-col justify-between",
91
- children: [/* @__PURE__ */ S("div", {
92
+ children: [/* @__PURE__ */ C("div", {
92
93
  className: "flex grow flex-col",
93
94
  children: [
94
- Y && /* @__PURE__ */ x(o, {
95
- replaceTokens: H,
96
- isCollapsed: R.list ?? !0,
97
- onCollapse: G
95
+ X && /* @__PURE__ */ S(o, {
96
+ replaceTokens: U,
97
+ isCollapsed: z.list ?? !0,
98
+ onCollapse: K
99
+ }),
100
+ X && /* @__PURE__ */ S(s, {
101
+ replaceTokens: U,
102
+ isCollapsed: z.listItem ?? !0,
103
+ onCollapse: K
98
104
  }),
99
- Y && /* @__PURE__ */ x(s, {
100
- replaceTokens: H,
101
- isCollapsed: R.listItem ?? !0,
102
- onCollapse: G
105
+ /* @__PURE__ */ S(r, {
106
+ replaceTokens: U,
107
+ isCollapsed: z.display ?? !0,
108
+ onCollapse: K
103
109
  }),
104
- /* @__PURE__ */ x(r, {
105
- replaceTokens: H,
106
- isCollapsed: R.display ?? !0,
107
- onCollapse: G
110
+ Z && /* @__PURE__ */ S(i, {
111
+ replaceTokens: U,
112
+ isCollapsed: z.displayFlexChild ?? !0,
113
+ isFlexVertical: Q,
114
+ onCollapse: K
108
115
  }),
109
- X && /* @__PURE__ */ x(i, {
110
- replaceTokens: H,
111
- isCollapsed: R.displayFlexChild ?? !0,
112
- isFlexVertical: Z,
113
- onCollapse: G
116
+ /* @__PURE__ */ S(f, {
117
+ replaceTokens: U,
118
+ isCollapsed: z.spacing ?? !0,
119
+ onCollapse: K
114
120
  }),
115
- /* @__PURE__ */ x(d, {
116
- replaceTokens: H,
117
- isCollapsed: R.spacing ?? !0,
118
- onCollapse: G
121
+ /* @__PURE__ */ S(d, {
122
+ replaceTokens: U,
123
+ isCollapsed: z.size ?? !0,
124
+ onCollapse: K
119
125
  }),
120
- /* @__PURE__ */ x(u, {
121
- replaceTokens: H,
122
- isCollapsed: R.size ?? !0,
123
- onCollapse: G
126
+ /* @__PURE__ */ S(l, {
127
+ replaceTokens: U,
128
+ isCollapsed: z.position ?? !0,
129
+ onCollapse: K
124
130
  }),
125
- /* @__PURE__ */ x(c, {
126
- replaceTokens: H,
127
- isCollapsed: R.position ?? !0,
128
- onCollapse: G
131
+ /* @__PURE__ */ S(p, {
132
+ replaceTokens: U,
133
+ isCollapsed: z.typography ?? !0,
134
+ onCollapse: K
129
135
  }),
130
- /* @__PURE__ */ x(f, {
131
- replaceTokens: H,
132
- isCollapsed: R.typography ?? !0,
133
- onCollapse: G
136
+ /* @__PURE__ */ S(t, {
137
+ replaceTokens: U,
138
+ isCollapsed: z.background ?? !0,
139
+ onCollapse: K
134
140
  }),
135
- /* @__PURE__ */ x(t, {
136
- replaceTokens: H,
137
- isCollapsed: R.background ?? !0,
138
- onCollapse: G
141
+ /* @__PURE__ */ S(n, {
142
+ replaceTokens: U,
143
+ isCollapsed: z.border ?? !0,
144
+ onCollapse: K
139
145
  }),
140
- /* @__PURE__ */ x(n, {
141
- replaceTokens: H,
142
- isCollapsed: R.border ?? !0,
143
- onCollapse: G
146
+ /* @__PURE__ */ S(a, {
147
+ replaceTokens: U,
148
+ isCollapsed: z.effects ?? !0,
149
+ onCollapse: K
144
150
  }),
145
- /* @__PURE__ */ x(a, {
146
- replaceTokens: H,
147
- isCollapsed: R.effects ?? !0,
148
- onCollapse: G
151
+ /* @__PURE__ */ S(c, {
152
+ replaceTokens: U,
153
+ isCollapsed: z.others ?? !0,
154
+ onCollapse: K
149
155
  }),
150
- /* @__PURE__ */ x(p, {
151
- isCollapsed: R.variables ?? !0,
152
- onCollapse: G
156
+ /* @__PURE__ */ S(m, {
157
+ isCollapsed: z.variables ?? !0,
158
+ onCollapse: K
153
159
  }),
154
- /* @__PURE__ */ x(l, {
155
- isCollapsed: R.rawStyle ?? !0,
156
- selectors: D,
157
- onCollapse: G
160
+ /* @__PURE__ */ S(u, {
161
+ isCollapsed: z.rawStyle ?? !0,
162
+ selectors: O,
163
+ onCollapse: K
158
164
  })
159
165
  ]
160
- }), /* @__PURE__ */ S("div", {
166
+ }), /* @__PURE__ */ C("div", {
161
167
  className: "flex items-center justify-end gap-4 border-t border-gray-200 px-2 py-1 dark:border-zinc-700",
162
- children: [/* @__PURE__ */ x(E, {
168
+ children: [/* @__PURE__ */ S(D, {
163
169
  size: "xs",
164
170
  label: "Replace Tokens",
165
- checked: H,
166
- onChange: q
167
- }), I === "element" && /* @__PURE__ */ x(E, {
171
+ checked: U,
172
+ onChange: J
173
+ }), L === "element" && /* @__PURE__ */ S(D, {
168
174
  size: "xs",
169
175
  label: "Show All Options",
170
- checked: B,
171
- onChange: K
176
+ checked: V,
177
+ onChange: q
172
178
  })]
173
179
  })]
174
180
  })
175
181
  });
176
182
  };
177
183
  //#endregion
178
- export { D as default };
184
+ export { O as default };
@@ -5,13 +5,14 @@ import r from "../../components/CategoryOption/index.mjs";
5
5
  import i from "../../components/CategorySection/index.mjs";
6
6
  import { DEFAULT_LAYER_PROPS as a, DEFAULT_STOPS as o, newLayerId as s, newStopId as c, serializeLayersToCSS as l } from "./helpers/backgroundParser.mjs";
7
7
  import u from "./components/BackgroundLayer/index.mjs";
8
- import d from "../../components/CategoryContainer/index.mjs";
9
- import f from "./helpers/parseToBgLayers.mjs";
10
- import { memo as p, use as m, useCallback as h, useRef as g, useState as _ } from "react";
11
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
12
- import b from "@plitzi/plitzi-ui/hooks/useDidUpdateEffect";
8
+ import d from "../../components/CategoryAdvanced/index.mjs";
9
+ import f from "../../components/CategoryContainer/index.mjs";
10
+ import p from "./helpers/parseToBgLayers.mjs";
11
+ import { memo as m, use as h, useCallback as g, useRef as _, useState as v } from "react";
12
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
13
+ import x from "@plitzi/plitzi-ui/hooks/useDidUpdateEffect";
13
14
  //#region src/components/StyleInspector/categories/Background/Background.tsx
14
- var x = [
15
+ var S = [
15
16
  "background-color",
16
17
  "background-image",
17
18
  "background-attachment",
@@ -19,40 +20,45 @@ var x = [
19
20
  "background-repeat",
20
21
  "background-clip",
21
22
  "background-size",
23
+ "background-blend-mode",
22
24
  "mask-image"
23
- ], S = [
25
+ ], C = [
24
26
  "background-image",
25
27
  "background-size",
26
28
  "background-position",
27
29
  "background-repeat",
28
30
  "background-attachment",
29
31
  "background-clip"
30
- ], C = (e) => S.map((t) => String(e[t])).join("||"), w = p(({ replaceTokens: p = !1, isCollapsed: w = !0, onCollapse: T }) => {
31
- let { setValue: E } = m(e), D = t({
32
- keys: S,
32
+ ], w = ["background-blend-mode", "mask-image"], T = (e) => C.map((t) => String(e[t])).join("||"), E = m(({ replaceTokens: m = !1, isCollapsed: E = !0, onCollapse: D }) => {
33
+ let { setValue: O } = h(e), k = t({
34
+ keys: C,
33
35
  asValue: !0,
34
36
  strictMode: !0,
35
- replaceTokens: p
36
- }), { "background-color": O, "mask-image": k } = t({
37
- keys: ["background-color", "mask-image"],
37
+ replaceTokens: m
38
+ }), { "background-color": A, "background-blend-mode": j, "mask-image": M } = t({
39
+ keys: [
40
+ "background-color",
41
+ "background-blend-mode",
42
+ "mask-image"
43
+ ],
38
44
  asValue: !0,
39
- replaceTokens: p
40
- }), A = C(D), j = g(D);
41
- j.current = D;
42
- let M = g(null), [N, P] = _(() => f(D));
43
- b(() => {
44
- A !== M.current && (P(f(j.current)), M.current = A);
45
- }, [A]);
46
- let [F, I] = _(null), L = h((e) => I((t) => t === e ? null : e), []), R = h((e) => {
45
+ replaceTokens: m
46
+ }), N = T(k), P = _(k);
47
+ P.current = k;
48
+ let F = _(null), [I, L] = v(() => p(k));
49
+ x(() => {
50
+ N !== F.current && (L(p(P.current)), F.current = N);
51
+ }, [N]);
52
+ let [R, z] = v(null), B = g((e) => z((t) => t === e ? null : e), []), V = g((e) => {
47
53
  let t = l(e);
48
- M.current = C(t), P(e), E(void 0, t);
49
- }, [E]), z = h((e, t) => {
54
+ F.current = T(t), L(e), O(void 0, t);
55
+ }, [O]), H = g((e, t) => {
50
56
  if (e === t) return;
51
- let n = [...N], [r] = n.splice(e, 1);
52
- n.splice(t, 0, r), R(n);
53
- }, [N, R]), B = h((e) => (t) => {
54
- R(N.map((n, r) => r === e ? t : n));
55
- }, [N, R]), V = h(() => {
57
+ let n = [...I], [r] = n.splice(e, 1);
58
+ n.splice(t, 0, r), V(n);
59
+ }, [I, V]), U = g((e) => (t) => {
60
+ V(I.map((n, r) => r === e ? t : n));
61
+ }, [I, V]), W = g(() => {
56
62
  let e = s(), t = {
57
63
  ...a,
58
64
  id: e,
@@ -67,76 +73,152 @@ var x = [
67
73
  position: "100%"
68
74
  }]
69
75
  };
70
- I(e), R([...N, t]);
71
- }, [N, R]), H = h((e) => () => {
72
- R(N.filter((t, n) => n !== e));
73
- }, [N, R]), U = h((e) => {
74
- E("background-color", e);
75
- }, [E]), W = h((e) => {
76
- E("mask-image", e);
77
- }, [E]), G = h((e) => T?.("background", e), [T]);
78
- return /* @__PURE__ */ v(d, {
76
+ z(e), V([...I, t]);
77
+ }, [I, V]), G = g((e) => () => {
78
+ V(I.filter((t, n) => n !== e));
79
+ }, [I, V]), K = g((e) => {
80
+ O("background-color", e);
81
+ }, [O]), q = g((e) => {
82
+ O("background-blend-mode", e);
83
+ }, [O]), J = g((e) => {
84
+ O("mask-image", e);
85
+ }, [O]), Y = g((e) => D?.("background", e), [D]);
86
+ return /* @__PURE__ */ y(f, {
79
87
  title: "Background",
80
- dotKeys: x,
81
- isCollapsed: w,
82
- onCollapse: G,
83
- children: /* @__PURE__ */ y("div", {
88
+ dotKeys: S,
89
+ advancedKeys: w,
90
+ isCollapsed: E,
91
+ onCollapse: Y,
92
+ children: /* @__PURE__ */ b("div", {
84
93
  className: "flex flex-col gap-2",
85
94
  children: [
86
- /* @__PURE__ */ y("div", {
95
+ /* @__PURE__ */ b("div", {
87
96
  className: "flex flex-col gap-1",
88
97
  children: [
89
- /* @__PURE__ */ y("div", {
98
+ /* @__PURE__ */ b("div", {
90
99
  className: "flex items-center justify-between",
91
- children: [/* @__PURE__ */ v(n, {
92
- keyValue: S,
100
+ children: [/* @__PURE__ */ y(n, {
101
+ keyValue: C,
93
102
  children: "Layers"
94
- }), /* @__PURE__ */ y("button", {
103
+ }), /* @__PURE__ */ b("button", {
95
104
  type: "button",
96
105
  className: "flex cursor-pointer items-center gap-1 rounded px-1.5 py-0.5 text-xs text-blue-500 hover:bg-blue-50 hover:text-blue-700 dark:hover:bg-blue-900/30",
97
- onClick: V,
106
+ onClick: W,
98
107
  title: "Add background layer",
99
- children: [/* @__PURE__ */ v("i", { className: "fas fa-plus text-[10px]" }), "Add"]
108
+ children: [/* @__PURE__ */ y("i", { className: "fas fa-plus text-[10px]" }), "Add"]
100
109
  })]
101
110
  }),
102
- !N.length && /* @__PURE__ */ v("div", {
111
+ !I.length && /* @__PURE__ */ y("div", {
103
112
  className: "rounded border border-dashed border-gray-300 py-3 text-center text-xs text-gray-400 dark:border-zinc-600 dark:text-zinc-500",
104
113
  children: "No layers — click Add to start"
105
114
  }),
106
- N.length > 0 && /* @__PURE__ */ v("div", {
115
+ I.length > 0 && /* @__PURE__ */ y("div", {
107
116
  className: "flex flex-col gap-1",
108
- children: N.map((e, t) => /* @__PURE__ */ v(u, {
117
+ children: I.map((e, t) => /* @__PURE__ */ y(u, {
109
118
  index: t,
110
119
  layer: e,
111
- expanded: F === e.id,
112
- onExpand: L,
113
- onChange: B(t),
114
- onRemove: H(t),
115
- onReorder: z
120
+ expanded: R === e.id,
121
+ onExpand: B,
122
+ onChange: U(t),
123
+ onRemove: G(t),
124
+ onReorder: H
116
125
  }, e.id))
117
126
  })
118
127
  ]
119
128
  }),
120
- /* @__PURE__ */ v(i, {
129
+ /* @__PURE__ */ y(i, {
121
130
  label: "Base Color",
122
131
  keys: ["background-color"],
123
- children: /* @__PURE__ */ v(r, {
132
+ children: /* @__PURE__ */ y(r, {
124
133
  type: "color",
125
- value: O,
126
- onChange: U
134
+ value: A,
135
+ onChange: K
127
136
  })
128
137
  }),
129
- /* @__PURE__ */ v(i, {
130
- label: "Mask",
131
- keys: ["mask-image"],
132
- children: /* @__PURE__ */ v(r, {
133
- value: k,
134
- onChange: W
135
- })
136
- })
138
+ /* @__PURE__ */ y(d, { children: /* @__PURE__ */ b(i, {
139
+ label: "",
140
+ children: [/* @__PURE__ */ b(r, {
141
+ keys: ["background-blend-mode"],
142
+ label: "Blend",
143
+ value: j,
144
+ onChange: q,
145
+ type: "select",
146
+ children: [
147
+ /* @__PURE__ */ y("option", {
148
+ value: "normal",
149
+ children: "Normal"
150
+ }),
151
+ /* @__PURE__ */ y("option", {
152
+ value: "multiply",
153
+ children: "Multiply"
154
+ }),
155
+ /* @__PURE__ */ y("option", {
156
+ value: "screen",
157
+ children: "Screen"
158
+ }),
159
+ /* @__PURE__ */ y("option", {
160
+ value: "overlay",
161
+ children: "Overlay"
162
+ }),
163
+ /* @__PURE__ */ y("option", {
164
+ value: "darken",
165
+ children: "Darken"
166
+ }),
167
+ /* @__PURE__ */ y("option", {
168
+ value: "lighten",
169
+ children: "Lighten"
170
+ }),
171
+ /* @__PURE__ */ y("option", {
172
+ value: "color-dodge",
173
+ children: "Color Dodge"
174
+ }),
175
+ /* @__PURE__ */ y("option", {
176
+ value: "color-burn",
177
+ children: "Color Burn"
178
+ }),
179
+ /* @__PURE__ */ y("option", {
180
+ value: "hard-light",
181
+ children: "Hard Light"
182
+ }),
183
+ /* @__PURE__ */ y("option", {
184
+ value: "soft-light",
185
+ children: "Soft Light"
186
+ }),
187
+ /* @__PURE__ */ y("option", {
188
+ value: "difference",
189
+ children: "Difference"
190
+ }),
191
+ /* @__PURE__ */ y("option", {
192
+ value: "exclusion",
193
+ children: "Exclusion"
194
+ }),
195
+ /* @__PURE__ */ y("option", {
196
+ value: "hue",
197
+ children: "Hue"
198
+ }),
199
+ /* @__PURE__ */ y("option", {
200
+ value: "saturation",
201
+ children: "Saturation"
202
+ }),
203
+ /* @__PURE__ */ y("option", {
204
+ value: "color",
205
+ children: "Color"
206
+ }),
207
+ /* @__PURE__ */ y("option", {
208
+ value: "luminosity",
209
+ children: "Luminosity"
210
+ })
211
+ ]
212
+ }), /* @__PURE__ */ y(r, {
213
+ keys: ["mask-image"],
214
+ label: "Mask",
215
+ value: M,
216
+ onChange: J
217
+ })]
218
+ }) })
137
219
  ]
138
220
  })
139
221
  });
140
222
  });
141
223
  //#endregion
142
- export { w as default };
224
+ export { E as default };