@builder.io/sdk-react 0.2.1 → 0.2.3-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/react/blocks/BaseText.d.ts +2 -0
- package/dist/react/blocks/BaseText.js +1 -0
- package/dist/react/blocks/button/button.d.ts +2 -0
- package/dist/react/blocks/button/button.js +1 -0
- package/dist/react/blocks/button/component-info.d.ts +38 -0
- package/dist/react/blocks/columns/columns.d.ts +2 -0
- package/dist/react/blocks/columns/columns.js +1 -0
- package/dist/react/blocks/columns/component-info.d.ts +176 -0
- package/dist/react/blocks/custom-code/component-info.d.ts +31 -0
- package/dist/react/blocks/custom-code/custom-code.d.ts +2 -0
- package/dist/react/blocks/custom-code/custom-code.js +1 -0
- package/dist/react/blocks/embed/component-info.d.ts +22 -0
- package/dist/react/blocks/embed/embed.d.ts +2 -0
- package/dist/react/blocks/embed/embed.js +1 -0
- package/dist/react/blocks/embed/helpers.d.ts +1 -0
- package/dist/react/blocks/form/component-info.d.ts +235 -0
- package/dist/react/blocks/form/form.d.ts +2 -0
- package/dist/react/blocks/form/form.js +1 -0
- package/dist/react/blocks/fragment/component-info.d.ts +8 -0
- package/dist/react/blocks/fragment/fragment.d.ts +2 -0
- package/dist/react/blocks/fragment/fragment.js +1 -0
- package/dist/react/blocks/image/component-info.d.ts +114 -0
- package/dist/react/blocks/image/image.d.ts +2 -0
- package/dist/react/blocks/image/image.helpers.d.ts +1 -0
- package/dist/react/blocks/image/image.js +1 -0
- package/dist/react/blocks/img/component-info.d.ts +15 -0
- package/dist/react/blocks/img/img.d.ts +2 -0
- package/dist/react/blocks/img/img.js +1 -0
- package/dist/react/blocks/input/component-info.d.ts +66 -0
- package/dist/react/blocks/input/input.d.ts +2 -0
- package/dist/react/blocks/input/input.js +1 -0
- package/dist/react/blocks/raw-text/component-info.d.ts +10 -0
- package/dist/react/blocks/raw-text/raw-text.d.ts +2 -0
- package/dist/react/blocks/raw-text/raw-text.js +1 -0
- package/dist/react/blocks/section/component-info.d.ts +43 -0
- package/dist/react/blocks/section/section.d.ts +2 -0
- package/dist/react/blocks/section/section.js +1 -0
- package/dist/react/blocks/select/component-info.d.ts +61 -0
- package/dist/react/blocks/select/select.d.ts +2 -0
- package/dist/react/blocks/select/select.js +1 -0
- package/dist/react/blocks/submit-button/component-info.d.ts +23 -0
- package/dist/react/blocks/submit-button/submit-button.d.ts +2 -0
- package/dist/react/blocks/submit-button/submit-button.js +1 -0
- package/dist/react/blocks/symbol/component-info.d.ts +35 -0
- package/dist/react/blocks/symbol/symbol.d.ts +2 -0
- package/dist/react/blocks/symbol/symbol.js +3 -1
- package/dist/react/blocks/text/component-info.d.ts +19 -0
- package/dist/react/blocks/text/text.d.ts +2 -0
- package/dist/react/blocks/text/text.js +1 -0
- package/dist/react/blocks/textarea/component-info.d.ts +53 -0
- package/dist/react/blocks/textarea/textarea.d.ts +2 -0
- package/dist/react/blocks/textarea/textarea.js +1 -0
- package/dist/react/blocks/util.d.ts +1 -0
- package/dist/react/blocks/video/component-info.d.ts +80 -0
- package/dist/react/blocks/video/video.d.ts +2 -0
- package/dist/react/blocks/video/video.js +1 -0
- package/dist/react/components/render-block/block-styles.d.ts +2 -0
- package/dist/react/components/render-block/block-styles.js +1 -0
- package/dist/react/components/render-block/render-block.d.ts +2 -0
- package/dist/react/components/render-block/render-block.helpers.d.ts +13 -0
- package/dist/react/components/render-block/render-block.js +3 -3
- package/dist/react/components/render-block/render-component.d.ts +2 -0
- package/dist/react/components/render-block/render-component.js +1 -0
- package/dist/react/components/render-block/render-repeated-block.d.ts +2 -0
- package/dist/react/components/render-block/render-repeated-block.js +1 -0
- package/dist/react/components/render-blocks.d.ts +2 -0
- package/dist/react/components/render-blocks.js +1 -0
- package/dist/react/components/render-content/builder-editing.d.ts +2 -0
- package/dist/react/components/render-content/builder-editing.js +1 -0
- package/dist/react/components/render-content/components/render-styles.d.ts +2 -0
- package/dist/react/components/render-content/components/render-styles.helpers.d.ts +7 -0
- package/dist/react/components/render-content/components/render-styles.js +1 -0
- package/dist/react/components/render-content/index.d.ts +2 -0
- package/dist/react/components/render-content/render-content.d.ts +2 -0
- package/dist/react/components/render-content/render-content.helpers.d.ts +9 -0
- package/dist/react/components/render-content/render-content.js +9 -7
- package/dist/react/components/render-content-variants/helpers.js +98 -0
- package/dist/react/components/render-content-variants/render-content-variants.js +45 -0
- package/dist/react/components/render-inlined-styles.d.ts +2 -0
- package/dist/react/components/render-inlined-styles.js +1 -0
- package/dist/react/constants/builder-registered-components.d.ts +1 -0
- package/dist/react/constants/device-sizes.d.ts +21 -0
- package/dist/react/constants/target.d.ts +1 -0
- package/dist/react/context/builder.context.d.ts +11 -0
- package/dist/react/functions/camel-to-kebab-case.d.ts +1 -0
- package/dist/react/functions/evaluate.d.ts +7 -0
- package/dist/react/functions/event-handler-name.d.ts +1 -0
- package/dist/react/functions/extract-text-styles.d.ts +1 -0
- package/dist/react/functions/fast-clone.d.ts +1 -0
- package/dist/react/functions/get-block-actions-handler.d.ts +1 -0
- package/dist/react/functions/get-block-actions.d.ts +1 -0
- package/dist/react/functions/get-block-component-options.d.ts +1 -0
- package/dist/react/functions/get-block-properties.d.ts +1 -0
- package/dist/react/functions/get-block-properties.js +4 -1
- package/dist/react/functions/get-builder-search-params/fn.test.d.ts +1 -0
- package/dist/react/functions/get-builder-search-params/index.d.ts +4 -0
- package/dist/react/functions/get-content/ab-testing.d.ts +1 -0
- package/dist/react/functions/get-content/generate-content-url.d.ts +1 -0
- package/dist/react/functions/get-content/generate-content-url.test.d.ts +1 -0
- package/dist/react/functions/get-content/index.d.ts +2 -0
- package/dist/react/functions/get-content/index.js +22 -15
- package/dist/react/functions/get-fetch.d.ts +1 -0
- package/dist/react/functions/get-global-this.d.ts +1 -0
- package/dist/react/functions/get-processed-block.d.ts +6 -0
- package/dist/react/functions/get-processed-block.test.d.ts +1 -0
- package/dist/react/functions/get-react-native-block-styles.d.ts +5 -0
- package/dist/react/functions/if-target.d.ts +5 -0
- package/dist/react/functions/is-browser.d.ts +1 -0
- package/dist/react/functions/is-editing.d.ts +1 -0
- package/dist/react/functions/is-iframe.d.ts +1 -0
- package/dist/react/functions/is-previewing.d.ts +1 -0
- package/dist/react/functions/on-change.d.ts +2 -0
- package/dist/react/functions/on-change.test.d.ts +1 -0
- package/dist/react/functions/register-component.d.ts +6 -0
- package/dist/react/functions/register.d.ts +1 -0
- package/dist/react/functions/sanitize-react-native-block-styles.d.ts +1 -0
- package/dist/react/functions/set-editor-settings.d.ts +1 -0
- package/dist/react/functions/set.d.ts +1 -0
- package/dist/react/functions/set.test.d.ts +1 -0
- package/dist/react/functions/track/helpers.d.ts +5 -0
- package/dist/react/functions/track/index.d.ts +2 -0
- package/dist/react/functions/track/index.js +2 -1
- package/dist/react/functions/track/interaction.d.ts +14 -0
- package/dist/react/functions/transform-block-properties.d.ts +1 -0
- package/dist/react/functions/transform-block.d.ts +1 -0
- package/dist/react/helpers/ab-tests.d.ts +9 -0
- package/dist/react/helpers/cookie.d.ts +2 -0
- package/dist/react/helpers/css.d.ts +7 -0
- package/dist/react/helpers/flatten.d.ts +1 -0
- package/dist/react/helpers/localStorage.d.ts +9 -0
- package/dist/react/helpers/logger.d.ts +5 -0
- package/dist/react/helpers/logger.js +7 -0
- package/dist/react/helpers/nullable.d.ts +1 -0
- package/dist/react/helpers/sessionId.d.ts +6 -0
- package/dist/react/helpers/time.d.ts +1 -0
- package/dist/react/helpers/url.d.ts +1 -0
- package/dist/react/helpers/url.test.d.ts +1 -0
- package/dist/react/helpers/uuid.d.ts +2 -0
- package/dist/react/helpers/visitorId.d.ts +8 -0
- package/dist/react/index-helpers/blocks-exports.d.ts +11 -0
- package/dist/react/index-helpers/top-of-file.d.ts +2 -0
- package/{src/index.js → dist/react/index.d.ts} +2 -5
- package/dist/react/scripts/init-editing.d.ts +2 -0
- package/dist/react/types/api-version.d.ts +1 -0
- package/dist/react/types/targets.d.ts +0 -0
- package/dist/react/types/typescript.d.ts +0 -0
- package/dist/rsc/blocks/BaseText.d.ts +2 -0
- package/dist/rsc/blocks/button/button.d.ts +2 -0
- package/dist/rsc/blocks/button/component-info.d.ts +38 -0
- package/dist/rsc/blocks/columns/columns.d.ts +2 -0
- package/dist/rsc/blocks/columns/component-info.d.ts +176 -0
- package/dist/rsc/blocks/custom-code/component-info.d.ts +31 -0
- package/dist/rsc/blocks/custom-code/custom-code.d.ts +2 -0
- package/dist/rsc/blocks/embed/component-info.d.ts +22 -0
- package/dist/rsc/blocks/embed/embed.d.ts +2 -0
- package/dist/rsc/blocks/embed/helpers.d.ts +1 -0
- package/dist/rsc/blocks/form/component-info.d.ts +235 -0
- package/dist/rsc/blocks/form/form.d.ts +2 -0
- package/dist/rsc/blocks/fragment/component-info.d.ts +8 -0
- package/dist/rsc/blocks/fragment/fragment.d.ts +2 -0
- package/dist/rsc/blocks/image/component-info.d.ts +114 -0
- package/dist/rsc/blocks/image/image.d.ts +2 -0
- package/dist/rsc/blocks/image/image.helpers.d.ts +1 -0
- package/dist/rsc/blocks/img/component-info.d.ts +15 -0
- package/dist/rsc/blocks/img/img.d.ts +2 -0
- package/dist/rsc/blocks/input/component-info.d.ts +66 -0
- package/dist/rsc/blocks/input/input.d.ts +2 -0
- package/dist/rsc/blocks/raw-text/component-info.d.ts +10 -0
- package/dist/rsc/blocks/raw-text/raw-text.d.ts +2 -0
- package/dist/rsc/blocks/section/component-info.d.ts +43 -0
- package/dist/rsc/blocks/section/section.d.ts +2 -0
- package/dist/rsc/blocks/select/component-info.d.ts +61 -0
- package/dist/rsc/blocks/select/select.d.ts +2 -0
- package/dist/rsc/blocks/submit-button/component-info.d.ts +23 -0
- package/dist/rsc/blocks/submit-button/submit-button.d.ts +2 -0
- package/dist/rsc/blocks/symbol/component-info.d.ts +35 -0
- package/dist/rsc/blocks/symbol/symbol.d.ts +2 -0
- package/dist/rsc/blocks/symbol/symbol.js +2 -1
- package/dist/rsc/blocks/text/component-info.d.ts +19 -0
- package/dist/rsc/blocks/text/text.d.ts +2 -0
- package/dist/rsc/blocks/textarea/component-info.d.ts +53 -0
- package/dist/rsc/blocks/textarea/textarea.d.ts +2 -0
- package/dist/rsc/blocks/util.d.ts +1 -0
- package/dist/rsc/blocks/video/component-info.d.ts +80 -0
- package/dist/rsc/blocks/video/video.d.ts +2 -0
- package/dist/rsc/components/render-block/block-styles.d.ts +2 -0
- package/dist/rsc/components/render-block/render-block.d.ts +2 -0
- package/dist/rsc/components/render-block/render-block.helpers.d.ts +10 -0
- package/dist/rsc/components/render-block/render-block.js +2 -3
- package/dist/rsc/components/render-block/render-component.d.ts +2 -0
- package/dist/rsc/components/render-block/render-repeated-block.d.ts +2 -0
- package/dist/rsc/components/render-block/types.d.ts +0 -0
- package/dist/rsc/components/render-blocks.d.ts +2 -0
- package/dist/rsc/components/render-content/builder-editing.d.ts +27 -0
- package/dist/rsc/components/render-content/components/render-styles.d.ts +2 -0
- package/dist/rsc/components/render-content/components/render-styles.helpers.d.ts +7 -0
- package/dist/rsc/components/render-content/index.d.ts +2 -0
- package/dist/rsc/components/render-content/render-content.d.ts +2 -0
- package/dist/rsc/components/render-content/render-content.helpers.d.ts +9 -0
- package/dist/rsc/components/render-content/render-content.js +1 -0
- package/dist/rsc/components/render-content/render-content.types.d.ts +0 -0
- package/dist/rsc/components/render-content-variants/helpers.js +99 -0
- package/dist/rsc/components/render-content-variants/render-content-variants.js +45 -0
- package/dist/rsc/components/render-inlined-styles.d.ts +2 -0
- package/dist/rsc/constants/builder-registered-components.d.ts +1 -0
- package/dist/rsc/constants/device-sizes.d.ts +21 -0
- package/dist/rsc/constants/target.d.ts +1 -0
- package/dist/rsc/context/builder.context.d.ts +11 -0
- package/dist/rsc/context/types.d.ts +0 -0
- package/dist/rsc/functions/camel-to-kebab-case.d.ts +1 -0
- package/dist/rsc/functions/evaluate.d.ts +1 -0
- package/dist/rsc/functions/event-handler-name.d.ts +1 -0
- package/dist/rsc/functions/extract-text-styles.d.ts +1 -0
- package/dist/rsc/functions/fast-clone.d.ts +1 -0
- package/dist/rsc/functions/get-block-actions-handler.d.ts +1 -0
- package/dist/rsc/functions/get-block-actions.d.ts +1 -0
- package/dist/rsc/functions/get-block-component-options.d.ts +1 -0
- package/dist/rsc/functions/get-block-properties.d.ts +1 -0
- package/dist/rsc/functions/get-block-properties.js +4 -1
- package/dist/rsc/functions/get-builder-search-params/fn.test.d.ts +1 -0
- package/dist/rsc/functions/get-builder-search-params/index.d.ts +4 -0
- package/dist/rsc/functions/get-content/ab-testing.d.ts +1 -0
- package/dist/rsc/functions/get-content/generate-content-url.d.ts +1 -0
- package/dist/rsc/functions/get-content/generate-content-url.test.d.ts +1 -0
- package/dist/rsc/functions/get-content/index.d.ts +2 -0
- package/dist/rsc/functions/get-content/index.js +22 -15
- package/dist/rsc/functions/get-content/types.d.ts +0 -0
- package/dist/rsc/functions/get-fetch.d.ts +1 -0
- package/dist/rsc/functions/get-global-this.d.ts +1 -0
- package/dist/rsc/functions/get-processed-block.d.ts +6 -0
- package/dist/rsc/functions/get-processed-block.test.d.ts +1 -0
- package/dist/rsc/functions/get-react-native-block-styles.d.ts +5 -0
- package/dist/rsc/functions/if-target.d.ts +5 -0
- package/dist/rsc/functions/is-browser.d.ts +1 -0
- package/dist/rsc/functions/is-editing.d.ts +1 -0
- package/dist/rsc/functions/is-iframe.d.ts +1 -0
- package/dist/rsc/functions/is-previewing.d.ts +1 -0
- package/dist/rsc/functions/on-change.d.ts +2 -0
- package/dist/rsc/functions/on-change.test.d.ts +1 -0
- package/dist/rsc/functions/register-component.d.ts +6 -0
- package/dist/rsc/functions/register.d.ts +1 -0
- package/dist/rsc/functions/sanitize-react-native-block-styles.d.ts +1 -0
- package/dist/rsc/functions/set-editor-settings.d.ts +1 -0
- package/dist/rsc/functions/set.d.ts +1 -0
- package/dist/rsc/functions/set.test.d.ts +1 -0
- package/dist/rsc/functions/track/helpers.d.ts +5 -0
- package/dist/rsc/functions/track/index.d.ts +2 -0
- package/dist/rsc/functions/track/index.js +2 -1
- package/dist/rsc/functions/track/interaction.d.ts +14 -0
- package/dist/rsc/functions/transform-block-properties.d.ts +1 -0
- package/dist/rsc/functions/transform-block.d.ts +1 -0
- package/dist/rsc/helpers/ab-tests.d.ts +9 -0
- package/dist/rsc/helpers/cookie.d.ts +2 -0
- package/dist/rsc/helpers/css.d.ts +7 -0
- package/dist/rsc/helpers/flatten.d.ts +1 -0
- package/dist/rsc/helpers/localStorage.d.ts +9 -0
- package/dist/rsc/helpers/logger.d.ts +5 -0
- package/dist/rsc/helpers/logger.js +7 -0
- package/dist/rsc/helpers/nullable.d.ts +1 -0
- package/dist/rsc/helpers/sessionId.d.ts +6 -0
- package/dist/rsc/helpers/time.d.ts +1 -0
- package/dist/rsc/helpers/url.d.ts +1 -0
- package/dist/rsc/helpers/url.test.d.ts +1 -0
- package/dist/rsc/helpers/uuid.d.ts +2 -0
- package/dist/rsc/helpers/visitorId.d.ts +8 -0
- package/dist/rsc/index-helpers/blocks-exports.d.ts +11 -0
- package/dist/rsc/index-helpers/top-of-file.d.ts +2 -0
- package/dist/rsc/index.d.ts +11 -0
- package/dist/rsc/scripts/init-editing.d.ts +2 -0
- package/dist/rsc/types/api-version.d.ts +1 -0
- package/dist/rsc/types/builder-block.d.ts +0 -0
- package/dist/rsc/types/builder-content.d.ts +0 -0
- package/dist/rsc/types/can-track.d.ts +0 -0
- package/dist/rsc/types/components.d.ts +0 -0
- package/dist/rsc/types/deep-partial.d.ts +0 -0
- package/dist/rsc/types/element.d.ts +0 -0
- package/dist/rsc/types/input.d.ts +0 -0
- package/dist/rsc/types/targets.d.ts +0 -0
- package/dist/rsc/types/typescript.d.ts +0 -0
- package/package.json +4 -10
- package/packages/react/src/blocks/BaseText.jsx +1 -0
- package/packages/react/src/blocks/button/button.jsx +1 -0
- package/packages/react/src/blocks/columns/columns.jsx +1 -0
- package/packages/react/src/blocks/custom-code/custom-code.jsx +1 -0
- package/packages/react/src/blocks/embed/embed.jsx +1 -0
- package/packages/react/src/blocks/form/form.jsx +1 -0
- package/packages/react/src/blocks/fragment/fragment.jsx +1 -0
- package/packages/react/src/blocks/image/image.jsx +1 -0
- package/packages/react/src/blocks/img/img.jsx +1 -0
- package/packages/react/src/blocks/input/input.jsx +1 -0
- package/packages/react/src/blocks/raw-text/raw-text.jsx +1 -0
- package/packages/react/src/blocks/section/section.jsx +1 -0
- package/packages/react/src/blocks/select/select.jsx +1 -0
- package/packages/react/src/blocks/submit-button/submit-button.jsx +1 -0
- package/packages/react/src/blocks/symbol/symbol.jsx +3 -1
- package/packages/react/src/blocks/text/text.jsx +1 -0
- package/packages/react/src/blocks/textarea/textarea.jsx +1 -0
- package/packages/react/src/blocks/video/video.jsx +1 -0
- package/packages/react/src/components/render-block/block-styles.jsx +1 -0
- package/packages/react/src/components/render-block/render-block.jsx +3 -3
- package/packages/react/src/components/render-block/render-component.jsx +1 -0
- package/packages/react/src/components/render-block/render-repeated-block.jsx +1 -0
- package/packages/react/src/components/render-blocks.jsx +1 -0
- package/packages/react/src/components/render-content/builder-editing.jsx +1 -0
- package/packages/react/src/components/render-content/components/render-styles.jsx +1 -0
- package/packages/react/src/components/render-content/render-content.jsx +12 -8
- package/packages/react/src/components/render-inlined-styles.jsx +1 -0
- package/packages/react/src/functions/get-block-properties.js +4 -1
- package/packages/react/src/functions/get-content/index.js +21 -15
- package/packages/react/src/functions/track/index.js +2 -1
- package/packages/react/src/helpers/logger.js +9 -0
- package/packages/rsc/src/blocks/symbol/symbol.jsx +2 -4
- package/packages/rsc/src/components/render-block/render-block.jsx +2 -3
- package/packages/rsc/src/components/render-content/render-content.jsx +1 -0
- package/packages/rsc/src/functions/get-block-properties.js +4 -1
- package/packages/rsc/src/functions/get-content/index.js +21 -15
- package/packages/rsc/src/functions/track/index.js +2 -1
- package/packages/rsc/src/helpers/logger.js +9 -0
- package/tsconfig.base.json +8 -3
- package/src/blocks/BaseText.jsx +0 -9
- package/src/blocks/button/button.jsx +0 -27
- package/src/blocks/button/component-info.js +0 -41
- package/src/blocks/columns/columns.jsx +0 -172
- package/src/blocks/columns/component-info.js +0 -242
- package/src/blocks/custom-code/component-info.js +0 -31
- package/src/blocks/custom-code/custom-code.jsx +0 -64
- package/src/blocks/embed/component-info.js +0 -44
- package/src/blocks/embed/embed.jsx +0 -49
- package/src/blocks/embed/helpers.js +0 -9
- package/src/blocks/form/component-info.js +0 -262
- package/src/blocks/form/form.jsx +0 -253
- package/src/blocks/fragment/component-info.js +0 -11
- package/src/blocks/fragment/fragment.jsx +0 -5
- package/src/blocks/image/component-info.js +0 -151
- package/src/blocks/image/image.helpers.js +0 -48
- package/src/blocks/image/image.jsx +0 -122
- package/src/blocks/img/component-info.js +0 -20
- package/src/blocks/img/img.jsx +0 -17
- package/src/blocks/input/component-info.js +0 -74
- package/src/blocks/input/input.jsx +0 -19
- package/src/blocks/raw-text/component-info.js +0 -16
- package/src/blocks/raw-text/raw-text.jsx +0 -10
- package/src/blocks/section/component-info.js +0 -49
- package/src/blocks/section/section.jsx +0 -27
- package/src/blocks/select/component-info.js +0 -59
- package/src/blocks/select/select.jsx +0 -20
- package/src/blocks/submit-button/component-info.js +0 -28
- package/src/blocks/submit-button/submit-button.jsx +0 -9
- package/src/blocks/symbol/component-info.js +0 -43
- package/src/blocks/symbol/symbol.jsx +0 -84
- package/src/blocks/text/component-info.js +0 -24
- package/src/blocks/text/text.jsx +0 -10
- package/src/blocks/textarea/component-info.js +0 -47
- package/src/blocks/textarea/textarea.jsx +0 -13
- package/src/blocks/util.js +0 -8
- package/src/blocks/video/component-info.js +0 -106
- package/src/blocks/video/video.jsx +0 -58
- package/src/components/render-block/block-styles.jsx +0 -69
- package/src/components/render-block/render-block.helpers.js +0 -23
- package/src/components/render-block/render-block.jsx +0 -252
- package/src/components/render-block/render-component-with-context.jsx +0 -38
- package/src/components/render-block/render-component.jsx +0 -33
- package/src/components/render-block/render-repeated-block.jsx +0 -33
- package/src/components/render-blocks.jsx +0 -89
- package/src/components/render-content/builder-editing.jsx +0 -5
- package/src/components/render-content/components/render-styles.jsx +0 -64
- package/src/components/render-content/index.js +0 -4
- package/src/components/render-content/render-content.jsx +0 -370
- package/src/components/render-inlined-styles.jsx +0 -28
- package/src/constants/builder-registered-components.js +0 -54
- package/src/constants/device-sizes.js +0 -48
- package/src/constants/target.js +0 -4
- package/src/context/builder.context.js +0 -12
- package/src/functions/camel-to-kebab-case.js +0 -4
- package/src/functions/evaluate.js +0 -29
- package/src/functions/event-handler-name.js +0 -7
- package/src/functions/extract-text-styles.js +0 -22
- package/src/functions/fast-clone.js +0 -4
- package/src/functions/get-block-actions-handler.js +0 -11
- package/src/functions/get-block-actions.js +0 -18
- package/src/functions/get-block-component-options.js +0 -28
- package/src/functions/get-block-properties.js +0 -50
- package/src/functions/get-block-tag.js +0 -6
- package/src/functions/get-builder-search-params/fn.test.js +0 -13
- package/src/functions/get-builder-search-params/index.js +0 -38
- package/src/functions/get-content/ab-testing.js +0 -99
- package/src/functions/get-content/generate-content-url.js +0 -55
- package/src/functions/get-content/generate-content-url.test.js +0 -31
- package/src/functions/get-content/index.js +0 -65
- package/src/functions/get-fetch.js +0 -14
- package/src/functions/get-global-this.js +0 -18
- package/src/functions/get-processed-block.js +0 -59
- package/src/functions/get-processed-block.test.js +0 -32
- package/src/functions/get-react-native-block-styles.js +0 -33
- package/src/functions/if-target.js +0 -15
- package/src/functions/is-browser.js +0 -6
- package/src/functions/is-editing.js +0 -7
- package/src/functions/is-iframe.js +0 -7
- package/src/functions/is-previewing.js +0 -14
- package/src/functions/on-change.js +0 -27
- package/src/functions/on-change.test.js +0 -19
- package/src/functions/register-component.js +0 -68
- package/src/functions/register.js +0 -29
- package/src/functions/sanitize-react-native-block-styles.js +0 -66
- package/src/functions/set-editor-settings.js +0 -15
- package/src/functions/set.js +0 -11
- package/src/functions/set.test.js +0 -16
- package/src/functions/track.js +0 -124
- package/src/functions/transform-block-properties.js +0 -6
- package/src/functions/transform-block.js +0 -6
- package/src/helpers/ab-tests.js +0 -16
- package/src/helpers/cookie.js +0 -81
- package/src/helpers/css.js +0 -34
- package/src/helpers/flatten.js +0 -34
- package/src/helpers/localStorage.js +0 -35
- package/src/helpers/nullable.js +0 -4
- package/src/helpers/sessionId.js +0 -52
- package/src/helpers/time.js +0 -5
- package/src/helpers/url.js +0 -13
- package/src/helpers/url.test.js +0 -21
- package/src/helpers/uuid.js +0 -13
- package/src/helpers/visitorId.js +0 -34
- package/src/index-helpers/blocks-exports.js +0 -22
- package/src/index-helpers/top-of-file.js +0 -4
- package/src/scripts/init-editing.js +0 -93
- /package/{src/components/render-block/types.js → dist/react/components/render-block/types.d.ts} +0 -0
- /package/{src/context/types.js → dist/react/components/render-content/render-content.types.d.ts} +0 -0
- /package/{src/functions/get-content/types.js → dist/react/context/types.d.ts} +0 -0
- /package/{src/types/builder-block.js → dist/react/functions/get-content/types.d.ts} +0 -0
- /package/{src/types/builder-content.js → dist/react/types/builder-block.d.ts} +0 -0
- /package/{src/types/can-track.js → dist/react/types/builder-content.d.ts} +0 -0
- /package/{src/types/components.js → dist/react/types/can-track.d.ts} +0 -0
- /package/{src/types/deep-partial.js → dist/react/types/components.d.ts} +0 -0
- /package/{src/types/element.js → dist/react/types/deep-partial.d.ts} +0 -0
- /package/{src/types/targets.js → dist/react/types/element.d.ts} +0 -0
- /package/{src/types/typescript.js → dist/react/types/input.d.ts} +0 -0
package/src/helpers/sessionId.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var __async = (__this, __arguments, generator) => {
|
|
2
|
-
return new Promise((resolve, reject) => {
|
|
3
|
-
var fulfilled = (value) => {
|
|
4
|
-
try {
|
|
5
|
-
step(generator.next(value));
|
|
6
|
-
} catch (e) {
|
|
7
|
-
reject(e);
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var rejected = (value) => {
|
|
11
|
-
try {
|
|
12
|
-
step(generator.throw(value));
|
|
13
|
-
} catch (e) {
|
|
14
|
-
reject(e);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
import { getCookie, setCookie } from "./cookie.js";
|
|
22
|
-
import { checkIsDefined } from "./nullable.js";
|
|
23
|
-
import { uuid } from "./uuid.js";
|
|
24
|
-
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
25
|
-
const getSessionId = (_0) => __async(void 0, [_0], function* ({
|
|
26
|
-
canTrack
|
|
27
|
-
}) {
|
|
28
|
-
if (!canTrack) {
|
|
29
|
-
return void 0;
|
|
30
|
-
}
|
|
31
|
-
const sessionId = yield getCookie({
|
|
32
|
-
name: SESSION_LOCAL_STORAGE_KEY,
|
|
33
|
-
canTrack
|
|
34
|
-
});
|
|
35
|
-
if (checkIsDefined(sessionId)) {
|
|
36
|
-
return sessionId;
|
|
37
|
-
} else {
|
|
38
|
-
const newSessionId = createSessionId();
|
|
39
|
-
setSessionId({ id: newSessionId, canTrack });
|
|
40
|
-
return newSessionId;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const createSessionId = () => uuid();
|
|
44
|
-
const setSessionId = ({
|
|
45
|
-
id,
|
|
46
|
-
canTrack
|
|
47
|
-
}) => setCookie({ name: SESSION_LOCAL_STORAGE_KEY, value: id, canTrack });
|
|
48
|
-
export {
|
|
49
|
-
createSessionId,
|
|
50
|
-
getSessionId,
|
|
51
|
-
setSessionId
|
|
52
|
-
};
|
package/src/helpers/time.js
DELETED
package/src/helpers/url.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const getTopLevelDomain = (host) => {
|
|
2
|
-
if (host === "localhost" || host === "127.0.0.1") {
|
|
3
|
-
return host;
|
|
4
|
-
}
|
|
5
|
-
const parts = host.split(".");
|
|
6
|
-
if (parts.length > 2) {
|
|
7
|
-
return parts.slice(1).join(".");
|
|
8
|
-
}
|
|
9
|
-
return host;
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
getTopLevelDomain
|
|
13
|
-
};
|
package/src/helpers/url.test.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { getTopLevelDomain } from "./url.js";
|
|
2
|
-
describe("getTopLevelDomain", () => {
|
|
3
|
-
test("handles root domain", () => {
|
|
4
|
-
const output = getTopLevelDomain("example.com");
|
|
5
|
-
expect(output).toBe("example.com");
|
|
6
|
-
});
|
|
7
|
-
test("handles subdomain", () => {
|
|
8
|
-
const output = getTopLevelDomain("wwww.example.com");
|
|
9
|
-
expect(output).toBe("example.com");
|
|
10
|
-
});
|
|
11
|
-
test("handles subdomain with long suffix", () => {
|
|
12
|
-
const output = getTopLevelDomain("www.example.co.uk");
|
|
13
|
-
expect(output).toBe("example.co.uk");
|
|
14
|
-
});
|
|
15
|
-
test("handles localhost", () => {
|
|
16
|
-
const output = getTopLevelDomain("localhost");
|
|
17
|
-
expect(output).toBe("localhost");
|
|
18
|
-
const output2 = getTopLevelDomain("127.0.0.1");
|
|
19
|
-
expect(output2).toBe("127.0.0.1");
|
|
20
|
-
});
|
|
21
|
-
});
|
package/src/helpers/uuid.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
function uuidv4() {
|
|
2
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
3
|
-
const r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
|
|
4
|
-
return v.toString(16);
|
|
5
|
-
});
|
|
6
|
-
}
|
|
7
|
-
function uuid() {
|
|
8
|
-
return uuidv4().replace(/-/g, "");
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
uuid,
|
|
12
|
-
uuidv4
|
|
13
|
-
};
|
package/src/helpers/visitorId.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { getLocalStorageItem, setLocalStorageItem } from "./localStorage.js";
|
|
2
|
-
import { checkIsDefined } from "./nullable.js";
|
|
3
|
-
import { uuid } from "./uuid.js";
|
|
4
|
-
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
5
|
-
const getVisitorId = ({ canTrack }) => {
|
|
6
|
-
if (!canTrack) {
|
|
7
|
-
return void 0;
|
|
8
|
-
}
|
|
9
|
-
const visitorId = getLocalStorageItem({
|
|
10
|
-
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
11
|
-
canTrack
|
|
12
|
-
});
|
|
13
|
-
if (checkIsDefined(visitorId)) {
|
|
14
|
-
return visitorId;
|
|
15
|
-
} else {
|
|
16
|
-
const newVisitorId = createVisitorId();
|
|
17
|
-
setVisitorId({ id: newVisitorId, canTrack });
|
|
18
|
-
return newVisitorId;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const createVisitorId = () => uuid();
|
|
22
|
-
const setVisitorId = ({
|
|
23
|
-
id,
|
|
24
|
-
canTrack
|
|
25
|
-
}) => setLocalStorageItem({
|
|
26
|
-
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
27
|
-
value: id,
|
|
28
|
-
canTrack
|
|
29
|
-
});
|
|
30
|
-
export {
|
|
31
|
-
createVisitorId,
|
|
32
|
-
getVisitorId,
|
|
33
|
-
setVisitorId
|
|
34
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { default as default2 } from "../blocks/columns/columns.js";
|
|
2
|
-
import { default as default3 } from "../blocks/image/image.js";
|
|
3
|
-
import { default as default4 } from "../blocks/text/text.js";
|
|
4
|
-
import { default as default5 } from "../blocks/video/video.js";
|
|
5
|
-
import { default as default6 } from "../blocks/symbol/symbol.js";
|
|
6
|
-
import { default as default7 } from "../blocks/button/button.js";
|
|
7
|
-
import { default as default8 } from "../blocks/section/section.js";
|
|
8
|
-
import { default as default9 } from "../blocks/fragment/fragment.js";
|
|
9
|
-
import { default as default10 } from "../components/render-content/render-content.js";
|
|
10
|
-
import { default as default11 } from "../components/render-blocks.js";
|
|
11
|
-
export {
|
|
12
|
-
default7 as Button,
|
|
13
|
-
default2 as Columns,
|
|
14
|
-
default9 as Fragment,
|
|
15
|
-
default3 as Image,
|
|
16
|
-
default11 as RenderBlocks,
|
|
17
|
-
default10 as RenderContent,
|
|
18
|
-
default8 as Section,
|
|
19
|
-
default6 as Symbol,
|
|
20
|
-
default4 as Text,
|
|
21
|
-
default5 as Video
|
|
22
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { TARGET } from "../constants/target.js";
|
|
2
|
-
import { isBrowser } from "../functions/is-browser.js";
|
|
3
|
-
import { register } from "../functions/register.js";
|
|
4
|
-
const registerInsertMenu = () => {
|
|
5
|
-
register("insertMenu", {
|
|
6
|
-
name: "_default",
|
|
7
|
-
default: true,
|
|
8
|
-
items: [
|
|
9
|
-
{ name: "Box" },
|
|
10
|
-
{ name: "Text" },
|
|
11
|
-
{ name: "Image" },
|
|
12
|
-
{ name: "Columns" },
|
|
13
|
-
...TARGET === "reactNative" ? [] : [
|
|
14
|
-
{ name: "Core:Section" },
|
|
15
|
-
{ name: "Core:Button" },
|
|
16
|
-
{ name: "Embed" },
|
|
17
|
-
{ name: "Custom Code" }
|
|
18
|
-
]
|
|
19
|
-
]
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
let isSetupForEditing = false;
|
|
23
|
-
const setupBrowserForEditing = (options = {}) => {
|
|
24
|
-
var _a, _b;
|
|
25
|
-
if (isSetupForEditing) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
isSetupForEditing = true;
|
|
29
|
-
if (isBrowser()) {
|
|
30
|
-
(_a = window.parent) == null ? void 0 : _a.postMessage({
|
|
31
|
-
type: "builder.sdkInfo",
|
|
32
|
-
data: {
|
|
33
|
-
target: TARGET,
|
|
34
|
-
supportsPatchUpdates: false,
|
|
35
|
-
supportsAddBlockScoping: true,
|
|
36
|
-
supportsCustomBreakpoints: true
|
|
37
|
-
}
|
|
38
|
-
}, "*");
|
|
39
|
-
(_b = window.parent) == null ? void 0 : _b.postMessage({
|
|
40
|
-
type: "builder.updateContent",
|
|
41
|
-
data: {
|
|
42
|
-
options
|
|
43
|
-
}
|
|
44
|
-
}, "*");
|
|
45
|
-
window.addEventListener("message", ({ data }) => {
|
|
46
|
-
var _a2, _b2;
|
|
47
|
-
if (!(data == null ? void 0 : data.type)) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
switch (data.type) {
|
|
51
|
-
case "builder.evaluate": {
|
|
52
|
-
const text = data.data.text;
|
|
53
|
-
const args = data.data.arguments || [];
|
|
54
|
-
const id = data.data.id;
|
|
55
|
-
const fn = new Function(text);
|
|
56
|
-
let result;
|
|
57
|
-
let error = null;
|
|
58
|
-
try {
|
|
59
|
-
result = fn.apply(null, args);
|
|
60
|
-
} catch (err) {
|
|
61
|
-
error = err;
|
|
62
|
-
}
|
|
63
|
-
if (error) {
|
|
64
|
-
(_a2 = window.parent) == null ? void 0 : _a2.postMessage({
|
|
65
|
-
type: "builder.evaluateError",
|
|
66
|
-
data: { id, error: error.message }
|
|
67
|
-
}, "*");
|
|
68
|
-
} else {
|
|
69
|
-
if (result && typeof result.then === "function") {
|
|
70
|
-
result.then((finalResult) => {
|
|
71
|
-
var _a3;
|
|
72
|
-
(_a3 = window.parent) == null ? void 0 : _a3.postMessage({
|
|
73
|
-
type: "builder.evaluateResult",
|
|
74
|
-
data: { id, result: finalResult }
|
|
75
|
-
}, "*");
|
|
76
|
-
}).catch(console.error);
|
|
77
|
-
} else {
|
|
78
|
-
(_b2 = window.parent) == null ? void 0 : _b2.postMessage({
|
|
79
|
-
type: "builder.evaluateResult",
|
|
80
|
-
data: { result, id }
|
|
81
|
-
}, "*");
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
break;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
export {
|
|
91
|
-
registerInsertMenu,
|
|
92
|
-
setupBrowserForEditing
|
|
93
|
-
};
|
/package/{src/components/render-block/types.js → dist/react/components/render-block/types.d.ts}
RENAMED
|
File without changes
|
/package/{src/context/types.js → dist/react/components/render-content/render-content.types.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|