@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,5 +1,4 @@
|
|
|
1
1
|
import e from "./GradientCenter.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/components/GradientCenter/index.ts
|
|
3
3
|
var t = e;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as default };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import t from "../../../../
|
|
3
|
-
import
|
|
1
|
+
import { CHECKERBOARD as e } from "../../../../components/ColorSwatch/helpers.mjs";
|
|
2
|
+
import { resolveTokens as t } from "../../../../cssValues.mjs";
|
|
3
|
+
import n from "../../../../StyleInspectorContext.mjs";
|
|
4
4
|
import { use as r, useMemo as i } from "react";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.tsx
|
|
7
7
|
var s = ({ gradientCSS: s, children: c, onClick: l }) => {
|
|
8
|
-
let { variables: u } = r(
|
|
8
|
+
let { variables: u } = r(n), d = i(() => ({ background: t(s, u) }), [s, u]);
|
|
9
9
|
return /* @__PURE__ */ o("div", {
|
|
10
10
|
className: "relative h-7 w-full cursor-copy rounded-md ring-1 ring-black/15 ring-inset dark:ring-white/20",
|
|
11
|
-
style:
|
|
11
|
+
style: e,
|
|
12
12
|
title: "Click the bar to add a stop",
|
|
13
13
|
onClick: l,
|
|
14
14
|
children: [/* @__PURE__ */ a("div", {
|
|
@@ -17,5 +17,4 @@ var s = ({ gradientCSS: s, children: c, onClick: l }) => {
|
|
|
17
17
|
}), c]
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { s as default };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "./
|
|
3
|
-
import n from "./
|
|
1
|
+
import e from "./GradientPreviewBar.mjs";
|
|
2
|
+
import t from "./GradientStopEditor.mjs";
|
|
3
|
+
import n from "./GradientStopTrack.mjs";
|
|
4
4
|
import { colorNear as r, sortStops as i, stopsPreview as a } from "./helpers.mjs";
|
|
5
|
-
import o from "
|
|
5
|
+
import { newStopId as o } from "../../helpers/backgroundParser.mjs";
|
|
6
6
|
import { useCallback as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
7
7
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.tsx
|
|
9
9
|
var p = 10, m = ({ stops: m, onChange: h }) => {
|
|
10
10
|
let g = l(m);
|
|
11
11
|
g.current = m;
|
|
12
|
-
let [_, v] = u(m[0]?.id ?? ""), y = c(() => a(m), [m]), b = m.find((e) => e.id === _) ?? m.at(0), x = s((
|
|
13
|
-
let
|
|
14
|
-
id:
|
|
15
|
-
color: r(
|
|
16
|
-
position: `${
|
|
12
|
+
let [_, v] = u(m[0]?.id ?? ""), y = c(() => a(m), [m]), b = m.find((e) => e.id === _) ?? m.at(0), x = s((e) => {
|
|
13
|
+
let t = g.current, n = {
|
|
14
|
+
id: o(),
|
|
15
|
+
color: r(t, e),
|
|
16
|
+
position: `${e}%`
|
|
17
17
|
};
|
|
18
|
-
h?.(i([...
|
|
18
|
+
h?.(i([...t, n])), v(n.id);
|
|
19
19
|
}, [h]), S = s((e) => {
|
|
20
20
|
let { left: t, width: n } = e.currentTarget.getBoundingClientRect(), r = n - p * 2;
|
|
21
21
|
x(Math.round(Math.max(0, Math.min(100, (e.clientX - t - p) / r * 100))));
|
|
@@ -38,17 +38,17 @@ var p = 10, m = ({ stops: m, onChange: h }) => {
|
|
|
38
38
|
}, [D, b]);
|
|
39
39
|
return /* @__PURE__ */ f("div", {
|
|
40
40
|
className: "flex flex-col gap-2",
|
|
41
|
-
children: [/* @__PURE__ */ d(
|
|
41
|
+
children: [/* @__PURE__ */ d(e, {
|
|
42
42
|
gradientCSS: y,
|
|
43
43
|
onClick: S,
|
|
44
|
-
children: /* @__PURE__ */ d(
|
|
44
|
+
children: /* @__PURE__ */ d(n, {
|
|
45
45
|
stops: m,
|
|
46
46
|
selectedId: b?.id ?? "",
|
|
47
47
|
onChange: E,
|
|
48
48
|
onSelect: v,
|
|
49
49
|
onRemove: D
|
|
50
50
|
})
|
|
51
|
-
}), b && /* @__PURE__ */ d(
|
|
51
|
+
}), b && /* @__PURE__ */ d(t, {
|
|
52
52
|
stop: b,
|
|
53
53
|
canRemove: m.length > 2,
|
|
54
54
|
onColorChange: w,
|
|
@@ -58,5 +58,4 @@ var p = 10, m = ({ stops: m, onChange: h }) => {
|
|
|
58
58
|
})]
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
|
-
//#endregion
|
|
62
61
|
export { m as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import n from "@plitzi/plitzi-ui/ColorPicker";
|
|
3
3
|
import r from "@plitzi/plitzi-ui/MetricInput";
|
|
4
|
-
|
|
4
|
+
// src/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.tsx
|
|
5
5
|
var i = [{
|
|
6
6
|
label: "%",
|
|
7
7
|
value: "%"
|
|
@@ -54,5 +54,4 @@ var i = [{
|
|
|
54
54
|
]
|
|
55
55
|
})]
|
|
56
56
|
});
|
|
57
|
-
//#endregion
|
|
58
57
|
export { a as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import t from "../../../../
|
|
3
|
-
import
|
|
1
|
+
import { stopPct as e } from "./helpers.mjs";
|
|
2
|
+
import { resolveTokens as t } from "../../../../cssValues.mjs";
|
|
3
|
+
import n from "../../../../StyleInspectorContext.mjs";
|
|
4
4
|
import r from "../../helpers/normalizeLeft.mjs";
|
|
5
5
|
import { use as i, useCallback as a, useLayoutEffect as o, useMemo as s, useRef as c } from "react";
|
|
6
6
|
import { jsx as l } from "react/jsx-runtime";
|
|
7
7
|
import u from "clsx";
|
|
8
|
-
|
|
8
|
+
// src/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.tsx
|
|
9
9
|
var d = ({ stop: d, selected: f, trackRef: p, onPositionChange: m, onSelect: h, onRemove: g }) => {
|
|
10
|
-
let { variables: _ } = i(
|
|
10
|
+
let { variables: _ } = i(n), v = c(null), y = c(!1), b = c(!1), x = s(() => r(d.position.split(" ")[0] ?? "", p.current?.getBoundingClientRect().width ?? Infinity), [d.position, p]), S = s(() => t(d.color, _), [d.color, _]), C = a((e) => {
|
|
11
11
|
let t = p.current;
|
|
12
12
|
if (!t) return 0;
|
|
13
13
|
let { left: n, width: r } = t.getBoundingClientRect();
|
|
@@ -29,13 +29,13 @@ var d = ({ stop: d, selected: f, trackRef: p, onPositionChange: m, onSelect: h,
|
|
|
29
29
|
C,
|
|
30
30
|
m,
|
|
31
31
|
d.id
|
|
32
|
-
]), D = a((
|
|
33
|
-
let
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
let r =
|
|
32
|
+
]), D = a((t) => {
|
|
33
|
+
let n = t.shiftKey ? 10 : 1;
|
|
34
|
+
if (t.key === "ArrowLeft" || t.key === "ArrowRight") {
|
|
35
|
+
t.preventDefault();
|
|
36
|
+
let r = e(d.position) + (t.key === "ArrowLeft" ? -n : n);
|
|
37
37
|
m(d.id, Math.max(0, Math.min(100, r)));
|
|
38
|
-
} else (
|
|
38
|
+
} else (t.key === "Delete" || t.key === "Backspace") && (t.preventDefault(), t.stopPropagation(), g(d.id));
|
|
39
39
|
}, [
|
|
40
40
|
m,
|
|
41
41
|
g,
|
|
@@ -62,5 +62,4 @@ var d = ({ stop: d, selected: f, trackRef: p, onPositionChange: m, onSelect: h,
|
|
|
62
62
|
onClick: O
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
|
-
//#endregion
|
|
66
65
|
export { d as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./GradientStopHandle.mjs";
|
|
2
2
|
import { useCallback as t, useRef as n } from "react";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/builder/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.tsx
|
|
5
5
|
var i = ({ stops: i, selectedId: a, onChange: o, onSelect: s, onRemove: c }) => {
|
|
6
6
|
let l = n(null), u = n(i);
|
|
7
7
|
u.current = i;
|
|
@@ -24,5 +24,4 @@ var i = ({ stops: i, selectedId: a, onChange: o, onSelect: s, onRemove: c }) =>
|
|
|
24
24
|
}, t.id))
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
export { i as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { serializeStop as e } from "../../helpers/backgroundParser.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/components/GradientStopBar/helpers.ts
|
|
3
3
|
var t = (e) => {
|
|
4
4
|
let t = parseFloat(e);
|
|
5
5
|
return isNaN(t) ? 0 : Math.max(0, Math.min(100, t));
|
|
6
6
|
}, n = (e) => [...e].sort((e, n) => t(e.position) - t(n.position)), r = (t) => `linear-gradient(90deg, ${n(t).map(e).join(", ")})`, i = (e, n) => [...e].sort((e, r) => Math.abs(t(e.position) - n) - Math.abs(t(r.position) - n)).at(0)?.color ?? "#808080";
|
|
7
|
-
//#endregion
|
|
8
7
|
export { i as colorNear, n as sortStops, t as stopPct, r as stopsPreview };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import e from "./GradientStopBar.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/components/GradientStopBar/index.ts
|
|
3
3
|
var t = e;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/components/LayerGroup/LayerGroup.tsx
|
|
3
3
|
var n = ({ title: n, children: r }) => /* @__PURE__ */ t("div", {
|
|
4
4
|
className: "flex flex-col gap-2",
|
|
5
5
|
children: [/* @__PURE__ */ e("span", {
|
|
@@ -7,5 +7,4 @@ var n = ({ title: n, children: r }) => /* @__PURE__ */ t("div", {
|
|
|
7
7
|
children: n
|
|
8
8
|
}), r]
|
|
9
9
|
});
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as default };
|
package/dist/builder/components/StyleInspector/categories/Background/components/LayerGroup/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import e from "./LayerGroup.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/components/LayerGroup/index.ts
|
|
3
3
|
var t = e;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as default };
|
package/dist/builder/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { splitBySpaceOutsideParens as e } from "../../../cssValues.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/helpers/backgroundParser.ts
|
|
3
3
|
var t = [{
|
|
4
4
|
id: "stop-default-0",
|
|
5
5
|
color: "#000000",
|
|
@@ -179,5 +179,4 @@ function O(e) {
|
|
|
179
179
|
"background-clip": e.map((e) => e.clip).join(", ")
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
|
-
//#endregion
|
|
183
182
|
export { r as DEFAULT_LAYER_PROPS, t as DEFAULT_STOPS, a as newLayerId, o as newStopId, w as parseBackgroundLayers, D as serializeLayerImage, O as serializeLayersToCSS, T as serializeStop, s as splitTopLevelCommas };
|
package/dist/builder/components/StyleInspector/categories/Background/helpers/layerValues.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/builder/components/StyleInspector/categories/Background/helpers/layerValues.ts
|
|
2
2
|
var e = [
|
|
3
3
|
"background-image",
|
|
4
4
|
"background-size",
|
|
@@ -7,5 +7,4 @@ var e = [
|
|
|
7
7
|
"background-attachment",
|
|
8
8
|
"background-clip"
|
|
9
9
|
], t = (t) => e.map((e) => String(t[e])).join("||");
|
|
10
|
-
//#endregion
|
|
11
10
|
export { e as BG_LAYER_KEYS, t as layerValuesKey };
|
package/dist/builder/components/StyleInspector/categories/Background/helpers/normalizeLeft.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/builder/components/StyleInspector/categories/Background/helpers/normalizeLeft.ts
|
|
2
2
|
var e = (e, t = Infinity) => {
|
|
3
3
|
if (!e) return "0";
|
|
4
4
|
let n = e.trim(), r = n.match(/^(-?\d+(\.\d+)?)(%)?([a-zA-Z]+)?$/);
|
|
@@ -6,5 +6,4 @@ var e = (e, t = Infinity) => {
|
|
|
6
6
|
let i = Number(r[1]), a = !!r[3], o = r[4] || "";
|
|
7
7
|
return a ? `${Math.min(100, Math.max(0, i))}%` : `${Math.min(typeof t == "number" ? t : Infinity, Math.max(0, i))}${o}`;
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { e as default };
|
package/dist/builder/components/StyleInspector/categories/Background/helpers/parseToBgLayers.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { newLayerId as e, newStopId as t, parseBackgroundLayers as n } from "./backgroundParser.mjs";
|
|
2
|
-
|
|
2
|
+
// src/builder/components/StyleInspector/categories/Background/helpers/parseToBgLayers.ts
|
|
3
3
|
var r = (r) => n({
|
|
4
4
|
"background-image": r["background-image"],
|
|
5
5
|
"background-size": r["background-size"],
|
|
@@ -15,5 +15,4 @@ var r = (r) => n({
|
|
|
15
15
|
id: t()
|
|
16
16
|
}))
|
|
17
17
|
}));
|
|
18
|
-
//#endregion
|
|
19
18
|
export { r as default };
|
package/dist/builder/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ANGLE_UNITS as e } from "./helpers.mjs";
|
|
2
2
|
import t from "../../../components/CategoryOption/index.mjs";
|
|
3
3
|
import n from "../../../components/CategorySection/index.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { asText as r } from "../../../cssValues.mjs";
|
|
5
5
|
import i from "../components/GradientCenter/index.mjs";
|
|
6
6
|
import a from "../components/GradientStopBar/index.mjs";
|
|
7
7
|
import { useCallback as o } from "react";
|
|
8
8
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
-
|
|
9
|
+
// src/builder/components/StyleInspector/categories/Background/modes/ConicGradientMode.tsx
|
|
10
10
|
var u = ({ layer: u, onChange: d }) => {
|
|
11
|
-
let f = o((
|
|
11
|
+
let f = o((e) => d?.({
|
|
12
12
|
...u,
|
|
13
|
-
conicAngle: e
|
|
13
|
+
conicAngle: r(e)
|
|
14
14
|
}), [u, d]), p = o((e) => d?.({
|
|
15
15
|
...u,
|
|
16
16
|
conicPosition: e
|
|
@@ -24,7 +24,7 @@ var u = ({ layer: u, onChange: d }) => {
|
|
|
24
24
|
children: /* @__PURE__ */ c(t, {
|
|
25
25
|
type: "metric",
|
|
26
26
|
value: u.conicAngle,
|
|
27
|
-
units:
|
|
27
|
+
units: e,
|
|
28
28
|
min: -Infinity,
|
|
29
29
|
onChange: f
|
|
30
30
|
})
|
|
@@ -39,5 +39,4 @@ var u = ({ layer: u, onChange: d }) => {
|
|
|
39
39
|
})
|
|
40
40
|
] });
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { u as default };
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "../../../
|
|
1
|
+
import e from "../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import { asText as t } from "../../../cssValues.mjs";
|
|
3
3
|
import { useCallback as n } from "react";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/builder/components/StyleInspector/categories/Background/modes/ImageMode.tsx
|
|
6
6
|
var i = ({ layer: i, onChange: a }) => {
|
|
7
|
-
let o = n((
|
|
7
|
+
let o = n((e) => a?.({
|
|
8
8
|
...i,
|
|
9
|
-
url: e
|
|
9
|
+
url: t(e)
|
|
10
10
|
}), [i, a]);
|
|
11
|
-
return /* @__PURE__ */ r(
|
|
11
|
+
return /* @__PURE__ */ r(e, {
|
|
12
12
|
label: "URL",
|
|
13
13
|
type: "input",
|
|
14
14
|
value: i.url,
|
|
15
15
|
onChange: o
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { i as default };
|
package/dist/builder/components/StyleInspector/categories/Background/modes/LinearGradientMode.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { ANGLE_UNITS as e, LINEAR_DIRECTIONS 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 a from "../components/GradientStopBar/index.mjs";
|
|
6
6
|
import { useCallback as o } from "react";
|
|
7
7
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/builder/components/StyleInspector/categories/Background/modes/LinearGradientMode.tsx
|
|
9
9
|
var u = ({ layer: u, onChange: d }) => {
|
|
10
|
-
let f = o((
|
|
10
|
+
let f = o((e) => d?.({
|
|
11
11
|
...u,
|
|
12
|
-
angle: e
|
|
12
|
+
angle: i(e)
|
|
13
13
|
}), [u, d]), p = o((e) => d?.({
|
|
14
14
|
...u,
|
|
15
15
|
stops: e
|
|
16
16
|
}), [u, d]);
|
|
17
|
-
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(
|
|
17
|
+
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(r, {
|
|
18
18
|
label: "Direction",
|
|
19
|
-
children: /* @__PURE__ */ c(
|
|
19
|
+
children: /* @__PURE__ */ c(n, {
|
|
20
20
|
type: "metric",
|
|
21
21
|
value: u.angle || "to bottom",
|
|
22
|
-
units:
|
|
23
|
-
allowedWords:
|
|
22
|
+
units: e,
|
|
23
|
+
allowedWords: t,
|
|
24
24
|
min: -Infinity,
|
|
25
25
|
onChange: f
|
|
26
26
|
})
|
|
@@ -29,5 +29,4 @@ var u = ({ layer: u, onChange: d }) => {
|
|
|
29
29
|
onChange: p
|
|
30
30
|
})] });
|
|
31
31
|
};
|
|
32
|
-
//#endregion
|
|
33
32
|
export { u as default };
|
package/dist/builder/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { RADIAL_EXTENTS as e, customExtentFor as t, isExtentKeyword as n } from "./helpers.mjs";
|
|
2
|
+
import r from "../../../components/CategoryOption/index.mjs";
|
|
3
|
+
import i from "../../../components/CategorySection/index.mjs";
|
|
4
|
+
import { asText as a } from "../../../cssValues.mjs";
|
|
5
5
|
import o from "../components/GradientCenter/index.mjs";
|
|
6
6
|
import s from "../components/GradientStopBar/index.mjs";
|
|
7
7
|
import { useCallback as c } from "react";
|
|
8
8
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
-
|
|
9
|
+
// src/builder/components/StyleInspector/categories/Background/modes/RadialGradientMode.tsx
|
|
10
10
|
var f = "custom", p = ({ layer: p, onChange: m }) => {
|
|
11
|
-
let h = !
|
|
11
|
+
let h = !n(p.radialExtent), g = c((e) => m?.({
|
|
12
12
|
...p,
|
|
13
|
-
radialShape: e
|
|
14
|
-
}), [p, m]), _ = c((
|
|
15
|
-
let n = e
|
|
13
|
+
radialShape: a(e) === "circle" ? "circle" : "ellipse"
|
|
14
|
+
}), [p, m]), _ = c((e) => {
|
|
15
|
+
let n = a(e);
|
|
16
16
|
m?.({
|
|
17
17
|
...p,
|
|
18
|
-
radialExtent: n === f ?
|
|
18
|
+
radialExtent: n === f ? t(p.radialShape) : n
|
|
19
19
|
});
|
|
20
|
-
}, [p, m]), v = c((
|
|
20
|
+
}, [p, m]), v = c((e) => m?.({
|
|
21
21
|
...p,
|
|
22
|
-
radialExtent: e
|
|
22
|
+
radialExtent: a(e)
|
|
23
23
|
}), [p, m]), y = c((e) => m?.({
|
|
24
24
|
...p,
|
|
25
25
|
radialPosition: e
|
|
@@ -28,9 +28,9 @@ var f = "custom", p = ({ layer: p, onChange: m }) => {
|
|
|
28
28
|
stops: e
|
|
29
29
|
}), [p, m]);
|
|
30
30
|
return /* @__PURE__ */ d(l, { children: [
|
|
31
|
-
/* @__PURE__ */ u(
|
|
31
|
+
/* @__PURE__ */ u(i, {
|
|
32
32
|
label: "Shape",
|
|
33
|
-
children: /* @__PURE__ */ d(
|
|
33
|
+
children: /* @__PURE__ */ d(r, {
|
|
34
34
|
type: "select",
|
|
35
35
|
value: p.radialShape,
|
|
36
36
|
onChange: g,
|
|
@@ -43,13 +43,13 @@ var f = "custom", p = ({ layer: p, onChange: m }) => {
|
|
|
43
43
|
})]
|
|
44
44
|
})
|
|
45
45
|
}),
|
|
46
|
-
/* @__PURE__ */ u(
|
|
46
|
+
/* @__PURE__ */ u(i, {
|
|
47
47
|
label: "Extent",
|
|
48
|
-
children: /* @__PURE__ */ d(
|
|
48
|
+
children: /* @__PURE__ */ d(r, {
|
|
49
49
|
type: "select",
|
|
50
50
|
value: h ? f : p.radialExtent,
|
|
51
51
|
onChange: _,
|
|
52
|
-
children: [
|
|
52
|
+
children: [e.map((e) => /* @__PURE__ */ u("option", {
|
|
53
53
|
value: e.value,
|
|
54
54
|
children: e.label
|
|
55
55
|
}, e.value)), /* @__PURE__ */ u("option", {
|
|
@@ -58,9 +58,9 @@ var f = "custom", p = ({ layer: p, onChange: m }) => {
|
|
|
58
58
|
})]
|
|
59
59
|
})
|
|
60
60
|
}),
|
|
61
|
-
h && /* @__PURE__ */ u(
|
|
61
|
+
h && /* @__PURE__ */ u(i, {
|
|
62
62
|
label: "Radius",
|
|
63
|
-
children: /* @__PURE__ */ u(
|
|
63
|
+
children: /* @__PURE__ */ u(r, {
|
|
64
64
|
type: "input",
|
|
65
65
|
value: p.radialExtent,
|
|
66
66
|
onChange: v
|
|
@@ -76,5 +76,4 @@ var f = "custom", p = ({ layer: p, onChange: m }) => {
|
|
|
76
76
|
})
|
|
77
77
|
] });
|
|
78
78
|
};
|
|
79
|
-
//#endregion
|
|
80
79
|
export { p as default };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "../../../
|
|
1
|
+
import e from "../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import { asText as t } from "../../../cssValues.mjs";
|
|
3
3
|
import { useCallback as n } from "react";
|
|
4
4
|
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/builder/components/StyleInspector/categories/Background/modes/RawMode.tsx
|
|
6
6
|
var o = ({ layer: o, onChange: s }) => {
|
|
7
|
-
let c = n((
|
|
7
|
+
let c = n((e) => s?.({
|
|
8
8
|
...o,
|
|
9
|
-
raw: e
|
|
9
|
+
raw: t(e)
|
|
10
10
|
}), [o, s]);
|
|
11
|
-
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(
|
|
11
|
+
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(e, {
|
|
12
12
|
label: "CSS",
|
|
13
13
|
type: "input",
|
|
14
14
|
value: o.raw,
|
|
@@ -18,5 +18,4 @@ var o = ({ layer: o, onChange: s }) => {
|
|
|
18
18
|
children: "Any image CSS accepts: a token such as var(--hero-bg), image-set(…), cross-fade(…)."
|
|
19
19
|
})] });
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { o as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/builder/components/StyleInspector/categories/Background/modes/helpers.ts
|
|
2
2
|
var e = [
|
|
3
3
|
{
|
|
4
4
|
label: "DEG",
|
|
@@ -50,5 +50,4 @@ var e = [
|
|
|
50
50
|
let [t = "center", n = "center"] = e.split(" ").filter(Boolean);
|
|
51
51
|
return [t, n];
|
|
52
52
|
}, c = (e, t) => e === "center" && t === "center" ? "" : `${e} ${t}`;
|
|
53
|
-
//#endregion
|
|
54
53
|
export { e as ANGLE_UNITS, n as CENTER_X_WORDS, r as CENTER_Y_WORDS, t as LINEAR_DIRECTIONS, i as RADIAL_EXTENTS, s as centerParts, o as customExtentFor, a as isExtentKeyword, c as joinCenter };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
4
|
-
import r from "
|
|
5
|
-
import i from "./
|
|
6
|
-
import a from "
|
|
7
|
-
import o from "
|
|
8
|
-
import s from "
|
|
9
|
-
import c from "
|
|
1
|
+
import e from "./BorderColor.mjs";
|
|
2
|
+
import t from "./BorderPlacements.mjs";
|
|
3
|
+
import n from "./BorderRadius.mjs";
|
|
4
|
+
import r from "./BorderStyle.mjs";
|
|
5
|
+
import i from "./BorderWidth.mjs";
|
|
6
|
+
import { BORDER_KEYS as a } from "../../categoryKeys.mjs";
|
|
7
|
+
import o from "../../components/CategoryContainer/index.mjs";
|
|
8
|
+
import s from "../../hooks/useInspectorValues.mjs";
|
|
9
|
+
import c from "../../StyleInspectorContext.mjs";
|
|
10
10
|
import { memo as l, use as u, useCallback as d, useState as f } from "react";
|
|
11
11
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
12
|
var h = l(({ replaceTokens: l = !1, isCollapsed: h = !0, onCollapse: g }) => {
|
|
13
|
-
let [_, v] = f("all"), { setValue: y } = u(
|
|
14
|
-
keys:
|
|
13
|
+
let [_, v] = f("all"), { setValue: y } = u(c), b = s({
|
|
14
|
+
keys: a.dot,
|
|
15
15
|
asValue: !0,
|
|
16
16
|
replaceTokens: l
|
|
17
17
|
}), x = d((e) => (t) => {
|
|
@@ -64,36 +64,36 @@ var h = l(({ replaceTokens: l = !1, isCollapsed: h = !0, onCollapse: g }) => {
|
|
|
64
64
|
b,
|
|
65
65
|
y
|
|
66
66
|
]), S = d((e) => g?.("border", e), [g]);
|
|
67
|
-
return /* @__PURE__ */ p(
|
|
68
|
-
title:
|
|
69
|
-
dotKeys:
|
|
67
|
+
return /* @__PURE__ */ p(o, {
|
|
68
|
+
title: a.title,
|
|
69
|
+
dotKeys: a.dot,
|
|
70
70
|
isCollapsed: h,
|
|
71
71
|
onCollapse: S,
|
|
72
72
|
children: /* @__PURE__ */ m("div", {
|
|
73
73
|
className: "flex flex-col gap-2",
|
|
74
|
-
children: [/* @__PURE__ */ p(
|
|
74
|
+
children: [/* @__PURE__ */ p(n, {
|
|
75
75
|
values: b,
|
|
76
76
|
onChange: x("radius"),
|
|
77
77
|
onChangeSegment: x
|
|
78
78
|
}), /* @__PURE__ */ m("div", {
|
|
79
79
|
className: "flex w-full flex-col gap-2",
|
|
80
|
-
children: [/* @__PURE__ */ p(
|
|
80
|
+
children: [/* @__PURE__ */ p(t, {
|
|
81
81
|
currentPlacement: _,
|
|
82
82
|
setCurrentPlacement: v
|
|
83
83
|
}), /* @__PURE__ */ m("div", {
|
|
84
84
|
className: "flex w-full flex-col gap-2",
|
|
85
85
|
children: [
|
|
86
|
-
/* @__PURE__ */ p(
|
|
86
|
+
/* @__PURE__ */ p(r, {
|
|
87
87
|
values: b,
|
|
88
88
|
currentPlacement: _,
|
|
89
89
|
onChange: x("style")
|
|
90
90
|
}),
|
|
91
|
-
/* @__PURE__ */ p(
|
|
91
|
+
/* @__PURE__ */ p(i, {
|
|
92
92
|
values: b,
|
|
93
93
|
currentPlacement: _,
|
|
94
94
|
onChange: x("width")
|
|
95
95
|
}),
|
|
96
|
-
/* @__PURE__ */ p(
|
|
96
|
+
/* @__PURE__ */ p(e, {
|
|
97
97
|
values: b,
|
|
98
98
|
currentPlacement: _,
|
|
99
99
|
onChange: x("color")
|
|
@@ -104,5 +104,4 @@ var h = l(({ replaceTokens: l = !1, isCollapsed: h = !0, onCollapse: g }) => {
|
|
|
104
104
|
})
|
|
105
105
|
});
|
|
106
106
|
});
|
|
107
|
-
//#endregion
|
|
108
107
|
export { h as default };
|
|
@@ -2,7 +2,7 @@ import e from "../../components/CategoryOption/index.mjs";
|
|
|
2
2
|
import t from "../../components/CategorySection/index.mjs";
|
|
3
3
|
import { useMemo as n } from "react";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/builder/components/StyleInspector/categories/Border/BorderColor.tsx
|
|
6
6
|
var i = ({ values: i, currentPlacement: a, onChange: o }) => {
|
|
7
7
|
let s = n(() => {
|
|
8
8
|
let { "border-top-color": e, "border-bottom-color": t, "border-left-color": n, "border-right-color": r } = i;
|
|
@@ -30,5 +30,4 @@ var i = ({ values: i, currentPlacement: a, onChange: o }) => {
|
|
|
30
30
|
})
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
//#endregion
|
|
34
33
|
export { i as default };
|
|
@@ -8,7 +8,7 @@ import s from "@plitzi/plitzi-ui/icons/BorderPlacementCenter";
|
|
|
8
8
|
import c from "@plitzi/plitzi-ui/icons/BorderPlacementLeft";
|
|
9
9
|
import l from "@plitzi/plitzi-ui/icons/BorderPlacementRight";
|
|
10
10
|
import u from "@plitzi/plitzi-ui/icons/BorderPlacementTop";
|
|
11
|
-
|
|
11
|
+
// src/builder/components/StyleInspector/categories/Border/BorderPlacements.tsx
|
|
12
12
|
var d = ({ currentPlacement: d, setCurrentPlacement: f }) => {
|
|
13
13
|
let p = t((e) => () => f(e), [f]);
|
|
14
14
|
return /* @__PURE__ */ n(e, {
|
|
@@ -60,5 +60,4 @@ var d = ({ currentPlacement: d, setCurrentPlacement: f }) => {
|
|
|
60
60
|
})
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
|
-
//#endregion
|
|
64
63
|
export { d as default };
|
|
@@ -2,7 +2,7 @@ import e from "../../components/CategoryOption/index.mjs";
|
|
|
2
2
|
import t from "../../components/CategorySection/index.mjs";
|
|
3
3
|
import { useCallback as n, useMemo as r, useState as i } from "react";
|
|
4
4
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/builder/components/StyleInspector/categories/Border/BorderRadius.tsx
|
|
6
6
|
var s = [
|
|
7
7
|
"border-top-left-radius",
|
|
8
8
|
"border-top-right-radius",
|
|
@@ -128,5 +128,4 @@ var s = [
|
|
|
128
128
|
})]
|
|
129
129
|
});
|
|
130
130
|
};
|
|
131
|
-
//#endregion
|
|
132
131
|
export { l as default };
|