@makeswift/runtime 0.8.9 → 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 -6
- package/dist/Box.es.js +6 -6
- package/dist/Button.cjs.js +5 -6
- package/dist/Button.cjs.js.map +1 -1
- package/dist/Button.es.js +5 -6
- package/dist/Button.es.js.map +1 -1
- package/dist/Carousel.cjs.js +7 -8
- package/dist/Carousel.cjs.js.map +1 -1
- package/dist/Carousel.es.js +7 -8
- package/dist/Carousel.es.js.map +1 -1
- package/dist/Countdown.cjs.js +5 -6
- package/dist/Countdown.cjs.js.map +1 -1
- package/dist/Countdown.es.js +5 -6
- package/dist/Countdown.es.js.map +1 -1
- package/dist/Divider.cjs.js +5 -6
- package/dist/Divider.cjs.js.map +1 -1
- package/dist/Divider.es.js +5 -6
- package/dist/Divider.es.js.map +1 -1
- package/dist/Embed.cjs.js +7 -7
- package/dist/Embed.cjs.js.map +1 -1
- package/dist/Embed.es.js +7 -7
- package/dist/Form.cjs.js +5 -6
- package/dist/Form.cjs.js.map +1 -1
- package/dist/Form.es.js +6 -7
- package/dist/Form.es.js.map +1 -1
- package/dist/Image.cjs.js +4 -5
- package/dist/Image.cjs.js.map +1 -1
- package/dist/Image.es.js +5 -6
- package/dist/Image.es.js.map +1 -1
- package/dist/LiveProvider.cjs.js +8 -9
- package/dist/LiveProvider.cjs.js.map +1 -1
- package/dist/LiveProvider.es.js +8 -9
- package/dist/LiveProvider.es.js.map +1 -1
- package/dist/Navigation.cjs.js +7 -7
- package/dist/Navigation.cjs.js.map +1 -1
- package/dist/Navigation.es.js +7 -7
- package/dist/PreviewProvider.cjs.js +34 -35
- package/dist/PreviewProvider.cjs.js.map +1 -1
- package/dist/PreviewProvider.es.js +6 -7
- package/dist/PreviewProvider.es.js.map +1 -1
- package/dist/ReadOnlyText.cjs.js +72 -66
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +18 -12
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/ReadOnlyTextV2.cjs.js +362 -0
- package/dist/ReadOnlyTextV2.cjs.js.map +1 -0
- package/dist/ReadOnlyTextV2.es.js +358 -0
- package/dist/ReadOnlyTextV2.es.js.map +1 -0
- package/dist/Root.cjs.js +6 -6
- package/dist/Root.es.js +6 -6
- package/dist/SocialLinks.cjs.js +5 -6
- package/dist/SocialLinks.cjs.js.map +1 -1
- package/dist/SocialLinks.es.js +5 -6
- package/dist/SocialLinks.es.js.map +1 -1
- package/dist/Text.cjs.js +6 -7
- package/dist/Text.cjs.js.map +1 -1
- package/dist/Text.es.js +7 -8
- package/dist/Text.es.js.map +1 -1
- package/dist/Video.cjs.js +5 -6
- package/dist/Video.cjs.js.map +1 -1
- package/dist/Video.es.js +5 -6
- package/dist/Video.es.js.map +1 -1
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js.map +1 -1
- package/dist/builder.cjs.js +6 -2
- package/dist/builder.cjs.js.map +1 -1
- package/dist/builder.es.js +6 -2
- package/dist/builder.es.js.map +1 -1
- package/dist/components.cjs.js +9 -9
- package/dist/components.es.js +9 -9
- 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 +82 -41
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +42 -1
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/controls.cjs.js +58 -53
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +8 -3
- package/dist/controls.es.js.map +1 -1
- package/dist/index.cjs.js +315 -394
- 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 +11 -10
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs5.js +108 -98
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs6.js +41 -42
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs7.js +65 -362
- package/dist/index.cjs7.js.map +1 -1
- package/dist/index.cjs8.js +43 -0
- package/dist/index.cjs8.js.map +1 -0
- package/dist/index.cjs9.js +257 -0
- package/dist/index.cjs9.js.map +1 -0
- package/dist/index.es.js +77 -158
- 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 -4
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es3.js +1 -1
- package/dist/index.es5.js +72 -63
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es6.js +36 -40
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es7.js +66 -358
- package/dist/index.es7.js.map +1 -1
- package/dist/index.es8.js +40 -0
- package/dist/index.es8.js.map +1 -0
- package/dist/index.es9.js +250 -0
- package/dist/index.es9.js.map +1 -0
- package/dist/leaf.cjs.js +4 -4
- package/dist/leaf.cjs.js.map +1 -1
- package/dist/leaf.es.js +2 -2
- package/dist/leaf.es.js.map +1 -1
- package/dist/main.cjs.js +4 -4
- package/dist/main.es.js +4 -4
- package/dist/next.cjs.js +5 -6
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +6 -7
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +10 -7
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +6 -3
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/{descriptors.cjs.js → react-page.cjs.js} +865 -93
- package/dist/react-page.cjs.js.map +1 -0
- package/dist/{descriptors.es.js → react-page.es.js} +811 -92
- package/dist/react-page.es.js.map +1 -0
- package/dist/react.cjs.js +5 -6
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.es.js +5 -6
- 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 +19 -6
- package/dist/slate.cjs.js.map +1 -1
- package/dist/slate.es.js +9 -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 +4 -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 +8 -7
- 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/index.d.ts +0 -1
- package/dist/types/src/controls/rich-text/index.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/rich-text.d.ts +12 -12
- 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 +55 -13
- 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 +7 -6
- package/dist/types/src/controls/shape.d.ts.map +1 -1
- package/dist/types/src/controls/slot.d.ts +18 -9
- package/dist/types/src/controls/slot.d.ts.map +1 -1
- package/dist/types/src/controls/style.d.ts +20 -19
- 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/base.d.ts +7 -0
- package/dist/types/src/prop-controllers/base.d.ts.map +1 -0
- 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 +18 -22
- 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 +13 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/index.d.ts +4 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/index.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/useSyncDOMSelection.d.ts +9 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/useSyncDOMSelection.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts +24 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/index.d.ts +2 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/index.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts +8 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -0
- 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 +7 -0
- package/dist/types/src/slate/BuilderPlugin/index.d.ts.map +1 -0
- package/dist/types/src/slate/InlineModePlugin/index.d.ts +9 -0
- package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -0
- 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 +3 -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/src/{controls/rich-text → slate}/types.d.ts +56 -46
- 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 +43 -42
- 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 +3 -2
- 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 +11 -7
- 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/dist/useIsomorphicLayoutEffect.cjs.js +6 -0
- package/dist/useIsomorphicLayoutEffect.cjs.js.map +1 -0
- package/dist/useIsomorphicLayoutEffect.es.js +5 -0
- package/dist/useIsomorphicLayoutEffect.es.js.map +1 -0
- package/package.json +4 -3
- package/dist/descriptors.cjs.js.map +0 -1
- package/dist/descriptors.es.js.map +0 -1
- package/dist/introspection.cjs.js +0 -331
- package/dist/introspection.cjs.js.map +0 -1
- package/dist/introspection.es.js +0 -317
- package/dist/introspection.es.js.map +0 -1
- package/dist/types/src/controls/rich-text/types.d.ts.map +0 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2.d.ts +0 -15
- package/dist/types/src/runtimes/react/controls/rich-text-v2.d.ts.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -39,28 +39,26 @@ 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
|
-
var slate = require("slate");
|
|
50
48
|
var textInput = require("./text-input.cjs.js");
|
|
51
49
|
var combobox = require("./combobox.cjs.js");
|
|
52
|
-
var
|
|
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");
|
|
53
55
|
var shim = require("use-sync-external-store/shim");
|
|
54
56
|
var redux = require("redux");
|
|
55
57
|
var thunk = require("redux-thunk");
|
|
56
58
|
var types = require("./types.cjs.js");
|
|
57
|
-
var introspection = require("./introspection.cjs.js");
|
|
58
|
-
var state_breakpoints = require("./state/breakpoints.cjs.js");
|
|
59
59
|
var boxModels = require("./box-models.cjs.js");
|
|
60
60
|
var ColorHelper = require("color");
|
|
61
61
|
var scrollIntoView = require("scroll-into-view-if-needed");
|
|
62
|
-
var isHotkey = require("is-hotkey");
|
|
63
|
-
var slateHistory = require("slate-history");
|
|
64
62
|
var reactDom = require("react-dom");
|
|
65
63
|
var parse = require("html-react-parser");
|
|
66
64
|
var Head = require("next/head");
|
|
@@ -71,6 +69,7 @@ var pathToRegexp = require("path-to-regexp");
|
|
|
71
69
|
var cookie = require("cookie");
|
|
72
70
|
var httpProxy = require("http-proxy");
|
|
73
71
|
var setCookieParser = require("set-cookie-parser");
|
|
72
|
+
var constants = require("./constants.cjs.js");
|
|
74
73
|
var uuid = require("uuid");
|
|
75
74
|
var ipsum = require("corporate-ipsum");
|
|
76
75
|
function _interopDefaultLegacy(e) {
|
|
@@ -101,13 +100,49 @@ var dynamic__default = /* @__PURE__ */ _interopDefaultLegacy(dynamic);
|
|
|
101
100
|
var thunk__default = /* @__PURE__ */ _interopDefaultLegacy(thunk);
|
|
102
101
|
var ColorHelper__default = /* @__PURE__ */ _interopDefaultLegacy(ColorHelper);
|
|
103
102
|
var scrollIntoView__default = /* @__PURE__ */ _interopDefaultLegacy(scrollIntoView);
|
|
104
|
-
var isHotkey__default = /* @__PURE__ */ _interopDefaultLegacy(isHotkey);
|
|
105
103
|
var parse__default = /* @__PURE__ */ _interopDefaultLegacy(parse);
|
|
106
104
|
var Head__default = /* @__PURE__ */ _interopDefaultLegacy(Head);
|
|
107
105
|
var createEmotionServer__default = /* @__PURE__ */ _interopDefaultLegacy(createEmotionServer);
|
|
108
106
|
var NextDocument__default = /* @__PURE__ */ _interopDefaultLegacy(NextDocument);
|
|
109
107
|
var Cors__default = /* @__PURE__ */ _interopDefaultLegacy(Cors);
|
|
110
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
|
+
};
|
|
111
146
|
const SCRIPT_TAG = "script";
|
|
112
147
|
function BodySnippet({
|
|
113
148
|
code,
|
|
@@ -152,43 +187,6 @@ function BodySnippet({
|
|
|
152
187
|
}, [code, cleanup]);
|
|
153
188
|
return null;
|
|
154
189
|
}
|
|
155
|
-
function is(x, y) {
|
|
156
|
-
if (x === y)
|
|
157
|
-
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
158
|
-
return x !== x && y !== y;
|
|
159
|
-
}
|
|
160
|
-
const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
|
|
161
|
-
const shallowEqual = (a, b) => {
|
|
162
|
-
if (is(a, b))
|
|
163
|
-
return true;
|
|
164
|
-
if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
|
|
165
|
-
return false;
|
|
166
|
-
const keysA = Object.keys(a);
|
|
167
|
-
const keysB = Object.keys(b);
|
|
168
|
-
if (keysA.length !== keysB.length)
|
|
169
|
-
return false;
|
|
170
|
-
for (let i = 0; i < keysA.length; i += 1) {
|
|
171
|
-
if (!hasOwnProperty$1.call(b, keysA[i]) || !is(a[keysA[i]], b[keysA[i]]))
|
|
172
|
-
return false;
|
|
173
|
-
}
|
|
174
|
-
return true;
|
|
175
|
-
};
|
|
176
|
-
const { hasOwnProperty } = Object.prototype;
|
|
177
|
-
const deepEqual = (a, b) => {
|
|
178
|
-
if (shallowEqual(a, b))
|
|
179
|
-
return true;
|
|
180
|
-
if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
|
|
181
|
-
return false;
|
|
182
|
-
const keysA = Object.keys(a);
|
|
183
|
-
const keysB = Object.keys(b);
|
|
184
|
-
if (keysA.length !== keysB.length)
|
|
185
|
-
return false;
|
|
186
|
-
for (let i = 0; i < keysA.length; i += 1) {
|
|
187
|
-
if (!hasOwnProperty.call(b, keysA[i]) || !deepEqual(a[keysA[i]], b[keysA[i]]))
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
return true;
|
|
191
|
-
};
|
|
192
190
|
function getInitialState(serializedState = {
|
|
193
191
|
Swatch: [],
|
|
194
192
|
File: [],
|
|
@@ -775,7 +773,7 @@ function Page$1({
|
|
|
775
773
|
return null;
|
|
776
774
|
}))]
|
|
777
775
|
}), /* @__PURE__ */ jsxRuntime.jsx(DocumentReference, {
|
|
778
|
-
documentReference:
|
|
776
|
+
documentReference: reactPage.createDocumentReference(page.id)
|
|
779
777
|
}), filteredSnippets.filter((snippet) => snippet.location === SnippetLocation.Body).map((snippet) => /* @__PURE__ */ jsxRuntime.jsx(BodySnippet, {
|
|
780
778
|
code: snippet.code,
|
|
781
779
|
cleanup: snippet.cleanup
|
|
@@ -839,7 +837,7 @@ Received "${apiKey}" instead.`);
|
|
|
839
837
|
async introspect(element) {
|
|
840
838
|
var _a;
|
|
841
839
|
const runtime = (_a = this.runtime) != null ? _a : ReactRuntime;
|
|
842
|
-
const descriptors
|
|
840
|
+
const descriptors = reactPage.getPropControllerDescriptors(runtime.store.getState());
|
|
843
841
|
const swatchIds = /* @__PURE__ */ new Set();
|
|
844
842
|
const fileIds = /* @__PURE__ */ new Set();
|
|
845
843
|
const typographyIds = /* @__PURE__ */ new Set();
|
|
@@ -852,26 +850,26 @@ Received "${apiKey}" instead.`);
|
|
|
852
850
|
while (current = remaining.pop()) {
|
|
853
851
|
let getResourcesFromElementDescriptors = function(elementDescriptors2, props) {
|
|
854
852
|
Object.entries(elementDescriptors2).forEach(([propName, descriptor]) => {
|
|
855
|
-
|
|
853
|
+
reactPage.getElementSwatchIds(descriptor, props[propName]).forEach((swatchId) => {
|
|
856
854
|
swatchIds.add(swatchId);
|
|
857
855
|
});
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
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) => {
|
|
863
861
|
if (!seen.has(child.key)) {
|
|
864
862
|
seen.add(child.key);
|
|
865
863
|
remaining.push(child);
|
|
866
864
|
}
|
|
867
865
|
});
|
|
868
|
-
if (descriptor.type ===
|
|
866
|
+
if (descriptor.type === reactPage.ShapeControlType) {
|
|
869
867
|
const prop = props[propName];
|
|
870
868
|
if (prop == null)
|
|
871
869
|
return;
|
|
872
870
|
getResourcesFromElementDescriptors(descriptor.config.type, prop);
|
|
873
871
|
}
|
|
874
|
-
if (descriptor.type ===
|
|
872
|
+
if (descriptor.type === reactPage.ListControlType) {
|
|
875
873
|
const prop = props[propName];
|
|
876
874
|
if (prop == null)
|
|
877
875
|
return;
|
|
@@ -879,13 +877,13 @@ Received "${apiKey}" instead.`);
|
|
|
879
877
|
getResourcesFromElementDescriptors({ propName: descriptor.config.type }, { propName: item.value });
|
|
880
878
|
});
|
|
881
879
|
}
|
|
882
|
-
if (descriptor.type ===
|
|
880
|
+
if (descriptor.type === reactPage.Types.Shape) {
|
|
883
881
|
const prop = props[propName];
|
|
884
882
|
if (prop == null)
|
|
885
883
|
return;
|
|
886
884
|
getResourcesFromElementDescriptors(descriptor.options.type, prop);
|
|
887
885
|
}
|
|
888
|
-
if (descriptor.type ===
|
|
886
|
+
if (descriptor.type === reactPage.Types.List) {
|
|
889
887
|
const prop = props[propName];
|
|
890
888
|
if (prop == null)
|
|
891
889
|
return;
|
|
@@ -896,7 +894,7 @@ Received "${apiKey}" instead.`);
|
|
|
896
894
|
});
|
|
897
895
|
};
|
|
898
896
|
let element2;
|
|
899
|
-
if (
|
|
897
|
+
if (reactPage.isElementReference(current)) {
|
|
900
898
|
const globalElement = await this.getGlobalElement(current.value);
|
|
901
899
|
globalElements.set(current.value, globalElement);
|
|
902
900
|
const elementData = globalElement == null ? void 0 : globalElement.data;
|
|
@@ -906,7 +904,7 @@ Received "${apiKey}" instead.`);
|
|
|
906
904
|
} else {
|
|
907
905
|
element2 = current;
|
|
908
906
|
}
|
|
909
|
-
const elementDescriptors = descriptors
|
|
907
|
+
const elementDescriptors = descriptors.get(element2.type);
|
|
910
908
|
if (elementDescriptors == null)
|
|
911
909
|
continue;
|
|
912
910
|
getResourcesFromElementDescriptors(elementDescriptors, element2.props);
|
|
@@ -1164,7 +1162,7 @@ async function fonts(_req, res, { getFonts } = {}) {
|
|
|
1164
1162
|
const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
|
|
1165
1163
|
return res.json(fonts2);
|
|
1166
1164
|
}
|
|
1167
|
-
const version = "0.8.
|
|
1165
|
+
const version = "0.8.11";
|
|
1168
1166
|
async function handler(req, res, { apiKey }) {
|
|
1169
1167
|
if (req.query.secret !== apiKey) {
|
|
1170
1168
|
return res.status(401).json({ message: "Unauthorized" });
|
|
@@ -1458,13 +1456,13 @@ function registerComponent$c(runtime) {
|
|
|
1458
1456
|
type: constants.MakeswiftComponentType.Box,
|
|
1459
1457
|
label: "Box",
|
|
1460
1458
|
props: {
|
|
1461
|
-
id:
|
|
1462
|
-
backgrounds:
|
|
1463
|
-
width:
|
|
1464
|
-
format:
|
|
1459
|
+
id: reactPage.ElementID(),
|
|
1460
|
+
backgrounds: reactPage.Backgrounds(),
|
|
1461
|
+
width: reactPage.Width({
|
|
1462
|
+
format: reactPage.Width.Format.ClassName,
|
|
1465
1463
|
defaultValue: { value: 100, unit: "%" }
|
|
1466
1464
|
}),
|
|
1467
|
-
height:
|
|
1465
|
+
height: reactPage.ResponsiveIconRadioGroup({
|
|
1468
1466
|
label: "Height",
|
|
1469
1467
|
options: [
|
|
1470
1468
|
{ value: "auto", label: "Auto", icon: "HeightAuto16" },
|
|
@@ -1472,7 +1470,7 @@ function registerComponent$c(runtime) {
|
|
|
1472
1470
|
],
|
|
1473
1471
|
defaultValue: "auto"
|
|
1474
1472
|
}),
|
|
1475
|
-
verticalAlign:
|
|
1473
|
+
verticalAlign: reactPage.ResponsiveIconRadioGroup({
|
|
1476
1474
|
label: "Align items",
|
|
1477
1475
|
options: [
|
|
1478
1476
|
{ value: "flex-start", label: "Top", icon: "VerticalAlignStart16" },
|
|
@@ -1486,9 +1484,9 @@ function registerComponent$c(runtime) {
|
|
|
1486
1484
|
],
|
|
1487
1485
|
defaultValue: "flex-start"
|
|
1488
1486
|
}),
|
|
1489
|
-
margin:
|
|
1490
|
-
padding:
|
|
1491
|
-
format:
|
|
1487
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName }),
|
|
1488
|
+
padding: reactPage.Padding({
|
|
1489
|
+
format: reactPage.Padding.Format.ClassName,
|
|
1492
1490
|
preset: [
|
|
1493
1491
|
{
|
|
1494
1492
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -1501,16 +1499,16 @@ function registerComponent$c(runtime) {
|
|
|
1501
1499
|
}
|
|
1502
1500
|
]
|
|
1503
1501
|
}),
|
|
1504
|
-
border:
|
|
1505
|
-
borderRadius:
|
|
1506
|
-
boxShadow:
|
|
1507
|
-
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) => ({
|
|
1508
1506
|
hidden: props.children == null
|
|
1509
1507
|
})),
|
|
1510
|
-
columnGap:
|
|
1508
|
+
columnGap: reactPage.GapX((props) => ({
|
|
1511
1509
|
hidden: props.children == null
|
|
1512
1510
|
})),
|
|
1513
|
-
boxAnimateType:
|
|
1511
|
+
boxAnimateType: reactPage.ResponsiveSelect({
|
|
1514
1512
|
label: "Animate box in",
|
|
1515
1513
|
labelOrientation: "vertical",
|
|
1516
1514
|
options: [
|
|
@@ -1526,7 +1524,7 @@ function registerComponent$c(runtime) {
|
|
|
1526
1524
|
],
|
|
1527
1525
|
defaultValue: "none"
|
|
1528
1526
|
}),
|
|
1529
|
-
boxAnimateDuration:
|
|
1527
|
+
boxAnimateDuration: reactPage.ResponsiveNumber((props, device) => ({
|
|
1530
1528
|
label: "Box duration",
|
|
1531
1529
|
defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
|
|
1532
1530
|
min: 0.1,
|
|
@@ -1534,7 +1532,7 @@ function registerComponent$c(runtime) {
|
|
|
1534
1532
|
suffix: "s",
|
|
1535
1533
|
hidden: isHiddenBasedOnBoxAnimation(props, device)
|
|
1536
1534
|
})),
|
|
1537
|
-
boxAnimateDelay:
|
|
1535
|
+
boxAnimateDelay: reactPage.ResponsiveNumber((props, device) => ({
|
|
1538
1536
|
label: "Box delay",
|
|
1539
1537
|
defaultValue: DEFAULT_BOX_ANIMATE_DELAY,
|
|
1540
1538
|
min: 0,
|
|
@@ -1542,7 +1540,7 @@ function registerComponent$c(runtime) {
|
|
|
1542
1540
|
suffix: "s",
|
|
1543
1541
|
hidden: isHiddenBasedOnBoxAnimation(props, device)
|
|
1544
1542
|
})),
|
|
1545
|
-
itemAnimateType:
|
|
1543
|
+
itemAnimateType: reactPage.ResponsiveSelect({
|
|
1546
1544
|
label: "Animate items in",
|
|
1547
1545
|
labelOrientation: "vertical",
|
|
1548
1546
|
options: [
|
|
@@ -1558,7 +1556,7 @@ function registerComponent$c(runtime) {
|
|
|
1558
1556
|
],
|
|
1559
1557
|
defaultValue: "none"
|
|
1560
1558
|
}),
|
|
1561
|
-
itemAnimateDuration:
|
|
1559
|
+
itemAnimateDuration: reactPage.ResponsiveNumber((props, device) => ({
|
|
1562
1560
|
label: "Items duration",
|
|
1563
1561
|
defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
|
|
1564
1562
|
min: 0.1,
|
|
@@ -1566,7 +1564,7 @@ function registerComponent$c(runtime) {
|
|
|
1566
1564
|
suffix: "s",
|
|
1567
1565
|
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1568
1566
|
})),
|
|
1569
|
-
itemAnimateDelay:
|
|
1567
|
+
itemAnimateDelay: reactPage.ResponsiveNumber((props, device) => ({
|
|
1570
1568
|
label: "Items delay",
|
|
1571
1569
|
defaultValue: DEFAULT_ITEM_ANIMATE_DELAY,
|
|
1572
1570
|
min: 0,
|
|
@@ -1574,7 +1572,7 @@ function registerComponent$c(runtime) {
|
|
|
1574
1572
|
suffix: "s",
|
|
1575
1573
|
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1576
1574
|
})),
|
|
1577
|
-
itemStaggerDuration:
|
|
1575
|
+
itemStaggerDuration: reactPage.ResponsiveNumber((props, device) => ({
|
|
1578
1576
|
label: "Stagger",
|
|
1579
1577
|
min: 0,
|
|
1580
1578
|
step: 0.05,
|
|
@@ -1582,11 +1580,11 @@ function registerComponent$c(runtime) {
|
|
|
1582
1580
|
defaultValue: DEFAULT_ITEM_STAGGER_DURATION,
|
|
1583
1581
|
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1584
1582
|
})),
|
|
1585
|
-
hidePlaceholder:
|
|
1583
|
+
hidePlaceholder: reactPage.Checkbox((props) => ({
|
|
1586
1584
|
label: "Hide placeholder",
|
|
1587
1585
|
hidden: props.children != null
|
|
1588
1586
|
})),
|
|
1589
|
-
children:
|
|
1587
|
+
children: reactPage.Grid()
|
|
1590
1588
|
}
|
|
1591
1589
|
});
|
|
1592
1590
|
}
|
|
@@ -1597,9 +1595,9 @@ function registerComponent$b(runtime) {
|
|
|
1597
1595
|
type: constants.MakeswiftComponentType.Button,
|
|
1598
1596
|
label: "Button",
|
|
1599
1597
|
props: {
|
|
1600
|
-
id:
|
|
1601
|
-
children:
|
|
1602
|
-
link:
|
|
1598
|
+
id: reactPage.ElementID(),
|
|
1599
|
+
children: reactPage.TextInput({ placeholder: "Button text" }),
|
|
1600
|
+
link: reactPage.Link({
|
|
1603
1601
|
defaultValue: {
|
|
1604
1602
|
type: "OPEN_PAGE",
|
|
1605
1603
|
payload: {
|
|
@@ -1608,7 +1606,7 @@ function registerComponent$b(runtime) {
|
|
|
1608
1606
|
}
|
|
1609
1607
|
}
|
|
1610
1608
|
}),
|
|
1611
|
-
variant:
|
|
1609
|
+
variant: reactPage.ResponsiveSelect({
|
|
1612
1610
|
label: "Style",
|
|
1613
1611
|
labelOrientation: "horizontal",
|
|
1614
1612
|
options: [
|
|
@@ -1622,7 +1620,7 @@ function registerComponent$b(runtime) {
|
|
|
1622
1620
|
],
|
|
1623
1621
|
defaultValue: "flat"
|
|
1624
1622
|
}),
|
|
1625
|
-
shape:
|
|
1623
|
+
shape: reactPage.ResponsiveIconRadioGroup({
|
|
1626
1624
|
label: "Shape",
|
|
1627
1625
|
options: [
|
|
1628
1626
|
{ label: "Pill", value: "pill", icon: "ButtonPill16" },
|
|
@@ -1631,7 +1629,7 @@ function registerComponent$b(runtime) {
|
|
|
1631
1629
|
],
|
|
1632
1630
|
defaultValue: "rounded"
|
|
1633
1631
|
}),
|
|
1634
|
-
size:
|
|
1632
|
+
size: reactPage.ResponsiveIconRadioGroup({
|
|
1635
1633
|
label: "Size",
|
|
1636
1634
|
options: [
|
|
1637
1635
|
{ label: "Small", value: "small", icon: "SizeSmall16" },
|
|
@@ -1640,19 +1638,19 @@ function registerComponent$b(runtime) {
|
|
|
1640
1638
|
],
|
|
1641
1639
|
defaultValue: "medium"
|
|
1642
1640
|
}),
|
|
1643
|
-
color:
|
|
1641
|
+
color: reactPage.ResponsiveColor((props, device) => {
|
|
1644
1642
|
var _a;
|
|
1645
1643
|
const variant = props.variant;
|
|
1646
1644
|
const hidden = ((_a = state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), variant, device)) == null ? void 0 : _a.value) === "clear";
|
|
1647
1645
|
return { placeholder: "black", hidden };
|
|
1648
1646
|
}),
|
|
1649
|
-
textColor:
|
|
1647
|
+
textColor: reactPage.ResponsiveColor({
|
|
1650
1648
|
label: "Text color",
|
|
1651
1649
|
placeholder: "white"
|
|
1652
1650
|
}),
|
|
1653
|
-
textStyle:
|
|
1654
|
-
width:
|
|
1655
|
-
margin:
|
|
1651
|
+
textStyle: reactPage.TextStyle(),
|
|
1652
|
+
width: reactPage.Width(),
|
|
1653
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName })
|
|
1656
1654
|
}
|
|
1657
1655
|
});
|
|
1658
1656
|
}
|
|
@@ -1664,20 +1662,20 @@ function registerComponent$a(runtime) {
|
|
|
1664
1662
|
label: "Carousel",
|
|
1665
1663
|
icon: "Carousel40",
|
|
1666
1664
|
props: {
|
|
1667
|
-
id:
|
|
1668
|
-
images:
|
|
1665
|
+
id: reactPage.ElementID(),
|
|
1666
|
+
images: reactPage.Images({
|
|
1669
1667
|
preset: [
|
|
1670
1668
|
{ key: uuid.v4(), props: {} },
|
|
1671
1669
|
{ key: uuid.v4(), props: {} },
|
|
1672
1670
|
{ key: uuid.v4(), props: {} }
|
|
1673
1671
|
]
|
|
1674
1672
|
}),
|
|
1675
|
-
width:
|
|
1676
|
-
format:
|
|
1673
|
+
width: reactPage.Width({
|
|
1674
|
+
format: reactPage.Width.Format.ClassName,
|
|
1677
1675
|
defaultValue: { value: 400, unit: "px" }
|
|
1678
1676
|
}),
|
|
1679
|
-
margin:
|
|
1680
|
-
pageSize:
|
|
1677
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName }),
|
|
1678
|
+
pageSize: reactPage.ResponsiveNumber((props) => {
|
|
1681
1679
|
var _a;
|
|
1682
1680
|
const images = props.images;
|
|
1683
1681
|
const imagesLength = (_a = images == null ? void 0 : images.length) != null ? _a : 0;
|
|
@@ -1689,7 +1687,7 @@ function registerComponent$a(runtime) {
|
|
|
1689
1687
|
step: 1
|
|
1690
1688
|
};
|
|
1691
1689
|
}),
|
|
1692
|
-
step:
|
|
1690
|
+
step: reactPage.ResponsiveNumber((props, device) => {
|
|
1693
1691
|
var _a, _b;
|
|
1694
1692
|
const pageSize = props.pageSize;
|
|
1695
1693
|
const pageSizeValue = (_b = (_a = state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), pageSize, device)) == null ? void 0 : _a.value) != null ? _b : 1;
|
|
@@ -1701,7 +1699,7 @@ function registerComponent$a(runtime) {
|
|
|
1701
1699
|
step: 1
|
|
1702
1700
|
};
|
|
1703
1701
|
}),
|
|
1704
|
-
slideAlignment:
|
|
1702
|
+
slideAlignment: reactPage.ResponsiveIconRadioGroup({
|
|
1705
1703
|
label: "Alignment",
|
|
1706
1704
|
options: [
|
|
1707
1705
|
{ label: "Top", value: "flex-start", icon: "VerticalAlignStart16" },
|
|
@@ -1710,13 +1708,13 @@ function registerComponent$a(runtime) {
|
|
|
1710
1708
|
],
|
|
1711
1709
|
defaultValue: "center"
|
|
1712
1710
|
}),
|
|
1713
|
-
gap:
|
|
1711
|
+
gap: reactPage.GapX({
|
|
1714
1712
|
label: "Gap",
|
|
1715
1713
|
step: 5,
|
|
1716
1714
|
defaultValue: { value: 0, unit: "px" }
|
|
1717
1715
|
}),
|
|
1718
|
-
autoplay:
|
|
1719
|
-
delay:
|
|
1716
|
+
autoplay: reactPage.Checkbox({ label: "Autoplay" }),
|
|
1717
|
+
delay: reactPage.Number((props) => ({
|
|
1720
1718
|
label: "Delay",
|
|
1721
1719
|
preset: 5,
|
|
1722
1720
|
min: 1,
|
|
@@ -1724,8 +1722,8 @@ function registerComponent$a(runtime) {
|
|
|
1724
1722
|
suffix: "seconds",
|
|
1725
1723
|
hidden: !props.autoplay
|
|
1726
1724
|
})),
|
|
1727
|
-
showArrows:
|
|
1728
|
-
arrowPosition:
|
|
1725
|
+
showArrows: reactPage.Checkbox({ preset: true, label: "Show arrows" }),
|
|
1726
|
+
arrowPosition: reactPage.ResponsiveIconRadioGroup((props) => ({
|
|
1729
1727
|
label: "Arrow position",
|
|
1730
1728
|
options: [
|
|
1731
1729
|
{ label: "Inside", value: "inside", icon: "ArrowInside16" },
|
|
@@ -1735,24 +1733,24 @@ function registerComponent$a(runtime) {
|
|
|
1735
1733
|
defaultValue: "inside",
|
|
1736
1734
|
hidden: props.showArrows === false
|
|
1737
1735
|
})),
|
|
1738
|
-
arrowColor:
|
|
1736
|
+
arrowColor: reactPage.ResponsiveColor((props) => ({
|
|
1739
1737
|
label: "Arrow color",
|
|
1740
1738
|
placeholder: "black",
|
|
1741
1739
|
hidden: props.showArrows === false
|
|
1742
1740
|
})),
|
|
1743
|
-
arrowBackground:
|
|
1741
|
+
arrowBackground: reactPage.ResponsiveColor((props) => ({
|
|
1744
1742
|
label: "Arrow background",
|
|
1745
1743
|
placeholder: "white",
|
|
1746
1744
|
hidden: props.showArrows === false
|
|
1747
1745
|
})),
|
|
1748
|
-
showDots:
|
|
1749
|
-
dotColor:
|
|
1746
|
+
showDots: reactPage.Checkbox({ preset: true, label: "Show dots" }),
|
|
1747
|
+
dotColor: reactPage.ResponsiveColor((props) => ({
|
|
1750
1748
|
label: "Dot color",
|
|
1751
1749
|
placeholder: "black",
|
|
1752
1750
|
hidden: props.showDots === false
|
|
1753
1751
|
})),
|
|
1754
|
-
slideBorder:
|
|
1755
|
-
slideBorderRadius:
|
|
1752
|
+
slideBorder: reactPage.Border({ format: reactPage.Border.Format.ClassName }),
|
|
1753
|
+
slideBorderRadius: reactPage.BorderRadius({ format: reactPage.BorderRadius.Format.ClassName })
|
|
1756
1754
|
}
|
|
1757
1755
|
});
|
|
1758
1756
|
}
|
|
@@ -1764,11 +1762,11 @@ function registerComponent$9(runtime) {
|
|
|
1764
1762
|
label: "Countdown",
|
|
1765
1763
|
icon: "Countdown40",
|
|
1766
1764
|
props: {
|
|
1767
|
-
id:
|
|
1768
|
-
date:
|
|
1765
|
+
id: reactPage.ElementID(),
|
|
1766
|
+
date: reactPage.Date(() => ({
|
|
1769
1767
|
preset: new Date(Date.now() + 1e3 * 60 * 60 * 24 * 2).toISOString()
|
|
1770
1768
|
})),
|
|
1771
|
-
variant:
|
|
1769
|
+
variant: reactPage.ResponsiveIconRadioGroup({
|
|
1772
1770
|
label: "Style",
|
|
1773
1771
|
options: [
|
|
1774
1772
|
{ label: "Filled", value: "filled", icon: "CountdownSolid16" },
|
|
@@ -1787,7 +1785,7 @@ function registerComponent$9(runtime) {
|
|
|
1787
1785
|
],
|
|
1788
1786
|
defaultValue: "filled"
|
|
1789
1787
|
}),
|
|
1790
|
-
shape:
|
|
1788
|
+
shape: reactPage.ResponsiveIconRadioGroup({
|
|
1791
1789
|
label: "Shape",
|
|
1792
1790
|
options: [
|
|
1793
1791
|
{ label: "Pill", value: "pill", icon: "ButtonPill16" },
|
|
@@ -1796,7 +1794,7 @@ function registerComponent$9(runtime) {
|
|
|
1796
1794
|
],
|
|
1797
1795
|
defaultValue: "rounded"
|
|
1798
1796
|
}),
|
|
1799
|
-
size:
|
|
1797
|
+
size: reactPage.ResponsiveIconRadioGroup({
|
|
1800
1798
|
label: "Size",
|
|
1801
1799
|
options: [
|
|
1802
1800
|
{ label: "Small", value: "small", icon: "SizeSmall16" },
|
|
@@ -1805,7 +1803,7 @@ function registerComponent$9(runtime) {
|
|
|
1805
1803
|
],
|
|
1806
1804
|
defaultValue: "medium"
|
|
1807
1805
|
}),
|
|
1808
|
-
gap:
|
|
1806
|
+
gap: reactPage.GapX({
|
|
1809
1807
|
preset: [
|
|
1810
1808
|
{
|
|
1811
1809
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -1818,32 +1816,32 @@ function registerComponent$9(runtime) {
|
|
|
1818
1816
|
max: 100,
|
|
1819
1817
|
defaultValue: { value: 0, unit: "px" }
|
|
1820
1818
|
}),
|
|
1821
|
-
numberFont:
|
|
1822
|
-
numberColor:
|
|
1819
|
+
numberFont: reactPage.Font({ label: "Number font" }),
|
|
1820
|
+
numberColor: reactPage.ResponsiveColor({
|
|
1823
1821
|
label: "Number color",
|
|
1824
1822
|
placeholder: "white"
|
|
1825
1823
|
}),
|
|
1826
|
-
blockColor:
|
|
1824
|
+
blockColor: reactPage.ResponsiveColor({
|
|
1827
1825
|
label: "Block color",
|
|
1828
1826
|
placeholder: "black"
|
|
1829
1827
|
}),
|
|
1830
|
-
labelFont:
|
|
1831
|
-
labelColor:
|
|
1828
|
+
labelFont: reactPage.Font({ label: "Label font" }),
|
|
1829
|
+
labelColor: reactPage.ResponsiveColor({
|
|
1832
1830
|
label: "Label color",
|
|
1833
1831
|
placeholder: "black"
|
|
1834
1832
|
}),
|
|
1835
|
-
width:
|
|
1836
|
-
format:
|
|
1833
|
+
width: reactPage.Width({
|
|
1834
|
+
format: reactPage.Width.Format.ClassName,
|
|
1837
1835
|
defaultValue: { value: 560, unit: "px" }
|
|
1838
1836
|
}),
|
|
1839
|
-
margin:
|
|
1840
|
-
daysLabel:
|
|
1841
|
-
hoursLabel:
|
|
1842
|
-
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({
|
|
1843
1841
|
label: "Minutes label",
|
|
1844
1842
|
placeholder: "Minutes"
|
|
1845
1843
|
}),
|
|
1846
|
-
secondsLabel:
|
|
1844
|
+
secondsLabel: reactPage.TextInput({
|
|
1847
1845
|
label: "Seconds label",
|
|
1848
1846
|
placeholder: "Seconds"
|
|
1849
1847
|
})
|
|
@@ -1858,8 +1856,8 @@ function registerComponent$8(runtime) {
|
|
|
1858
1856
|
label: "Divider",
|
|
1859
1857
|
icon: "Divider40",
|
|
1860
1858
|
props: {
|
|
1861
|
-
id:
|
|
1862
|
-
variant:
|
|
1859
|
+
id: reactPage.ElementID(),
|
|
1860
|
+
variant: reactPage.ResponsiveSelect({
|
|
1863
1861
|
label: "Style",
|
|
1864
1862
|
labelOrientation: "horizontal",
|
|
1865
1863
|
options: [
|
|
@@ -1870,17 +1868,17 @@ function registerComponent$8(runtime) {
|
|
|
1870
1868
|
],
|
|
1871
1869
|
defaultValue: "solid"
|
|
1872
1870
|
}),
|
|
1873
|
-
thickness:
|
|
1871
|
+
thickness: reactPage.ResponsiveLength({
|
|
1874
1872
|
label: "Height",
|
|
1875
1873
|
defaultValue: { value: 1, unit: "px" },
|
|
1876
1874
|
options: [{ value: "px", label: "Pixels", icon: "Px16" }]
|
|
1877
1875
|
}),
|
|
1878
|
-
color:
|
|
1879
|
-
width:
|
|
1880
|
-
format:
|
|
1876
|
+
color: reactPage.ResponsiveColor({ placeholder: "black" }),
|
|
1877
|
+
width: reactPage.Width({
|
|
1878
|
+
format: reactPage.Width.Format.ClassName,
|
|
1881
1879
|
defaultValue: { value: 100, unit: "%" }
|
|
1882
1880
|
}),
|
|
1883
|
-
margin:
|
|
1881
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName })
|
|
1884
1882
|
}
|
|
1885
1883
|
});
|
|
1886
1884
|
}
|
|
@@ -1892,10 +1890,10 @@ function registerComponent$7(runtime) {
|
|
|
1892
1890
|
label: "Embed",
|
|
1893
1891
|
icon: "Code40",
|
|
1894
1892
|
props: {
|
|
1895
|
-
id:
|
|
1896
|
-
html:
|
|
1897
|
-
width:
|
|
1898
|
-
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 })
|
|
1899
1897
|
}
|
|
1900
1898
|
});
|
|
1901
1899
|
}
|
|
@@ -1931,10 +1929,10 @@ function registerComponent$6(runtime) {
|
|
|
1931
1929
|
label: "Form",
|
|
1932
1930
|
icon: "Form40",
|
|
1933
1931
|
props: {
|
|
1934
|
-
id:
|
|
1935
|
-
tableId:
|
|
1936
|
-
fields:
|
|
1937
|
-
submitLink:
|
|
1932
|
+
id: reactPage.ElementID(),
|
|
1933
|
+
tableId: reactPage.Table(),
|
|
1934
|
+
fields: reactPage.TableFormFields(),
|
|
1935
|
+
submitLink: reactPage.Link((props) => ({
|
|
1938
1936
|
label: "Redirect to",
|
|
1939
1937
|
options: [
|
|
1940
1938
|
{ value: "OPEN_PAGE", label: "Open page" },
|
|
@@ -1942,7 +1940,7 @@ function registerComponent$6(runtime) {
|
|
|
1942
1940
|
],
|
|
1943
1941
|
hidden: props.tableId == null
|
|
1944
1942
|
})),
|
|
1945
|
-
gap:
|
|
1943
|
+
gap: reactPage.GapY((props) => ({
|
|
1946
1944
|
preset: [
|
|
1947
1945
|
{
|
|
1948
1946
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -1953,7 +1951,7 @@ function registerComponent$6(runtime) {
|
|
|
1953
1951
|
defaultValue: { value: 0, unit: "px" },
|
|
1954
1952
|
hidden: props.tableId == null
|
|
1955
1953
|
})),
|
|
1956
|
-
shape:
|
|
1954
|
+
shape: reactPage.ResponsiveIconRadioGroup((props) => ({
|
|
1957
1955
|
label: "Shape",
|
|
1958
1956
|
options: [
|
|
1959
1957
|
{ label: "Pill", value: Shapes.PILL, icon: "ButtonPill16" },
|
|
@@ -1963,7 +1961,7 @@ function registerComponent$6(runtime) {
|
|
|
1963
1961
|
defaultValue: Shapes.ROUNDED,
|
|
1964
1962
|
hidden: props.tableId == null
|
|
1965
1963
|
})),
|
|
1966
|
-
size:
|
|
1964
|
+
size: reactPage.ResponsiveIconRadioGroup((props) => ({
|
|
1967
1965
|
label: "Size",
|
|
1968
1966
|
options: [
|
|
1969
1967
|
{ label: "Small", value: Sizes.SMALL, icon: "SizeSmall16" },
|
|
@@ -1973,7 +1971,7 @@ function registerComponent$6(runtime) {
|
|
|
1973
1971
|
defaultValue: Sizes.MEDIUM,
|
|
1974
1972
|
hidden: (props == null ? void 0 : props.tableId) == null
|
|
1975
1973
|
})),
|
|
1976
|
-
contrast:
|
|
1974
|
+
contrast: reactPage.ResponsiveIconRadioGroup((props) => ({
|
|
1977
1975
|
label: "Color",
|
|
1978
1976
|
options: [
|
|
1979
1977
|
{ label: "Light mode", value: Contrasts.LIGHT, icon: "Sun16" },
|
|
@@ -1982,8 +1980,8 @@ function registerComponent$6(runtime) {
|
|
|
1982
1980
|
defaultValue: Contrasts.LIGHT,
|
|
1983
1981
|
hidden: props.tableId == null
|
|
1984
1982
|
})),
|
|
1985
|
-
labelTextStyle:
|
|
1986
|
-
labelTextColor:
|
|
1983
|
+
labelTextStyle: reactPage.TextStyle({ label: "Label text style" }),
|
|
1984
|
+
labelTextColor: reactPage.ResponsiveColor((props, device) => {
|
|
1987
1985
|
const hidden = props.tableId == null;
|
|
1988
1986
|
const responsiveContrast = props.contrast;
|
|
1989
1987
|
const contrast = state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), responsiveContrast, device);
|
|
@@ -1993,23 +1991,23 @@ function registerComponent$6(runtime) {
|
|
|
1993
1991
|
placeholder: (contrast == null ? void 0 : contrast.value) === Contrasts.DARK ? "rgba(255,255,255,0.95)" : "rgba(0,0,0,0.8)"
|
|
1994
1992
|
};
|
|
1995
1993
|
}),
|
|
1996
|
-
submitTextStyle:
|
|
1997
|
-
brandColor:
|
|
1994
|
+
submitTextStyle: reactPage.TextStyle({ label: "Button text style" }),
|
|
1995
|
+
brandColor: reactPage.ResponsiveColor((props) => ({
|
|
1998
1996
|
label: "Button color",
|
|
1999
1997
|
placeholder: "black",
|
|
2000
1998
|
hidden: props.tableId == null
|
|
2001
1999
|
})),
|
|
2002
|
-
submitTextColor:
|
|
2000
|
+
submitTextColor: reactPage.ResponsiveColor((props) => ({
|
|
2003
2001
|
label: "Button text color",
|
|
2004
2002
|
placeholder: "white",
|
|
2005
2003
|
hidden: props.tableId == null
|
|
2006
2004
|
})),
|
|
2007
|
-
submitLabel:
|
|
2005
|
+
submitLabel: reactPage.TextInput((props) => ({
|
|
2008
2006
|
label: "Button label",
|
|
2009
2007
|
placeholder: "Submit",
|
|
2010
2008
|
hidden: props.tableId == null
|
|
2011
2009
|
})),
|
|
2012
|
-
submitVariant:
|
|
2010
|
+
submitVariant: reactPage.ResponsiveSelect((props) => ({
|
|
2013
2011
|
label: "Button style",
|
|
2014
2012
|
options: [
|
|
2015
2013
|
{ value: "flat", label: "Flat" },
|
|
@@ -2023,11 +2021,11 @@ function registerComponent$6(runtime) {
|
|
|
2023
2021
|
defaultValue: "flat",
|
|
2024
2022
|
hidden: props.tableId == null
|
|
2025
2023
|
})),
|
|
2026
|
-
submitWidth:
|
|
2024
|
+
submitWidth: reactPage.ResponsiveLength((props) => ({
|
|
2027
2025
|
label: "Button width",
|
|
2028
2026
|
hidden: props.tableId == null
|
|
2029
2027
|
})),
|
|
2030
|
-
submitAlignment:
|
|
2028
|
+
submitAlignment: reactPage.ResponsiveIconRadioGroup((props) => ({
|
|
2031
2029
|
label: "Button alignment",
|
|
2032
2030
|
options: [
|
|
2033
2031
|
{ label: "Left", value: Alignments.LEFT, icon: "AlignLeft16" },
|
|
@@ -2037,7 +2035,7 @@ function registerComponent$6(runtime) {
|
|
|
2037
2035
|
defaultValue: Alignments.CENTER,
|
|
2038
2036
|
hidden: props.tableId == null
|
|
2039
2037
|
})),
|
|
2040
|
-
width:
|
|
2038
|
+
width: reactPage.Width({
|
|
2041
2039
|
preset: [
|
|
2042
2040
|
{
|
|
2043
2041
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2045,9 +2043,9 @@ function registerComponent$6(runtime) {
|
|
|
2045
2043
|
}
|
|
2046
2044
|
],
|
|
2047
2045
|
defaultValue: { value: 100, unit: "%" },
|
|
2048
|
-
format:
|
|
2046
|
+
format: reactPage.Width.Format.ClassName
|
|
2049
2047
|
}),
|
|
2050
|
-
margin:
|
|
2048
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName })
|
|
2051
2049
|
}
|
|
2052
2050
|
});
|
|
2053
2051
|
}
|
|
@@ -2058,17 +2056,17 @@ function registerComponent$5(runtime) {
|
|
|
2058
2056
|
type: constants.MakeswiftComponentType.Image,
|
|
2059
2057
|
label: "Image",
|
|
2060
2058
|
props: {
|
|
2061
|
-
id:
|
|
2062
|
-
file:
|
|
2063
|
-
altText:
|
|
2064
|
-
link:
|
|
2065
|
-
width:
|
|
2066
|
-
margin:
|
|
2067
|
-
padding:
|
|
2068
|
-
border:
|
|
2069
|
-
borderRadius:
|
|
2070
|
-
boxShadow:
|
|
2071
|
-
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()
|
|
2072
2070
|
}
|
|
2073
2071
|
});
|
|
2074
2072
|
}
|
|
@@ -2080,21 +2078,21 @@ function registerComponent$4(runtime) {
|
|
|
2080
2078
|
label: "Navigation",
|
|
2081
2079
|
icon: "Navigation40",
|
|
2082
2080
|
props: {
|
|
2083
|
-
id:
|
|
2084
|
-
links:
|
|
2085
|
-
linkTextStyle:
|
|
2081
|
+
id: reactPage.ElementID(),
|
|
2082
|
+
links: reactPage.NavigationLinks(),
|
|
2083
|
+
linkTextStyle: reactPage.TextStyle((props) => {
|
|
2086
2084
|
const links = props.links;
|
|
2087
2085
|
return {
|
|
2088
2086
|
label: "Link text style",
|
|
2089
2087
|
hidden: links == null || links.length === 0
|
|
2090
2088
|
};
|
|
2091
2089
|
}),
|
|
2092
|
-
showLogo:
|
|
2093
|
-
logoFile:
|
|
2090
|
+
showLogo: reactPage.Checkbox({ preset: true, label: "Show logo" }),
|
|
2091
|
+
logoFile: reactPage.Image((props) => ({
|
|
2094
2092
|
label: "Logo",
|
|
2095
2093
|
hidden: props.showLogo === false
|
|
2096
2094
|
})),
|
|
2097
|
-
logoWidth:
|
|
2095
|
+
logoWidth: reactPage.ResponsiveLength((props) => ({
|
|
2098
2096
|
preset: [
|
|
2099
2097
|
{
|
|
2100
2098
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2107,15 +2105,15 @@ function registerComponent$4(runtime) {
|
|
|
2107
2105
|
options: [{ value: "px", label: "Pixels", icon: "Px16" }],
|
|
2108
2106
|
hidden: props.showLogo === false
|
|
2109
2107
|
})),
|
|
2110
|
-
logoAltText:
|
|
2108
|
+
logoAltText: reactPage.TextInput((props) => ({
|
|
2111
2109
|
label: "Logo alt text",
|
|
2112
2110
|
hidden: props.showLogo === false
|
|
2113
2111
|
})),
|
|
2114
|
-
logoLink:
|
|
2112
|
+
logoLink: reactPage.Link((props) => ({
|
|
2115
2113
|
label: "Logo on click",
|
|
2116
2114
|
hidden: props.showLogo === false
|
|
2117
2115
|
})),
|
|
2118
|
-
alignment:
|
|
2116
|
+
alignment: reactPage.ResponsiveIconRadioGroup({
|
|
2119
2117
|
label: "Alignment",
|
|
2120
2118
|
options: [
|
|
2121
2119
|
{ label: "Left", value: "flex-start", icon: "AlignLeft16" },
|
|
@@ -2124,7 +2122,7 @@ function registerComponent$4(runtime) {
|
|
|
2124
2122
|
],
|
|
2125
2123
|
defaultValue: "flex-end"
|
|
2126
2124
|
}),
|
|
2127
|
-
gutter:
|
|
2125
|
+
gutter: reactPage.GapX({
|
|
2128
2126
|
preset: [
|
|
2129
2127
|
{
|
|
2130
2128
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2137,14 +2135,14 @@ function registerComponent$4(runtime) {
|
|
|
2137
2135
|
step: 1,
|
|
2138
2136
|
defaultValue: { value: 0, unit: "px" }
|
|
2139
2137
|
}),
|
|
2140
|
-
mobileMenuAnimation:
|
|
2138
|
+
mobileMenuAnimation: reactPage.ResponsiveSelect({
|
|
2141
2139
|
label: "Mobile menu",
|
|
2142
2140
|
options: [
|
|
2143
2141
|
{ value: "coverRight", label: "Cover from right" },
|
|
2144
2142
|
{ value: "coverLeft", label: "Cover from left" }
|
|
2145
2143
|
]
|
|
2146
2144
|
}),
|
|
2147
|
-
mobileMenuOpenIconColor:
|
|
2145
|
+
mobileMenuOpenIconColor: reactPage.ResponsiveColor((props, device) => {
|
|
2148
2146
|
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
2149
2147
|
const hidden = !state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), mobileMenuAnimation, device);
|
|
2150
2148
|
return {
|
|
@@ -2153,7 +2151,7 @@ function registerComponent$4(runtime) {
|
|
|
2153
2151
|
hidden
|
|
2154
2152
|
};
|
|
2155
2153
|
}),
|
|
2156
|
-
mobileMenuCloseIconColor:
|
|
2154
|
+
mobileMenuCloseIconColor: reactPage.ResponsiveColor((props, device) => {
|
|
2157
2155
|
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
2158
2156
|
const hidden = !state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), mobileMenuAnimation, device);
|
|
2159
2157
|
return {
|
|
@@ -2162,7 +2160,7 @@ function registerComponent$4(runtime) {
|
|
|
2162
2160
|
hidden
|
|
2163
2161
|
};
|
|
2164
2162
|
}),
|
|
2165
|
-
mobileMenuBackgroundColor:
|
|
2163
|
+
mobileMenuBackgroundColor: reactPage.ResponsiveColor((props, device) => {
|
|
2166
2164
|
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
2167
2165
|
const hidden = !state_breakpoints.findBreakpointOverride(runtime.getBreakpoints(), mobileMenuAnimation, device);
|
|
2168
2166
|
return {
|
|
@@ -2171,11 +2169,11 @@ function registerComponent$4(runtime) {
|
|
|
2171
2169
|
hidden
|
|
2172
2170
|
};
|
|
2173
2171
|
}),
|
|
2174
|
-
width:
|
|
2175
|
-
format:
|
|
2172
|
+
width: reactPage.Width({
|
|
2173
|
+
format: reactPage.Width.Format.ClassName,
|
|
2176
2174
|
defaultValue: { value: 100, unit: "%" }
|
|
2177
2175
|
}),
|
|
2178
|
-
margin:
|
|
2176
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName })
|
|
2179
2177
|
}
|
|
2180
2178
|
});
|
|
2181
2179
|
}
|
|
@@ -2187,10 +2185,10 @@ function registerComponent$3(runtime) {
|
|
|
2187
2185
|
label: "Page",
|
|
2188
2186
|
hidden: true,
|
|
2189
2187
|
props: {
|
|
2190
|
-
children:
|
|
2191
|
-
backgrounds:
|
|
2192
|
-
rowGap:
|
|
2193
|
-
columnGap:
|
|
2188
|
+
children: reactPage.Grid(),
|
|
2189
|
+
backgrounds: reactPage.Backgrounds(),
|
|
2190
|
+
rowGap: reactPage.GapY(),
|
|
2191
|
+
columnGap: reactPage.GapX()
|
|
2194
2192
|
}
|
|
2195
2193
|
});
|
|
2196
2194
|
}
|
|
@@ -2202,8 +2200,8 @@ function registerComponent$2(runtime) {
|
|
|
2202
2200
|
label: "Social Links",
|
|
2203
2201
|
icon: "SocialLinks40",
|
|
2204
2202
|
props: {
|
|
2205
|
-
id:
|
|
2206
|
-
links:
|
|
2203
|
+
id: reactPage.ElementID(),
|
|
2204
|
+
links: reactPage.SocialLinks({
|
|
2207
2205
|
preset: {
|
|
2208
2206
|
links: [
|
|
2209
2207
|
{
|
|
@@ -2222,7 +2220,7 @@ function registerComponent$2(runtime) {
|
|
|
2222
2220
|
openInNewTab: false
|
|
2223
2221
|
}
|
|
2224
2222
|
}),
|
|
2225
|
-
shape:
|
|
2223
|
+
shape: reactPage.ResponsiveIconRadioGroup((props) => {
|
|
2226
2224
|
const links = props.links;
|
|
2227
2225
|
return {
|
|
2228
2226
|
label: "Shape",
|
|
@@ -2236,7 +2234,7 @@ function registerComponent$2(runtime) {
|
|
|
2236
2234
|
hidden: links == null || links.links.length === 0
|
|
2237
2235
|
};
|
|
2238
2236
|
}),
|
|
2239
|
-
size:
|
|
2237
|
+
size: reactPage.ResponsiveIconRadioGroup((props) => {
|
|
2240
2238
|
const links = props.links;
|
|
2241
2239
|
return {
|
|
2242
2240
|
label: "Size",
|
|
@@ -2249,7 +2247,7 @@ function registerComponent$2(runtime) {
|
|
|
2249
2247
|
hidden: links == null || links.links.length === 0
|
|
2250
2248
|
};
|
|
2251
2249
|
}),
|
|
2252
|
-
hoverStyle:
|
|
2250
|
+
hoverStyle: reactPage.ResponsiveSelect((props) => {
|
|
2253
2251
|
const links = props.links;
|
|
2254
2252
|
const hidden = links == null || links.links.length === 0;
|
|
2255
2253
|
return {
|
|
@@ -2265,7 +2263,7 @@ function registerComponent$2(runtime) {
|
|
|
2265
2263
|
hidden
|
|
2266
2264
|
};
|
|
2267
2265
|
}),
|
|
2268
|
-
fill:
|
|
2266
|
+
fill: reactPage.ResponsiveColor((props) => {
|
|
2269
2267
|
const links = props.links;
|
|
2270
2268
|
const hidden = links == null || links.links.length === 0;
|
|
2271
2269
|
return {
|
|
@@ -2273,7 +2271,7 @@ function registerComponent$2(runtime) {
|
|
|
2273
2271
|
hidden
|
|
2274
2272
|
};
|
|
2275
2273
|
}),
|
|
2276
|
-
backgroundColor:
|
|
2274
|
+
backgroundColor: reactPage.ResponsiveColor((props) => {
|
|
2277
2275
|
const links = props.links;
|
|
2278
2276
|
const hidden = links == null || links.links.length === 0;
|
|
2279
2277
|
return {
|
|
@@ -2281,7 +2279,7 @@ function registerComponent$2(runtime) {
|
|
|
2281
2279
|
hidden
|
|
2282
2280
|
};
|
|
2283
2281
|
}),
|
|
2284
|
-
alignment:
|
|
2282
|
+
alignment: reactPage.ResponsiveIconRadioGroup({
|
|
2285
2283
|
label: "Alignment",
|
|
2286
2284
|
options: [
|
|
2287
2285
|
{ label: "flex-start", value: "flex-start", icon: "AlignLeft16" },
|
|
@@ -2290,7 +2288,7 @@ function registerComponent$2(runtime) {
|
|
|
2290
2288
|
],
|
|
2291
2289
|
defaultValue: "center"
|
|
2292
2290
|
}),
|
|
2293
|
-
gutter:
|
|
2291
|
+
gutter: reactPage.GapX({
|
|
2294
2292
|
preset: [
|
|
2295
2293
|
{
|
|
2296
2294
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2303,12 +2301,12 @@ function registerComponent$2(runtime) {
|
|
|
2303
2301
|
step: 1,
|
|
2304
2302
|
defaultValue: { value: 0, unit: "px" }
|
|
2305
2303
|
}),
|
|
2306
|
-
width:
|
|
2307
|
-
format:
|
|
2304
|
+
width: reactPage.Width({
|
|
2305
|
+
format: reactPage.Width.Format.ClassName,
|
|
2308
2306
|
defaultValue: { value: 100, unit: "%" }
|
|
2309
2307
|
}),
|
|
2310
|
-
margin:
|
|
2311
|
-
format:
|
|
2308
|
+
margin: reactPage.Margin({
|
|
2309
|
+
format: reactPage.Margin.Format.ClassName,
|
|
2312
2310
|
preset: [
|
|
2313
2311
|
{
|
|
2314
2312
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2331,8 +2329,8 @@ function registerComponent$1(runtime) {
|
|
|
2331
2329
|
type: constants.MakeswiftComponentType.Text,
|
|
2332
2330
|
label: "Text",
|
|
2333
2331
|
props: {
|
|
2334
|
-
id:
|
|
2335
|
-
text:
|
|
2332
|
+
id: reactPage.ElementID(),
|
|
2333
|
+
text: reactPage.RichText(() => ({
|
|
2336
2334
|
preset: {
|
|
2337
2335
|
document: {
|
|
2338
2336
|
object: "document",
|
|
@@ -2378,8 +2376,8 @@ function registerComponent$1(runtime) {
|
|
|
2378
2376
|
}
|
|
2379
2377
|
}
|
|
2380
2378
|
})),
|
|
2381
|
-
width:
|
|
2382
|
-
format:
|
|
2379
|
+
width: reactPage.Width({
|
|
2380
|
+
format: reactPage.Width.Format.ClassName,
|
|
2383
2381
|
preset: [
|
|
2384
2382
|
{
|
|
2385
2383
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2388,8 +2386,8 @@ function registerComponent$1(runtime) {
|
|
|
2388
2386
|
],
|
|
2389
2387
|
defaultValue: { value: 100, unit: "%" }
|
|
2390
2388
|
}),
|
|
2391
|
-
margin:
|
|
2392
|
-
format:
|
|
2389
|
+
margin: reactPage.Margin({
|
|
2390
|
+
format: reactPage.Margin.Format.ClassName,
|
|
2393
2391
|
preset: [
|
|
2394
2392
|
{
|
|
2395
2393
|
deviceId: state_breakpoints.getBaseBreakpoint(runtime.getBreakpoints()).id,
|
|
@@ -2413,14 +2411,14 @@ function registerComponent(runtime) {
|
|
|
2413
2411
|
label: "Video",
|
|
2414
2412
|
icon: "Video40",
|
|
2415
2413
|
props: {
|
|
2416
|
-
id:
|
|
2417
|
-
video:
|
|
2418
|
-
width:
|
|
2419
|
-
format:
|
|
2414
|
+
id: reactPage.ElementID(),
|
|
2415
|
+
video: reactPage.Video({ preset: { controls: true } }),
|
|
2416
|
+
width: reactPage.Width({
|
|
2417
|
+
format: reactPage.Width.Format.ClassName,
|
|
2420
2418
|
defaultValue: { value: 560, unit: "px" }
|
|
2421
2419
|
}),
|
|
2422
|
-
margin:
|
|
2423
|
-
borderRadius:
|
|
2420
|
+
margin: reactPage.Margin({ format: reactPage.Margin.Format.ClassName }),
|
|
2421
|
+
borderRadius: reactPage.BorderRadius({ format: reactPage.BorderRadius.Format.ClassName })
|
|
2424
2422
|
}
|
|
2425
2423
|
});
|
|
2426
2424
|
}
|
|
@@ -2615,12 +2613,12 @@ function mapSideColor(swatches, _d) {
|
|
|
2615
2613
|
return __spreadProps(__spreadValues({}, restOfSide), {
|
|
2616
2614
|
color: color && {
|
|
2617
2615
|
alpha: color.alpha,
|
|
2618
|
-
swatch: swatches.filter(
|
|
2616
|
+
swatch: swatches.filter(reactPage.isNonNullable).find((s) => s && s.id === color.swatchId)
|
|
2619
2617
|
}
|
|
2620
2618
|
});
|
|
2621
2619
|
}
|
|
2622
2620
|
function useBorder(value) {
|
|
2623
|
-
const swatchIds =
|
|
2621
|
+
const swatchIds = reactPage.getBorderSwatchIds(value);
|
|
2624
2622
|
const swatches = useSwatches(swatchIds);
|
|
2625
2623
|
if (value == null)
|
|
2626
2624
|
return null;
|
|
@@ -2645,7 +2643,7 @@ const ShadowDefaultValue = {
|
|
|
2645
2643
|
color: null
|
|
2646
2644
|
};
|
|
2647
2645
|
function useBoxShadow(value) {
|
|
2648
|
-
const swatchIds =
|
|
2646
|
+
const swatchIds = reactPage.getBoxShadowsSwatchIds(value);
|
|
2649
2647
|
const swatches = useSwatches(swatchIds);
|
|
2650
2648
|
if (value == null)
|
|
2651
2649
|
return null;
|
|
@@ -2661,7 +2659,7 @@ function useBoxShadow(value) {
|
|
|
2661
2659
|
return __spreadProps(__spreadValues({}, restOfShadow), {
|
|
2662
2660
|
payload: {
|
|
2663
2661
|
color: color != null ? {
|
|
2664
|
-
swatch: swatches.filter(
|
|
2662
|
+
swatch: swatches.filter(reactPage.isNonNullable).find((s) => s && s.id === color.swatchId),
|
|
2665
2663
|
alpha: color.alpha
|
|
2666
2664
|
} : null,
|
|
2667
2665
|
inset: inset != null ? inset : ShadowDefaultValue.inset,
|
|
@@ -2676,7 +2674,7 @@ function useBoxShadow(value) {
|
|
|
2676
2674
|
});
|
|
2677
2675
|
}
|
|
2678
2676
|
function useResponsiveColor(color) {
|
|
2679
|
-
const swatchIds =
|
|
2677
|
+
const swatchIds = reactPage.getResponsiveColorSwatchIds(color);
|
|
2680
2678
|
const swatches = useSwatches(swatchIds);
|
|
2681
2679
|
if (color == null)
|
|
2682
2680
|
return null;
|
|
@@ -2685,7 +2683,7 @@ function useResponsiveColor(color) {
|
|
|
2685
2683
|
const { swatchId, alpha } = v;
|
|
2686
2684
|
const swatch = swatches.find((s) => s && s.id === swatchId);
|
|
2687
2685
|
return swatch == null ? null : __spreadProps(__spreadValues({}, rest), { value: { swatch, alpha } });
|
|
2688
|
-
}).filter(
|
|
2686
|
+
}).filter(reactPage.isNonNullable);
|
|
2689
2687
|
}
|
|
2690
2688
|
const getIndexes = (spans, index) => {
|
|
2691
2689
|
const flattened = spans.reduce((a, s) => a.concat(s), []);
|
|
@@ -2931,7 +2929,7 @@ const defaultPadding = {
|
|
|
2931
2929
|
};
|
|
2932
2930
|
function useStyleControlCssObject(style, controlDefinition) {
|
|
2933
2931
|
const { properties } = controlDefinition.config;
|
|
2934
|
-
return __spreadValues(__spreadValues({}, properties.includes(
|
|
2932
|
+
return __spreadValues(__spreadValues({}, properties.includes(reactPage.StyleControlProperty.Width) && {
|
|
2935
2933
|
maxWidth: "100%"
|
|
2936
2934
|
}), useResponsiveStyle([
|
|
2937
2935
|
style == null ? void 0 : style.width,
|
|
@@ -2942,19 +2940,19 @@ function useStyleControlCssObject(style, controlDefinition) {
|
|
|
2942
2940
|
style == null ? void 0 : style.textStyle
|
|
2943
2941
|
], ([width, margin, padding, border, borderRadius, textStyle]) => {
|
|
2944
2942
|
var _a, _b, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
2945
|
-
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(
|
|
2943
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(reactPage.StyleControlProperty.Width) && {
|
|
2946
2944
|
width: (_a = widthToString(width)) != null ? _a : "100%"
|
|
2947
|
-
}), 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) && {
|
|
2948
2946
|
borderTop: (_b = borderSideToString2(border == null ? void 0 : border.borderTop)) != null ? _b : "0 solid black",
|
|
2949
2947
|
borderRight: (_c2 = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c2 : "0 solid black",
|
|
2950
2948
|
borderBottom: (_d = borderSideToString2(border == null ? void 0 : border.borderBottom)) != null ? _d : "0 solid black",
|
|
2951
2949
|
borderLeft: (_e = borderSideToString2(border == null ? void 0 : border.borderLeft)) != null ? _e : "0 solid black"
|
|
2952
|
-
}), properties.includes(
|
|
2950
|
+
}), properties.includes(reactPage.StyleControlProperty.BorderRadius) && {
|
|
2953
2951
|
borderTopLeftRadius: (_f = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopLeftRadius)) != null ? _f : 0,
|
|
2954
2952
|
borderTopRightRadius: (_g = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopRightRadius)) != null ? _g : 0,
|
|
2955
2953
|
borderBottomRightRadius: (_h = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomRightRadius)) != null ? _h : 0,
|
|
2956
2954
|
borderBottomLeftRadius: (_i = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomLeftRadius)) != null ? _i : 0
|
|
2957
|
-
}), 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 }), {
|
|
2958
2956
|
textTransform: (_j = textStyle == null ? void 0 : textStyle.textTransform) != null ? _j : [],
|
|
2959
2957
|
fontStyle: (_k = textStyle == null ? void 0 : textStyle.fontStyle) != null ? _k : []
|
|
2960
2958
|
}));
|
|
@@ -3039,10 +3037,10 @@ function useComboboxControlValue(data) {
|
|
|
3039
3037
|
}
|
|
3040
3038
|
function useImageControlValue(data, definition) {
|
|
3041
3039
|
var _a;
|
|
3042
|
-
const format = (_a = definition.config.format) != null ? _a :
|
|
3040
|
+
const format = (_a = definition.config.format) != null ? _a : reactPage.ImageControlValueFormat.URL;
|
|
3043
3041
|
const fileId = data != null ? data : null;
|
|
3044
3042
|
const file = useFile(fileId);
|
|
3045
|
-
if (format ===
|
|
3043
|
+
if (format === reactPage.ImageControlValueFormat.URL) {
|
|
3046
3044
|
return file == null ? void 0 : file.publicUrl;
|
|
3047
3045
|
}
|
|
3048
3046
|
if (file == null || file.dimensions == null)
|
|
@@ -3141,12 +3139,12 @@ function useNumber(numberControlData, controlDefinition) {
|
|
|
3141
3139
|
return numberControlData != null ? numberControlData : controlDefinition.config.defaultValue;
|
|
3142
3140
|
}
|
|
3143
3141
|
const Text = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3144
|
-
return require("./index.
|
|
3142
|
+
return require("./index.cjs8.js");
|
|
3145
3143
|
}))));
|
|
3146
3144
|
function useRichText(data, control) {
|
|
3147
3145
|
const textCallbackRef = React.useCallback((handle) => {
|
|
3148
3146
|
var _a;
|
|
3149
|
-
if (
|
|
3147
|
+
if (reactPage.isPropControllersHandle(handle))
|
|
3150
3148
|
(_a = handle == null ? void 0 : handle.setPropControllers) == null ? void 0 : _a.call(handle, control == null ? null : {
|
|
3151
3149
|
text: control
|
|
3152
3150
|
});
|
|
@@ -3156,115 +3154,20 @@ function useRichText(data, control) {
|
|
|
3156
3154
|
ref: textCallbackRef
|
|
3157
3155
|
});
|
|
3158
3156
|
}
|
|
3159
|
-
function
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
const measuredBoxModel = boxModels.getBox(element);
|
|
3166
|
-
if (!deepEqual(currentBoxModel, measuredBoxModel)) {
|
|
3167
|
-
currentBoxModel = measuredBoxModel;
|
|
3168
|
-
onBoxModelChange(currentBoxModel);
|
|
3169
|
-
}
|
|
3170
|
-
animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
3171
|
-
};
|
|
3172
|
-
let animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
3173
|
-
return () => {
|
|
3174
|
-
cancelAnimationFrame(animationFrameHandle);
|
|
3175
|
-
onBoxModelChange(null);
|
|
3176
|
-
};
|
|
3177
|
-
}
|
|
3178
|
-
const isSSR = typeof window === "undefined" || /ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
|
|
3179
|
-
const useIsomorphicLayoutEffect = isSSR ? React.useEffect : React.useLayoutEffect;
|
|
3180
|
-
const defaultText = [{
|
|
3181
|
-
type: descriptors.BlockType.Text,
|
|
3182
|
-
children: [{
|
|
3183
|
-
text: ""
|
|
3184
|
-
}]
|
|
3185
|
-
}];
|
|
3157
|
+
const EditableText = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3158
|
+
return require("./index.cjs9.js");
|
|
3159
|
+
}))));
|
|
3160
|
+
const ReadOnlyText = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3161
|
+
return require("./ReadOnlyTextV2.cjs.js");
|
|
3162
|
+
}))));
|
|
3186
3163
|
function useRichTextV2(data, control) {
|
|
3187
|
-
const
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
return pollBoxModel({
|
|
3195
|
-
element,
|
|
3196
|
-
onBoxModelChange: (boxModel) => control.changeBoxModel(boxModel)
|
|
3197
|
-
});
|
|
3198
|
-
}, [editor, control]);
|
|
3199
|
-
const renderElement = React.useCallback(({
|
|
3200
|
-
attributes,
|
|
3201
|
-
children,
|
|
3202
|
-
element
|
|
3203
|
-
}) => {
|
|
3204
|
-
switch (element.type) {
|
|
3205
|
-
default:
|
|
3206
|
-
return /* @__PURE__ */ jsxRuntime.jsx("p", __spreadProps(__spreadValues({}, attributes), {
|
|
3207
|
-
children
|
|
3208
|
-
}));
|
|
3209
|
-
}
|
|
3210
|
-
}, []);
|
|
3211
|
-
const renderLeaf = React.useCallback(({
|
|
3212
|
-
attributes,
|
|
3213
|
-
children
|
|
3214
|
-
}) => {
|
|
3215
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", __spreadProps(__spreadValues({}, attributes), {
|
|
3216
|
-
children
|
|
3217
|
-
}));
|
|
3218
|
-
}, []);
|
|
3219
|
-
const initialValue = React.useMemo(() => data != null ? data : defaultText, [data]);
|
|
3220
|
-
React.useEffect(() => {
|
|
3221
|
-
if (editMode !== descriptors.BuilderEditMode.CONTENT) {
|
|
3222
|
-
isPreservingFocus.current = false;
|
|
3223
|
-
slateReact.ReactEditor.deselect(editor);
|
|
3224
|
-
}
|
|
3225
|
-
}, [editMode]);
|
|
3226
|
-
React.useEffect(() => {
|
|
3227
|
-
control == null ? void 0 : control.setEditor(editor);
|
|
3228
|
-
control == null ? void 0 : control.setDefaultValue(defaultText);
|
|
3229
|
-
}, [control, editor, defaultText]);
|
|
3230
|
-
const handleFocus = React.useCallback(() => {
|
|
3231
|
-
isPreservingFocus.current = true;
|
|
3232
|
-
control == null ? void 0 : control.select();
|
|
3233
|
-
}, [control]);
|
|
3234
|
-
const handleKeyDown = React.useCallback((e) => {
|
|
3235
|
-
if (isHotkey__default["default"]("mod+shift+z", e))
|
|
3236
|
-
return slateHistory.HistoryEditor.redo(editor);
|
|
3237
|
-
if (isHotkey__default["default"]("mod+z", e))
|
|
3238
|
-
return slateHistory.HistoryEditor.undo(editor);
|
|
3239
|
-
if (isHotkey__default["default"]("escape")(e)) {
|
|
3240
|
-
isPreservingFocus.current = false;
|
|
3241
|
-
slateReact.ReactEditor.blur(editor);
|
|
3242
|
-
control == null ? void 0 : control.switchToBuildMode();
|
|
3243
|
-
}
|
|
3244
|
-
}, [control, editor]);
|
|
3245
|
-
const handleBlur = React.useCallback((e) => {
|
|
3246
|
-
var _a;
|
|
3247
|
-
if (e.relatedTarget == null)
|
|
3248
|
-
return;
|
|
3249
|
-
if (((_a = e.relatedTarget) == null ? void 0 : _a.getAttribute("contenteditable")) === "true")
|
|
3250
|
-
isPreservingFocus.current = false;
|
|
3251
|
-
}, []);
|
|
3252
|
-
const handleOnChange = React.useCallback((value) => {
|
|
3253
|
-
control == null ? void 0 : control.onChange(value);
|
|
3254
|
-
}, [control]);
|
|
3255
|
-
return /* @__PURE__ */ jsxRuntime.jsx(slateReact.Slate, {
|
|
3256
|
-
editor,
|
|
3257
|
-
onChange: handleOnChange,
|
|
3258
|
-
value: initialValue,
|
|
3259
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(slateReact.Editable, {
|
|
3260
|
-
renderLeaf,
|
|
3261
|
-
renderElement,
|
|
3262
|
-
onFocus: handleFocus,
|
|
3263
|
-
onKeyDown: handleKeyDown,
|
|
3264
|
-
onBlur: handleBlur,
|
|
3265
|
-
readOnly: editMode !== descriptors.BuilderEditMode.CONTENT,
|
|
3266
|
-
placeholder: "Write some text..."
|
|
3267
|
-
})
|
|
3164
|
+
const isPreview = useIsPreview();
|
|
3165
|
+
return isPreview ? /* @__PURE__ */ jsxRuntime.jsx(EditableText, {
|
|
3166
|
+
text: data,
|
|
3167
|
+
control
|
|
3168
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx(ReadOnlyText, {
|
|
3169
|
+
text: data,
|
|
3170
|
+
control
|
|
3268
3171
|
});
|
|
3269
3172
|
}
|
|
3270
3173
|
function useSelectControlValue(data, definition) {
|
|
@@ -3285,6 +3188,25 @@ function ShapeControlValue({
|
|
|
3285
3188
|
}))
|
|
3286
3189
|
}), children)({});
|
|
3287
3190
|
}
|
|
3191
|
+
function pollBoxModel({
|
|
3192
|
+
element,
|
|
3193
|
+
onBoxModelChange
|
|
3194
|
+
}) {
|
|
3195
|
+
let currentBoxModel = null;
|
|
3196
|
+
const handleAnimationFrameRequest = () => {
|
|
3197
|
+
const measuredBoxModel = boxModels.getBox(element);
|
|
3198
|
+
if (!deepEqual(currentBoxModel, measuredBoxModel)) {
|
|
3199
|
+
currentBoxModel = measuredBoxModel;
|
|
3200
|
+
onBoxModelChange(currentBoxModel);
|
|
3201
|
+
}
|
|
3202
|
+
animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
3203
|
+
};
|
|
3204
|
+
let animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
3205
|
+
return () => {
|
|
3206
|
+
cancelAnimationFrame(animationFrameHandle);
|
|
3207
|
+
onBoxModelChange(null);
|
|
3208
|
+
};
|
|
3209
|
+
}
|
|
3288
3210
|
function useSlot(data, control) {
|
|
3289
3211
|
if (data == null || data.elements.length === 0) {
|
|
3290
3212
|
return /* @__PURE__ */ jsxRuntime.jsx(Slot.Placeholder, {
|
|
@@ -3465,25 +3387,25 @@ function ControlValue({
|
|
|
3465
3387
|
parameters: [data, definition],
|
|
3466
3388
|
children: (value) => children(value)
|
|
3467
3389
|
}, definition.type);
|
|
3468
|
-
case
|
|
3390
|
+
case select.SelectControlType:
|
|
3469
3391
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3470
3392
|
hook: useSelectControlValue,
|
|
3471
3393
|
parameters: [data, definition],
|
|
3472
3394
|
children: (value) => children(value)
|
|
3473
3395
|
}, definition.type);
|
|
3474
|
-
case
|
|
3396
|
+
case reactPage.ColorControlType:
|
|
3475
3397
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3476
3398
|
hook: useColorValue,
|
|
3477
3399
|
parameters: [data, definition],
|
|
3478
3400
|
children: (value) => children(value)
|
|
3479
3401
|
}, definition.type);
|
|
3480
|
-
case
|
|
3402
|
+
case reactPage.ImageControlType:
|
|
3481
3403
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3482
3404
|
hook: useImageControlValue,
|
|
3483
3405
|
parameters: [data, definition],
|
|
3484
3406
|
children: (value) => children(value)
|
|
3485
3407
|
}, definition.type);
|
|
3486
|
-
case
|
|
3408
|
+
case reactPage.LinkControlType:
|
|
3487
3409
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3488
3410
|
hook: useLinkControlValue,
|
|
3489
3411
|
parameters: [data, definition],
|
|
@@ -3495,39 +3417,39 @@ function ControlValue({
|
|
|
3495
3417
|
parameters: [data],
|
|
3496
3418
|
children: (value) => children(value)
|
|
3497
3419
|
}, definition.type);
|
|
3498
|
-
case
|
|
3420
|
+
case reactPage.ShapeControlType:
|
|
3499
3421
|
return /* @__PURE__ */ jsxRuntime.jsx(ShapeControlValue, {
|
|
3500
3422
|
definition,
|
|
3501
3423
|
data,
|
|
3502
3424
|
control,
|
|
3503
3425
|
children: (value) => children(value)
|
|
3504
3426
|
});
|
|
3505
|
-
case
|
|
3427
|
+
case reactPage.ListControlType:
|
|
3506
3428
|
return /* @__PURE__ */ jsxRuntime.jsx(ListControlValue, {
|
|
3507
3429
|
definition,
|
|
3508
3430
|
data,
|
|
3509
3431
|
control,
|
|
3510
3432
|
children: (value) => children(value)
|
|
3511
3433
|
});
|
|
3512
|
-
case
|
|
3434
|
+
case reactPage.SlotControlType:
|
|
3513
3435
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3514
3436
|
hook: useSlot,
|
|
3515
3437
|
parameters: [data, control],
|
|
3516
3438
|
children: (value) => children(value)
|
|
3517
3439
|
}, definition.type);
|
|
3518
|
-
case
|
|
3440
|
+
case reactPage.RichTextControlType:
|
|
3519
3441
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3520
3442
|
hook: useRichText,
|
|
3521
3443
|
parameters: [data, control],
|
|
3522
3444
|
children: (value) => children(value)
|
|
3523
3445
|
}, definition.type);
|
|
3524
|
-
case
|
|
3446
|
+
case reactPage.RichTextV2ControlType:
|
|
3525
3447
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3526
3448
|
hook: useRichTextV2,
|
|
3527
3449
|
parameters: [data, control],
|
|
3528
3450
|
children: (value) => children(value)
|
|
3529
3451
|
}, definition.type);
|
|
3530
|
-
case
|
|
3452
|
+
case reactPage.StyleControlType:
|
|
3531
3453
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3532
3454
|
hook: useFormattedStyle,
|
|
3533
3455
|
parameters: [data, definition, control],
|
|
@@ -3563,13 +3485,13 @@ function PropsValue({
|
|
|
3563
3485
|
}) {
|
|
3564
3486
|
var _a;
|
|
3565
3487
|
const store = useStore();
|
|
3566
|
-
const propControllerDescriptorsRef = React.useRef((_a =
|
|
3488
|
+
const propControllerDescriptorsRef = React.useRef((_a = reactPage.getComponentPropControllerDescriptors(store.getState(), element.type)) != null ? _a : {});
|
|
3567
3489
|
const props = element.props;
|
|
3568
3490
|
const documentKey = useDocumentKey();
|
|
3569
3491
|
const propControllers = useSelector((state) => {
|
|
3570
3492
|
if (documentKey == null)
|
|
3571
3493
|
return null;
|
|
3572
|
-
return
|
|
3494
|
+
return reactPage.getPropControllers(state, documentKey, element.key);
|
|
3573
3495
|
});
|
|
3574
3496
|
return Object.entries(propControllerDescriptorsRef.current).reduceRight((renderFn, [propName, descriptor]) => (propsValue) => {
|
|
3575
3497
|
var _a2, _b, _c2, _d;
|
|
@@ -3578,13 +3500,13 @@ function PropsValue({
|
|
|
3578
3500
|
case textInput.NumberControlType:
|
|
3579
3501
|
case textInput.TextInputControlType:
|
|
3580
3502
|
case textInput.TextAreaControlType:
|
|
3581
|
-
case
|
|
3582
|
-
case
|
|
3583
|
-
case
|
|
3503
|
+
case select.SelectControlType:
|
|
3504
|
+
case reactPage.ColorControlType:
|
|
3505
|
+
case reactPage.ImageControlType:
|
|
3584
3506
|
case combobox.ComboboxControlType:
|
|
3585
|
-
case
|
|
3586
|
-
case
|
|
3587
|
-
case
|
|
3507
|
+
case reactPage.ShapeControlType:
|
|
3508
|
+
case reactPage.ListControlType:
|
|
3509
|
+
case reactPage.LinkControlType:
|
|
3588
3510
|
return /* @__PURE__ */ jsxRuntime.jsx(ControlValue, {
|
|
3589
3511
|
definition: descriptor,
|
|
3590
3512
|
data: props[propName],
|
|
@@ -3593,7 +3515,7 @@ function PropsValue({
|
|
|
3593
3515
|
[propName]: value
|
|
3594
3516
|
}))
|
|
3595
3517
|
});
|
|
3596
|
-
case
|
|
3518
|
+
case reactPage.StyleControlType: {
|
|
3597
3519
|
const control = (_a2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _a2 : null;
|
|
3598
3520
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3599
3521
|
hook: useFormattedStyle,
|
|
@@ -3603,7 +3525,7 @@ function PropsValue({
|
|
|
3603
3525
|
}))
|
|
3604
3526
|
}, descriptor.type);
|
|
3605
3527
|
}
|
|
3606
|
-
case
|
|
3528
|
+
case reactPage.RichTextControlType: {
|
|
3607
3529
|
const control = (_b = propControllers == null ? void 0 : propControllers[propName]) != null ? _b : null;
|
|
3608
3530
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3609
3531
|
hook: useRichText,
|
|
@@ -3613,7 +3535,7 @@ function PropsValue({
|
|
|
3613
3535
|
}))
|
|
3614
3536
|
}, descriptor.type);
|
|
3615
3537
|
}
|
|
3616
|
-
case
|
|
3538
|
+
case reactPage.RichTextV2ControlType: {
|
|
3617
3539
|
const control = (_c2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _c2 : null;
|
|
3618
3540
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3619
3541
|
hook: useRichTextV2,
|
|
@@ -3623,7 +3545,7 @@ function PropsValue({
|
|
|
3623
3545
|
}))
|
|
3624
3546
|
}, descriptor.type);
|
|
3625
3547
|
}
|
|
3626
|
-
case
|
|
3548
|
+
case reactPage.SlotControlType: {
|
|
3627
3549
|
const control = (_d = propControllers == null ? void 0 : propControllers[propName]) != null ? _d : null;
|
|
3628
3550
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3629
3551
|
hook: useSlot,
|
|
@@ -3633,9 +3555,9 @@ function PropsValue({
|
|
|
3633
3555
|
}))
|
|
3634
3556
|
}, descriptor.type);
|
|
3635
3557
|
}
|
|
3636
|
-
case
|
|
3558
|
+
case reactPage.Types.Width:
|
|
3637
3559
|
switch (descriptor.options.format) {
|
|
3638
|
-
case
|
|
3560
|
+
case reactPage.WidthPropControllerFormat.ClassName:
|
|
3639
3561
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3640
3562
|
hook: useWidthStyle,
|
|
3641
3563
|
parameters: [props[propName], descriptor],
|
|
@@ -3648,9 +3570,9 @@ function PropsValue({
|
|
|
3648
3570
|
[propName]: props[propName]
|
|
3649
3571
|
}));
|
|
3650
3572
|
}
|
|
3651
|
-
case
|
|
3573
|
+
case reactPage.Types.Padding:
|
|
3652
3574
|
switch (descriptor.options.format) {
|
|
3653
|
-
case
|
|
3575
|
+
case reactPage.PaddingPropControllerFormat.ClassName:
|
|
3654
3576
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3655
3577
|
hook: usePaddingStyle,
|
|
3656
3578
|
parameters: [props[propName]],
|
|
@@ -3663,9 +3585,9 @@ function PropsValue({
|
|
|
3663
3585
|
[propName]: props[propName]
|
|
3664
3586
|
}));
|
|
3665
3587
|
}
|
|
3666
|
-
case
|
|
3588
|
+
case reactPage.Types.Margin:
|
|
3667
3589
|
switch (descriptor.options.format) {
|
|
3668
|
-
case
|
|
3590
|
+
case reactPage.MarginPropControllerFormat.ClassName:
|
|
3669
3591
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3670
3592
|
hook: useMarginStyle,
|
|
3671
3593
|
parameters: [props[propName]],
|
|
@@ -3678,9 +3600,9 @@ function PropsValue({
|
|
|
3678
3600
|
[propName]: props[propName]
|
|
3679
3601
|
}));
|
|
3680
3602
|
}
|
|
3681
|
-
case
|
|
3603
|
+
case reactPage.Types.BorderRadius:
|
|
3682
3604
|
switch (descriptor.options.format) {
|
|
3683
|
-
case
|
|
3605
|
+
case reactPage.BorderRadiusPropControllerFormat.ClassName:
|
|
3684
3606
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3685
3607
|
hook: useBorderRadiusStyle,
|
|
3686
3608
|
parameters: [props[propName]],
|
|
@@ -3693,9 +3615,9 @@ function PropsValue({
|
|
|
3693
3615
|
[propName]: props[propName]
|
|
3694
3616
|
}));
|
|
3695
3617
|
}
|
|
3696
|
-
case
|
|
3618
|
+
case reactPage.Types.Shadows:
|
|
3697
3619
|
switch (descriptor.options.format) {
|
|
3698
|
-
case
|
|
3620
|
+
case reactPage.ShadowsPropControllerFormat.ClassName:
|
|
3699
3621
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3700
3622
|
hook: useShadowsStyle,
|
|
3701
3623
|
parameters: [props[propName]],
|
|
@@ -3708,9 +3630,9 @@ function PropsValue({
|
|
|
3708
3630
|
[propName]: props[propName]
|
|
3709
3631
|
}));
|
|
3710
3632
|
}
|
|
3711
|
-
case
|
|
3633
|
+
case reactPage.Types.Border:
|
|
3712
3634
|
switch (descriptor.options.format) {
|
|
3713
|
-
case
|
|
3635
|
+
case reactPage.BorderPropControllerFormat.ClassName:
|
|
3714
3636
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3715
3637
|
hook: useBorderStyle,
|
|
3716
3638
|
parameters: [props[propName]],
|
|
@@ -3723,7 +3645,7 @@ function PropsValue({
|
|
|
3723
3645
|
[propName]: props[propName]
|
|
3724
3646
|
}));
|
|
3725
3647
|
}
|
|
3726
|
-
case
|
|
3648
|
+
case reactPage.Types.ResponsiveColor:
|
|
3727
3649
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3728
3650
|
hook: useResponsiveColor,
|
|
3729
3651
|
parameters: [props[propName]],
|
|
@@ -3789,7 +3711,7 @@ class ElementImperativeHandle {
|
|
|
3789
3711
|
}
|
|
3790
3712
|
setPropControllers(propControllers) {
|
|
3791
3713
|
const current = this.getCurrent();
|
|
3792
|
-
if (
|
|
3714
|
+
if (reactPage.isPropControllersHandle(current))
|
|
3793
3715
|
current.setPropControllers(propControllers);
|
|
3794
3716
|
this.lastPropControllers = propControllers;
|
|
3795
3717
|
}
|
|
@@ -3811,7 +3733,7 @@ class ReactRuntime {
|
|
|
3811
3733
|
breakpoints
|
|
3812
3734
|
}) {
|
|
3813
3735
|
__publicField(this, "store");
|
|
3814
|
-
this.store =
|
|
3736
|
+
this.store = reactPage.configureStore({
|
|
3815
3737
|
breakpoints: breakpoints ? state_breakpoints.parseBreakpointsInput(breakpoints) : void 0
|
|
3816
3738
|
});
|
|
3817
3739
|
registerBuiltinComponents(this);
|
|
@@ -3835,10 +3757,10 @@ class ReactRuntime {
|
|
|
3835
3757
|
};
|
|
3836
3758
|
}
|
|
3837
3759
|
static copyElementTree(elementTree2, replacementContext) {
|
|
3838
|
-
return
|
|
3760
|
+
return reactPage.copyElementTree(this.store.getState(), elementTree2, replacementContext);
|
|
3839
3761
|
}
|
|
3840
3762
|
static getBreakpoints() {
|
|
3841
|
-
return
|
|
3763
|
+
return reactPage.getBreakpoints(this.store.getState());
|
|
3842
3764
|
}
|
|
3843
3765
|
registerComponent(component, {
|
|
3844
3766
|
type,
|
|
@@ -3859,13 +3781,13 @@ class ReactRuntime {
|
|
|
3859
3781
|
};
|
|
3860
3782
|
}
|
|
3861
3783
|
copyElementTree(elementTree2, replacementContext) {
|
|
3862
|
-
return
|
|
3784
|
+
return reactPage.copyElementTree(this.store.getState(), elementTree2, replacementContext);
|
|
3863
3785
|
}
|
|
3864
3786
|
getBreakpoints() {
|
|
3865
|
-
return
|
|
3787
|
+
return reactPage.getBreakpoints(this.store.getState());
|
|
3866
3788
|
}
|
|
3867
3789
|
}
|
|
3868
|
-
__publicField(ReactRuntime, "store",
|
|
3790
|
+
__publicField(ReactRuntime, "store", reactPage.configureStore());
|
|
3869
3791
|
registerBuiltinComponents(ReactRuntime);
|
|
3870
3792
|
const StoreContext = React.createContext(ReactRuntime.store);
|
|
3871
3793
|
const PreviewProvider = dynamic__default["default"](() => Promise.resolve().then(function() {
|
|
@@ -3914,26 +3836,26 @@ function useSelector(selector) {
|
|
|
3914
3836
|
return withSelector.useSyncExternalStoreWithSelector(store.subscribe, store.getState, store.getState, selector);
|
|
3915
3837
|
}
|
|
3916
3838
|
function useComponent(type) {
|
|
3917
|
-
return useSelector((state) =>
|
|
3839
|
+
return useSelector((state) => reactPage.getReactComponent(state, type));
|
|
3918
3840
|
}
|
|
3919
3841
|
function useElementId(elementKey) {
|
|
3920
3842
|
const documentKey = useDocumentKey();
|
|
3921
|
-
return useSelector((state) => documentKey == null || elementKey == null ? null :
|
|
3843
|
+
return useSelector((state) => documentKey == null || elementKey == null ? null : reactPage.getElementId(state, documentKey, elementKey));
|
|
3922
3844
|
}
|
|
3923
3845
|
function useDocument(documentKey) {
|
|
3924
|
-
return useSelector((state) =>
|
|
3846
|
+
return useSelector((state) => reactPage.getDocument(state, documentKey));
|
|
3925
3847
|
}
|
|
3926
3848
|
function useIsInBuilder() {
|
|
3927
|
-
return useSelector((state) =>
|
|
3849
|
+
return useSelector((state) => reactPage.getIsInBuilder(state));
|
|
3928
3850
|
}
|
|
3929
3851
|
function useIsPreview() {
|
|
3930
|
-
return useSelector((state) =>
|
|
3852
|
+
return useSelector((state) => reactPage.getIsPreview(state));
|
|
3931
3853
|
}
|
|
3932
3854
|
function useBuilderEditMode() {
|
|
3933
|
-
return useSelector((state) =>
|
|
3855
|
+
return useSelector((state) => reactPage.getBuilderEditMode(state));
|
|
3934
3856
|
}
|
|
3935
3857
|
function useBreakpoints() {
|
|
3936
|
-
return useSelector((state) =>
|
|
3858
|
+
return useSelector((state) => reactPage.getBreakpoints(state));
|
|
3937
3859
|
}
|
|
3938
3860
|
function useDispatch() {
|
|
3939
3861
|
const store = React.useContext(StoreContext);
|
|
@@ -4043,7 +3965,7 @@ const Element$1 = React.memo(React.forwardRef(function Element2({
|
|
|
4043
3965
|
}, [dispatch, documentKey, elementKey, isRegisterElementDisabled]);
|
|
4044
3966
|
return /* @__PURE__ */ jsxRuntime.jsx(FindDomNode, {
|
|
4045
3967
|
ref: findDomNodeCallbackRef,
|
|
4046
|
-
children:
|
|
3968
|
+
children: reactPage.isElementReference(element) ? /* @__PURE__ */ jsxRuntime.jsx(ElementReference, {
|
|
4047
3969
|
ref: elementCallbackRef,
|
|
4048
3970
|
elementReference: element
|
|
4049
3971
|
}, elementKey) : /* @__PURE__ */ jsxRuntime.jsx(ElementData, {
|
|
@@ -4121,7 +4043,6 @@ exports.useFiles = useFiles;
|
|
|
4121
4043
|
exports.useFormContext = useFormContext;
|
|
4122
4044
|
exports.useIsInBuilder = useIsInBuilder;
|
|
4123
4045
|
exports.useIsPreview = useIsPreview;
|
|
4124
|
-
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
|
|
4125
4046
|
exports.useMakeswiftClient = useMakeswiftClient;
|
|
4126
4047
|
exports.usePageId = usePageId;
|
|
4127
4048
|
exports.usePagePathnameSlice = usePagePathnameSlice;
|