@makeswift/runtime 0.8.10 → 0.8.11
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/dist/Box.cjs.js +6 -4
- package/dist/Box.cjs.js.map +1 -1
- package/dist/Box.es.js +6 -4
- package/dist/Box.es.js.map +1 -1
- package/dist/Button.cjs.js +6 -4
- package/dist/Button.cjs.js.map +1 -1
- package/dist/Button.es.js +6 -4
- package/dist/Button.es.js.map +1 -1
- package/dist/Carousel.cjs.js +9 -7
- package/dist/Carousel.cjs.js.map +1 -1
- package/dist/Carousel.es.js +9 -7
- package/dist/Carousel.es.js.map +1 -1
- package/dist/Countdown.cjs.js +6 -4
- package/dist/Countdown.cjs.js.map +1 -1
- package/dist/Countdown.es.js +6 -4
- package/dist/Countdown.es.js.map +1 -1
- package/dist/Divider.cjs.js +6 -4
- package/dist/Divider.cjs.js.map +1 -1
- package/dist/Divider.es.js +6 -4
- package/dist/Divider.es.js.map +1 -1
- package/dist/Embed.cjs.js +6 -4
- package/dist/Embed.cjs.js.map +1 -1
- package/dist/Embed.es.js +6 -4
- package/dist/Embed.es.js.map +1 -1
- package/dist/Form.cjs.js +6 -4
- package/dist/Form.cjs.js.map +1 -1
- package/dist/Form.es.js +6 -4
- package/dist/Form.es.js.map +1 -1
- package/dist/Image.cjs.js +6 -4
- package/dist/Image.cjs.js.map +1 -1
- package/dist/Image.es.js +6 -4
- package/dist/Image.es.js.map +1 -1
- package/dist/LiveProvider.cjs.js +8 -6
- package/dist/LiveProvider.cjs.js.map +1 -1
- package/dist/LiveProvider.es.js +7 -5
- package/dist/LiveProvider.es.js.map +1 -1
- package/dist/Navigation.cjs.js +6 -4
- package/dist/Navigation.cjs.js.map +1 -1
- package/dist/Navigation.es.js +6 -4
- package/dist/Navigation.es.js.map +1 -1
- package/dist/PreviewProvider.cjs.js +35 -33
- package/dist/PreviewProvider.cjs.js.map +1 -1
- package/dist/PreviewProvider.es.js +6 -4
- package/dist/PreviewProvider.es.js.map +1 -1
- package/dist/ReadOnlyText.cjs.js +65 -61
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +11 -7
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/ReadOnlyTextV2.cjs.js +129 -85
- package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
- package/dist/ReadOnlyTextV2.es.js +75 -31
- package/dist/ReadOnlyTextV2.es.js.map +1 -1
- package/dist/Root.cjs.js +6 -4
- package/dist/Root.cjs.js.map +1 -1
- package/dist/Root.es.js +6 -4
- package/dist/Root.es.js.map +1 -1
- package/dist/SocialLinks.cjs.js +6 -4
- package/dist/SocialLinks.cjs.js.map +1 -1
- package/dist/SocialLinks.es.js +6 -4
- package/dist/SocialLinks.es.js.map +1 -1
- package/dist/Text.cjs.js +7 -5
- package/dist/Text.cjs.js.map +1 -1
- package/dist/Text.es.js +7 -5
- package/dist/Text.es.js.map +1 -1
- package/dist/Video.cjs.js +6 -4
- package/dist/Video.cjs.js.map +1 -1
- package/dist/Video.es.js +6 -4
- package/dist/Video.es.js.map +1 -1
- package/dist/builder.cjs.js +7 -2
- package/dist/builder.cjs.js.map +1 -1
- package/dist/builder.es.js +7 -2
- package/dist/builder.es.js.map +1 -1
- package/dist/components.cjs.js +8 -6
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +8 -6
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +0 -408
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +1 -372
- package/dist/constants.es.js.map +1 -1
- package/dist/control-serialization.cjs.js +84 -41
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +44 -1
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/controls.cjs.js +59 -50
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +9 -3
- package/dist/controls.es.js.map +1 -1
- package/dist/index.cjs.js +286 -282
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs10.js +371 -0
- package/dist/index.cjs10.js.map +1 -0
- package/dist/index.cjs2.js +10 -8
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs5.js +107 -63
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs6.js +7 -7
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs7.js +69 -39
- package/dist/index.cjs7.js.map +1 -1
- package/dist/index.cjs8.js +14 -180
- package/dist/index.cjs8.js.map +1 -1
- package/dist/index.cjs9.js +152 -265
- package/dist/index.cjs9.js.map +1 -1
- package/dist/index.es.js +50 -46
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +364 -0
- package/dist/index.es10.js.map +1 -0
- package/dist/index.es2.js +5 -3
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es5.js +70 -26
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es6.js +5 -5
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es7.js +68 -37
- package/dist/index.es7.js.map +1 -1
- package/dist/index.es8.js +13 -175
- package/dist/index.es8.js.map +1 -1
- package/dist/index.es9.js +149 -262
- package/dist/index.es9.js.map +1 -1
- package/dist/leaf.cjs.js +4 -4
- package/dist/leaf.cjs.js.map +1 -1
- package/dist/leaf.es.js +1 -1
- package/dist/leaf.es.js.map +1 -1
- package/dist/main.cjs.js +5 -4
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +5 -4
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +6 -4
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +6 -4
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +11 -7
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +7 -3
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/{descriptors.cjs.js → react-page.cjs.js} +899 -92
- package/dist/react-page.cjs.js.map +1 -0
- package/dist/{descriptors.es.js → react-page.es.js} +821 -70
- package/dist/react-page.es.js.map +1 -0
- package/dist/react.cjs.js +6 -4
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.es.js +6 -4
- package/dist/react.es.js.map +1 -1
- package/dist/select.cjs.js +8 -0
- package/dist/select.cjs.js.map +1 -0
- package/dist/select.es.js +6 -0
- package/dist/select.es.js.map +1 -0
- package/dist/slate.cjs.js +15 -7
- package/dist/slate.cjs.js.map +1 -1
- package/dist/slate.es.js +7 -4
- package/dist/slate.es.js.map +1 -1
- package/dist/state/breakpoints.cjs.js.map +1 -1
- package/dist/state/breakpoints.es.js.map +1 -1
- package/dist/text-input.cjs.js +0 -6
- package/dist/text-input.cjs.js.map +1 -1
- package/dist/text-input.es.js +1 -5
- package/dist/text-input.es.js.map +1 -1
- package/dist/types/src/api/graphql/generated/types.d.ts +36 -36
- package/dist/types/src/api/graphql/generated/types.d.ts.map +1 -1
- package/dist/types/src/api/graphql/types.d.ts +2 -2
- package/dist/types/src/api/graphql/types.d.ts.map +1 -1
- package/dist/types/src/api/react.d.ts +3 -3
- package/dist/types/src/api/react.d.ts.map +1 -1
- package/dist/types/src/builder/serialization/control-serialization.d.ts +66 -66
- package/dist/types/src/builder/serialization/control-serialization.d.ts.map +1 -1
- package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts +5 -0
- package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts.map +1 -0
- package/dist/types/src/builder/serialization/controls/types.d.ts +3 -3
- package/dist/types/src/builder/serialization/controls/types.d.ts.map +1 -1
- package/dist/types/src/builder/serialization/function-serialization.d.ts +4 -4
- package/dist/types/src/builder/serialization/function-serialization.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Box/animations.d.ts +1 -1
- package/dist/types/src/components/builtin/Box/animations.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Box/components/Placeholder/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Box/components/Placeholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Box/constants.d.ts +1 -1
- package/dist/types/src/components/builtin/Box/constants.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Button/Button.d.ts +3 -3
- package/dist/types/src/components/builtin/Button/Button.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Button/contants.d.ts +1 -1
- package/dist/types/src/components/builtin/Button/contants.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Carousel/Carousel.d.ts +1 -1
- package/dist/types/src/components/builtin/Carousel/Carousel.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Countdown/Countdown.d.ts +1 -1
- package/dist/types/src/components/builtin/Countdown/Countdown.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Divider/Divider.d.ts +2 -2
- package/dist/types/src/components/builtin/Divider/Divider.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Embed/Embed.d.ts +1 -1
- package/dist/types/src/components/builtin/Embed/Embed.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/Form.d.ts +2 -2
- package/dist/types/src/components/builtin/Form/Form.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +2 -2
- package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts +2 -2
- package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/index.d.ts +2 -2
- package/dist/types/src/components/builtin/Form/components/Field/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/context/FormContext.d.ts +5 -5
- package/dist/types/src/components/builtin/Form/context/FormContext.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/types.d.ts +13 -13
- package/dist/types/src/components/builtin/Form/types.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Image/Image.d.ts +1 -1
- package/dist/types/src/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/Navigation.d.ts +1 -1
- package/dist/types/src/components/builtin/Navigation/Navigation.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts +3 -3
- package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts +3 -3
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Root/Root.d.ts +1 -1
- package/dist/types/src/components/builtin/Root/Root.d.ts.map +1 -1
- package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts +1 -1
- package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
- package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts +1 -1
- package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts +1 -1
- package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts +3 -3
- package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/Text.d.ts +1 -1
- package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Element/block.d.ts +2 -2
- package/dist/types/src/components/builtin/Text/components/Element/block.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts +1 -1
- package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts +5 -5
- package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Video/Video.d.ts +1 -1
- package/dist/types/src/components/builtin/Video/Video.d.ts.map +1 -1
- package/dist/types/src/components/hooks/useBackgrounds.d.ts +8 -8
- package/dist/types/src/components/hooks/useBackgrounds.d.ts.map +1 -1
- package/dist/types/src/components/hooks/useBorder.d.ts +3 -3
- package/dist/types/src/components/hooks/useBorder.d.ts.map +1 -1
- package/dist/types/src/components/hooks/useBoxShadow.d.ts +3 -3
- package/dist/types/src/components/hooks/useBoxShadow.d.ts.map +1 -1
- package/dist/types/src/components/page/BodySnippet.d.ts +1 -1
- package/dist/types/src/components/page/BodySnippet.d.ts.map +1 -1
- package/dist/types/src/components/page/Page.d.ts +1 -1
- package/dist/types/src/components/page/Page.d.ts.map +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/Parallax/index.d.ts +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/Parallax/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/FallbackComponent/FallbackComponent.d.ts +1 -1
- package/dist/types/src/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -1
- package/dist/types/src/components/shared/GutterContainer/index.d.ts +2 -2
- package/dist/types/src/components/shared/GutterContainer/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/Link/index.d.ts +1 -1
- package/dist/types/src/components/shared/Link/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/grid-item.d.ts +2 -2
- package/dist/types/src/components/shared/grid-item.d.ts.map +1 -1
- package/dist/types/src/components/utils/drop-first.d.ts +1 -1
- package/dist/types/src/components/utils/drop-first.d.ts.map +1 -1
- package/dist/types/src/components/utils/types.d.ts +2 -2
- package/dist/types/src/components/utils/types.d.ts.map +1 -1
- package/dist/types/src/controls/checkbox.d.ts +3 -3
- package/dist/types/src/controls/checkbox.d.ts.map +1 -1
- package/dist/types/src/controls/color.d.ts +3 -3
- package/dist/types/src/controls/color.d.ts.map +1 -1
- package/dist/types/src/controls/combobox.d.ts +5 -5
- package/dist/types/src/controls/combobox.d.ts.map +1 -1
- package/dist/types/src/controls/control.d.ts +6 -4
- package/dist/types/src/controls/control.d.ts.map +1 -1
- package/dist/types/src/controls/image.d.ts +4 -4
- package/dist/types/src/controls/image.d.ts.map +1 -1
- package/dist/types/src/controls/link.d.ts +8 -8
- package/dist/types/src/controls/link.d.ts.map +1 -1
- package/dist/types/src/controls/list.d.ts +6 -6
- package/dist/types/src/controls/list.d.ts.map +1 -1
- package/dist/types/src/controls/number.d.ts +3 -3
- package/dist/types/src/controls/number.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/dto-types.d.ts +4 -4
- package/dist/types/src/controls/rich-text/dto-types.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/rich-text.d.ts +11 -11
- package/dist/types/src/controls/rich-text/rich-text.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/translation.d.ts +1 -1
- package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +38 -17
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/controls/select.d.ts +5 -5
- package/dist/types/src/controls/select.d.ts.map +1 -1
- package/dist/types/src/controls/shape.d.ts +5 -5
- package/dist/types/src/controls/shape.d.ts.map +1 -1
- package/dist/types/src/controls/slot.d.ts +17 -8
- package/dist/types/src/controls/slot.d.ts.map +1 -1
- package/dist/types/src/controls/style.d.ts +18 -18
- package/dist/types/src/controls/style.d.ts.map +1 -1
- package/dist/types/src/controls/text-area.d.ts +3 -3
- package/dist/types/src/controls/text-area.d.ts.map +1 -1
- package/dist/types/src/controls/text-input.d.ts +3 -3
- package/dist/types/src/controls/text-input.d.ts.map +1 -1
- package/dist/types/src/controls/types.d.ts +5 -5
- package/dist/types/src/controls/types.d.ts.map +1 -1
- package/dist/types/src/css/border-radius.d.ts +2 -2
- package/dist/types/src/css/border-radius.d.ts.map +1 -1
- package/dist/types/src/css/border.d.ts +2 -2
- package/dist/types/src/css/border.d.ts.map +1 -1
- package/dist/types/src/css/length-percentage.d.ts +2 -2
- package/dist/types/src/css/length-percentage.d.ts.map +1 -1
- package/dist/types/src/css/length.d.ts +1 -1
- package/dist/types/src/css/length.d.ts.map +1 -1
- package/dist/types/src/css/margin.d.ts +2 -2
- package/dist/types/src/css/margin.d.ts.map +1 -1
- package/dist/types/src/css/padding.d.ts +2 -2
- package/dist/types/src/css/padding.d.ts.map +1 -1
- package/dist/types/src/next/api-handler/handlers/element-tree.d.ts +3 -3
- package/dist/types/src/next/api-handler/handlers/element-tree.d.ts.map +1 -1
- package/dist/types/src/next/api-handler/handlers/fonts.d.ts +5 -5
- package/dist/types/src/next/api-handler/handlers/fonts.d.ts.map +1 -1
- package/dist/types/src/next/api-handler/handlers/manifest.d.ts +3 -3
- package/dist/types/src/next/api-handler/handlers/manifest.d.ts.map +1 -1
- package/dist/types/src/next/api-handler/handlers/proxy-preview-mode.d.ts +2 -2
- package/dist/types/src/next/api-handler/handlers/proxy-preview-mode.d.ts.map +1 -1
- package/dist/types/src/next/api-handler/handlers/revalidate.d.ts +3 -3
- package/dist/types/src/next/api-handler/handlers/revalidate.d.ts.map +1 -1
- package/dist/types/src/next/api-handler/index.d.ts +3 -3
- package/dist/types/src/next/api-handler/index.d.ts.map +1 -1
- package/dist/types/src/next/client.d.ts +8 -8
- package/dist/types/src/next/client.d.ts.map +1 -1
- package/dist/types/src/next/dynamic.d.ts +4 -4
- package/dist/types/src/next/dynamic.d.ts.map +1 -1
- package/dist/types/src/next/index.d.ts +2 -2
- package/dist/types/src/next/index.d.ts.map +1 -1
- package/dist/types/src/next/preview-mode.d.ts +2 -2
- package/dist/types/src/next/preview-mode.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +179 -179
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/instances.d.ts +17 -17
- package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/components/LiveProvider.d.ts +1 -1
- package/dist/types/src/runtimes/react/components/LiveProvider.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/components/PreviewProvider.d.ts +1 -1
- package/dist/types/src/runtimes/react/components/PreviewProvider.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/components/render-hook.d.ts +1 -1
- package/dist/types/src/runtimes/react/components/render-hook.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/checkbox.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/checkbox.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/color.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/color.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/combobox.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/combobox.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/control.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/image.d.ts +3 -3
- package/dist/types/src/runtimes/react/controls/image.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/link.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/link.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/list.d.ts +3 -3
- package/dist/types/src/runtimes/react/controls/list.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/number.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/number.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts +3 -3
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts +7 -4
- package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/rich-text.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/select.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/select.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/shape.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/shape.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/slot.d.ts +4 -4
- package/dist/types/src/runtimes/react/controls/slot.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/style.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/style.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/text-area.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/text-area.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/text-input.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/text-input.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls.d.ts +8 -8
- package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/element-imperative-handle.d.ts +1 -1
- package/dist/types/src/runtimes/react/element-imperative-handle.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/find-dom-node.d.ts +1 -1
- package/dist/types/src/runtimes/react/find-dom-node.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/index.d.ts +7 -7
- package/dist/types/src/runtimes/react/index.d.ts.map +1 -1
- package/dist/types/src/slate/BlockPlugin/index.d.ts +33 -2
- package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/BlockPlugin/setBlockKeyForDevice.d.ts +1 -1
- package/dist/types/src/slate/BlockPlugin/setBlockKeyForDevice.d.ts.map +1 -1
- package/dist/types/src/slate/BlockPlugin/types.d.ts +3 -3
- package/dist/types/src/slate/BlockPlugin/types.d.ts.map +1 -1
- package/dist/types/src/slate/BlockPlugin/unwrapInline.d.ts +1 -1
- package/dist/types/src/slate/BlockPlugin/unwrapInline.d.ts.map +1 -1
- package/dist/types/src/slate/BlockPlugin/wrapInline.d.ts +1 -1
- package/dist/types/src/slate/BlockPlugin/wrapInline.d.ts.map +1 -1
- package/dist/types/src/slate/BuilderPlugin/index.d.ts +1 -1
- package/dist/types/src/slate/BuilderPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/InlineModePlugin/index.d.ts +6 -2
- package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/ListPlugin/index.d.ts +2 -2
- package/dist/types/src/slate/ListPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/ListPlugin/toggleList.d.ts +2 -2
- package/dist/types/src/slate/ListPlugin/toggleList.d.ts.map +1 -1
- package/dist/types/src/slate/ListPlugin/unwrapList.d.ts +1 -1
- package/dist/types/src/slate/ListPlugin/unwrapList.d.ts.map +1 -1
- package/dist/types/src/slate/ListPlugin/wrapList.d.ts +2 -2
- package/dist/types/src/slate/ListPlugin/wrapList.d.ts.map +1 -1
- package/dist/types/src/slate/TypographyPlugin/clearActiveTypographyStyle.d.ts +1 -1
- package/dist/types/src/slate/TypographyPlugin/clearActiveTypographyStyle.d.ts.map +1 -1
- package/dist/types/src/slate/TypographyPlugin/clearDeviceActiveTypography.d.ts +1 -1
- package/dist/types/src/slate/TypographyPlugin/clearDeviceActiveTypography.d.ts.map +1 -1
- package/dist/types/src/slate/TypographyPlugin/detachActiveTypography.d.ts +2 -2
- package/dist/types/src/slate/TypographyPlugin/detachActiveTypography.d.ts.map +1 -1
- package/dist/types/src/slate/TypographyPlugin/index.d.ts +2 -2
- package/dist/types/src/slate/TypographyPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/TypographyPlugin/setActiveTypographyId.d.ts +1 -1
- package/dist/types/src/slate/TypographyPlugin/setActiveTypographyId.d.ts.map +1 -1
- package/dist/types/src/slate/TypographyPlugin/setActiveTypographyStyle.d.ts +1 -1
- package/dist/types/src/slate/TypographyPlugin/setActiveTypographyStyle.d.ts.map +1 -1
- package/dist/types/src/slate/index.d.ts +1 -0
- package/dist/types/src/slate/index.d.ts.map +1 -1
- package/dist/types/src/slate/selectors.d.ts +1 -1
- package/dist/types/src/slate/selectors.d.ts.map +1 -1
- package/dist/types/{types/slate.d.ts → src/slate/types.d.ts} +42 -35
- package/dist/types/src/slate/types.d.ts.map +1 -0
- package/dist/types/src/slate/utils/editor.d.ts +1 -1
- package/dist/types/src/slate/utils/editor.d.ts.map +1 -1
- package/dist/types/src/slate/utils/element.d.ts +1 -1
- package/dist/types/src/slate/utils/element.d.ts.map +1 -1
- package/dist/types/src/state/actions.d.ts +41 -41
- package/dist/types/src/state/actions.d.ts.map +1 -1
- package/dist/types/src/state/makeswift-api-client.d.ts +5 -5
- package/dist/types/src/state/makeswift-api-client.d.ts.map +1 -1
- package/dist/types/src/state/modules/api-resources.d.ts +2 -2
- package/dist/types/src/state/modules/api-resources.d.ts.map +1 -1
- package/dist/types/src/state/modules/box-models.d.ts +2 -2
- package/dist/types/src/state/modules/box-models.d.ts.map +1 -1
- package/dist/types/src/state/modules/breakpoints.d.ts +9 -9
- package/dist/types/src/state/modules/breakpoints.d.ts.map +1 -1
- package/dist/types/src/state/modules/builder-edit-mode.d.ts +2 -2
- package/dist/types/src/state/modules/builder-edit-mode.d.ts.map +1 -1
- package/dist/types/src/state/modules/components-meta.d.ts +3 -3
- package/dist/types/src/state/modules/components-meta.d.ts.map +1 -1
- package/dist/types/src/state/modules/element-imperative-handles.d.ts +1 -1
- package/dist/types/src/state/modules/element-imperative-handles.d.ts.map +1 -1
- package/dist/types/src/state/modules/is-in-builder.d.ts +1 -1
- package/dist/types/src/state/modules/is-in-builder.d.ts.map +1 -1
- package/dist/types/src/state/modules/is-preview.d.ts +1 -1
- package/dist/types/src/state/modules/is-preview.d.ts.map +1 -1
- package/dist/types/src/state/modules/pointer.d.ts +2 -2
- package/dist/types/src/state/modules/pointer.d.ts.map +1 -1
- package/dist/types/src/state/modules/prop-controller-handles.d.ts +1 -1
- package/dist/types/src/state/modules/prop-controller-handles.d.ts.map +1 -1
- package/dist/types/src/state/modules/prop-controllers.d.ts +1 -1
- package/dist/types/src/state/modules/prop-controllers.d.ts.map +1 -1
- package/dist/types/src/state/modules/react-components.d.ts +2 -2
- package/dist/types/src/state/modules/react-components.d.ts.map +1 -1
- package/dist/types/src/state/modules/read-only-documents.d.ts +7 -7
- package/dist/types/src/state/modules/read-only-documents.d.ts.map +1 -1
- package/dist/types/src/state/modules/read-write-documents.d.ts +1 -1
- package/dist/types/src/state/modules/read-write-documents.d.ts.map +1 -1
- package/dist/types/src/state/react-builder-preview.d.ts +5 -6
- package/dist/types/src/state/react-builder-preview.d.ts.map +1 -1
- package/dist/types/src/state/react-page.d.ts +10 -6
- package/dist/types/src/state/react-page.d.ts.map +1 -1
- package/dist/types/src/state/react-page.test.d.ts +3 -0
- package/dist/types/src/state/react-page.test.d.ts.map +1 -0
- package/dist/types/src/utils/isErrorWithMessage.d.ts +1 -1
- package/dist/types/src/utils/isErrorWithMessage.d.ts.map +1 -1
- package/package.json +4 -3
- package/dist/descriptors.cjs.js.map +0 -1
- package/dist/descriptors.es.js.map +0 -1
- package/dist/element.cjs.js +0 -55
- package/dist/element.cjs.js.map +0 -1
- package/dist/element.es.js +0 -54
- package/dist/element.es.js.map +0 -1
- package/dist/introspection.cjs.js +0 -329
- package/dist/introspection.cjs.js.map +0 -1
- package/dist/introspection.es.js +0 -315
- package/dist/introspection.es.js.map +0 -1
- package/dist/slate.cjs2.js +0 -46
- package/dist/slate.cjs2.js.map +0 -1
- package/dist/slate.es2.js +0 -44
- package/dist/slate.es2.js.map +0 -1
- package/dist/types/types/slate.d.ts.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -39,21 +39,23 @@ var _c;
|
|
|
39
39
|
var React = require("react");
|
|
40
40
|
var withSelector = require("use-sync-external-store/shim/with-selector");
|
|
41
41
|
var dynamic = require("next/dynamic");
|
|
42
|
-
var
|
|
42
|
+
var reactPage = require("./react-page.cjs.js");
|
|
43
43
|
var actions = require("./actions.cjs.js");
|
|
44
44
|
var css = require("@emotion/css");
|
|
45
45
|
var serialize = require("@emotion/serialize");
|
|
46
46
|
var utils = require("@emotion/utils");
|
|
47
47
|
var jsxRuntime = require("react/jsx-runtime");
|
|
48
|
-
var descriptors = require("./descriptors.cjs.js");
|
|
49
48
|
var textInput = require("./text-input.cjs.js");
|
|
50
49
|
var combobox = require("./combobox.cjs.js");
|
|
50
|
+
var select = require("./select.cjs.js");
|
|
51
|
+
require("slate");
|
|
52
|
+
require("is-hotkey");
|
|
53
|
+
var state_breakpoints = require("./state/breakpoints.cjs.js");
|
|
54
|
+
require("slate-react");
|
|
51
55
|
var shim = require("use-sync-external-store/shim");
|
|
52
56
|
var redux = require("redux");
|
|
53
57
|
var thunk = require("redux-thunk");
|
|
54
58
|
var types = require("./types.cjs.js");
|
|
55
|
-
var introspection = require("./introspection.cjs.js");
|
|
56
|
-
var state_breakpoints = require("./state/breakpoints.cjs.js");
|
|
57
59
|
var boxModels = require("./box-models.cjs.js");
|
|
58
60
|
var ColorHelper = require("color");
|
|
59
61
|
var scrollIntoView = require("scroll-into-view-if-needed");
|
|
@@ -67,6 +69,7 @@ var pathToRegexp = require("path-to-regexp");
|
|
|
67
69
|
var cookie = require("cookie");
|
|
68
70
|
var httpProxy = require("http-proxy");
|
|
69
71
|
var setCookieParser = require("set-cookie-parser");
|
|
72
|
+
var constants = require("./constants.cjs.js");
|
|
70
73
|
var uuid = require("uuid");
|
|
71
74
|
var ipsum = require("corporate-ipsum");
|
|
72
75
|
function _interopDefaultLegacy(e) {
|
|
@@ -103,6 +106,43 @@ var createEmotionServer__default = /* @__PURE__ */ _interopDefaultLegacy(createE
|
|
|
103
106
|
var NextDocument__default = /* @__PURE__ */ _interopDefaultLegacy(NextDocument);
|
|
104
107
|
var Cors__default = /* @__PURE__ */ _interopDefaultLegacy(Cors);
|
|
105
108
|
var ipsum__default = /* @__PURE__ */ _interopDefaultLegacy(ipsum);
|
|
109
|
+
function is(x, y) {
|
|
110
|
+
if (x === y)
|
|
111
|
+
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
112
|
+
return x !== x && y !== y;
|
|
113
|
+
}
|
|
114
|
+
const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
|
|
115
|
+
const shallowEqual = (a, b) => {
|
|
116
|
+
if (is(a, b))
|
|
117
|
+
return true;
|
|
118
|
+
if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
|
|
119
|
+
return false;
|
|
120
|
+
const keysA = Object.keys(a);
|
|
121
|
+
const keysB = Object.keys(b);
|
|
122
|
+
if (keysA.length !== keysB.length)
|
|
123
|
+
return false;
|
|
124
|
+
for (let i = 0; i < keysA.length; i += 1) {
|
|
125
|
+
if (!hasOwnProperty$1.call(b, keysA[i]) || !is(a[keysA[i]], b[keysA[i]]))
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
return true;
|
|
129
|
+
};
|
|
130
|
+
const { hasOwnProperty } = Object.prototype;
|
|
131
|
+
const deepEqual = (a, b) => {
|
|
132
|
+
if (shallowEqual(a, b))
|
|
133
|
+
return true;
|
|
134
|
+
if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
|
|
135
|
+
return false;
|
|
136
|
+
const keysA = Object.keys(a);
|
|
137
|
+
const keysB = Object.keys(b);
|
|
138
|
+
if (keysA.length !== keysB.length)
|
|
139
|
+
return false;
|
|
140
|
+
for (let i = 0; i < keysA.length; i += 1) {
|
|
141
|
+
if (!hasOwnProperty.call(b, keysA[i]) || !deepEqual(a[keysA[i]], b[keysA[i]]))
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
return true;
|
|
145
|
+
};
|
|
106
146
|
const SCRIPT_TAG = "script";
|
|
107
147
|
function BodySnippet({
|
|
108
148
|
code,
|
|
@@ -147,43 +187,6 @@ function BodySnippet({
|
|
|
147
187
|
}, [code, cleanup]);
|
|
148
188
|
return null;
|
|
149
189
|
}
|
|
150
|
-
function is(x, y) {
|
|
151
|
-
if (x === y)
|
|
152
|
-
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
153
|
-
return x !== x && y !== y;
|
|
154
|
-
}
|
|
155
|
-
const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
|
|
156
|
-
const shallowEqual = (a, b) => {
|
|
157
|
-
if (is(a, b))
|
|
158
|
-
return true;
|
|
159
|
-
if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
|
|
160
|
-
return false;
|
|
161
|
-
const keysA = Object.keys(a);
|
|
162
|
-
const keysB = Object.keys(b);
|
|
163
|
-
if (keysA.length !== keysB.length)
|
|
164
|
-
return false;
|
|
165
|
-
for (let i = 0; i < keysA.length; i += 1) {
|
|
166
|
-
if (!hasOwnProperty$1.call(b, keysA[i]) || !is(a[keysA[i]], b[keysA[i]]))
|
|
167
|
-
return false;
|
|
168
|
-
}
|
|
169
|
-
return true;
|
|
170
|
-
};
|
|
171
|
-
const { hasOwnProperty } = Object.prototype;
|
|
172
|
-
const deepEqual = (a, b) => {
|
|
173
|
-
if (shallowEqual(a, b))
|
|
174
|
-
return true;
|
|
175
|
-
if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
|
|
176
|
-
return false;
|
|
177
|
-
const keysA = Object.keys(a);
|
|
178
|
-
const keysB = Object.keys(b);
|
|
179
|
-
if (keysA.length !== keysB.length)
|
|
180
|
-
return false;
|
|
181
|
-
for (let i = 0; i < keysA.length; i += 1) {
|
|
182
|
-
if (!hasOwnProperty.call(b, keysA[i]) || !deepEqual(a[keysA[i]], b[keysA[i]]))
|
|
183
|
-
return false;
|
|
184
|
-
}
|
|
185
|
-
return true;
|
|
186
|
-
};
|
|
187
190
|
function getInitialState(serializedState = {
|
|
188
191
|
Swatch: [],
|
|
189
192
|
File: [],
|
|
@@ -770,7 +773,7 @@ function Page$1({
|
|
|
770
773
|
return null;
|
|
771
774
|
}))]
|
|
772
775
|
}), /* @__PURE__ */ jsxRuntime.jsx(DocumentReference, {
|
|
773
|
-
documentReference:
|
|
776
|
+
documentReference: reactPage.createDocumentReference(page.id)
|
|
774
777
|
}), filteredSnippets.filter((snippet) => snippet.location === SnippetLocation.Body).map((snippet) => /* @__PURE__ */ jsxRuntime.jsx(BodySnippet, {
|
|
775
778
|
code: snippet.code,
|
|
776
779
|
cleanup: snippet.cleanup
|
|
@@ -834,7 +837,7 @@ Received "${apiKey}" instead.`);
|
|
|
834
837
|
async introspect(element) {
|
|
835
838
|
var _a;
|
|
836
839
|
const runtime = (_a = this.runtime) != null ? _a : ReactRuntime;
|
|
837
|
-
const descriptors
|
|
840
|
+
const descriptors = reactPage.getPropControllerDescriptors(runtime.store.getState());
|
|
838
841
|
const swatchIds = /* @__PURE__ */ new Set();
|
|
839
842
|
const fileIds = /* @__PURE__ */ new Set();
|
|
840
843
|
const typographyIds = /* @__PURE__ */ new Set();
|
|
@@ -847,26 +850,26 @@ Received "${apiKey}" instead.`);
|
|
|
847
850
|
while (current = remaining.pop()) {
|
|
848
851
|
let getResourcesFromElementDescriptors = function(elementDescriptors2, props) {
|
|
849
852
|
Object.entries(elementDescriptors2).forEach(([propName, descriptor]) => {
|
|
850
|
-
|
|
853
|
+
reactPage.getElementSwatchIds(descriptor, props[propName]).forEach((swatchId) => {
|
|
851
854
|
swatchIds.add(swatchId);
|
|
852
855
|
});
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
856
|
+
reactPage.getFileIds(descriptor, props[propName]).forEach((fileId) => fileIds.add(fileId));
|
|
857
|
+
reactPage.getTypographyIds(descriptor, props[propName]).forEach((typographyId) => typographyIds.add(typographyId));
|
|
858
|
+
reactPage.getTableIds(descriptor, props[propName]).forEach((tableId) => tableIds.add(tableId));
|
|
859
|
+
reactPage.getPageIds(descriptor, props[propName]).forEach((pageId) => pageIds.add(pageId));
|
|
860
|
+
reactPage.getElementChildren(descriptor, props[propName]).forEach((child) => {
|
|
858
861
|
if (!seen.has(child.key)) {
|
|
859
862
|
seen.add(child.key);
|
|
860
863
|
remaining.push(child);
|
|
861
864
|
}
|
|
862
865
|
});
|
|
863
|
-
if (descriptor.type ===
|
|
866
|
+
if (descriptor.type === reactPage.ShapeControlType) {
|
|
864
867
|
const prop = props[propName];
|
|
865
868
|
if (prop == null)
|
|
866
869
|
return;
|
|
867
870
|
getResourcesFromElementDescriptors(descriptor.config.type, prop);
|
|
868
871
|
}
|
|
869
|
-
if (descriptor.type ===
|
|
872
|
+
if (descriptor.type === reactPage.ListControlType) {
|
|
870
873
|
const prop = props[propName];
|
|
871
874
|
if (prop == null)
|
|
872
875
|
return;
|
|
@@ -874,13 +877,13 @@ Received "${apiKey}" instead.`);
|
|
|
874
877
|
getResourcesFromElementDescriptors({ propName: descriptor.config.type }, { propName: item.value });
|
|
875
878
|
});
|
|
876
879
|
}
|
|
877
|
-
if (descriptor.type ===
|
|
880
|
+
if (descriptor.type === reactPage.Types.Shape) {
|
|
878
881
|
const prop = props[propName];
|
|
879
882
|
if (prop == null)
|
|
880
883
|
return;
|
|
881
884
|
getResourcesFromElementDescriptors(descriptor.options.type, prop);
|
|
882
885
|
}
|
|
883
|
-
if (descriptor.type ===
|
|
886
|
+
if (descriptor.type === reactPage.Types.List) {
|
|
884
887
|
const prop = props[propName];
|
|
885
888
|
if (prop == null)
|
|
886
889
|
return;
|
|
@@ -891,7 +894,7 @@ Received "${apiKey}" instead.`);
|
|
|
891
894
|
});
|
|
892
895
|
};
|
|
893
896
|
let element2;
|
|
894
|
-
if (
|
|
897
|
+
if (reactPage.isElementReference(current)) {
|
|
895
898
|
const globalElement = await this.getGlobalElement(current.value);
|
|
896
899
|
globalElements.set(current.value, globalElement);
|
|
897
900
|
const elementData = globalElement == null ? void 0 : globalElement.data;
|
|
@@ -901,7 +904,7 @@ Received "${apiKey}" instead.`);
|
|
|
901
904
|
} else {
|
|
902
905
|
element2 = current;
|
|
903
906
|
}
|
|
904
|
-
const elementDescriptors = descriptors
|
|
907
|
+
const elementDescriptors = descriptors.get(element2.type);
|
|
905
908
|
if (elementDescriptors == null)
|
|
906
909
|
continue;
|
|
907
910
|
getResourcesFromElementDescriptors(elementDescriptors, element2.props);
|
|
@@ -1159,7 +1162,7 @@ async function fonts(_req, res, { getFonts } = {}) {
|
|
|
1159
1162
|
const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
|
|
1160
1163
|
return res.json(fonts2);
|
|
1161
1164
|
}
|
|
1162
|
-
const version = "0.8.
|
|
1165
|
+
const version = "0.8.11";
|
|
1163
1166
|
async function handler(req, res, { apiKey }) {
|
|
1164
1167
|
if (req.query.secret !== apiKey) {
|
|
1165
1168
|
return res.status(401).json({ message: "Unauthorized" });
|
|
@@ -1453,13 +1456,13 @@ function registerComponent$c(runtime) {
|
|
|
1453
1456
|
type: constants.MakeswiftComponentType.Box,
|
|
1454
1457
|
label: "Box",
|
|
1455
1458
|
props: {
|
|
1456
|
-
id:
|
|
1457
|
-
backgrounds:
|
|
1458
|
-
width:
|
|
1459
|
-
format:
|
|
1459
|
+
id: reactPage.ElementID(),
|
|
1460
|
+
backgrounds: reactPage.Backgrounds(),
|
|
1461
|
+
width: reactPage.Width({
|
|
1462
|
+
format: reactPage.Width.Format.ClassName,
|
|
1460
1463
|
defaultValue: { value: 100, unit: "%" }
|
|
1461
1464
|
}),
|
|
1462
|
-
height:
|
|
1465
|
+
height: reactPage.ResponsiveIconRadioGroup({
|
|
1463
1466
|
label: "Height",
|
|
1464
1467
|
options: [
|
|
1465
1468
|
{ value: "auto", label: "Auto", icon: "HeightAuto16" },
|
|
@@ -1467,7 +1470,7 @@ function registerComponent$c(runtime) {
|
|
|
1467
1470
|
],
|
|
1468
1471
|
defaultValue: "auto"
|
|
1469
1472
|
}),
|
|
1470
|
-
verticalAlign:
|
|
1473
|
+
verticalAlign: reactPage.ResponsiveIconRadioGroup({
|
|
1471
1474
|
label: "Align items",
|
|
1472
1475
|
options: [
|
|
1473
1476
|
{ value: "flex-start", label: "Top", icon: "VerticalAlignStart16" },
|
|
@@ -1481,9 +1484,9 @@ function registerComponent$c(runtime) {
|
|
|
1481
1484
|
],
|
|
1482
1485
|
defaultValue: "flex-start"
|
|
1483
1486
|
}),
|
|
1484
|
-
margin:
|
|
1485
|
-
padding:
|
|
1486
|
-
format:
|
|
1487
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName }),
|
|
1488
|
+
padding: reactPage.Padding({
|
|
1489
|
+
format: reactPage.Padding.Format.ClassName,
|
|
1487
1490
|
preset: [
|
|
1488
1491
|
{
|
|
1489
1492
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -1496,16 +1499,16 @@ function registerComponent$c(runtime) {
|
|
|
1496
1499
|
}
|
|
1497
1500
|
]
|
|
1498
1501
|
}),
|
|
1499
|
-
border:
|
|
1500
|
-
borderRadius:
|
|
1501
|
-
boxShadow:
|
|
1502
|
-
rowGap:
|
|
1502
|
+
border: reactPage.Border({ format: reactPage.Border.Format.ClassName }),
|
|
1503
|
+
borderRadius: reactPage.BorderRadius({ format: reactPage.BorderRadius.Format.ClassName }),
|
|
1504
|
+
boxShadow: reactPage.Shadows({ format: reactPage.Shadows.Format.ClassName }),
|
|
1505
|
+
rowGap: reactPage.GapY((props) => ({
|
|
1503
1506
|
hidden: props.children == null
|
|
1504
1507
|
})),
|
|
1505
|
-
columnGap:
|
|
1508
|
+
columnGap: reactPage.GapX((props) => ({
|
|
1506
1509
|
hidden: props.children == null
|
|
1507
1510
|
})),
|
|
1508
|
-
boxAnimateType:
|
|
1511
|
+
boxAnimateType: reactPage.ResponsiveSelect({
|
|
1509
1512
|
label: "Animate box in",
|
|
1510
1513
|
labelOrientation: "vertical",
|
|
1511
1514
|
options: [
|
|
@@ -1521,7 +1524,7 @@ function registerComponent$c(runtime) {
|
|
|
1521
1524
|
],
|
|
1522
1525
|
defaultValue: "none"
|
|
1523
1526
|
}),
|
|
1524
|
-
boxAnimateDuration:
|
|
1527
|
+
boxAnimateDuration: reactPage.ResponsiveNumber((props, device) => ({
|
|
1525
1528
|
label: "Box duration",
|
|
1526
1529
|
defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
|
|
1527
1530
|
min: 0.1,
|
|
@@ -1529,7 +1532,7 @@ function registerComponent$c(runtime) {
|
|
|
1529
1532
|
suffix: "s",
|
|
1530
1533
|
hidden: isHiddenBasedOnBoxAnimation(props, device)
|
|
1531
1534
|
})),
|
|
1532
|
-
boxAnimateDelay:
|
|
1535
|
+
boxAnimateDelay: reactPage.ResponsiveNumber((props, device) => ({
|
|
1533
1536
|
label: "Box delay",
|
|
1534
1537
|
defaultValue: DEFAULT_BOX_ANIMATE_DELAY,
|
|
1535
1538
|
min: 0,
|
|
@@ -1537,7 +1540,7 @@ function registerComponent$c(runtime) {
|
|
|
1537
1540
|
suffix: "s",
|
|
1538
1541
|
hidden: isHiddenBasedOnBoxAnimation(props, device)
|
|
1539
1542
|
})),
|
|
1540
|
-
itemAnimateType:
|
|
1543
|
+
itemAnimateType: reactPage.ResponsiveSelect({
|
|
1541
1544
|
label: "Animate items in",
|
|
1542
1545
|
labelOrientation: "vertical",
|
|
1543
1546
|
options: [
|
|
@@ -1553,7 +1556,7 @@ function registerComponent$c(runtime) {
|
|
|
1553
1556
|
],
|
|
1554
1557
|
defaultValue: "none"
|
|
1555
1558
|
}),
|
|
1556
|
-
itemAnimateDuration:
|
|
1559
|
+
itemAnimateDuration: reactPage.ResponsiveNumber((props, device) => ({
|
|
1557
1560
|
label: "Items duration",
|
|
1558
1561
|
defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
|
|
1559
1562
|
min: 0.1,
|
|
@@ -1561,7 +1564,7 @@ function registerComponent$c(runtime) {
|
|
|
1561
1564
|
suffix: "s",
|
|
1562
1565
|
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1563
1566
|
})),
|
|
1564
|
-
itemAnimateDelay:
|
|
1567
|
+
itemAnimateDelay: reactPage.ResponsiveNumber((props, device) => ({
|
|
1565
1568
|
label: "Items delay",
|
|
1566
1569
|
defaultValue: DEFAULT_ITEM_ANIMATE_DELAY,
|
|
1567
1570
|
min: 0,
|
|
@@ -1569,7 +1572,7 @@ function registerComponent$c(runtime) {
|
|
|
1569
1572
|
suffix: "s",
|
|
1570
1573
|
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1571
1574
|
})),
|
|
1572
|
-
itemStaggerDuration:
|
|
1575
|
+
itemStaggerDuration: reactPage.ResponsiveNumber((props, device) => ({
|
|
1573
1576
|
label: "Stagger",
|
|
1574
1577
|
min: 0,
|
|
1575
1578
|
step: 0.05,
|
|
@@ -1577,11 +1580,11 @@ function registerComponent$c(runtime) {
|
|
|
1577
1580
|
defaultValue: DEFAULT_ITEM_STAGGER_DURATION,
|
|
1578
1581
|
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1579
1582
|
})),
|
|
1580
|
-
hidePlaceholder:
|
|
1583
|
+
hidePlaceholder: reactPage.Checkbox((props) => ({
|
|
1581
1584
|
label: "Hide placeholder",
|
|
1582
1585
|
hidden: props.children != null
|
|
1583
1586
|
})),
|
|
1584
|
-
children:
|
|
1587
|
+
children: reactPage.Grid()
|
|
1585
1588
|
}
|
|
1586
1589
|
});
|
|
1587
1590
|
}
|
|
@@ -1592,9 +1595,9 @@ function registerComponent$b(runtime) {
|
|
|
1592
1595
|
type: constants.MakeswiftComponentType.Button,
|
|
1593
1596
|
label: "Button",
|
|
1594
1597
|
props: {
|
|
1595
|
-
id:
|
|
1596
|
-
children:
|
|
1597
|
-
link:
|
|
1598
|
+
id: reactPage.ElementID(),
|
|
1599
|
+
children: reactPage.TextInput({ placeholder: "Button text" }),
|
|
1600
|
+
link: reactPage.Link({
|
|
1598
1601
|
defaultValue: {
|
|
1599
1602
|
type: "OPEN_PAGE",
|
|
1600
1603
|
payload: {
|
|
@@ -1603,7 +1606,7 @@ function registerComponent$b(runtime) {
|
|
|
1603
1606
|
}
|
|
1604
1607
|
}
|
|
1605
1608
|
}),
|
|
1606
|
-
variant:
|
|
1609
|
+
variant: reactPage.ResponsiveSelect({
|
|
1607
1610
|
label: "Style",
|
|
1608
1611
|
labelOrientation: "horizontal",
|
|
1609
1612
|
options: [
|
|
@@ -1617,7 +1620,7 @@ function registerComponent$b(runtime) {
|
|
|
1617
1620
|
],
|
|
1618
1621
|
defaultValue: "flat"
|
|
1619
1622
|
}),
|
|
1620
|
-
shape:
|
|
1623
|
+
shape: reactPage.ResponsiveIconRadioGroup({
|
|
1621
1624
|
label: "Shape",
|
|
1622
1625
|
options: [
|
|
1623
1626
|
{ label: "Pill", value: "pill", icon: "ButtonPill16" },
|
|
@@ -1626,7 +1629,7 @@ function registerComponent$b(runtime) {
|
|
|
1626
1629
|
],
|
|
1627
1630
|
defaultValue: "rounded"
|
|
1628
1631
|
}),
|
|
1629
|
-
size:
|
|
1632
|
+
size: reactPage.ResponsiveIconRadioGroup({
|
|
1630
1633
|
label: "Size",
|
|
1631
1634
|
options: [
|
|
1632
1635
|
{ label: "Small", value: "small", icon: "SizeSmall16" },
|
|
@@ -1635,19 +1638,19 @@ function registerComponent$b(runtime) {
|
|
|
1635
1638
|
],
|
|
1636
1639
|
defaultValue: "medium"
|
|
1637
1640
|
}),
|
|
1638
|
-
color:
|
|
1641
|
+
color: reactPage.ResponsiveColor((props, device) => {
|
|
1639
1642
|
var _a;
|
|
1640
1643
|
const variant = props.variant;
|
|
1641
1644
|
const hidden = ((_a = state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), variant, device)) == null ? void 0 : _a.value) === "clear";
|
|
1642
1645
|
return { placeholder: "black", hidden };
|
|
1643
1646
|
}),
|
|
1644
|
-
textColor:
|
|
1647
|
+
textColor: reactPage.ResponsiveColor({
|
|
1645
1648
|
label: "Text color",
|
|
1646
1649
|
placeholder: "white"
|
|
1647
1650
|
}),
|
|
1648
|
-
textStyle:
|
|
1649
|
-
width:
|
|
1650
|
-
margin:
|
|
1651
|
+
textStyle: reactPage.TextStyle(),
|
|
1652
|
+
width: reactPage.Width(),
|
|
1653
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName })
|
|
1651
1654
|
}
|
|
1652
1655
|
});
|
|
1653
1656
|
}
|
|
@@ -1659,20 +1662,20 @@ function registerComponent$a(runtime) {
|
|
|
1659
1662
|
label: "Carousel",
|
|
1660
1663
|
icon: "Carousel40",
|
|
1661
1664
|
props: {
|
|
1662
|
-
id:
|
|
1663
|
-
images:
|
|
1665
|
+
id: reactPage.ElementID(),
|
|
1666
|
+
images: reactPage.Images({
|
|
1664
1667
|
preset: [
|
|
1665
1668
|
{ key: uuid.v4(), props: {} },
|
|
1666
1669
|
{ key: uuid.v4(), props: {} },
|
|
1667
1670
|
{ key: uuid.v4(), props: {} }
|
|
1668
1671
|
]
|
|
1669
1672
|
}),
|
|
1670
|
-
width:
|
|
1671
|
-
format:
|
|
1673
|
+
width: reactPage.Width({
|
|
1674
|
+
format: reactPage.Width.Format.ClassName,
|
|
1672
1675
|
defaultValue: { value: 400, unit: "px" }
|
|
1673
1676
|
}),
|
|
1674
|
-
margin:
|
|
1675
|
-
pageSize:
|
|
1677
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName }),
|
|
1678
|
+
pageSize: reactPage.ResponsiveNumber((props) => {
|
|
1676
1679
|
var _a;
|
|
1677
1680
|
const images = props.images;
|
|
1678
1681
|
const imagesLength = (_a = images == null ? void 0 : images.length) != null ? _a : 0;
|
|
@@ -1684,7 +1687,7 @@ function registerComponent$a(runtime) {
|
|
|
1684
1687
|
step: 1
|
|
1685
1688
|
};
|
|
1686
1689
|
}),
|
|
1687
|
-
step:
|
|
1690
|
+
step: reactPage.ResponsiveNumber((props, device) => {
|
|
1688
1691
|
var _a, _b;
|
|
1689
1692
|
const pageSize = props.pageSize;
|
|
1690
1693
|
const pageSizeValue = (_b = (_a = state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), pageSize, device)) == null ? void 0 : _a.value) != null ? _b : 1;
|
|
@@ -1696,7 +1699,7 @@ function registerComponent$a(runtime) {
|
|
|
1696
1699
|
step: 1
|
|
1697
1700
|
};
|
|
1698
1701
|
}),
|
|
1699
|
-
slideAlignment:
|
|
1702
|
+
slideAlignment: reactPage.ResponsiveIconRadioGroup({
|
|
1700
1703
|
label: "Alignment",
|
|
1701
1704
|
options: [
|
|
1702
1705
|
{ label: "Top", value: "flex-start", icon: "VerticalAlignStart16" },
|
|
@@ -1705,13 +1708,13 @@ function registerComponent$a(runtime) {
|
|
|
1705
1708
|
],
|
|
1706
1709
|
defaultValue: "center"
|
|
1707
1710
|
}),
|
|
1708
|
-
gap:
|
|
1711
|
+
gap: reactPage.GapX({
|
|
1709
1712
|
label: "Gap",
|
|
1710
1713
|
step: 5,
|
|
1711
1714
|
defaultValue: { value: 0, unit: "px" }
|
|
1712
1715
|
}),
|
|
1713
|
-
autoplay:
|
|
1714
|
-
delay:
|
|
1716
|
+
autoplay: reactPage.Checkbox({ label: "Autoplay" }),
|
|
1717
|
+
delay: reactPage.Number((props) => ({
|
|
1715
1718
|
label: "Delay",
|
|
1716
1719
|
preset: 5,
|
|
1717
1720
|
min: 1,
|
|
@@ -1719,8 +1722,8 @@ function registerComponent$a(runtime) {
|
|
|
1719
1722
|
suffix: "seconds",
|
|
1720
1723
|
hidden: !props.autoplay
|
|
1721
1724
|
})),
|
|
1722
|
-
showArrows:
|
|
1723
|
-
arrowPosition:
|
|
1725
|
+
showArrows: reactPage.Checkbox({ preset: true, label: "Show arrows" }),
|
|
1726
|
+
arrowPosition: reactPage.ResponsiveIconRadioGroup((props) => ({
|
|
1724
1727
|
label: "Arrow position",
|
|
1725
1728
|
options: [
|
|
1726
1729
|
{ label: "Inside", value: "inside", icon: "ArrowInside16" },
|
|
@@ -1730,24 +1733,24 @@ function registerComponent$a(runtime) {
|
|
|
1730
1733
|
defaultValue: "inside",
|
|
1731
1734
|
hidden: props.showArrows === false
|
|
1732
1735
|
})),
|
|
1733
|
-
arrowColor:
|
|
1736
|
+
arrowColor: reactPage.ResponsiveColor((props) => ({
|
|
1734
1737
|
label: "Arrow color",
|
|
1735
1738
|
placeholder: "black",
|
|
1736
1739
|
hidden: props.showArrows === false
|
|
1737
1740
|
})),
|
|
1738
|
-
arrowBackground:
|
|
1741
|
+
arrowBackground: reactPage.ResponsiveColor((props) => ({
|
|
1739
1742
|
label: "Arrow background",
|
|
1740
1743
|
placeholder: "white",
|
|
1741
1744
|
hidden: props.showArrows === false
|
|
1742
1745
|
})),
|
|
1743
|
-
showDots:
|
|
1744
|
-
dotColor:
|
|
1746
|
+
showDots: reactPage.Checkbox({ preset: true, label: "Show dots" }),
|
|
1747
|
+
dotColor: reactPage.ResponsiveColor((props) => ({
|
|
1745
1748
|
label: "Dot color",
|
|
1746
1749
|
placeholder: "black",
|
|
1747
1750
|
hidden: props.showDots === false
|
|
1748
1751
|
})),
|
|
1749
|
-
slideBorder:
|
|
1750
|
-
slideBorderRadius:
|
|
1752
|
+
slideBorder: reactPage.Border({ format: reactPage.Border.Format.ClassName }),
|
|
1753
|
+
slideBorderRadius: reactPage.BorderRadius({ format: reactPage.BorderRadius.Format.ClassName })
|
|
1751
1754
|
}
|
|
1752
1755
|
});
|
|
1753
1756
|
}
|
|
@@ -1759,11 +1762,11 @@ function registerComponent$9(runtime) {
|
|
|
1759
1762
|
label: "Countdown",
|
|
1760
1763
|
icon: "Countdown40",
|
|
1761
1764
|
props: {
|
|
1762
|
-
id:
|
|
1763
|
-
date:
|
|
1765
|
+
id: reactPage.ElementID(),
|
|
1766
|
+
date: reactPage.Date(() => ({
|
|
1764
1767
|
preset: new Date(Date.now() + 1e3 * 60 * 60 * 24 * 2).toISOString()
|
|
1765
1768
|
})),
|
|
1766
|
-
variant:
|
|
1769
|
+
variant: reactPage.ResponsiveIconRadioGroup({
|
|
1767
1770
|
label: "Style",
|
|
1768
1771
|
options: [
|
|
1769
1772
|
{ label: "Filled", value: "filled", icon: "CountdownSolid16" },
|
|
@@ -1782,7 +1785,7 @@ function registerComponent$9(runtime) {
|
|
|
1782
1785
|
],
|
|
1783
1786
|
defaultValue: "filled"
|
|
1784
1787
|
}),
|
|
1785
|
-
shape:
|
|
1788
|
+
shape: reactPage.ResponsiveIconRadioGroup({
|
|
1786
1789
|
label: "Shape",
|
|
1787
1790
|
options: [
|
|
1788
1791
|
{ label: "Pill", value: "pill", icon: "ButtonPill16" },
|
|
@@ -1791,7 +1794,7 @@ function registerComponent$9(runtime) {
|
|
|
1791
1794
|
],
|
|
1792
1795
|
defaultValue: "rounded"
|
|
1793
1796
|
}),
|
|
1794
|
-
size:
|
|
1797
|
+
size: reactPage.ResponsiveIconRadioGroup({
|
|
1795
1798
|
label: "Size",
|
|
1796
1799
|
options: [
|
|
1797
1800
|
{ label: "Small", value: "small", icon: "SizeSmall16" },
|
|
@@ -1800,7 +1803,7 @@ function registerComponent$9(runtime) {
|
|
|
1800
1803
|
],
|
|
1801
1804
|
defaultValue: "medium"
|
|
1802
1805
|
}),
|
|
1803
|
-
gap:
|
|
1806
|
+
gap: reactPage.GapX({
|
|
1804
1807
|
preset: [
|
|
1805
1808
|
{
|
|
1806
1809
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -1813,32 +1816,32 @@ function registerComponent$9(runtime) {
|
|
|
1813
1816
|
max: 100,
|
|
1814
1817
|
defaultValue: { value: 0, unit: "px" }
|
|
1815
1818
|
}),
|
|
1816
|
-
numberFont:
|
|
1817
|
-
numberColor:
|
|
1819
|
+
numberFont: reactPage.Font({ label: "Number font" }),
|
|
1820
|
+
numberColor: reactPage.ResponsiveColor({
|
|
1818
1821
|
label: "Number color",
|
|
1819
1822
|
placeholder: "white"
|
|
1820
1823
|
}),
|
|
1821
|
-
blockColor:
|
|
1824
|
+
blockColor: reactPage.ResponsiveColor({
|
|
1822
1825
|
label: "Block color",
|
|
1823
1826
|
placeholder: "black"
|
|
1824
1827
|
}),
|
|
1825
|
-
labelFont:
|
|
1826
|
-
labelColor:
|
|
1828
|
+
labelFont: reactPage.Font({ label: "Label font" }),
|
|
1829
|
+
labelColor: reactPage.ResponsiveColor({
|
|
1827
1830
|
label: "Label color",
|
|
1828
1831
|
placeholder: "black"
|
|
1829
1832
|
}),
|
|
1830
|
-
width:
|
|
1831
|
-
format:
|
|
1833
|
+
width: reactPage.Width({
|
|
1834
|
+
format: reactPage.Width.Format.ClassName,
|
|
1832
1835
|
defaultValue: { value: 560, unit: "px" }
|
|
1833
1836
|
}),
|
|
1834
|
-
margin:
|
|
1835
|
-
daysLabel:
|
|
1836
|
-
hoursLabel:
|
|
1837
|
-
minutesLabel:
|
|
1837
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName }),
|
|
1838
|
+
daysLabel: reactPage.TextInput({ label: "Days label", placeholder: "Days" }),
|
|
1839
|
+
hoursLabel: reactPage.TextInput({ label: "Hours label", placeholder: "Hours" }),
|
|
1840
|
+
minutesLabel: reactPage.TextInput({
|
|
1838
1841
|
label: "Minutes label",
|
|
1839
1842
|
placeholder: "Minutes"
|
|
1840
1843
|
}),
|
|
1841
|
-
secondsLabel:
|
|
1844
|
+
secondsLabel: reactPage.TextInput({
|
|
1842
1845
|
label: "Seconds label",
|
|
1843
1846
|
placeholder: "Seconds"
|
|
1844
1847
|
})
|
|
@@ -1853,8 +1856,8 @@ function registerComponent$8(runtime) {
|
|
|
1853
1856
|
label: "Divider",
|
|
1854
1857
|
icon: "Divider40",
|
|
1855
1858
|
props: {
|
|
1856
|
-
id:
|
|
1857
|
-
variant:
|
|
1859
|
+
id: reactPage.ElementID(),
|
|
1860
|
+
variant: reactPage.ResponsiveSelect({
|
|
1858
1861
|
label: "Style",
|
|
1859
1862
|
labelOrientation: "horizontal",
|
|
1860
1863
|
options: [
|
|
@@ -1865,17 +1868,17 @@ function registerComponent$8(runtime) {
|
|
|
1865
1868
|
],
|
|
1866
1869
|
defaultValue: "solid"
|
|
1867
1870
|
}),
|
|
1868
|
-
thickness:
|
|
1871
|
+
thickness: reactPage.ResponsiveLength({
|
|
1869
1872
|
label: "Height",
|
|
1870
1873
|
defaultValue: { value: 1, unit: "px" },
|
|
1871
1874
|
options: [{ value: "px", label: "Pixels", icon: "Px16" }]
|
|
1872
1875
|
}),
|
|
1873
|
-
color:
|
|
1874
|
-
width:
|
|
1875
|
-
format:
|
|
1876
|
+
color: reactPage.ResponsiveColor({ placeholder: "black" }),
|
|
1877
|
+
width: reactPage.Width({
|
|
1878
|
+
format: reactPage.Width.Format.ClassName,
|
|
1876
1879
|
defaultValue: { value: 100, unit: "%" }
|
|
1877
1880
|
}),
|
|
1878
|
-
margin:
|
|
1881
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName })
|
|
1879
1882
|
}
|
|
1880
1883
|
});
|
|
1881
1884
|
}
|
|
@@ -1887,10 +1890,10 @@ function registerComponent$7(runtime) {
|
|
|
1887
1890
|
label: "Embed",
|
|
1888
1891
|
icon: "Code40",
|
|
1889
1892
|
props: {
|
|
1890
|
-
id:
|
|
1891
|
-
html:
|
|
1892
|
-
width:
|
|
1893
|
-
margin:
|
|
1893
|
+
id: reactPage.ElementID(),
|
|
1894
|
+
html: reactPage.TextArea({ label: "Code", rows: 20 }),
|
|
1895
|
+
width: reactPage.Width({ format: reactPage.Width.Format.ClassName }),
|
|
1896
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName })
|
|
1894
1897
|
}
|
|
1895
1898
|
});
|
|
1896
1899
|
}
|
|
@@ -1926,10 +1929,10 @@ function registerComponent$6(runtime) {
|
|
|
1926
1929
|
label: "Form",
|
|
1927
1930
|
icon: "Form40",
|
|
1928
1931
|
props: {
|
|
1929
|
-
id:
|
|
1930
|
-
tableId:
|
|
1931
|
-
fields:
|
|
1932
|
-
submitLink:
|
|
1932
|
+
id: reactPage.ElementID(),
|
|
1933
|
+
tableId: reactPage.Table(),
|
|
1934
|
+
fields: reactPage.TableFormFields(),
|
|
1935
|
+
submitLink: reactPage.Link((props) => ({
|
|
1933
1936
|
label: "Redirect to",
|
|
1934
1937
|
options: [
|
|
1935
1938
|
{ value: "OPEN_PAGE", label: "Open page" },
|
|
@@ -1937,7 +1940,7 @@ function registerComponent$6(runtime) {
|
|
|
1937
1940
|
],
|
|
1938
1941
|
hidden: props.tableId == null
|
|
1939
1942
|
})),
|
|
1940
|
-
gap:
|
|
1943
|
+
gap: reactPage.GapY((props) => ({
|
|
1941
1944
|
preset: [
|
|
1942
1945
|
{
|
|
1943
1946
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -1948,7 +1951,7 @@ function registerComponent$6(runtime) {
|
|
|
1948
1951
|
defaultValue: { value: 0, unit: "px" },
|
|
1949
1952
|
hidden: props.tableId == null
|
|
1950
1953
|
})),
|
|
1951
|
-
shape:
|
|
1954
|
+
shape: reactPage.ResponsiveIconRadioGroup((props) => ({
|
|
1952
1955
|
label: "Shape",
|
|
1953
1956
|
options: [
|
|
1954
1957
|
{ label: "Pill", value: Shapes.PILL, icon: "ButtonPill16" },
|
|
@@ -1958,7 +1961,7 @@ function registerComponent$6(runtime) {
|
|
|
1958
1961
|
defaultValue: Shapes.ROUNDED,
|
|
1959
1962
|
hidden: props.tableId == null
|
|
1960
1963
|
})),
|
|
1961
|
-
size:
|
|
1964
|
+
size: reactPage.ResponsiveIconRadioGroup((props) => ({
|
|
1962
1965
|
label: "Size",
|
|
1963
1966
|
options: [
|
|
1964
1967
|
{ label: "Small", value: Sizes.SMALL, icon: "SizeSmall16" },
|
|
@@ -1968,7 +1971,7 @@ function registerComponent$6(runtime) {
|
|
|
1968
1971
|
defaultValue: Sizes.MEDIUM,
|
|
1969
1972
|
hidden: (props == null ? void 0 : props.tableId) == null
|
|
1970
1973
|
})),
|
|
1971
|
-
contrast:
|
|
1974
|
+
contrast: reactPage.ResponsiveIconRadioGroup((props) => ({
|
|
1972
1975
|
label: "Color",
|
|
1973
1976
|
options: [
|
|
1974
1977
|
{ label: "Light mode", value: Contrasts.LIGHT, icon: "Sun16" },
|
|
@@ -1977,8 +1980,8 @@ function registerComponent$6(runtime) {
|
|
|
1977
1980
|
defaultValue: Contrasts.LIGHT,
|
|
1978
1981
|
hidden: props.tableId == null
|
|
1979
1982
|
})),
|
|
1980
|
-
labelTextStyle:
|
|
1981
|
-
labelTextColor:
|
|
1983
|
+
labelTextStyle: reactPage.TextStyle({ label: "Label text style" }),
|
|
1984
|
+
labelTextColor: reactPage.ResponsiveColor((props, device) => {
|
|
1982
1985
|
const hidden = props.tableId == null;
|
|
1983
1986
|
const responsiveContrast = props.contrast;
|
|
1984
1987
|
const contrast = state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), responsiveContrast, device);
|
|
@@ -1988,23 +1991,23 @@ function registerComponent$6(runtime) {
|
|
|
1988
1991
|
placeholder: (contrast == null ? void 0 : contrast.value) === Contrasts.DARK ? "rgba(255,255,255,0.95)" : "rgba(0,0,0,0.8)"
|
|
1989
1992
|
};
|
|
1990
1993
|
}),
|
|
1991
|
-
submitTextStyle:
|
|
1992
|
-
brandColor:
|
|
1994
|
+
submitTextStyle: reactPage.TextStyle({ label: "Button text style" }),
|
|
1995
|
+
brandColor: reactPage.ResponsiveColor((props) => ({
|
|
1993
1996
|
label: "Button color",
|
|
1994
1997
|
placeholder: "black",
|
|
1995
1998
|
hidden: props.tableId == null
|
|
1996
1999
|
})),
|
|
1997
|
-
submitTextColor:
|
|
2000
|
+
submitTextColor: reactPage.ResponsiveColor((props) => ({
|
|
1998
2001
|
label: "Button text color",
|
|
1999
2002
|
placeholder: "white",
|
|
2000
2003
|
hidden: props.tableId == null
|
|
2001
2004
|
})),
|
|
2002
|
-
submitLabel:
|
|
2005
|
+
submitLabel: reactPage.TextInput((props) => ({
|
|
2003
2006
|
label: "Button label",
|
|
2004
2007
|
placeholder: "Submit",
|
|
2005
2008
|
hidden: props.tableId == null
|
|
2006
2009
|
})),
|
|
2007
|
-
submitVariant:
|
|
2010
|
+
submitVariant: reactPage.ResponsiveSelect((props) => ({
|
|
2008
2011
|
label: "Button style",
|
|
2009
2012
|
options: [
|
|
2010
2013
|
{ value: "flat", label: "Flat" },
|
|
@@ -2018,11 +2021,11 @@ function registerComponent$6(runtime) {
|
|
|
2018
2021
|
defaultValue: "flat",
|
|
2019
2022
|
hidden: props.tableId == null
|
|
2020
2023
|
})),
|
|
2021
|
-
submitWidth:
|
|
2024
|
+
submitWidth: reactPage.ResponsiveLength((props) => ({
|
|
2022
2025
|
label: "Button width",
|
|
2023
2026
|
hidden: props.tableId == null
|
|
2024
2027
|
})),
|
|
2025
|
-
submitAlignment:
|
|
2028
|
+
submitAlignment: reactPage.ResponsiveIconRadioGroup((props) => ({
|
|
2026
2029
|
label: "Button alignment",
|
|
2027
2030
|
options: [
|
|
2028
2031
|
{ label: "Left", value: Alignments.LEFT, icon: "AlignLeft16" },
|
|
@@ -2032,7 +2035,7 @@ function registerComponent$6(runtime) {
|
|
|
2032
2035
|
defaultValue: Alignments.CENTER,
|
|
2033
2036
|
hidden: props.tableId == null
|
|
2034
2037
|
})),
|
|
2035
|
-
width:
|
|
2038
|
+
width: reactPage.Width({
|
|
2036
2039
|
preset: [
|
|
2037
2040
|
{
|
|
2038
2041
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2040,9 +2043,9 @@ function registerComponent$6(runtime) {
|
|
|
2040
2043
|
}
|
|
2041
2044
|
],
|
|
2042
2045
|
defaultValue: { value: 100, unit: "%" },
|
|
2043
|
-
format:
|
|
2046
|
+
format: reactPage.Width.Format.ClassName
|
|
2044
2047
|
}),
|
|
2045
|
-
margin:
|
|
2048
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName })
|
|
2046
2049
|
}
|
|
2047
2050
|
});
|
|
2048
2051
|
}
|
|
@@ -2053,17 +2056,17 @@ function registerComponent$5(runtime) {
|
|
|
2053
2056
|
type: constants.MakeswiftComponentType.Image,
|
|
2054
2057
|
label: "Image",
|
|
2055
2058
|
props: {
|
|
2056
|
-
id:
|
|
2057
|
-
file:
|
|
2058
|
-
altText:
|
|
2059
|
-
link:
|
|
2060
|
-
width:
|
|
2061
|
-
margin:
|
|
2062
|
-
padding:
|
|
2063
|
-
border:
|
|
2064
|
-
borderRadius:
|
|
2065
|
-
boxShadow:
|
|
2066
|
-
opacity:
|
|
2059
|
+
id: reactPage.ElementID(),
|
|
2060
|
+
file: reactPage.Image(),
|
|
2061
|
+
altText: reactPage.TextInput({ label: "Alt text" }),
|
|
2062
|
+
link: reactPage.Link({ label: "On click" }),
|
|
2063
|
+
width: reactPage.Width(),
|
|
2064
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName }),
|
|
2065
|
+
padding: reactPage.Padding({ format: reactPage.Padding.Format.ClassName }),
|
|
2066
|
+
border: reactPage.Border({ format: reactPage.Border.Format.ClassName }),
|
|
2067
|
+
borderRadius: reactPage.BorderRadius({ format: reactPage.BorderRadius.Format.ClassName }),
|
|
2068
|
+
boxShadow: reactPage.Shadows({ format: reactPage.Shadows.Format.ClassName }),
|
|
2069
|
+
opacity: reactPage.ResponsiveOpacity()
|
|
2067
2070
|
}
|
|
2068
2071
|
});
|
|
2069
2072
|
}
|
|
@@ -2075,21 +2078,21 @@ function registerComponent$4(runtime) {
|
|
|
2075
2078
|
label: "Navigation",
|
|
2076
2079
|
icon: "Navigation40",
|
|
2077
2080
|
props: {
|
|
2078
|
-
id:
|
|
2079
|
-
links:
|
|
2080
|
-
linkTextStyle:
|
|
2081
|
+
id: reactPage.ElementID(),
|
|
2082
|
+
links: reactPage.NavigationLinks(),
|
|
2083
|
+
linkTextStyle: reactPage.TextStyle((props) => {
|
|
2081
2084
|
const links = props.links;
|
|
2082
2085
|
return {
|
|
2083
2086
|
label: "Link text style",
|
|
2084
2087
|
hidden: links == null || links.length === 0
|
|
2085
2088
|
};
|
|
2086
2089
|
}),
|
|
2087
|
-
showLogo:
|
|
2088
|
-
logoFile:
|
|
2090
|
+
showLogo: reactPage.Checkbox({ preset: true, label: "Show logo" }),
|
|
2091
|
+
logoFile: reactPage.Image((props) => ({
|
|
2089
2092
|
label: "Logo",
|
|
2090
2093
|
hidden: props.showLogo === false
|
|
2091
2094
|
})),
|
|
2092
|
-
logoWidth:
|
|
2095
|
+
logoWidth: reactPage.ResponsiveLength((props) => ({
|
|
2093
2096
|
preset: [
|
|
2094
2097
|
{
|
|
2095
2098
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2102,15 +2105,15 @@ function registerComponent$4(runtime) {
|
|
|
2102
2105
|
options: [{ value: "px", label: "Pixels", icon: "Px16" }],
|
|
2103
2106
|
hidden: props.showLogo === false
|
|
2104
2107
|
})),
|
|
2105
|
-
logoAltText:
|
|
2108
|
+
logoAltText: reactPage.TextInput((props) => ({
|
|
2106
2109
|
label: "Logo alt text",
|
|
2107
2110
|
hidden: props.showLogo === false
|
|
2108
2111
|
})),
|
|
2109
|
-
logoLink:
|
|
2112
|
+
logoLink: reactPage.Link((props) => ({
|
|
2110
2113
|
label: "Logo on click",
|
|
2111
2114
|
hidden: props.showLogo === false
|
|
2112
2115
|
})),
|
|
2113
|
-
alignment:
|
|
2116
|
+
alignment: reactPage.ResponsiveIconRadioGroup({
|
|
2114
2117
|
label: "Alignment",
|
|
2115
2118
|
options: [
|
|
2116
2119
|
{ label: "Left", value: "flex-start", icon: "AlignLeft16" },
|
|
@@ -2119,7 +2122,7 @@ function registerComponent$4(runtime) {
|
|
|
2119
2122
|
],
|
|
2120
2123
|
defaultValue: "flex-end"
|
|
2121
2124
|
}),
|
|
2122
|
-
gutter:
|
|
2125
|
+
gutter: reactPage.GapX({
|
|
2123
2126
|
preset: [
|
|
2124
2127
|
{
|
|
2125
2128
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2132,14 +2135,14 @@ function registerComponent$4(runtime) {
|
|
|
2132
2135
|
step: 1,
|
|
2133
2136
|
defaultValue: { value: 0, unit: "px" }
|
|
2134
2137
|
}),
|
|
2135
|
-
mobileMenuAnimation:
|
|
2138
|
+
mobileMenuAnimation: reactPage.ResponsiveSelect({
|
|
2136
2139
|
label: "Mobile menu",
|
|
2137
2140
|
options: [
|
|
2138
2141
|
{ value: "coverRight", label: "Cover from right" },
|
|
2139
2142
|
{ value: "coverLeft", label: "Cover from left" }
|
|
2140
2143
|
]
|
|
2141
2144
|
}),
|
|
2142
|
-
mobileMenuOpenIconColor:
|
|
2145
|
+
mobileMenuOpenIconColor: reactPage.ResponsiveColor((props, device) => {
|
|
2143
2146
|
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
2144
2147
|
const hidden = !state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), mobileMenuAnimation, device);
|
|
2145
2148
|
return {
|
|
@@ -2148,7 +2151,7 @@ function registerComponent$4(runtime) {
|
|
|
2148
2151
|
hidden
|
|
2149
2152
|
};
|
|
2150
2153
|
}),
|
|
2151
|
-
mobileMenuCloseIconColor:
|
|
2154
|
+
mobileMenuCloseIconColor: reactPage.ResponsiveColor((props, device) => {
|
|
2152
2155
|
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
2153
2156
|
const hidden = !state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), mobileMenuAnimation, device);
|
|
2154
2157
|
return {
|
|
@@ -2157,7 +2160,7 @@ function registerComponent$4(runtime) {
|
|
|
2157
2160
|
hidden
|
|
2158
2161
|
};
|
|
2159
2162
|
}),
|
|
2160
|
-
mobileMenuBackgroundColor:
|
|
2163
|
+
mobileMenuBackgroundColor: reactPage.ResponsiveColor((props, device) => {
|
|
2161
2164
|
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
2162
2165
|
const hidden = !state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), mobileMenuAnimation, device);
|
|
2163
2166
|
return {
|
|
@@ -2166,11 +2169,11 @@ function registerComponent$4(runtime) {
|
|
|
2166
2169
|
hidden
|
|
2167
2170
|
};
|
|
2168
2171
|
}),
|
|
2169
|
-
width:
|
|
2170
|
-
format:
|
|
2172
|
+
width: reactPage.Width({
|
|
2173
|
+
format: reactPage.Width.Format.ClassName,
|
|
2171
2174
|
defaultValue: { value: 100, unit: "%" }
|
|
2172
2175
|
}),
|
|
2173
|
-
margin:
|
|
2176
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName })
|
|
2174
2177
|
}
|
|
2175
2178
|
});
|
|
2176
2179
|
}
|
|
@@ -2182,10 +2185,10 @@ function registerComponent$3(runtime) {
|
|
|
2182
2185
|
label: "Page",
|
|
2183
2186
|
hidden: true,
|
|
2184
2187
|
props: {
|
|
2185
|
-
children:
|
|
2186
|
-
backgrounds:
|
|
2187
|
-
rowGap:
|
|
2188
|
-
columnGap:
|
|
2188
|
+
children: reactPage.Grid(),
|
|
2189
|
+
backgrounds: reactPage.Backgrounds(),
|
|
2190
|
+
rowGap: reactPage.GapY(),
|
|
2191
|
+
columnGap: reactPage.GapX()
|
|
2189
2192
|
}
|
|
2190
2193
|
});
|
|
2191
2194
|
}
|
|
@@ -2197,8 +2200,8 @@ function registerComponent$2(runtime) {
|
|
|
2197
2200
|
label: "Social Links",
|
|
2198
2201
|
icon: "SocialLinks40",
|
|
2199
2202
|
props: {
|
|
2200
|
-
id:
|
|
2201
|
-
links:
|
|
2203
|
+
id: reactPage.ElementID(),
|
|
2204
|
+
links: reactPage.SocialLinks({
|
|
2202
2205
|
preset: {
|
|
2203
2206
|
links: [
|
|
2204
2207
|
{
|
|
@@ -2217,7 +2220,7 @@ function registerComponent$2(runtime) {
|
|
|
2217
2220
|
openInNewTab: false
|
|
2218
2221
|
}
|
|
2219
2222
|
}),
|
|
2220
|
-
shape:
|
|
2223
|
+
shape: reactPage.ResponsiveIconRadioGroup((props) => {
|
|
2221
2224
|
const links = props.links;
|
|
2222
2225
|
return {
|
|
2223
2226
|
label: "Shape",
|
|
@@ -2231,7 +2234,7 @@ function registerComponent$2(runtime) {
|
|
|
2231
2234
|
hidden: links == null || links.links.length === 0
|
|
2232
2235
|
};
|
|
2233
2236
|
}),
|
|
2234
|
-
size:
|
|
2237
|
+
size: reactPage.ResponsiveIconRadioGroup((props) => {
|
|
2235
2238
|
const links = props.links;
|
|
2236
2239
|
return {
|
|
2237
2240
|
label: "Size",
|
|
@@ -2244,7 +2247,7 @@ function registerComponent$2(runtime) {
|
|
|
2244
2247
|
hidden: links == null || links.links.length === 0
|
|
2245
2248
|
};
|
|
2246
2249
|
}),
|
|
2247
|
-
hoverStyle:
|
|
2250
|
+
hoverStyle: reactPage.ResponsiveSelect((props) => {
|
|
2248
2251
|
const links = props.links;
|
|
2249
2252
|
const hidden = links == null || links.links.length === 0;
|
|
2250
2253
|
return {
|
|
@@ -2260,7 +2263,7 @@ function registerComponent$2(runtime) {
|
|
|
2260
2263
|
hidden
|
|
2261
2264
|
};
|
|
2262
2265
|
}),
|
|
2263
|
-
fill:
|
|
2266
|
+
fill: reactPage.ResponsiveColor((props) => {
|
|
2264
2267
|
const links = props.links;
|
|
2265
2268
|
const hidden = links == null || links.links.length === 0;
|
|
2266
2269
|
return {
|
|
@@ -2268,7 +2271,7 @@ function registerComponent$2(runtime) {
|
|
|
2268
2271
|
hidden
|
|
2269
2272
|
};
|
|
2270
2273
|
}),
|
|
2271
|
-
backgroundColor:
|
|
2274
|
+
backgroundColor: reactPage.ResponsiveColor((props) => {
|
|
2272
2275
|
const links = props.links;
|
|
2273
2276
|
const hidden = links == null || links.links.length === 0;
|
|
2274
2277
|
return {
|
|
@@ -2276,7 +2279,7 @@ function registerComponent$2(runtime) {
|
|
|
2276
2279
|
hidden
|
|
2277
2280
|
};
|
|
2278
2281
|
}),
|
|
2279
|
-
alignment:
|
|
2282
|
+
alignment: reactPage.ResponsiveIconRadioGroup({
|
|
2280
2283
|
label: "Alignment",
|
|
2281
2284
|
options: [
|
|
2282
2285
|
{ label: "flex-start", value: "flex-start", icon: "AlignLeft16" },
|
|
@@ -2285,7 +2288,7 @@ function registerComponent$2(runtime) {
|
|
|
2285
2288
|
],
|
|
2286
2289
|
defaultValue: "center"
|
|
2287
2290
|
}),
|
|
2288
|
-
gutter:
|
|
2291
|
+
gutter: reactPage.GapX({
|
|
2289
2292
|
preset: [
|
|
2290
2293
|
{
|
|
2291
2294
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2298,12 +2301,12 @@ function registerComponent$2(runtime) {
|
|
|
2298
2301
|
step: 1,
|
|
2299
2302
|
defaultValue: { value: 0, unit: "px" }
|
|
2300
2303
|
}),
|
|
2301
|
-
width:
|
|
2302
|
-
format:
|
|
2304
|
+
width: reactPage.Width({
|
|
2305
|
+
format: reactPage.Width.Format.ClassName,
|
|
2303
2306
|
defaultValue: { value: 100, unit: "%" }
|
|
2304
2307
|
}),
|
|
2305
|
-
margin:
|
|
2306
|
-
format:
|
|
2308
|
+
margin: reactPage.Margin({
|
|
2309
|
+
format: reactPage.Margin.Format.ClassName,
|
|
2307
2310
|
preset: [
|
|
2308
2311
|
{
|
|
2309
2312
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2326,8 +2329,8 @@ function registerComponent$1(runtime) {
|
|
|
2326
2329
|
type: constants.MakeswiftComponentType.Text,
|
|
2327
2330
|
label: "Text",
|
|
2328
2331
|
props: {
|
|
2329
|
-
id:
|
|
2330
|
-
text:
|
|
2332
|
+
id: reactPage.ElementID(),
|
|
2333
|
+
text: reactPage.RichText(() => ({
|
|
2331
2334
|
preset: {
|
|
2332
2335
|
document: {
|
|
2333
2336
|
object: "document",
|
|
@@ -2373,8 +2376,8 @@ function registerComponent$1(runtime) {
|
|
|
2373
2376
|
}
|
|
2374
2377
|
}
|
|
2375
2378
|
})),
|
|
2376
|
-
width:
|
|
2377
|
-
format:
|
|
2379
|
+
width: reactPage.Width({
|
|
2380
|
+
format: reactPage.Width.Format.ClassName,
|
|
2378
2381
|
preset: [
|
|
2379
2382
|
{
|
|
2380
2383
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2383,8 +2386,8 @@ function registerComponent$1(runtime) {
|
|
|
2383
2386
|
],
|
|
2384
2387
|
defaultValue: { value: 100, unit: "%" }
|
|
2385
2388
|
}),
|
|
2386
|
-
margin:
|
|
2387
|
-
format:
|
|
2389
|
+
margin: reactPage.Margin({
|
|
2390
|
+
format: reactPage.Margin.Format.ClassName,
|
|
2388
2391
|
preset: [
|
|
2389
2392
|
{
|
|
2390
2393
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2408,14 +2411,14 @@ function registerComponent(runtime) {
|
|
|
2408
2411
|
label: "Video",
|
|
2409
2412
|
icon: "Video40",
|
|
2410
2413
|
props: {
|
|
2411
|
-
id:
|
|
2412
|
-
video:
|
|
2413
|
-
width:
|
|
2414
|
-
format:
|
|
2414
|
+
id: reactPage.ElementID(),
|
|
2415
|
+
video: reactPage.Video({ preset: { controls: true } }),
|
|
2416
|
+
width: reactPage.Width({
|
|
2417
|
+
format: reactPage.Width.Format.ClassName,
|
|
2415
2418
|
defaultValue: { value: 560, unit: "px" }
|
|
2416
2419
|
}),
|
|
2417
|
-
margin:
|
|
2418
|
-
borderRadius:
|
|
2420
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName }),
|
|
2421
|
+
borderRadius: reactPage.BorderRadius({ format: reactPage.BorderRadius.Format.ClassName })
|
|
2419
2422
|
}
|
|
2420
2423
|
});
|
|
2421
2424
|
}
|
|
@@ -2610,12 +2613,12 @@ function mapSideColor(swatches, _d) {
|
|
|
2610
2613
|
return __spreadProps(__spreadValues({}, restOfSide), {
|
|
2611
2614
|
color: color && {
|
|
2612
2615
|
alpha: color.alpha,
|
|
2613
|
-
swatch: swatches.filter(
|
|
2616
|
+
swatch: swatches.filter(reactPage.isNonNullable).find((s) => s && s.id === color.swatchId)
|
|
2614
2617
|
}
|
|
2615
2618
|
});
|
|
2616
2619
|
}
|
|
2617
2620
|
function useBorder(value) {
|
|
2618
|
-
const swatchIds =
|
|
2621
|
+
const swatchIds = reactPage.getBorderSwatchIds(value);
|
|
2619
2622
|
const swatches = useSwatches(swatchIds);
|
|
2620
2623
|
if (value == null)
|
|
2621
2624
|
return null;
|
|
@@ -2640,7 +2643,7 @@ const ShadowDefaultValue = {
|
|
|
2640
2643
|
color: null
|
|
2641
2644
|
};
|
|
2642
2645
|
function useBoxShadow(value) {
|
|
2643
|
-
const swatchIds =
|
|
2646
|
+
const swatchIds = reactPage.getBoxShadowsSwatchIds(value);
|
|
2644
2647
|
const swatches = useSwatches(swatchIds);
|
|
2645
2648
|
if (value == null)
|
|
2646
2649
|
return null;
|
|
@@ -2656,7 +2659,7 @@ function useBoxShadow(value) {
|
|
|
2656
2659
|
return __spreadProps(__spreadValues({}, restOfShadow), {
|
|
2657
2660
|
payload: {
|
|
2658
2661
|
color: color != null ? {
|
|
2659
|
-
swatch: swatches.filter(
|
|
2662
|
+
swatch: swatches.filter(reactPage.isNonNullable).find((s) => s && s.id === color.swatchId),
|
|
2660
2663
|
alpha: color.alpha
|
|
2661
2664
|
} : null,
|
|
2662
2665
|
inset: inset != null ? inset : ShadowDefaultValue.inset,
|
|
@@ -2671,7 +2674,7 @@ function useBoxShadow(value) {
|
|
|
2671
2674
|
});
|
|
2672
2675
|
}
|
|
2673
2676
|
function useResponsiveColor(color) {
|
|
2674
|
-
const swatchIds =
|
|
2677
|
+
const swatchIds = reactPage.getResponsiveColorSwatchIds(color);
|
|
2675
2678
|
const swatches = useSwatches(swatchIds);
|
|
2676
2679
|
if (color == null)
|
|
2677
2680
|
return null;
|
|
@@ -2680,7 +2683,7 @@ function useResponsiveColor(color) {
|
|
|
2680
2683
|
const { swatchId, alpha } = v;
|
|
2681
2684
|
const swatch = swatches.find((s) => s && s.id === swatchId);
|
|
2682
2685
|
return swatch == null ? null : __spreadProps(__spreadValues({}, rest), { value: { swatch, alpha } });
|
|
2683
|
-
}).filter(
|
|
2686
|
+
}).filter(reactPage.isNonNullable);
|
|
2684
2687
|
}
|
|
2685
2688
|
const getIndexes = (spans, index) => {
|
|
2686
2689
|
const flattened = spans.reduce((a, s) => a.concat(s), []);
|
|
@@ -2926,7 +2929,7 @@ const defaultPadding = {
|
|
|
2926
2929
|
};
|
|
2927
2930
|
function useStyleControlCssObject(style, controlDefinition) {
|
|
2928
2931
|
const { properties } = controlDefinition.config;
|
|
2929
|
-
return __spreadValues(__spreadValues({}, properties.includes(
|
|
2932
|
+
return __spreadValues(__spreadValues({}, properties.includes(reactPage.StyleControlProperty.Width) && {
|
|
2930
2933
|
maxWidth: "100%"
|
|
2931
2934
|
}), useResponsiveStyle([
|
|
2932
2935
|
style == null ? void 0 : style.width,
|
|
@@ -2937,19 +2940,19 @@ function useStyleControlCssObject(style, controlDefinition) {
|
|
|
2937
2940
|
style == null ? void 0 : style.textStyle
|
|
2938
2941
|
], ([width, margin, padding, border, borderRadius, textStyle]) => {
|
|
2939
2942
|
var _a, _b, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
2940
|
-
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(
|
|
2943
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(reactPage.StyleControlProperty.Width) && {
|
|
2941
2944
|
width: (_a = widthToString(width)) != null ? _a : "100%"
|
|
2942
|
-
}), properties.includes(
|
|
2945
|
+
}), properties.includes(reactPage.StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(reactPage.StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(reactPage.StyleControlProperty.Border) && {
|
|
2943
2946
|
borderTop: (_b = borderSideToString2(border == null ? void 0 : border.borderTop)) != null ? _b : "0 solid black",
|
|
2944
2947
|
borderRight: (_c2 = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c2 : "0 solid black",
|
|
2945
2948
|
borderBottom: (_d = borderSideToString2(border == null ? void 0 : border.borderBottom)) != null ? _d : "0 solid black",
|
|
2946
2949
|
borderLeft: (_e = borderSideToString2(border == null ? void 0 : border.borderLeft)) != null ? _e : "0 solid black"
|
|
2947
|
-
}), properties.includes(
|
|
2950
|
+
}), properties.includes(reactPage.StyleControlProperty.BorderRadius) && {
|
|
2948
2951
|
borderTopLeftRadius: (_f = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopLeftRadius)) != null ? _f : 0,
|
|
2949
2952
|
borderTopRightRadius: (_g = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopRightRadius)) != null ? _g : 0,
|
|
2950
2953
|
borderBottomRightRadius: (_h = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomRightRadius)) != null ? _h : 0,
|
|
2951
2954
|
borderBottomLeftRadius: (_i = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomLeftRadius)) != null ? _i : 0
|
|
2952
|
-
}), properties.includes(
|
|
2955
|
+
}), properties.includes(reactPage.StyleControlProperty.TextStyle) && __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, (textStyle == null ? void 0 : textStyle.fontFamily) && { fontFamily: `"${textStyle.fontFamily}"` }), (textStyle == null ? void 0 : textStyle.letterSpacing) && { letterSpacing: textStyle.letterSpacing }), (textStyle == null ? void 0 : textStyle.fontSize) && { fontSize: fontSizeToString(textStyle.fontSize) }), (textStyle == null ? void 0 : textStyle.fontWeight) && { fontWeight: textStyle.fontWeight }), {
|
|
2953
2956
|
textTransform: (_j = textStyle == null ? void 0 : textStyle.textTransform) != null ? _j : [],
|
|
2954
2957
|
fontStyle: (_k = textStyle == null ? void 0 : textStyle.fontStyle) != null ? _k : []
|
|
2955
2958
|
}));
|
|
@@ -3034,10 +3037,10 @@ function useComboboxControlValue(data) {
|
|
|
3034
3037
|
}
|
|
3035
3038
|
function useImageControlValue(data, definition) {
|
|
3036
3039
|
var _a;
|
|
3037
|
-
const format = (_a = definition.config.format) != null ? _a :
|
|
3040
|
+
const format = (_a = definition.config.format) != null ? _a : reactPage.ImageControlValueFormat.URL;
|
|
3038
3041
|
const fileId = data != null ? data : null;
|
|
3039
3042
|
const file = useFile(fileId);
|
|
3040
|
-
if (format ===
|
|
3043
|
+
if (format === reactPage.ImageControlValueFormat.URL) {
|
|
3041
3044
|
return file == null ? void 0 : file.publicUrl;
|
|
3042
3045
|
}
|
|
3043
3046
|
if (file == null || file.dimensions == null)
|
|
@@ -3136,12 +3139,12 @@ function useNumber(numberControlData, controlDefinition) {
|
|
|
3136
3139
|
return numberControlData != null ? numberControlData : controlDefinition.config.defaultValue;
|
|
3137
3140
|
}
|
|
3138
3141
|
const Text = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3139
|
-
return require("./index.
|
|
3142
|
+
return require("./index.cjs8.js");
|
|
3140
3143
|
}))));
|
|
3141
3144
|
function useRichText(data, control) {
|
|
3142
3145
|
const textCallbackRef = React.useCallback((handle) => {
|
|
3143
3146
|
var _a;
|
|
3144
|
-
if (
|
|
3147
|
+
if (reactPage.isPropControllersHandle(handle))
|
|
3145
3148
|
(_a = handle == null ? void 0 : handle.setPropControllers) == null ? void 0 : _a.call(handle, control == null ? null : {
|
|
3146
3149
|
text: control
|
|
3147
3150
|
});
|
|
@@ -3152,7 +3155,7 @@ function useRichText(data, control) {
|
|
|
3152
3155
|
});
|
|
3153
3156
|
}
|
|
3154
3157
|
const EditableText = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3155
|
-
return require("./index.
|
|
3158
|
+
return require("./index.cjs9.js");
|
|
3156
3159
|
}))));
|
|
3157
3160
|
const ReadOnlyText = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3158
3161
|
return require("./ReadOnlyTextV2.cjs.js");
|
|
@@ -3163,7 +3166,8 @@ function useRichTextV2(data, control) {
|
|
|
3163
3166
|
text: data,
|
|
3164
3167
|
control
|
|
3165
3168
|
}) : /* @__PURE__ */ jsxRuntime.jsx(ReadOnlyText, {
|
|
3166
|
-
text: data
|
|
3169
|
+
text: data,
|
|
3170
|
+
control
|
|
3167
3171
|
});
|
|
3168
3172
|
}
|
|
3169
3173
|
function useSelectControlValue(data, definition) {
|
|
@@ -3383,25 +3387,25 @@ function ControlValue({
|
|
|
3383
3387
|
parameters: [data, definition],
|
|
3384
3388
|
children: (value) => children(value)
|
|
3385
3389
|
}, definition.type);
|
|
3386
|
-
case
|
|
3390
|
+
case select.SelectControlType:
|
|
3387
3391
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3388
3392
|
hook: useSelectControlValue,
|
|
3389
3393
|
parameters: [data, definition],
|
|
3390
3394
|
children: (value) => children(value)
|
|
3391
3395
|
}, definition.type);
|
|
3392
|
-
case
|
|
3396
|
+
case reactPage.ColorControlType:
|
|
3393
3397
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3394
3398
|
hook: useColorValue,
|
|
3395
3399
|
parameters: [data, definition],
|
|
3396
3400
|
children: (value) => children(value)
|
|
3397
3401
|
}, definition.type);
|
|
3398
|
-
case
|
|
3402
|
+
case reactPage.ImageControlType:
|
|
3399
3403
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3400
3404
|
hook: useImageControlValue,
|
|
3401
3405
|
parameters: [data, definition],
|
|
3402
3406
|
children: (value) => children(value)
|
|
3403
3407
|
}, definition.type);
|
|
3404
|
-
case
|
|
3408
|
+
case reactPage.LinkControlType:
|
|
3405
3409
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3406
3410
|
hook: useLinkControlValue,
|
|
3407
3411
|
parameters: [data, definition],
|
|
@@ -3413,39 +3417,39 @@ function ControlValue({
|
|
|
3413
3417
|
parameters: [data],
|
|
3414
3418
|
children: (value) => children(value)
|
|
3415
3419
|
}, definition.type);
|
|
3416
|
-
case
|
|
3420
|
+
case reactPage.ShapeControlType:
|
|
3417
3421
|
return /* @__PURE__ */ jsxRuntime.jsx(ShapeControlValue, {
|
|
3418
3422
|
definition,
|
|
3419
3423
|
data,
|
|
3420
3424
|
control,
|
|
3421
3425
|
children: (value) => children(value)
|
|
3422
3426
|
});
|
|
3423
|
-
case
|
|
3427
|
+
case reactPage.ListControlType:
|
|
3424
3428
|
return /* @__PURE__ */ jsxRuntime.jsx(ListControlValue, {
|
|
3425
3429
|
definition,
|
|
3426
3430
|
data,
|
|
3427
3431
|
control,
|
|
3428
3432
|
children: (value) => children(value)
|
|
3429
3433
|
});
|
|
3430
|
-
case
|
|
3434
|
+
case reactPage.SlotControlType:
|
|
3431
3435
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3432
3436
|
hook: useSlot,
|
|
3433
3437
|
parameters: [data, control],
|
|
3434
3438
|
children: (value) => children(value)
|
|
3435
3439
|
}, definition.type);
|
|
3436
|
-
case
|
|
3440
|
+
case reactPage.RichTextControlType:
|
|
3437
3441
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3438
3442
|
hook: useRichText,
|
|
3439
3443
|
parameters: [data, control],
|
|
3440
3444
|
children: (value) => children(value)
|
|
3441
3445
|
}, definition.type);
|
|
3442
|
-
case
|
|
3446
|
+
case reactPage.RichTextV2ControlType:
|
|
3443
3447
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3444
3448
|
hook: useRichTextV2,
|
|
3445
3449
|
parameters: [data, control],
|
|
3446
3450
|
children: (value) => children(value)
|
|
3447
3451
|
}, definition.type);
|
|
3448
|
-
case
|
|
3452
|
+
case reactPage.StyleControlType:
|
|
3449
3453
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3450
3454
|
hook: useFormattedStyle,
|
|
3451
3455
|
parameters: [data, definition, control],
|
|
@@ -3481,13 +3485,13 @@ function PropsValue({
|
|
|
3481
3485
|
}) {
|
|
3482
3486
|
var _a;
|
|
3483
3487
|
const store = useStore();
|
|
3484
|
-
const propControllerDescriptorsRef = React.useRef((_a =
|
|
3488
|
+
const propControllerDescriptorsRef = React.useRef((_a = reactPage.getComponentPropControllerDescriptors(store.getState(), element.type)) != null ? _a : {});
|
|
3485
3489
|
const props = element.props;
|
|
3486
3490
|
const documentKey = useDocumentKey();
|
|
3487
3491
|
const propControllers = useSelector((state) => {
|
|
3488
3492
|
if (documentKey == null)
|
|
3489
3493
|
return null;
|
|
3490
|
-
return
|
|
3494
|
+
return reactPage.getPropControllers(state, documentKey, element.key);
|
|
3491
3495
|
});
|
|
3492
3496
|
return Object.entries(propControllerDescriptorsRef.current).reduceRight((renderFn, [propName, descriptor]) => (propsValue) => {
|
|
3493
3497
|
var _a2, _b, _c2, _d;
|
|
@@ -3496,13 +3500,13 @@ function PropsValue({
|
|
|
3496
3500
|
case textInput.NumberControlType:
|
|
3497
3501
|
case textInput.TextInputControlType:
|
|
3498
3502
|
case textInput.TextAreaControlType:
|
|
3499
|
-
case
|
|
3500
|
-
case
|
|
3501
|
-
case
|
|
3503
|
+
case select.SelectControlType:
|
|
3504
|
+
case reactPage.ColorControlType:
|
|
3505
|
+
case reactPage.ImageControlType:
|
|
3502
3506
|
case combobox.ComboboxControlType:
|
|
3503
|
-
case
|
|
3504
|
-
case
|
|
3505
|
-
case
|
|
3507
|
+
case reactPage.ShapeControlType:
|
|
3508
|
+
case reactPage.ListControlType:
|
|
3509
|
+
case reactPage.LinkControlType:
|
|
3506
3510
|
return /* @__PURE__ */ jsxRuntime.jsx(ControlValue, {
|
|
3507
3511
|
definition: descriptor,
|
|
3508
3512
|
data: props[propName],
|
|
@@ -3511,7 +3515,7 @@ function PropsValue({
|
|
|
3511
3515
|
[propName]: value
|
|
3512
3516
|
}))
|
|
3513
3517
|
});
|
|
3514
|
-
case
|
|
3518
|
+
case reactPage.StyleControlType: {
|
|
3515
3519
|
const control = (_a2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _a2 : null;
|
|
3516
3520
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3517
3521
|
hook: useFormattedStyle,
|
|
@@ -3521,7 +3525,7 @@ function PropsValue({
|
|
|
3521
3525
|
}))
|
|
3522
3526
|
}, descriptor.type);
|
|
3523
3527
|
}
|
|
3524
|
-
case
|
|
3528
|
+
case reactPage.RichTextControlType: {
|
|
3525
3529
|
const control = (_b = propControllers == null ? void 0 : propControllers[propName]) != null ? _b : null;
|
|
3526
3530
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3527
3531
|
hook: useRichText,
|
|
@@ -3531,7 +3535,7 @@ function PropsValue({
|
|
|
3531
3535
|
}))
|
|
3532
3536
|
}, descriptor.type);
|
|
3533
3537
|
}
|
|
3534
|
-
case
|
|
3538
|
+
case reactPage.RichTextV2ControlType: {
|
|
3535
3539
|
const control = (_c2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _c2 : null;
|
|
3536
3540
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3537
3541
|
hook: useRichTextV2,
|
|
@@ -3541,7 +3545,7 @@ function PropsValue({
|
|
|
3541
3545
|
}))
|
|
3542
3546
|
}, descriptor.type);
|
|
3543
3547
|
}
|
|
3544
|
-
case
|
|
3548
|
+
case reactPage.SlotControlType: {
|
|
3545
3549
|
const control = (_d = propControllers == null ? void 0 : propControllers[propName]) != null ? _d : null;
|
|
3546
3550
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3547
3551
|
hook: useSlot,
|
|
@@ -3551,9 +3555,9 @@ function PropsValue({
|
|
|
3551
3555
|
}))
|
|
3552
3556
|
}, descriptor.type);
|
|
3553
3557
|
}
|
|
3554
|
-
case
|
|
3558
|
+
case reactPage.Types.Width:
|
|
3555
3559
|
switch (descriptor.options.format) {
|
|
3556
|
-
case
|
|
3560
|
+
case reactPage.WidthPropControllerFormat.ClassName:
|
|
3557
3561
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3558
3562
|
hook: useWidthStyle,
|
|
3559
3563
|
parameters: [props[propName], descriptor],
|
|
@@ -3566,9 +3570,9 @@ function PropsValue({
|
|
|
3566
3570
|
[propName]: props[propName]
|
|
3567
3571
|
}));
|
|
3568
3572
|
}
|
|
3569
|
-
case
|
|
3573
|
+
case reactPage.Types.Padding:
|
|
3570
3574
|
switch (descriptor.options.format) {
|
|
3571
|
-
case
|
|
3575
|
+
case reactPage.PaddingPropControllerFormat.ClassName:
|
|
3572
3576
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3573
3577
|
hook: usePaddingStyle,
|
|
3574
3578
|
parameters: [props[propName]],
|
|
@@ -3581,9 +3585,9 @@ function PropsValue({
|
|
|
3581
3585
|
[propName]: props[propName]
|
|
3582
3586
|
}));
|
|
3583
3587
|
}
|
|
3584
|
-
case
|
|
3588
|
+
case reactPage.Types.Margin:
|
|
3585
3589
|
switch (descriptor.options.format) {
|
|
3586
|
-
case
|
|
3590
|
+
case reactPage.MarginPropControllerFormat.ClassName:
|
|
3587
3591
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3588
3592
|
hook: useMarginStyle,
|
|
3589
3593
|
parameters: [props[propName]],
|
|
@@ -3596,9 +3600,9 @@ function PropsValue({
|
|
|
3596
3600
|
[propName]: props[propName]
|
|
3597
3601
|
}));
|
|
3598
3602
|
}
|
|
3599
|
-
case
|
|
3603
|
+
case reactPage.Types.BorderRadius:
|
|
3600
3604
|
switch (descriptor.options.format) {
|
|
3601
|
-
case
|
|
3605
|
+
case reactPage.BorderRadiusPropControllerFormat.ClassName:
|
|
3602
3606
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3603
3607
|
hook: useBorderRadiusStyle,
|
|
3604
3608
|
parameters: [props[propName]],
|
|
@@ -3611,9 +3615,9 @@ function PropsValue({
|
|
|
3611
3615
|
[propName]: props[propName]
|
|
3612
3616
|
}));
|
|
3613
3617
|
}
|
|
3614
|
-
case
|
|
3618
|
+
case reactPage.Types.Shadows:
|
|
3615
3619
|
switch (descriptor.options.format) {
|
|
3616
|
-
case
|
|
3620
|
+
case reactPage.ShadowsPropControllerFormat.ClassName:
|
|
3617
3621
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3618
3622
|
hook: useShadowsStyle,
|
|
3619
3623
|
parameters: [props[propName]],
|
|
@@ -3626,9 +3630,9 @@ function PropsValue({
|
|
|
3626
3630
|
[propName]: props[propName]
|
|
3627
3631
|
}));
|
|
3628
3632
|
}
|
|
3629
|
-
case
|
|
3633
|
+
case reactPage.Types.Border:
|
|
3630
3634
|
switch (descriptor.options.format) {
|
|
3631
|
-
case
|
|
3635
|
+
case reactPage.BorderPropControllerFormat.ClassName:
|
|
3632
3636
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3633
3637
|
hook: useBorderStyle,
|
|
3634
3638
|
parameters: [props[propName]],
|
|
@@ -3641,7 +3645,7 @@ function PropsValue({
|
|
|
3641
3645
|
[propName]: props[propName]
|
|
3642
3646
|
}));
|
|
3643
3647
|
}
|
|
3644
|
-
case
|
|
3648
|
+
case reactPage.Types.ResponsiveColor:
|
|
3645
3649
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3646
3650
|
hook: useResponsiveColor,
|
|
3647
3651
|
parameters: [props[propName]],
|
|
@@ -3707,7 +3711,7 @@ class ElementImperativeHandle {
|
|
|
3707
3711
|
}
|
|
3708
3712
|
setPropControllers(propControllers) {
|
|
3709
3713
|
const current = this.getCurrent();
|
|
3710
|
-
if (
|
|
3714
|
+
if (reactPage.isPropControllersHandle(current))
|
|
3711
3715
|
current.setPropControllers(propControllers);
|
|
3712
3716
|
this.lastPropControllers = propControllers;
|
|
3713
3717
|
}
|
|
@@ -3729,7 +3733,7 @@ class ReactRuntime {
|
|
|
3729
3733
|
breakpoints
|
|
3730
3734
|
}) {
|
|
3731
3735
|
__publicField(this, "store");
|
|
3732
|
-
this.store =
|
|
3736
|
+
this.store = reactPage.configureStore({
|
|
3733
3737
|
breakpoints: breakpoints ? state_breakpoints.parseBreakpointsInput(breakpoints) : void 0
|
|
3734
3738
|
});
|
|
3735
3739
|
registerBuiltinComponents(this);
|
|
@@ -3753,10 +3757,10 @@ class ReactRuntime {
|
|
|
3753
3757
|
};
|
|
3754
3758
|
}
|
|
3755
3759
|
static copyElementTree(elementTree2, replacementContext) {
|
|
3756
|
-
return
|
|
3760
|
+
return reactPage.copyElementTree(this.store.getState(), elementTree2, replacementContext);
|
|
3757
3761
|
}
|
|
3758
3762
|
static getBreakpoints() {
|
|
3759
|
-
return
|
|
3763
|
+
return reactPage.getBreakpoints(this.store.getState());
|
|
3760
3764
|
}
|
|
3761
3765
|
registerComponent(component, {
|
|
3762
3766
|
type,
|
|
@@ -3777,13 +3781,13 @@ class ReactRuntime {
|
|
|
3777
3781
|
};
|
|
3778
3782
|
}
|
|
3779
3783
|
copyElementTree(elementTree2, replacementContext) {
|
|
3780
|
-
return
|
|
3784
|
+
return reactPage.copyElementTree(this.store.getState(), elementTree2, replacementContext);
|
|
3781
3785
|
}
|
|
3782
3786
|
getBreakpoints() {
|
|
3783
|
-
return
|
|
3787
|
+
return reactPage.getBreakpoints(this.store.getState());
|
|
3784
3788
|
}
|
|
3785
3789
|
}
|
|
3786
|
-
__publicField(ReactRuntime, "store",
|
|
3790
|
+
__publicField(ReactRuntime, "store", reactPage.configureStore());
|
|
3787
3791
|
registerBuiltinComponents(ReactRuntime);
|
|
3788
3792
|
const StoreContext = React.createContext(ReactRuntime.store);
|
|
3789
3793
|
const PreviewProvider = dynamic__default["default"](() => Promise.resolve().then(function() {
|
|
@@ -3832,26 +3836,26 @@ function useSelector(selector) {
|
|
|
3832
3836
|
return withSelector.useSyncExternalStoreWithSelector(store.subscribe, store.getState, store.getState, selector);
|
|
3833
3837
|
}
|
|
3834
3838
|
function useComponent(type) {
|
|
3835
|
-
return useSelector((state) =>
|
|
3839
|
+
return useSelector((state) => reactPage.getReactComponent(state, type));
|
|
3836
3840
|
}
|
|
3837
3841
|
function useElementId(elementKey) {
|
|
3838
3842
|
const documentKey = useDocumentKey();
|
|
3839
|
-
return useSelector((state) => documentKey == null || elementKey == null ? null :
|
|
3843
|
+
return useSelector((state) => documentKey == null || elementKey == null ? null : reactPage.getElementId(state, documentKey, elementKey));
|
|
3840
3844
|
}
|
|
3841
3845
|
function useDocument(documentKey) {
|
|
3842
|
-
return useSelector((state) =>
|
|
3846
|
+
return useSelector((state) => reactPage.getDocument(state, documentKey));
|
|
3843
3847
|
}
|
|
3844
3848
|
function useIsInBuilder() {
|
|
3845
|
-
return useSelector((state) =>
|
|
3849
|
+
return useSelector((state) => reactPage.getIsInBuilder(state));
|
|
3846
3850
|
}
|
|
3847
3851
|
function useIsPreview() {
|
|
3848
|
-
return useSelector((state) =>
|
|
3852
|
+
return useSelector((state) => reactPage.getIsPreview(state));
|
|
3849
3853
|
}
|
|
3850
3854
|
function useBuilderEditMode() {
|
|
3851
|
-
return useSelector((state) =>
|
|
3855
|
+
return useSelector((state) => reactPage.getBuilderEditMode(state));
|
|
3852
3856
|
}
|
|
3853
3857
|
function useBreakpoints() {
|
|
3854
|
-
return useSelector((state) =>
|
|
3858
|
+
return useSelector((state) => reactPage.getBreakpoints(state));
|
|
3855
3859
|
}
|
|
3856
3860
|
function useDispatch() {
|
|
3857
3861
|
const store = React.useContext(StoreContext);
|
|
@@ -3961,7 +3965,7 @@ const Element$1 = React.memo(React.forwardRef(function Element2({
|
|
|
3961
3965
|
}, [dispatch, documentKey, elementKey, isRegisterElementDisabled]);
|
|
3962
3966
|
return /* @__PURE__ */ jsxRuntime.jsx(FindDomNode, {
|
|
3963
3967
|
ref: findDomNodeCallbackRef,
|
|
3964
|
-
children:
|
|
3968
|
+
children: reactPage.isElementReference(element) ? /* @__PURE__ */ jsxRuntime.jsx(ElementReference, {
|
|
3965
3969
|
ref: elementCallbackRef,
|
|
3966
3970
|
elementReference: element
|
|
3967
3971
|
}, elementKey) : /* @__PURE__ */ jsxRuntime.jsx(ElementData, {
|