@plitzi/sdk-style 0.32.0 → 0.32.2

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 (115) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/BuilderStyleContextProvider.d.ts +1 -1
  3. package/dist/BuilderStyleContextProvider.mjs +47 -45
  4. package/dist/SdkStyleContextProvider.d.ts +1 -1
  5. package/dist/SdkStyleContextProvider.mjs +3 -3
  6. package/dist/StyleAdvanceEditor.d.ts +1 -1
  7. package/dist/StyleAdvanceEditor.mjs +20 -20
  8. package/dist/StyleMap/helpers/isValueValid.mjs +1 -1
  9. package/dist/StyleMap/helpers/utils.mjs +1 -1
  10. package/dist/components/InputEasing/BezierEasing.mjs +26 -26
  11. package/dist/components/InputEasing/Curve.d.ts +1 -1
  12. package/dist/components/InputEasing/Grid.d.ts +1 -1
  13. package/dist/components/InputEasing/Grid.mjs +7 -1
  14. package/dist/components/InputEasing/InputEasing.d.ts +1 -1
  15. package/dist/components/InputEasing/InputEasingButton.d.ts +1 -1
  16. package/dist/components/InputEasing/InputEasingList.d.ts +1 -1
  17. package/dist/components/InputEasing/Progress.d.ts +1 -1
  18. package/dist/components/Selector/Selector.d.ts +1 -1
  19. package/dist/components/Selector/SelectorItem/ItemOptions.d.ts +1 -1
  20. package/dist/components/Selector/SelectorItem/SelectorItem.d.ts +1 -1
  21. package/dist/components/Selector/SelectorSuggestions/SelectorSuggestions.d.ts +1 -1
  22. package/dist/components/Selector/SelectorSuggestions/SuggestionsCreator.d.ts +1 -1
  23. package/dist/components/Selector/SelectorSuggestions/SuggestionsList.d.ts +1 -1
  24. package/dist/components/StyleInspector/Inspector.d.ts +1 -1
  25. package/dist/components/StyleInspector/StyleInspector.d.ts +1 -1
  26. package/dist/components/StyleInspector/StyleInspector.mjs +66 -66
  27. package/dist/components/StyleInspector/StyleInspectorProvider.d.ts +1 -1
  28. package/dist/components/StyleInspector/StyleInspectorProvider.mjs +24 -21
  29. package/dist/components/StyleInspector/categories/Background/Background.d.ts +1 -1
  30. package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.d.ts +1 -1
  31. package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.d.ts +1 -1
  32. package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.d.ts +1 -1
  33. package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.d.ts +1 -1
  34. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.d.ts +1 -1
  35. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.d.ts +1 -1
  36. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.d.ts +1 -1
  37. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.d.ts +1 -1
  38. package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.d.ts +1 -1
  39. package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +1 -1
  40. package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.d.ts +1 -1
  41. package/dist/components/StyleInspector/categories/Background/modes/ImageMode.d.ts +1 -1
  42. package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.d.ts +1 -1
  43. package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.d.ts +1 -1
  44. package/dist/components/StyleInspector/categories/Border/Border.d.ts +1 -1
  45. package/dist/components/StyleInspector/categories/Border/BorderColor.d.ts +1 -1
  46. package/dist/components/StyleInspector/categories/Border/BorderPlacements.d.ts +1 -1
  47. package/dist/components/StyleInspector/categories/Border/BorderRadius.d.ts +1 -1
  48. package/dist/components/StyleInspector/categories/Border/BorderStyle.d.ts +1 -1
  49. package/dist/components/StyleInspector/categories/Border/BorderWidth.d.ts +1 -1
  50. package/dist/components/StyleInspector/categories/Display/Display.d.ts +1 -1
  51. package/dist/components/StyleInspector/categories/Display/DisplayElements.d.ts +1 -1
  52. package/dist/components/StyleInspector/categories/Display/DisplayFlex.d.ts +1 -1
  53. package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignContent.d.ts +1 -1
  54. package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignItems.d.ts +1 -1
  55. package/dist/components/StyleInspector/categories/Display/DisplayFlexDirection.d.ts +1 -1
  56. package/dist/components/StyleInspector/categories/Display/DisplayFlexJustify.d.ts +1 -1
  57. package/dist/components/StyleInspector/categories/Display/DisplayGap.d.ts +1 -1
  58. package/dist/components/StyleInspector/categories/Display/DisplayGridGap.d.ts +1 -1
  59. package/dist/components/StyleInspector/categories/Display/DisplayGridTemplate.d.ts +1 -1
  60. package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.d.ts +1 -1
  61. package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.d.ts +1 -1
  62. package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayOrder.d.ts +1 -1
  63. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.d.ts +1 -1
  64. package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.d.ts +1 -1
  65. package/dist/components/StyleInspector/categories/Effects/Effects.d.ts +1 -1
  66. package/dist/components/StyleInspector/categories/Effects/Filters/Filter.d.ts +1 -1
  67. package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.d.ts +1 -1
  68. package/dist/components/StyleInspector/categories/Effects/Transform/Transform.d.ts +1 -1
  69. package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.d.ts +1 -1
  70. package/dist/components/StyleInspector/categories/Effects/Transition/Transition.d.ts +1 -1
  71. package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.d.ts +1 -1
  72. package/dist/components/StyleInspector/categories/List/List.d.ts +1 -1
  73. package/dist/components/StyleInspector/categories/ListItem/ListItem.d.ts +1 -1
  74. package/dist/components/StyleInspector/categories/Position/Position.d.ts +1 -1
  75. package/dist/components/StyleInspector/categories/Position/PositionAdvanced.d.ts +1 -1
  76. package/dist/components/StyleInspector/categories/Position/PositionAdvancedButtons.d.ts +1 -1
  77. package/dist/components/StyleInspector/categories/Position/PositionClear.d.ts +1 -1
  78. package/dist/components/StyleInspector/categories/Position/PositionFloat.d.ts +1 -1
  79. package/dist/components/StyleInspector/categories/RawStyle/RawStyle.d.ts +1 -1
  80. package/dist/components/StyleInspector/categories/Size/Size.d.ts +1 -1
  81. package/dist/components/StyleInspector/categories/Size/SizeFit.d.ts +1 -1
  82. package/dist/components/StyleInspector/categories/Size/SizeOverflow.d.ts +1 -1
  83. package/dist/components/StyleInspector/categories/Size/SizePosition.d.ts +1 -1
  84. package/dist/components/StyleInspector/categories/Spacing/Spacing.d.ts +1 -1
  85. package/dist/components/StyleInspector/categories/Spacing/SpacingEditor.d.ts +1 -1
  86. package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.d.ts +1 -1
  87. package/dist/components/StyleInspector/categories/Spacing/SpacingNumber.d.ts +1 -1
  88. package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.d.ts +1 -1
  89. package/dist/components/StyleInspector/categories/Typography/Typography.d.ts +1 -1
  90. package/dist/components/StyleInspector/categories/Typography/TypographyAlign.d.ts +1 -1
  91. package/dist/components/StyleInspector/categories/Typography/TypographyFont.d.ts +1 -1
  92. package/dist/components/StyleInspector/categories/Typography/TypographyStyle.d.ts +1 -1
  93. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.d.ts +1 -1
  94. package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.d.ts +1 -1
  95. package/dist/components/StyleInspector/categories/Typography/TypographyTransform.d.ts +1 -1
  96. package/dist/components/StyleInspector/categories/Variables/Variables.d.ts +1 -1
  97. package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.d.ts +1 -1
  98. package/dist/components/StyleInspector/components/CategoryOption/CategoryOption.d.ts +1 -1
  99. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionColor.d.ts +1 -1
  100. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.d.ts +1 -1
  101. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionInput.d.ts +1 -1
  102. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.d.ts +1 -1
  103. package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.d.ts +1 -1
  104. package/dist/components/StyleInspector/components/CategorySection/CategorySection.d.ts +1 -1
  105. package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.d.ts +1 -1
  106. package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.d.ts +1 -1
  107. package/dist/components/StyleInspector/hooks/useStyleBinding.mjs +4 -4
  108. package/dist/components/StyleInspector/hooks/useStyleInherit.mjs +5 -5
  109. package/dist/components/StyleManager/ManagerSelector.d.ts +1 -1
  110. package/dist/components/StyleManager/StyleManager.d.ts +1 -1
  111. package/dist/components/StyleManager/StyleManager.mjs +13 -13
  112. package/dist/components/StyleManager/StyleSelectorTag.d.ts +1 -1
  113. package/dist/helpers/processSelectorAttributes.mjs +1 -1
  114. package/dist/models/SelectorForm/SelectorForm.d.ts +1 -1
  115. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @plitzi/sdk-style
