@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,72 +1,20 @@
1
- import e from "../../components/InspectorLabel/index.mjs";
2
- import t from "./SpacingNumber.mjs";
3
- import n from "./SpacingPadding.mjs";
4
- import { useCallback as r } from "react";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
1
+ import e from "./SpacingBox.mjs";
2
+ import t from "./SpacingPadding.mjs";
3
+ import { jsx as n } from "react/jsx-runtime";
6
4
  //#region src/components/StyleInspector/categories/Spacing/SpacingMargin.tsx
7
- var o = [
8
- "margin-top",
9
- "margin-left",
10
- "margin-right",
11
- "margin-bottom"
12
- ], s = ({ fragmentSelected: s, values: c, isLinked: l = !1, onLinkSelected: u, onSelectFragment: d }) => {
13
- let f = r((e) => () => {
14
- e === s ? d?.(void 0) : d?.(e);
15
- }, [s, d]), { "margin-top": p, "margin-bottom": m, "margin-left": h, "margin-right": g } = c ?? {};
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",
18
- children: [
19
- /* @__PURE__ */ a("div", {
20
- className: "flex items-center justify-center py-0.5",
21
- children: [/* @__PURE__ */ i(e, {
22
- className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[10px]",
23
- size: "custom",
24
- keyValue: o,
25
- children: "MARGIN"
26
- }), /* @__PURE__ */ i(t, {
27
- value: p,
28
- active: s === "margin-top",
29
- onClick: f("margin-top")
30
- })]
31
- }),
32
- /* @__PURE__ */ a("div", {
33
- className: "flex items-center justify-center",
34
- children: [
35
- /* @__PURE__ */ i("div", {
36
- className: "flex items-center justify-center px-0.5",
37
- children: /* @__PURE__ */ i(t, {
38
- value: h,
39
- active: s === "margin-left",
40
- onClick: f("margin-left")
41
- })
42
- }),
43
- /* @__PURE__ */ i(n, {
44
- values: c,
45
- fragmentSelected: s,
46
- onSelectFragment: d,
47
- isLinked: l,
48
- onLinkSelected: u
49
- }),
50
- /* @__PURE__ */ i("div", {
51
- className: "flex items-center justify-center px-0.5",
52
- children: /* @__PURE__ */ i(t, {
53
- value: g,
54
- active: s === "margin-right",
55
- onClick: f("margin-right")
56
- })
57
- })
58
- ]
59
- }),
60
- /* @__PURE__ */ i("div", {
61
- className: "flex items-center justify-center py-0.5",
62
- children: /* @__PURE__ */ i(t, {
63
- value: m,
64
- active: s === "margin-bottom",
65
- onClick: f("margin-bottom")
66
- })
67
- })
68
- ]
69
- });
70
- };
5
+ var r = ({ fragmentSelected: r, values: i, isLinked: a = !1, onLinkSelected: o, onSelectFragment: s }) => /* @__PURE__ */ n(e, {
6
+ property: "margin",
7
+ className: "relative flex cursor-pointer flex-col rounded-md border border-dashed border-gray-300 select-none dark:border-zinc-600",
8
+ values: i,
9
+ fragmentSelected: r,
10
+ onSelectFragment: s,
11
+ children: /* @__PURE__ */ n(t, {
12
+ values: i,
13
+ fragmentSelected: r,
14
+ onSelectFragment: s,
15
+ isLinked: a,
16
+ onLinkSelected: o
17
+ })
18
+ });
71
19
  //#endregion
