@plitzi/sdk-style 0.38.10 → 0.38.12

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