2
2
 
3
+ ## 0.32.2
4
+
5
+ ### Patch Changes
6
+
7
+ - v0.32.2
8
+ - Updated dependencies
9
+ - @plitzi/sdk-plugins@0.32.2
10
+ - @plitzi/sdk-shared@0.32.2
11
+ - @plitzi/sdk-variables@0.32.2
12
+
13
+ ## 0.32.1
14
+
15
+ ### Patch Changes
16
+
17
+ - v0.32.1
18
+ - Updated dependencies
19
+ - @plitzi/sdk-plugins@0.32.1
20
+ - @plitzi/sdk-shared@0.32.1
21
+ - @plitzi/sdk-variables@0.32.1
22
+
3
23
  ## 0.32.0
4
24
 
5
25
  ### Minor Changes
@@ -8,5 +8,5 @@ export type BuilderStyleContextProviderProps = {
8
8
  includeSubscriptions?: boolean;
9
9
  middlewares?: ReducerMiddlewareCallback<Style, [action: StyleReducerActions]>[];
10
10
  };
11
- declare const BuilderStyleContextProvider: ({ children, style: styleProp, includeSubscriptions, middlewares: middlewaresProp }: BuilderStyleContextProviderProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const BuilderStyleContextProvider: ({ children, style: styleProp, includeSubscriptions, middlewares: middlewaresProp }: BuilderStyleContextProviderProps) => React.JSX.Element;
12
12
  export default BuilderStyleContextProvider;
@@ -4,7 +4,7 @@ import n, { StyleActions as r } from "./StyleReducer.mjs";
4
4
  import { get as i } from "@plitzi/plitzi-ui/helpers";
5
5
  import { use as a, useCallback as o, useEffect as s, useMemo as c } from "react";
6
6
  import { jsx as l } from "react/jsx-runtime";
7
- import { createStoreHook as u } from "@plitzi/nexus/createStore";
7
+ import { useCommonStoreSync as u } from "@plitzi/sdk-shared/store";
8
8
  import d from "@plitzi/plitzi-ui/hooks/useReducerWithMiddleware";
9
9
  import f from "@plitzi/sdk-event-bridge/hooks/useEventBridge";
10
10
  import p from "@plitzi/sdk-shared/network/NetworkContext";
@@ -14,13 +14,13 @@ var h = ({ children: h, style: g, includeSubscriptions: _ = !0, middlewares: v =
14
14
  let { subscriptionManager: y } = a(p), b = c(() => v.map((e) => ({
15
15
  middleware: e,
16
16
  filterCallback: (e) => !e.fromSubscriptions
17
- })), [v]), [x, S] = d(n, g ?? m, b), { useStoreSync: C } = u();
18
- C("style", x);
19
- let w = o((e, t = !1) => S({
17
+ })), [v]), [x, S] = d(n, g ?? m, b);
18
+ u("style", x);
19
+ let C = o((e, t = !1) => S({
20
20
  type: r.STYLE_UPDATE,
21
21
  style: e,
22
22
  fromSubscriptions: t
23
- }), [S]), T = o((t, n, i, a, o, s, c = !1) => {
23
+ }), [S]), w = o((t, n, i, a, o, s, c = !1) => {
24
24
  n ||= e(i), S({
25
25
  type: r.STYLE_ADD_SELECTOR,
26
26
  displayMode: t,
@@ -31,7 +31,7 @@ var h = ({ children: h, style: g, includeSubscriptions: _ = !0, middlewares: v =
31
31
  params: s,
32
32
  fromSubscriptions: c
33
33
  });
34
- }, [S]), E = o((e, t, n, i, a, o = !1) => S({
34
+ }, [S]), T = o((e, t, n, i, a, o = !1) => S({
35
35
  type: r.STYLE_UPDATE_SELECTOR,
36
36
  displayMode: e,
37
37
  selector: t,
@@ -39,12 +39,12 @@ var h = ({ children: h, style: g, includeSubscriptions: _ = !0, middlewares: v =
39
39
  value: i,
40
40
  params: a,
41
41
  fromSubscriptions: o
42
- }), [S]), D = o((e, t, n = !1) => S({
42
+ }), [S]), E = o((e, t, n = !1) => S({
43
43
  type: r.STYLE_REMOVE_SELECTOR,
44
44
  displayMode: e,
45
45
  selector: t,
46
46
  fromSubscriptions: n
47
- }), [S]), O = o((e, t, n, i, a, o = !1) => {
47
+ }), [S]), D = o((e, t, n, i, a, o = !1) => {
48
48
  S({
49
49
  type: r.STYLE_ADD_SELECTOR_VARIABLE,
50
50
  displayMode: e,
@@ -54,7 +54,7 @@ var h = ({ children: h, style: g, includeSubscriptions: _ = !0, middlewares: v =
54
54
  value: a,
55
55
  fromSubscriptions: o
56
56
  });
57
- }, [S]), k = o((e, t, n, i, a, o = !1) => {
57
+ }, [S]), O = o((e, t, n, i, a, o = !1) => {
58
58
  S({
59
59
  type: r.STYLE_UPDATE_SELECTOR_VARIABLE,
60
60
  displayMode: e,
@@ -64,7 +64,7 @@ var h = ({ children: h, style: g, includeSubscriptions: _ = !0, middlewares: v =
64
64
  value: a,
65
65
  fromSubscriptions: o
66
66
  });
67
- }, [S]), A = o((e, t, n, i, a = !1) => {
67
+ }, [S]), k = o((e, t, n, i, a = !1) => {
68
68
  S({
69
69
  type: r.STYLE_REMOVE_SELECTOR_VARIABLE,
70
70
  displayMode: e,
@@ -73,28 +73,28 @@ var h = ({ children: h, style: g, includeSubscriptions: _ = !0, middlewares: v =
73
73
  name: i,
74
74
  fromSubscriptions: a
75
75
  });
76
- }, [S]), j = o((e, t, n, i = !1) => S({
76
+ }, [S]), A = o((e, t, n, i = !1) => S({
77
77
  type: r.STYLE_ADD_VARIABLE,
78
78
  category: e,
79
79
  name: t,
80
80
  value: n,
81
81
  fromSubscriptions: i
82
- }), [S]), M = o((e, t, n, i = !1) => S({
82
+ }), [S]), j = o((e, t, n, i = !1) => S({
83
83
  type: r.STYLE_UPDATE_VARIABLE,
84
84
  category: e,
85
85
  name: t,
86
86
  value: n,
87
87
  fromSubscriptions: i
88
- }), [S]), N = o((e, t, n = !1) => S({
88
+ }), [S]), M = o((e, t, n = !1) => S({
89
89
  type: r.STYLE_REMOVE_VARIABLE,
90
90
  category: e,
91
91
  name: t,
92
92
  fromSubscriptions: n
93
- }), [S]), P = o((e, t = !1) => S({
93
+ }), [S]), N = o((e, t = !1) => S({
94
94
  type: r.STYLE_ADD_TEMPLATE,
95
95
  platform: e,
96
96
  fromSubscriptions: t
97
- }), [S]), F = o((e, t, n = !1) => {
97
+ }), [S]), P = o((e, t, n = !1) => {
98
98
  S({
99
99
  type: r.STYLE_UPDATE_SETTINGS,
100
100
  path: e,
@@ -103,47 +103,49 @@ var h = ({ children: h, style: g, includeSubscriptions: _ = !0, middlewares: v =
103
103
  });
104
104
  }, [S]);
105
105
  s(() => (_ && (y.subscribe("StyleUpdated", {}, (e) => {
106
- !e.data || e.error || w(i(e, "data.StyleUpdated", {}), !0);
106
+ if (!e.data || e.error) return;
107
+ let t = i(e, "data.StyleUpdated", {});
108
+ C(t, !0);
107
109
  }), y.subscribe("StyleAddSelector", {}, (e) => {
108
110
  if (!e.data || e.error) return;
109
111
  let { displayMode: t, selector: n, type: r, path: a, style: o, params: s } = i(e, "data.StyleAddSelector", {});
110
- T(t, n, r, a, o, s, !0);
112
+ w(t, n, r, a, o, s, !0);
111
113
  }), y.subscribe("StyleUpdateSelector", {}, (e) => {
112
114
  if (!e.data || e.error) return;
113
115
  let { displayMode: t, selector: n, path: r, style: a, params: o } = i(e, "data.StyleUpdateSelector", {});
114
- E(t, n, r, a, o, !0);
116
+ T(t, n, r, a, o, !0);
115
117
  }), y.subscribe("StyleRemoveSelector", {}, (e) => {
116
118
  if (!e.data || e.error) return;
117
119
  let { displayMode: t, selector: n } = i(e, "data.StyleRemoveSelector", {});
118
- D(t, n, !0);
120
+ E(t, n, !0);
119
121
  }), y.subscribe("StyleAddSelectorVariable", {}, (e) => {
120
122
  if (!e.data || e.error) return;
121
123
  let { displayMode: t, selector: n, category: r, name: a, value: o } = i(e, "data.StyleAddSelectorVariable", {});
122
- O(t, n, r, a, o, !0);
124
+ D(t, n, r, a, o, !0);
123
125
  }), y.subscribe("StyleUpdateSelectorVariable", {}, (e) => {
124
126
  if (!e.data || e.error) return;
125
127
  let { displayMode: t, selector: n, category: r, name: a, value: o } = i(e, "data.StyleUpdateSelectorVariable", {});
126
- k(t, n, r, a, o, !0);
128
+ O(t, n, r, a, o, !0);
127
129
  }), y.subscribe("StyleRemoveSelectorVariable", {}, (e) => {
128
130
  if (!e.data || e.error) return;
129
131
  let { displayMode: t, selector: n, category: r, name: a } = i(e, "data.StyleRemoveSelectorVariable", {});
130
- A(t, n, r, a, !0);
132
+ k(t, n, r, a, !0);
131
133
  }), y.subscribe("StyleAddVariable", {}, (e) => {
132
134
  if (!e.data || e.error) return;
133
135
  let { category: t, name: n, value: r } = i(e, "data.StyleAddVariable", {});
134
- j(t, n, r, !0);
136
+ A(t, n, r, !0);
135
137
  }), y.subscribe("StyleUpdateVariable", {}, (e) => {
136
138
  if (!e.data || e.error) return;
137
139
  let { category: t, name: n, value: r } = i(e, "data.StyleUpdateVariable", {});
138
- M(t, n, r, !0);
140
+ j(t, n, r, !0);
139
141
  }), y.subscribe("StyleRemoveVariable", {}, (e) => {
140
142
  if (!e.data || e.error) return;
141
143
  let { category: t, name: n } = i(e, "data.StyleRemoveVariable", {});
142
- N(t, n, !0);
144
+ M(t, n, !0);
143
145
  }), y.subscribe("StyleUpdateSettings", {}, (e) => {
144
146
  if (!e.data || e.error) return;
145
147
  let { path: t, value: n } = i(e, "data.StyleUpdateSettings", {});
146
- F(t, n, !0);
148
+ P(t, n, !0);
147
149
  })), () => {
148
150
  _ && y.unsubscribe([
149
151
  "StyleUpdated",
@@ -161,6 +163,7 @@ var h = ({ children: h, style: g, includeSubscriptions: _ = !0, middlewares: v =
161
163
  }), [
162
164
  y,
163
165
  _,
166
+ C,
164
167
  w,
165
168
  T,
166
169
  E,
@@ -170,23 +173,23 @@ var h = ({ children: h, style: g, includeSubscriptions: _ = !0, middlewares: v =
170
173
  A,
171
174
  j,
172
175
  M,
173
- N,
174
- F
176
+ P
175
177
  ]);
176
- let I = c(() => ({
177
- styleUpdate: w,
178
- styleAddSelector: T,
179
- styleUpdateSelector: E,
180
- styleRemoveSelector: D,
181
- styleAddSelectorVariable: O,
182
- styleUpdateSelectorVariable: k,
183
- styleRemoveSelectorVariable: A,
184
- styleAddVariable: j,
185
- styleUpdateVariable: M,
186
- styleRemoveVariable: N,
187
- styleAddTemplate: P,
188
- styleUpdateSettings: F
178
+ let F = c(() => ({
179
+ styleUpdate: C,
180
+ styleAddSelector: w,
181
+ styleUpdateSelector: T,
182
+ styleRemoveSelector: E,
183
+ styleAddSelectorVariable: D,
184
+ styleUpdateSelectorVariable: O,
185
+ styleRemoveSelectorVariable: k,
186
+ styleAddVariable: A,
187
+ styleUpdateVariable: j,
188
+ styleRemoveVariable: M,
189
+ styleAddTemplate: N,
190
+ styleUpdateSettings: P
189
191
  }), [
192
+ C,
190
193
  w,
191
194
  T,
192
195
  E,
@@ -197,11 +200,10 @@ var h = ({ children: h, style: g, includeSubscriptions: _ = !0, middlewares: v =
197
200
  j,
198
201
  M,
199
202
  N,
200
- P,
201
- F
203
+ P
202
204
  ]);
203
- return f("main", I), /* @__PURE__ */ l(t, {
204
- value: I,
205
+ return f("main", F), /* @__PURE__ */ l(t, {
206
+ value: F,
205
207
  children: h
206
208
  });
207
209
  };
@@ -4,5 +4,5 @@ export type SdkStyleContextProviderProps = {
4
4
  children: ReactNode;
5
5
  style?: Style;
6
6
  };
7
- declare const SdkStyleContextProvider: ({ children, style: styleProp }: SdkStyleContextProviderProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const SdkStyleContextProvider: ({ children, style: styleProp }: SdkStyleContextProviderProps) => import("react").JSX.Element;
8
8
  export default SdkStyleContextProvider;
@@ -1,13 +1,13 @@
1
1
  import e from "./StyleContext.mjs";
2
2
  import { use as t, useMemo as n } from "react";
3
3
  import { jsx as r } from "react/jsx-runtime";
4
- import { createStoreHook as i } from "@plitzi/nexus/createStore";
4
+ import { useBuilderStoreSync as i } from "@plitzi/sdk-shared/store";
5
5
  import { EMPTY_STYLE_SCHEMA as a } from "@plitzi/sdk-shared/style/styleConstants";
6
6
  import o from "@plitzi/sdk-shared/network/NetworkInternalContext";
7
7
  //#region src/SdkStyleContextProvider.tsx
8
8
  var s = ({ children: s, style: c }) => {
9
- let { style: l } = t(o), u = n(() => ({}), []), { useStoreSync: d } = i();
10
- return d("style", c ?? (l || a)), /* @__PURE__ */ r(e, {
9
+ let { style: l } = t(o), u = n(() => ({}), []);
10
+ return i("style", c ?? (l || a)), /* @__PURE__ */ r(e, {
11
11
  value: u,
12
12
  children: s
13
13
  });
@@ -1,2 +1,2 @@
1
- declare const StyleAdvanceEditor: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const StyleAdvanceEditor: () => import("react").JSX.Element;
2
2
  export default StyleAdvanceEditor;
@@ -3,7 +3,7 @@ import { use as n, useCallback as r, useMemo as i, useState as a } from "react";
3
3
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
4
  import c from "@plitzi/plitzi-ui/ContainerFloating";
5
5
  import l from "@plitzi/plitzi-ui/Button";
6
- import { createStoreHook as u } from "@plitzi/nexus/createStore";
6
+ import { useCommonStore as u } from "@plitzi/sdk-shared/store";
7
7
  import d from "@plitzi/plitzi-ui/CodeMirror";
8
8
  import { ThemeContext as f } from "@plitzi/sdk-shared/theme/ThemeProvider";
9
9
  import p from "@plitzi/sdk-shared/network/NetworkContext";
@@ -11,46 +11,46 @@ import m from "@plitzi/sdk-shared/hooks/useNetwork";
11
11
  import h from "@plitzi/sdk-shared/schema/SchemaContext";
12
12
  //#region src/StyleAdvanceEditor.tsx
13
13
  var g = () => {
14
- let { theme: g } = n(f), { useStore: _ } = u(), [[v = "", y = void 0]] = _(["schema.settings.customCss", "style.variables"]), { schemaUpdateSettings: b } = n(h), [x, S] = a(() => typeof v == "string" ? v : ""), C = i(() => b && e(b, 500), [b]), { server: w, webKey: T } = n(p), { networkQuery: E, networkLoading: D } = m({
14
+ let { theme: g } = n(f), [[_ = "", v = void 0]] = u(["schema.settings.customCss", "style.variables"]), { schemaUpdateSettings: y } = n(h), [b, x] = a(() => typeof _ == "string" ? _ : ""), S = i(() => y && e(y, 500), [y]), { server: C, webKey: w } = n(p), { networkQuery: T, networkLoading: E } = m({
15
15
  initLoading: !1,
16
- server: w,
17
- webKey: T
18
- }), O = r((e) => {
19
- C?.(e, "customCss"), S(e);
20
- }, [S, C]), k = r(async () => {
21
- let e = await E("/utils/prettier-parser", {
22
- data: x,
16
+ server: C,
17
+ webKey: w
18
+ }), D = r((e) => {
19
+ S?.(e, "customCss"), x(e);
20
+ }, [x, S]), O = r(async () => {
21
+ let e = await T("/utils/prettier-parser", {
22
+ data: b,
23
23
  parser: "css"
24
24
  }, "post");
25
25
  if (!e || !e.data) return;
26
- let n = t(e, "data", x);
27
- n !== x && (S(n), C?.(n, "customCss"));
26
+ let n = t(e, "data", b);
27
+ n !== b && (x(n), S?.(n, "customCss"));
28
28
  }, [
29
- E,
30
- x,
31
- C
29
+ T,
30
+ b,
31
+ S
32
32
  ]);
33
33
  return /* @__PURE__ */ s("div", {
34
34
  className: "relative flex h-full w-full flex-col",
35
35
  children: [/* @__PURE__ */ o(d, {
36
36
  className: "h-full",
37
- value: x,
38
- autoComplete: i(() => y ? Object.keys(y).flatMap((e) => Object.keys(y[e] ?? {})).map((e) => ({
37
+ value: b,
38
+ autoComplete: i(() => v ? Object.keys(v).flatMap((e) => Object.keys(v[e] ?? {})).map((e) => ({
39
39
  type: "css-token",
40
40
  value: e
41
- })) : [], [y]),
41
+ })) : [], [v]),
42
42
  theme: g === "dark" ? "dark" : "light",
43
43
  lineWrapping: !0,
44
- onChange: O
44
+ onChange: D
45
45
  }), /* @__PURE__ */ s("div", {
46
46
  className: "absolute top-3 right-3 flex",
47
47
  children: [/* @__PURE__ */ o(l, {
48
48
  intent: "custom",
49
49
  size: "custom",
50
50
  className: "mr-2 rounded-sm bg-white p-2 text-zinc-800 shadow dark:bg-zinc-700 dark:text-zinc-200",
51
- onClick: k,
51
+ onClick: O,
52
52
  title: "Auto format",
53
- disabled: D,
53
+ disabled: E,
54
54
  children: /* @__PURE__ */ o("i", { className: "fa-solid fa-wand-magic-sparkles" })
55
55
  }), /* @__PURE__ */ s(c, {
56
56
  containerLeftOffset: -208,
@@ -4,4 +4,4 @@ var e = (e) => typeof e == "string" || typeof e == "number" || e === void 0, t =
4
4
  return !s && !u && !d && !f ? o(c) : !s && !u && d && f ? !1 : !s && !u && d ? i(c) : !s && !u && f ? r(c) : s ? e(c) : u ? c === void 0 ? !0 : e(c) || !t(c) ? !1 : n(c) || a(c) : !1;
5
5
  };
6
6
  //#endregion
7
- export { s as default, o as isStyleAttributes, n as isStyleObject };
7
+ export { s as default, o as isStyleAttributes, a as isStyleBlock, n as isStyleObject, r as isStyleStates, i as isStyleVariants };
@@ -48,4 +48,4 @@ var i = (t, n, r) => {
48
48
  r(c, m, {});
49
49
  };
50
50
  //#endregion
51
- export { s as writeStyle };
51
+ export { a as getTargetPath, o as isEmptyObject, i as parseValue, s as writeStyle };
@@ -1,34 +1,34 @@
1
1
  //#region src/components/InputEasing/BezierEasing.ts
2
- var e = 4, t = .001, n = 1e-7, r = 10, i = 11, a = 1 / (i - 1), o = typeof Float32Array == "function", s = (e, t) => 1 - 3 * t + 3 * e, c = (e, t) => 3 * t - 6 * e, l = (e) => 3 * e, u = (e, t, n) => ((s(t, n) * e + c(t, n)) * e + l(t)) * e, d = (e, t, n) => 3 * s(t, n) * e * e + 2 * c(t, n) * e + l(t), f = (e, t, i, a, o) => {
3
- let s, c, l = 0;
2
+ var e = 11, t = 1 / (e - 1), n = typeof Float32Array == "function", r = (e, t) => 1 - 3 * t + 3 * e, i = (e, t) => 3 * t - 6 * e, a = (e) => 3 * e, o = (e, t, n) => ((r(t, n) * e + i(t, n)) * e + a(t)) * e, s = (e, t, n) => 3 * r(t, n) * e * e + 2 * i(t, n) * e + a(t), c = (e, t, n, r, i) => {
3
+ let a, s, c = 0;
4
4
  do
5
- c = t + (i - t) / 2, s = u(c, a, o) - e, s > 0 ? i = c : t = c;
6
- while (Math.abs(s) > n && ++l < r);
7
- return c;
8
- }, p = (t, n, r, i) => {
9
- for (let a = 0; a < e; ++a) {
10
- let e = d(n, r, i);
11
- if (e === 0) return n;
12
- let a = u(n, r, i) - t;
13
- n -= a / e;
5
+ s = t + (n - t) / 2, a = o(s, r, i) - e, a > 0 ? n = s : t = s;
6
+ while (Math.abs(a) > 1e-7 && ++c < 10);
7
+ return s;
8
+ }, l = (e, t, n, r) => {
9
+ for (let i = 0; i < 4; ++i) {
10
+ let i = s(t, n, r);
11
+ if (i === 0) return t;
12
+ let a = o(t, n, r) - e;
13
+ t -= a / i;
14
14
  }
15
- return n;
16
- }, m = (e) => e;
17
- function h(e, n, r, s) {
18
- if (!(e >= 0 && e <= 1 && r >= 0 && r <= 1)) throw Error("bezier x values must be in [0, 1] range");
19
- if (e === n && r === s) return m;
20
- let c = o ? new Float32Array(i) : Array(i);
21
- for (let t = 0; t < i; ++t) c[t] = u(t * a, e, r);
22
- function l(n) {
23
- let o = 0, s = 1, l = i - 1;
24
- for (; s !== l && c[s] <= n; ++s) o += a;
25
- --s;
26
- let u = (n - c[s]) / (c[s + 1] - c[s]), m = o + u * a, h = d(m, e, r);
27
- return h >= t ? p(n, m, e, r) : h === 0 ? m : f(n, o, o + a, e, r);
15
+ return t;
16
+ }, u = (e) => e;
17
+ function d(r, i, a, d) {
18
+ if (!(r >= 0 && r <= 1 && a >= 0 && a <= 1)) throw Error("bezier x values must be in [0, 1] range");
19
+ if (r === i && a === d) return u;
20
+ let f = n ? new Float32Array(e) : Array(e);
21
+ for (let n = 0; n < e; ++n) f[n] = o(n * t, r, a);
22
+ function p(n) {
23
+ let i = 0, o = 1, u = e - 1;
24
+ for (; o !== u && f[o] <= n; ++o) i += t;
25
+ --o;
26
+ let d = (n - f[o]) / (f[o + 1] - f[o]), p = i + d * t, m = s(p, r, a);
27
+ return m >= .001 ? l(n, p, r, a) : m === 0 ? p : c(n, i, i + t, r, a);
28
28
  }
29
29
  return function(e) {
30
- return e === 0 || e === 1 ? e : u(l(e), n, s);
30
+ return e === 0 || e === 1 ? e : o(p(e), i, d);
31
31
  };
32
32
  }
33
33
  //#endregion
34
- export { h as default };
34
+ export { d as default };
@@ -5,5 +5,5 @@ export type CurveProps = {
5
5
  yFrom?: number;
6
6
  yTo?: number;
7
7
  };
8
- declare const Curve: ({ value, xFrom, xTo, yFrom, yTo }: CurveProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const Curve: ({ value, xFrom, xTo, yFrom, yTo }: CurveProps) => import("react").JSX.Element;
9
9
  export default Curve;
@@ -4,5 +4,5 @@ export type GridProps = {
4
4
  yFrom?: number;
5
5
  yTo?: number;
6
6
  };
7
- declare const Grid: ({ xFrom, xTo, yFrom, yTo }: GridProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const Grid: ({ xFrom, xTo, yFrom, yTo }: GridProps) => import("react").JSX.Element;
8
8
  export default Grid;
@@ -5,7 +5,13 @@ var n = ({ xFrom: n = 0, xTo: r = 0, yFrom: i = 0, yTo: a = 0 }) => {
5
5
  let r = [];
6
6
  for (let i = e; i < t; i += n) r.push(i);
7
7
  return r;
8
- }, u = (e) => l(0, 1, 1 / e).map(s), d = (e) => l(0, 1, 1 / e).map(c), f = s(0), p = c(0), m = s(1), h = c(1), g = u(2), _ = d(2), v = u(10), y = d(10), b = `M${f},${p} L${f},${h} L${m},${h} L${m},${p} Z`, x = v.map((e) => `M${e},${p} L${e},${h}`).concat(y.map((e) => `M${f},${e} L${m},${e}`)).join(" "), S = g.map((e) => `M${e},${p} L${e},${h}`).concat(_.map((e) => `M${f},${e} L${m},${e}`)).concat([`M${f},${p} L${m},${h}`]).join(" "), C = y.map((e, t) => `M${f},${e} L${f - (3 + (t % 5 == 0 ? 2 : 0))},${e}`).join(" "), w = v.map((e, t) => `M${e},${p} L${e},${p + (3 + (t % 5 == 0 ? 2 : 0))}`).join(" ");
8
+ }, u = (e) => l(0, 1, 1 / e).map(s), d = (e) => l(0, 1, 1 / e).map(c), f = s(0), p = c(0), m = s(1), h = c(1), g = u(2), _ = d(2), v = u(10), y = d(10), b = `M${f},${p} L${f},${h} L${m},${h} L${m},${p} Z`, x = v.map((e) => `M${e},${p} L${e},${h}`).concat(y.map((e) => `M${f},${e} L${m},${e}`)).join(" "), S = g.map((e) => `M${e},${p} L${e},${h}`).concat(_.map((e) => `M${f},${e} L${m},${e}`)).concat([`M${f},${p} L${m},${h}`]).join(" "), C = y.map((e, t) => {
9
+ let n = 3 + (t % 5 == 0 ? 2 : 0);
10
+ return `M${f},${e} L${f - n},${e}`;
11
+ }).join(" "), w = v.map((e, t) => {
12
+ let n = 3 + (t % 5 == 0 ? 2 : 0);
13
+ return `M${e},${p} L${e},${p + n}`;
14
+ }).join(" ");
9
15
  return /* @__PURE__ */ t("g", { children: [
10
16
  /* @__PURE__ */ e("path", {
11
17
  className: "fill-white",
@@ -26,6 +26,6 @@ declare class InputEasing extends Component {
26
26
  handleMouseDown: (handle: "bottom" | "top") => (e: React.MouseEvent) => void;
27
27
  handleMouseMove: (e: MouseEvent) => void;
28
28
  handleMouseUp: () => void;
29
- render(): import("react/jsx-runtime").JSX.Element;
29
+ render(): import("react").JSX.Element;
30
30
  }
31
31
  export default InputEasing;
@@ -5,5 +5,5 @@ export type InputEasingButtonProps = {
5
5
  className?: string;
6
6
  onClick?: () => void;
7
7
  };
8
- declare const InputEasingButton: ({ children, title, className, onClick }: InputEasingButtonProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const InputEasingButton: ({ children, title, className, onClick }: InputEasingButtonProps) => import("react").JSX.Element;
9
9
  export default InputEasingButton;
@@ -2,5 +2,5 @@ export type InputEasingListProps = {
2
2
  className?: string;
3
3
  onChange?: (easing: string) => void;
4
4
  };
5
- declare const InputEasingList: ({ className, onChange }: InputEasingListProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const InputEasingList: ({ className, onChange }: InputEasingListProps) => import("react").JSX.Element;
6
6
  export default InputEasingList;
@@ -6,5 +6,5 @@ export type ProgressProps = {
6
6
  yTo?: number;
7
7
  value: [number, number, number, number];
8
8
  };
9
- declare const Progress: ({ progress, xFrom, xTo, yFrom, yTo, value }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const Progress: ({ progress, xFrom, xTo, yFrom, yTo, value }: ProgressProps) => import("react").JSX.Element;
10
10
  export default Progress;
@@ -12,5 +12,5 @@ export type SelectorProps = {
12
12
  onChange?: (value: string) => void;
13
13
  onRemove?: (selector: SelectorValue) => void;
14
14
  };
15
- declare const _default: import('react').MemoExoticComponent<({ className, value, selectors, selector: selectorProp, componentType, disabled, onChange, onSelectorSelected, onAdd, onRemove }: SelectorProps) => import("react/jsx-runtime").JSX.Element>;
15
+ declare const _default: import('react').MemoExoticComponent<({ className, value, selectors, selector: selectorProp, componentType, disabled, onChange, onSelectorSelected, onAdd, onRemove }: SelectorProps) => import("react").JSX.Element>;
16
16
  export default _default;
@@ -5,5 +5,5 @@ export type ItemOptionsProps = {
5
5
  type: TagType;
6
6
  onAction?: (action: 'duplicate' | 'remove' | 'delete', data?: SelectorValue) => void;
7
7
  };
8
- declare const ItemOptions: ({ selector, type, onAction }: ItemOptionsProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const ItemOptions: ({ selector, type, onAction }: ItemOptionsProps) => import("react").JSX.Element;
9
9
  export default ItemOptions;
@@ -11,5 +11,5 @@ export type SelectorItemProps = {
11
11
  onChange?: (selector: SelectorValue) => void;
12
12
  onAction?: (action: 'duplicate' | 'remove' | 'delete', data?: SelectorValue) => void;
13
13
  };
14
- declare const SelectorItem: ({ className, selector, type, editable, active, readOnly, onClick, onChange, onAction }: SelectorItemProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const SelectorItem: ({ className, selector, type, editable, active, readOnly, onClick, onChange, onAction }: SelectorItemProps) => import("react").JSX.Element;
15
15
  export default SelectorItem;
@@ -5,5 +5,5 @@ export type SelectorSuggestionsProps = {
5
5
  onCreate?: (tag: SelectorValue) => void;
6
6
  selectors?: SelectorValue[];
7
7
  };
8
- declare const SelectorSuggestions: ({ onSelect, onCreate, selector, selectors }: SelectorSuggestionsProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const SelectorSuggestions: ({ onSelect, onCreate, selector, selectors }: SelectorSuggestionsProps) => import("react").JSX.Element;
9
9
  export default SelectorSuggestions;
@@ -3,5 +3,5 @@ export type SuggestionsCreatorProps = {
3
3
  selector?: string;
4
4
  onClick?: (selector: SelectorValue) => void;
5
5
  };
6
- declare const SuggestionsCreator: ({ selector, onClick }: SuggestionsCreatorProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const SuggestionsCreator: ({ selector, onClick }: SuggestionsCreatorProps) => import("react").JSX.Element;
7
7
  export default SuggestionsCreator;
@@ -3,5 +3,5 @@ export type SuggestionsListProps = {
3
3
  selectors?: SelectorValue[];
4
4
  onSelect?: (selector: SelectorValue) => void;
5
5
  };
6
- declare const SuggestionsList: ({ selectors, onSelect }: SuggestionsListProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const SuggestionsList: ({ selectors, onSelect }: SuggestionsListProps) => import("react").JSX.Element;
7
7
  export default SuggestionsList;
@@ -11,5 +11,5 @@ export type InspectorProps = {
11
11
  displayMode: DisplayMode;
12
12
  mode?: 'element' | 'manager';
13
13
  };
14
- declare const Inspector: ({ selectors, componentType, componentSubType, selector, styleState, styleVariant, styleSelector, element, displayMode, mode }: InspectorProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const Inspector: ({ selectors, componentType, componentSubType, selector, styleState, styleVariant, styleSelector, element, displayMode, mode }: InspectorProps) => import("react").JSX.Element;
15
15
  export default Inspector;
@@ -17,5 +17,5 @@ export type StyleInspectorProps = {
17
17
  onStateChange?: (state: StyleState) => void;
18
18
  onRemoveVariant?: (variant: string) => void;
19
19
  };
20
- declare const StyleInspector: ({ displayMode, selectors, value, element, mode, componentType, styleSelectors, styleSelectorsAvailables, componentSubTypesAvailables, allowStyleSelector, allowStyleState, allowStyleVariant, onChange, onRemoveVariant }: StyleInspectorProps) => import("react/jsx-runtime").JSX.Element;
20
+ declare const StyleInspector: ({ displayMode, selectors, value, element, mode, componentType, styleSelectors, styleSelectorsAvailables, componentSubTypesAvailables, allowStyleSelector, allowStyleState, allowStyleVariant, onChange, onRemoveVariant }: StyleInspectorProps) => import("react").JSX.Element;
21
21
  export default StyleInspector;