@plitzi/sdk-style 0.38.10 → 0.38.11

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 (149) hide show
  1. package/CHANGELOG.md +180 -0
  2. package/dist/components/InputEasing/InputEasingButton.mjs +1 -1
  3. package/dist/components/InputEasing/InputEasingList.mjs +5 -5
  4. package/dist/components/Selector/Selector.mjs +2 -1
  5. package/dist/components/Selector/SelectorItem/ItemOptions.mjs +45 -41
  6. package/dist/components/Selector/SelectorItem/SelectorItem.mjs +4 -4
  7. package/dist/components/Selector/SelectorItem/helpers.d.ts +2 -0
  8. package/dist/components/Selector/SelectorItem/helpers.mjs +4 -0
  9. package/dist/components/StyleInspector/Inspector.mjs +185 -171
  10. package/dist/components/StyleInspector/InspectorSearchContext.d.ts +3 -0
  11. package/dist/components/StyleInspector/InspectorSearchContext.mjs +6 -0
  12. package/dist/components/StyleInspector/StyleInspector.mjs +154 -128
  13. package/dist/components/StyleInspector/categories/Background/Background.mjs +82 -114
  14. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.d.ts +8 -0
  15. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.mjs +53 -0
  16. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.d.ts +3 -0
  17. package/dist/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.mjs +5 -0
  18. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +159 -153
  19. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.d.ts +11 -0
  20. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.mjs +45 -0
  21. package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.mjs +26 -23
  22. package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.mjs +65 -56
  23. package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.d.ts +4 -0
  24. package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.mjs +8 -0
  25. package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.mjs +28 -27
  26. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.d.ts +4 -2
  27. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.mjs +19 -18
  28. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.d.ts +4 -0
  29. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +48 -80
  30. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.d.ts +5 -3
  31. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +51 -41
  32. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.d.ts +5 -1
  33. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +54 -32
  34. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.d.ts +3 -1
  35. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.mjs +14 -13
  36. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.d.ts +8 -0
  37. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.mjs +8 -0
  38. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.d.ts +8 -0
  39. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.mjs +11 -0
  40. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/index.d.ts +3 -0
  41. package/dist/components/StyleInspector/categories/Background/components/LayerGroup/index.mjs +5 -0
  42. package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.d.ts +21 -7
  43. package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +114 -113
  44. package/dist/components/StyleInspector/categories/Background/helpers/layerValues.d.ts +8 -0
  45. package/dist/components/StyleInspector/categories/Background/helpers/layerValues.mjs +11 -0
  46. package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +52 -87
  47. package/dist/components/StyleInspector/categories/Background/modes/ImageMode.mjs +16 -77
  48. package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.mjs +19 -62
  49. package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +79 -97
  50. package/dist/components/StyleInspector/categories/Background/modes/RawMode.d.ts +8 -0
  51. package/dist/components/StyleInspector/categories/Background/modes/RawMode.mjs +22 -0
  52. package/dist/components/StyleInspector/categories/Background/modes/helpers.d.ts +19 -0
  53. package/dist/components/StyleInspector/categories/Background/modes/helpers.mjs +54 -0
  54. package/dist/components/StyleInspector/categories/Border/Border.mjs +26 -43
  55. package/dist/components/StyleInspector/categories/Border/BorderPlacements.mjs +60 -51
  56. package/dist/components/StyleInspector/categories/Display/Display.mjs +32 -49
  57. package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +33 -38
  58. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +21 -33
  59. package/dist/components/StyleInspector/categories/Effects/Effects.mjs +131 -154
  60. package/dist/components/StyleInspector/categories/Effects/Filters/Filter.mjs +23 -31
  61. package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.d.ts +9 -5
  62. package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +57 -124
  63. package/dist/components/StyleInspector/categories/Effects/Filters/helpers.d.ts +25 -0
  64. package/dist/components/StyleInspector/categories/Effects/Filters/helpers.mjs +87 -0
  65. package/dist/components/StyleInspector/categories/Effects/Transform/Transform.mjs +18 -28
  66. package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.d.ts +1 -2
  67. package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.mjs +52 -76
  68. package/dist/components/StyleInspector/categories/Effects/Transform/transformFunctions.d.ts +5 -0
  69. package/dist/components/StyleInspector/categories/Effects/Transform/transformFunctions.mjs +8 -2
  70. package/dist/components/StyleInspector/categories/Effects/Transition/Transition.mjs +21 -37
  71. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionEasing.d.ts +10 -0
  72. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs +92 -0
  73. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.d.ts +4 -4
  74. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +78 -359
  75. package/dist/components/StyleInspector/categories/Effects/Transition/helpers.d.ts +39 -0
  76. package/dist/components/StyleInspector/categories/Effects/Transition/helpers.mjs +268 -0
  77. package/dist/components/StyleInspector/categories/List/List.mjs +39 -38
  78. package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +29 -29
  79. package/dist/components/StyleInspector/categories/Others/Others.mjs +66 -88
  80. package/dist/components/StyleInspector/categories/Position/Position.mjs +67 -75
  81. package/dist/components/StyleInspector/categories/RawStyle/RawStyle.mjs +19 -18
  82. package/dist/components/StyleInspector/categories/Size/Size.mjs +68 -88
  83. package/dist/components/StyleInspector/categories/Spacing/Spacing.mjs +18 -27
  84. package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +2 -2
  85. package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +4 -3
  86. package/dist/components/StyleInspector/categories/Typography/Typography.mjs +88 -98
  87. package/dist/components/StyleInspector/categories/Typography/TypographyFont.mjs +1 -1
  88. package/dist/components/StyleInspector/categories/Typography/TypographyStyle.mjs +1 -1
  89. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +26 -39
  90. package/dist/components/StyleInspector/categories/Variables/Variables.mjs +38 -37
  91. package/dist/components/StyleInspector/categoryKeys.d.ts +45 -0
  92. package/dist/components/StyleInspector/categoryKeys.mjs +220 -0
  93. package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +43 -38
  94. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +2 -1
  95. package/dist/components/StyleInspector/components/CategorySection/CategorySection.mjs +30 -15
  96. package/dist/components/StyleInspector/components/ColorSwatch/ColorSwatch.d.ts +8 -0
  97. package/dist/components/StyleInspector/components/ColorSwatch/ColorSwatch.mjs +23 -0
  98. package/dist/components/StyleInspector/components/ColorSwatch/helpers.d.ts +3 -0
  99. package/dist/components/StyleInspector/components/ColorSwatch/helpers.mjs +9 -0
  100. package/dist/components/StyleInspector/components/ColorSwatch/index.d.ts +3 -0
  101. package/dist/components/StyleInspector/components/ColorSwatch/index.mjs +5 -0
  102. package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.d.ts +1 -0
  103. package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.mjs +11 -11
  104. package/dist/components/StyleInspector/components/InspectorFooter/InspectorFooter.d.ts +11 -0
  105. package/dist/components/StyleInspector/components/InspectorFooter/InspectorFooter.mjs +38 -0
  106. package/dist/components/StyleInspector/components/InspectorFooter/helpers.d.ts +2 -0
  107. package/dist/components/StyleInspector/components/InspectorFooter/helpers.mjs +11 -0
  108. package/dist/components/StyleInspector/components/InspectorFooter/index.d.ts +3 -0
  109. package/dist/components/StyleInspector/components/InspectorFooter/index.mjs +5 -0
  110. package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +34 -31
  111. package/dist/components/StyleInspector/components/InspectorLabel/helpers.d.ts +17 -0
  112. package/dist/components/StyleInspector/components/InspectorLabel/helpers.mjs +16 -0
  113. package/dist/components/StyleInspector/components/InspectorSearch/InspectorSearch.d.ts +7 -0
  114. package/dist/components/StyleInspector/components/InspectorSearch/InspectorSearch.mjs +24 -0
  115. package/dist/components/StyleInspector/components/InspectorSearch/index.d.ts +3 -0
  116. package/dist/components/StyleInspector/components/InspectorSearch/index.mjs +5 -0
  117. package/dist/components/StyleInspector/components/ShadowItem/ShadowItem.d.ts +9 -0
  118. package/dist/components/StyleInspector/components/ShadowItem/ShadowItem.mjs +110 -0
  119. package/dist/components/StyleInspector/components/ShadowItem/index.d.ts +3 -0
  120. package/dist/components/StyleInspector/components/ShadowItem/index.mjs +5 -0
  121. package/dist/components/StyleInspector/components/TargetSummary/TargetSummary.d.ts +7 -0
  122. package/dist/components/StyleInspector/components/TargetSummary/TargetSummary.mjs +24 -0
  123. package/dist/components/StyleInspector/components/TargetSummary/index.d.ts +3 -0
  124. package/dist/components/StyleInspector/components/TargetSummary/index.mjs +5 -0
  125. package/dist/components/StyleInspector/components/ValueList/ValueList.d.ts +12 -0
  126. package/dist/components/StyleInspector/components/ValueList/ValueList.mjs +25 -0
  127. package/dist/components/StyleInspector/components/ValueList/index.d.ts +3 -0
  128. package/dist/components/StyleInspector/components/ValueList/index.mjs +5 -0
  129. package/dist/components/StyleInspector/components/ValueListItem/ValueListItem.d.ts +16 -0
  130. package/dist/components/StyleInspector/components/ValueListItem/ValueListItem.mjs +71 -0
  131. package/dist/components/StyleInspector/components/ValueListItem/index.d.ts +3 -0
  132. package/dist/components/StyleInspector/components/ValueListItem/index.mjs +5 -0
  133. package/dist/components/StyleInspector/cssValues.d.ts +15 -0
  134. package/dist/components/StyleInspector/cssValues.mjs +27 -0
  135. package/dist/components/StyleInspector/helpers.d.ts +17 -1
  136. package/dist/components/StyleInspector/helpers.mjs +9 -2
  137. package/dist/components/StyleInspector/hooks/useInspectorValues.mjs +42 -45
  138. package/dist/components/StyleInspector/search.d.ts +11 -0
  139. package/dist/components/StyleInspector/search.mjs +14 -0
  140. package/dist/components/StyleInspector/shadowValue.d.ts +20 -0
  141. package/dist/components/StyleInspector/shadowValue.mjs +36 -0
  142. package/dist/components/StyleManager/StyleSelectorTag.mjs +1 -1
  143. package/package.json +185 -17
  144. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.d.ts +0 -8
  145. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.mjs +0 -132
  146. package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.d.ts +0 -2
  147. package/dist/components/StyleInspector/categories/Effects/BoxShadow/helpers.mjs +0 -18
  148. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.d.ts +0 -8
  149. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.mjs +0 -83
