@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
@@ -2,124 +2,116 @@ 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 "./PositionAdvanced.mjs";
8
- import s from "./PositionAdvancedButtons.mjs";
9
- import c from "./PositionClear.mjs";
10
- import l from "./PositionFloat.mjs";
11
- import { memo as u, use as d, useCallback as f, useMemo as p } from "react";
12
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
13
- import g from "@plitzi/plitzi-ui/icons/XMark";
14
- import _ from "@plitzi/plitzi-ui/icons/ListNumbers";
15
- import v from "@plitzi/plitzi-ui/icons/PositionAbsolute";
16
- import y from "@plitzi/plitzi-ui/icons/PositionFixed";
17
- import b from "@plitzi/plitzi-ui/icons/PositionRelative";
5
+ import { POSITION_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 "./PositionAdvanced.mjs";
9
+ import c from "./PositionAdvancedButtons.mjs";
10
+ import l from "./PositionClear.mjs";
11
+ import u from "./PositionFloat.mjs";
12
+ import { memo as d, use as f, useCallback as p, useMemo as m } from "react";
13
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
14
+ import _ from "@plitzi/plitzi-ui/icons/XMark";
15
+ import v from "@plitzi/plitzi-ui/icons/ListNumbers";
16
+ import y from "@plitzi/plitzi-ui/icons/PositionAbsolute";
17
+ import b from "@plitzi/plitzi-ui/icons/PositionFixed";
18
+ import x from "@plitzi/plitzi-ui/icons/PositionRelative";
18
19
  //#region src/components/StyleInspector/categories/Position/Position.tsx
19
- var x = [
20
+ var S = [
20
21
  "position",
21
22
  "top",
22
23
  "bottom",
23
- "z-index",
24
- "float",
25
- "clear",
26
24
  "left",
27
25
  "right"
28
- ], S = [
29
- "position",
30
- "top",
31
- "bottom",
32
- "left",
33
- "right"
34
- ], C = ["float", "clear"], w = u(({ replaceTokens: u = !1, isCollapsed: w = !0, onCollapse: T }) => {
35
- let { setValue: E } = d(e), { position: D, top: O, bottom: k, left: A, right: j, float: M, clear: N, "z-index": P } = t({
36
- keys: x,
26
+ ], C = d(({ replaceTokens: d = !1, isCollapsed: C = !0, onCollapse: w }) => {
27
+ let { setValue: T } = f(e), { position: E, top: D, bottom: O, left: k, right: A, float: j, clear: M, "z-index": N } = t({
28
+ keys: i.dot,
37
29
  asValue: !0,
38
- replaceTokens: u
39
- }), F = p(() => ({
40
- top: O,
41
- bottom: k,
42
- left: A,
43
- right: j
30
+ replaceTokens: d
31
+ }), P = m(() => ({
32
+ top: D,
33
+ bottom: O,
34
+ left: k,
35
+ right: A
44
36
  }), [
37
+ D,
45
38
  O,
46
39
  k,
47
- A,
48
- j
49
- ]), I = f((e) => T?.("position", e), [T]), L = f((e) => (t) => {
50
- E(e === "position-path" ? void 0 : e, t);
51
- }, [E]), R = p(() => [
40
+ A
41
+ ]), F = p((e) => w?.("position", e), [w]), I = p((e) => (t) => {
42
+ T(e === "position-path" ? void 0 : e, t);
43
+ }, [T]), L = m(() => [
52
44
  {
53
45
  value: "static",
54
- icon: /* @__PURE__ */ m(g, {}),
46
+ icon: /* @__PURE__ */ h(_, {}),
55
47
  description: "Static",
56
- active: D === "static"
48
+ active: E === "static"
57
49
  },
58
50
  {
59
51
  value: "relative",
60
- icon: /* @__PURE__ */ m(b, {}),
52
+ icon: /* @__PURE__ */ h(x, {}),
61
53
  description: "Relative",
62
- active: D === "relative"
54
+ active: E === "relative"
63
55
  },
64
56
  {
65
57
  value: "absolute",
66
- icon: /* @__PURE__ */ m(v, {}),
58
+ icon: /* @__PURE__ */ h(y, {}),
67
59
  description: "Absolute",
68
- active: D === "absolute"
60
+ active: E === "absolute"
69
61
  },
70
62
  {
71
63
  value: "fixed",
72
- icon: /* @__PURE__ */ m(y, {}),
64
+ icon: /* @__PURE__ */ h(b, {}),
73
65
  description: "Fixed",
74
- active: D === "fixed"
66
+ active: E === "fixed"
75
67
  },
76
68
  {
77
69
  value: "sticky",
78
- icon: /* @__PURE__ */ m(_, {}),
70
+ icon: /* @__PURE__ */ h(v, {}),
79
71
  description: "Sticky",
80
- active: D === "sticky"
72
+ active: E === "sticky"
81
73
  }
82
- ], [D]);
83
- return /* @__PURE__ */ m(a, {
84
- title: "Position",
85
- dotKeys: x,
86
- advancedKeys: C,
87
- isCollapsed: w,
88
- onCollapse: I,
89
- children: /* @__PURE__ */ h("div", {
74
+ ], [E]);
75
+ return /* @__PURE__ */ h(o, {
76
+ title: i.title,
77
+ dotKeys: i.dot,
78
+ advancedKeys: i.advanced,
79
+ isCollapsed: C,
80
+ onCollapse: F,
81
+ children: /* @__PURE__ */ g("div", {
90
82
  className: "flex flex-col gap-2",
91
83
  children: [
92
- /* @__PURE__ */ m(r, {
84
+ /* @__PURE__ */ h(r, {
93
85
  keys: S,
94
86
  label: "Position",
95
- children: /* @__PURE__ */ m(n, {
96
- onChange: L("position"),
87
+ children: /* @__PURE__ */ h(n, {
88
+ onChange: I("position"),
97
89
  type: "iconGroup",
98
- items: R
90
+ items: L
99
91
  })
100
92
  }),
101
- (D === "fixed" || D === "absolute") && /* @__PURE__ */ m(s, {
102
- value: F,
103
- onChange: L("position-path")
93
+ (E === "fixed" || E === "absolute") && /* @__PURE__ */ h(c, {
94
+ value: P,
95
+ onChange: I("position-path")
104
96
  }),
105
- /* @__PURE__ */ m(o, {
106
- value: F,
107
- onChange: L
97
+ /* @__PURE__ */ h(s, {
98
+ value: P,
99
+ onChange: I
108
100
  }),
109
- /* @__PURE__ */ h(i, { children: [/* @__PURE__ */ m(l, {
101
+ /* @__PURE__ */ g(a, { children: [/* @__PURE__ */ h(u, {
102
+ value: j,
103
+ onChange: I("float")
104
+ }), /* @__PURE__ */ h(l, {
110
105
  value: M,
111
- onChange: L("float")
112
- }), /* @__PURE__ */ m(c, {
113
- value: N,
114
- onChange: L("clear")
106
+ onChange: I("clear")
115
107
  })] }),
116
- /* @__PURE__ */ m(r, {
108
+ /* @__PURE__ */ h(r, {
117
109
  keys: ["z-index"],
118
110
  label: "Z-Index",
119
- children: /* @__PURE__ */ m(n, {
120
- onChange: L("z-index"),
111
+ children: /* @__PURE__ */ h(n, {
112
+ onChange: I("z-index"),
121
113
  type: "input",
122
- value: P
114
+ value: N
123
115
  })
124
116
  })
125
117
  ]
@@ -127,4 +119,4 @@ var x = [
127
119
  });
128
120
  });
129
121
  //#endregion
130
- export { w as default };
122
+ export { C as default };
@@ -1,27 +1,28 @@
1
1
  import { processSelectors as e } from "../../../../helpers/processSelector.mjs";
2
- import t from "../../components/CategoryContainer/index.mjs";
3
- import { useCallback as n, useMemo as r } from "react";
4
- import { jsx as i } from "react/jsx-runtime";
5
- import a from "@plitzi/plitzi-ui/CodeMirror";
6
- import o from "@plitzi/sdk-shared/theme/useTheme";
7
- import s from "clsx";
2
+ import { RAW_STYLE_KEYS as t } from "../../categoryKeys.mjs";
3
+ import n from "../../components/CategoryContainer/index.mjs";
4
+ import { useCallback as r, useMemo as i } from "react";
5
+ import { jsx as a } from "react/jsx-runtime";
6
+ import o from "@plitzi/plitzi-ui/CodeMirror";
7
+ import s from "@plitzi/sdk-shared/theme/useTheme";
8
+ import c from "clsx";
8
9
  //#region src/components/StyleInspector/categories/RawStyle/RawStyle.tsx
9
- var c = ({ selectors: c, isCollapsed: l, onCollapse: u }) => {
10
- let { resolvedTheme: d } = o(), f = r(() => e(c ?? [], !1).join("\n\n"), [c]), p = n((e) => u?.("rawStyle", e), [u]);
11
- return /* @__PURE__ */ i(t, {
12
- className: l ? "" : "grow",
13
- classNameContent: s("p-0", { grow: !l }),
14
- title: "Raw Style",
15
- isCollapsed: l,
16
- onCollapse: p,
17
- children: /* @__PURE__ */ i(a, {
18
- value: f,
10
+ var l = ({ selectors: l, isCollapsed: u, onCollapse: d }) => {
11
+ let { resolvedTheme: f } = s(), p = i(() => e(l ?? [], !1).join("\n\n"), [l]), m = r((e) => d?.("rawStyle", e), [d]);
12
+ return /* @__PURE__ */ a(n, {
13
+ className: u ? "" : "grow",
14
+ classNameContent: c("p-0", { grow: !u }),
15
+ title: t.title,
16
+ isCollapsed: u,
17
+ onCollapse: m,
18
+ children: /* @__PURE__ */ a(o, {
19
+ value: p,
19
20
  className: "h-full",
20
- theme: d,
21
+ theme: f,
21
22
  lineWrapping: !0,
22
23
  readOnly: !0
23
24
  })
24
25
  });
25
26
  };
26
27
  //#endregion
27
- export { c as default };
28
+ export { l as default };
@@ -1,113 +1,93 @@
1
- import e from "../../StyleInspectorContext.mjs";
2
- import t from "../../hooks/useInspectorValues.mjs";
3
- import n from "../../components/CategoryOption/index.mjs";
4
- import r from "../../components/CategorySection/index.mjs";
1
+ import e from "../../hooks/useInspectorValues.mjs";
2
+ import t from "../../components/CategoryOption/index.mjs";
3
+ import n from "../../components/CategorySection/index.mjs";
4
+ import { SIZE_KEYS as r } from "../../categoryKeys.mjs";
5
5
  import i from "../../components/CategoryAdvanced/index.mjs";
6
6
  import a from "../../components/CategoryContainer/index.mjs";
7
- import o from "./SizeContainer.mjs";
8
- import s from "./SizeFit.mjs";
9
- import c from "./SizeOverflow.mjs";
10
- import l from "./SizePosition.mjs";
11
- import { memo as u, use as d, useCallback as f } from "react";
7
+ import o from "../../hooks/usePropertyChange.mjs";
8
+ import s from "./SizeContainer.mjs";
9
+ import c from "./SizeFit.mjs";
10
+ import l from "./SizeOverflow.mjs";
11
+ import u from "./SizePosition.mjs";
12
+ import { memo as d, useCallback as f } from "react";
12
13
  import { jsx as p, jsxs as m } from "react/jsx-runtime";
13
14
  //#region src/components/StyleInspector/categories/Size/Size.tsx
14
- var h = [
15
- "width",
16
- "height",
17
- "min-width",
18
- "min-height",
19
- "max-width",
20
- "max-height",
21
- "aspect-ratio",
22
- "box-sizing",
23
- "overflow",
24
- "object-fit",
25
- "object-position",
26
- "container-type",
27
- "container-name"
28
- ], g = [
29
- "aspect-ratio",
30
- "box-sizing",
31
- "object-position",
32
- "object-fit",
33
- "container-type",
34
- "container-name"
35
- ], _ = ["width", "height"], v = ["min-width", "min-height"], y = ["max-width", "max-height"], b = u(({ replaceTokens: u = !1, isCollapsed: b = !0, onCollapse: x }) => {
36
- let { setValue: S } = d(e), { width: C, height: w, "min-width": T, "min-height": E, "max-width": D, "max-height": O, "aspect-ratio": k, "box-sizing": A, overflow: j, "object-position": M, "object-fit": N, "container-type": P, "container-name": F } = t({
37
- keys: h,
15
+ var h = ["width", "height"], g = ["min-width", "min-height"], _ = ["max-width", "max-height"], v = d(({ replaceTokens: d = !1, isCollapsed: v = !0, onCollapse: y }) => {
16
+ let { width: b, height: x, "min-width": S, "min-height": C, "max-width": w, "max-height": T, "aspect-ratio": E, "box-sizing": D, overflow: O, "object-position": k, "object-fit": A, "container-type": j, "container-name": M } = e({
17
+ keys: r.dot,
38
18
  asValue: !0,
39
- replaceTokens: u
40
- }), I = f((e) => x?.("size", e), [x]), L = f((e) => (t) => S(e, t), [S]);
19
+ replaceTokens: d
20
+ }), N = f((e) => y?.("size", e), [y]), P = o();
41
21
  return /* @__PURE__ */ m(a, {
42
- title: "Size",
43
- dotKeys: h,
44
- advancedKeys: g,
45
- isCollapsed: b,
46
- onCollapse: I,
22
+ title: r.title,
23
+ dotKeys: r.dot,
24
+ advancedKeys: r.advanced,
25
+ isCollapsed: v,
26
+ onCollapse: N,
47
27
  children: [
48
- /* @__PURE__ */ m(r, {
28
+ /* @__PURE__ */ m(n, {
49
29
  label: "Size",
50
- keys: _,
51
- children: [/* @__PURE__ */ p(n, {
30
+ keys: h,
31
+ children: [/* @__PURE__ */ p(t, {
52
32
  keys: ["width"],
53
33
  preffix: "W",
54
- value: C,
55
- onChange: L("width"),
34
+ value: b,
35
+ onChange: P("width"),
56
36
  type: "metric"
57
- }), /* @__PURE__ */ p(n, {
37
+ }), /* @__PURE__ */ p(t, {
58
38
  keys: ["height"],
59
39
  preffix: "H",
60
- value: w,
61
- onChange: L("height"),
40
+ value: x,
41
+ onChange: P("height"),
62
42
  type: "metric"
63
43
  })]
64
44
  }),
65
- /* @__PURE__ */ m(r, {
45
+ /* @__PURE__ */ m(n, {
66
46
  label: "Min Size",
67
- keys: v,
68
- children: [/* @__PURE__ */ p(n, {
47
+ keys: g,
48
+ children: [/* @__PURE__ */ p(t, {
69
49
  keys: ["min-width"],
70
50
  preffix: "W",
71
- value: T,
72
- onChange: L("min-width"),
51
+ value: S,
52
+ onChange: P("min-width"),
73
53
  type: "metric"
74
- }), /* @__PURE__ */ p(n, {
54
+ }), /* @__PURE__ */ p(t, {
75
55
  keys: ["min-height"],
76
56
  preffix: "H",
77
- value: E,
78
- onChange: L("min-height"),
57
+ value: C,
58
+ onChange: P("min-height"),
79
59
  type: "metric"
80
60
  })]
81
61
  }),
82
- /* @__PURE__ */ m(r, {
62
+ /* @__PURE__ */ m(n, {
83
63
  label: "Max Size",
84
- keys: y,
85
- children: [/* @__PURE__ */ p(n, {
64
+ keys: _,
65
+ children: [/* @__PURE__ */ p(t, {
86
66
  keys: ["max-width"],
87
67
  preffix: "W",
88
- value: D,
89
- onChange: L("max-width"),
68
+ value: w,
69
+ onChange: P("max-width"),
90
70
  type: "metric"
91
- }), /* @__PURE__ */ p(n, {
71
+ }), /* @__PURE__ */ p(t, {
92
72
  keys: ["max-height"],
93
73
  preffix: "H",
94
- value: O,
95
- onChange: L("max-height"),
74
+ value: T,
75
+ onChange: P("max-height"),
96
76
  type: "metric"
97
77
  })]
98
78
  }),
99
- /* @__PURE__ */ p(i, { children: /* @__PURE__ */ m(r, {
79
+ /* @__PURE__ */ p(i, { children: /* @__PURE__ */ m(n, {
100
80
  label: "",
101
- children: [/* @__PURE__ */ p(n, {
81
+ children: [/* @__PURE__ */ p(t, {
102
82
  keys: ["aspect-ratio"],
103
83
  label: "Ratio",
104
- value: k,
105
- onChange: L("aspect-ratio")
106
- }), /* @__PURE__ */ m(n, {
84
+ value: E,
85
+ onChange: P("aspect-ratio")
86
+ }), /* @__PURE__ */ m(t, {
107
87
  keys: ["box-sizing"],
108
88
  label: "Box Sizing",
109
- value: A,
110
- onChange: L("box-sizing"),
89
+ value: D,
90
+ onChange: P("box-sizing"),
111
91
  type: "select",
112
92
  children: [/* @__PURE__ */ p("option", {
113
93
  value: "border-box",
@@ -118,27 +98,27 @@ var h = [
118
98
  })]
119
99
  })]
120
100
  }) }),
121
- /* @__PURE__ */ p(c, {
122
- value: j,
123
- onChange: L
101
+ /* @__PURE__ */ p(l, {
102
+ value: O,
103
+ onChange: P
124
104
  }),
125
105
  /* @__PURE__ */ m(i, { children: [
126
- /* @__PURE__ */ p(l, {
127
- value: M,
128
- onChange: L
106
+ /* @__PURE__ */ p(u, {
107
+ value: k,
108
+ onChange: P
129
109
  }),
130
- /* @__PURE__ */ p(s, {
131
- value: N,
132
- onChange: L
110
+ /* @__PURE__ */ p(c, {
111
+ value: A,
112
+ onChange: P
133
113
  }),
134
- /* @__PURE__ */ p(o, {
135
- containerType: P,
136
- containerName: F,
137
- onChange: L
114
+ /* @__PURE__ */ p(s, {
115
+ containerType: j,
116
+ containerName: M,
117
+ onChange: P
138
118
  })
139
119
  ] })
140
120
  ]
141
121
  });
142
122
  });
143
123
  //#endregion
144
- export { b as default };
124
+ export { v as default };
@@ -1,26 +1,17 @@
1
1
  import e from "../../StyleInspectorContext.mjs";
2
2
  import t from "../../hooks/useInspectorValues.mjs";
3
- import n from "../../components/CategoryContainer/index.mjs";
4
- import r from "./SpacingEditor.mjs";
5
- import i from "./SpacingMargin.mjs";
6
- import { memo as a, use as o, useCallback as s, useState as c } from "react";
7
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
- //#region src/components/StyleInspector/categories/Spacing/Spacing.tsx
9
- var d = [
10
- "margin-top",
11
- "margin-bottom",
12
- "margin-left",
13
- "margin-right",
14
- "padding-top",
15
- "padding-bottom",
16
- "padding-left",
17
- "padding-right"
18
- ], f = a(({ replaceTokens: a = !1, isCollapsed: f = !0, onCollapse: p }) => {
19
- let [m, h] = c(!1), { setValue: g } = o(e), _ = t({
20
- keys: d,
3
+ import { SPACING_KEYS as n } from "../../categoryKeys.mjs";
4
+ import r from "../../components/CategoryContainer/index.mjs";
5
+ import i from "./SpacingEditor.mjs";
6
+ import a from "./SpacingMargin.mjs";
7
+ import { memo as o, use as s, useCallback as c, useState as l } from "react";
8
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
+ var f = o(({ replaceTokens: o = !1, isCollapsed: f = !0, onCollapse: p }) => {
10
+ let [m, h] = l(!1), { setValue: g } = s(e), _ = t({
11
+ keys: n.dot,
21
12
  asValue: !0,
22
- replaceTokens: a
23
- }), [v, y] = c(), b = s((e) => p?.("spacing", e), [p]), x = s(() => h((e) => !e), [h]), S = s((e, t) => {
13
+ replaceTokens: o
14
+ }), [v, y] = l(), b = c((e) => p?.("spacing", e), [p]), x = c(() => h((e) => !e), [h]), S = c((e, t) => {
24
15
  if (!m) {
25
16
  g(e, t);
26
17
  return;
@@ -46,21 +37,21 @@ var d = [
46
37
  "padding-left": t,
47
38
  "padding-right": t
48
39
  });
49
- }, [m, g]), C = s((e) => y(e), [y]);
50
- return /* @__PURE__ */ l(n, {
51
- title: "Spacing",
52
- dotKeys: d,
40
+ }, [m, g]), C = c((e) => y(e), [y]);
41
+ return /* @__PURE__ */ u(r, {
42
+ title: n.title,
43
+ dotKeys: n.dot,
53
44
  isCollapsed: f,
54
45
  onCollapse: b,
55
- children: /* @__PURE__ */ u("div", {
46
+ children: /* @__PURE__ */ d("div", {
56
47
  className: "flex flex-col",
57
- children: [/* @__PURE__ */ l(i, {
48
+ children: [/* @__PURE__ */ u(a, {
58
49
  values: _,
59
50
  fragmentSelected: v,
60
51
  onSelectFragment: C,
61
52
  isLinked: m,
62
53
  onLinkSelected: x
63
- }), v && /* @__PURE__ */ l(r, {
54
+ }), v && /* @__PURE__ */ u(i, {
64
55
  fragmentSelected: v,
65
56
  onChange: S,
66
57
  value: _[v]
@@ -0,0 +1,15 @@
1
+ import { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
2
+ import { ReactNode } from 'react';
3
+ export type SpacingValues = Partial<Record<`${'margin' | 'padding'}-${'top' | 'bottom' | 'left' | 'right'}`, StyleValue>>;
4
+ export type SpacingBoxProps = {
5
+ property: 'margin' | 'padding';
6
+ className: string;
7
+ values?: SpacingValues;
8
+ fragmentSelected?: StyleCategory;
9
+ onSelectFragment?: (fragment?: StyleCategory) => void;
10
+ /** What the ring goes around: the padding inside the margin, the link inside the padding. */
11
+ children: ReactNode;
12
+ };
13
+ /** One ring of the box model: its four sides around what it holds, each picked to edit — and picked again, let go. */
14
+ declare const SpacingBox: ({ property, className, values, fragmentSelected, onSelectFragment, children }: SpacingBoxProps) => import('react').JSX.Element;
15
+ export default SpacingBox;
@@ -0,0 +1,63 @@
1
+ import e from "../../components/InspectorLabel/index.mjs";
2
+ import t from "./SpacingNumber.mjs";
3
+ import { useCallback as n } from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ //#region src/components/StyleInspector/categories/Spacing/SpacingBox.tsx
6
+ var a = ({ property: a, className: o, values: s, fragmentSelected: c, onSelectFragment: l, children: u }) => {
7
+ let d = `${a}-top`, f = `${a}-left`, p = `${a}-right`, m = `${a}-bottom`, h = n((e) => () => l?.(e === c ? void 0 : e), [c, l]);
8
+ return /* @__PURE__ */ i("div", {
9
+ className: o,
10
+ children: [
11
+ /* @__PURE__ */ i("div", {
12
+ className: "flex items-center justify-center py-0.5",
13
+ children: [/* @__PURE__ */ r(e, {
14
+ className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[11px]",
15
+ size: "custom",
16
+ keyValue: [
17
+ d,
18
+ f,
19
+ p,
20
+ m
21
+ ],
22
+ children: a.toUpperCase()
23
+ }), /* @__PURE__ */ r(t, {
24
+ value: s?.[d],
25
+ active: c === d,
26
+ onClick: h(d)
27
+ })]
28
+ }),
29
+ /* @__PURE__ */ i("div", {
30
+ className: "flex items-center justify-center",
31
+ children: [
32
+ /* @__PURE__ */ r("div", {
33
+ className: "flex items-center justify-center px-0.5",
34
+ children: /* @__PURE__ */ r(t, {
35
+ value: s?.[f],
36
+ active: c === f,
37
+ onClick: h(f)
38
+ })
39
+ }),
40
+ u,
41
+ /* @__PURE__ */ r("div", {
42
+ className: "flex items-center justify-center px-0.5",
43
+ children: /* @__PURE__ */ r(t, {
44
+ value: s?.[p],
45
+ active: c === p,
46
+ onClick: h(p)
47
+ })
48
+ })
49
+ ]
50
+ }),
51
+ /* @__PURE__ */ r("div", {
52
+ className: "flex items-center justify-center py-0.5",
53
+ children: /* @__PURE__ */ r(t, {
54
+ value: s?.[m],
55
+ active: c === m,
56
+ onClick: h(m)
57
+ })
58
+ })
59
+ ]
60
+ });
61
+ };
62
+ //#endregion
63
+ export { a as default };
@@ -1,16 +1,8 @@
1
- import { StyleCategory, StyleValue } from '@plitzi/sdk-shared';
1
+ import { SpacingValues } from './SpacingBox';
2
+ import { StyleCategory } from '@plitzi/sdk-shared';
2
3
  export type SpacingMarginProps = {
3
4
  fragmentSelected?: StyleCategory;
4
- values?: {
5
- 'margin-top'?: StyleValue;
6
- 'margin-bottom'?: StyleValue;
7
- 'margin-left'?: StyleValue;
8
- 'margin-right'?: StyleValue;
9
- 'padding-top'?: StyleValue;
10
- 'padding-bottom'?: StyleValue;
11
- 'padding-right'?: StyleValue;
12
- 'padding-left'?: StyleValue;
13
- };
5
+ values?: SpacingValues;
14
6
  isLinked?: boolean;
15
7
  onLinkSelected?: () => void;
16
8
  onSelectFragment?: (fragment?: StyleCategory) => void;