@plitzi/sdk-style 0.39.1 → 0.39.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.
- package/CHANGELOG.md +11 -0
- package/dist/SdkStyleContextProvider.mjs +2 -3
- package/dist/StyleContext.mjs +1 -2
- package/dist/StyleHelper.mjs +1 -2
- package/dist/StyleMap/StyleMap.mjs +1 -2
- package/dist/StyleMap/helpers/getStyleItem.mjs +1 -2
- package/dist/StyleMap/helpers/isValueValid.mjs +1 -2
- package/dist/StyleMap/helpers/utils.mjs +1 -2
- package/dist/StyleMap/index.mjs +1 -2
- package/dist/StyleMap/methods/addSelector.mjs +2 -3
- package/dist/StyleMap/methods/updateSelector.mjs +1 -2
- package/dist/StyleReducer.mjs +1 -2
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/builder/BuilderStyleContextProvider.mjs +2 -3
- package/dist/builder/StyleAdvanceEditor.mjs +3 -4
- package/dist/builder/components/InputEasing/BezierEasing.mjs +1 -2
- package/dist/builder/components/InputEasing/Curve.mjs +1 -2
- package/dist/builder/components/InputEasing/Grid.mjs +1 -2
- package/dist/builder/components/InputEasing/InputEasing.mjs +1 -2
- package/dist/builder/components/InputEasing/InputEasingButton.mjs +1 -2
- package/dist/builder/components/InputEasing/InputEasingHelper.mjs +1 -2
- package/dist/builder/components/InputEasing/InputEasingList.mjs +1 -2
- package/dist/builder/components/InputEasing/Progress.mjs +1 -2
- package/dist/builder/components/InputEasing/index.mjs +1 -2
- package/dist/builder/components/Selector/Selector.mjs +1 -2
- package/dist/builder/components/Selector/SelectorHelper.mjs +1 -2
- package/dist/builder/components/Selector/SelectorItem/ItemOptions.mjs +12 -13
- package/dist/builder/components/Selector/SelectorItem/SelectorItem.mjs +1 -2
- package/dist/builder/components/Selector/SelectorItem/helpers.mjs +1 -2
- package/dist/builder/components/Selector/SelectorItem/index.mjs +1 -2
- package/dist/builder/components/Selector/SelectorSuggestions/SelectorSuggestions.mjs +1 -2
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsCreator.mjs +1 -2
- package/dist/builder/components/Selector/SelectorSuggestions/SuggestionsList.mjs +1 -2
- package/dist/builder/components/Selector/SelectorSuggestions/index.mjs +1 -2
- package/dist/builder/components/Selector/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/Inspector.mjs +151 -152
- package/dist/builder/components/StyleInspector/InspectorSearchContext.mjs +1 -2
- package/dist/builder/components/StyleInspector/StyleInspector.mjs +14 -15
- package/dist/builder/components/StyleInspector/StyleInspectorContext.mjs +0 -1
- package/dist/builder/components/StyleInspector/StyleInspectorProvider.mjs +7 -8
- package/dist/builder/components/StyleInspector/categories/Background/Background.mjs +32 -33
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +36 -37
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundLayer/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.mjs +11 -12
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundPosition/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.mjs +18 -19
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundSize/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Background/components/BackgroundTile/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientCenter/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.mjs +6 -7
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +14 -15
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +11 -12
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/GradientStopBar/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/components/LayerGroup/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/helpers/layerValues.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/helpers/normalizeLeft.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/helpers/parseToBgLayers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +6 -7
- package/dist/builder/components/StyleInspector/categories/Background/modes/ImageMode.mjs +6 -7
- package/dist/builder/components/StyleInspector/categories/Background/modes/LinearGradientMode.mjs +11 -12
- package/dist/builder/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +19 -20
- package/dist/builder/components/StyleInspector/categories/Background/modes/RawMode.mjs +6 -7
- package/dist/builder/components/StyleInspector/categories/Background/modes/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/Border.mjs +19 -20
- package/dist/builder/components/StyleInspector/categories/Border/BorderColor.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/BorderPlacements.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/BorderRadius.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/BorderStyle.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/BorderWidth.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Border/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/Display.mjs +26 -27
- package/dist/builder/components/StyleInspector/categories/Display/DisplayElements.mjs +7 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayFlex.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayFlexAlignContent.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayFlexAlignItems.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayFlexDirection.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayFlexJustify.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayGap.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/DisplayGridTemplate.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Display/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +21 -22
- package/dist/builder/components/StyleInspector/categories/DisplayFlexChild/DisplayOrder.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/DisplayFlexChild/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +6 -7
- package/dist/builder/components/StyleInspector/categories/Effects/BoxShadow/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Effects.mjs +36 -37
- package/dist/builder/components/StyleInspector/categories/Effects/Filters/Filter.mjs +14 -15
- package/dist/builder/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +20 -21
- package/dist/builder/components/StyleInspector/categories/Effects/Filters/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Filters/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Transform/Transform.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Effects/Transform/TransformItem.mjs +17 -18
- package/dist/builder/components/StyleInspector/categories/Effects/Transform/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Transform/transformFunctions.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/Transition.mjs +9 -10
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionEasing.mjs +21 -22
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +21 -22
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/Transition/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Effects/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/List/List.mjs +10 -11
- package/dist/builder/components/StyleInspector/categories/List/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/ListItem/ListItem.mjs +10 -11
- package/dist/builder/components/StyleInspector/categories/ListItem/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/Others.mjs +27 -28
- package/dist/builder/components/StyleInspector/categories/Others/OthersForm.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/OthersInteraction.mjs +16 -17
- package/dist/builder/components/StyleInspector/categories/Others/OthersOutline.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/OthersScrollSnap.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/OthersScrollbar.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/OthersSvg.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/OthersTable.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Others/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Position/Position.mjs +18 -19
- package/dist/builder/components/StyleInspector/categories/Position/PositionAdvanced.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Position/PositionAdvancedButtons.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Position/PositionClear.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Position/PositionFloat.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Position/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/RawStyle/RawStyle.mjs +2 -3
- package/dist/builder/components/StyleInspector/categories/RawStyle/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Size/Size.mjs +36 -37
- package/dist/builder/components/StyleInspector/categories/Size/SizeContainer.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Size/SizeFit.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Size/SizeOverflow.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Size/SizePosition.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Size/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Spacing/Spacing.mjs +7 -8
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingBox.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingEditor.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingNumber.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Spacing/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/Typography.mjs +48 -49
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyAlign.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyBreaking.mjs +13 -14
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyClamp.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyConstants.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyFigures.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyFont.mjs +7 -8
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyStyle.mjs +10 -11
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +8 -9
- package/dist/builder/components/StyleInspector/categories/Typography/TypographyTransform.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Typography/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/Variables/Variables.mjs +7 -8
- package/dist/builder/components/StyleInspector/categories/Variables/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/blendModes.mjs +1 -2
- package/dist/builder/components/StyleInspector/categories/listMarkers.mjs +1 -2
- package/dist/builder/components/StyleInspector/categoryKeys.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/AncestorRules/AncestorRuleChip.mjs +0 -1
- package/dist/builder/components/StyleInspector/components/AncestorRules/AncestorRules.mjs +0 -1
- package/dist/builder/components/StyleInspector/components/AncestorRules/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryAdvanced/CategoryAdvanced.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryAdvanced/CategoryAdvancedContext.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryAdvanced/index.mjs +5 -6
- package/dist/builder/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +6 -7
- package/dist/builder/components/StyleInspector/components/CategoryContainer/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/CategoryOption.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionColor.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionInput.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategoryOption/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategorySection/CategorySection.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/CategorySection/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ColorSwatch/ColorSwatch.mjs +5 -6
- package/dist/builder/components/StyleInspector/components/ColorSwatch/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ColorSwatch/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorDots/InspectorDots.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorDots/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorFooter/InspectorFooter.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorFooter/helpers.mjs +2 -10
- package/dist/builder/components/StyleInspector/components/InspectorFooter/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +3 -4
- package/dist/builder/components/StyleInspector/components/InspectorLabel/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorLabel/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorSearch/InspectorSearch.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/InspectorSearch/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ShadowItem/ShadowItem.mjs +18 -19
- package/dist/builder/components/StyleInspector/components/ShadowItem/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ShadowList/ShadowList.mjs +8 -9
- package/dist/builder/components/StyleInspector/components/ShadowList/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/TargetSummary/TargetSummary.mjs +0 -1
- package/dist/builder/components/StyleInspector/components/TargetSummary/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ValueList/ValueList.mjs +0 -1
- package/dist/builder/components/StyleInspector/components/ValueList/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/components/ValueListItem/ValueListItem.mjs +0 -1
- package/dist/builder/components/StyleInspector/components/ValueListItem/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/cssValues.mjs +1 -2
- package/dist/builder/components/StyleInspector/helpers.mjs +1 -2
- package/dist/builder/components/StyleInspector/hooks/useInspectorValues.mjs +1 -2
- package/dist/builder/components/StyleInspector/hooks/usePropertyChange.mjs +1 -2
- package/dist/builder/components/StyleInspector/hooks/useStyleBinding.mjs +1 -2
- package/dist/builder/components/StyleInspector/hooks/useStyleInherit.mjs +1 -2
- package/dist/builder/components/StyleInspector/index.mjs +1 -2
- package/dist/builder/components/StyleInspector/search.mjs +1 -2
- package/dist/builder/components/StyleInspector/shadowValue.mjs +1 -2
- package/dist/builder/components/StyleManager/ManagerSelector.mjs +0 -1
- package/dist/builder/components/StyleManager/StyleManager.mjs +1 -2
- package/dist/builder/components/StyleManager/StyleSelectorTag.mjs +0 -1
- package/dist/builder/components/StyleManager/index.mjs +1 -2
- package/dist/builder/components/index.mjs +1 -2
- package/dist/builder/hooks/useSpaceFonts.mjs +1 -2
- package/dist/builder/index.mjs +3 -3
- package/dist/builder/models/SelectorForm/SelectorForm.mjs +1 -2
- package/dist/builder/models/SelectorForm/index.mjs +1 -2
- package/dist/helpers/calculateInheriting.mjs +2 -3
- package/dist/helpers/formatCssFromSelector.mjs +1 -2
- package/dist/helpers/generateStyleSelector.mjs +1 -2
- package/dist/helpers/index.mjs +11 -12
- package/dist/helpers/processCssTokens.mjs +1 -2
- package/dist/helpers/processSelector.mjs +1 -2
- package/dist/helpers/processSelectorAttributes.mjs +1 -2
- package/dist/helpers/processSelectorName.mjs +1 -2
- package/dist/helpers/processSelectorVariables.mjs +1 -2
- package/dist/index.mjs +11 -11
- package/package.json +15 -12
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { asText as e } from "../../cssValues.mjs";
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { parseShadow as t, serializeShadow as n } from "../../shadowValue.mjs";
|
|
3
|
+
import r from "../CategoryOption/index.mjs";
|
|
4
|
+
import i from "../ColorSwatch/index.mjs";
|
|
5
5
|
import a from "../ValueListItem/index.mjs";
|
|
6
6
|
import { memo as o, useCallback as s, useMemo as c, useRef as l } from "react";
|
|
7
7
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
8
|
var p = o(({ value: o, withSpread: p, onChange: m, onRemove: h }) => {
|
|
9
|
-
let g =
|
|
9
|
+
let g = t(o), _ = l(g);
|
|
10
10
|
_.current = g;
|
|
11
|
-
let v = s((t) => (
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
...
|
|
15
|
-
[t]: e(
|
|
11
|
+
let v = s((t) => (r) => {
|
|
12
|
+
let i = _.current;
|
|
13
|
+
i && m(n({
|
|
14
|
+
...i,
|
|
15
|
+
[t]: e(r)
|
|
16
16
|
}, { withSpread: p }));
|
|
17
17
|
}, [m, p]), y = s((e) => {
|
|
18
18
|
let t = _.current;
|
|
19
|
-
t && m(
|
|
19
|
+
t && m(n({
|
|
20
20
|
...t,
|
|
21
21
|
inset: e === "inset"
|
|
22
22
|
}, { withSpread: p }));
|
|
@@ -41,7 +41,7 @@ var p = o(({ value: o, withSpread: p, onChange: m, onRemove: h }) => {
|
|
|
41
41
|
}], [g?.inset]), S = p ? "Box shadow" : "Text shadow";
|
|
42
42
|
return /* @__PURE__ */ f(a, {
|
|
43
43
|
summary: o,
|
|
44
|
-
preview: g && /* @__PURE__ */ d(
|
|
44
|
+
preview: g && /* @__PURE__ */ d(i, {
|
|
45
45
|
className: "h-4 w-4",
|
|
46
46
|
value: g.color
|
|
47
47
|
}),
|
|
@@ -49,7 +49,7 @@ var p = o(({ value: o, withSpread: p, onChange: m, onRemove: h }) => {
|
|
|
49
49
|
removeLabel: `Remove ${S.toLowerCase()}`,
|
|
50
50
|
onRemove: h,
|
|
51
51
|
children: [
|
|
52
|
-
!g && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(
|
|
52
|
+
!g && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(r, {
|
|
53
53
|
label: "Value",
|
|
54
54
|
type: "input",
|
|
55
55
|
value: o,
|
|
@@ -58,7 +58,7 @@ var p = o(({ value: o, withSpread: p, onChange: m, onRemove: h }) => {
|
|
|
58
58
|
className: "m-0 text-[11px] text-zinc-500 dark:text-zinc-400",
|
|
59
59
|
children: "Not a single shadow the editor can split into parts (a token, for one), so it is edited as written."
|
|
60
60
|
})] }),
|
|
61
|
-
g && p && /* @__PURE__ */ d(
|
|
61
|
+
g && p && /* @__PURE__ */ d(r, {
|
|
62
62
|
label: "Type",
|
|
63
63
|
type: "iconGroup",
|
|
64
64
|
items: x,
|
|
@@ -67,28 +67,28 @@ var p = o(({ value: o, withSpread: p, onChange: m, onRemove: h }) => {
|
|
|
67
67
|
g && /* @__PURE__ */ f("div", {
|
|
68
68
|
className: "grid grid-cols-2 gap-2",
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */ d(
|
|
70
|
+
/* @__PURE__ */ d(r, {
|
|
71
71
|
label: "X offset",
|
|
72
72
|
type: "metric",
|
|
73
73
|
value: g.x,
|
|
74
74
|
min: -Infinity,
|
|
75
75
|
onChange: v("x")
|
|
76
76
|
}),
|
|
77
|
-
/* @__PURE__ */ d(
|
|
77
|
+
/* @__PURE__ */ d(r, {
|
|
78
78
|
label: "Y offset",
|
|
79
79
|
type: "metric",
|
|
80
80
|
value: g.y,
|
|
81
81
|
min: -Infinity,
|
|
82
82
|
onChange: v("y")
|
|
83
83
|
}),
|
|
84
|
-
/* @__PURE__ */ d(
|
|
84
|
+
/* @__PURE__ */ d(r, {
|
|
85
85
|
label: "Blur",
|
|
86
86
|
type: "metric",
|
|
87
87
|
value: g.blur,
|
|
88
88
|
min: 0,
|
|
89
89
|
onChange: v("blur")
|
|
90
90
|
}),
|
|
91
|
-
p && /* @__PURE__ */ d(
|
|
91
|
+
p && /* @__PURE__ */ d(r, {
|
|
92
92
|
label: "Spread",
|
|
93
93
|
type: "metric",
|
|
94
94
|
value: g.spread,
|
|
@@ -97,7 +97,7 @@ var p = o(({ value: o, withSpread: p, onChange: m, onRemove: h }) => {
|
|
|
97
97
|
})
|
|
98
98
|
]
|
|
99
99
|
}),
|
|
100
|
-
g && /* @__PURE__ */ d(
|
|
100
|
+
g && /* @__PURE__ */ d(r, {
|
|
101
101
|
label: "Color",
|
|
102
102
|
type: "color",
|
|
103
103
|
value: g.color,
|
|
@@ -106,5 +106,4 @@ var p = o(({ value: o, withSpread: p, onChange: m, onRemove: h }) => {
|
|
|
106
106
|
]
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
|
-
//#endregion
|
|
110
109
|
export { p as default };
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { splitByCommaOutsideParens as e } from "../../cssValues.mjs";
|
|
2
|
-
import t from "../
|
|
3
|
-
import n from "../
|
|
2
|
+
import t from "../ShadowItem/index.mjs";
|
|
3
|
+
import n from "../ValueList/index.mjs";
|
|
4
4
|
import { useCallback as r } from "react";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/builder/components/StyleInspector/components/ShadowList/ShadowList.tsx
|
|
7
7
|
var a = ({ label: a, keys: o, addLabel: s, withSpread: c, added: l, value: u, onChange: d }) => {
|
|
8
8
|
let f = typeof u == "string" && u !== "" ? e(u).map((e) => e.trim()) : [], p = r((e) => d?.(e.length > 0 ? e.join(", ") : ""), [d]), m = (e) => () => p(f.filter((t, n) => n !== e)), h = (e) => (t) => {
|
|
9
9
|
t !== f[e] && p(f.map((n, r) => r === e ? t : n));
|
|
10
10
|
};
|
|
11
|
-
return /* @__PURE__ */ i(
|
|
11
|
+
return /* @__PURE__ */ i(n, {
|
|
12
12
|
label: a,
|
|
13
13
|
keys: o,
|
|
14
14
|
addLabel: s,
|
|
15
15
|
onAdd: () => p([...f, l]),
|
|
16
|
-
children: f.map((e,
|
|
16
|
+
children: f.map((e, n) => /* @__PURE__ */ i(t, {
|
|
17
17
|
value: e,
|
|
18
18
|
withSpread: c,
|
|
19
|
-
onChange: h(
|
|
20
|
-
onRemove: m(
|
|
21
|
-
},
|
|
19
|
+
onChange: h(n),
|
|
20
|
+
onRemove: m(n)
|
|
21
|
+
}, n))
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { a as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { get as e } from "@plitzi/plitzi-ui/helpers";
|
|
2
2
|
import { VARIABLE_REGEX as t } from "@plitzi/sdk-shared/schema";
|
|
3
|
-
|
|
3
|
+
// src/builder/components/StyleInspector/cssValues.ts
|
|
4
4
|
var n = (e, t, n) => {
|
|
5
5
|
let r = [], i = "", a = 0;
|
|
6
6
|
for (let o of e) o === t && a === 0 ? ((n || i) && r.push(i), i = "") : (o === "(" ? a++ : o === ")" && a--, i += o);
|
|
@@ -13,5 +13,4 @@ var n = (e, t, n) => {
|
|
|
13
13
|
}
|
|
14
14
|
return i;
|
|
15
15
|
}, o = (e) => typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
16
|
-
//#endregion
|
|
17
16
|
export { o as asText, a as resolveTokens, r as splitByCommaOutsideParens, i as splitBySpaceOutsideParens };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PARENT_ANCESTOR as e, STYLE_MOTION_CONDITIONS as t, STYLE_PSEUDOS as n, STYLE_PSEUDO_LABELS as r, STYLE_STATES as i, STYLE_STATE_LABELS as a, conditionLabel as o, inCascadeOrder as s, isKnownState as c, isParentAncestor as l } from "@plitzi/sdk-shared/style";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/helpers.ts
|
|
3
3
|
var u = i.map((e) => ({
|
|
4
4
|
label: a[e],
|
|
5
5
|
value: e
|
|
@@ -67,5 +67,4 @@ var u = i.map((e) => ({
|
|
|
67
67
|
s ? r[s] : void 0,
|
|
68
68
|
c ? o(c) : void 0
|
|
69
69
|
].filter((e) => !!e), C = (e, t) => e ? "An ancestor, pseudo-element or condition is in use" : t ? "Hide ancestor, pseudo-element and condition" : "Target an ancestor, a pseudo-element or a condition";
|
|
70
|
-
//#endregion
|
|
71
70
|
export { u as STYLE_STATE_OPTIONS, m as ancestorClasses, _ as ancestorConditions, d as ancestorName, v as ancestorOptions, x as ancestorRemovals, p as conditionOptions, C as moreTargetsHint, f as pseudoOptions, S as targetParts, b as unusedAncestors };
|
|
@@ -4,7 +4,7 @@ import { use as n, useMemo as r } from "react";
|
|
|
4
4
|
import { baseDefaultValue as i } from "@plitzi/sdk-shared/style";
|
|
5
5
|
import { get as a, pick as o } from "@plitzi/plitzi-ui/helpers";
|
|
6
6
|
import { VARIABLE_REGEX as s } from "@plitzi/sdk-shared/schema";
|
|
7
|
-
|
|
7
|
+
// src/builder/components/StyleInspector/hooks/useInspectorValues.ts
|
|
8
8
|
var c = ({ keys: c, skipContext: l = !1, context: u = {}, asValue: d = !1, defaultValues: f, strictMode: p = !1, replaceTokens: m = !1 }) => {
|
|
9
9
|
let { inheritData: h, bindingData: g, variables: _, getValues: v } = {};
|
|
10
10
|
l ? {inheritData: h, bindingData: g, variables: _, getValues: v} = u : {inheritData: h, bindingData: g, variables: _, getValues: v} = n(t);
|
|
@@ -48,5 +48,4 @@ var c = ({ keys: c, skipContext: l = !1, context: u = {}, asValue: d = !1, defau
|
|
|
48
48
|
hasValues: C
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
-
//#endregion
|
|
52
51
|
export { c as default };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import e from "../StyleInspectorContext.mjs";
|
|
2
2
|
import { use as t, useCallback as n } from "react";
|
|
3
|
-
|
|
3
|
+
// src/builder/components/StyleInspector/hooks/usePropertyChange.ts
|
|
4
4
|
var r = () => {
|
|
5
5
|
let { setValue: r } = t(e);
|
|
6
6
|
return n((e) => (t) => r(e, t), [r]);
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { r as default };
|
|
@@ -2,7 +2,7 @@ import { useMemo as e } from "react";
|
|
|
2
2
|
import { useCommonStore as t } from "@plitzi/sdk-shared/store";
|
|
3
3
|
import { emptyObject as n } from "@plitzi/sdk-shared/helpers";
|
|
4
4
|
import { get as r, set as i } from "@plitzi/plitzi-ui/helpers";
|
|
5
|
-
|
|
5
|
+
// src/builder/components/StyleInspector/hooks/useStyleBinding.ts
|
|
6
6
|
var a = ({ element: a }) => {
|
|
7
7
|
let [o = n] = t("runtime.sources");
|
|
8
8
|
return e(() => {
|
|
@@ -14,5 +14,4 @@ var a = ({ element: a }) => {
|
|
|
14
14
|
}), e;
|
|
15
15
|
}, [o, a]);
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { a as default };
|
|
@@ -2,7 +2,7 @@ import e from "../../../../helpers/calculateInheriting.mjs";
|
|
|
2
2
|
import { use as t, useMemo as n } from "react";
|
|
3
3
|
import { useBuilderStore as r } from "@plitzi/sdk-shared/store";
|
|
4
4
|
import { ComponentContext as i } from "@plitzi/sdk-shared/elements";
|
|
5
|
-
|
|
5
|
+
// src/builder/components/StyleInspector/hooks/useStyleInherit.ts
|
|
6
6
|
var a = ({ element: a, componentType: o, componentSubType: s, selector: c, styleSelector: l = "base", styleState: u, styleVariant: d, styleAncestor: f, stylePseudo: p, styleCondition: m }) => {
|
|
7
7
|
let [[h, g]] = r(["schema.flat", "style.platform"]), { componentDefinitions: _ } = t(i);
|
|
8
8
|
return n(() => {
|
|
@@ -35,5 +35,4 @@ var a = ({ element: a, componentType: o, componentSubType: s, selector: c, style
|
|
|
35
35
|
m
|
|
36
36
|
]);
|
|
37
37
|
};
|
|
38
|
-
//#endregion
|
|
39
38
|
export { a as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/builder/components/StyleInspector/search.ts
|
|
2
2
|
var e = {
|
|
3
3
|
bg: "background",
|
|
4
4
|
colour: "color",
|
|
@@ -10,5 +10,4 @@ var e = {
|
|
|
10
10
|
let n = t.trim().toLowerCase().replace(/\s+/g, "-");
|
|
11
11
|
return e[n] ?? n;
|
|
12
12
|
}, n = (e, t) => t.split("-").every((t) => !t || e.includes(t)), r = (e, t) => e.some((e) => n(e, t)), i = ({ title: e, dot: t }, i) => !i || n(e.toLowerCase().replace(/\s+/g, "-"), i) || r(t, i), a = (e, t) => !!t && !!e && r(e, t);
|
|
13
|
-
//#endregion
|
|
14
13
|
export { a as advancedMatches, i as categoryMatches, t as normalizeQuery };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { splitBySpaceOutsideParens as e } from "./cssValues.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/shadowValue.ts
|
|
3
3
|
var t = {
|
|
4
4
|
inset: !1,
|
|
5
5
|
x: "0px",
|
|
@@ -32,5 +32,4 @@ var t = {
|
|
|
32
32
|
t ? e.spread : void 0,
|
|
33
33
|
e.color
|
|
34
34
|
].filter((e) => !!e).join(" ");
|
|
35
|
-
//#endregion
|
|
36
35
|
export { t as DEFAULT_SHADOW, r as parseShadow, i as serializeShadow };
|
|
@@ -5,7 +5,7 @@ import { useBuilderStore as a } from "@plitzi/sdk-shared/store";
|
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
import { get as c } from "@plitzi/plitzi-ui/helpers";
|
|
7
7
|
import { ComponentContext as l } from "@plitzi/sdk-shared/elements";
|
|
8
|
-
|
|
8
|
+
// src/builder/components/StyleManager/StyleManager.tsx
|
|
9
9
|
var u = () => {
|
|
10
10
|
let { componentDefinitions: u } = n(l), [d, f] = i(void 0), [[p, m]] = a(["schema.flat", "displayMode"]), [h] = a(`style.platform.${m}`), g = r(() => Object.values(p), [p]), _ = r(() => d?.type === "element" ? Object.keys(c(u.current, `${d.componentType}.definition.styleSelectors`, {})) : ["base"], [u, d]), v = r(() => d?.type === "element" ? Object.keys(c(u.current, `${d.componentType}.defaultStyle.subTypes`, {})) : [], [u, d]), y = r(() => {
|
|
11
11
|
if (d) return d.type === "element" && _.length > 1 ? _.reduce((e, t) => ({
|
|
@@ -44,5 +44,4 @@ var u = () => {
|
|
|
44
44
|
})
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
//#endregion
|
|
48
47
|
export { u as default };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __exportAll as e } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import t from "./StyleInspector/index.mjs";
|
|
3
|
-
|
|
3
|
+
// src/builder/components/index.ts
|
|
4
4
|
var n = /* @__PURE__ */ e({ StyleInspector: () => t });
|
|
5
|
-
//#endregion
|
|
6
5
|
export { t as StyleInspector, n as components_exports };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { useMemo as e } from "react";
|
|
2
2
|
import { useCommonStore as t } from "@plitzi/sdk-shared/store";
|
|
3
3
|
import { availableFonts as n } from "@plitzi/sdk-shared/style";
|
|
4
|
-
|
|
4
|
+
// src/builder/hooks/useSpaceFonts.ts
|
|
5
5
|
var r = [], i = () => {
|
|
6
6
|
let [i = r] = t("style.fonts");
|
|
7
7
|
return e(() => n(i), [i]);
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { i as default };
|
package/dist/builder/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "./BuilderStyleContextProvider.mjs";
|
|
2
|
-
import t from "./
|
|
2
|
+
import { components_exports as t } from "./components/index.mjs";
|
|
3
3
|
import n from "./components/StyleInspector/index.mjs";
|
|
4
|
-
import
|
|
5
|
-
export { e as BuilderStyleContextProvider,
|
|
4
|
+
import r from "./StyleAdvanceEditor.mjs";
|
|
5
|
+
export { e as BuilderStyleContextProvider, r as StyleAdvanceEditor, n as StyleInspector, t as components };
|
|
@@ -4,7 +4,7 @@ import i from "@plitzi/plitzi-ui/Button";
|
|
|
4
4
|
import { capitalize as a } from "@plitzi/plitzi-ui/helpers/lodash";
|
|
5
5
|
import o, { useForm as s, useFormWatch as c } from "@plitzi/plitzi-ui/Form";
|
|
6
6
|
import { z as l } from "zod";
|
|
7
|
-
|
|
7
|
+
// src/builder/models/SelectorForm/SelectorForm.tsx
|
|
8
8
|
var u = l.discriminatedUnion("mode", [l.object({
|
|
9
9
|
name: l.string().min(3).regex(/^([a-zA-Z.#]{1}([a-zA-Z0-9\-_.#: ]+)?)$/i, { message: "Name only can be letters, numbers and _ -" }),
|
|
10
10
|
mode: l.literal("default")
|
|
@@ -69,5 +69,4 @@ var u = l.discriminatedUnion("mode", [l.object({
|
|
|
69
69
|
})]
|
|
70
70
|
});
|
|
71
71
|
};
|
|
72
|
-
//#endregion
|
|
73
72
|
export { d as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { inheritableAttributesBase as e } from "@plitzi/sdk-shared/style";
|
|
2
2
|
import { get as t, pick as n } from "@plitzi/plitzi-ui/helpers";
|
|
3
|
-
|
|
3
|
+
// src/helpers/calculateInheriting.ts
|
|
4
4
|
var r = (e, t) => {
|
|
5
5
|
let n = [], r = t;
|
|
6
6
|
for (; r;) {
|
|
@@ -125,7 +125,7 @@ var r = (e, t) => {
|
|
|
125
125
|
});
|
|
126
126
|
} else for (let r of w) {
|
|
127
127
|
let s = t?.definition.parentId === r.id, c = r.id !== t?.id, l = i(r, r.definition.type === o ? o : void 0, n, p, x);
|
|
128
|
-
|
|
128
|
+
y || c || m || h || !Object.keys(l).length || (l = l.filter((e) => e.type === "element"));
|
|
129
129
|
for (let t of l) (!b.includes(t.name) || c) && C.tree.push({
|
|
130
130
|
name: t.name,
|
|
131
131
|
displayMode: e,
|
|
@@ -164,5 +164,4 @@ var r = (e, t) => {
|
|
|
164
164
|
parentStyle: D
|
|
165
165
|
};
|
|
166
166
|
};
|
|
167
|
-
//#endregion
|
|
168
167
|
export { c as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { styleConstants as e } from "@plitzi/sdk-shared/style";
|
|
2
2
|
import { set as t } from "@plitzi/plitzi-ui/helpers";
|
|
3
|
-
|
|
3
|
+
// src/helpers/formatCssFromSelector.ts
|
|
4
4
|
var n = /@media[^{]*\{(?:[^{}]*|\{[^{}]*\})*\}/gim, r = /(?<selector>\.|#|)(?<selectorName>[a-z0-9_-]+)([ ]+|){(?<selectorData>[a-z0-9:; (),.%\n*/#+"'_-]+|)}/gim, i = /(?<propName>[a-z-]+):([ ]+|)(?<propValue>([a-z-]+\([^;]\)|".*"|[a-z0-9 (),.%\n*/#+"':_-]+));/gim, a = /(\/\*.*\*\/)/gim, o = Object.values(e);
|
|
5
5
|
function s(e = "") {
|
|
6
6
|
return [...e.replace(n, "").replaceAll("\n", "").matchAll(r)].reduce((e, n) => {
|
|
@@ -50,5 +50,4 @@ var c = (e, t) => e.some((e) => t >= e.from && t < e.to), l = (e = "") => {
|
|
|
50
50
|
to: e.length
|
|
51
51
|
}), t;
|
|
52
52
|
};
|
|
53
|
-
//#endregion
|
|
54
53
|
export { s as cssToSelectors, l as getReadOnlyRangesFromContent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "./processSelector.mjs";
|
|
2
|
-
|
|
2
|
+
// src/helpers/generateStyleSelector.ts
|
|
3
3
|
var t = (t = "", n = "class", r = {}, i) => {
|
|
4
4
|
if (t && typeof r == "object") return {
|
|
5
5
|
name: t,
|
|
@@ -15,5 +15,4 @@ var t = (t = "", n = "class", r = {}, i) => {
|
|
|
15
15
|
})
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { t as default };
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { __exportAll as e } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import t
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import a from "./
|
|
2
|
+
import t from "./calculateInheriting.mjs";
|
|
3
|
+
import n from "./generateStyleSelector.mjs";
|
|
4
|
+
import r from "./processCssTokens.mjs";
|
|
5
|
+
import i, { processSelectors as a } from "./processSelector.mjs";
|
|
6
6
|
import { cssToSelectors as o, getReadOnlyRangesFromContent as s } from "./formatCssFromSelector.mjs";
|
|
7
|
-
|
|
7
|
+
// src/helpers/index.ts
|
|
8
8
|
var c = /* @__PURE__ */ e({
|
|
9
|
-
calculateInheriting: () =>
|
|
9
|
+
calculateInheriting: () => t,
|
|
10
10
|
cssToSelectors: () => o,
|
|
11
|
-
generateStyleSelector: () =>
|
|
11
|
+
generateStyleSelector: () => n,
|
|
12
12
|
getReadOnlyRangesFromContent: () => s,
|
|
13
|
-
processCssTokens: () =>
|
|
14
|
-
processSelector: () =>
|
|
15
|
-
processSelectors: () =>
|
|
13
|
+
processCssTokens: () => r,
|
|
14
|
+
processSelector: () => i,
|
|
15
|
+
processSelectors: () => a
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
export { r as calculateInheriting, o as cssToSelectors, i as generateStyleSelector, s as getReadOnlyRangesFromContent, c as helpers_exports, a as processCssTokens, t as processSelector, n as processSelectors };
|
|
17
|
+
export { t as calculateInheriting, o as cssToSelectors, n as generateStyleSelector, s as getReadOnlyRangesFromContent, c as helpers_exports, r as processCssTokens, i as processSelector, a as processSelectors };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/processCssTokens.ts
|
|
2
2
|
var e = (e = "", t = {}, n = { missing: "" }) => {
|
|
3
3
|
let r = n.missing ?? "";
|
|
4
4
|
return e.replace(/\{\{\s*([a-z0-9_\-.$]+)\s*\}\}/gi, (e, n) => {
|
|
@@ -12,5 +12,4 @@ var e = (e = "", t = {}, n = { missing: "" }) => {
|
|
|
12
12
|
return typeof a == "string" || typeof a == "number" || typeof a == "boolean" ? String(a) : r;
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { e as default };
|
|
@@ -2,7 +2,7 @@ import e from "./processSelectorAttributes.mjs";
|
|
|
2
2
|
import t from "./processSelectorName.mjs";
|
|
3
3
|
import n from "./processSelectorVariables.mjs";
|
|
4
4
|
import { conditionAtRule as r, inCascadeOrder as i, isParentAncestor as a, isStartingState as o, pseudoSuffix as s, stateSuffix as c } from "@plitzi/sdk-shared/style";
|
|
5
|
-
|
|
5
|
+
// src/helpers/processSelector.ts
|
|
6
6
|
var l = 2, u = (e = l) => " ".repeat(e), d = (e, t, n) => `${n || !t.length ? e : `${e}\n`}${t.join(n ? "" : "\n")}`, f = (e, t, n = !0, r = l) => {
|
|
7
7
|
let i = [], a = u(r), o = u(r + l);
|
|
8
8
|
for (let r of ["light", "dark"]) if (t[r].length) {
|
|
@@ -78,5 +78,4 @@ var l = 2, u = (e = l) => " ".repeat(e), d = (e, t, n) => `${n || !t.length ? e
|
|
|
78
78
|
let l = b(a, s.attributes, i, 0);
|
|
79
79
|
return c ? d(l, c, i) : l;
|
|
80
80
|
}, S = (e, t = !1) => e.map((e) => x(e, t));
|
|
81
|
-
//#endregion
|
|
82
81
|
export { x as default, S as processSelectors };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/processSelectorAttributes.ts
|
|
2
2
|
var e = (e, t, { keepEmpty: n = !1, closeEndsPart: r = !1 } = {}) => {
|
|
3
3
|
let i = [], a = 0, o = "", s = "", c = () => {
|
|
4
4
|
(n || s) && i.push(s), s = "";
|
|
@@ -142,5 +142,4 @@ function p(e) {
|
|
|
142
142
|
}
|
|
143
143
|
return { attributes: t };
|
|
144
144
|
}
|
|
145
|
-
//#endregion
|
|
146
145
|
export { p as default, s as processCssString };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/processSelectorName.ts
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
let { name: t, type: n } = e, r = t;
|
|
4
4
|
switch (n) {
|
|
@@ -12,5 +12,4 @@ var e = (e) => {
|
|
|
12
12
|
}
|
|
13
13
|
return r;
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { e as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleVariableCategory as e, isStyleVariableCategory as t } from "@plitzi/sdk-shared/types";
|
|
2
|
-
|
|
2
|
+
// src/helpers/processSelectorVariables.ts
|
|
3
3
|
var n = (n) => {
|
|
4
4
|
let { variables: r } = n;
|
|
5
5
|
if (!r || !Object.keys(r).length) return;
|
|
@@ -25,5 +25,4 @@ var n = (n) => {
|
|
|
25
25
|
}
|
|
26
26
|
}), i;
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { n as default };
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import e from "./
|
|
1
|
+
import { helpers_exports as e } from "./helpers/index.mjs";
|
|
2
2
|
import t from "./SdkStyleContextProvider.mjs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { cssToSelectors as
|
|
11
|
-
import {
|
|
12
|
-
export { t as SdkStyleContextProvider,
|
|
3
|
+
import n from "./StyleContext.mjs";
|
|
4
|
+
import r, { processSelectors as i } from "./helpers/processSelector.mjs";
|
|
5
|
+
import a from "./StyleMap/index.mjs";
|
|
6
|
+
import o, { StyleActions as s } from "./StyleReducer.mjs";
|
|
7
|
+
import c from "./helpers/calculateInheriting.mjs";
|
|
8
|
+
import l from "./helpers/generateStyleSelector.mjs";
|
|
9
|
+
import u from "./helpers/processCssTokens.mjs";
|
|
10
|
+
import { cssToSelectors as d, getReadOnlyRangesFromContent as f } from "./helpers/formatCssFromSelector.mjs";
|
|
11
|
+
import { generateCache as p, makeSelector as m, selectorToString as h } from "./StyleHelper.mjs";
|
|
12
|
+
export { t as SdkStyleContextProvider, s as StyleActions, n as StyleContext, a as StyleMap, o as StyleReducer, c as calculateInheriting, d as cssToSelectors, p as generateCache, l as generateStyleSelector, f as getReadOnlyRangesFromContent, e as helpers, m as makeSelector, u as processCssTokens, r as processSelector, i as processSelectors, h as selectorToString };
|