@plitzi/sdk-style 0.38.9 → 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 +189 -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,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 };
@@ -2,143 +2,123 @@ 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 "./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";
12
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
5
+ import { SIZE_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 "./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, use as f, useCallback as p } from "react";
13
+ import { jsx as m, jsxs as h } 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 g = ["width", "height"], _ = ["min-width", "min-height"], v = ["max-width", "max-height"], y = d(({ replaceTokens: d = !1, isCollapsed: y = !0, onCollapse: b }) => {
16
+ let { setValue: x } = f(e), { width: S, height: C, "min-width": w, "min-height": T, "max-width": E, "max-height": D, "aspect-ratio": O, "box-sizing": k, overflow: A, "object-position": j, "object-fit": M, "container-type": N, "container-name": P } = t({
17
+ keys: i.dot,
38
18
  asValue: !0,
39
- replaceTokens: u
40
- }), I = f((e) => x?.("size", e), [x]), L = f((e) => (t) => S(e, t), [S]);
41
- return /* @__PURE__ */ m(a, {
42
- title: "Size",
43
- dotKeys: h,
44
- advancedKeys: g,
45
- isCollapsed: b,
46
- onCollapse: I,
19
+ replaceTokens: d
20
+ }), F = p((e) => b?.("size", e), [b]), I = p((e) => (t) => x(e, t), [x]);
21
+ return /* @__PURE__ */ h(o, {
22
+ title: i.title,
23
+ dotKeys: i.dot,
24
+ advancedKeys: i.advanced,
25
+ isCollapsed: y,
26
+ onCollapse: F,
47
27
  children: [
48
- /* @__PURE__ */ m(r, {
28
+ /* @__PURE__ */ h(r, {
49
29
  label: "Size",
50
- keys: _,
51
- children: [/* @__PURE__ */ p(n, {
30
+ keys: g,
31
+ children: [/* @__PURE__ */ m(n, {
52
32
  keys: ["width"],
53
33
  preffix: "W",
54
- value: C,
55
- onChange: L("width"),
34
+ value: S,
35
+ onChange: I("width"),
56
36
  type: "metric"
57
- }), /* @__PURE__ */ p(n, {
37
+ }), /* @__PURE__ */ m(n, {
58
38
  keys: ["height"],
59
39
  preffix: "H",
60
- value: w,
61
- onChange: L("height"),
40
+ value: C,
41
+ onChange: I("height"),
62
42
  type: "metric"
63
43
  })]
64
44
  }),
65
- /* @__PURE__ */ m(r, {
45
+ /* @__PURE__ */ h(r, {
66
46
  label: "Min Size",
67
- keys: v,
68
- children: [/* @__PURE__ */ p(n, {
47
+ keys: _,
48
+ children: [/* @__PURE__ */ m(n, {
69
49
  keys: ["min-width"],
70
50
  preffix: "W",
71
- value: T,
72
- onChange: L("min-width"),
51
+ value: w,
52
+ onChange: I("min-width"),
73
53
  type: "metric"
74
- }), /* @__PURE__ */ p(n, {
54
+ }), /* @__PURE__ */ m(n, {
75
55
  keys: ["min-height"],
76
56
  preffix: "H",
77
- value: E,
78
- onChange: L("min-height"),
57
+ value: T,
58
+ onChange: I("min-height"),
79
59
  type: "metric"
80
60
  })]
81
61
  }),
82
- /* @__PURE__ */ m(r, {
62
+ /* @__PURE__ */ h(r, {
83
63
  label: "Max Size",
84
- keys: y,
85
- children: [/* @__PURE__ */ p(n, {
64
+ keys: v,
65
+ children: [/* @__PURE__ */ m(n, {
86
66
  keys: ["max-width"],
87
67
  preffix: "W",
88
- value: D,
89
- onChange: L("max-width"),
68
+ value: E,
69
+ onChange: I("max-width"),
90
70
  type: "metric"
91
- }), /* @__PURE__ */ p(n, {
71
+ }), /* @__PURE__ */ m(n, {
92
72
  keys: ["max-height"],
93
73
  preffix: "H",
94
- value: O,
95
- onChange: L("max-height"),
74
+ value: D,
75
+ onChange: I("max-height"),
96
76
  type: "metric"
97
77
  })]
98
78
  }),
99
- /* @__PURE__ */ p(i, { children: /* @__PURE__ */ m(r, {
79
+ /* @__PURE__ */ m(a, { children: /* @__PURE__ */ h(r, {
100
80
  label: "",
101
- children: [/* @__PURE__ */ p(n, {
81
+ children: [/* @__PURE__ */ m(n, {
102
82
  keys: ["aspect-ratio"],
103
83
  label: "Ratio",
104
- value: k,
105
- onChange: L("aspect-ratio")
106
- }), /* @__PURE__ */ m(n, {
84
+ value: O,
85
+ onChange: I("aspect-ratio")
86
+ }), /* @__PURE__ */ h(n, {
107
87
  keys: ["box-sizing"],
108
88
  label: "Box Sizing",
109
- value: A,
110
- onChange: L("box-sizing"),
89
+ value: k,
90
+ onChange: I("box-sizing"),
111
91
  type: "select",
112
- children: [/* @__PURE__ */ p("option", {
92
+ children: [/* @__PURE__ */ m("option", {
113
93
  value: "border-box",
114
94
  children: "Border Box"
115
- }), /* @__PURE__ */ p("option", {
95
+ }), /* @__PURE__ */ m("option", {
116
96
  value: "content-box",
117
97
  children: "Content Box"
118
98
  })]
119
99
  })]
120
100
  }) }),
121
- /* @__PURE__ */ p(c, {
122
- value: j,
123
- onChange: L
101
+ /* @__PURE__ */ m(l, {
102
+ value: A,
103
+ onChange: I
124
104
  }),
125
- /* @__PURE__ */ m(i, { children: [
126
- /* @__PURE__ */ p(l, {
127
- value: M,
128
- onChange: L
105
+ /* @__PURE__ */ h(a, { children: [
106
+ /* @__PURE__ */ m(u, {
107
+ value: j,
108
+ onChange: I
129
109
  }),
130
- /* @__PURE__ */ p(s, {
131
- value: N,
132
- onChange: L
110
+ /* @__PURE__ */ m(c, {
111
+ value: M,
112
+ onChange: I
133
113
  }),
134
- /* @__PURE__ */ p(o, {
135
- containerType: P,
136
- containerName: F,
137
- onChange: L
114
+ /* @__PURE__ */ m(s, {
115
+ containerType: N,
116
+ containerName: P,
117
+ onChange: I
138
118
  })
139
119
  ] })
140
120
  ]
141
121
  });
142
122
  });
143
123
  //#endregion
144
- export { b as default };
124
+ export { y 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]
@@ -14,12 +14,12 @@ var o = [
14
14
  e === s ? d?.(void 0) : d?.(e);
15
15
  }, [s, d]), { "margin-top": p, "margin-bottom": m, "margin-left": h, "margin-right": g } = c ?? {};
16
16
  return /* @__PURE__ */ a("div", {
17
- className: "relative flex cursor-pointer flex-col rounded-md border border-gray-300 bg-white select-none dark:border-zinc-600 dark:bg-zinc-800",
17
+ className: "relative flex cursor-pointer flex-col rounded-md border border-dashed border-gray-300 select-none dark:border-zinc-600",
18
18
  children: [
19
19
  /* @__PURE__ */ a("div", {
20
20
  className: "flex items-center justify-center py-0.5",
21
21
  children: [/* @__PURE__ */ i(e, {
22
- className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[10px]",
22
+ className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[11px]",
23
23
  size: "custom",
24
24
  keyValue: o,
25
25
  children: "MARGIN"
@@ -13,13 +13,13 @@ var a = [
13
13
  e === o ? u?.(void 0) : u?.(e);
14
14
  }, [u, o]), { "padding-top": f, "padding-bottom": p, "padding-left": m, "padding-right": h } = s ?? {};
15
15
  return /* @__PURE__ */ i("div", {
16
- className: "relative grow rounded-md border border-gray-300 dark:border-zinc-600",
16
+ className: "relative grow rounded-md border border-gray-300 bg-gray-50 dark:border-zinc-600 dark:bg-zinc-800/70",
17
17
  children: [
18
18
  /* @__PURE__ */ i("div", {
19
19
  className: "flex items-center justify-center py-0.5",
20
20
  children: [/* @__PURE__ */ r(e, {
21
21
  keyValue: a,
22
- className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[10px]",
22
+ className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[11px]",
23
23
  size: "custom",
24
24
  children: "PADDING"
25
25
  }), /* @__PURE__ */ r(t, {
@@ -40,7 +40,8 @@ var a = [
40
40
  })
41
41
  }),
42
42
  /* @__PURE__ */ i("div", {
43
- className: "flex grow items-center justify-center rounded-md border border-gray-300 bg-slate-100 py-1 dark:border-zinc-600 dark:bg-zinc-700/50",
43
+ className: "flex grow items-center justify-center rounded border border-gray-300 bg-white py-1 text-zinc-500 hover:text-zinc-900 dark:border-zinc-600 dark:bg-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100",
44
+ title: c ? "Sides linked: a change applies to all four" : "Link the four sides",
44
45
  onClick: l,
45
46
  children: [c && /* @__PURE__ */ r("i", { className: "fa-solid fa-link text-sm" }), !c && /* @__PURE__ */ r("i", { className: "fa-solid fa-link-slash text-sm" })]
46
47
  }),