@@ -1,40 +1,24 @@
1
1
  import e from "../../StyleInspectorContext.mjs";
2
2
  import t from "../../hooks/useInspectorValues.mjs";
3
- import n from "../../components/InspectorLabel/index.mjs";
4
- import r from "../../components/CategoryOption/index.mjs";
5
- import i from "../../components/CategorySection/index.mjs";
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
- import u from "./components/BackgroundLayer/index.mjs";
3
+ import n from "../../components/CategoryOption/index.mjs";
4
+ import r from "../../components/CategorySection/index.mjs";
5
+ import { DEFAULT_LAYER_PROPS as i, DEFAULT_STOPS as a, newLayerId as o, newStopId as s, serializeLayersToCSS as c } from "./helpers/backgroundParser.mjs";
6
+ import l from "./components/BackgroundLayer/index.mjs";
7
+ import { BACKGROUND_KEYS as u } from "../../categoryKeys.mjs";
8
8
  import d from "../../components/CategoryAdvanced/index.mjs";
9
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";
10
+ import { BG_LAYER_KEYS as p, layerValuesKey as m } from "./helpers/layerValues.mjs";
11
+ import h from "./helpers/parseToBgLayers.mjs";
12
+ import g from "../../components/ValueList/index.mjs";
13
+ import { memo as _, use as v, useCallback as y, useRef as b, useState as x } from "react";
14
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
15
+ import w from "@plitzi/plitzi-ui/hooks/useDidUpdateEffect";
14
16
  //#region src/components/StyleInspector/categories/Background/Background.tsx
15
- var S = [
16
- "background-color",
17
- "background-image",
18
- "background-attachment",
19
- "background-position",
20
- "background-repeat",
21
- "background-clip",
22
- "background-size",
23
- "background-blend-mode",
24
- "mask-image"
25
- ], C = [
26
- "background-image",
27
- "background-size",
28
- "background-position",
29
- "background-repeat",
30
- "background-attachment",
31
- "background-clip"
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,
17
+ var T = ["background-color"], E = _(({ replaceTokens: _ = !1, isCollapsed: E = !0, onCollapse: D }) => {
18
+ let { setValue: O } = v(e), k = t({
19
+ keys: p,
35
20
  asValue: !0,
36
- strictMode: !0,
37
- replaceTokens: m
21
+ strictMode: !0
38
22
  }), { "background-color": A, "background-blend-mode": j, "mask-image": M } = t({
39
23
  keys: [
40
24
  "background-color",
@@ -42,174 +26,158 @@ var S = [
42
26
  "mask-image"
43
27
  ],
44
28
  asValue: !0,
45
- replaceTokens: m
46
- }), N = T(k), P = _(k);
29
+ replaceTokens: _
30
+ }), N = m(k), P = b(k);
47
31
  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);
32
+ let F = b(null), [I, L] = x(() => h(k));
33
+ w(() => {
34
+ N !== F.current && (L(h(P.current)), F.current = N);
51
35
  }, [N]);
52
- let [R, z] = v(null), B = g((e) => z((t) => t === e ? null : e), []), V = g((e) => {
53
- let t = l(e);
54
- F.current = T(t), L(e), O(void 0, t);
55
- }, [O]), H = g((e, t) => {
36
+ let [R, z] = x(null), B = y((e) => z((t) => t === e ? null : e), []), V = y((e) => {
37
+ let t = c(e);
38
+ F.current = m(t), L(e), O(void 0, t);
39
+ }, [O]), H = y((e, t) => {
56
40
  if (e === t) return;
57
41
  let n = [...I], [r] = n.splice(e, 1);
58
42
  n.splice(t, 0, r), V(n);
59
- }, [I, V]), U = g((e) => (t) => {
43
+ }, [I, V]), U = y((e) => (t) => {
60
44
  V(I.map((n, r) => r === e ? t : n));
61
- }, [I, V]), W = g(() => {
62
- let e = s(), t = {
63
- ...a,
45
+ }, [I, V]), W = y(() => {
46
+ let e = o(), t = {
47
+ ...i,
64
48
  id: e,
65
49
  type: "linear-gradient",
66
50
  stops: [{
67
- id: c(),
68
- color: o[0].color,
51
+ id: s(),
52
+ color: a[0].color,
69
53
  position: "0%"
70
54
  }, {
71
- id: c(),
72
- color: o[1].color,
55
+ id: s(),
56
+ color: a[1].color,
73
57
  position: "100%"
74
58
  }]
75
59
  };
76
60
  z(e), V([...I, t]);
77
- }, [I, V]), G = g((e) => () => {
61
+ }, [I, V]), G = y((e) => () => {
78
62
  V(I.filter((t, n) => n !== e));
79
- }, [I, V]), K = g((e) => {
63
+ }, [I, V]), K = y((e) => {
80
64
  O("background-color", e);
81
- }, [O]), q = g((e) => {
65
+ }, [O]), q = y((e) => {
82
66
  O("background-blend-mode", e);
83
- }, [O]), J = g((e) => {
67
+ }, [O]), J = y((e) => {
84
68
  O("mask-image", e);
85
- }, [O]), Y = g((e) => D?.("background", e), [D]);
86
- return /* @__PURE__ */ y(f, {
87
- title: "Background",
88
- dotKeys: S,
89
- advancedKeys: w,
69
+ }, [O]), Y = y((e) => D?.("background", e), [D]);
70
+ return /* @__PURE__ */ S(f, {
71
+ title: u.title,
72
+ dotKeys: u.dot,
73
+ advancedKeys: u.advanced,
90
74
  isCollapsed: E,
91
75
  onCollapse: Y,
92
- children: /* @__PURE__ */ b("div", {
76
+ children: /* @__PURE__ */ C("div", {
93
77
  className: "flex flex-col gap-2",
94
78
  children: [
95
- /* @__PURE__ */ b("div", {
96
- className: "flex flex-col gap-1",
97
- children: [
98
- /* @__PURE__ */ b("div", {
99
- className: "flex items-center justify-between",
100
- children: [/* @__PURE__ */ y(n, {
101
- keyValue: C,
102
- children: "Layers"
103
- }), /* @__PURE__ */ b("button", {
104
- type: "button",
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",
106
- onClick: W,
107
- title: "Add background layer",
108
- children: [/* @__PURE__ */ y("i", { className: "fas fa-plus text-[10px]" }), "Add"]
109
- })]
110
- }),
111
- !I.length && /* @__PURE__ */ y("div", {
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",
113
- children: "No layers — click Add to start"
114
- }),
115
- I.length > 0 && /* @__PURE__ */ y("div", {
116
- className: "flex flex-col gap-1",
117
- children: I.map((e, t) => /* @__PURE__ */ y(u, {
118
- index: t,
119
- layer: e,
120
- expanded: R === e.id,
121
- onExpand: B,
122
- onChange: U(t),
123
- onRemove: G(t),
124
- onReorder: H
125
- }, e.id))
126
- })
127
- ]
79
+ /* @__PURE__ */ C(g, {
80
+ label: "Layers",
81
+ keys: p,
82
+ addLabel: "Add a layer — the first one is drawn on top",
83
+ onAdd: W,
84
+ children: [!I.length && /* @__PURE__ */ S("p", {
85
+ className: "m-0 rounded-md border border-dashed border-gray-300 px-3 py-2.5 text-center text-xs text-zinc-500 dark:border-zinc-700 dark:text-zinc-400",
86
+ children: "No layers. Add one for a gradient or an image."
87
+ }), I.length > 0 && I.map((e, t) => /* @__PURE__ */ S(l, {
88
+ index: t,
89
+ layer: e,
90
+ expanded: R === e.id,
91
+ onExpand: B,
92
+ onChange: U(t),
93
+ onRemove: G(t),
94
+ onReorder: H
95
+ }, e.id))]
128
96
  }),
129
- /* @__PURE__ */ y(i, {
130
- label: "Base Color",
131
- keys: ["background-color"],
132
- children: /* @__PURE__ */ y(r, {
97
+ /* @__PURE__ */ S(r, {
98
+ label: "Color",
99
+ keys: T,
100
+ children: /* @__PURE__ */ S(n, {
133
101
  type: "color",
134
102
  value: A,
135
103
  onChange: K
136
104
  })
137
105
  }),
138
- /* @__PURE__ */ y(d, { children: /* @__PURE__ */ b(i, {
106
+ /* @__PURE__ */ S(d, { children: /* @__PURE__ */ C(r, {
139
107
  label: "",
140
- children: [/* @__PURE__ */ b(r, {
108
+ children: [/* @__PURE__ */ C(n, {
141
109
  keys: ["background-blend-mode"],
142
110
  label: "Blend",
143
111
  value: j,
144
112
  onChange: q,
145
113
  type: "select",
146
114
  children: [
147
- /* @__PURE__ */ y("option", {
115
+ /* @__PURE__ */ S("option", {
148
116
  value: "normal",
149
117
  children: "Normal"
150
118
  }),
151
- /* @__PURE__ */ y("option", {
119
+ /* @__PURE__ */ S("option", {
152
120
  value: "multiply",
153
121
  children: "Multiply"
154
122
  }),
155
- /* @__PURE__ */ y("option", {
123
+ /* @__PURE__ */ S("option", {
156
124
  value: "screen",
157
125
  children: "Screen"
158
126
  }),
159
- /* @__PURE__ */ y("option", {
127
+ /* @__PURE__ */ S("option", {
160
128
  value: "overlay",
161
129
  children: "Overlay"
162
130
  }),
163
- /* @__PURE__ */ y("option", {
131
+ /* @__PURE__ */ S("option", {
164
132
  value: "darken",
165
133
  children: "Darken"
166
134
  }),
167
- /* @__PURE__ */ y("option", {
135
+ /* @__PURE__ */ S("option", {
168
136
  value: "lighten",
169
137
  children: "Lighten"
170
138
  }),
171
- /* @__PURE__ */ y("option", {
139
+ /* @__PURE__ */ S("option", {
172
140
  value: "color-dodge",
173
141
  children: "Color Dodge"
174
142
  }),
175
- /* @__PURE__ */ y("option", {
143
+ /* @__PURE__ */ S("option", {
176
144
  value: "color-burn",
177
145
  children: "Color Burn"
178
146
  }),
179
- /* @__PURE__ */ y("option", {
147
+ /* @__PURE__ */ S("option", {
180
148
  value: "hard-light",
181
149
  children: "Hard Light"
182
150
  }),
183
- /* @__PURE__ */ y("option", {
151
+ /* @__PURE__ */ S("option", {
184
152
  value: "soft-light",
185
153
  children: "Soft Light"
186
154
  }),
187
- /* @__PURE__ */ y("option", {
155
+ /* @__PURE__ */ S("option", {
188
156
  value: "difference",
189
157
  children: "Difference"
190
158
  }),
191
- /* @__PURE__ */ y("option", {
159
+ /* @__PURE__ */ S("option", {
192
160
  value: "exclusion",
193
161
  children: "Exclusion"
194
162
  }),
195
- /* @__PURE__ */ y("option", {
163
+ /* @__PURE__ */ S("option", {
196
164
  value: "hue",
197
165
  children: "Hue"
198
166
  }),
199
- /* @__PURE__ */ y("option", {
167
+ /* @__PURE__ */ S("option", {
200
168
  value: "saturation",
201
169
  children: "Saturation"
202
170
  }),
203
- /* @__PURE__ */ y("option", {
171
+ /* @__PURE__ */ S("option", {
204
172
  value: "color",
205
173
  children: "Color"
206
174
  }),
207
- /* @__PURE__ */ y("option", {
175
+ /* @__PURE__ */ S("option", {
208
176
  value: "luminosity",
209
177
  children: "Luminosity"
210
178
  })
211
179
  ]
212
- }), /* @__PURE__ */ y(r, {
180
+ }), /* @__PURE__ */ S(n, {
213
181
  keys: ["mask-image"],
214
182
  label: "Mask",
215
183
  value: M,
@@ -0,0 +1,8 @@
1
+ import { BackgroundLayer } from '../../helpers/backgroundParser';
2
+ export type BackgroundAttachmentProps = {
3
+ layer: BackgroundLayer;
4
+ onChange?: (layer: BackgroundLayer) => void;
5
+ };
6
+ /** Whether the layer scrolls with the element, with its content, or stays put while the page moves under it. */
7
+ declare const BackgroundAttachment: ({ layer, onChange }: BackgroundAttachmentProps) => import('react').JSX.Element;
8
+ export default BackgroundAttachment;
@@ -0,0 +1,53 @@
1
+ import { asText as e } from "../../../../cssValues.mjs";
2
+ import t from "../../../../components/CategoryOption/index.mjs";
3
+ import n from "../../../../components/CategorySection/index.mjs";
4
+ import { useCallback as r, useMemo as i } from "react";
5
+ import { jsx as a } from "react/jsx-runtime";
6
+ //#region src/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.tsx
7
+ var o = ({ layer: o, onChange: s }) => {
8
+ let c = i(() => [
9
+ {
10
+ value: "scroll",
11
+ icon: /* @__PURE__ */ a("span", {
12
+ className: "px-1.5 text-xs select-none",
13
+ children: "Scroll"
14
+ }),
15
+ description: "Scrolls with the element",
16
+ active: o.attachment === "scroll",
17
+ size: "custom"
18
+ },
19
+ {
20
+ value: "local",
21
+ icon: /* @__PURE__ */ a("span", {
22
+ className: "px-1.5 text-xs select-none",
23
+ children: "Local"
24
+ }),
25
+ description: "Scrolls with the element’s content",
26
+ active: o.attachment === "local",
27
+ size: "custom"
28
+ },
29
+ {
30
+ value: "fixed",
31
+ icon: /* @__PURE__ */ a("span", {
32
+ className: "px-1.5 text-xs select-none",
33
+ children: "Fixed"
34
+ }),
35
+ description: "Stays put while the page scrolls",
36
+ active: o.attachment === "fixed",
37
+ size: "custom"
38
+ }
39
+ ], [o.attachment]), l = r((t) => s?.({
40
+ ...o,
41
+ attachment: e(t)
42
+ }), [o, s]);
43
+ return /* @__PURE__ */ a(n, {
44
+ label: "Attachment",
45
+ children: /* @__PURE__ */ a(t, {
46
+ type: "iconGroup",
47
+ items: c,
48
+ onChange: l
49
+ })
50
+ });
51
+ };
52
+ //#endregion
53
+ export { o as default };
@@ -0,0 +1,3 @@
1
+ import { default as BackgroundAttachment } from './BackgroundAttachment';
2
+ export * from './BackgroundAttachment';
3
+ export default BackgroundAttachment;
@@ -0,0 +1,5 @@
1
+ import e from "./BackgroundAttachment.mjs";
2
+ //#region src/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.ts
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };