@plitzi/sdk-style 0.39.1 → 0.39.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 +19 -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,26 +1,26 @@
|
|
|
1
1
|
import { BLEND_MODES as e } from "../blendModes.mjs";
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import u from "
|
|
8
|
-
import
|
|
9
|
-
import f from "../../
|
|
10
|
-
import p from "../../
|
|
2
|
+
import t from "./components/BackgroundLayer/index.mjs";
|
|
3
|
+
import { DEFAULT_LAYER_PROPS as n, DEFAULT_STOPS as r, newLayerId as i, newStopId as a, serializeLayersToCSS as o } from "./helpers/backgroundParser.mjs";
|
|
4
|
+
import { BACKGROUND_KEYS as s } from "../../categoryKeys.mjs";
|
|
5
|
+
import c from "../../components/CategoryAdvanced/index.mjs";
|
|
6
|
+
import l from "../../components/CategoryContainer/index.mjs";
|
|
7
|
+
import u from "../../components/CategoryOption/index.mjs";
|
|
8
|
+
import d from "../../components/CategorySection/index.mjs";
|
|
9
|
+
import f from "../../hooks/useInspectorValues.mjs";
|
|
10
|
+
import p from "../../StyleInspectorContext.mjs";
|
|
11
11
|
import { BG_LAYER_KEYS as m, layerValuesKey as h } from "./helpers/layerValues.mjs";
|
|
12
12
|
import g from "./helpers/parseToBgLayers.mjs";
|
|
13
13
|
import _ from "../../components/ValueList/index.mjs";
|
|
14
14
|
import { memo as v, use as y, useCallback as b, useRef as x, useState as S } from "react";
|
|
15
15
|
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
16
16
|
import T from "@plitzi/plitzi-ui/hooks/useDidUpdateEffect";
|
|
17
|
-
|
|
17
|
+
// src/builder/components/StyleInspector/categories/Background/Background.tsx
|
|
18
18
|
var E = ["background-color"], D = v(({ replaceTokens: v = !1, isCollapsed: D = !0, onCollapse: O }) => {
|
|
19
|
-
let { setValue: k } = y(
|
|
19
|
+
let { setValue: k } = y(p), A = f({
|
|
20
20
|
keys: m,
|
|
21
21
|
asValue: !0,
|
|
22
22
|
strictMode: !0
|
|
23
|
-
}), { "background-color": j, "background-blend-mode": M, "mask-image": N } =
|
|
23
|
+
}), { "background-color": j, "background-blend-mode": M, "mask-image": N } = f({
|
|
24
24
|
keys: [
|
|
25
25
|
"background-color",
|
|
26
26
|
"background-blend-mode",
|
|
@@ -35,7 +35,7 @@ var E = ["background-color"], D = v(({ replaceTokens: v = !1, isCollapsed: D = !
|
|
|
35
35
|
P !== I.current && (R(g(F.current)), I.current = P);
|
|
36
36
|
}, [P]);
|
|
37
37
|
let [z, B] = S(null), V = b((e) => B((t) => t === e ? null : e), []), H = b((e) => {
|
|
38
|
-
let t =
|
|
38
|
+
let t = o(e);
|
|
39
39
|
I.current = h(t), R(e), k(void 0, t);
|
|
40
40
|
}, [k]), U = b((e, t) => {
|
|
41
41
|
if (e === t) return;
|
|
@@ -44,17 +44,17 @@ var E = ["background-color"], D = v(({ replaceTokens: v = !1, isCollapsed: D = !
|
|
|
44
44
|
}, [L, H]), W = b((e) => (t) => {
|
|
45
45
|
H(L.map((n, r) => r === e ? t : n));
|
|
46
46
|
}, [L, H]), G = b(() => {
|
|
47
|
-
let e =
|
|
48
|
-
...
|
|
47
|
+
let e = i(), t = {
|
|
48
|
+
...n,
|
|
49
49
|
id: e,
|
|
50
50
|
type: "linear-gradient",
|
|
51
51
|
stops: [{
|
|
52
|
-
id:
|
|
53
|
-
color:
|
|
52
|
+
id: a(),
|
|
53
|
+
color: r[0].color,
|
|
54
54
|
position: "0%"
|
|
55
55
|
}, {
|
|
56
|
-
id:
|
|
57
|
-
color:
|
|
56
|
+
id: a(),
|
|
57
|
+
color: r[1].color,
|
|
58
58
|
position: "100%"
|
|
59
59
|
}]
|
|
60
60
|
};
|
|
@@ -68,10 +68,10 @@ var E = ["background-color"], D = v(({ replaceTokens: v = !1, isCollapsed: D = !
|
|
|
68
68
|
}, [k]), Y = b((e) => {
|
|
69
69
|
k("mask-image", e);
|
|
70
70
|
}, [k]), X = b((e) => O?.("background", e), [O]);
|
|
71
|
-
return /* @__PURE__ */ C(
|
|
72
|
-
title:
|
|
73
|
-
dotKeys:
|
|
74
|
-
advancedKeys:
|
|
71
|
+
return /* @__PURE__ */ C(l, {
|
|
72
|
+
title: s.title,
|
|
73
|
+
dotKeys: s.dot,
|
|
74
|
+
advancedKeys: s.advanced,
|
|
75
75
|
isCollapsed: D,
|
|
76
76
|
onCollapse: X,
|
|
77
77
|
children: /* @__PURE__ */ w("div", {
|
|
@@ -85,28 +85,28 @@ var E = ["background-color"], D = v(({ replaceTokens: v = !1, isCollapsed: D = !
|
|
|
85
85
|
children: [!L.length && /* @__PURE__ */ C("p", {
|
|
86
86
|
className: "m-0 rounded-md border border-dashed border-gray-300 px-3 py-2.5 text-center text-xs text-zinc-500 dark:border-zinc-700 dark:text-zinc-400",
|
|
87
87
|
children: "No layers. Add one for a gradient or an image."
|
|
88
|
-
}), L.length > 0 && L.map((e,
|
|
89
|
-
index:
|
|
88
|
+
}), L.length > 0 && L.map((e, n) => /* @__PURE__ */ C(t, {
|
|
89
|
+
index: n,
|
|
90
90
|
layer: e,
|
|
91
91
|
expanded: z === e.id,
|
|
92
92
|
onExpand: V,
|
|
93
|
-
onChange: W(
|
|
94
|
-
onRemove: K(
|
|
93
|
+
onChange: W(n),
|
|
94
|
+
onRemove: K(n),
|
|
95
95
|
onReorder: U
|
|
96
96
|
}, e.id))]
|
|
97
97
|
}),
|
|
98
|
-
/* @__PURE__ */ C(
|
|
98
|
+
/* @__PURE__ */ C(d, {
|
|
99
99
|
label: "Color",
|
|
100
100
|
keys: E,
|
|
101
|
-
children: /* @__PURE__ */ C(
|
|
101
|
+
children: /* @__PURE__ */ C(u, {
|
|
102
102
|
type: "color",
|
|
103
103
|
value: j,
|
|
104
104
|
onChange: q
|
|
105
105
|
})
|
|
106
106
|
}),
|
|
107
|
-
/* @__PURE__ */ C(
|
|
107
|
+
/* @__PURE__ */ C(c, { children: /* @__PURE__ */ w(d, {
|
|
108
108
|
label: "",
|
|
109
|
-
children: [/* @__PURE__ */ C(
|
|
109
|
+
children: [/* @__PURE__ */ C(u, {
|
|
110
110
|
keys: ["background-blend-mode"],
|
|
111
111
|
label: "Blend",
|
|
112
112
|
value: M,
|
|
@@ -116,7 +116,7 @@ var E = ["background-color"], D = v(({ replaceTokens: v = !1, isCollapsed: D = !
|
|
|
116
116
|
value: e,
|
|
117
117
|
children: t
|
|
118
118
|
}, e))
|
|
119
|
-
}), /* @__PURE__ */ C(
|
|
119
|
+
}), /* @__PURE__ */ C(u, {
|
|
120
120
|
keys: ["mask-image"],
|
|
121
121
|
label: "Mask",
|
|
122
122
|
value: N,
|
|
@@ -127,5 +127,4 @@ var E = ["background-color"], D = v(({ replaceTokens: v = !1, isCollapsed: D = !
|
|
|
127
127
|
})
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
|
-
//#endregion
|
|
131
130
|
export { D as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "../../../../components/
|
|
3
|
-
import n from "../../../../
|
|
1
|
+
import e from "../../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import t from "../../../../components/CategorySection/index.mjs";
|
|
3
|
+
import { asText as n } from "../../../../cssValues.mjs";
|
|
4
4
|
import { useCallback as r, useMemo as i } from "react";
|
|
5
5
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundAttachment/BackgroundAttachment.tsx
|
|
7
7
|
var o = ({ layer: o, onChange: s }) => {
|
|
8
8
|
let c = i(() => [
|
|
9
9
|
{
|
|
@@ -36,18 +36,17 @@ var o = ({ layer: o, onChange: s }) => {
|
|
|
36
36
|
active: o.attachment === "fixed",
|
|
37
37
|
size: "custom"
|
|
38
38
|
}
|
|
39
|
-
], [o.attachment]), l = r((
|
|
39
|
+
], [o.attachment]), l = r((e) => s?.({
|
|
40
40
|
...o,
|
|
41
|
-
attachment: e
|
|
41
|
+
attachment: n(e)
|
|
42
42
|
}), [o, s]);
|
|
43
|
-
return /* @__PURE__ */ a(
|
|
43
|
+
return /* @__PURE__ */ a(t, {
|
|
44
44
|
label: "Attachment",
|
|
45
|
-
children: /* @__PURE__ */ a(
|
|
45
|
+
children: /* @__PURE__ */ a(e, {
|
|
46
46
|
type: "iconGroup",
|
|
47
47
|
items: c,
|
|
48
48
|
onChange: l
|
|
49
49
|
})
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
//#endregion
|
|
53
52
|
export { o as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import e from "./BackgroundAttachment.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundAttachment/index.ts
|
|
3
3
|
var t = e;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CLIP_OPTIONS as e, LAYER_TYPES as t, LAYER_TYPE_LABELS as n, isGradient as r, layerSummary as i } from "./helpers.mjs";
|
|
2
|
-
import
|
|
3
|
-
import o from "../../../../components/
|
|
4
|
-
import s from "../../../../components/
|
|
5
|
-
import c from "../../../../
|
|
2
|
+
import a from "../../../../components/CategoryOption/index.mjs";
|
|
3
|
+
import o from "../../../../components/CategorySection/index.mjs";
|
|
4
|
+
import s from "../../../../components/ColorSwatch/index.mjs";
|
|
5
|
+
import { asText as c } from "../../../../cssValues.mjs";
|
|
6
6
|
import { serializeLayerImage as l } from "../../helpers/backgroundParser.mjs";
|
|
7
7
|
import u from "../../modes/ConicGradientMode.mjs";
|
|
8
8
|
import d from "../../modes/ImageMode.mjs";
|
|
@@ -15,13 +15,13 @@ import _ from "../BackgroundSize/index.mjs";
|
|
|
15
15
|
import v from "../BackgroundTile/index.mjs";
|
|
16
16
|
import y from "../LayerGroup/index.mjs";
|
|
17
17
|
import { memo as b, useCallback as x, useMemo as S, useState as C } from "react";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
18
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
19
|
+
import { nodeOf as E } from "@plitzi/sdk-shared/helpers";
|
|
20
20
|
import D from "clsx";
|
|
21
21
|
import O from "@plitzi/plitzi-ui/Switch";
|
|
22
22
|
var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove: N, onReorder: P }) => {
|
|
23
23
|
let [F, I] = C(!1), L = S(() => l(b), [b]), R = x((e) => {
|
|
24
|
-
let n = t.find((t) => t ===
|
|
24
|
+
let n = t.find((t) => t === c(e));
|
|
25
25
|
n && M({
|
|
26
26
|
...b,
|
|
27
27
|
type: n
|
|
@@ -31,7 +31,7 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
31
31
|
repeating: e.target.checked
|
|
32
32
|
}), [b, M]), B = x((e) => M({
|
|
33
33
|
...b,
|
|
34
|
-
clip:
|
|
34
|
+
clip: c(e)
|
|
35
35
|
}), [b, M]), V = x(() => j(b.id), [j, b.id]), H = x((e) => {
|
|
36
36
|
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), j(b.id));
|
|
37
37
|
}, [j, b.id]), U = x((e) => e.stopPropagation(), []), W = x((e) => {
|
|
@@ -41,13 +41,13 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
41
41
|
}, [k]), K = x(() => I(!1), []), q = x((e) => {
|
|
42
42
|
e.preventDefault(), I(!0);
|
|
43
43
|
}, []), J = x((e) => {
|
|
44
|
-
e.currentTarget.contains(
|
|
44
|
+
e.currentTarget.contains(E(e.relatedTarget)) || I(!1);
|
|
45
45
|
}, []), Y = x((e) => {
|
|
46
46
|
e.preventDefault(), I(!1);
|
|
47
47
|
let t = parseInt(e.dataTransfer.getData("text/plain"), 10);
|
|
48
48
|
isNaN(t) || P(t, k);
|
|
49
49
|
}, [k, P]), X = r(b.type), Z = b.type !== "none";
|
|
50
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ T("div", {
|
|
51
51
|
className: D("rounded-md border transition-colors duration-150", {
|
|
52
52
|
"border-primary-500 bg-primary-500/5 dark:border-primary-400 dark:bg-primary-400/10": F,
|
|
53
53
|
"border-primary-500/60 dark:border-primary-400/60": A && !F,
|
|
@@ -56,7 +56,7 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
56
56
|
onDragOver: q,
|
|
57
57
|
onDragLeave: J,
|
|
58
58
|
onDrop: Y,
|
|
59
|
-
children: [/* @__PURE__ */
|
|
59
|
+
children: [/* @__PURE__ */ T("div", {
|
|
60
60
|
className: "group flex h-8 cursor-pointer items-center gap-2 px-1.5 select-none",
|
|
61
61
|
role: "button",
|
|
62
62
|
tabIndex: 0,
|
|
@@ -64,106 +64,106 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
64
64
|
onClick: V,
|
|
65
65
|
onKeyDown: H,
|
|
66
66
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ w("span", {
|
|
68
68
|
draggable: !0,
|
|
69
69
|
className: "flex h-5 w-4 cursor-grab items-center justify-center text-zinc-400 hover:text-zinc-700 active:cursor-grabbing dark:text-zinc-500 dark:hover:text-zinc-200",
|
|
70
70
|
title: "Drag to reorder — the first layer is drawn on top",
|
|
71
71
|
onClick: U,
|
|
72
72
|
onDragStart: G,
|
|
73
73
|
onDragEnd: K,
|
|
74
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ w("i", { className: "fa-solid fa-grip-vertical text-xs" })
|
|
75
75
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ w(s, {
|
|
77
77
|
className: "h-5 w-5",
|
|
78
78
|
value: L,
|
|
79
79
|
property: "background"
|
|
80
80
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ w("span", {
|
|
82
82
|
className: "min-w-0 grow truncate text-xs text-zinc-700 dark:text-zinc-200",
|
|
83
83
|
title: i(b),
|
|
84
84
|
children: i(b)
|
|
85
85
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ w("i", { className: D("fa-solid text-xs text-zinc-400 dark:text-zinc-500", {
|
|
87
87
|
"fa-angle-up": A,
|
|
88
88
|
"fa-angle-down": !A
|
|
89
89
|
}) }),
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ w("button", {
|
|
91
91
|
type: "button",
|
|
92
92
|
className: "flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded text-zinc-400 hover:bg-red-500/10 hover:text-red-600 dark:text-zinc-500 dark:hover:text-red-400",
|
|
93
93
|
title: "Remove layer",
|
|
94
94
|
"aria-label": "Remove layer",
|
|
95
95
|
onClick: W,
|
|
96
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ w("i", { className: "fa-solid fa-xmark text-xs" })
|
|
97
97
|
})
|
|
98
98
|
]
|
|
99
|
-
}), A && /* @__PURE__ */
|
|
99
|
+
}), A && /* @__PURE__ */ T("div", {
|
|
100
100
|
className: "flex flex-col gap-4 border-t border-gray-200 p-2.5 dark:border-zinc-700",
|
|
101
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ T(y, {
|
|
102
102
|
title: X ? "Gradient" : n[b.type],
|
|
103
103
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ w(a, {
|
|
105
105
|
label: "Type",
|
|
106
106
|
type: "select",
|
|
107
107
|
value: b.type,
|
|
108
108
|
onChange: R,
|
|
109
|
-
children: t.map((e) => /* @__PURE__ */
|
|
109
|
+
children: t.map((e) => /* @__PURE__ */ w("option", {
|
|
110
110
|
value: e,
|
|
111
111
|
children: n[e]
|
|
112
112
|
}, e))
|
|
113
113
|
}),
|
|
114
|
-
b.type === "url" && /* @__PURE__ */
|
|
114
|
+
b.type === "url" && /* @__PURE__ */ w(d, {
|
|
115
115
|
layer: b,
|
|
116
116
|
onChange: M
|
|
117
117
|
}),
|
|
118
|
-
b.type === "raw" && /* @__PURE__ */
|
|
118
|
+
b.type === "raw" && /* @__PURE__ */ w(m, {
|
|
119
119
|
layer: b,
|
|
120
120
|
onChange: M
|
|
121
121
|
}),
|
|
122
|
-
b.type === "linear-gradient" && /* @__PURE__ */
|
|
122
|
+
b.type === "linear-gradient" && /* @__PURE__ */ w(f, {
|
|
123
123
|
layer: b,
|
|
124
124
|
onChange: M
|
|
125
125
|
}),
|
|
126
|
-
b.type === "radial-gradient" && /* @__PURE__ */
|
|
126
|
+
b.type === "radial-gradient" && /* @__PURE__ */ w(p, {
|
|
127
127
|
layer: b,
|
|
128
128
|
onChange: M
|
|
129
129
|
}),
|
|
130
|
-
b.type === "conic-gradient" && /* @__PURE__ */
|
|
130
|
+
b.type === "conic-gradient" && /* @__PURE__ */ w(u, {
|
|
131
131
|
layer: b,
|
|
132
132
|
onChange: M
|
|
133
133
|
}),
|
|
134
|
-
X && /* @__PURE__ */
|
|
134
|
+
X && /* @__PURE__ */ w(O, {
|
|
135
135
|
size: "xs",
|
|
136
136
|
label: "Repeat the gradient",
|
|
137
137
|
checked: b.repeating,
|
|
138
138
|
onChange: z
|
|
139
139
|
})
|
|
140
140
|
]
|
|
141
|
-
}), Z && /* @__PURE__ */
|
|
141
|
+
}), Z && /* @__PURE__ */ T(y, {
|
|
142
142
|
title: "Placement",
|
|
143
143
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ w(_, {
|
|
145
145
|
layer: b,
|
|
146
146
|
onChange: M
|
|
147
147
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ w(g, {
|
|
149
149
|
layer: b,
|
|
150
150
|
onChange: M
|
|
151
151
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ w(v, {
|
|
153
153
|
layer: b,
|
|
154
154
|
onChange: M
|
|
155
155
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ w(h, {
|
|
157
157
|
layer: b,
|
|
158
158
|
onChange: M
|
|
159
159
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ w(o, {
|
|
161
161
|
label: "Clip",
|
|
162
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ w(a, {
|
|
163
163
|
type: "select",
|
|
164
164
|
value: b.clip,
|
|
165
165
|
onChange: B,
|
|
166
|
-
children: e.map((e) => /* @__PURE__ */
|
|
166
|
+
children: e.map((e) => /* @__PURE__ */ w("option", {
|
|
167
167
|
value: e.value,
|
|
168
168
|
children: e.label
|
|
169
169
|
}, e.value))
|
|
@@ -174,5 +174,4 @@ var k = b(({ layer: b, index: k, expanded: A, onExpand: j, onChange: M, onRemove
|
|
|
174
174
|
})]
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
|
-
//#endregion
|
|
178
177
|
export { k as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundLayer/helpers.ts
|
|
2
2
|
var e = {
|
|
3
3
|
none: "None",
|
|
4
4
|
url: "Image",
|
|
@@ -41,5 +41,4 @@ var e = {
|
|
|
41
41
|
default: return n;
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
//#endregion
|
|
45
44
|
export { n as CLIP_OPTIONS, t as LAYER_TYPES, e as LAYER_TYPE_LABELS, r as isGradient, a as layerSummary };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import e from "./BackgroundLayer.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundLayer/index.ts
|
|
3
3
|
var t = e;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "../../../../components/
|
|
3
|
-
import n from "../../../../
|
|
1
|
+
import e from "../../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import t from "../../../../components/CategorySection/index.mjs";
|
|
3
|
+
import { asText as n } from "../../../../cssValues.mjs";
|
|
4
4
|
import { useCallback as r } from "react";
|
|
5
5
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.tsx
|
|
7
7
|
var o = [
|
|
8
8
|
"center",
|
|
9
9
|
"top",
|
|
@@ -12,23 +12,23 @@ var o = [
|
|
|
12
12
|
"left",
|
|
13
13
|
"auto"
|
|
14
14
|
], s = ({ layer: s, onChange: c }) => {
|
|
15
|
-
let l = r((
|
|
15
|
+
let l = r((e) => c?.({
|
|
16
16
|
...s,
|
|
17
|
-
positionX: e
|
|
18
|
-
}), [s, c]), u = r((
|
|
17
|
+
positionX: n(e)
|
|
18
|
+
}), [s, c]), u = r((e) => c?.({
|
|
19
19
|
...s,
|
|
20
|
-
positionY: e
|
|
20
|
+
positionY: n(e)
|
|
21
21
|
}), [s, c]);
|
|
22
|
-
return /* @__PURE__ */ a(
|
|
22
|
+
return /* @__PURE__ */ a(t, {
|
|
23
23
|
label: "Position",
|
|
24
|
-
children: [/* @__PURE__ */ i(
|
|
24
|
+
children: [/* @__PURE__ */ i(e, {
|
|
25
25
|
label: "X",
|
|
26
26
|
type: "metric",
|
|
27
27
|
value: s.positionX,
|
|
28
28
|
allowedWords: o,
|
|
29
29
|
min: -Infinity,
|
|
30
30
|
onChange: l
|
|
31
|
-
}), /* @__PURE__ */ i(
|
|
31
|
+
}), /* @__PURE__ */ i(e, {
|
|
32
32
|
label: "Y",
|
|
33
33
|
type: "metric",
|
|
34
34
|
value: s.positionY,
|
|
@@ -38,5 +38,4 @@ var o = [
|
|
|
38
38
|
})]
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
//#endregion
|
|
42
41
|
export { s as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import e from "./BackgroundPosition.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundPosition/index.ts
|
|
3
3
|
var t = e;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as default };
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { sizeParts as e, sizePreset as t } from "./helpers.mjs";
|
|
2
|
+
import n from "../../../../components/CategoryOption/index.mjs";
|
|
3
|
+
import r from "../../../../components/CategorySection/index.mjs";
|
|
4
|
+
import { asText as i } from "../../../../cssValues.mjs";
|
|
5
5
|
import { useCallback as a, useMemo as o } from "react";
|
|
6
6
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.tsx
|
|
8
8
|
var u = ({ layer: u, onChange: d }) => {
|
|
9
|
-
let f =
|
|
10
|
-
let
|
|
11
|
-
|
|
9
|
+
let f = t(u.size), [p, m] = e(u.size), h = a((e) => {
|
|
10
|
+
let t = i(e);
|
|
11
|
+
t === "custom" ? d?.({
|
|
12
12
|
...u,
|
|
13
13
|
size: f === "custom" ? u.size : "auto"
|
|
14
14
|
}) : d?.({
|
|
15
15
|
...u,
|
|
16
|
-
size:
|
|
16
|
+
size: t
|
|
17
17
|
});
|
|
18
18
|
}, [
|
|
19
19
|
u,
|
|
20
20
|
d,
|
|
21
21
|
f
|
|
22
|
-
]), g = a((
|
|
22
|
+
]), g = a((e) => d?.({
|
|
23
23
|
...u,
|
|
24
|
-
size: `${e
|
|
24
|
+
size: `${i(e)} ${m}`
|
|
25
25
|
}), [
|
|
26
26
|
m,
|
|
27
27
|
u,
|
|
28
28
|
d
|
|
29
|
-
]), _ = a((
|
|
29
|
+
]), _ = a((e) => d?.({
|
|
30
30
|
...u,
|
|
31
|
-
size: `${p} ${e
|
|
31
|
+
size: `${p} ${i(e)}`
|
|
32
32
|
}), [
|
|
33
33
|
u,
|
|
34
34
|
d,
|
|
@@ -65,21 +65,21 @@ var u = ({ layer: u, onChange: d }) => {
|
|
|
65
65
|
size: "custom"
|
|
66
66
|
}
|
|
67
67
|
], [f]);
|
|
68
|
-
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(
|
|
68
|
+
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(r, {
|
|
69
69
|
label: "Size",
|
|
70
|
-
children: /* @__PURE__ */ c(
|
|
70
|
+
children: /* @__PURE__ */ c(n, {
|
|
71
71
|
type: "iconGroup",
|
|
72
72
|
items: v,
|
|
73
73
|
onChange: h
|
|
74
74
|
})
|
|
75
|
-
}), f === "custom" && /* @__PURE__ */ l(
|
|
75
|
+
}), f === "custom" && /* @__PURE__ */ l(r, {
|
|
76
76
|
label: "",
|
|
77
|
-
children: [/* @__PURE__ */ c(
|
|
77
|
+
children: [/* @__PURE__ */ c(n, {
|
|
78
78
|
label: "Width",
|
|
79
79
|
type: "metric",
|
|
80
80
|
value: p,
|
|
81
81
|
onChange: g
|
|
82
|
-
}), /* @__PURE__ */ c(
|
|
82
|
+
}), /* @__PURE__ */ c(n, {
|
|
83
83
|
label: "Height",
|
|
84
84
|
type: "metric",
|
|
85
85
|
value: m,
|
|
@@ -87,5 +87,4 @@ var u = ({ layer: u, onChange: d }) => {
|
|
|
87
87
|
})]
|
|
88
88
|
})] });
|
|
89
89
|
};
|
|
90
|
-
//#endregion
|
|
91
90
|
export { u as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundSize/helpers.ts
|
|
2
2
|
var e = (e) => e === "cover" || e === "contain" ? e : "custom", t = (t) => {
|
|
3
3
|
if (e(t) !== "custom") return ["auto", "auto"];
|
|
4
4
|
let [n = "auto", r = "auto"] = t.split(" ").filter(Boolean);
|
|
5
5
|
return [n, r];
|
|
6
6
|
};
|
|
7
|
-
//#endregion
|
|
8
7
|
export { t as sizeParts, e as sizePreset };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import e from "./BackgroundSize.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundSize/index.ts
|
|
3
3
|
var t = e;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "../../../../components/
|
|
3
|
-
import n from "../../../../
|
|
1
|
+
import e from "../../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import t from "../../../../components/CategorySection/index.mjs";
|
|
3
|
+
import { asText as n } from "../../../../cssValues.mjs";
|
|
4
4
|
import { useCallback as r, useMemo as i } from "react";
|
|
5
5
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
6
|
import o from "@plitzi/plitzi-ui/icons/BackgroundTileX";
|
|
7
7
|
import s from "@plitzi/plitzi-ui/icons/BackgroundTileXY";
|
|
8
8
|
import c from "@plitzi/plitzi-ui/icons/BackgroundTileY";
|
|
9
9
|
import l from "@plitzi/plitzi-ui/icons/XMark";
|
|
10
|
-
|
|
10
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.tsx
|
|
11
11
|
var u = ({ layer: u, onChange: d }) => {
|
|
12
12
|
let f = i(() => [
|
|
13
13
|
{
|
|
@@ -34,18 +34,17 @@ var u = ({ layer: u, onChange: d }) => {
|
|
|
34
34
|
description: "Don't tile",
|
|
35
35
|
active: u.repeat === "no-repeat"
|
|
36
36
|
}
|
|
37
|
-
], [u.repeat]), p = r((
|
|
37
|
+
], [u.repeat]), p = r((e) => d?.({
|
|
38
38
|
...u,
|
|
39
|
-
repeat: e
|
|
39
|
+
repeat: n(e)
|
|
40
40
|
}), [u, d]);
|
|
41
|
-
return /* @__PURE__ */ a(
|
|
41
|
+
return /* @__PURE__ */ a(t, {
|
|
42
42
|
label: "Tile",
|
|
43
|
-
children: /* @__PURE__ */ a(
|
|
43
|
+
children: /* @__PURE__ */ a(e, {
|
|
44
44
|
type: "iconGroup",
|
|
45
45
|
items: f,
|
|
46
46
|
onChange: p
|
|
47
47
|
})
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
//#endregion
|
|
51
50
|
export { u as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import e from "./BackgroundTile.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/components/BackgroundTile/index.ts
|
|
3
3
|
var t = e;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as default };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "../../../../components/
|
|
3
|
-
import n from "../../../../
|
|
1
|
+
import e from "../../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import t from "../../../../components/CategorySection/index.mjs";
|
|
3
|
+
import { asText as n } from "../../../../cssValues.mjs";
|
|
4
4
|
import { CENTER_X_WORDS as r, CENTER_Y_WORDS as i, centerParts as a, joinCenter as o } from "../../modes/helpers.mjs";
|
|
5
5
|
import { useCallback as s } from "react";
|
|
6
6
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/builder/components/StyleInspector/categories/Background/components/GradientCenter/GradientCenter.tsx
|
|
8
8
|
var u = ({ position: u, onChange: d }) => {
|
|
9
|
-
let [f, p] = a(u), m = s((
|
|
10
|
-
return /* @__PURE__ */ l(
|
|
9
|
+
let [f, p] = a(u), m = s((e) => d(o(n(e), p)), [p, d]), h = s((e) => d(o(f, n(e))), [f, d]);
|
|
10
|
+
return /* @__PURE__ */ l(t, {
|
|
11
11
|
label: "Center",
|
|
12
|
-
children: [/* @__PURE__ */ c(
|
|
12
|
+
children: [/* @__PURE__ */ c(e, {
|
|
13
13
|
type: "metric",
|
|
14
14
|
value: f,
|
|
15
15
|
allowedWords: r,
|
|
16
16
|
min: -Infinity,
|
|
17
17
|
onChange: m
|
|
18
|
-
}), /* @__PURE__ */ c(
|
|
18
|
+
}), /* @__PURE__ */ c(e, {
|
|
19
19
|
type: "metric",
|
|
20
20
|
value: p,
|
|
21
21
|
allowedWords: i,
|
|
@@ -24,5 +24,4 @@ var u = ({ position: u, onChange: d }) => {
|
|
|
24
24
|
})]
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
export { u as default };
|