@plitzi/sdk-style 0.32.1 → 0.32.3
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.
- package/CHANGELOG.md +20 -0
- package/dist/BuilderStyleContextProvider.d.ts +1 -1
- package/dist/BuilderStyleContextProvider.mjs +47 -45
- package/dist/SdkStyleContextProvider.d.ts +1 -1
- package/dist/SdkStyleContextProvider.mjs +3 -3
- package/dist/StyleAdvanceEditor.d.ts +1 -1
- package/dist/StyleAdvanceEditor.mjs +20 -20
- package/dist/StyleMap/helpers/isValueValid.mjs +1 -1
- package/dist/StyleMap/helpers/utils.mjs +1 -1
- package/dist/components/InputEasing/BezierEasing.mjs +26 -26
- package/dist/components/InputEasing/Curve.d.ts +1 -1
- package/dist/components/InputEasing/Grid.d.ts +1 -1
- package/dist/components/InputEasing/Grid.mjs +7 -1
- package/dist/components/InputEasing/InputEasing.d.ts +1 -1
- package/dist/components/InputEasing/InputEasingButton.d.ts +1 -1
- package/dist/components/InputEasing/InputEasingList.d.ts +1 -1
- package/dist/components/InputEasing/Progress.d.ts +1 -1
- package/dist/components/Selector/Selector.d.ts +1 -1
- package/dist/components/Selector/SelectorItem/ItemOptions.d.ts +1 -1
- package/dist/components/Selector/SelectorItem/SelectorItem.d.ts +1 -1
- package/dist/components/Selector/SelectorSuggestions/SelectorSuggestions.d.ts +1 -1
- package/dist/components/Selector/SelectorSuggestions/SuggestionsCreator.d.ts +1 -1
- package/dist/components/Selector/SelectorSuggestions/SuggestionsList.d.ts +1 -1
- package/dist/components/StyleInspector/Inspector.d.ts +1 -1
- package/dist/components/StyleInspector/StyleInspector.d.ts +1 -1
- package/dist/components/StyleInspector/StyleInspector.mjs +66 -66
- package/dist/components/StyleInspector/StyleInspectorProvider.d.ts +1 -1
- package/dist/components/StyleInspector/StyleInspectorProvider.mjs +24 -21
- package/dist/components/StyleInspector/categories/Background/Background.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +1 -1
- package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/modes/ImageMode.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Border/Border.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Border/BorderColor.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Border/BorderPlacements.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Border/BorderRadius.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Border/BorderStyle.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Border/BorderWidth.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Display/Display.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Display/DisplayElements.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Display/DisplayFlex.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignContent.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignItems.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Display/DisplayFlexDirection.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Display/DisplayFlexJustify.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Display/DisplayGap.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Display/DisplayGridTemplate.d.ts +1 -1
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.d.ts +1 -1
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.d.ts +1 -1
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayOrder.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Effects/Effects.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Effects/Filters/Filter.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Effects/Transform/Transform.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Effects/Transition/Transition.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.d.ts +1 -1
- package/dist/components/StyleInspector/categories/List/List.d.ts +1 -1
- package/dist/components/StyleInspector/categories/ListItem/ListItem.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Position/Position.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Position/PositionAdvanced.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Position/PositionAdvancedButtons.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Position/PositionClear.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Position/PositionFloat.d.ts +1 -1
- package/dist/components/StyleInspector/categories/RawStyle/RawStyle.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Size/Size.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Size/SizeFit.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Size/SizeOverflow.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Size/SizePosition.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Spacing/Spacing.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Spacing/SpacingEditor.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Spacing/SpacingNumber.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Typography/Typography.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Typography/TypographyAlign.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Typography/TypographyFont.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Typography/TypographyStyle.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Typography/TypographyTransform.d.ts +1 -1
- package/dist/components/StyleInspector/categories/Variables/Variables.d.ts +1 -1
- package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.d.ts +1 -1
- package/dist/components/StyleInspector/components/CategoryOption/CategoryOption.d.ts +1 -1
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionColor.d.ts +1 -1
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.d.ts +1 -1
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionInput.d.ts +1 -1
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.d.ts +1 -1
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.d.ts +1 -1
- package/dist/components/StyleInspector/components/CategorySection/CategorySection.d.ts +1 -1
- package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.d.ts +1 -1
- package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.d.ts +1 -1
- package/dist/components/StyleInspector/hooks/useStyleBinding.mjs +4 -4
- package/dist/components/StyleInspector/hooks/useStyleInherit.mjs +5 -5
- package/dist/components/StyleManager/ManagerSelector.d.ts +1 -1
- package/dist/components/StyleManager/StyleManager.d.ts +1 -1
- package/dist/components/StyleManager/StyleManager.mjs +13 -13
- package/dist/components/StyleManager/StyleSelectorTag.d.ts +1 -1
- package/dist/helpers/processSelectorAttributes.mjs +1 -1
- package/dist/models/SelectorForm/SelectorForm.d.ts +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @plitzi/sdk-style
|
|
2
2
|
|
|
3
|
+
## 0.32.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- v0.32.3
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @plitzi/sdk-plugins@0.32.3
|
|
10
|
+
- @plitzi/sdk-shared@0.32.3
|
|
11
|
+
- @plitzi/sdk-variables@0.32.3
|
|
12
|
+
|
|
13
|
+
## 0.32.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- v0.32.2
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @plitzi/sdk-plugins@0.32.2
|
|
20
|
+
- @plitzi/sdk-shared@0.32.2
|
|
21
|
+
- @plitzi/sdk-variables@0.32.2
|
|
22
|
+
|
|
3
23
|
## 0.32.1
|
|
4
24
|
|
|
5
25
|
### Patch 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) =>
|
|
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 {
|
|
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)
|
|
18
|
-
|
|
19
|
-
let
|
|
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]),
|
|
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]),
|
|
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]),
|
|
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]),
|
|
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]),
|
|
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]),
|
|
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]),
|
|
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]),
|
|
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]),
|
|
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]),
|
|
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]),
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
174
|
-
F
|
|
176
|
+
P
|
|
175
177
|
]);
|
|
176
|
-
let
|
|
177
|
-
styleUpdate:
|
|
178
|
-
styleAddSelector:
|
|
179
|
-
styleUpdateSelector:
|
|
180
|
-
styleRemoveSelector:
|
|
181
|
-
styleAddSelectorVariable:
|
|
182
|
-
styleUpdateSelectorVariable:
|
|
183
|
-
styleRemoveSelectorVariable:
|
|
184
|
-
styleAddVariable:
|
|
185
|
-
styleUpdateVariable:
|
|
186
|
-
styleRemoveVariable:
|
|
187
|
-
styleAddTemplate:
|
|
188
|
-
styleUpdateSettings:
|
|
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",
|
|
204
|
-
value:
|
|
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
|
|
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 {
|
|
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(() => ({}), [])
|
|
10
|
-
return
|
|
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
|
|
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 {
|
|
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),
|
|
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:
|
|
17
|
-
webKey:
|
|
18
|
-
}),
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
let e = await
|
|
22
|
-
data:
|
|
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",
|
|
27
|
-
n !==
|
|
26
|
+
let n = t(e, "data", b);
|
|
27
|
+
n !== b && (x(n), S?.(n, "customCss"));
|
|
28
28
|
}, [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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:
|
|
38
|
-
autoComplete: i(() =>
|
|
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
|
-
})) : [], [
|
|
41
|
+
})) : [], [v]),
|
|
42
42
|
theme: g === "dark" ? "dark" : "light",
|
|
43
43
|
lineWrapping: !0,
|
|
44
|
-
onChange:
|
|
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:
|
|
51
|
+
onClick: O,
|
|
52
52
|
title: "Auto format",
|
|
53
|
-
disabled:
|
|
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 };
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
//#region src/components/InputEasing/BezierEasing.ts
|
|
2
|
-
var e =
|
|
3
|
-
let s, c
|
|
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
|
-
|
|
6
|
-
while (Math.abs(
|
|
7
|
-
return
|
|
8
|
-
},
|
|
9
|
-
for (let
|
|
10
|
-
let
|
|
11
|
-
if (
|
|
12
|
-
let a =
|
|
13
|
-
|
|
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
|
|
16
|
-
},
|
|
17
|
-
function
|
|
18
|
-
if (!(
|
|
19
|
-
if (
|
|
20
|
-
let
|
|
21
|
-
for (let
|
|
22
|
-
function
|
|
23
|
-
let
|
|
24
|
-
for (;
|
|
25
|
-
--
|
|
26
|
-
let
|
|
27
|
-
return
|
|
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 :
|
|
30
|
+
return e === 0 || e === 1 ? e : o(p(e), i, d);
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
export {
|
|
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
|
|
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
|
|
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) =>
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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;
|