@plitzi/sdk-style 0.30.19
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 +1398 -0
- package/dist/BuilderStyleContextProvider.d.ts +12 -0
- package/dist/BuilderStyleContextProvider.mjs +209 -0
- package/dist/SdkStyleContextProvider.d.ts +8 -0
- package/dist/SdkStyleContextProvider.mjs +16 -0
- package/dist/StyleAdvanceEditor.d.ts +2 -0
- package/dist/StyleAdvanceEditor.mjs +88 -0
- package/dist/StyleContext.d.ts +3 -0
- package/dist/StyleContext.mjs +5 -0
- package/dist/StyleHelper.d.ts +7 -0
- package/dist/StyleHelper.mjs +45 -0
- package/dist/StyleMap/StyleMap.d.ts +52 -0
- package/dist/StyleMap/StyleMap.mjs +61 -0
- package/dist/StyleMap/helpers/getStyleItem.d.ts +3 -0
- package/dist/StyleMap/helpers/getStyleItem.mjs +5 -0
- package/dist/StyleMap/helpers/isValueValid.d.ts +12 -0
- package/dist/StyleMap/helpers/isValueValid.mjs +7 -0
- package/dist/StyleMap/helpers/utils.d.ts +6 -0
- package/dist/StyleMap/helpers/utils.mjs +51 -0
- package/dist/StyleMap/index.d.ts +3 -0
- package/dist/StyleMap/index.mjs +5 -0
- package/dist/StyleMap/methods/addSelector.d.ts +8 -0
- package/dist/StyleMap/methods/addSelector.mjs +24 -0
- package/dist/StyleMap/methods/updateSelector.d.ts +8 -0
- package/dist/StyleMap/methods/updateSelector.mjs +13 -0
- package/dist/StyleReducer.d.ts +82 -0
- package/dist/StyleReducer.mjs +101 -0
- package/dist/_virtual/_rolldown/runtime.mjs +11 -0
- package/dist/components/InputEasing/BezierEasing.d.ts +1 -0
- package/dist/components/InputEasing/BezierEasing.mjs +34 -0
- package/dist/components/InputEasing/Curve.d.ts +9 -0
- package/dist/components/InputEasing/Curve.mjs +11 -0
- package/dist/components/InputEasing/Grid.d.ts +8 -0
- package/dist/components/InputEasing/Grid.mjs +51 -0
- package/dist/components/InputEasing/InputEasing.d.ts +31 -0
- package/dist/components/InputEasing/InputEasing.mjs +121 -0
- package/dist/components/InputEasing/InputEasingButton.d.ts +9 -0
- package/dist/components/InputEasing/InputEasingButton.mjs +16 -0
- package/dist/components/InputEasing/InputEasingHelper.d.ts +1 -0
- package/dist/components/InputEasing/InputEasingHelper.mjs +179 -0
- package/dist/components/InputEasing/InputEasingList.d.ts +6 -0
- package/dist/components/InputEasing/InputEasingList.mjs +291 -0
- package/dist/components/InputEasing/Progress.d.ts +10 -0
- package/dist/components/InputEasing/Progress.mjs +15 -0
- package/dist/components/InputEasing/index.d.ts +3 -0
- package/dist/components/InputEasing/index.mjs +5 -0
- package/dist/components/Selector/Selector.d.ts +16 -0
- package/dist/components/Selector/Selector.mjs +171 -0
- package/dist/components/Selector/SelectorHelper.d.ts +1 -0
- package/dist/components/Selector/SelectorHelper.mjs +4 -0
- package/dist/components/Selector/SelectorItem/ItemOptions.d.ts +9 -0
- package/dist/components/Selector/SelectorItem/ItemOptions.mjs +57 -0
- package/dist/components/Selector/SelectorItem/SelectorItem.d.ts +15 -0
- package/dist/components/Selector/SelectorItem/SelectorItem.mjs +50 -0
- package/dist/components/Selector/SelectorItem/index.d.ts +3 -0
- package/dist/components/Selector/SelectorItem/index.mjs +5 -0
- package/dist/components/Selector/SelectorSuggestions/SelectorSuggestions.d.ts +9 -0
- package/dist/components/Selector/SelectorSuggestions/SelectorSuggestions.mjs +23 -0
- package/dist/components/Selector/SelectorSuggestions/SuggestionsCreator.d.ts +7 -0
- package/dist/components/Selector/SelectorSuggestions/SuggestionsCreator.mjs +20 -0
- package/dist/components/Selector/SelectorSuggestions/SuggestionsList.d.ts +7 -0
- package/dist/components/Selector/SelectorSuggestions/SuggestionsList.mjs +25 -0
- package/dist/components/Selector/SelectorSuggestions/index.d.ts +3 -0
- package/dist/components/Selector/SelectorSuggestions/index.mjs +5 -0
- package/dist/components/Selector/index.d.ts +3 -0
- package/dist/components/Selector/index.mjs +5 -0
- package/dist/components/StyleInspector/Inspector.d.ts +15 -0
- package/dist/components/StyleInspector/Inspector.mjs +178 -0
- package/dist/components/StyleInspector/StyleInspector.d.ts +21 -0
- package/dist/components/StyleInspector/StyleInspector.mjs +201 -0
- package/dist/components/StyleInspector/StyleInspectorContext.d.ts +23 -0
- package/dist/components/StyleInspector/StyleInspectorContext.mjs +5 -0
- package/dist/components/StyleInspector/StyleInspectorProvider.d.ts +17 -0
- package/dist/components/StyleInspector/StyleInspectorProvider.mjs +86 -0
- package/dist/components/StyleInspector/categories/Background/Background.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/Background.mjs +142 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.d.ts +12 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/BackgroundLayer.mjs +171 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundLayer/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/BackgroundPosition.mjs +39 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundPosition/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/BackgroundSize.mjs +86 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundSize/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/BackgroundTile.mjs +47 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/BackgroundTile/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientPreviewBar.mjs +20 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopBar.mjs +94 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.d.ts +10 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopEditor.mjs +48 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.d.ts +11 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopHandle.mjs +44 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.d.ts +9 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/GradientStopTrack.mjs +27 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/components/GradientStopBar/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.d.ts +56 -0
- package/dist/components/StyleInspector/categories/Background/helpers/backgroundParser.mjs +182 -0
- package/dist/components/StyleInspector/categories/Background/helpers/normalizeLeft.d.ts +2 -0
- package/dist/components/StyleInspector/categories/Background/helpers/normalizeLeft.mjs +10 -0
- package/dist/components/StyleInspector/categories/Background/helpers/parseToBgLayers.d.ts +5 -0
- package/dist/components/StyleInspector/categories/Background/helpers/parseToBgLayers.mjs +19 -0
- package/dist/components/StyleInspector/categories/Background/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Background/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/modes/ConicGradientMode.mjs +100 -0
- package/dist/components/StyleInspector/categories/Background/modes/ImageMode.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/modes/ImageMode.mjs +80 -0
- package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/modes/LinearGradientMode.mjs +76 -0
- package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Background/modes/RadialGradientMode.mjs +120 -0
- package/dist/components/StyleInspector/categories/Border/Border.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Border/Border.mjs +126 -0
- package/dist/components/StyleInspector/categories/Border/BorderColor.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Border/BorderColor.mjs +34 -0
- package/dist/components/StyleInspector/categories/Border/BorderPlacements.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Border/BorderPlacements.mjs +55 -0
- package/dist/components/StyleInspector/categories/Border/BorderRadius.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Border/BorderRadius.mjs +132 -0
- package/dist/components/StyleInspector/categories/Border/BorderStyle.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Border/BorderStyle.mjs +63 -0
- package/dist/components/StyleInspector/categories/Border/BorderWidth.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Border/BorderWidth.mjs +34 -0
- package/dist/components/StyleInspector/categories/Border/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Border/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Display/Display.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Display/Display.mjs +120 -0
- package/dist/components/StyleInspector/categories/Display/DisplayElements.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Display/DisplayElements.mjs +64 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlex.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlex.mjs +46 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignContent.d.ts +9 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignContent.mjs +97 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignItems.d.ts +9 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexAlignItems.mjs +102 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexDirection.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexDirection.mjs +46 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexJustify.d.ts +9 -0
- package/dist/components/StyleInspector/categories/Display/DisplayFlexJustify.mjs +88 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGap.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGap.mjs +27 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGridGap.mjs +27 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGridTemplate.d.ts +12 -0
- package/dist/components/StyleInspector/categories/Display/DisplayGridTemplate.mjs +83 -0
- package/dist/components/StyleInspector/categories/Display/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Display/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.d.ts +8 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayAlignSelf.mjs +60 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.d.ts +8 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayFlexChild.mjs +125 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayOrder.d.ts +7 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/DisplayOrder.mjs +51 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/DisplayFlexChild/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadow.mjs +37 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/BoxShadowItem.mjs +130 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Effects/BoxShadow/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Effects/Effects.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Effects/Effects.mjs +247 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/Filter.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/Filter.mjs +37 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/FilterItem.mjs +129 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Effects/Filters/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/Transform.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/Transform.mjs +37 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/TransformItem.mjs +148 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Effects/Transform/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/Transition.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/Transition.mjs +41 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/TransitionItem.mjs +365 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Effects/Transition/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Effects/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Effects/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/List/List.d.ts +7 -0
- package/dist/components/StyleInspector/categories/List/List.mjs +82 -0
- package/dist/components/StyleInspector/categories/List/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/List/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/ListItem/ListItem.d.ts +7 -0
- package/dist/components/StyleInspector/categories/ListItem/ListItem.mjs +82 -0
- package/dist/components/StyleInspector/categories/ListItem/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/ListItem/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Position/Position.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Position/Position.mjs +129 -0
- package/dist/components/StyleInspector/categories/Position/PositionAdvanced.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Position/PositionAdvanced.mjs +88 -0
- package/dist/components/StyleInspector/categories/Position/PositionAdvancedButtons.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Position/PositionAdvancedButtons.mjs +132 -0
- package/dist/components/StyleInspector/categories/Position/PositionClear.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Position/PositionClear.mjs +45 -0
- package/dist/components/StyleInspector/categories/Position/PositionFloat.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Position/PositionFloat.mjs +38 -0
- package/dist/components/StyleInspector/categories/Position/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Position/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/RawStyle/RawStyle.d.ts +8 -0
- package/dist/components/StyleInspector/categories/RawStyle/RawStyle.mjs +27 -0
- package/dist/components/StyleInspector/categories/RawStyle/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/RawStyle/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Size/Size.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Size/Size.mjs +101 -0
- package/dist/components/StyleInspector/categories/Size/SizeFit.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Size/SizeFit.mjs +39 -0
- package/dist/components/StyleInspector/categories/Size/SizeOverflow.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Size/SizeOverflow.mjs +49 -0
- package/dist/components/StyleInspector/categories/Size/SizePosition.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Size/SizePosition.mjs +30 -0
- package/dist/components/StyleInspector/categories/Size/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Size/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Spacing/Spacing.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Spacing/Spacing.mjs +72 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingEditor.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingEditor.mjs +155 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.d.ts +19 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingMargin.mjs +72 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingNumber.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingNumber.mjs +17 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.d.ts +15 -0
- package/dist/components/StyleInspector/categories/Spacing/SpacingPadding.mjs +69 -0
- package/dist/components/StyleInspector/categories/Spacing/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Spacing/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Typography/Typography.d.ts +11 -0
- package/dist/components/StyleInspector/categories/Typography/Typography.mjs +224 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyAlign.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyAlign.mjs +41 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyConstants.d.ts +5 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyConstants.mjs +172 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyFont.d.ts +10 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyFont.mjs +22 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyStyle.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyStyle.mjs +64 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadow.mjs +43 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTextShadowItem.mjs +83 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTransform.d.ts +8 -0
- package/dist/components/StyleInspector/categories/Typography/TypographyTransform.mjs +68 -0
- package/dist/components/StyleInspector/categories/Typography/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Typography/index.mjs +5 -0
- package/dist/components/StyleInspector/categories/Variables/Variables.d.ts +7 -0
- package/dist/components/StyleInspector/categories/Variables/Variables.mjs +55 -0
- package/dist/components/StyleInspector/categories/Variables/index.d.ts +3 -0
- package/dist/components/StyleInspector/categories/Variables/index.mjs +5 -0
- package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.d.ts +13 -0
- package/dist/components/StyleInspector/components/CategoryContainer/CategoryContainer.mjs +27 -0
- package/dist/components/StyleInspector/components/CategoryContainer/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/CategoryContainer/index.mjs +5 -0
- package/dist/components/StyleInspector/components/CategoryOption/CategoryOption.d.ts +39 -0
- package/dist/components/StyleInspector/components/CategoryOption/CategoryOption.mjs +30 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionColor.d.ts +8 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionColor.mjs +16 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.d.ts +15 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionIconGroup.mjs +27 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionInput.d.ts +8 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionInput.mjs +14 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.d.ts +18 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionMetricInput.mjs +69 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.d.ts +10 -0
- package/dist/components/StyleInspector/components/CategoryOption/categoryTypes/OptionSelect.mjs +13 -0
- package/dist/components/StyleInspector/components/CategoryOption/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/CategoryOption/index.mjs +5 -0
- package/dist/components/StyleInspector/components/CategorySection/CategorySection.d.ts +12 -0
- package/dist/components/StyleInspector/components/CategorySection/CategorySection.mjs +18 -0
- package/dist/components/StyleInspector/components/CategorySection/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/CategorySection/index.mjs +5 -0
- package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.d.ts +6 -0
- package/dist/components/StyleInspector/components/InspectorDots/InspectorDots.mjs +32 -0
- package/dist/components/StyleInspector/components/InspectorDots/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/InspectorDots/index.mjs +5 -0
- package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.d.ts +11 -0
- package/dist/components/StyleInspector/components/InspectorLabel/InspectorLabel.mjs +40 -0
- package/dist/components/StyleInspector/components/InspectorLabel/index.d.ts +3 -0
- package/dist/components/StyleInspector/components/InspectorLabel/index.mjs +5 -0
- package/dist/components/StyleInspector/hooks/useInspectorValues.d.ts +21 -0
- package/dist/components/StyleInspector/hooks/useInspectorValues.mjs +55 -0
- package/dist/components/StyleInspector/hooks/useStyleBinding.d.ts +6 -0
- package/dist/components/StyleInspector/hooks/useStyleBinding.mjs +20 -0
- package/dist/components/StyleInspector/hooks/useStyleInherit.d.ts +12 -0
- package/dist/components/StyleInspector/hooks/useStyleInherit.mjs +33 -0
- package/dist/components/StyleInspector/index.d.ts +3 -0
- package/dist/components/StyleInspector/index.mjs +5 -0
- package/dist/components/StyleManager/ManagerSelector.d.ts +11 -0
- package/dist/components/StyleManager/ManagerSelector.mjs +137 -0
- package/dist/components/StyleManager/StyleManager.d.ts +2 -0
- package/dist/components/StyleManager/StyleManager.mjs +47 -0
- package/dist/components/StyleManager/StyleSelectorTag.d.ts +12 -0
- package/dist/components/StyleManager/StyleSelectorTag.mjs +43 -0
- package/dist/components/StyleManager/index.d.ts +3 -0
- package/dist/components/StyleManager/index.mjs +5 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.mjs +6 -0
- package/dist/helpers/calculateInheriting.d.ts +121 -0
- package/dist/helpers/calculateInheriting.mjs +141 -0
- package/dist/helpers/formatCssFromSelector.d.ts +8 -0
- package/dist/helpers/formatCssFromSelector.mjs +54 -0
- package/dist/helpers/generateStyleSelector.d.ts +9 -0
- package/dist/helpers/generateStyleSelector.mjs +19 -0
- package/dist/helpers/index.d.ts +10 -0
- package/dist/helpers/index.mjs +18 -0
- package/dist/helpers/processCssTokens.d.ts +8 -0
- package/dist/helpers/processCssTokens.mjs +16 -0
- package/dist/helpers/processSelector.d.ts +4 -0
- package/dist/helpers/processSelector.mjs +39 -0
- package/dist/helpers/processSelectorAttributes.d.ts +17 -0
- package/dist/helpers/processSelectorAttributes.mjs +94 -0
- package/dist/helpers/processSelectorName.d.ts +3 -0
- package/dist/helpers/processSelectorName.mjs +19 -0
- package/dist/helpers/processSelectorVariables.d.ts +7 -0
- package/dist/helpers/processSelectorVariables.mjs +30 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.mjs +16 -0
- package/dist/models/SelectorForm/SelectorForm.d.ts +21 -0
- package/dist/models/SelectorForm/SelectorForm.mjs +73 -0
- package/dist/models/SelectorForm/index.d.ts +3 -0
- package/dist/models/SelectorForm/index.mjs +5 -0
- package/package.json +849 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
//#region src/components/StyleInspector/categories/Background/helpers/backgroundParser.ts
|
|
2
|
+
var e = [{
|
|
3
|
+
id: "stop-default-0",
|
|
4
|
+
color: "#000000",
|
|
5
|
+
position: "0%"
|
|
6
|
+
}, {
|
|
7
|
+
id: "stop-default-1",
|
|
8
|
+
color: "#ffffff",
|
|
9
|
+
position: "100%"
|
|
10
|
+
}], t = {
|
|
11
|
+
url: "",
|
|
12
|
+
angle: "180deg",
|
|
13
|
+
radialShape: "ellipse",
|
|
14
|
+
radialExtent: "farthest-corner",
|
|
15
|
+
radialPosition: "50% 50%",
|
|
16
|
+
conicAngle: "0deg",
|
|
17
|
+
conicPosition: "50% 50%",
|
|
18
|
+
stops: e,
|
|
19
|
+
size: "auto",
|
|
20
|
+
positionX: "0%",
|
|
21
|
+
positionY: "0%",
|
|
22
|
+
repeat: "no-repeat",
|
|
23
|
+
attachment: "scroll",
|
|
24
|
+
clip: "border-box"
|
|
25
|
+
}, n = 0, r = () => `layer-${++n}`, i = () => `stop-${++n}`;
|
|
26
|
+
function a(e) {
|
|
27
|
+
let t = [], n = 0, r = "";
|
|
28
|
+
for (let i of e) i === "(" ? n++ : i === ")" && n--, i === "," && n === 0 ? (t.push(r.trim()), r = "") : r += i;
|
|
29
|
+
return r.trim() && t.push(r.trim()), t;
|
|
30
|
+
}
|
|
31
|
+
function o(e) {
|
|
32
|
+
let t = e.trim(), n = 0, r = -1;
|
|
33
|
+
for (let e = 0; e < t.length; e++) t[e] === "(" ? n++ : t[e] === ")" ? n-- : t[e] === " " && n === 0 && (r = e);
|
|
34
|
+
if (r !== -1) {
|
|
35
|
+
let e = t.slice(r + 1).trim();
|
|
36
|
+
if (/^-?[\d.]/.test(e) || /\d(px|em|rem|%|vw|vh|dvh|dvw|lvh|lvw|fr|ch|ex)$/.test(e)) return {
|
|
37
|
+
color: t.slice(0, r).trim(),
|
|
38
|
+
position: e
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
color: t,
|
|
43
|
+
position: ""
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function s(e) {
|
|
47
|
+
return a(e).map((e) => ({
|
|
48
|
+
id: i(),
|
|
49
|
+
...o(e)
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
function c(e) {
|
|
53
|
+
let n = a(e), r = (n[0] ?? "").trim(), i = /^\d/.test(r) || r.startsWith("to ");
|
|
54
|
+
return {
|
|
55
|
+
angle: i ? r : t.angle,
|
|
56
|
+
stops: s(n.slice(+!!i).join(", "))
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function l(e) {
|
|
60
|
+
let n = a(e), r = (n[0] ?? "").trim(), i = t.radialShape, o = t.radialExtent, c = t.radialPosition, l = 0;
|
|
61
|
+
if (/circle|ellipse|closest|farthest|at\s/.test(r)) {
|
|
62
|
+
l = 1, r.includes("circle") && (i = "circle"), r.includes("ellipse") && (i = "ellipse"), r.includes("closest-side") ? o = "closest-side" : r.includes("closest-corner") ? o = "closest-corner" : r.includes("farthest-side") ? o = "farthest-side" : r.includes("farthest-corner") && (o = "farthest-corner");
|
|
63
|
+
let e = r.match(/at\s+(.+)$/);
|
|
64
|
+
e && (c = e[1].trim());
|
|
65
|
+
}
|
|
66
|
+
let u = n.slice(l).join(", ");
|
|
67
|
+
return {
|
|
68
|
+
radialShape: i,
|
|
69
|
+
radialExtent: o,
|
|
70
|
+
radialPosition: c,
|
|
71
|
+
stops: s(u)
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function u(e) {
|
|
75
|
+
let n = a(e), r = (n[0] ?? "").trim(), i = t.conicAngle, o = t.conicPosition, c = 0;
|
|
76
|
+
if (r.startsWith("from ") || r.startsWith("at ")) {
|
|
77
|
+
c = 1;
|
|
78
|
+
let e = r.match(/from\s+([\d.]+(?:deg|rad|turn|grad))/);
|
|
79
|
+
e && (i = e[1]);
|
|
80
|
+
let t = r.match(/at\s+(.+?)(?:\s+from|$)/);
|
|
81
|
+
t && (o = t[1].trim());
|
|
82
|
+
}
|
|
83
|
+
let l = n.slice(c).join(", ");
|
|
84
|
+
return {
|
|
85
|
+
conicAngle: i,
|
|
86
|
+
conicPosition: o,
|
|
87
|
+
stops: s(l)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function d(e) {
|
|
91
|
+
let t = e.trim();
|
|
92
|
+
if (!t || t === "none") return { type: "none" };
|
|
93
|
+
let n = t.match(/^url\("(.*)"\)$/i);
|
|
94
|
+
if (n) return {
|
|
95
|
+
type: "url",
|
|
96
|
+
url: n[1]
|
|
97
|
+
};
|
|
98
|
+
let r = t.match(/^url\('(.*)'\)$/i);
|
|
99
|
+
if (r) return {
|
|
100
|
+
type: "url",
|
|
101
|
+
url: r[1]
|
|
102
|
+
};
|
|
103
|
+
let i = t.match(/^url\((.*)\)$/i);
|
|
104
|
+
if (i) return {
|
|
105
|
+
type: "url",
|
|
106
|
+
url: i[1]
|
|
107
|
+
};
|
|
108
|
+
let a = t.match(/^linear-gradient\(([\s\S]+)\)$/i);
|
|
109
|
+
if (a) return {
|
|
110
|
+
type: "linear-gradient",
|
|
111
|
+
...c(a[1])
|
|
112
|
+
};
|
|
113
|
+
let o = t.match(/^radial-gradient\(([\s\S]+)\)$/i);
|
|
114
|
+
if (o) return {
|
|
115
|
+
type: "radial-gradient",
|
|
116
|
+
...l(o[1])
|
|
117
|
+
};
|
|
118
|
+
let s = t.match(/^conic-gradient\(([\s\S]+)\)$/i);
|
|
119
|
+
return s ? {
|
|
120
|
+
type: "conic-gradient",
|
|
121
|
+
...u(s[1])
|
|
122
|
+
} : { type: "none" };
|
|
123
|
+
}
|
|
124
|
+
function f(e) {
|
|
125
|
+
let n = (e["background-image"] ?? "").trim();
|
|
126
|
+
if (!n || n === "none") return [];
|
|
127
|
+
let i = a(n), o = a(e["background-size"] ?? ""), s = a(e["background-position"] ?? ""), c = a(e["background-repeat"] ?? ""), l = a(e["background-attachment"] ?? ""), u = a(e["background-clip"] ?? "");
|
|
128
|
+
return i.map((e, n) => {
|
|
129
|
+
let i = d(e), a = (s[n] ?? "").split(" ").filter(Boolean);
|
|
130
|
+
return {
|
|
131
|
+
...t,
|
|
132
|
+
...i,
|
|
133
|
+
id: r(),
|
|
134
|
+
size: o[n] ?? t.size,
|
|
135
|
+
positionX: a.at(0) ?? t.positionX,
|
|
136
|
+
positionY: a.at(1) ?? a.at(0) ?? t.positionY,
|
|
137
|
+
repeat: c[n] ?? t.repeat,
|
|
138
|
+
attachment: l[n] ?? t.attachment,
|
|
139
|
+
clip: u[n] ?? t.clip
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function p(e) {
|
|
144
|
+
return e.position ? `${e.color} ${e.position}` : e.color;
|
|
145
|
+
}
|
|
146
|
+
function m(e) {
|
|
147
|
+
switch (e.type) {
|
|
148
|
+
case "url": return `url("${e.url}")`;
|
|
149
|
+
case "linear-gradient": {
|
|
150
|
+
let t = e.stops.map(p).join(", ");
|
|
151
|
+
return `linear-gradient(${e.angle}, ${t})`;
|
|
152
|
+
}
|
|
153
|
+
case "radial-gradient": {
|
|
154
|
+
let t = e.stops.map(p).join(", "), n = e.radialShape === "ellipse" ? "" : `${e.radialShape} `, r = e.radialExtent === "farthest-corner" ? "" : `${e.radialExtent} `, i = `at ${e.radialPosition}`;
|
|
155
|
+
return `radial-gradient(${n || r ? `${n}${r}${i}` : i}, ${t})`;
|
|
156
|
+
}
|
|
157
|
+
case "conic-gradient": {
|
|
158
|
+
let t = e.stops.map(p).join(", ");
|
|
159
|
+
return `conic-gradient(${e.conicAngle === "0deg" ? "" : `from ${e.conicAngle} `}${`at ${e.conicPosition}`}, ${t})`;
|
|
160
|
+
}
|
|
161
|
+
default: return "none";
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function h(e) {
|
|
165
|
+
return e.length === 0 ? {
|
|
166
|
+
"background-image": void 0,
|
|
167
|
+
"background-size": void 0,
|
|
168
|
+
"background-position": void 0,
|
|
169
|
+
"background-repeat": void 0,
|
|
170
|
+
"background-attachment": void 0,
|
|
171
|
+
"background-clip": void 0
|
|
172
|
+
} : {
|
|
173
|
+
"background-image": e.map(m).join(", "),
|
|
174
|
+
"background-size": e.map((e) => e.size).join(", "),
|
|
175
|
+
"background-position": e.map((e) => `${e.positionX} ${e.positionY}`).join(", "),
|
|
176
|
+
"background-repeat": e.map((e) => e.repeat).join(", "),
|
|
177
|
+
"background-attachment": e.map((e) => e.attachment).join(", "),
|
|
178
|
+
"background-clip": e.map((e) => e.clip).join(", ")
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
export { t as DEFAULT_LAYER_PROPS, e as DEFAULT_STOPS, r as newLayerId, i as newStopId, f as parseBackgroundLayers, m as serializeLayerImage, h as serializeLayersToCSS };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/components/StyleInspector/categories/Background/helpers/normalizeLeft.ts
|
|
2
|
+
var e = (e, t = Infinity) => {
|
|
3
|
+
if (!e) return "0";
|
|
4
|
+
let n = e.trim(), r = n.match(/^(-?\d+(\.\d+)?)(%)?([a-zA-Z]+)?$/);
|
|
5
|
+
if (!r) return n;
|
|
6
|
+
let i = Number(r[1]), a = !!r[3], o = r[4] || "";
|
|
7
|
+
return a ? `${Math.min(100, Math.max(0, i))}%` : `${Math.min(typeof t == "number" ? t : Infinity, Math.max(0, i))}${o}`;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BackgroundLayer } from '../helpers/backgroundParser';
|
|
2
|
+
import { StyleValue } from '@plitzi/sdk-shared';
|
|
3
|
+
export type LayerValues = Record<string, StyleValue | undefined>;
|
|
4
|
+
declare const parseToBgLayers: (values: LayerValues) => BackgroundLayer[];
|
|
5
|
+
export default parseToBgLayers;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { newLayerId as e, newStopId as t, parseBackgroundLayers as n } from "./backgroundParser.mjs";
|
|
2
|
+
//#region src/components/StyleInspector/categories/Background/helpers/parseToBgLayers.ts
|
|
3
|
+
var r = (r) => n({
|
|
4
|
+
"background-image": r["background-image"],
|
|
5
|
+
"background-size": r["background-size"],
|
|
6
|
+
"background-position": r["background-position"],
|
|
7
|
+
"background-repeat": r["background-repeat"],
|
|
8
|
+
"background-attachment": r["background-attachment"],
|
|
9
|
+
"background-clip": r["background-clip"]
|
|
10
|
+
}).map((n) => ({
|
|
11
|
+
...n,
|
|
12
|
+
id: e(),
|
|
13
|
+
stops: n.stops.map((e) => ({
|
|
14
|
+
...e,
|
|
15
|
+
id: t()
|
|
16
|
+
}))
|
|
17
|
+
}));
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BackgroundLayer } from '../helpers/backgroundParser';
|
|
2
|
+
export type ConicGradientModeProps = {
|
|
3
|
+
layer: BackgroundLayer;
|
|
4
|
+
onChange?: (layer: BackgroundLayer) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const ConicGradientMode: ({ layer, onChange }: ConicGradientModeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ConicGradientMode;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import e from "../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import t from "../../../components/CategorySection/index.mjs";
|
|
3
|
+
import n from "../components/BackgroundPosition/index.mjs";
|
|
4
|
+
import r from "../components/BackgroundSize/index.mjs";
|
|
5
|
+
import i from "../components/BackgroundTile/index.mjs";
|
|
6
|
+
import a from "../components/GradientStopBar/index.mjs";
|
|
7
|
+
import { useCallback as o } from "react";
|
|
8
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/StyleInspector/categories/Background/modes/ConicGradientMode.tsx
|
|
10
|
+
var u = ({ layer: u, onChange: d }) => {
|
|
11
|
+
let f = o((e) => d?.({
|
|
12
|
+
...u,
|
|
13
|
+
conicAngle: String(e)
|
|
14
|
+
}), [u, d]), p = o((e) => {
|
|
15
|
+
let t = u.conicPosition.split(" ");
|
|
16
|
+
d?.({
|
|
17
|
+
...u,
|
|
18
|
+
conicPosition: `${String(e)} ${t[1] ?? "50%"}`
|
|
19
|
+
});
|
|
20
|
+
}, [u, d]), m = o((e) => {
|
|
21
|
+
let t = u.conicPosition.split(" ");
|
|
22
|
+
d?.({
|
|
23
|
+
...u,
|
|
24
|
+
conicPosition: `${t[0] ?? "50%"} ${String(e)}`
|
|
25
|
+
});
|
|
26
|
+
}, [u, d]), h = o((e) => d?.({
|
|
27
|
+
...u,
|
|
28
|
+
stops: e
|
|
29
|
+
}), [u, d]);
|
|
30
|
+
return /* @__PURE__ */ l(s, { children: [
|
|
31
|
+
/* @__PURE__ */ c(t, {
|
|
32
|
+
label: "Start Angle",
|
|
33
|
+
children: /* @__PURE__ */ c(e, {
|
|
34
|
+
type: "metric",
|
|
35
|
+
value: u.conicAngle,
|
|
36
|
+
units: [
|
|
37
|
+
{
|
|
38
|
+
label: "deg",
|
|
39
|
+
value: "deg"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: "rad",
|
|
43
|
+
value: "rad"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: "turn",
|
|
47
|
+
value: "turn"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
min: 0,
|
|
51
|
+
max: 360,
|
|
52
|
+
onChange: f
|
|
53
|
+
})
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ l(t, {
|
|
56
|
+
label: "Position",
|
|
57
|
+
children: [/* @__PURE__ */ c(e, {
|
|
58
|
+
type: "metric",
|
|
59
|
+
value: u.conicPosition.split(" ")[0] ?? "50%",
|
|
60
|
+
allowedWords: [
|
|
61
|
+
"center",
|
|
62
|
+
"left",
|
|
63
|
+
"right"
|
|
64
|
+
],
|
|
65
|
+
onChange: p
|
|
66
|
+
}), /* @__PURE__ */ c(e, {
|
|
67
|
+
type: "metric",
|
|
68
|
+
value: u.conicPosition.split(" ")[1] ?? "50%",
|
|
69
|
+
allowedWords: [
|
|
70
|
+
"center",
|
|
71
|
+
"top",
|
|
72
|
+
"bottom"
|
|
73
|
+
],
|
|
74
|
+
onChange: m
|
|
75
|
+
})]
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ c(t, {
|
|
78
|
+
label: "Gradient",
|
|
79
|
+
direction: "column",
|
|
80
|
+
children: /* @__PURE__ */ c(a, {
|
|
81
|
+
stops: u.stops,
|
|
82
|
+
onChange: h
|
|
83
|
+
})
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ c(r, {
|
|
86
|
+
layer: u,
|
|
87
|
+
onChange: d
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ c(n, {
|
|
90
|
+
layer: u,
|
|
91
|
+
onChange: d
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ c(i, {
|
|
94
|
+
layer: u,
|
|
95
|
+
onChange: d
|
|
96
|
+
})
|
|
97
|
+
] });
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { u as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BackgroundLayer } from '../helpers/backgroundParser';
|
|
2
|
+
export type ImageModeProps = {
|
|
3
|
+
layer: BackgroundLayer;
|
|
4
|
+
onChange?: (layer: BackgroundLayer) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const ImageMode: ({ layer, onChange }: ImageModeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ImageMode;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import e from "../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import t from "../../../components/CategorySection/index.mjs";
|
|
3
|
+
import n from "../components/BackgroundPosition/index.mjs";
|
|
4
|
+
import r from "../components/BackgroundSize/index.mjs";
|
|
5
|
+
import i from "../components/BackgroundTile/index.mjs";
|
|
6
|
+
import { useCallback as a, useMemo as o } from "react";
|
|
7
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/StyleInspector/categories/Background/modes/ImageMode.tsx
|
|
9
|
+
var u = ({ layer: u, onChange: d }) => {
|
|
10
|
+
let f = a((e) => d?.({
|
|
11
|
+
...u,
|
|
12
|
+
url: String(e)
|
|
13
|
+
}), [u, d]), p = a((e) => d?.({
|
|
14
|
+
...u,
|
|
15
|
+
attachment: String(e)
|
|
16
|
+
}), [u, d]), m = o(() => [
|
|
17
|
+
{
|
|
18
|
+
value: "fixed",
|
|
19
|
+
icon: /* @__PURE__ */ c("div", {
|
|
20
|
+
className: "px-1 text-xs select-none",
|
|
21
|
+
children: "Fixed"
|
|
22
|
+
}),
|
|
23
|
+
description: "Fixed to viewport",
|
|
24
|
+
active: u.attachment === "fixed",
|
|
25
|
+
size: "custom"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: "local",
|
|
29
|
+
icon: /* @__PURE__ */ c("div", {
|
|
30
|
+
className: "px-1 text-xs select-none",
|
|
31
|
+
children: "Local"
|
|
32
|
+
}),
|
|
33
|
+
description: "Scrolls with content",
|
|
34
|
+
active: u.attachment === "local",
|
|
35
|
+
size: "custom"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
value: "scroll",
|
|
39
|
+
icon: /* @__PURE__ */ c("div", {
|
|
40
|
+
className: "px-1 text-xs select-none",
|
|
41
|
+
children: "Scroll"
|
|
42
|
+
}),
|
|
43
|
+
description: "Scrolls with element",
|
|
44
|
+
active: u.attachment === "scroll",
|
|
45
|
+
size: "custom"
|
|
46
|
+
}
|
|
47
|
+
], [u.attachment]);
|
|
48
|
+
return /* @__PURE__ */ l(s, { children: [
|
|
49
|
+
/* @__PURE__ */ c(t, {
|
|
50
|
+
label: "URL",
|
|
51
|
+
children: /* @__PURE__ */ c(e, {
|
|
52
|
+
type: "input",
|
|
53
|
+
value: u.url,
|
|
54
|
+
onChange: f
|
|
55
|
+
})
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ c(r, {
|
|
58
|
+
layer: u,
|
|
59
|
+
onChange: d
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ c(n, {
|
|
62
|
+
layer: u,
|
|
63
|
+
onChange: d
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ c(i, {
|
|
66
|
+
layer: u,
|
|
67
|
+
onChange: d
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ c(t, {
|
|
70
|
+
label: "Attachment",
|
|
71
|
+
children: /* @__PURE__ */ c(e, {
|
|
72
|
+
type: "iconGroup",
|
|
73
|
+
items: m,
|
|
74
|
+
onChange: p
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
] });
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
export { u as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BackgroundLayer } from '../helpers/backgroundParser';
|
|
2
|
+
export type LinearGradientModeProps = {
|
|
3
|
+
layer: BackgroundLayer;
|
|
4
|
+
onChange?: (layer: BackgroundLayer) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const LinearGradientMode: ({ layer, onChange }: LinearGradientModeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default LinearGradientMode;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import e from "../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import t from "../../../components/CategorySection/index.mjs";
|
|
3
|
+
import n from "../components/BackgroundPosition/index.mjs";
|
|
4
|
+
import r from "../components/BackgroundSize/index.mjs";
|
|
5
|
+
import i from "../components/BackgroundTile/index.mjs";
|
|
6
|
+
import a from "../components/GradientStopBar/index.mjs";
|
|
7
|
+
import { useCallback as o } from "react";
|
|
8
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/StyleInspector/categories/Background/modes/LinearGradientMode.tsx
|
|
10
|
+
var u = ({ layer: u, onChange: d }) => {
|
|
11
|
+
let f = o((e) => d?.({
|
|
12
|
+
...u,
|
|
13
|
+
angle: String(e)
|
|
14
|
+
}), [u, d]), p = o((e) => d?.({
|
|
15
|
+
...u,
|
|
16
|
+
stops: e
|
|
17
|
+
}), [u, d]);
|
|
18
|
+
return /* @__PURE__ */ l(s, { children: [
|
|
19
|
+
/* @__PURE__ */ c(t, {
|
|
20
|
+
label: "Angle",
|
|
21
|
+
children: /* @__PURE__ */ c(e, {
|
|
22
|
+
type: "metric",
|
|
23
|
+
value: u.angle,
|
|
24
|
+
units: [
|
|
25
|
+
{
|
|
26
|
+
label: "deg",
|
|
27
|
+
value: "deg"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: "rad",
|
|
31
|
+
value: "rad"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: "turn",
|
|
35
|
+
value: "turn"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
allowedWords: [
|
|
39
|
+
"to top",
|
|
40
|
+
"to right",
|
|
41
|
+
"to bottom",
|
|
42
|
+
"to left",
|
|
43
|
+
"to top right",
|
|
44
|
+
"to bottom right",
|
|
45
|
+
"to bottom left",
|
|
46
|
+
"to top left"
|
|
47
|
+
],
|
|
48
|
+
min: 0,
|
|
49
|
+
max: 360,
|
|
50
|
+
onChange: f
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ c(t, {
|
|
54
|
+
label: "Gradient",
|
|
55
|
+
direction: "column",
|
|
56
|
+
children: /* @__PURE__ */ c(a, {
|
|
57
|
+
stops: u.stops,
|
|
58
|
+
onChange: p
|
|
59
|
+
})
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ c(r, {
|
|
62
|
+
layer: u,
|
|
63
|
+
onChange: d
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ c(n, {
|
|
66
|
+
layer: u,
|
|
67
|
+
onChange: d
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ c(i, {
|
|
70
|
+
layer: u,
|
|
71
|
+
onChange: d
|
|
72
|
+
})
|
|
73
|
+
] });
|
|
74
|
+
};
|
|
75
|
+
//#endregion
|
|
76
|
+
export { u as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BackgroundLayer } from '../helpers/backgroundParser';
|
|
2
|
+
export type RadialGradientModeProps = {
|
|
3
|
+
layer: BackgroundLayer;
|
|
4
|
+
onChange?: (layer: BackgroundLayer) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const RadialGradientMode: ({ layer, onChange }: RadialGradientModeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default RadialGradientMode;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import e from "../../../components/CategoryOption/index.mjs";
|
|
2
|
+
import t from "../../../components/CategorySection/index.mjs";
|
|
3
|
+
import n from "../components/BackgroundPosition/index.mjs";
|
|
4
|
+
import r from "../components/BackgroundSize/index.mjs";
|
|
5
|
+
import i from "../components/BackgroundTile/index.mjs";
|
|
6
|
+
import a from "../components/GradientStopBar/index.mjs";
|
|
7
|
+
import { useCallback as o } from "react";
|
|
8
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/StyleInspector/categories/Background/modes/RadialGradientMode.tsx
|
|
10
|
+
var u = ({ layer: u, onChange: d }) => {
|
|
11
|
+
let f = o((e) => d?.({
|
|
12
|
+
...u,
|
|
13
|
+
radialShape: e
|
|
14
|
+
}), [u, d]), p = o((e) => d?.({
|
|
15
|
+
...u,
|
|
16
|
+
radialExtent: String(e)
|
|
17
|
+
}), [u, d]), m = o((e) => {
|
|
18
|
+
let t = u.radialPosition.split(" ");
|
|
19
|
+
d?.({
|
|
20
|
+
...u,
|
|
21
|
+
radialPosition: `${String(e)} ${t[1] ?? "50%"}`
|
|
22
|
+
});
|
|
23
|
+
}, [u, d]), h = o((e) => {
|
|
24
|
+
let t = u.radialPosition.split(" ");
|
|
25
|
+
d?.({
|
|
26
|
+
...u,
|
|
27
|
+
radialPosition: `${t[0] ?? "50%"} ${String(e)}`
|
|
28
|
+
});
|
|
29
|
+
}, [u, d]), g = o((e) => d?.({
|
|
30
|
+
...u,
|
|
31
|
+
stops: e
|
|
32
|
+
}), [u, d]);
|
|
33
|
+
return /* @__PURE__ */ l(s, { children: [
|
|
34
|
+
/* @__PURE__ */ c(t, {
|
|
35
|
+
label: "Shape",
|
|
36
|
+
children: /* @__PURE__ */ l(e, {
|
|
37
|
+
type: "select",
|
|
38
|
+
value: u.radialShape,
|
|
39
|
+
onChange: f,
|
|
40
|
+
children: [/* @__PURE__ */ c("option", {
|
|
41
|
+
value: "ellipse",
|
|
42
|
+
children: "Ellipse"
|
|
43
|
+
}), /* @__PURE__ */ c("option", {
|
|
44
|
+
value: "circle",
|
|
45
|
+
children: "Circle"
|
|
46
|
+
})]
|
|
47
|
+
})
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ c(t, {
|
|
50
|
+
label: "Size",
|
|
51
|
+
children: /* @__PURE__ */ l(e, {
|
|
52
|
+
type: "select",
|
|
53
|
+
value: u.radialExtent,
|
|
54
|
+
onChange: p,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ c("option", {
|
|
57
|
+
value: "farthest-corner",
|
|
58
|
+
children: "Farthest Corner"
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ c("option", {
|
|
61
|
+
value: "farthest-side",
|
|
62
|
+
children: "Farthest Side"
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ c("option", {
|
|
65
|
+
value: "closest-corner",
|
|
66
|
+
children: "Closest Corner"
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ c("option", {
|
|
69
|
+
value: "closest-side",
|
|
70
|
+
children: "Closest Side"
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
})
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ l(t, {
|
|
76
|
+
label: "Position",
|
|
77
|
+
children: [/* @__PURE__ */ c(e, {
|
|
78
|
+
type: "metric",
|
|
79
|
+
value: u.radialPosition.split(" ")[0] ?? "50%",
|
|
80
|
+
allowedWords: [
|
|
81
|
+
"center",
|
|
82
|
+
"left",
|
|
83
|
+
"right"
|
|
84
|
+
],
|
|
85
|
+
onChange: m
|
|
86
|
+
}), /* @__PURE__ */ c(e, {
|
|
87
|
+
type: "metric",
|
|
88
|
+
value: u.radialPosition.split(" ")[1] ?? "50%",
|
|
89
|
+
allowedWords: [
|
|
90
|
+
"center",
|
|
91
|
+
"top",
|
|
92
|
+
"bottom"
|
|
93
|
+
],
|
|
94
|
+
onChange: h
|
|
95
|
+
})]
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ c(t, {
|
|
98
|
+
label: "Gradient",
|
|
99
|
+
direction: "column",
|
|
100
|
+
children: /* @__PURE__ */ c(a, {
|
|
101
|
+
stops: u.stops,
|
|
102
|
+
onChange: g
|
|
103
|
+
})
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ c(r, {
|
|
106
|
+
layer: u,
|
|
107
|
+
onChange: d
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ c(n, {
|
|
110
|
+
layer: u,
|
|
111
|
+
onChange: d
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ c(i, {
|
|
114
|
+
layer: u,
|
|
115
|
+
onChange: d
|
|
116
|
+
})
|
|
117
|
+
] });
|
|
118
|
+
};
|
|
119
|
+
//#endregion
|
|
120
|
+
export { u as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type BorderProps = {
|
|
2
|
+
replaceTokens?: boolean;
|
|
3
|
+
isCollapsed?: boolean;
|
|
4
|
+
onCollapse?: (category: string, isCollapsed: boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('react').MemoExoticComponent<({ replaceTokens, isCollapsed, onCollapse }: BorderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export default _default;
|