@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
@@ -0,0 +1,25 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import t from "@plitzi/plitzi-ui/icons/XMark";
3
+ import n from "@plitzi/plitzi-ui/icons/ListCircles";
4
+ import r from "@plitzi/plitzi-ui/icons/ListDots";
5
+ import i from "@plitzi/plitzi-ui/icons/ListLetters";
6
+ import a from "@plitzi/plitzi-ui/icons/ListNumbers";
7
+ import o from "@plitzi/plitzi-ui/icons/ListRoman";
8
+ import s from "@plitzi/plitzi-ui/icons/ListSquares";
9
+ //#region src/components/StyleInspector/categories/listMarkers.tsx
10
+ var c = (c) => [
11
+ ["none", /* @__PURE__ */ e(t, {}, "none")],
12
+ ["disc", /* @__PURE__ */ e(r, {}, "disc")],
13
+ ["circle", /* @__PURE__ */ e(n, {}, "circle")],
14
+ ["square", /* @__PURE__ */ e(s, {}, "square")],
15
+ ["decimal", /* @__PURE__ */ e(a, {}, "decimal")],
16
+ ["lower-alpha", /* @__PURE__ */ e(i, {}, "lower-alpha")],
17
+ ["lower-roman", /* @__PURE__ */ e(o, {}, "lower-roman")]
18
+ ].map(([e, t]) => ({
19
+ value: e,
20
+ icon: t,
21
+ description: "",
22
+ active: c === e
23
+ }));
24
+ //#endregion
25
+ export { c as listMarkerItems };
@@ -0,0 +1,45 @@
1
+ import { StyleCategory } from '@plitzi/sdk-shared';
2
+ /**
3
+ * The properties each category of the inspector edits, in one place: the category reads them to tell what is set (the
4
+ * dots in its header, the hint on its advanced toggle), and the inspector's search reads them to find which category
5
+ * holds the property a person typed. `advanced` are the ones behind the category's sliders toggle.
6
+ */
7
+ export type CategoryKeys = {
8
+ title: string;
9
+ dot: StyleCategory[];
10
+ advanced: StyleCategory[];
11
+ };
12
+ export declare const LIST_KEYS: CategoryKeys;
13
+ export declare const LIST_ITEM_KEYS: CategoryKeys;
14
+ export declare const DISPLAY_KEYS: CategoryKeys;
15
+ export declare const FLEX_CHILD_KEYS: CategoryKeys;
16
+ export declare const SPACING_KEYS: CategoryKeys;
17
+ export declare const SIZE_KEYS: CategoryKeys;
18
+ export declare const POSITION_KEYS: CategoryKeys;
19
+ export declare const TYPOGRAPHY_KEYS: CategoryKeys;
20
+ export declare const BACKGROUND_KEYS: CategoryKeys;
21
+ export declare const BORDER_KEYS: CategoryKeys;
22
+ export declare const EFFECTS_KEYS: CategoryKeys;
23
+ export declare const OTHERS_KEYS: CategoryKeys;
24
+ /** The categories with no properties of their own to search by — found by their title alone. */
25
+ export declare const VARIABLES_KEYS: CategoryKeys;
26
+ export declare const RAW_STYLE_KEYS: CategoryKeys;
27
+ /** Every category, by the id its collapsed state is stored under, in the order the inspector draws them. */
28
+ export declare const CATEGORY_KEYS: {
29
+ readonly list: CategoryKeys;
30
+ readonly listItem: CategoryKeys;
31
+ readonly display: CategoryKeys;
32
+ readonly displayFlexChild: CategoryKeys;
33
+ readonly spacing: CategoryKeys;
34
+ readonly size: CategoryKeys;
35
+ readonly position: CategoryKeys;
36
+ readonly typography: CategoryKeys;
37
+ readonly background: CategoryKeys;
38
+ readonly border: CategoryKeys;
39
+ readonly effects: CategoryKeys;
40
+ readonly others: CategoryKeys;
41
+ readonly variables: CategoryKeys;
42
+ readonly rawStyle: CategoryKeys;
43
+ };
44
+ export type CategoryId = keyof typeof CATEGORY_KEYS;
45
+ export declare const CATEGORY_IDS: CategoryId[];
@@ -0,0 +1,220 @@
1
+ //#region src/components/StyleInspector/categoryKeys.ts
2
+ var e = {
3
+ title: "List",
4
+ dot: ["list-style"],
5
+ advanced: []
6
+ }, t = {
7
+ title: "List Item",
8
+ dot: ["list-style-type"],
9
+ advanced: []
10
+ }, n = {
11
+ title: "Layout",
12
+ dot: [
13
+ "flex-direction",
14
+ "flex-wrap",
15
+ "align-items",
16
+ "justify-content",
17
+ "align-content",
18
+ "column-gap",
19
+ "row-gap",
20
+ "grid-row-gap",
21
+ "grid-column-gap",
22
+ "grid-template-areas",
23
+ "grid-template-columns",
24
+ "grid-template-rows",
25
+ "grid-auto-flow",
26
+ "grid-auto-rows",
27
+ "grid-auto-columns",
28
+ "display"
29
+ ],
30
+ advanced: []
31
+ }, r = {
32
+ title: "Flex Child",
33
+ dot: [
34
+ "align-self",
35
+ "order",
36
+ "flex-grow",
37
+ "flex-shrink",
38
+ "flex-basis"
39
+ ],
40
+ advanced: []
41
+ }, i = {
42
+ title: "Spacing",
43
+ dot: [
44
+ "margin-top",
45
+ "margin-bottom",
46
+ "margin-left",
47
+ "margin-right",
48
+ "padding-top",
49
+ "padding-bottom",
50
+ "padding-left",
51
+ "padding-right"
52
+ ],
53
+ advanced: []
54
+ }, a = {
55
+ title: "Size",
56
+ dot: [
57
+ "width",
58
+ "height",
59
+ "min-width",
60
+ "min-height",
61
+ "max-width",
62
+ "max-height",
63
+ "aspect-ratio",
64
+ "box-sizing",
65
+ "overflow",
66
+ "object-fit",
67
+ "object-position",
68
+ "container-type",
69
+ "container-name"
70
+ ],
71
+ advanced: [
72
+ "aspect-ratio",
73
+ "box-sizing",
74
+ "object-position",
75
+ "object-fit",
76
+ "container-type",
77
+ "container-name"
78
+ ]
79
+ }, o = {
80
+ title: "Position",
81
+ dot: [
82
+ "position",
83
+ "top",
84
+ "bottom",
85
+ "z-index",
86
+ "float",
87
+ "clear",
88
+ "left",
89
+ "right"
90
+ ],
91
+ advanced: ["float", "clear"]
92
+ }, s = {
93
+ title: "Typography",
94
+ dot: /* @__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("."),
95
+ advanced: [
96
+ "text-decoration-thickness",
97
+ "text-underline-offset",
98
+ "word-break",
99
+ "overflow-wrap",
100
+ "hyphens",
101
+ "vertical-align",
102
+ "text-shadow",
103
+ "font-variant-numeric",
104
+ "font-feature-settings",
105
+ "-webkit-text-fill-color"
106
+ ]
107
+ }, c = {
108
+ title: "Background",
109
+ dot: [
110
+ "background-color",
111
+ "background-image",
112
+ "background-attachment",
113
+ "background-position",
114
+ "background-repeat",
115
+ "background-clip",
116
+ "background-size",
117
+ "background-blend-mode",
118
+ "mask-image"
119
+ ],
120
+ advanced: ["background-blend-mode", "mask-image"]
121
+ }, l = {
122
+ title: "Border",
123
+ dot: [
124
+ "border-top-style",
125
+ "border-top-width",
126
+ "border-top-color",
127
+ "border-bottom-style",
128
+ "border-bottom-width",
129
+ "border-bottom-color",
130
+ "border-left-style",
131
+ "border-left-width",
132
+ "border-left-color",
133
+ "border-right-style",
134
+ "border-right-width",
135
+ "border-right-color",
136
+ "border-top-left-radius",
137
+ "border-top-right-radius",
138
+ "border-bottom-left-radius",
139
+ "border-bottom-right-radius"
140
+ ],
141
+ advanced: []
142
+ }, u = {
143
+ title: "Effects",
144
+ dot: [
145
+ "opacity",
146
+ "visibility",
147
+ "cursor",
148
+ "transition",
149
+ "box-shadow",
150
+ "filter",
151
+ "backdrop-filter",
152
+ "mix-blend-mode",
153
+ "isolation",
154
+ "clip-path",
155
+ "transform",
156
+ "transform-origin",
157
+ "perspective",
158
+ "will-change"
159
+ ],
160
+ advanced: [
161
+ "transform-origin",
162
+ "perspective",
163
+ "backdrop-filter",
164
+ "mix-blend-mode",
165
+ "isolation",
166
+ "clip-path",
167
+ "will-change"
168
+ ]
169
+ }, d = {
170
+ title: "Others",
171
+ dot: /* @__PURE__ */ "pointer-events.user-select.touch-action.resize.appearance.scroll-behavior.overscroll-behavior.scroll-snap-type.scroll-snap-align.scroll-snap-stop.scroll-padding-top.scroll-margin-top.accent-color.caret-color.color-scheme.scrollbar-width.scrollbar-color.outline-width.outline-style.outline-color.outline-offset.border-collapse.border-spacing.table-layout.fill.stroke.stroke-width".split("."),
172
+ advanced: [
173
+ "touch-action",
174
+ "resize",
175
+ "appearance",
176
+ "scroll-behavior",
177
+ "overscroll-behavior",
178
+ "scroll-snap-type",
179
+ "scroll-snap-align",
180
+ "scroll-snap-stop",
181
+ "scroll-padding-top",
182
+ "scroll-margin-top",
183
+ "accent-color",
184
+ "caret-color",
185
+ "color-scheme",
186
+ "scrollbar-width",
187
+ "scrollbar-color",
188
+ "border-collapse",
189
+ "border-spacing",
190
+ "table-layout",
191
+ "fill",
192
+ "stroke",
193
+ "stroke-width"
194
+ ]
195
+ }, f = {
196
+ title: "Variables",
197
+ dot: [],
198
+ advanced: []
199
+ }, p = {
200
+ title: "Raw Style",
201
+ dot: [],
202
+ advanced: []
203
+ }, m = {
204
+ list: e,
205
+ listItem: t,
206
+ display: n,
207
+ displayFlexChild: r,
208
+ spacing: i,
209
+ size: a,
210
+ position: o,
211
+ typography: s,
212
+ background: c,
213
+ border: l,
214
+ effects: u,
215
+ others: d,
216
+ variables: f,
217
+ rawStyle: p
218
+ }, h = Object.keys(m);
219
+ //#endregion
220
+ export { c as BACKGROUND_KEYS, l as BORDER_KEYS, h as CATEGORY_IDS, m as CATEGORY_KEYS, n as DISPLAY_KEYS, u as EFFECTS_KEYS, r as FLEX_CHILD_KEYS, t as LIST_ITEM_KEYS, e as LIST_KEYS, d as OTHERS_KEYS, o as POSITION_KEYS, p as RAW_STYLE_KEYS, a as SIZE_KEYS, i as SPACING_KEYS, s as TYPOGRAPHY_KEYS, f as VARIABLES_KEYS };
@@ -1,54 +1,59 @@
1
1
  import e from "../../hooks/useInspectorValues.mjs";