72
- export { s as default };
20
+ export { r as default };
@@ -1,12 +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 SpacingPaddingProps = {
3
4
  fragmentSelected?: StyleCategory;
4
- values?: {
5
- 'padding-top'?: StyleValue;
6
- 'padding-bottom'?: StyleValue;
7
- 'padding-left'?: StyleValue;
8
- 'padding-right'?: StyleValue;
9
- };
5
+ values?: SpacingValues;
10
6
  isLinked?: boolean;
11
7
  onLinkSelected?: () => void;
12
8
  onSelectFragment?: (fragment?: StyleCategory) => void;
@@ -1,69 +1,18 @@
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";
1
+ import e from "./SpacingBox.mjs";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
3
  //#region src/components/StyleInspector/categories/Spacing/SpacingPadding.tsx
6
- var a = [
7
- "padding-top",
8
- "padding-left",
9
- "padding-right",
10
- "padding-bottom"
11
- ], o = ({ fragmentSelected: o, values: s, isLinked: c = !1, onLinkSelected: l, onSelectFragment: u }) => {
12
- let d = n((e) => () => {
13
- e === o ? u?.(void 0) : u?.(e);
14
- }, [u, o]), { "padding-top": f, "padding-bottom": p, "padding-left": m, "padding-right": h } = s ?? {};
15
- return /* @__PURE__ */ i("div", {
16
- className: "relative grow rounded-md border border-gray-300 dark:border-zinc-600",
17
- children: [
18
- /* @__PURE__ */ i("div", {
19
- className: "flex items-center justify-center py-0.5",
20
- children: [/* @__PURE__ */ r(e, {
21
- keyValue: a,
22
- className: "absolute top-0 left-0 overflow-hidden rounded-br-md !p-0 text-[10px]",
23
- size: "custom",
24
- children: "PADDING"
25
- }), /* @__PURE__ */ r(t, {
26
- value: f,
27
- active: o === "padding-top",
28
- onClick: d("padding-top")
29
- })]
30
- }),
31
- /* @__PURE__ */ i("div", {
32
- className: "flex items-center justify-center",
33
- children: [
34
- /* @__PURE__ */ r("div", {
35
- className: "flex items-center justify-center px-0.5",
36
- children: /* @__PURE__ */ r(t, {
37
- value: m,
38
- active: o === "padding-left",
39
- onClick: d("padding-left")
40
- })
41
- }),
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",
44
- onClick: l,
45
- 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
- /* @__PURE__ */ r("div", {
48
- className: "flex items-center justify-center px-0.5",
49
- children: /* @__PURE__ */ r(t, {
50
- value: h,
51
- active: o === "padding-right",
52
- onClick: d("padding-right")
53
- })
54
- })
55
- ]
56
- }),
57
- /* @__PURE__ */ r("div", {
58
- className: "flex items-center justify-center py-0.5",
59
- children: /* @__PURE__ */ r(t, {
60
- value: p,
61
- active: o === "padding-bottom",
62
- onClick: d("padding-bottom")
63
- })
64
- })
65
- ]
66
- });
67
- };
4
+ var r = ({ fragmentSelected: r, values: i, isLinked: a = !1, onLinkSelected: o, onSelectFragment: s }) => /* @__PURE__ */ t(e, {
5
+ property: "padding",
6
+ className: "relative grow rounded-md border border-gray-300 bg-gray-50 dark:border-zinc-600 dark:bg-zinc-800/70",
7
+ values: i,
8
+ fragmentSelected: r,
9
+ onSelectFragment: s,
10
+ children: /* @__PURE__ */ n("div", {
11
+ 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",
12
+ title: a ? "Sides linked: a change applies to all four" : "Link the four sides",
13
+ onClick: o,
14
+ children: [a && /* @__PURE__ */ t("i", { className: "fa-solid fa-link text-sm" }), !a && /* @__PURE__ */ t("i", { className: "fa-solid fa-link-slash text-sm" })]
15
+ })
16
+ });
68
17
  //#endregion
69
- export { o as default };
18
+ export { r as default };
@@ -2,72 +2,63 @@ 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 ee from "./TypographyAlign.mjs";
8
- import o from "./TypographyBreaking.mjs";
9
- import s from "./TypographyClamp.mjs";
10
- import { weights as c } from "./TypographyConstants.mjs";
11
- import l from "./TypographyFigures.mjs";
12
- import u from "../../../../hooks/useSpaceFonts.mjs";
13
- import d from "./TypographyFont.mjs";
14
- import f from "./TypographyStyle.mjs";
15
- import p from "./TypographyTextShadow.mjs";
16
- import m from "./TypographyTransform.mjs";
17
- import { memo as h, use as g, useCallback as _ } from "react";
18
- import { primaryFamily as v } from "@plitzi/sdk-shared/style";
19
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
5
+ import { TYPOGRAPHY_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 "../../hooks/usePropertyChange.mjs";
9
+ import c from "./TypographyAlign.mjs";
10
+ import ee from "./TypographyBreaking.mjs";
11
+ import l from "./TypographyClamp.mjs";
12
+ import { weights as u } from "./TypographyConstants.mjs";
13
+ import d from "./TypographyFigures.mjs";
14
+ import f from "../../../../hooks/useSpaceFonts.mjs";
15
+ import p from "./TypographyFont.mjs";
16
+ import m from "./TypographyStyle.mjs";
17
+ import h from "./TypographyTextShadow.mjs";
18
+ import g from "./TypographyTransform.mjs";
19
+ import { memo as _, use as v, useCallback as y } from "react";
20
+ import { primaryFamily as b } from "@plitzi/sdk-shared/style";
21
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
20
22
  //#region src/components/StyleInspector/categories/Typography/Typography.tsx
21
- var x = /* @__PURE__ */ "font-family.font-weight.font-size.line-height.color.text-align.font-style.text-decoration.text-decoration-thickness.text-underline-offset.letter-spacing.word-spacing.text-indent.text-transform.direction.text-shadow.white-space.text-wrap.word-break.overflow-wrap.hyphens.vertical-align.text-overflow.line-clamp.font-variant-numeric.font-feature-settings.-webkit-text-fill-color".split("."), S = [
22
- "text-decoration-thickness",
23
- "text-underline-offset",
24
- "word-break",
25
- "overflow-wrap",
26
- "hyphens",
27
- "vertical-align",
28
- "text-shadow",
29
- "font-variant-numeric",
30
- "font-feature-settings",
31
- "-webkit-text-fill-color"
32
- ], C = [
23
+ var C = [
33
24
  "letter-spacing",
34
25
  "word-spacing",
35
26
  "text-indent"
36
- ], w = h(({ replaceTokens: h = !1, isCollapsed: w = !0, onCollapse: T }) => {
37
- let E = u(), { setValue: D } = g(e), { "font-family": O, "font-weight": k, "font-size": A, "font-style": j, "text-align": M, "text-decoration": N, "text-decoration-thickness": P, "text-underline-offset": te, "text-indent": F, "text-transform": I, "text-shadow": L, "white-space": R, "text-wrap": z, "word-break": B, "overflow-wrap": V, hyphens: H, "vertical-align": U, "text-overflow": W, "line-clamp": G, "line-height": K, color: q, "letter-spacing": J, "word-spacing": Y, direction: X, "font-variant-numeric": Z, "font-feature-settings": Q, "-webkit-text-fill-color": ne } = t({
38
- keys: x,
27
+ ], w = _(({ replaceTokens: _ = !1, isCollapsed: w = !0, onCollapse: T }) => {
28
+ let E = f(), { setValue: D } = v(e), { "font-family": O, "font-weight": k, "font-size": A, "font-style": j, "text-align": M, "text-decoration": N, "text-decoration-thickness": te, "text-underline-offset": P, "text-indent": F, "text-transform": I, "text-shadow": L, "white-space": R, "text-wrap": z, "word-break": B, "overflow-wrap": V, hyphens: H, "vertical-align": U, "text-overflow": W, "line-clamp": G, "line-height": K, color: q, "letter-spacing": J, "word-spacing": Y, direction: X, "font-variant-numeric": Z, "font-feature-settings": Q, "-webkit-text-fill-color": ne } = t({
29
+ keys: i.dot,
39
30
  asValue: !0,
40
- replaceTokens: h
41
- }), re = _((e) => T?.("typography", e), [T]), ie = E.find((e) => e.family === v(typeof O == "string" ? O : "")), $ = _((e) => (t) => D(e, t), [D]), ae = _((e) => D(void 0, e), [D]);
42
- return /* @__PURE__ */ b(a, {
43
- title: "Typography",
44
- dotKeys: x,
45
- advancedKeys: S,
31
+ replaceTokens: _
32
+ }), re = y((e) => T?.("typography", e), [T]), ie = E.find((e) => e.family === b(typeof O == "string" ? O : "")), $ = s(), ae = y((e) => D(void 0, e), [D]);
33
+ return /* @__PURE__ */ S(o, {
34
+ title: i.title,
35
+ dotKeys: i.dot,
36
+ advancedKeys: i.advanced,
46
37
  isCollapsed: w,
47
38
  onCollapse: re,
48
39
  children: [
49
- /* @__PURE__ */ y(ee, {
40
+ /* @__PURE__ */ x(c, {
50
41
  partialValue: M,
51
42
  onChange: $("text-align")
52
43
  }),
53
- /* @__PURE__ */ y(d, {
44
+ /* @__PURE__ */ x(p, {
54
45
  partialValue: O,
55
46
  onChange: $("font-family")
56
47
  }),
57
- /* @__PURE__ */ b(r, {
48
+ /* @__PURE__ */ S(r, {
58
49
  label: "",
59
- children: [/* @__PURE__ */ y(n, {
50
+ children: [/* @__PURE__ */ x(n, {
60
51
  keys: ["font-weight"],
61
52
  label: "Weight",
62
53
  value: k,
63
54
  onChange: $("font-weight"),
64
55
  type: "select",
65
- children: Object.keys(c).map((e) => /* @__PURE__ */ y("option", {
56
+ children: Object.keys(u).map((e) => /* @__PURE__ */ x("option", {
66
57
  value: e,
67
58
  disabled: !ie?.weights.includes(Number(e)),
68
- children: c[Number(e)]
59
+ children: u[Number(e)]
69
60
  }, e))
70
- }), /* @__PURE__ */ y(n, {
61
+ }), /* @__PURE__ */ x(n, {
71
62
  keys: ["color"],
72
63
  label: "Color",
73
64
  type: "color",
@@ -75,15 +66,15 @@ var x = /* @__PURE__ */ "font-family.font-weight.font-size.line-height.color.tex
75
66
  onChange: $("color")
76
67
  })]
77
68
  }),
78
- /* @__PURE__ */ b(r, {
69
+ /* @__PURE__ */ S(r, {
79
70
  label: "",
80
- children: [/* @__PURE__ */ y(n, {
71
+ children: [/* @__PURE__ */ x(n, {
81
72
  keys: ["font-size"],
82
73
  label: "Size",
83
74
  value: A,
84
75
  onChange: $("font-size"),
85
76
  type: "metric"
86
- }), /* @__PURE__ */ y(n, {
77
+ }), /* @__PURE__ */ x(n, {
87
78
  keys: ["line-height"],
88
79
  label: "Line Height",
89
80
  value: K,
@@ -91,32 +82,32 @@ var x = /* @__PURE__ */ "font-family.font-weight.font-size.line-height.color.tex
91
82
  type: "metric"
92
83
  })]
93
84
  }),
94
- /* @__PURE__ */ y(f, {
85
+ /* @__PURE__ */ x(m, {
95
86
  fontStyle: j,
96
87
  textDecoration: N,
97
- textDecorationThickness: P,
98
- textUnderlineOffset: te,
88
+ textDecorationThickness: te,
89
+ textUnderlineOffset: P,
99
90
  onChange: $
100
91
  }),
101
- /* @__PURE__ */ b(r, {
102
- label: "Letter",
92
+ /* @__PURE__ */ S(r, {
93
+ label: "Spacing",
103
94
  keys: C,
104
95
  children: [
105
- /* @__PURE__ */ y(n, {
96
+ /* @__PURE__ */ x(n, {
106
97
  keys: ["letter-spacing"],
107
- label: "Spacing",
98
+ label: "Letter",
108
99
  value: J,
109
100
  onChange: $("letter-spacing"),
110
101
  type: "metric"
111
102
  }),
112
- /* @__PURE__ */ y(n, {
103
+ /* @__PURE__ */ x(n, {
113
104
  keys: ["word-spacing"],
114
105
  label: "Word",
115
106
  value: Y,
116
107
  onChange: $("word-spacing"),
117
108
  type: "metric"
118
109
  }),
119
- /* @__PURE__ */ y(n, {
110
+ /* @__PURE__ */ x(n, {
120
111
  keys: ["text-indent"],
121
112
  label: "Indent",
122
113
  value: F,
@@ -125,12 +116,12 @@ var x = /* @__PURE__ */ "font-family.font-weight.font-size.line-height.color.tex
125
116
  })
126
117
  ]
127
118
  }),
128
- /* @__PURE__ */ y(m, {
119
+ /* @__PURE__ */ x(g, {
129
120
  textTransform: I,
130
121
  direction: X,
131
122
  onChange: $
132
123
  }),
133
- /* @__PURE__ */ y(o, {
124
+ /* @__PURE__ */ x(ee, {
134
125
  whiteSpace: R,
135
126
  textWrap: z,
136
127
  wordBreak: B,
@@ -139,45 +130,45 @@ var x = /* @__PURE__ */ "font-family.font-weight.font-size.line-height.color.tex
139
130
  verticalAlign: U,
140
131
  onChange: $
141
132
  }),
142
- /* @__PURE__ */ b(r, {
133
+ /* @__PURE__ */ S(r, {
143
134
  label: "",
144
- children: [/* @__PURE__ */ b(n, {
135
+ children: [/* @__PURE__ */ S(n, {
145
136
  keys: ["text-overflow"],
146
137
  label: "Overflow",
147
138
  value: W,
148
139
  onChange: $("text-overflow"),
149
140
  type: "select",
150
141
  children: [
151
- /* @__PURE__ */ y("option", {
142
+ /* @__PURE__ */ x("option", {
152
143
  value: "clip",
153
144
  children: "Clip"
154
145
  }),
155
- /* @__PURE__ */ y("option", {
146
+ /* @__PURE__ */ x("option", {
156
147
  value: "ellipsis",
157
148
  children: "Ellipsis"
158
149
  }),
159
- /* @__PURE__ */ y("option", {
150
+ /* @__PURE__ */ x("option", {
160
151
  value: "string",
161
152
  children: "String"
162
153
  }),
163
- /* @__PURE__ */ y("option", {
154
+ /* @__PURE__ */ x("option", {
164
155
  value: "initial",
165
156
  children: "Initial"
166
157
  }),
167
- /* @__PURE__ */ y("option", {
158
+ /* @__PURE__ */ x("option", {
168
159
  value: "inherit",
169
160
  children: "Inherit"
170
161
  })
171
162
  ]
172
- }), /* @__PURE__ */ y(s, {
163
+ }), /* @__PURE__ */ x(l, {
173
164
  value: G,
174
165
  onChange: ae
175
166
  })]
176
167
  }),
177
- /* @__PURE__ */ b(i, { children: [/* @__PURE__ */ y(p, {
168
+ /* @__PURE__ */ S(a, { children: [/* @__PURE__ */ x(h, {
178
169
  value: L,
179
170
  onChange: $("text-shadow")
180
- }), /* @__PURE__ */ y(l, {
171
+ }), /* @__PURE__ */ x(d, {
181
172
  fontVariantNumeric: Z,
182
173
  fontFeatureSettings: Q,
183
174
  textFillColor: ne,
@@ -11,7 +11,7 @@ var s = ({ partialValue: s, onChange: c }) => {
11
11
  c?.(t ? i(t) : e);
12
12
  }, [l, c]);
13
13
  return /* @__PURE__ */ o(t, {
14
- label: "F. Family",
14
+ label: "Font",
15
15
  keys: ["font-family"],
16
16
  children: /* @__PURE__ */ o(e, {
17
17
  value: u,
@@ -47,7 +47,7 @@ var l = ({ fontStyle: l, textDecoration: u, textDecorationThickness: d, textUnde
47
47
  label: "",
48
48
  children: [/* @__PURE__ */ a(e, {
49
49
  keys: ["font-style"],
50
- label: "Italicize",
50
+ label: "Style",
51
51
  onChange: p?.("font-style"),
52
52
  type: "iconGroup",
53
53
  items: m
@@ -1,43 +1,19 @@
1
- import e from "../../components/InspectorLabel/index.mjs";
2
- import t from "../../components/CategorySection/index.mjs";
3
- import n from "./TypographyTextShadowItem.mjs";
4
- import { useCallback as r } from "react";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
1
+ import { DEFAULT_SHADOW as e, serializeShadow as t } from "../../shadowValue.mjs";
2
+ import n from "../../components/ShadowList/index.mjs";
3
+ import { jsx as r } from "react/jsx-runtime";
6
4
  //#region src/components/StyleInspector/categories/Typography/TypographyTextShadow.tsx
7
- var o = ({ value: o, onChange: s }) => {
8
- let c = r((e) => (t) => {
9
- t.stopPropagation(), t.preventDefault();
10
- let n = o.split(",").toSpliced(e, 1);
11
- s?.(n.length > 0 ? n.join(",") : "");
12
- }, [s, o]), l = r((e) => (t) => {
13
- let n = o.split(",");
14
- n[e] = t, s?.(n.join(","));
15
- }, [s, o]), u = r(() => {
16
- let e = o === "" ? [] : o.split(",");
17
- e.push("2px 2px 5px black"), s?.(e.join(","));
18
- }, [s, o]), d = [];
19
- return o !== "" && (d = o.split(",")), /* @__PURE__ */ a(t, {
20
- direction: "column",
21
- children: [/* @__PURE__ */ a("div", {
22
- className: "flex w-full justify-between",
23
- children: [/* @__PURE__ */ i(e, {
24
- keyValue: ["text-shadow"],
25
- children: "Text Shadow"
26
- }), /* @__PURE__ */ i("button", {
27
- className: "cursor-pointer",
28
- type: "button",
29
- onClick: u,
30
- children: /* @__PURE__ */ i("i", { className: "fas fa-plus" })
31
- })]
32
- }), d.length > 0 && /* @__PURE__ */ i("div", {
33
- className: "mt-1",
34
- children: d.map((e, t) => /* @__PURE__ */ i(n, {
35
- value: e,
36
- onChange: l(t),
37
- onRemove: c(t)
38
- }, t))
39
- })]
40
- });
41
- };
5
+ var i = ["text-shadow"], a = t({
6
+ ...e,
7
+ y: "1px",
8
+ blur: "2px"
9
+ }, { withSpread: !1 }), o = ({ value: e, onChange: t }) => /* @__PURE__ */ r(n, {
10
+ label: "Text Shadow",
11
+ keys: i,
12
+ addLabel: "Add text shadow",
13
+ withSpread: !1,
14
+ added: a,
15
+ value: e,
16
+ onChange: t
17
+ });
42
18
  //#endregion
43
19
  export { o as default };
@@ -1,55 +1,56 @@
1
1
  import e from "../../StyleInspectorContext.mjs";
2
- import t from "../../components/CategoryContainer/index.mjs";
3
- import { use as n, useCallback as r } from "react";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
- import o, { useModal as s } from "@plitzi/plitzi-ui/Modal";
6
- import c from "@plitzi/sdk-shared/builder/contexts/BuilderContext";
7
- import { useToast as l } from "@plitzi/plitzi-ui/Toast";
8
- import u from "@plitzi/sdk-variables/components/StyleVariables";
2
+ import { VARIABLES_KEYS as t } from "../../categoryKeys.mjs";
3
+ import n from "../../components/CategoryContainer/index.mjs";
4
+ import { use as r, useCallback as i } from "react";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import s, { useModal as c } from "@plitzi/plitzi-ui/Modal";
7
+ import l from "@plitzi/sdk-shared/builder/contexts/BuilderContext";
8
+ import { useToast as u } from "@plitzi/plitzi-ui/Toast";
9
+ import d from "@plitzi/sdk-variables/components/StyleVariables";
9
10
  //#region src/components/StyleInspector/categories/Variables/Variables.tsx
10
- var d = ({ isCollapsed: d, onCollapse: f }) => {
11
- let { displayMode: p, selector: m } = n(e), { builderHandler: h } = n(c), { showDialog: g } = s(), { addToast: _ } = l(), v = r((e) => f?.("variables", e), [f]), y = r((e) => {
12
- if (!m) return;
11
+ var f = ({ isCollapsed: f, onCollapse: p }) => {
12
+ let { displayMode: m, selector: h } = r(e), { builderHandler: g } = r(l), { showDialog: _ } = c(), { addToast: v } = u(), y = i((e) => p?.("variables", e), [p]), b = i((e) => {
13
+ if (!h) return;
13
14
  let { name: t, category: n, value: r } = e;
14
- m.variables?.[n]?.[t] ? _(/* @__PURE__ */ a("span", { children: [
15
+ h.variables?.[n]?.[t] ? v(/* @__PURE__ */ o("span", { children: [
15
16
  "Variable with the name ",
16
- /* @__PURE__ */ i("b", { children: t }),
17
+ /* @__PURE__ */ a("b", { children: t }),
17
18
  " already exists"
18
19
  ] }), {
19
20
  appeareance: "warning",
20
21
  autoDismiss: !0,
21
22
  placement: "top-right"
22
- }) : h("styleAddSelectorVariable", p, m.name, n, t, r);
23
+ }) : g("styleAddSelectorVariable", m, h.name, n, t, r);
23
24
  }, [
24
- _,
25
- h,
26
- p,
27
- m
28
- ]), b = r((e) => {
29
- m && h("styleUpdateSelectorVariable", p, m.name, e.category, e.name, e.value);
25
+ v,
26
+ g,
27
+ m,
28
+ h
29
+ ]), x = i((e) => {
30
+ h && g("styleUpdateSelectorVariable", m, h.name, e.category, e.name, e.value);
30
31
  }, [
31
- h,
32
- p,
33
- m
34
- ]), x = r(async (e, t) => {
35
- m && await g(/* @__PURE__ */ i(o.Header, { children: /* @__PURE__ */ i("h4", { children: "Remove Style Variable" }) }), /* @__PURE__ */ i(o.Body, { children: /* @__PURE__ */ i("h4", { children: "Do you want to remove this item ?" }) }), void 0, { size: "sm" }, t) && h("styleRemoveSelectorVariable", p, m.name, e, t);
32
+ g,
33
+ m,
34
+ h
35
+ ]), S = i(async (e, t) => {
36
+ h && await _(/* @__PURE__ */ a(s.Header, { children: /* @__PURE__ */ a("h4", { children: "Remove Style Variable" }) }), /* @__PURE__ */ a(s.Body, { children: /* @__PURE__ */ a("h4", { children: "Do you want to remove this item ?" }) }), void 0, { size: "sm" }, t) && g("styleRemoveSelectorVariable", m, h.name, e, t);
36
37
  }, [
37
- h,
38
- p,
38
+ g,
39
39
  m,
40
- g
40
+ h,
41
+ _
41
42
  ]);
42
- if (m) return /* @__PURE__ */ i(t, {
43
- title: "Variables",
44
- isCollapsed: d,
45
- onCollapse: v,
46
- children: /* @__PURE__ */ i(u, {
47
- variables: m.variables,
48
- onAdd: y,
49
- onUpdate: b,
50
- onRemove: x
43
+ if (h) return /* @__PURE__ */ a(n, {
44
+ title: t.title,
45
+ isCollapsed: f,
46
+ onCollapse: y,
47
+ children: /* @__PURE__ */ a(d, {
48
+ variables: h.variables,
49
+ onAdd: b,
50
+ onUpdate: x,
51
+ onRemove: S
51
52
  })
52
53
  });
53
54
  };
54
55
  //#endregion
55
- export { d as default };
56
+ export { f as default };
@@ -0,0 +1,2 @@
1
+ /** The values of `mix-blend-mode` and `background-blend-mode`, which share the list, with the words the inspector shows. */
2
+ export declare const BLEND_MODES: readonly [readonly ["normal", "Normal"], readonly ["multiply", "Multiply"], readonly ["screen", "Screen"], readonly ["overlay", "Overlay"], readonly ["darken", "Darken"], readonly ["lighten", "Lighten"], readonly ["color-dodge", "Color Dodge"], readonly ["color-burn", "Color Burn"], readonly ["hard-light", "Hard Light"], readonly ["soft-light", "Soft Light"], readonly ["difference", "Difference"], readonly ["exclusion", "Exclusion"], readonly ["hue", "Hue"], readonly ["saturation", "Saturation"], readonly ["color", "Color"], readonly ["luminosity", "Luminosity"]];
@@ -0,0 +1,21 @@
1
+ //#region src/components/StyleInspector/categories/blendModes.ts
2
+ var e = [
3
+ ["normal", "Normal"],
4
+ ["multiply", "Multiply"],
5
+ ["screen", "Screen"],
6
+ ["overlay", "Overlay"],
7
+ ["darken", "Darken"],
8
+ ["lighten", "Lighten"],
9
+ ["color-dodge", "Color Dodge"],
10
+ ["color-burn", "Color Burn"],
11
+ ["hard-light", "Hard Light"],
12
+ ["soft-light", "Soft Light"],
13
+ ["difference", "Difference"],
14
+ ["exclusion", "Exclusion"],
15
+ ["hue", "Hue"],
16
+ ["saturation", "Saturation"],
17
+ ["color", "Color"],
18
+ ["luminosity", "Luminosity"]
19
+ ];
20
+ //#endregion
21
+ export { e as BLEND_MODES };
@@ -0,0 +1,8 @@
1
+ import { StyleValue } from '@plitzi/sdk-shared';
2
+ /** The markers a list and a list item offer, as icon buttons: `list-style` and `list-style-type` take the same words. */
3
+ export declare const listMarkerItems: (current: StyleValue | undefined) => {
4
+ value: "none" | "circle" | "disc" | "square" | "decimal" | "lower-alpha" | "lower-roman";
5
+ icon: import('react').JSX.Element;
6
+ description: string;
7
+ active: boolean;
8
+ }[];