@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
@@ -2,41 +2,18 @@ import e from "../../StyleInspectorContext.mjs";
2
2
  import t from "../../hooks/useInspectorValues.mjs";
3
3
  import n from "../../components/CategoryOption/index.mjs";
4
4
  import r from "../../components/CategorySection/index.mjs";
5
- import i from "../../components/CategoryAdvanced/index.mjs";
6
- import a from "../../components/CategoryContainer/index.mjs";
7
- import o from "./BoxShadow/index.mjs";
8
- import s from "./Filters/Filter.mjs";
9
- import c from "./Transform/index.mjs";
10
- import l from "./Transition/index.mjs";
11
- import { memo as u, use as d, useCallback as f } from "react";
12
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
13
- //#region src/components/StyleInspector/categories/Effects/Effects.tsx
14
- var h = [
15
- "opacity",
16
- "visibility",
17
- "cursor",
18
- "transition",
19
- "box-shadow",
20
- "filter",
21
- "backdrop-filter",
22
- "mix-blend-mode",
23
- "isolation",
24
- "clip-path",
25
- "transform",
26
- "transform-origin",
27
- "perspective",
28
- "will-change"
29
- ], g = [
30
- "transform-origin",
31
- "perspective",
32
- "backdrop-filter",
33
- "mix-blend-mode",
34
- "isolation",
35
- "clip-path",
36
- "will-change"
37
- ], _ = u(({ replaceTokens: u = !1, isCollapsed: _ = !0, onCollapse: v }) => {
38
- let { setValue: y } = d(e), { opacity: b, visibility: x, cursor: S, transition: C, "box-shadow": w, filter: T, "backdrop-filter": E, "mix-blend-mode": D, isolation: O, "clip-path": k, transform: A, "transform-origin": j, perspective: M, "will-change": N } = t({
39
- keys: h,
5
+ import { EFFECTS_KEYS as i } from "../../categoryKeys.mjs";
6
+ import a from "../../components/CategoryAdvanced/index.mjs";
7
+ import o from "../../components/CategoryContainer/index.mjs";
8
+ import s from "./BoxShadow/index.mjs";
9
+ import c from "./Filters/Filter.mjs";
10
+ import l from "./Transform/index.mjs";
11
+ import u from "./Transition/index.mjs";
12
+ import { memo as d, use as f, useCallback as p } from "react";
13
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
14
+ var g = d(({ replaceTokens: d = !1, isCollapsed: g = !0, onCollapse: _ }) => {
15
+ let { setValue: v } = f(e), { opacity: y, visibility: b, cursor: x, transition: S, "box-shadow": C, filter: w, "backdrop-filter": T, "mix-blend-mode": E, isolation: D, "clip-path": O, transform: k, "transform-origin": A, perspective: j, "will-change": M } = t({
16
+ keys: i.dot,
40
17
  asValue: !0,
41
18
  strictMode: !0,
42
19
  defaultValues: {
@@ -55,213 +32,213 @@ var h = [
55
32
  perspective: void 0,
56
33
  "will-change": void 0
57
34
  },
58
- replaceTokens: u
59
- }), P = f((e) => v?.("effects", e), [v]), F = f((e) => (t) => y(e, t), [y]);
60
- return /* @__PURE__ */ p(a, {
61
- title: "Effects",
62
- dotKeys: h,
63
- advancedKeys: g,
64
- isCollapsed: _,
65
- onCollapse: P,
66
- children: /* @__PURE__ */ m("div", {
35
+ replaceTokens: d
36
+ }), N = p((e) => _?.("effects", e), [_]), P = p((e) => (t) => v(e, t), [v]);
37
+ return /* @__PURE__ */ m(o, {
38
+ title: i.title,
39
+ dotKeys: i.dot,
40
+ advancedKeys: i.advanced,
41
+ isCollapsed: g,
42
+ onCollapse: N,
43
+ children: /* @__PURE__ */ h("div", {
67
44
  className: "flex flex-col gap-2",
68
45
  children: [
69
- /* @__PURE__ */ m(r, {
46
+ /* @__PURE__ */ h(r, {
70
47
  label: "",
71
- children: [/* @__PURE__ */ p(n, {
48
+ children: [/* @__PURE__ */ m(n, {
72
49
  keys: ["opacity"],
73
50
  label: "Opacity",
74
- value: b,
75
- onChange: F("opacity"),
51
+ value: y,
52
+ onChange: P("opacity"),
76
53
  type: "metric"
77
- }), /* @__PURE__ */ m(n, {
54
+ }), /* @__PURE__ */ h(n, {
78
55
  keys: ["visibility"],
79
56
  label: "Visibility",
80
- value: x,
81
- onChange: F("visibility"),
57
+ value: b,
58
+ onChange: P("visibility"),
82
59
  type: "select",
83
60
  children: [
84
- /* @__PURE__ */ p("option", {
61
+ /* @__PURE__ */ m("option", {
85
62
  value: "visible",
86
63
  children: "Visible"
87
64
  }),
88
- /* @__PURE__ */ p("option", {
65
+ /* @__PURE__ */ m("option", {
89
66
  value: "hidden",
90
67
  children: "Hidden"
91
68
  }),
92
- /* @__PURE__ */ p("option", {
69
+ /* @__PURE__ */ m("option", {
93
70
  value: "collapse",
94
71
  children: "Collapse"
95
72
  })
96
73
  ]
97
74
  })]
98
75
  }),
99
- /* @__PURE__ */ p(r, {
76
+ /* @__PURE__ */ m(r, {
100
77
  label: "Cursor",
101
78
  keys: ["cursor"],
102
- children: /* @__PURE__ */ m(n, {
103
- value: S,
104
- onChange: F("cursor"),
79
+ children: /* @__PURE__ */ h(n, {
80
+ value: x,
81
+ onChange: P("cursor"),
105
82
  type: "select",
106
83
  children: [
107
- /* @__PURE__ */ m("optgroup", {
84
+ /* @__PURE__ */ h("optgroup", {
108
85
  label: "General",
109
86
  children: [
110
- /* @__PURE__ */ p("option", {
87
+ /* @__PURE__ */ m("option", {
111
88
  value: "auto",
112
89
  children: "Auto"
113
90
  }),
114
- /* @__PURE__ */ p("option", {
91
+ /* @__PURE__ */ m("option", {
115
92
  value: "default",
116
93
  children: "Default"
117
94
  }),
118
- /* @__PURE__ */ p("option", {
95
+ /* @__PURE__ */ m("option", {
119
96
  value: "none",
120
97
  children: "None"
121
98
  })
122
99
  ]
123
100
  }),
124
- /* @__PURE__ */ m("optgroup", {
101
+ /* @__PURE__ */ h("optgroup", {
125
102
  label: "Links & Status",
126
103
  children: [
127
- /* @__PURE__ */ p("option", {
104
+ /* @__PURE__ */ m("option", {
128
105
  value: "pointer",
129
106
  children: "Pointer"
130
107
  }),
131
- /* @__PURE__ */ p("option", {
108
+ /* @__PURE__ */ m("option", {
132
109
  value: "not-allowed",
133
110
  children: "Not Allowed"
134
111
  }),
135
- /* @__PURE__ */ p("option", {
112
+ /* @__PURE__ */ m("option", {
136
113
  value: "wait",
137
114
  children: "Wait"
138
115
  }),
139
- /* @__PURE__ */ p("option", {
116
+ /* @__PURE__ */ m("option", {
140
117
  value: "progress",
141
118
  children: "Progress"
142
119
  }),
143
- /* @__PURE__ */ p("option", {
120
+ /* @__PURE__ */ m("option", {
144
121
  value: "help",
145
122
  children: "Help"
146
123
  }),
147
- /* @__PURE__ */ p("option", {
124
+ /* @__PURE__ */ m("option", {
148
125
  value: "context-menu",
149
126
  children: "Context Menu"
150
127
  })
151
128
  ]
152
129
  }),
153
- /* @__PURE__ */ m("optgroup", {
130
+ /* @__PURE__ */ h("optgroup", {
154
131
  label: "Selection",
155
132
  children: [
156
- /* @__PURE__ */ p("option", {
133
+ /* @__PURE__ */ m("option", {
157
134
  value: "cell",
158
135
  children: "Cell"
159
136
  }),
160
- /* @__PURE__ */ p("option", {
137
+ /* @__PURE__ */ m("option", {
161
138
  value: "crosshair",
162
139
  children: "Crosshair"
163
140
  }),
164
- /* @__PURE__ */ p("option", {
141
+ /* @__PURE__ */ m("option", {
165
142
  value: "text",
166
143
  children: "Text"
167
144
  }),
168
- /* @__PURE__ */ p("option", {
145
+ /* @__PURE__ */ m("option", {
169
146
  value: "vertical-text",
170
147
  children: "Vertical Text"
171
148
  })
172
149
  ]
173
150
  }),
174
- /* @__PURE__ */ m("optgroup", {
151
+ /* @__PURE__ */ h("optgroup", {
175
152
  label: "Drag & Drop",
176
153
  children: [
177
- /* @__PURE__ */ p("option", {
154
+ /* @__PURE__ */ m("option", {
178
155
  value: "grab",
179
156
  children: "Grab"
180
157
  }),
181
- /* @__PURE__ */ p("option", {
158
+ /* @__PURE__ */ m("option", {
182
159
  value: "grabbing",
183
160
  children: "Grabbing"
184
161
  }),
185
- /* @__PURE__ */ p("option", {
162
+ /* @__PURE__ */ m("option", {
186
163
  value: "alias",
187
164
  children: "Alias"
188
165
  }),
189
- /* @__PURE__ */ p("option", {
166
+ /* @__PURE__ */ m("option", {
190
167
  value: "copy",
191
168
  children: "Copy"
192
169
  }),
193
- /* @__PURE__ */ p("option", {
170
+ /* @__PURE__ */ m("option", {
194
171
  value: "move",
195
172
  children: "Move"
196
173
  })
197
174
  ]
198
175
  }),
199
- /* @__PURE__ */ m("optgroup", {
176
+ /* @__PURE__ */ h("optgroup", {
200
177
  label: "Zoom",
201
- children: [/* @__PURE__ */ p("option", {
178
+ children: [/* @__PURE__ */ m("option", {
202
179
  value: "zoom-in",
203
180
  children: "Zoom In"
204
- }), /* @__PURE__ */ p("option", {
181
+ }), /* @__PURE__ */ m("option", {
205
182
  value: "zoom-out",
206
183
  children: "Zoom Out"
207
184
  })]
208
185
  }),
209
- /* @__PURE__ */ m("optgroup", {
186
+ /* @__PURE__ */ h("optgroup", {
210
187
  label: "Resize",
211
188
  children: [
212
- /* @__PURE__ */ p("option", {
189
+ /* @__PURE__ */ m("option", {
213
190
  value: "col-resize",
214
191
  children: "Col Resize"
215
192
  }),
216
- /* @__PURE__ */ p("option", {
193
+ /* @__PURE__ */ m("option", {
217
194
  value: "row-resize",
218
195
  children: "Row Resize"
219
196
  }),
220
- /* @__PURE__ */ p("option", {
197
+ /* @__PURE__ */ m("option", {
221
198
  value: "nesw-resize",
222
199
  children: "NESW Resize"
223
200
  }),
224
- /* @__PURE__ */ p("option", {
201
+ /* @__PURE__ */ m("option", {
225
202
  value: "nwse-resize",
226
203
  children: "NWSE Resize"
227
204
  }),
228
- /* @__PURE__ */ p("option", {
205
+ /* @__PURE__ */ m("option", {
229
206
  value: "ew-resize",
230
207
  children: "EW Resize"
231
208
  }),
232
- /* @__PURE__ */ p("option", {
209
+ /* @__PURE__ */ m("option", {
233
210
  value: "ns-resize",
234
211
  children: "NS Resize"
235
212
  }),
236
- /* @__PURE__ */ p("option", {
213
+ /* @__PURE__ */ m("option", {
237
214
  value: "n-resize",
238
215
  children: "N Resize"
239
216
  }),
240
- /* @__PURE__ */ p("option", {
217
+ /* @__PURE__ */ m("option", {
241
218
  value: "w-resize",
242
219
  children: "W Resize"
243
220
  }),
244
- /* @__PURE__ */ p("option", {
221
+ /* @__PURE__ */ m("option", {
245
222
  value: "s-resize",
246
223
  children: "S Resize"
247
224
  }),
248
- /* @__PURE__ */ p("option", {
225
+ /* @__PURE__ */ m("option", {
249
226
  value: "e-resize",
250
227
  children: "E Resize"
251
228
  }),
252
- /* @__PURE__ */ p("option", {
229
+ /* @__PURE__ */ m("option", {
253
230
  value: "nw-resize",
254
231
  children: "NW Resize"
255
232
  }),
256
- /* @__PURE__ */ p("option", {
233
+ /* @__PURE__ */ m("option", {
257
234
  value: "ne-resize",
258
235
  children: "NE Resize"
259
236
  }),
260
- /* @__PURE__ */ p("option", {
237
+ /* @__PURE__ */ m("option", {
261
238
  value: "sw-resize",
262
239
  children: "SW Resize"
263
240
  }),
264
- /* @__PURE__ */ p("option", {
241
+ /* @__PURE__ */ m("option", {
265
242
  value: "se-resize",
266
243
  children: "SE Resize"
267
244
  })
@@ -270,145 +247,145 @@ var h = [
270
247
  ]
271
248
  })
272
249
  }),
273
- /* @__PURE__ */ p(o, {
274
- onChange: F("box-shadow"),
275
- value: w
250
+ /* @__PURE__ */ m(s, {
251
+ onChange: P("box-shadow"),
252
+ value: C
276
253
  }),
277
- /* @__PURE__ */ p(c, {
278
- onChange: F("transform"),
279
- value: A
254
+ /* @__PURE__ */ m(l, {
255
+ onChange: P("transform"),
256
+ value: k
280
257
  }),
281
- /* @__PURE__ */ p(i, { children: /* @__PURE__ */ m(r, {
258
+ /* @__PURE__ */ m(a, { children: /* @__PURE__ */ h(r, {
282
259
  label: "",
283
- children: [/* @__PURE__ */ p(n, {
260
+ children: [/* @__PURE__ */ m(n, {
284
261
  keys: ["transform-origin"],
285
262
  label: "Origin",
286
- value: j,
287
- onChange: F("transform-origin")
288
- }), /* @__PURE__ */ p(n, {
263
+ value: A,
264
+ onChange: P("transform-origin")
265
+ }), /* @__PURE__ */ m(n, {
289
266
  keys: ["perspective"],
290
267
  label: "Perspective",
291
- value: M,
292
- onChange: F("perspective"),
268
+ value: j,
269
+ onChange: P("perspective"),
293
270
  type: "metric"
294
271
  })]
295
272
  }) }),
296
- /* @__PURE__ */ p(l, {
297
- onChange: F("transition"),
298
- value: C
273
+ /* @__PURE__ */ m(u, {
274
+ onChange: P("transition"),
275
+ value: S
299
276
  }),
300
- /* @__PURE__ */ p(s, {
301
- onChange: F("filter"),
302
- value: T
277
+ /* @__PURE__ */ m(c, {
278
+ onChange: P("filter"),
279
+ value: w
303
280
  }),
304
- /* @__PURE__ */ m(i, { children: [
305
- /* @__PURE__ */ p(s, {
281
+ /* @__PURE__ */ h(a, { children: [
282
+ /* @__PURE__ */ m(c, {
306
283
  styleKey: "backdrop-filter",
307
284
  label: "Backdrop Filters",
308
- onChange: F("backdrop-filter"),
309
- value: E
285
+ onChange: P("backdrop-filter"),
286
+ value: T
310
287
  }),
311
- /* @__PURE__ */ m(r, {
288
+ /* @__PURE__ */ h(r, {
312
289
  label: "",
313
- children: [/* @__PURE__ */ m(n, {
290
+ children: [/* @__PURE__ */ h(n, {
314
291
  keys: ["mix-blend-mode"],
315
292
  label: "Blend",
316
- value: D,
317
- onChange: F("mix-blend-mode"),
293
+ value: E,
294
+ onChange: P("mix-blend-mode"),
318
295
  type: "select",
319
296
  children: [
320
- /* @__PURE__ */ p("option", {
297
+ /* @__PURE__ */ m("option", {
321
298
  value: "normal",
322
299
  children: "Normal"
323
300
  }),
324
- /* @__PURE__ */ p("option", {
301
+ /* @__PURE__ */ m("option", {
325
302
  value: "multiply",
326
303
  children: "Multiply"
327
304
  }),
328
- /* @__PURE__ */ p("option", {
305
+ /* @__PURE__ */ m("option", {
329
306
  value: "screen",
330
307
  children: "Screen"
331
308
  }),
332
- /* @__PURE__ */ p("option", {
309
+ /* @__PURE__ */ m("option", {
333
310
  value: "overlay",
334
311
  children: "Overlay"
335
312
  }),
336
- /* @__PURE__ */ p("option", {
313
+ /* @__PURE__ */ m("option", {
337
314
  value: "darken",
338
315
  children: "Darken"
339
316
  }),
340
- /* @__PURE__ */ p("option", {
317
+ /* @__PURE__ */ m("option", {
341
318
  value: "lighten",
342
319
  children: "Lighten"
343
320
  }),
344
- /* @__PURE__ */ p("option", {
321
+ /* @__PURE__ */ m("option", {
345
322
  value: "color-dodge",
346
323
  children: "Color Dodge"
347
324
  }),
348
- /* @__PURE__ */ p("option", {
325
+ /* @__PURE__ */ m("option", {
349
326
  value: "color-burn",
350
327
  children: "Color Burn"
351
328
  }),
352
- /* @__PURE__ */ p("option", {
329
+ /* @__PURE__ */ m("option", {
353
330
  value: "hard-light",
354
331
  children: "Hard Light"
355
332
  }),
356
- /* @__PURE__ */ p("option", {
333
+ /* @__PURE__ */ m("option", {
357
334
  value: "soft-light",
358
335
  children: "Soft Light"
359
336
  }),
360
- /* @__PURE__ */ p("option", {
337
+ /* @__PURE__ */ m("option", {
361
338
  value: "difference",
362
339
  children: "Difference"
363
340
  }),
364
- /* @__PURE__ */ p("option", {
341
+ /* @__PURE__ */ m("option", {
365
342
  value: "exclusion",
366
343
  children: "Exclusion"
367
344
  }),
368
- /* @__PURE__ */ p("option", {
345
+ /* @__PURE__ */ m("option", {
369
346
  value: "hue",
370
347
  children: "Hue"
371
348
  }),
372
- /* @__PURE__ */ p("option", {
349
+ /* @__PURE__ */ m("option", {
373
350
  value: "saturation",
374
351
  children: "Saturation"
375
352
  }),
376
- /* @__PURE__ */ p("option", {
353
+ /* @__PURE__ */ m("option", {
377
354
  value: "color",
378
355
  children: "Color"
379
356
  }),
380
- /* @__PURE__ */ p("option", {
357
+ /* @__PURE__ */ m("option", {
381
358
  value: "luminosity",
382
359
  children: "Luminosity"
383
360
  })
384
361
  ]
385
- }), /* @__PURE__ */ m(n, {
362
+ }), /* @__PURE__ */ h(n, {
386
363
  keys: ["isolation"],
387
364
  label: "Isolation",
388
- value: O,
389
- onChange: F("isolation"),
365
+ value: D,
366
+ onChange: P("isolation"),
390
367
  type: "select",
391
- children: [/* @__PURE__ */ p("option", {
368
+ children: [/* @__PURE__ */ m("option", {
392
369
  value: "auto",
393
370
  children: "Auto"
394
- }), /* @__PURE__ */ p("option", {
371
+ }), /* @__PURE__ */ m("option", {
395
372
  value: "isolate",
396
373
  children: "Isolate"
397
374
  })]
398
375
  })]
399
376
  }),
400
- /* @__PURE__ */ m(r, {
377
+ /* @__PURE__ */ h(r, {
401
378
  label: "",
402
- children: [/* @__PURE__ */ p(n, {
379
+ children: [/* @__PURE__ */ m(n, {
403
380
  keys: ["clip-path"],
404
381
  label: "Clip Path",
405
- value: k,
406
- onChange: F("clip-path")
407
- }), /* @__PURE__ */ p(n, {
382
+ value: O,
383
+ onChange: P("clip-path")
384
+ }), /* @__PURE__ */ m(n, {
408
385
  keys: ["will-change"],
409
386
  label: "Will Change",
410
- value: N,
411
- onChange: F("will-change")
387
+ value: M,
388
+ onChange: P("will-change")
412
389
  })]
413
390
  })
414
391
  ] })
@@ -417,4 +394,4 @@ var h = [
417
394
  });
418
395
  });
419
396
  //#endregion
420
- export { _ as default };
397
+ export { g as default };
@@ -1,37 +1,29 @@
1
- import e from "../../../components/InspectorLabel/index.mjs";
2
- import t from "./FilterItem.mjs";
3
- import { useCallback as n } from "react";
4
- import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
5
- import o from "@plitzi/plitzi-ui/Icon";
1
+ import { splitBySpaceOutsideParens as e } from "../../../cssValues.mjs";
2
+ import t from "../../../components/ValueList/index.mjs";
3
+ import { FILTER_SPECS as n, serializeFilter as r } from "./helpers.mjs";
4
+ import i from "./FilterItem.mjs";
5
+ import { useCallback as a } from "react";
6
+ import { jsx as o } from "react/jsx-runtime";
6
7
  //#region src/components/StyleInspector/categories/Effects/Filters/Filter.tsx
7
8
  var s = ({ styleKey: s = "filter", label: c = "Filters", value: l, onChange: u }) => {
8
- let d = [];
9
- l && l !== "" && (d = l.split(" "));
10
- let f = (e) => (t) => {
11
- t.stopPropagation(), t.preventDefault(), d.splice(e, 1), d.length > 0 ? u?.(d.join(" ")) : u?.("");
12
- }, p = (e) => (t) => {
13
- t !== d[e] && (d[e] = t, u?.(d.join(" ")));
14
- }, m = n(() => {
15
- l ? u?.(`${l} blur(5px)`) : u?.("blur(5px)");
16
- }, [l, u]);
17
- return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("div", {
18
- className: "flex w-full justify-between",
19
- children: [/* @__PURE__ */ i(e, {
20
- keyValue: [s],
21
- children: c
22
- }), /* @__PURE__ */ i(o, {
23
- className: "cursor-pointer",
24
- icon: "fas fa-plus",
25
- onClick: m
26
- })]
27
- }), d.length > 0 && /* @__PURE__ */ i("div", {
28
- className: "flex flex-col gap-2",
29
- children: d.map((e, n) => /* @__PURE__ */ i(t, {
9
+ let d = typeof l == "string" && l !== "" ? e(l) : [], f = s === "backdrop-filter" ? "Backdrop filter" : "Filter", p = a((e) => u?.(e.length > 0 ? e.join(" ") : ""), [u]), m = (e) => () => p(d.filter((t, n) => n !== e)), h = (e) => (t) => {
10
+ t !== d[e] && p(d.map((n, r) => r === e ? t : n));
11
+ };
12
+ return /* @__PURE__ */ o(t, {
13
+ label: c,
14
+ keys: [s],
15
+ addLabel: `Add ${f.toLowerCase()}`,
16
+ onAdd: () => p([...d, r({
17
+ name: "blur",
18
+ amount: n.blur.default
19
+ })]),
20
+ children: d.length > 0 && d.map((e, t) => /* @__PURE__ */ o(i, {
30
21
  value: e,
31
- onChange: p(n),
32
- onRemove: f(n)
33
- }, n))
34
- })] });
22
+ title: f,
23
+ onChange: h(t),
24
+ onRemove: m(t)
25
+ }, t))
26
+ });
35
27
  };
36
28
  //#endregion
37
29
  export { s as default };
@@ -1,8 +1,12 @@
1
- import { MouseEvent } from 'react';
2
1
  export type FilterItemProps = {
3
- value?: string;
4
- onChange?: (value: string) => void;
5
- onRemove?: (e: MouseEvent) => void;
2
+ value: string;
3
+ title: string;
4
+ onChange: (value: string) => void;
5
+ onRemove: () => void;
6
6
  };
7
- declare const FilterItem: ({ value, onRemove, onChange }: FilterItemProps) => import('react').JSX.Element;
7
+ /**
8
+ * One function of a filter list. The ones without a control here — `drop-shadow(…)`, `url(#…)`, a token — are edited
9
+ * as the text they are.
10
+ */
11
+ declare const FilterItem: ({ value, title, onRemove, onChange }: FilterItemProps) => import('react').JSX.Element;
8
12
  export default FilterItem;