2
2
  import t from "../CategoryAdvanced/CategoryAdvancedContext.mjs";
3
- import n from "../InspectorDots/index.mjs";
4
- import { useCallback as r } from "react";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import o from "clsx";
7
- import s from "@plitzi/plitzi-ui/Icon";
8
- import c from "@plitzi/plitzi-ui/hooks/useStorage";
9
- import l from "@plitzi/plitzi-ui/ContainerCollapsable";
3
+ import n from "../../InspectorSearchContext.mjs";
4
+ import { advancedMatches as r } from "../../search.mjs";
5
+ import i from "../InspectorDots/index.mjs";
6
+ import { use as a, useCallback as o } from "react";
7
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
+ import l from "clsx";
9
+ import u from "@plitzi/plitzi-ui/Icon";
10
+ import d from "@plitzi/plitzi-ui/hooks/useStorage";
11
+ import f from "@plitzi/plitzi-ui/ContainerCollapsable";
10
12
  //#region src/components/StyleInspector/components/CategoryContainer/CategoryContainer.tsx
11
- var u = ({ className: u, classNameContent: d, children: f, title: p = "Title", dotKeys: m, advancedKeys: h, isCollapsed: g = !0, onCollapse: _ }) => {
12
- let [v, y] = c(`builder-state.styleInspector.advanced.${p}`, !1), { hasValues: b } = e({
13
- keys: h,
13
+ var p = ({ className: p, classNameContent: m, children: h, title: g = "Title", dotKeys: _, advancedKeys: v, isCollapsed: y = !0, onCollapse: b }) => {
14
+ let [x, S] = d(`builder-state.styleInspector.advanced.${g}`, !1), { hasValues: C } = e({
15
+ keys: v,
14
16
  asValue: !1
15
- }), x = r((e) => {
16
- e.stopPropagation(), y((e) => !e);
17
- }, [y]);
18
- return /* @__PURE__ */ a(l, {
19
- className: u,
20
- collapsed: g,
21
- onChange: _,
22
- children: [/* @__PURE__ */ i(l.Header, {
23
- className: o("h-8", {
24
- "border-b border-gray-200 hover:bg-slate-100 dark:border-zinc-700 dark:hover:bg-zinc-700/50": g,
25
- "bg-slate-100 dark:bg-zinc-700/50": !g
17
+ }), w = a(n), T = r(v, w), E = x || T, D = o((e) => {
18
+ e.stopPropagation(), S((e) => !e);
19
+ }, [S]);
20
+ return /* @__PURE__ */ c(f, {
21
+ className: p,
22
+ collapsed: y,
23
+ onChange: b,
24
+ children: [/* @__PURE__ */ s(f.Header, {
25
+ className: l("h-8 px-2.5", {
26
+ "border-b border-gray-200 dark:border-zinc-800": y,
27
+ "bg-gray-50 dark:bg-zinc-800/60": !y
28
+ }),
29
+ title: /* @__PURE__ */ s("span", {
30
+ className: "text-[13px] font-medium text-zinc-800 dark:text-zinc-100",
31
+ children: g
26
32
  }),
27
- title: p,
28
33
  placement: "right",
29
- iconCollapsed: /* @__PURE__ */ i(s, { icon: "fa-solid fa-angle-down" }),
30
- iconExpanded: /* @__PURE__ */ i(s, { icon: "fa-solid fa-angle-up" }),
31
- children: /* @__PURE__ */ a("div", {
34
+ iconCollapsed: /* @__PURE__ */ s(u, { icon: "fa-solid fa-angle-down" }),
35
+ iconExpanded: /* @__PURE__ */ s(u, { icon: "fa-solid fa-angle-up" }),
36
+ children: /* @__PURE__ */ c("div", {
32
37
  className: "flex items-center gap-2",
33
- children: [/* @__PURE__ */ i(n, { styleKeys: m }), !!h?.length && !g && /* @__PURE__ */ i(s, {
34
- className: o("cursor-pointer text-xs", {
35
- "text-blue-500": v,
36
- "text-orange-500": !v && b,
37
- "text-gray-400 hover:text-gray-600 dark:text-zinc-500 dark:hover:text-zinc-300": !v && !b
38
+ children: [/* @__PURE__ */ s(i, { styleKeys: _ }), !!v?.length && !y && /* @__PURE__ */ s(u, {
39
+ className: l("cursor-pointer text-xs", {
40
+ "text-primary-500 dark:text-primary-400": E,
41
+ "text-sky-600 dark:text-sky-400": !E && C,
42
+ "text-gray-400 hover:text-gray-600 dark:text-zinc-500 dark:hover:text-zinc-300": !E && !C
38
43
  }),
39
44
  icon: "fa-solid fa-sliders",
40
- title: v ? "Hide advanced properties" : "Show advanced properties",
41
- onClick: x
45
+ title: x ? "Hide advanced properties" : "Show advanced properties",
46
+ onClick: D
42
47
  })]
43
48
  })
44
- }), /* @__PURE__ */ i(l.Content, {
45
- className: o("flex flex-col gap-3 p-2", { "border-b border-gray-200 dark:border-zinc-700": !g }, d),
46
- children: /* @__PURE__ */ i(t, {
47
- value: v,
48
- children: f
49
+ }), /* @__PURE__ */ s(f.Content, {
50
+ className: l("flex flex-col gap-3 px-2.5 py-3", { "border-b border-gray-200 dark:border-zinc-800": !y }, m),
51
+ children: /* @__PURE__ */ s(t, {
52
+ value: E,
53
+ children: h
49
54
  })
50
55
  })]
51
56
  });
52
57
  };
53
58
  //#endregion
54
- export { u as default };
59
+ export { p as default };
@@ -14,7 +14,8 @@ var a = ({ items: a = [], onChange: o }) => {
14
14
  className: r("cursor-pointer rounded-sm p-0.5", {
15
15
  "bg-zinc-300 dark:bg-zinc-800": e.active,
16
16
  "text-xs": typeof e.icon == "string",
17
- "h-5 w-5": e.size !== "custom"
17
+ "h-5 w-5": e.size !== "custom",
18
+ "flex-1 justify-center": e.size === "custom"
18
19
  }),
19
20
  active: e.active,
20
21
  onClick: c(e.value),
@@ -1,18 +1,33 @@
1
1
  import e from "../InspectorLabel/index.mjs";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- import r from "@plitzi/plitzi-ui/Flex";
2
+ import { Children as t } from "react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import i from "clsx";
5
+ import a from "@plitzi/plitzi-ui/Flex";
4
6
  //#region src/components/StyleInspector/components/CategorySection/CategorySection.tsx
5
- var i = ({ children: i, className: a, direction: o = "row", label: s, keys: c }) => /* @__PURE__ */ n(r, {
6
- direction: o,
7
- gap: 2,
8
- justify: s && o === "row" ? "between" : void 0,
9
- items: o === "row" ? "center" : void 0,
10
- className: a,
11
- children: [s && /* @__PURE__ */ t(e, {
12
- className: o === "row" ? "w-18" : "w-full",
13
- keyValue: c,
14
- children: s
15
- }), i]
16
- });
7
+ var o = 2, s = ({ children: s, className: c, direction: l = "row", label: u, keys: d }) => {
8
+ let f = t.toArray(s).length;
9
+ return l === "row" && f > o ? /* @__PURE__ */ r("div", {
10
+ className: i("flex flex-col gap-1", c),
11
+ children: [u && /* @__PURE__ */ n(e, {
12
+ className: "w-full",
13
+ keyValue: d,
14
+ children: u
15
+ }), /* @__PURE__ */ n("div", {
16
+ className: "grid grid-cols-[repeat(auto-fill,minmax(6.5rem,1fr))] items-end gap-2",
17
+ children: s
18
+ })]
19
+ }) : /* @__PURE__ */ r(a, {
20
+ direction: l,
21
+ gap: 2,
22
+ justify: u && l === "row" ? "between" : void 0,
23
+ items: l === "row" ? "center" : void 0,
24
+ className: c,
25
+ children: [u && /* @__PURE__ */ n(e, {
26
+ className: l === "row" ? "w-20" : "w-full",
27
+ keyValue: d,
28
+ children: u
29
+ }), s]
30
+ });
31
+ };
17
32
  //#endregion
18
- export { i as default };
33
+ export { s as default };
@@ -0,0 +1,8 @@
1
+ export type ColorSwatchProps = {
2
+ className?: string;
3
+ /** A color, or any background (a gradient, an image) — drawn over a checkerboard so transparency shows. */
4
+ value: string;
5
+ property?: 'background-color' | 'background';
6
+ };
7
+ declare const _default: import('react').MemoExoticComponent<({ className, value, property }: ColorSwatchProps) => import('react').JSX.Element>;
8
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import { resolveTokens as e } from "../../cssValues.mjs";
2
+ import t from "../../StyleInspectorContext.mjs";
3
+ import { CHECKERBOARD as n } from "./helpers.mjs";
4
+ import { memo as r, use as i, useMemo as a } from "react";
5
+ import { jsx as o } from "react/jsx-runtime";
6
+ import s from "clsx";
7
+ var c = r(({ className: r, value: c, property: l = "background-color" }) => {
8
+ let { variables: u } = i(t), d = a(() => ({ [l === "background" ? "background" : "backgroundColor"]: e(c, u) }), [
9
+ l,
10
+ c,
11
+ u
12
+ ]);
13
+ return /* @__PURE__ */ o("span", {
14
+ className: s("relative inline-flex shrink-0 overflow-hidden rounded ring-1 ring-black/15 ring-inset dark:ring-white/20", r),
15
+ style: n,
16
+ children: /* @__PURE__ */ o("span", {
17
+ className: "absolute inset-0",
18
+ style: d
19
+ })
20
+ });
21
+ });
22
+ //#endregion
23
+ export { c as default };
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+ /** The pattern a transparent color is drawn over, so `transparent` and `rgba(…, 0.2)` read as what they are. */
3
+ export declare const CHECKERBOARD: CSSProperties;
@@ -0,0 +1,9 @@
1
+ //#region src/components/StyleInspector/components/ColorSwatch/helpers.ts
2
+ var e = {
3
+ backgroundImage: "linear-gradient(45deg, #cfcfd8 25%, transparent 25%), linear-gradient(-45deg, #cfcfd8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #cfcfd8 75%), linear-gradient(-45deg, transparent 75%, #cfcfd8 75%)",
4
+ backgroundColor: "#ffffff",
5
+ backgroundSize: "8px 8px",
6
+ backgroundPosition: "0 0, 0 4px, 4px -4px, -4px 0"
7
+ };
8
+ //#endregion
9
+ export { e as CHECKERBOARD };
@@ -0,0 +1,3 @@
1
+ import { default as ColorSwatch } from './ColorSwatch';
2
+ export * from './ColorSwatch';
3
+ export default ColorSwatch;
@@ -0,0 +1,5 @@
1
+ import e from "./ColorSwatch.mjs";
2
+ //#region src/components/StyleInspector/components/ColorSwatch/index.ts
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -2,5 +2,6 @@ import { StyleCategory } from '@plitzi/sdk-shared';
2
2
  export type InspectorDotsProps = {
3
3
  styleKeys?: StyleCategory[];
4
4
  };
5
+ /** The same four sources a row's label is tinted by, summed up for a whole category while it is folded. */
5
6
  declare const InspectorDots: ({ styleKeys }: InspectorDotsProps) => import('react').JSX.Element;
6
7
  export default InspectorDots;
@@ -9,21 +9,21 @@ var r = ({ styleKeys: r }) => {
9
9
  return /* @__PURE__ */ n("div", {
10
10
  className: "flex items-center gap-1.5",
11
11
  children: [
12
- i && /* @__PURE__ */ t("div", {
13
- className: "h-1.5 w-1.5 rounded-full bg-orange-300",
14
- title: "Has Inherit"
15
- }),
16
12
  s && /* @__PURE__ */ t("div", {
17
- className: "h-1.5 w-1.5 rounded-full bg-blue-300",
18
- title: "Has Value"
13
+ className: "h-1.5 w-1.5 rounded-full bg-sky-500 dark:bg-sky-400",
14
+ title: "Has values set on this selector"
15
+ }),
16
+ o && /* @__PURE__ */ t("div", {
17
+ className: "h-1.5 w-1.5 rounded-full bg-emerald-500 dark:bg-emerald-400",
18
+ title: "Uses tokens"
19
19
  }),
20
20
  a && /* @__PURE__ */ t("div", {
21
- className: "h-1.5 w-1.5 rounded-full bg-purple-300",
22
- title: "Has Binding"
21
+ className: "h-1.5 w-1.5 rounded-full bg-violet-500 dark:bg-violet-400",
22
+ title: "Has values bound to data"
23
23
  }),
24
- o && /* @__PURE__ */ t("div", {
25
- className: "h-1.5 w-1.5 rounded-full bg-green-300",
26
- title: "Has Variables"
24
+ i && /* @__PURE__ */ t("div", {
25
+ className: "h-1.5 w-1.5 rounded-full bg-amber-500 dark:bg-amber-400",
26
+ title: "Inherits values from elsewhere"
27
27
  })
28
28
  ]
29
29
  });
@@ -0,0 +1,11 @@
1
+ import { ChangeEvent } from 'react';
2
+ export type InspectorFooterProps = {
3
+ replaceTokens: boolean;
4
+ showAllOptions: boolean;
5
+ canShowAllOptions: boolean;
6
+ onCollapseAll: () => void;
7
+ onChangeReplaceTokens: (e: ChangeEvent<HTMLInputElement>) => void;
8
+ onChangeShowAllOptions: (e: ChangeEvent<HTMLInputElement>) => void;
9
+ };
10
+ declare const InspectorFooter: ({ replaceTokens, showAllOptions, canShowAllOptions, onCollapseAll, onChangeReplaceTokens, onChangeShowAllOptions }: InspectorFooterProps) => import('react').JSX.Element;
11
+ export default InspectorFooter;
@@ -0,0 +1,38 @@
1
+ import { LEGEND as e } from "./helpers.mjs";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import r from "@plitzi/plitzi-ui/Icon";
4
+ import i from "@plitzi/plitzi-ui/Switch";
5
+ //#region src/components/StyleInspector/components/InspectorFooter/InspectorFooter.tsx
6
+ var a = ({ replaceTokens: a, showAllOptions: o, canShowAllOptions: s, onCollapseAll: c, onChangeReplaceTokens: l, onChangeShowAllOptions: u }) => /* @__PURE__ */ n("div", {
7
+ className: "flex items-center justify-between gap-3 border-t border-gray-200 px-2.5 py-1.5 dark:border-zinc-800",
8
+ children: [/* @__PURE__ */ n("div", {
9
+ className: "flex items-center gap-3 text-zinc-500 dark:text-zinc-400",
10
+ children: [/* @__PURE__ */ t(r, {
11
+ className: "cursor-pointer text-xs hover:text-zinc-800 dark:hover:text-zinc-100",
12
+ icon: "fa-solid fa-angles-up",
13
+ title: "Collapse every category",
14
+ onClick: c
15
+ }), /* @__PURE__ */ t(r, {
16
+ className: "cursor-help text-xs",
17
+ icon: "fa-solid fa-circle-info",
18
+ title: e
19
+ })]
20
+ }), /* @__PURE__ */ n("div", {
21
+ className: "flex items-center gap-3 whitespace-nowrap",
22
+ children: [/* @__PURE__ */ t(i, {
23
+ size: "xs",
24
+ label: "Token values",
25
+ title: "Show what each token resolves to instead of its name",
26
+ checked: a,
27
+ onChange: l
28
+ }), s && /* @__PURE__ */ t(i, {
29
+ size: "xs",
30
+ label: "All options",
31
+ title: "Show every category, including the ones this element does not use",
32
+ checked: o,
33
+ onChange: u
34
+ })]
35
+ })]
36
+ });
37
+ //#endregion
38
+ export { a as default };
@@ -0,0 +1,2 @@
1
+ /** What the colour of a row's label — and of the dots on a folded category — says about where its value comes from. */
2
+ export declare const LEGEND: string;
@@ -0,0 +1,11 @@
1
+ //#region src/components/StyleInspector/components/InspectorFooter/helpers.ts
2
+ var e = [
3
+ "Label colours",
4
+ "Blue — set on this selector (click the label to reset it)",
5
+ "Green — set from a token",
6
+ "Violet — bound to data",
7
+ "Amber — inherited from another selector or breakpoint",
8
+ "Grey — nothing set, the default applies"
9
+ ].join("\n");
10
+ //#endregion
11
+ export { e as LEGEND };
@@ -0,0 +1,3 @@
1
+ import { default as InspectorFooter } from './InspectorFooter';
2
+ export * from './InspectorFooter';
3
+ export default InspectorFooter;
@@ -0,0 +1,5 @@
1
+ import e from "./InspectorFooter.mjs";
2
+ //#region src/components/StyleInspector/components/InspectorFooter/index.ts
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };