@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,24 @@
|
|
|
1
|
+
import e from "../../helpers/processSelector.mjs";
|
|
2
|
+
import t from "../helpers/getStyleItem.mjs";
|
|
3
|
+
import n, { isStyleAttributes as r } from "../helpers/isValueValid.mjs";
|
|
4
|
+
import { writeStyle as i } from "../helpers/utils.mjs";
|
|
5
|
+
import { set as a } from "@plitzi/plitzi-ui/helpers";
|
|
6
|
+
//#region src/StyleMap/methods/addSelector.ts
|
|
7
|
+
var o = (o, s, c, l, u, d, f) => {
|
|
8
|
+
if (!f) return !1;
|
|
9
|
+
let { componentType: p, styleSelector: m, styleState: h, styleVariant: g } = f;
|
|
10
|
+
if (t(o, s, c) || !p && l === "element" || p && l !== "element" || m && typeof m != "string" || !m && (h || g) || u && u.includes(".") || !n(u, d, f)) return !1;
|
|
11
|
+
let _ = {
|
|
12
|
+
name: c,
|
|
13
|
+
type: l,
|
|
14
|
+
attributes: m ? {
|
|
15
|
+
[m]: { default: {} },
|
|
16
|
+
base: { default: {} }
|
|
17
|
+
} : { base: { default: {} } },
|
|
18
|
+
componentType: p,
|
|
19
|
+
cache: ""
|
|
20
|
+
};
|
|
21
|
+
return !m && r(d) ? ((!d || !Object.keys(d).length) && (d = { base: { default: {} } }), _.attributes = d, _.cache = e(_), a(o, `${s}.${c}`, _), !0) : (i("add", _, m ?? "base", u, d, h, g), _.cache = e(_), a(o, `${s}.${c}`, _), !0);
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { o as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DisplayMode, Style, StyleBlock, StyleCategory, StyleItem, StyleObject, StyleState, StyleStates, StyleValue, StyleVariants } from '@plitzi/sdk-shared';
|
|
2
|
+
declare const updateSelector: (platform: Style["platform"], displayMode: DisplayMode, selector: string, path: StyleCategory | undefined, value: StyleItem["attributes"] | StyleValue | Partial<StyleObject> | StyleVariants | StyleStates | StyleBlock | undefined, params: {
|
|
3
|
+
componentType?: string;
|
|
4
|
+
styleSelector: string;
|
|
5
|
+
styleState?: StyleState;
|
|
6
|
+
styleVariant?: string;
|
|
7
|
+
}) => boolean;
|
|
8
|
+
export default updateSelector;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import e from "../../helpers/processSelector.mjs";
|
|
2
|
+
import t from "../helpers/getStyleItem.mjs";
|
|
3
|
+
import n from "../helpers/isValueValid.mjs";
|
|
4
|
+
import { writeStyle as r } from "../helpers/utils.mjs";
|
|
5
|
+
import { set as i } from "@plitzi/plitzi-ui/helpers";
|
|
6
|
+
//#region src/StyleMap/methods/updateSelector.ts
|
|
7
|
+
var a = (a, o, s, c, l, u) => {
|
|
8
|
+
if (!u) return !1;
|
|
9
|
+
let { componentType: d, styleSelector: f, styleState: p, styleVariant: m } = u, h = t(a, o, s);
|
|
10
|
+
return !h || !f || !d && h.type === "element" || d && h.type !== "element" || f && typeof f != "string" || c && c.includes(".") || !n(c, l, u) ? !1 : (r("update", h, f, c, l, p, m), i(h, "cache", e(h)), i(a, `${o}.${s}`, h), !0);
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { a as default };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { DisplayMode, Style, StyleCategory, StyleItem, StyleState, StyleVariableCategory, StyleVariableValue, TagType } from '@plitzi/sdk-shared';
|
|
2
|
+
export declare const StyleActions: {
|
|
3
|
+
readonly STYLE_UPDATE: "STYLE_UPDATE";
|
|
4
|
+
readonly STYLE_ADD_SELECTOR: "STYLE_ADD_SELECTOR";
|
|
5
|
+
readonly STYLE_UPDATE_SELECTOR: "STYLE_UPDATE_SELECTOR";
|
|
6
|
+
readonly STYLE_REMOVE_SELECTOR: "STYLE_REMOVE_SELECTOR";
|
|
7
|
+
readonly STYLE_ADD_SELECTOR_VARIABLE: "STYLE_ADD_SELECTOR_VARIABLE";
|
|
8
|
+
readonly STYLE_UPDATE_SELECTOR_VARIABLE: "STYLE_UPDATE_SELECTOR_VARIABLE";
|
|
9
|
+
readonly STYLE_REMOVE_SELECTOR_VARIABLE: "STYLE_REMOVE_SELECTOR_VARIABLE";
|
|
10
|
+
readonly STYLE_ADD_VARIABLE: "STYLE_ADD_VARIABLE";
|
|
11
|
+
readonly STYLE_UPDATE_VARIABLE: "STYLE_UPDATE_VARIABLE";
|
|
12
|
+
readonly STYLE_REMOVE_VARIABLE: "STYLE_REMOVE_VARIABLE";
|
|
13
|
+
readonly STYLE_ADD_TEMPLATE: "STYLE_ADD_TEMPLATE";
|
|
14
|
+
readonly STYLE_UPDATE_SETTINGS: "STYLE_UPDATE_SETTINGS";
|
|
15
|
+
};
|
|
16
|
+
export type StyleReducerActionsBase = {
|
|
17
|
+
fromSubscriptions?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type StyleReducerActions = StyleReducerActionsBase & ({
|
|
20
|
+
type: 'STYLE_UPDATE';
|
|
21
|
+
style: Style;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'STYLE_ADD_SELECTOR';
|
|
24
|
+
displayMode: DisplayMode;
|
|
25
|
+
selector: string;
|
|
26
|
+
path?: StyleCategory;
|
|
27
|
+
selectorType: TagType;
|
|
28
|
+
value?: StyleItem['attributes'];
|
|
29
|
+
params: {
|
|
30
|
+
componentType?: string;
|
|
31
|
+
styleSelector?: string;
|
|
32
|
+
styleState?: StyleState;
|
|
33
|
+
styleVariant?: string;
|
|
34
|
+
};
|
|
35
|
+
} | {
|
|
36
|
+
type: 'STYLE_UPDATE_SELECTOR';
|
|
37
|
+
displayMode: DisplayMode;
|
|
38
|
+
selector: string;
|
|
39
|
+
path?: StyleCategory;
|
|
40
|
+
value?: StyleItem['attributes'];
|
|
41
|
+
params: {
|
|
42
|
+
componentType?: string;
|
|
43
|
+
styleSelector: string;
|
|
44
|
+
styleState?: StyleState;
|
|
45
|
+
styleVariant?: string;
|
|
46
|
+
};
|
|
47
|
+
} | {
|
|
48
|
+
type: 'STYLE_REMOVE_SELECTOR';
|
|
49
|
+
displayMode?: DisplayMode;
|
|
50
|
+
selector: string;
|
|
51
|
+
} | {
|
|
52
|
+
type: 'STYLE_ADD_SELECTOR_VARIABLE' | 'STYLE_UPDATE_SELECTOR_VARIABLE';
|
|
53
|
+
displayMode: DisplayMode;
|
|
54
|
+
selector: string;
|
|
55
|
+
category: StyleVariableCategory;
|
|
56
|
+
name: string;
|
|
57
|
+
value: StyleVariableValue;
|
|
58
|
+
} | {
|
|
59
|
+
type: 'STYLE_REMOVE_SELECTOR_VARIABLE';
|
|
60
|
+
displayMode: DisplayMode;
|
|
61
|
+
selector: string;
|
|
62
|
+
category: StyleVariableCategory;
|
|
63
|
+
name: string;
|
|
64
|
+
} | {
|
|
65
|
+
type: 'STYLE_ADD_VARIABLE' | 'STYLE_UPDATE_VARIABLE';
|
|
66
|
+
category: StyleVariableCategory;
|
|
67
|
+
name: string;
|
|
68
|
+
value: StyleVariableValue;
|
|
69
|
+
} | {
|
|
70
|
+
type: 'STYLE_REMOVE_VARIABLE';
|
|
71
|
+
category: StyleVariableCategory;
|
|
72
|
+
name: string;
|
|
73
|
+
} | {
|
|
74
|
+
type: 'STYLE_ADD_TEMPLATE';
|
|
75
|
+
platform: Style['platform'];
|
|
76
|
+
} | {
|
|
77
|
+
type: 'STYLE_UPDATE_SETTINGS';
|
|
78
|
+
path: string;
|
|
79
|
+
value: string;
|
|
80
|
+
});
|
|
81
|
+
declare const StyleReducer: (state: Style, action: StyleReducerActions) => Style;
|
|
82
|
+
export default StyleReducer;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import e from "./StyleMap/index.mjs";
|
|
2
|
+
import { generateCache as t } from "./StyleHelper.mjs";
|
|
3
|
+
import { get as n, set as r } from "@plitzi/plitzi-ui/helpers";
|
|
4
|
+
import { produce as i } from "immer";
|
|
5
|
+
//#region src/StyleReducer.ts
|
|
6
|
+
var a = {
|
|
7
|
+
STYLE_UPDATE: "STYLE_UPDATE",
|
|
8
|
+
STYLE_ADD_SELECTOR: "STYLE_ADD_SELECTOR",
|
|
9
|
+
STYLE_UPDATE_SELECTOR: "STYLE_UPDATE_SELECTOR",
|
|
10
|
+
STYLE_REMOVE_SELECTOR: "STYLE_REMOVE_SELECTOR",
|
|
11
|
+
STYLE_ADD_SELECTOR_VARIABLE: "STYLE_ADD_SELECTOR_VARIABLE",
|
|
12
|
+
STYLE_UPDATE_SELECTOR_VARIABLE: "STYLE_UPDATE_SELECTOR_VARIABLE",
|
|
13
|
+
STYLE_REMOVE_SELECTOR_VARIABLE: "STYLE_REMOVE_SELECTOR_VARIABLE",
|
|
14
|
+
STYLE_ADD_VARIABLE: "STYLE_ADD_VARIABLE",
|
|
15
|
+
STYLE_UPDATE_VARIABLE: "STYLE_UPDATE_VARIABLE",
|
|
16
|
+
STYLE_REMOVE_VARIABLE: "STYLE_REMOVE_VARIABLE",
|
|
17
|
+
STYLE_ADD_TEMPLATE: "STYLE_ADD_TEMPLATE",
|
|
18
|
+
STYLE_UPDATE_SETTINGS: "STYLE_UPDATE_SETTINGS"
|
|
19
|
+
}, o = (o, s) => {
|
|
20
|
+
switch (s.type) {
|
|
21
|
+
case a.STYLE_UPDATE: return {
|
|
22
|
+
...o,
|
|
23
|
+
...s.style
|
|
24
|
+
};
|
|
25
|
+
case a.STYLE_ADD_SELECTOR: {
|
|
26
|
+
let { displayMode: n, selectorType: a, selector: c, path: l, value: u, params: d } = s;
|
|
27
|
+
return i(o, (i) => {
|
|
28
|
+
e.addSelector(i, n, c, a, l, u, d) && r(i, "cache", t(i));
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
case a.STYLE_UPDATE_SELECTOR: {
|
|
32
|
+
let { displayMode: n, selector: a, path: c, value: l, params: u } = s;
|
|
33
|
+
return i(o, (i) => {
|
|
34
|
+
e.updateSelector(i, n, a, c, l, u) && r(i, "cache", t(i));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
case a.STYLE_REMOVE_SELECTOR: {
|
|
38
|
+
let { displayMode: n, selector: a } = s;
|
|
39
|
+
return i(o, (i) => {
|
|
40
|
+
e.removeSelector(i, n, a) && r(i, "cache", t(i));
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
case a.STYLE_ADD_SELECTOR_VARIABLE: {
|
|
44
|
+
let { displayMode: n, selector: a, category: c, name: l, value: u } = s;
|
|
45
|
+
return i(o, (i) => {
|
|
46
|
+
e.addSelectorVariable(i, n, a, c, l, u) && r(i, "cache", t(i));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
case a.STYLE_UPDATE_SELECTOR_VARIABLE: {
|
|
50
|
+
let { displayMode: n, selector: a, category: c, name: l, value: u } = s;
|
|
51
|
+
return i(o, (i) => {
|
|
52
|
+
e.updateSelectorVariable(i, n, a, c, l, u) && r(i, "cache", t(i));
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
case a.STYLE_REMOVE_SELECTOR_VARIABLE: {
|
|
56
|
+
let { displayMode: n, selector: a, category: c, name: l } = s;
|
|
57
|
+
return i(o, (i) => {
|
|
58
|
+
e.removeSelectorVariable(i, n, a, c, l) && r(i, "cache", t(i));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
case a.STYLE_ADD_VARIABLE: {
|
|
62
|
+
let { category: n, name: a, value: c } = s;
|
|
63
|
+
return i(o, (i) => {
|
|
64
|
+
e.addVariable(i, n, a, c) && r(i, "cache", t(i));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
case a.STYLE_UPDATE_VARIABLE: {
|
|
68
|
+
let { category: n, name: a, value: c } = s;
|
|
69
|
+
return i(o, (i) => {
|
|
70
|
+
e.updateVariable(i, n, a, c) && r(i, "cache", t(i));
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
case a.STYLE_REMOVE_VARIABLE: {
|
|
74
|
+
let { category: n, name: a } = s;
|
|
75
|
+
return i(o, (i) => {
|
|
76
|
+
e.removeVariable(i, n, a) && r(i, "cache", t(i));
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
case a.STYLE_ADD_TEMPLATE: {
|
|
80
|
+
let { platform: e } = s;
|
|
81
|
+
return i(o, (r) => {
|
|
82
|
+
let i = n(r, "platform", {});
|
|
83
|
+
Object.keys(e).forEach((t) => {
|
|
84
|
+
i[t] = {
|
|
85
|
+
...n(i, t, {}),
|
|
86
|
+
...e[t]
|
|
87
|
+
};
|
|
88
|
+
}), r.platform = i, r.cache = t(r);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
case a.STYLE_UPDATE_SETTINGS: {
|
|
92
|
+
let { path: e, value: t } = s;
|
|
93
|
+
return i(o, (n) => {
|
|
94
|
+
e === "mode" && r(n, "mode", t);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
default: return o;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
//#endregion
|
|
101
|
+
export { a as StyleActions, o as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.defineProperty, t = (t, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in t) e(r, i, {
|
|
5
|
+
get: t[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as __exportAll };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function bezier(mX1: number, mY1: number, mX2: number, mY2: number): (x: number) => number;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/components/InputEasing/BezierEasing.ts
|
|
2
|
+
var e = 4, t = .001, n = 1e-7, r = 10, i = 11, a = 1 / (i - 1), o = typeof Float32Array == "function", s = (e, t) => 1 - 3 * t + 3 * e, c = (e, t) => 3 * t - 6 * e, l = (e) => 3 * e, u = (e, t, n) => ((s(t, n) * e + c(t, n)) * e + l(t)) * e, d = (e, t, n) => 3 * s(t, n) * e * e + 2 * c(t, n) * e + l(t), f = (e, t, i, a, o) => {
|
|
3
|
+
let s, c, l = 0;
|
|
4
|
+
do
|
|
5
|
+
c = t + (i - t) / 2, s = u(c, a, o) - e, s > 0 ? i = c : t = c;
|
|
6
|
+
while (Math.abs(s) > n && ++l < r);
|
|
7
|
+
return c;
|
|
8
|
+
}, p = (t, n, r, i) => {
|
|
9
|
+
for (let a = 0; a < e; ++a) {
|
|
10
|
+
let e = d(n, r, i);
|
|
11
|
+
if (e === 0) return n;
|
|
12
|
+
let a = u(n, r, i) - t;
|
|
13
|
+
n -= a / e;
|
|
14
|
+
}
|
|
15
|
+
return n;
|
|
16
|
+
}, m = (e) => e;
|
|
17
|
+
function h(e, n, r, s) {
|
|
18
|
+
if (!(e >= 0 && e <= 1 && r >= 0 && r <= 1)) throw Error("bezier x values must be in [0, 1] range");
|
|
19
|
+
if (e === n && r === s) return m;
|
|
20
|
+
let c = o ? new Float32Array(i) : Array(i);
|
|
21
|
+
for (let t = 0; t < i; ++t) c[t] = u(t * a, e, r);
|
|
22
|
+
function l(n) {
|
|
23
|
+
let o = 0, s = 1, l = i - 1;
|
|
24
|
+
for (; s !== l && c[s] <= n; ++s) o += a;
|
|
25
|
+
--s;
|
|
26
|
+
let u = (n - c[s]) / (c[s + 1] - c[s]), m = o + u * a, h = d(m, e, r);
|
|
27
|
+
return h >= t ? p(n, m, e, r) : h === 0 ? m : f(n, o, o + a, e, r);
|
|
28
|
+
}
|
|
29
|
+
return function(e) {
|
|
30
|
+
return e === 0 || e === 1 ? e : u(l(e), n, s);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { h as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/InputEasing/Curve.tsx
|
|
3
|
+
var t = [], n = ({ value: n = t, xFrom: r = 0, xTo: i = 0, yFrom: a = 0, yTo: o = 0 }) => {
|
|
4
|
+
let s = (e, t, n) => e * (1 - n) + t * n, c = (e) => Math.round(s(r, i, e)), l = (e) => Math.round(s(a, o, e)), u = c(0), d = l(0), f = c(1), p = l(1);
|
|
5
|
+
return /* @__PURE__ */ e("path", {
|
|
6
|
+
className: "fill-transparent stroke-gray-900 stroke-2",
|
|
7
|
+
d: `M${u},${d} C${c(n[0])},${l(n[1])} ${c(n[2])},${l(n[3])} ${f},${p}`
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as default };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/InputEasing/Grid.tsx
|
|
3
|
+
var n = ({ xFrom: n = 0, xTo: r = 0, yFrom: i = 0, yTo: a = 0 }) => {
|
|
4
|
+
let o = (e, t, n) => e * (1 - n) + t * n, s = (e) => Math.round(o(n, r, e)), c = (e) => Math.round(o(i, a, e)), l = (e, t, n) => {
|
|
5
|
+
let r = [];
|
|
6
|
+
for (let i = e; i < t; i += n) r.push(i);
|
|
7
|
+
return r;
|
|
8
|
+
}, u = (e) => l(0, 1, 1 / e).map(s), d = (e) => l(0, 1, 1 / e).map(c), f = s(0), p = c(0), m = s(1), h = c(1), g = u(2), _ = d(2), v = u(10), y = d(10), b = `M${f},${p} L${f},${h} L${m},${h} L${m},${p} Z`, x = v.map((e) => `M${e},${p} L${e},${h}`).concat(y.map((e) => `M${f},${e} L${m},${e}`)).join(" "), S = g.map((e) => `M${e},${p} L${e},${h}`).concat(_.map((e) => `M${f},${e} L${m},${e}`)).concat([`M${f},${p} L${m},${h}`]).join(" "), C = y.map((e, t) => `M${f},${e} L${f - (3 + (t % 5 == 0 ? 2 : 0))},${e}`).join(" "), w = v.map((e, t) => `M${e},${p} L${e},${p + (3 + (t % 5 == 0 ? 2 : 0))}`).join(" ");
|
|
9
|
+
return /* @__PURE__ */ t("g", { children: [
|
|
10
|
+
/* @__PURE__ */ e("path", {
|
|
11
|
+
className: "fill-white",
|
|
12
|
+
d: b
|
|
13
|
+
}),
|
|
14
|
+
/* @__PURE__ */ e("path", {
|
|
15
|
+
className: "stroke-gray-300",
|
|
16
|
+
strokeWidth: "1px",
|
|
17
|
+
d: x
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ e("path", {
|
|
20
|
+
className: "stroke-gray-300",
|
|
21
|
+
strokeWidth: "2px",
|
|
22
|
+
d: S
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ e("path", {
|
|
25
|
+
className: "",
|
|
26
|
+
strokeWidth: "1px",
|
|
27
|
+
d: C
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ e("text", {
|
|
30
|
+
className: "rotate-[-90deg] text-xs",
|
|
31
|
+
style: { textAnchor: "end" },
|
|
32
|
+
x: -c(1),
|
|
33
|
+
y: s(0) - 8,
|
|
34
|
+
children: "Progress"
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ e("path", {
|
|
37
|
+
className: "",
|
|
38
|
+
strokeWidth: "1px",
|
|
39
|
+
d: w
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ e("text", {
|
|
42
|
+
className: "text-xs",
|
|
43
|
+
style: { textAnchor: "end" },
|
|
44
|
+
x: s(1),
|
|
45
|
+
y: c(0) + 5,
|
|
46
|
+
children: "Time"
|
|
47
|
+
})
|
|
48
|
+
] });
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { n as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Component, ReactNode, RefObject } from 'react';
|
|
2
|
+
export type InputEasingProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
value?: [number, number, number, number];
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
handleRadius?: number;
|
|
9
|
+
padding?: number[];
|
|
10
|
+
progress?: number;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
onChange?: (value: number[]) => void;
|
|
13
|
+
};
|
|
14
|
+
declare class InputEasing extends Component {
|
|
15
|
+
props: InputEasingProps;
|
|
16
|
+
state: {
|
|
17
|
+
inputRef: RefObject<SVGSVGElement>;
|
|
18
|
+
handle?: 'bottom' | 'top';
|
|
19
|
+
};
|
|
20
|
+
constructor(props: InputEasingProps);
|
|
21
|
+
positionForEvent: (e: MouseEvent) => number[];
|
|
22
|
+
x: (value: number) => number;
|
|
23
|
+
inversex: (x: number) => number;
|
|
24
|
+
y: (value: number) => number;
|
|
25
|
+
inversey: (y: number) => number;
|
|
26
|
+
handleMouseDown: (handle: "bottom" | "top") => (e: React.MouseEvent) => void;
|
|
27
|
+
handleMouseMove: (e: MouseEvent) => void;
|
|
28
|
+
handleMouseUp: () => void;
|
|
29
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
}
|
|
31
|
+
export default InputEasing;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import e from "./Curve.mjs";
|
|
2
|
+
import t from "./Grid.mjs";
|
|
3
|
+
import n from "./Progress.mjs";
|
|
4
|
+
import r from "clsx";
|
|
5
|
+
import { Component as i, createRef as a } from "react";
|
|
6
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/InputEasing/InputEasing.tsx
|
|
8
|
+
var l = [
|
|
9
|
+
.25,
|
|
10
|
+
.25,
|
|
11
|
+
.75,
|
|
12
|
+
.75
|
|
13
|
+
], u = [
|
|
14
|
+
25,
|
|
15
|
+
5,
|
|
16
|
+
25,
|
|
17
|
+
18
|
|
18
|
+
], d = class extends i {
|
|
19
|
+
props;
|
|
20
|
+
state;
|
|
21
|
+
constructor(e) {
|
|
22
|
+
super(e), this.props = e, this.state = {
|
|
23
|
+
inputRef: a(),
|
|
24
|
+
handle: void 0
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
positionForEvent = (e) => {
|
|
28
|
+
let { inputRef: t } = this.state, n = t.current.getBoundingClientRect();
|
|
29
|
+
return [e.clientX - n.left, e.clientY - n.top];
|
|
30
|
+
};
|
|
31
|
+
x = (e) => {
|
|
32
|
+
let { padding: t = u, width: n = 300 } = this.props, r = n - t[1] - t[3];
|
|
33
|
+
return Math.round(t[3] + e * r);
|
|
34
|
+
};
|
|
35
|
+
inversex = (e) => {
|
|
36
|
+
let { padding: t = u, width: n = 300 } = this.props, r = n - t[1] - t[3];
|
|
37
|
+
return Math.max(0, Math.min((e - t[3]) / r, 1));
|
|
38
|
+
};
|
|
39
|
+
y = (e) => {
|
|
40
|
+
let { padding: t = u, height: n = 300 } = this.props, r = n - t[0] - t[2];
|
|
41
|
+
return Math.round(t[0] + (1 - e) * r);
|
|
42
|
+
};
|
|
43
|
+
inversey = (e) => {
|
|
44
|
+
let { height: t = 300, handleRadius: n = 5, padding: r = u } = this.props, i = 2 * n, a = t - r[0] - r[2];
|
|
45
|
+
return e = Math.max(i, Math.min(e, t - i)), 1 - (e - r[0]) / a;
|
|
46
|
+
};
|
|
47
|
+
handleMouseDown = (e) => (t) => {
|
|
48
|
+
t.preventDefault(), t.stopPropagation(), this.setState({ handle: e }), window.addEventListener("mousemove", this.handleMouseMove), window.addEventListener("mouseup", this.handleMouseUp);
|
|
49
|
+
};
|
|
50
|
+
handleMouseMove = (e) => {
|
|
51
|
+
let { onChange: t } = this.props, { value: n = l } = this.props, { handle: r } = this.state;
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
let i = 0;
|
|
54
|
+
r === "top" && (i = 2), n = [].concat(n);
|
|
55
|
+
let [a, o] = this.positionForEvent(e);
|
|
56
|
+
n[i] = Number(this.inversex(a).toFixed(2)), n[i + 1] = Number(this.inversey(o).toFixed(2)), t?.(n);
|
|
57
|
+
};
|
|
58
|
+
handleMouseUp = () => {
|
|
59
|
+
window.removeEventListener("mousemove", this.handleMouseMove), window.removeEventListener("mouseup", this.handleMouseUp);
|
|
60
|
+
};
|
|
61
|
+
render() {
|
|
62
|
+
let { children: i, value: a = l, width: u = 300, height: d = 300, handleRadius: f = 5, className: p = "", progress: m = 0, readOnly: h = !1 } = this.props, { inputRef: g } = this.state, _ = {
|
|
63
|
+
xFrom: this.x(0),
|
|
64
|
+
yFrom: this.y(0),
|
|
65
|
+
xTo: this.x(1),
|
|
66
|
+
yTo: this.y(1)
|
|
67
|
+
}, v = this.x(0), y = this.y(0), b = this.x(a[0]), x = this.y(a[1]), S = Math.atan2(x - y, b - v), C = b - f * Math.cos(S), w = x - f * Math.sin(S), T = this.x(1), E = this.y(1), D = this.x(a[2]), O = this.y(a[3]), k = Math.atan2(O - E, D - T), A = D - f * Math.cos(k), j = O - f * Math.sin(k);
|
|
68
|
+
return /* @__PURE__ */ c("svg", {
|
|
69
|
+
className: r("overflow-visible select-none", p),
|
|
70
|
+
ref: g,
|
|
71
|
+
width: u,
|
|
72
|
+
height: d,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ s(t, { ..._ }),
|
|
75
|
+
/* @__PURE__ */ s(n, {
|
|
76
|
+
..._,
|
|
77
|
+
value: a,
|
|
78
|
+
progress: m
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ s(e, {
|
|
81
|
+
..._,
|
|
82
|
+
value: a
|
|
83
|
+
}),
|
|
84
|
+
i,
|
|
85
|
+
!h && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ c("g", {
|
|
86
|
+
className: "group",
|
|
87
|
+
children: [/* @__PURE__ */ s("line", {
|
|
88
|
+
x1: C,
|
|
89
|
+
y1: w,
|
|
90
|
+
x2: v,
|
|
91
|
+
y2: y,
|
|
92
|
+
className: "stroke-blue-400 stroke-[3px] group-hover:stroke-[4px]"
|
|
93
|
+
}), /* @__PURE__ */ s("circle", {
|
|
94
|
+
cx: b,
|
|
95
|
+
cy: x,
|
|
96
|
+
r: f,
|
|
97
|
+
onMouseDown: this.handleMouseDown("bottom"),
|
|
98
|
+
className: "cursor-pointer fill-blue-400 stroke-blue-400 stroke-[3px] group-hover:fill-white group-hover:stroke-[6px]"
|
|
99
|
+
})]
|
|
100
|
+
}), /* @__PURE__ */ c("g", {
|
|
101
|
+
className: "group",
|
|
102
|
+
children: [/* @__PURE__ */ s("line", {
|
|
103
|
+
x1: A,
|
|
104
|
+
y1: j,
|
|
105
|
+
x2: T,
|
|
106
|
+
y2: E,
|
|
107
|
+
className: "stroke-blue-400 stroke-[3px] group-hover:stroke-[4px]"
|
|
108
|
+
}), /* @__PURE__ */ s("circle", {
|
|
109
|
+
cx: D,
|
|
110
|
+
cy: O,
|
|
111
|
+
r: f,
|
|
112
|
+
onMouseDown: this.handleMouseDown("top"),
|
|
113
|
+
className: "cursor-pointer fill-blue-400 stroke-blue-400 stroke-[3px] group-hover:fill-white group-hover:stroke-[6px]"
|
|
114
|
+
})]
|
|
115
|
+
})] })
|
|
116
|
+
]
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
//#endregion
|
|
121
|
+
export { d as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type InputEasingButtonProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
title?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare const InputEasingButton: ({ children, title, className, onClick }: InputEasingButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default InputEasingButton;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import e from "clsx";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/InputEasing/InputEasingButton.tsx
|
|
4
|
+
var n = ({ children: n, title: r = "", className: i = "", onClick: a }) => /* @__PURE__ */ t("button", {
|
|
5
|
+
type: "button",
|
|
6
|
+
title: r,
|
|
7
|
+
onClick: a,
|
|
8
|
+
className: e("m-1 h-6 w-6 rounded-sm p-1 hover:bg-gray-100", i),
|
|
9
|
+
children: /* @__PURE__ */ t("svg", {
|
|
10
|
+
viewBox: "0 0 30 30",
|
|
11
|
+
className: "overflow-visible",
|
|
12
|
+
children: n
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const easingGenerics: Record<string, [number, number, number, number]>;
|