@builder.io/sdk-svelte 1.0.17 → 1.0.20
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/lib/browser/blocks/BaseText.svelte +11 -11
- package/lib/browser/blocks/button/button.svelte +2 -2
- package/lib/browser/blocks/button/button.svelte.d.ts +1 -1
- package/lib/browser/blocks/button/button.types.d.ts +1 -1
- package/lib/browser/blocks/button/component-info.d.ts +1 -1
- package/lib/browser/blocks/columns/columns.svelte +15 -15
- package/lib/browser/blocks/columns/columns.svelte.d.ts +1 -1
- package/lib/browser/blocks/columns/columns.types.d.ts +2 -2
- package/lib/browser/blocks/columns/component-info.d.ts +1 -1
- package/lib/browser/blocks/custom-code/component-info.d.ts +1 -1
- package/lib/browser/blocks/embed/component-info.d.ts +1 -1
- package/lib/browser/blocks/embed/embed.svelte +1 -1
- package/lib/browser/blocks/form/form/component-info.d.ts +1 -1
- package/lib/browser/blocks/form/form/form.svelte +6 -7
- package/lib/browser/blocks/form/input/component-info.d.ts +1 -1
- package/lib/browser/blocks/form/input/input.svelte +3 -3
- package/lib/browser/blocks/form/select/component-info.d.ts +1 -1
- package/lib/browser/blocks/form/select/select.svelte +4 -4
- package/lib/browser/blocks/form/submit-button/component-info.d.ts +1 -1
- package/lib/browser/blocks/form/submit-button/submit-button.svelte +2 -2
- package/lib/browser/blocks/fragment/component-info.d.ts +1 -1
- package/lib/browser/blocks/fragment/fragment.svelte.d.ts +1 -1
- package/lib/browser/blocks/image/component-info.d.ts +1 -1
- package/lib/browser/blocks/image/image.svelte +14 -14
- package/lib/browser/blocks/image/image.svelte.d.ts +1 -1
- package/lib/browser/blocks/image/image.types.d.ts +1 -1
- package/lib/browser/blocks/img/component-info.d.ts +1 -1
- package/lib/browser/blocks/img/img.svelte +14 -14
- package/lib/browser/blocks/raw-text/component-info.d.ts +1 -1
- package/lib/browser/blocks/section/component-info.d.ts +1 -1
- package/lib/browser/blocks/section/section.svelte +13 -13
- package/lib/browser/blocks/section/section.svelte.d.ts +1 -1
- package/lib/browser/blocks/slot/component-info.d.ts +1 -1
- package/lib/browser/blocks/slot/slot.svelte +12 -13
- package/lib/browser/blocks/slot/slot.svelte.d.ts +1 -2
- package/lib/browser/blocks/symbol/component-info.d.ts +1 -1
- package/lib/browser/blocks/symbol/symbol.helpers.d.ts +2 -2
- package/lib/browser/blocks/symbol/symbol.helpers.js +2 -2
- package/lib/browser/blocks/symbol/symbol.svelte +6 -6
- package/lib/browser/blocks/symbol/symbol.svelte.d.ts +2 -2
- package/lib/browser/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/browser/blocks/text/component-info.d.ts +1 -1
- package/lib/browser/blocks/text/text.svelte +11 -11
- package/lib/browser/blocks/text/text.svelte.d.ts +1 -1
- package/lib/browser/blocks/textarea/component-info.d.ts +1 -1
- package/lib/browser/blocks/textarea/textarea.svelte +2 -2
- package/lib/browser/blocks/video/component-info.d.ts +1 -1
- package/lib/browser/blocks/video/video.svelte +19 -19
- package/lib/browser/blocks/video/video.svelte.d.ts +1 -1
- package/lib/browser/blocks/video/video.types.d.ts +1 -1
- package/lib/browser/components/block/animator.d.ts +1 -1
- package/lib/browser/components/block/block.helpers.d.ts +4 -4
- package/lib/browser/components/block/block.helpers.js +4 -4
- package/lib/browser/components/block/block.svelte +4 -4
- package/lib/browser/components/block/components/block-styles.svelte +5 -5
- package/lib/browser/components/block/components/block-wrapper.svelte +2 -2
- package/lib/browser/components/block/components/block-wrapper.svelte.d.ts +2 -2
- package/lib/browser/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/browser/components/block/components/component-ref/component-ref.helpers.js +1 -1
- package/lib/browser/components/block/components/component-ref/component-ref.svelte +2 -2
- package/lib/browser/components/block/components/component-ref/component-ref.svelte.d.ts +1 -1
- package/lib/browser/components/block/components/interactive-element.svelte +3 -3
- package/lib/browser/components/block/components/repeated-block.svelte +1 -1
- package/lib/browser/components/block/components/repeated-block.svelte.d.ts +1 -1
- package/lib/browser/components/block/types.d.ts +2 -2
- package/lib/browser/components/blocks/blocks-wrapper.svelte +12 -12
- package/lib/browser/components/blocks/blocks.svelte +2 -2
- package/lib/browser/components/blocks/blocks.svelte.d.ts +1 -1
- package/lib/browser/components/blocks/blocks.types.d.ts +1 -1
- package/lib/browser/components/content/components/enable-editor.svelte +22 -22
- package/lib/browser/components/content/components/enable-editor.svelte.d.ts +7 -7
- package/lib/browser/components/content/components/styles.svelte +1 -1
- package/lib/browser/components/content/components/styles.svelte.d.ts +1 -1
- package/lib/browser/components/content/content.helpers.d.ts +3 -3
- package/lib/browser/components/content/content.svelte +7 -7
- package/lib/browser/components/content/content.svelte.d.ts +1 -1
- package/lib/browser/components/content/content.types.d.ts +2 -2
- package/lib/browser/components/content/contentProps.types.d.ts +2 -2
- package/lib/browser/components/content-variants/content-variants.svelte +5 -5
- package/lib/browser/components/content-variants/content-variants.svelte.d.ts +1 -1
- package/lib/browser/components/content-variants/content-variants.types.d.ts +4 -4
- package/lib/browser/components/content-variants/helpers.d.ts +5 -5
- package/lib/browser/components/content-variants/helpers.js +5 -4
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.svelte +3 -3
- package/lib/browser/constants/builder-registered-components.d.ts +1 -1
- package/lib/browser/constants/builder-registered-components.js +17 -17
- package/lib/browser/constants/device-sizes.js +1 -1
- package/lib/browser/constants/extra-components.d.ts +1 -1
- package/lib/browser/constants/extra-components.js +17 -17
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/constants/sdk-version.js +1 -1
- package/lib/browser/constants/target.d.ts +1 -1
- package/lib/browser/context/index.d.ts +1 -0
- package/lib/browser/context/index.js +1 -0
- package/lib/browser/context/types.d.ts +4 -4
- package/lib/browser/functions/evaluate/browser-runtime/browser.d.ts +2 -2
- package/lib/browser/functions/evaluate/browser-runtime/browser.js +1 -1
- package/lib/browser/functions/evaluate/browser-runtime/index.d.ts +1 -1
- package/lib/browser/functions/evaluate/browser-runtime/index.js +1 -1
- package/lib/browser/functions/evaluate/choose-eval.d.ts +1 -1
- package/lib/browser/functions/evaluate/choose-eval.js +3 -3
- package/lib/browser/functions/evaluate/edge-runtime/edge-runtime.d.ts +1 -1
- package/lib/browser/functions/evaluate/edge-runtime/edge-runtime.js +4 -4
- package/lib/browser/functions/evaluate/edge-runtime/index.d.ts +1 -1
- package/lib/browser/functions/evaluate/edge-runtime/index.js +1 -1
- package/lib/browser/functions/evaluate/evaluate.d.ts +1 -1
- package/lib/browser/functions/evaluate/evaluate.js +3 -3
- package/lib/browser/functions/evaluate/helpers.d.ts +3 -3
- package/lib/browser/functions/evaluate/helpers.js +3 -3
- package/lib/browser/functions/evaluate/index.d.ts +1 -1
- package/lib/browser/functions/evaluate/index.js +1 -1
- package/lib/browser/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/lib/browser/functions/evaluate/node-runtime/index.js +1 -1
- package/lib/browser/functions/evaluate/node-runtime/node-runtime.d.ts +1 -1
- package/lib/browser/functions/evaluate/node-runtime/node-runtime.js +4 -4
- package/lib/browser/functions/evaluate/placeholder-runtime.d.ts +1 -1
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.js +2 -2
- package/lib/browser/functions/fetch-builder-props.d.ts +3 -3
- package/lib/browser/functions/fetch-builder-props.js +2 -2
- package/lib/browser/functions/get-block-actions-handler.d.ts +2 -2
- package/lib/browser/functions/get-block-actions-handler.js +1 -1
- package/lib/browser/functions/get-block-actions.d.ts +2 -2
- package/lib/browser/functions/get-block-actions.js +3 -3
- package/lib/browser/functions/get-block-component-options.d.ts +1 -1
- package/lib/browser/functions/get-block-properties.d.ts +2 -2
- package/lib/browser/functions/get-block-properties.js +3 -3
- package/lib/browser/functions/get-builder-search-params/index.d.ts +1 -1
- package/lib/browser/functions/get-builder-search-params/index.js +2 -2
- package/lib/browser/functions/get-class-prop-name.js +1 -1
- package/lib/browser/functions/get-content/generate-content-url.d.ts +1 -1
- package/lib/browser/functions/get-content/generate-content-url.js +4 -4
- package/lib/browser/functions/get-content/index.d.ts +2 -2
- package/lib/browser/functions/get-content/index.js +8 -8
- package/lib/browser/functions/get-fetch.js +1 -1
- package/lib/browser/functions/get-processed-block.d.ts +2 -2
- package/lib/browser/functions/get-processed-block.js +4 -4
- package/lib/browser/functions/get-style.d.ts +2 -2
- package/lib/browser/functions/get-style.js +3 -3
- package/lib/browser/functions/is-edge-runtime.js +2 -2
- package/lib/browser/functions/is-editing.d.ts +1 -1
- package/lib/browser/functions/is-editing.js +3 -3
- package/lib/browser/functions/is-iframe.js +1 -1
- package/lib/browser/functions/is-node-runtime.js +1 -1
- package/lib/browser/functions/is-previewing.d.ts +1 -1
- package/lib/browser/functions/is-previewing.js +3 -3
- package/lib/browser/functions/register-component.d.ts +1 -1
- package/lib/browser/functions/register-component.js +1 -1
- package/lib/browser/functions/register.d.ts +2 -2
- package/lib/browser/functions/register.js +1 -1
- package/lib/browser/functions/set-editor-settings.js +1 -1
- package/lib/browser/functions/track/helpers.js +2 -2
- package/lib/browser/functions/track/index.d.ts +2 -2
- package/lib/browser/functions/track/index.js +7 -7
- package/lib/browser/functions/transform-block-properties.d.ts +2 -2
- package/lib/browser/functions/transform-block.d.ts +1 -1
- package/lib/browser/functions/transform-style-property.d.ts +2 -2
- package/lib/browser/helpers/ab-tests.d.ts +3 -3
- package/lib/browser/helpers/ab-tests.js +4 -4
- package/lib/browser/helpers/canTrack.js +1 -1
- package/lib/browser/helpers/cookie.d.ts +1 -1
- package/lib/browser/helpers/cookie.js +4 -4
- package/lib/browser/helpers/css.js +2 -2
- package/lib/browser/helpers/localStorage.d.ts +2 -2
- package/lib/browser/helpers/localStorage.js +1 -1
- package/lib/browser/helpers/preview-lru-cache/get.d.ts +1 -1
- package/lib/browser/helpers/preview-lru-cache/set.d.ts +1 -1
- package/lib/browser/helpers/sessionId.d.ts +1 -1
- package/lib/browser/helpers/sessionId.js +3 -3
- package/lib/browser/helpers/subscribe-to-editor.d.ts +3 -3
- package/lib/browser/helpers/subscribe-to-editor.js +4 -4
- package/lib/browser/helpers/visitorId.d.ts +1 -1
- package/lib/browser/helpers/visitorId.js +3 -3
- package/lib/browser/index-helpers/blocks-exports.d.ts +14 -10
- package/lib/browser/index-helpers/blocks-exports.js +14 -10
- package/lib/browser/index.d.ts +3 -3
- package/lib/browser/index.js +3 -3
- package/lib/browser/scripts/init-editing.js +5 -5
- package/lib/browser/server-index.d.ts +27 -27
- package/lib/browser/server-index.js +11 -11
- package/lib/browser/types/builder-content.d.ts +3 -3
- package/lib/browser/types/builder-props.d.ts +2 -2
- package/lib/browser/types/components.d.ts +2 -2
- package/lib/browser/types/enforced-partials.d.ts +1 -1
- package/lib/edge/blocks/BaseText.svelte +11 -11
- package/lib/edge/blocks/button/button.svelte +2 -2
- package/lib/edge/blocks/button/button.svelte.d.ts +1 -1
- package/lib/edge/blocks/button/button.types.d.ts +1 -1
- package/lib/edge/blocks/button/component-info.d.ts +1 -1
- package/lib/edge/blocks/columns/columns.svelte +15 -15
- package/lib/edge/blocks/columns/columns.svelte.d.ts +1 -1
- package/lib/edge/blocks/columns/columns.types.d.ts +2 -2
- package/lib/edge/blocks/columns/component-info.d.ts +1 -1
- package/lib/edge/blocks/custom-code/component-info.d.ts +1 -1
- package/lib/edge/blocks/embed/component-info.d.ts +1 -1
- package/lib/edge/blocks/embed/embed.svelte +1 -1
- package/lib/edge/blocks/form/form/component-info.d.ts +1 -1
- package/lib/edge/blocks/form/form/form.svelte +6 -7
- package/lib/edge/blocks/form/input/component-info.d.ts +1 -1
- package/lib/edge/blocks/form/input/input.svelte +3 -3
- package/lib/edge/blocks/form/select/component-info.d.ts +1 -1
- package/lib/edge/blocks/form/select/select.svelte +4 -4
- package/lib/edge/blocks/form/submit-button/component-info.d.ts +1 -1
- package/lib/edge/blocks/form/submit-button/submit-button.svelte +2 -2
- package/lib/edge/blocks/fragment/component-info.d.ts +1 -1
- package/lib/edge/blocks/fragment/fragment.svelte.d.ts +1 -1
- package/lib/edge/blocks/image/component-info.d.ts +1 -1
- package/lib/edge/blocks/image/image.svelte +14 -14
- package/lib/edge/blocks/image/image.svelte.d.ts +1 -1
- package/lib/edge/blocks/image/image.types.d.ts +1 -1
- package/lib/edge/blocks/img/component-info.d.ts +1 -1
- package/lib/edge/blocks/img/img.svelte +14 -14
- package/lib/edge/blocks/raw-text/component-info.d.ts +1 -1
- package/lib/edge/blocks/section/component-info.d.ts +1 -1
- package/lib/edge/blocks/section/section.svelte +13 -13
- package/lib/edge/blocks/section/section.svelte.d.ts +1 -1
- package/lib/edge/blocks/slot/component-info.d.ts +1 -1
- package/lib/edge/blocks/slot/slot.svelte +12 -13
- package/lib/edge/blocks/slot/slot.svelte.d.ts +1 -2
- package/lib/edge/blocks/symbol/component-info.d.ts +1 -1
- package/lib/edge/blocks/symbol/symbol.helpers.d.ts +2 -2
- package/lib/edge/blocks/symbol/symbol.helpers.js +2 -2
- package/lib/edge/blocks/symbol/symbol.svelte +6 -6
- package/lib/edge/blocks/symbol/symbol.svelte.d.ts +2 -2
- package/lib/edge/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/edge/blocks/text/component-info.d.ts +1 -1
- package/lib/edge/blocks/text/text.svelte +11 -11
- package/lib/edge/blocks/text/text.svelte.d.ts +1 -1
- package/lib/edge/blocks/textarea/component-info.d.ts +1 -1
- package/lib/edge/blocks/textarea/textarea.svelte +2 -2
- package/lib/edge/blocks/video/component-info.d.ts +1 -1
- package/lib/edge/blocks/video/video.svelte +19 -19
- package/lib/edge/blocks/video/video.svelte.d.ts +1 -1
- package/lib/edge/blocks/video/video.types.d.ts +1 -1
- package/lib/edge/components/block/animator.d.ts +1 -1
- package/lib/edge/components/block/block.helpers.d.ts +4 -4
- package/lib/edge/components/block/block.helpers.js +4 -4
- package/lib/edge/components/block/block.svelte +4 -4
- package/lib/edge/components/block/components/block-styles.svelte +5 -5
- package/lib/edge/components/block/components/block-wrapper.svelte +2 -2
- package/lib/edge/components/block/components/block-wrapper.svelte.d.ts +2 -2
- package/lib/edge/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/edge/components/block/components/component-ref/component-ref.helpers.js +1 -1
- package/lib/edge/components/block/components/component-ref/component-ref.svelte +2 -2
- package/lib/edge/components/block/components/component-ref/component-ref.svelte.d.ts +1 -1
- package/lib/edge/components/block/components/interactive-element.svelte +3 -3
- package/lib/edge/components/block/components/repeated-block.svelte +1 -1
- package/lib/edge/components/block/components/repeated-block.svelte.d.ts +1 -1
- package/lib/edge/components/block/types.d.ts +2 -2
- package/lib/edge/components/blocks/blocks-wrapper.svelte +12 -12
- package/lib/edge/components/blocks/blocks.svelte +2 -2
- package/lib/edge/components/blocks/blocks.svelte.d.ts +1 -1
- package/lib/edge/components/blocks/blocks.types.d.ts +1 -1
- package/lib/edge/components/content/components/enable-editor.svelte +22 -22
- package/lib/edge/components/content/components/enable-editor.svelte.d.ts +7 -7
- package/lib/edge/components/content/components/styles.svelte +1 -1
- package/lib/edge/components/content/components/styles.svelte.d.ts +1 -1
- package/lib/edge/components/content/content.helpers.d.ts +3 -3
- package/lib/edge/components/content/content.svelte +7 -7
- package/lib/edge/components/content/content.svelte.d.ts +1 -1
- package/lib/edge/components/content/content.types.d.ts +2 -2
- package/lib/edge/components/content/contentProps.types.d.ts +2 -2
- package/lib/edge/components/content-variants/content-variants.svelte +5 -5
- package/lib/edge/components/content-variants/content-variants.svelte.d.ts +1 -1
- package/lib/edge/components/content-variants/content-variants.types.d.ts +4 -4
- package/lib/edge/components/content-variants/helpers.d.ts +5 -5
- package/lib/edge/components/content-variants/helpers.js +5 -4
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.svelte +3 -3
- package/lib/edge/constants/builder-registered-components.d.ts +1 -1
- package/lib/edge/constants/builder-registered-components.js +17 -17
- package/lib/edge/constants/device-sizes.js +1 -1
- package/lib/edge/constants/extra-components.d.ts +1 -1
- package/lib/edge/constants/extra-components.js +17 -17
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/constants/sdk-version.js +1 -1
- package/lib/edge/constants/target.d.ts +1 -1
- package/lib/edge/context/index.d.ts +1 -0
- package/lib/edge/context/index.js +1 -0
- package/lib/edge/context/types.d.ts +4 -4
- package/lib/edge/functions/evaluate/browser-runtime/browser.d.ts +2 -2
- package/lib/edge/functions/evaluate/browser-runtime/browser.js +1 -1
- package/lib/edge/functions/evaluate/browser-runtime/index.d.ts +1 -1
- package/lib/edge/functions/evaluate/browser-runtime/index.js +1 -1
- package/lib/edge/functions/evaluate/choose-eval.d.ts +1 -1
- package/lib/edge/functions/evaluate/choose-eval.js +3 -3
- package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.d.ts +1 -1
- package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.js +4 -4
- package/lib/edge/functions/evaluate/edge-runtime/index.d.ts +1 -1
- package/lib/edge/functions/evaluate/edge-runtime/index.js +1 -1
- package/lib/edge/functions/evaluate/evaluate.d.ts +1 -1
- package/lib/edge/functions/evaluate/evaluate.js +3 -3
- package/lib/edge/functions/evaluate/helpers.d.ts +3 -3
- package/lib/edge/functions/evaluate/helpers.js +3 -3
- package/lib/edge/functions/evaluate/index.d.ts +1 -1
- package/lib/edge/functions/evaluate/index.js +1 -1
- package/lib/edge/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/lib/edge/functions/evaluate/node-runtime/index.js +1 -1
- package/lib/edge/functions/evaluate/node-runtime/node-runtime.d.ts +1 -1
- package/lib/edge/functions/evaluate/node-runtime/node-runtime.js +4 -4
- package/lib/edge/functions/evaluate/placeholder-runtime.d.ts +1 -1
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.js +2 -2
- package/lib/edge/functions/fetch-builder-props.d.ts +3 -3
- package/lib/edge/functions/fetch-builder-props.js +2 -2
- package/lib/edge/functions/get-block-actions-handler.d.ts +2 -2
- package/lib/edge/functions/get-block-actions-handler.js +1 -1
- package/lib/edge/functions/get-block-actions.d.ts +2 -2
- package/lib/edge/functions/get-block-actions.js +3 -3
- package/lib/edge/functions/get-block-component-options.d.ts +1 -1
- package/lib/edge/functions/get-block-properties.d.ts +2 -2
- package/lib/edge/functions/get-block-properties.js +3 -3
- package/lib/edge/functions/get-builder-search-params/index.d.ts +1 -1
- package/lib/edge/functions/get-builder-search-params/index.js +2 -2
- package/lib/edge/functions/get-class-prop-name.js +1 -1
- package/lib/edge/functions/get-content/generate-content-url.d.ts +1 -1
- package/lib/edge/functions/get-content/generate-content-url.js +4 -4
- package/lib/edge/functions/get-content/index.d.ts +2 -2
- package/lib/edge/functions/get-content/index.js +8 -8
- package/lib/edge/functions/get-fetch.js +1 -1
- package/lib/edge/functions/get-processed-block.d.ts +2 -2
- package/lib/edge/functions/get-processed-block.js +4 -4
- package/lib/edge/functions/get-style.d.ts +2 -2
- package/lib/edge/functions/get-style.js +3 -3
- package/lib/edge/functions/is-edge-runtime.js +2 -2
- package/lib/edge/functions/is-editing.d.ts +1 -1
- package/lib/edge/functions/is-editing.js +3 -3
- package/lib/edge/functions/is-iframe.js +1 -1
- package/lib/edge/functions/is-node-runtime.js +1 -1
- package/lib/edge/functions/is-previewing.d.ts +1 -1
- package/lib/edge/functions/is-previewing.js +3 -3
- package/lib/edge/functions/register-component.d.ts +1 -1
- package/lib/edge/functions/register-component.js +1 -1
- package/lib/edge/functions/register.d.ts +2 -2
- package/lib/edge/functions/register.js +1 -1
- package/lib/edge/functions/set-editor-settings.js +1 -1
- package/lib/edge/functions/track/helpers.js +2 -2
- package/lib/edge/functions/track/index.d.ts +2 -2
- package/lib/edge/functions/track/index.js +7 -7
- package/lib/edge/functions/transform-block-properties.d.ts +2 -2
- package/lib/edge/functions/transform-block.d.ts +1 -1
- package/lib/edge/functions/transform-style-property.d.ts +2 -2
- package/lib/edge/helpers/ab-tests.d.ts +3 -3
- package/lib/edge/helpers/ab-tests.js +4 -4
- package/lib/edge/helpers/canTrack.js +1 -1
- package/lib/edge/helpers/cookie.d.ts +1 -1
- package/lib/edge/helpers/cookie.js +4 -4
- package/lib/edge/helpers/css.js +2 -2
- package/lib/edge/helpers/localStorage.d.ts +2 -2
- package/lib/edge/helpers/localStorage.js +1 -1
- package/lib/edge/helpers/preview-lru-cache/get.d.ts +1 -1
- package/lib/edge/helpers/preview-lru-cache/set.d.ts +1 -1
- package/lib/edge/helpers/sessionId.d.ts +1 -1
- package/lib/edge/helpers/sessionId.js +3 -3
- package/lib/edge/helpers/subscribe-to-editor.d.ts +3 -3
- package/lib/edge/helpers/subscribe-to-editor.js +4 -4
- package/lib/edge/helpers/visitorId.d.ts +1 -1
- package/lib/edge/helpers/visitorId.js +3 -3
- package/lib/edge/index-helpers/blocks-exports.d.ts +14 -10
- package/lib/edge/index-helpers/blocks-exports.js +14 -10
- package/lib/edge/index.d.ts +3 -3
- package/lib/edge/index.js +3 -3
- package/lib/edge/scripts/init-editing.js +5 -5
- package/lib/edge/server-index.d.ts +27 -27
- package/lib/edge/server-index.js +11 -11
- package/lib/edge/types/builder-content.d.ts +3 -3
- package/lib/edge/types/builder-props.d.ts +2 -2
- package/lib/edge/types/components.d.ts +2 -2
- package/lib/edge/types/enforced-partials.d.ts +1 -1
- package/lib/node/blocks/BaseText.svelte +11 -11
- package/lib/node/blocks/button/button.svelte +2 -2
- package/lib/node/blocks/button/button.svelte.d.ts +1 -1
- package/lib/node/blocks/button/button.types.d.ts +1 -1
- package/lib/node/blocks/button/component-info.d.ts +1 -1
- package/lib/node/blocks/columns/columns.svelte +15 -15
- package/lib/node/blocks/columns/columns.svelte.d.ts +1 -1
- package/lib/node/blocks/columns/columns.types.d.ts +2 -2
- package/lib/node/blocks/columns/component-info.d.ts +1 -1
- package/lib/node/blocks/custom-code/component-info.d.ts +1 -1
- package/lib/node/blocks/embed/component-info.d.ts +1 -1
- package/lib/node/blocks/embed/embed.svelte +1 -1
- package/lib/node/blocks/form/form/component-info.d.ts +1 -1
- package/lib/node/blocks/form/form/form.svelte +6 -7
- package/lib/node/blocks/form/input/component-info.d.ts +1 -1
- package/lib/node/blocks/form/input/input.svelte +3 -3
- package/lib/node/blocks/form/select/component-info.d.ts +1 -1
- package/lib/node/blocks/form/select/select.svelte +4 -4
- package/lib/node/blocks/form/submit-button/component-info.d.ts +1 -1
- package/lib/node/blocks/form/submit-button/submit-button.svelte +2 -2
- package/lib/node/blocks/fragment/component-info.d.ts +1 -1
- package/lib/node/blocks/fragment/fragment.svelte.d.ts +1 -1
- package/lib/node/blocks/image/component-info.d.ts +1 -1
- package/lib/node/blocks/image/image.svelte +14 -14
- package/lib/node/blocks/image/image.svelte.d.ts +1 -1
- package/lib/node/blocks/image/image.types.d.ts +1 -1
- package/lib/node/blocks/img/component-info.d.ts +1 -1
- package/lib/node/blocks/img/img.svelte +14 -14
- package/lib/node/blocks/raw-text/component-info.d.ts +1 -1
- package/lib/node/blocks/section/component-info.d.ts +1 -1
- package/lib/node/blocks/section/section.svelte +13 -13
- package/lib/node/blocks/section/section.svelte.d.ts +1 -1
- package/lib/node/blocks/slot/component-info.d.ts +1 -1
- package/lib/node/blocks/slot/slot.svelte +12 -13
- package/lib/node/blocks/slot/slot.svelte.d.ts +1 -2
- package/lib/node/blocks/symbol/component-info.d.ts +1 -1
- package/lib/node/blocks/symbol/symbol.helpers.d.ts +2 -2
- package/lib/node/blocks/symbol/symbol.helpers.js +2 -2
- package/lib/node/blocks/symbol/symbol.svelte +6 -6
- package/lib/node/blocks/symbol/symbol.svelte.d.ts +2 -2
- package/lib/node/blocks/symbol/symbol.types.d.ts +2 -2
- package/lib/node/blocks/text/component-info.d.ts +1 -1
- package/lib/node/blocks/text/text.svelte +11 -11
- package/lib/node/blocks/text/text.svelte.d.ts +1 -1
- package/lib/node/blocks/textarea/component-info.d.ts +1 -1
- package/lib/node/blocks/textarea/textarea.svelte +2 -2
- package/lib/node/blocks/video/component-info.d.ts +1 -1
- package/lib/node/blocks/video/video.svelte +19 -19
- package/lib/node/blocks/video/video.svelte.d.ts +1 -1
- package/lib/node/blocks/video/video.types.d.ts +1 -1
- package/lib/node/components/block/animator.d.ts +1 -1
- package/lib/node/components/block/block.helpers.d.ts +4 -4
- package/lib/node/components/block/block.helpers.js +4 -4
- package/lib/node/components/block/block.svelte +4 -4
- package/lib/node/components/block/components/block-styles.svelte +5 -5
- package/lib/node/components/block/components/block-wrapper.svelte +2 -2
- package/lib/node/components/block/components/block-wrapper.svelte.d.ts +2 -2
- package/lib/node/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/lib/node/components/block/components/component-ref/component-ref.helpers.js +1 -1
- package/lib/node/components/block/components/component-ref/component-ref.svelte +2 -2
- package/lib/node/components/block/components/component-ref/component-ref.svelte.d.ts +1 -1
- package/lib/node/components/block/components/interactive-element.svelte +3 -3
- package/lib/node/components/block/components/repeated-block.svelte +1 -1
- package/lib/node/components/block/components/repeated-block.svelte.d.ts +1 -1
- package/lib/node/components/block/types.d.ts +2 -2
- package/lib/node/components/blocks/blocks-wrapper.svelte +12 -12
- package/lib/node/components/blocks/blocks.svelte +2 -2
- package/lib/node/components/blocks/blocks.svelte.d.ts +1 -1
- package/lib/node/components/blocks/blocks.types.d.ts +1 -1
- package/lib/node/components/content/components/enable-editor.svelte +22 -22
- package/lib/node/components/content/components/enable-editor.svelte.d.ts +7 -7
- package/lib/node/components/content/components/styles.svelte +1 -1
- package/lib/node/components/content/components/styles.svelte.d.ts +1 -1
- package/lib/node/components/content/content.helpers.d.ts +3 -3
- package/lib/node/components/content/content.svelte +7 -7
- package/lib/node/components/content/content.svelte.d.ts +1 -1
- package/lib/node/components/content/content.types.d.ts +2 -2
- package/lib/node/components/content/contentProps.types.d.ts +2 -2
- package/lib/node/components/content-variants/content-variants.svelte +5 -5
- package/lib/node/components/content-variants/content-variants.svelte.d.ts +1 -1
- package/lib/node/components/content-variants/content-variants.types.d.ts +4 -4
- package/lib/node/components/content-variants/helpers.d.ts +5 -5
- package/lib/node/components/content-variants/helpers.js +5 -4
- package/lib/node/components/dynamic-renderer/dynamic-renderer.svelte +3 -3
- package/lib/node/constants/builder-registered-components.d.ts +1 -1
- package/lib/node/constants/builder-registered-components.js +17 -17
- package/lib/node/constants/device-sizes.js +1 -1
- package/lib/node/constants/extra-components.d.ts +1 -1
- package/lib/node/constants/extra-components.js +17 -17
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/constants/sdk-version.js +1 -1
- package/lib/node/constants/target.d.ts +1 -1
- package/lib/node/context/index.d.ts +1 -0
- package/lib/node/context/index.js +1 -0
- package/lib/node/context/types.d.ts +4 -4
- package/lib/node/functions/evaluate/browser-runtime/browser.d.ts +2 -2
- package/lib/node/functions/evaluate/browser-runtime/browser.js +1 -1
- package/lib/node/functions/evaluate/browser-runtime/index.d.ts +1 -1
- package/lib/node/functions/evaluate/browser-runtime/index.js +1 -1
- package/lib/node/functions/evaluate/choose-eval.d.ts +1 -1
- package/lib/node/functions/evaluate/choose-eval.js +3 -3
- package/lib/node/functions/evaluate/edge-runtime/edge-runtime.d.ts +1 -1
- package/lib/node/functions/evaluate/edge-runtime/edge-runtime.js +4 -4
- package/lib/node/functions/evaluate/edge-runtime/index.d.ts +1 -1
- package/lib/node/functions/evaluate/edge-runtime/index.js +1 -1
- package/lib/node/functions/evaluate/evaluate.d.ts +1 -1
- package/lib/node/functions/evaluate/evaluate.js +3 -3
- package/lib/node/functions/evaluate/helpers.d.ts +3 -3
- package/lib/node/functions/evaluate/helpers.js +3 -3
- package/lib/node/functions/evaluate/index.d.ts +1 -1
- package/lib/node/functions/evaluate/index.js +1 -1
- package/lib/node/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/lib/node/functions/evaluate/node-runtime/index.js +1 -1
- package/lib/node/functions/evaluate/node-runtime/node-runtime.d.ts +1 -1
- package/lib/node/functions/evaluate/node-runtime/node-runtime.js +4 -4
- package/lib/node/functions/evaluate/placeholder-runtime.d.ts +1 -1
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.js +2 -2
- package/lib/node/functions/fetch-builder-props.d.ts +3 -3
- package/lib/node/functions/fetch-builder-props.js +2 -2
- package/lib/node/functions/get-block-actions-handler.d.ts +2 -2
- package/lib/node/functions/get-block-actions-handler.js +1 -1
- package/lib/node/functions/get-block-actions.d.ts +2 -2
- package/lib/node/functions/get-block-actions.js +3 -3
- package/lib/node/functions/get-block-component-options.d.ts +1 -1
- package/lib/node/functions/get-block-properties.d.ts +2 -2
- package/lib/node/functions/get-block-properties.js +3 -3
- package/lib/node/functions/get-builder-search-params/index.d.ts +1 -1
- package/lib/node/functions/get-builder-search-params/index.js +2 -2
- package/lib/node/functions/get-class-prop-name.js +1 -1
- package/lib/node/functions/get-content/generate-content-url.d.ts +1 -1
- package/lib/node/functions/get-content/generate-content-url.js +4 -4
- package/lib/node/functions/get-content/index.d.ts +2 -2
- package/lib/node/functions/get-content/index.js +8 -8
- package/lib/node/functions/get-fetch.js +1 -1
- package/lib/node/functions/get-processed-block.d.ts +2 -2
- package/lib/node/functions/get-processed-block.js +4 -4
- package/lib/node/functions/get-style.d.ts +2 -2
- package/lib/node/functions/get-style.js +3 -3
- package/lib/node/functions/is-edge-runtime.js +2 -2
- package/lib/node/functions/is-editing.d.ts +1 -1
- package/lib/node/functions/is-editing.js +3 -3
- package/lib/node/functions/is-iframe.js +1 -1
- package/lib/node/functions/is-node-runtime.js +1 -1
- package/lib/node/functions/is-previewing.d.ts +1 -1
- package/lib/node/functions/is-previewing.js +3 -3
- package/lib/node/functions/register-component.d.ts +1 -1
- package/lib/node/functions/register-component.js +1 -1
- package/lib/node/functions/register.d.ts +2 -2
- package/lib/node/functions/register.js +1 -1
- package/lib/node/functions/set-editor-settings.js +1 -1
- package/lib/node/functions/track/helpers.js +2 -2
- package/lib/node/functions/track/index.d.ts +2 -2
- package/lib/node/functions/track/index.js +7 -7
- package/lib/node/functions/transform-block-properties.d.ts +2 -2
- package/lib/node/functions/transform-block.d.ts +1 -1
- package/lib/node/functions/transform-style-property.d.ts +2 -2
- package/lib/node/helpers/ab-tests.d.ts +3 -3
- package/lib/node/helpers/ab-tests.js +4 -4
- package/lib/node/helpers/canTrack.js +1 -1
- package/lib/node/helpers/cookie.d.ts +1 -1
- package/lib/node/helpers/cookie.js +4 -4
- package/lib/node/helpers/css.js +2 -2
- package/lib/node/helpers/localStorage.d.ts +2 -2
- package/lib/node/helpers/localStorage.js +1 -1
- package/lib/node/helpers/preview-lru-cache/get.d.ts +1 -1
- package/lib/node/helpers/preview-lru-cache/set.d.ts +1 -1
- package/lib/node/helpers/sessionId.d.ts +1 -1
- package/lib/node/helpers/sessionId.js +3 -3
- package/lib/node/helpers/subscribe-to-editor.d.ts +3 -3
- package/lib/node/helpers/subscribe-to-editor.js +4 -4
- package/lib/node/helpers/visitorId.d.ts +1 -1
- package/lib/node/helpers/visitorId.js +3 -3
- package/lib/node/index-helpers/blocks-exports.d.ts +14 -10
- package/lib/node/index-helpers/blocks-exports.js +14 -10
- package/lib/node/index.d.ts +3 -3
- package/lib/node/index.js +3 -3
- package/lib/node/scripts/init-editing.js +5 -5
- package/lib/node/server-index.d.ts +27 -27
- package/lib/node/server-index.js +11 -11
- package/lib/node/types/builder-content.d.ts +3 -3
- package/lib/node/types/builder-props.d.ts +2 -2
- package/lib/node/types/components.d.ts +2 -2
- package/lib/node/types/enforced-partials.d.ts +1 -1
- package/package.json +1 -1
- package/src/blocks/BaseText.svelte +11 -12
- package/src/blocks/button/button.svelte +3 -3
- package/src/blocks/button/button.types.ts +1 -1
- package/src/blocks/button/component-info.ts +1 -1
- package/src/blocks/columns/columns.svelte +18 -18
- package/src/blocks/columns/columns.types.ts +2 -2
- package/src/blocks/columns/component-info.ts +1 -1
- package/src/blocks/custom-code/component-info.ts +1 -1
- package/src/blocks/embed/component-info.ts +1 -1
- package/src/blocks/embed/embed.svelte +1 -1
- package/src/blocks/form/form/component-info.ts +1 -1
- package/src/blocks/form/form/form.svelte +9 -10
- package/src/blocks/form/input/component-info.ts +1 -1
- package/src/blocks/form/input/input.svelte +3 -3
- package/src/blocks/form/select/component-info.ts +1 -1
- package/src/blocks/form/select/select.svelte +4 -4
- package/src/blocks/form/submit-button/component-info.ts +1 -1
- package/src/blocks/form/submit-button/submit-button.svelte +2 -2
- package/src/blocks/fragment/component-info.ts +1 -1
- package/src/blocks/fragment/fragment.svelte +1 -1
- package/src/blocks/image/component-info.ts +1 -1
- package/src/blocks/image/image.svelte +15 -14
- package/src/blocks/image/image.types.ts +1 -1
- package/src/blocks/img/component-info.ts +1 -1
- package/src/blocks/img/img.svelte +14 -14
- package/src/blocks/raw-text/component-info.ts +1 -1
- package/src/blocks/section/component-info.ts +1 -1
- package/src/blocks/section/section.svelte +14 -13
- package/src/blocks/slot/component-info.ts +1 -1
- package/src/blocks/slot/slot.svelte +14 -15
- package/src/blocks/symbol/component-info.ts +1 -1
- package/src/blocks/symbol/symbol.helpers.ts +4 -4
- package/src/blocks/symbol/symbol.svelte +9 -9
- package/src/blocks/symbol/symbol.types.ts +2 -2
- package/src/blocks/text/component-info.ts +1 -1
- package/src/blocks/text/text.svelte +12 -12
- package/src/blocks/textarea/component-info.ts +1 -1
- package/src/blocks/textarea/textarea.svelte +2 -2
- package/src/blocks/video/component-info.ts +1 -1
- package/src/blocks/video/video.svelte +20 -19
- package/src/blocks/video/video.types.ts +1 -1
- package/src/components/block/animator.ts +1 -1
- package/src/components/block/block.helpers.ts +7 -7
- package/src/components/block/block.svelte +7 -7
- package/src/components/block/components/block-styles.svelte +7 -7
- package/src/components/block/components/block-wrapper.svelte +4 -4
- package/src/components/block/components/component-ref/component-ref.helpers.ts +4 -4
- package/src/components/block/components/component-ref/component-ref.svelte +3 -3
- package/src/components/block/components/interactive-element.svelte +6 -6
- package/src/components/block/components/repeated-block.svelte +2 -2
- package/src/components/block/types.ts +2 -2
- package/src/components/blocks/blocks-wrapper.svelte +13 -12
- package/src/components/blocks/blocks.svelte +3 -3
- package/src/components/blocks/blocks.types.ts +1 -1
- package/src/components/content/components/enable-editor.svelte +27 -28
- package/src/components/content/components/styles.svelte +2 -2
- package/src/components/content/content.helpers.ts +4 -4
- package/src/components/content/content.svelte +11 -11
- package/src/components/content/content.types.ts +2 -2
- package/src/components/content/contentProps.types.ts +2 -2
- package/src/components/content-variants/content-variants.svelte +6 -6
- package/src/components/content-variants/content-variants.types.ts +4 -4
- package/src/components/content-variants/helpers.ts +8 -7
- package/src/components/dynamic-renderer/dynamic-renderer.svelte +3 -3
- package/src/constants/builder-registered-components.ts +18 -18
- package/src/constants/device-sizes.ts +1 -1
- package/src/constants/extra-components.ts +18 -18
- package/src/constants/sdk-version.ts +1 -1
- package/src/constants/target.ts +1 -1
- package/src/context/index.ts +1 -0
- package/src/context/types.ts +4 -4
- package/src/functions/evaluate/browser-runtime/browser.ts +3 -3
- package/src/functions/evaluate/browser-runtime/index.ts +1 -1
- package/src/functions/evaluate/choose-eval.ts +4 -4
- package/src/functions/evaluate/edge-runtime/edge-runtime.ts +5 -5
- package/src/functions/evaluate/edge-runtime/index.ts +1 -1
- package/src/functions/evaluate/evaluate.ts +4 -4
- package/src/functions/evaluate/helpers.ts +4 -4
- package/src/functions/evaluate/index.ts +1 -1
- package/src/functions/evaluate/node-runtime/index.ts +1 -1
- package/src/functions/evaluate/node-runtime/node-runtime.ts +5 -5
- package/src/functions/evaluate/placeholder-runtime.ts +1 -1
- package/src/functions/evaluate/should-force-browser-runtime-in-node.ts +2 -2
- package/src/functions/fetch-builder-props.ts +5 -5
- package/src/functions/get-block-actions-handler.ts +3 -3
- package/src/functions/get-block-actions.ts +5 -5
- package/src/functions/get-block-component-options.ts +1 -1
- package/src/functions/get-block-properties.ts +5 -5
- package/src/functions/get-builder-search-params/index.ts +3 -3
- package/src/functions/get-class-prop-name.ts +1 -1
- package/src/functions/get-content/generate-content-url.ts +5 -5
- package/src/functions/get-content/index.ts +10 -10
- package/src/functions/get-fetch.ts +1 -1
- package/src/functions/get-processed-block.ts +6 -6
- package/src/functions/get-style.ts +5 -5
- package/src/functions/is-edge-runtime.ts +2 -2
- package/src/functions/is-editing.ts +3 -3
- package/src/functions/is-iframe.ts +1 -1
- package/src/functions/is-node-runtime.ts +1 -1
- package/src/functions/is-previewing.ts +4 -4
- package/src/functions/register-component.ts +3 -3
- package/src/functions/register.ts +3 -3
- package/src/functions/set-editor-settings.ts +1 -1
- package/src/functions/track/helpers.ts +3 -3
- package/src/functions/track/index.ts +9 -9
- package/src/functions/transform-block-properties.ts +2 -2
- package/src/functions/transform-block.ts +1 -1
- package/src/functions/transform-style-property.ts +2 -2
- package/src/helpers/ab-tests.ts +7 -7
- package/src/helpers/canTrack.ts +1 -1
- package/src/helpers/cookie.ts +5 -5
- package/src/helpers/css.ts +2 -2
- package/src/helpers/localStorage.ts +3 -3
- package/src/helpers/preview-lru-cache/get.ts +1 -1
- package/src/helpers/preview-lru-cache/set.ts +1 -1
- package/src/helpers/sessionId.ts +4 -4
- package/src/helpers/subscribe-to-editor.ts +7 -7
- package/src/helpers/visitorId.ts +4 -4
- package/src/index-helpers/blocks-exports.ts +15 -10
- package/src/index.ts +3 -3
- package/src/scripts/init-editing.ts +5 -5
- package/src/server-index.ts +27 -27
- package/src/types/builder-content.ts +3 -3
- package/src/types/builder-props.ts +2 -2
- package/src/types/components.ts +2 -2
- package/src/types/enforced-partials.ts +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Nullable } from '../../helpers/nullable
|
|
2
|
-
import type { BuilderContent } from '../../types/builder-content
|
|
1
|
+
import type { Nullable } from '../../helpers/nullable';
|
|
2
|
+
import type { BuilderContent } from '../../types/builder-content';
|
|
3
3
|
export declare const getVariants: (content: Nullable<BuilderContent>) => {
|
|
4
4
|
testVariationId: string | undefined;
|
|
5
5
|
id: string | undefined;
|
|
6
6
|
data?: {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
title?: string | undefined;
|
|
9
|
-
blocks?: import("
|
|
10
|
-
inputs?: import("../../types/input
|
|
9
|
+
blocks?: import("../..").BuilderBlock[] | undefined;
|
|
10
|
+
inputs?: import("../../types/input").Input[] | undefined;
|
|
11
11
|
state?: {
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
} | undefined;
|
|
@@ -21,7 +21,7 @@ export declare const getVariants: (content: Nullable<BuilderContent>) => {
|
|
|
21
21
|
testRatio?: number | undefined;
|
|
22
22
|
meta?: {
|
|
23
23
|
[key: string]: any;
|
|
24
|
-
breakpoints?: import("../../types/typescript
|
|
24
|
+
breakpoints?: import("../../types/typescript").Nullable<import("../../types/builder-content").Breakpoints>;
|
|
25
25
|
} | undefined;
|
|
26
26
|
}[];
|
|
27
27
|
export declare const checkShouldRenderVariants: ({ canTrack, content }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TARGET } from '../../constants/target
|
|
2
|
-
import { isBrowser } from '../../functions/is-browser
|
|
3
|
-
import { UPDATE_COOKIES_AND_STYLES_SCRIPT, UPDATE_VARIANT_VISIBILITY_SCRIPT } from './inlined-fns
|
|
1
|
+
import { TARGET } from '../../constants/target';
|
|
2
|
+
import { isBrowser } from '../../functions/is-browser';
|
|
3
|
+
import { UPDATE_COOKIES_AND_STYLES_SCRIPT, UPDATE_VARIANT_VISIBILITY_SCRIPT } from './inlined-fns';
|
|
4
4
|
/**
|
|
5
5
|
* We hardcode explicit function names here, because the `.toString()` of a function can change depending on the bundler.
|
|
6
6
|
* Some bundlers will minify the fn name, etc.
|
|
@@ -27,10 +27,11 @@ export const checkShouldRenderVariants = ({ canTrack, content }) => {
|
|
|
27
27
|
return false;
|
|
28
28
|
/**
|
|
29
29
|
* For Vue and Svelte, we need to (initially) render the variants. This is to avoid hydration mismatch errors.
|
|
30
|
+
*
|
|
30
31
|
* Unlike React, Vue's hydration checks are shallow and do not check the attributes/contents of each element, so we
|
|
31
32
|
* are able to modify the `hidden` HTML attributes and `display` CSS properties without causing a hydration mismatch error.
|
|
32
33
|
*
|
|
33
|
-
* NOTE: For
|
|
34
|
+
* NOTE: For Solid/Svelte: after the app is hydrated, we strip the variants from the DOM (on mount) to reduce the amount of HTML in the DOM.
|
|
34
35
|
* This isn't necessary, just a nice to have.
|
|
35
36
|
*/
|
|
36
37
|
if (TARGET === 'vue' || TARGET === 'svelte')
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
|
-
<script>import { isEmptyElement } from "./dynamic-renderer.helpers
|
|
4
|
-
import { setAttrs } from "../../blocks/helpers
|
|
5
|
-
export let attributes;
|
|
3
|
+
<script>import { isEmptyElement } from "./dynamic-renderer.helpers";
|
|
4
|
+
import { setAttrs } from "../../blocks/helpers";
|
|
6
5
|
export let TagName;
|
|
6
|
+
export let attributes;
|
|
7
7
|
export let actionAttributes;
|
|
8
8
|
</script>
|
|
9
9
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { componentInfo as buttonComponentInfo } from '../blocks/button/component-info
|
|
2
|
-
import { default as Button } from '../blocks/button/index
|
|
3
|
-
import { componentInfo as columnsComponentInfo } from '../blocks/columns/component-info
|
|
4
|
-
import { default as Columns } from '../blocks/columns/index
|
|
5
|
-
import { componentInfo as fragmentComponentInfo } from '../blocks/fragment/component-info
|
|
6
|
-
import { default as Fragment } from '../blocks/fragment/index
|
|
7
|
-
import { componentInfo as imageComponentInfo } from '../blocks/image/component-info
|
|
8
|
-
import { default as Image } from '../blocks/image/index
|
|
9
|
-
import { componentInfo as sectionComponentInfo } from '../blocks/section/component-info
|
|
10
|
-
import { default as Section } from '../blocks/section/index
|
|
11
|
-
import { componentInfo as slotComponentInfo } from '../blocks/slot/component-info
|
|
12
|
-
import { default as Slot } from '../blocks/slot/index
|
|
13
|
-
import { componentInfo as symbolComponentInfo } from '../blocks/symbol/component-info
|
|
14
|
-
import { default as Symbol } from '../blocks/symbol/index
|
|
15
|
-
import { componentInfo as textComponentInfo } from '../blocks/text/component-info
|
|
16
|
-
import { default as Text } from '../blocks/text/index
|
|
17
|
-
import { getExtraComponents } from './extra-components
|
|
1
|
+
import { componentInfo as buttonComponentInfo } from '../blocks/button/component-info';
|
|
2
|
+
import { default as Button } from '../blocks/button/index';
|
|
3
|
+
import { componentInfo as columnsComponentInfo } from '../blocks/columns/component-info';
|
|
4
|
+
import { default as Columns } from '../blocks/columns/index';
|
|
5
|
+
import { componentInfo as fragmentComponentInfo } from '../blocks/fragment/component-info';
|
|
6
|
+
import { default as Fragment } from '../blocks/fragment/index';
|
|
7
|
+
import { componentInfo as imageComponentInfo } from '../blocks/image/component-info';
|
|
8
|
+
import { default as Image } from '../blocks/image/index';
|
|
9
|
+
import { componentInfo as sectionComponentInfo } from '../blocks/section/component-info';
|
|
10
|
+
import { default as Section } from '../blocks/section/index';
|
|
11
|
+
import { componentInfo as slotComponentInfo } from '../blocks/slot/component-info';
|
|
12
|
+
import { default as Slot } from '../blocks/slot/index';
|
|
13
|
+
import { componentInfo as symbolComponentInfo } from '../blocks/symbol/component-info';
|
|
14
|
+
import { default as Symbol } from '../blocks/symbol/index';
|
|
15
|
+
import { componentInfo as textComponentInfo } from '../blocks/text/component-info';
|
|
16
|
+
import { default as Text } from '../blocks/text/index';
|
|
17
|
+
import { getExtraComponents } from './extra-components';
|
|
18
18
|
/**
|
|
19
19
|
* Returns a list of all registered components.
|
|
20
20
|
* NOTE: This needs to be a function to work around ESM circular dependencies.
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Having them in a separate file allows us to override it to be empty in the
|
|
4
4
|
* React Native SDK.
|
|
5
5
|
*/
|
|
6
|
-
import type { RegisteredComponent } from '../context/types
|
|
6
|
+
import type { RegisteredComponent } from '../context/types';
|
|
7
7
|
export declare const getExtraComponents: () => RegisteredComponent[];
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
* Having them in a separate file allows us to override it to be empty in the
|
|
4
4
|
* React Native SDK.
|
|
5
5
|
*/
|
|
6
|
-
import { componentInfo as customCodeInfo } from '../blocks/custom-code/component-info
|
|
7
|
-
import { default as customCode } from '../blocks/custom-code/index
|
|
8
|
-
import { componentInfo as embedComponentInfo } from '../blocks/embed/component-info
|
|
9
|
-
import { default as embed } from '../blocks/embed/index
|
|
10
|
-
import { componentInfo as formComponentInfo } from '../blocks/form/form/component-info
|
|
11
|
-
import { default as Form } from '../blocks/form/form/index
|
|
12
|
-
import { componentInfo as formInputComponentInfo } from '../blocks/form/input/component-info
|
|
13
|
-
import { default as FormInput } from '../blocks/form/input/index
|
|
14
|
-
import { componentInfo as formSelectComponentInfo } from '../blocks/form/select/component-info
|
|
15
|
-
import { default as FormSelect } from '../blocks/form/select/index
|
|
16
|
-
import { componentInfo as formSubmitButtonComponentInfo } from '../blocks/form/submit-button/component-info
|
|
17
|
-
import { default as FormSubmitButton } from '../blocks/form/submit-button/index
|
|
18
|
-
import { componentInfo as imgComponentInfo } from '../blocks/img/component-info
|
|
19
|
-
import { default as Img } from '../blocks/img/index
|
|
20
|
-
import { componentInfo as videoComponentInfo } from '../blocks/video/component-info
|
|
21
|
-
import { default as Video } from '../blocks/video/index
|
|
22
|
-
import { TARGET } from './target
|
|
6
|
+
import { componentInfo as customCodeInfo } from '../blocks/custom-code/component-info';
|
|
7
|
+
import { default as customCode } from '../blocks/custom-code/index';
|
|
8
|
+
import { componentInfo as embedComponentInfo } from '../blocks/embed/component-info';
|
|
9
|
+
import { default as embed } from '../blocks/embed/index';
|
|
10
|
+
import { componentInfo as formComponentInfo } from '../blocks/form/form/component-info';
|
|
11
|
+
import { default as Form } from '../blocks/form/form/index';
|
|
12
|
+
import { componentInfo as formInputComponentInfo } from '../blocks/form/input/component-info';
|
|
13
|
+
import { default as FormInput } from '../blocks/form/input/index';
|
|
14
|
+
import { componentInfo as formSelectComponentInfo } from '../blocks/form/select/component-info';
|
|
15
|
+
import { default as FormSelect } from '../blocks/form/select/index';
|
|
16
|
+
import { componentInfo as formSubmitButtonComponentInfo } from '../blocks/form/submit-button/component-info';
|
|
17
|
+
import { default as FormSubmitButton } from '../blocks/form/submit-button/index';
|
|
18
|
+
import { componentInfo as imgComponentInfo } from '../blocks/img/component-info';
|
|
19
|
+
import { default as Img } from '../blocks/img/index';
|
|
20
|
+
import { componentInfo as videoComponentInfo } from '../blocks/video/component-info';
|
|
21
|
+
import { default as Video } from '../blocks/video/index';
|
|
22
|
+
import { TARGET } from './target';
|
|
23
23
|
export const getExtraComponents = () => [{
|
|
24
24
|
component: customCode,
|
|
25
25
|
...customCodeInfo
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.20";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.0.
|
|
1
|
+
export const SDK_VERSION = "1.0.20";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** This file should be overriden for each framework. Ideally this would be implemented in Mitosis. */
|
|
2
|
-
export declare const TARGET: import("../types/targets
|
|
2
|
+
export declare const TARGET: import("../types/targets").Target;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BuilderContext } from './builder.context';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BuilderContext } from './builder.context';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { BlocksWrapperProps } from '../components/blocks/blocks-wrapper.svelte';
|
|
2
|
-
import type { ApiVersion } from '../types/api-version
|
|
3
|
-
import type { BuilderContent } from '../types/builder-content
|
|
4
|
-
import type { ComponentInfo } from '../types/components
|
|
5
|
-
import type { Dictionary, Nullable } from '../types/typescript
|
|
2
|
+
import type { ApiVersion } from '../types/api-version';
|
|
3
|
+
import type { BuilderContent } from '../types/builder-content';
|
|
4
|
+
import type { ComponentInfo } from '../types/components';
|
|
5
|
+
import type { Dictionary, Nullable } from '../types/typescript';
|
|
6
6
|
export type RegisteredComponent = ComponentInfo & {
|
|
7
7
|
component: any;
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderRenderState } from '../../../context/types
|
|
2
|
-
import type { ExecutorArgs } from '../helpers
|
|
1
|
+
import type { BuilderRenderState } from '../../../context/types';
|
|
2
|
+
import type { ExecutorArgs } from '../helpers';
|
|
3
3
|
export declare const runInBrowser: ({ code, builder, context, event, localState, rootSetState, rootState }: ExecutorArgs) => any;
|
|
4
4
|
export declare function flattenState({ rootState, localState, rootSetState }: {
|
|
5
5
|
rootState: Record<string | symbol, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { runInBrowser as evaluator } from './browser
|
|
1
|
+
export { runInBrowser as evaluator } from './browser';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { runInBrowser as evaluator } from './browser
|
|
1
|
+
export { runInBrowser as evaluator } from './browser';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExecutorArgs } from './helpers
|
|
1
|
+
import type { ExecutorArgs } from './helpers';
|
|
2
2
|
/**
|
|
3
3
|
* Even though we have separate runtimes for browser/node/edge, sometimes frameworks will
|
|
4
4
|
* end up sending the server runtime code to the browser (most notably in dev mode).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isBrowser } from '../is-browser
|
|
2
|
-
import { runInBrowser } from './browser-runtime/browser
|
|
1
|
+
import { isBrowser } from '../is-browser';
|
|
2
|
+
import { runInBrowser } from './browser-runtime/browser';
|
|
3
3
|
/**
|
|
4
4
|
* THIS IS A MAGICAL IMPORT. It is aliased by the build process of every SDK configuration, so that
|
|
5
5
|
* it points to the correct runtime for that configuration, which are expected to live exactly at:
|
|
@@ -12,7 +12,7 @@ import { runInBrowser } from './browser-runtime/browser.js';
|
|
|
12
12
|
* types can be resolved correctly.
|
|
13
13
|
*/
|
|
14
14
|
import { evaluator } from '../../../browser/functions/evaluate/browser-runtime/index.js';
|
|
15
|
-
import { shouldForceBrowserRuntimeInNode } from './should-force-browser-runtime-in-node
|
|
15
|
+
import { shouldForceBrowserRuntimeInNode } from './should-force-browser-runtime-in-node';
|
|
16
16
|
/**
|
|
17
17
|
* Even though we have separate runtimes for browser/node/edge, sometimes frameworks will
|
|
18
18
|
* end up sending the server runtime code to the browser (most notably in dev mode).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ExecutorArgs } from '../helpers
|
|
1
|
+
import type { ExecutorArgs } from '../helpers';
|
|
2
2
|
export declare const runInEdge: ({ builder, context, event, rootState, localState, rootSetState, code }: ExecutorArgs) => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { logger } from '../../../helpers/logger
|
|
2
|
-
import { set } from '../../set
|
|
3
|
-
import { getFunctionArguments } from '../helpers
|
|
4
|
-
import Interpreter from './acorn-interpreter
|
|
1
|
+
import { logger } from '../../../helpers/logger';
|
|
2
|
+
import { set } from '../../set';
|
|
3
|
+
import { getFunctionArguments } from '../helpers';
|
|
4
|
+
import Interpreter from './acorn-interpreter';
|
|
5
5
|
const processCode = (code) => {
|
|
6
6
|
return code.split('\n').map(line => {
|
|
7
7
|
const trimmed = line.trim();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { runInEdge as evaluator } from './edge-runtime
|
|
1
|
+
export { runInEdge as evaluator } from './edge-runtime';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { runInEdge as evaluator } from './edge-runtime
|
|
1
|
+
export { runInEdge as evaluator } from './edge-runtime';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EvaluatorArgs } from './helpers
|
|
1
|
+
import type { EvaluatorArgs } from './helpers';
|
|
2
2
|
type EvalValue = unknown;
|
|
3
3
|
export declare function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression, enableCache }: EvaluatorArgs): EvalValue;
|
|
4
4
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { logger } from '../../helpers/logger
|
|
2
|
-
import { chooseBrowserOrServerEval } from './choose-eval
|
|
3
|
-
import { getBuilderGlobals, parseCode } from './helpers
|
|
1
|
+
import { logger } from '../../helpers/logger';
|
|
2
|
+
import { chooseBrowserOrServerEval } from './choose-eval';
|
|
3
|
+
import { getBuilderGlobals, parseCode } from './helpers';
|
|
4
4
|
class EvalCache {
|
|
5
5
|
static cacheLimit = 20;
|
|
6
6
|
static cache = new Map();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface, BuilderRenderState } from '../../context/types
|
|
2
|
-
import { getUserAttributes } from '../track/helpers
|
|
1
|
+
import type { BuilderContextInterface, BuilderRenderState } from '../../context/types';
|
|
2
|
+
import { getUserAttributes } from '../track/helpers';
|
|
3
3
|
export type EvaluatorArgs = Omit<ExecutorArgs, 'builder' | 'event'> & {
|
|
4
4
|
event?: Event;
|
|
5
5
|
isExpression?: boolean;
|
|
@@ -20,6 +20,6 @@ export type Executor = (args: ExecutorArgs) => any;
|
|
|
20
20
|
export type FunctionArguments = ReturnType<typeof getFunctionArguments>;
|
|
21
21
|
export declare const getFunctionArguments: ({ builder, context, event, state }: Pick<ExecutorArgs, "context" | "builder" | "event"> & {
|
|
22
22
|
state: BuilderRenderState;
|
|
23
|
-
}) => [string, Event | BuilderRenderState | import("../../context/types
|
|
23
|
+
}) => [string, Event | BuilderRenderState | import("../../context/types").BuilderRenderContext | BuilderGlobals | undefined][];
|
|
24
24
|
export declare const getBuilderGlobals: () => BuilderGlobals;
|
|
25
25
|
export declare const parseCode: (code: string, { isExpression }: Pick<EvaluatorArgs, 'isExpression'>) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isBrowser } from '../is-browser
|
|
2
|
-
import { isEditing } from '../is-editing
|
|
3
|
-
import { getUserAttributes } from '../track/helpers
|
|
1
|
+
import { isBrowser } from '../is-browser';
|
|
2
|
+
import { isEditing } from '../is-editing';
|
|
3
|
+
import { getUserAttributes } from '../track/helpers';
|
|
4
4
|
export const getFunctionArguments = ({ builder, context, event, state }) => {
|
|
5
5
|
return Object.entries({
|
|
6
6
|
state,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { evaluate } from './evaluate
|
|
1
|
+
export { evaluate } from './evaluate';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { evaluate } from './evaluate
|
|
1
|
+
export { evaluate } from './evaluate';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { runInNode as evaluator } from './node-runtime
|
|
1
|
+
export { runInNode as evaluator } from './node-runtime';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { runInNode as evaluator } from './node-runtime
|
|
1
|
+
export { runInNode as evaluator } from './node-runtime';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ExecutorArgs } from '../helpers
|
|
1
|
+
import type { ExecutorArgs } from '../helpers';
|
|
2
2
|
export declare const runInNode: ({ code, builder, context, event, localState, rootSetState, rootState }: ExecutorArgs) => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { fastClone } from '../../fast-clone
|
|
2
|
-
import { set } from '../../set
|
|
3
|
-
import { getFunctionArguments } from '../helpers
|
|
4
|
-
import { safeDynamicRequire } from './safeDynamicRequire
|
|
1
|
+
import { fastClone } from '../../fast-clone';
|
|
2
|
+
import { set } from '../../set';
|
|
3
|
+
import { getFunctionArguments } from '../helpers';
|
|
4
|
+
import { safeDynamicRequire } from './safeDynamicRequire';
|
|
5
5
|
const getSyncValName = (key) => `bldr_${key}_sync`;
|
|
6
6
|
const BUILDER_SET_STATE_NAME = 'BUILDER_SET_STATE';
|
|
7
7
|
const INJECTED_IVM_GLOBAL = 'BUILDER_IVM';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ExecutorArgs } from './helpers
|
|
1
|
+
import type { ExecutorArgs } from './helpers';
|
|
2
2
|
export declare const evaluator: (_args: ExecutorArgs) => never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { logger } from '../../helpers/logger
|
|
2
|
-
import { isNodeRuntime } from '../is-node-runtime
|
|
1
|
+
import { logger } from '../../helpers/logger';
|
|
2
|
+
import { isNodeRuntime } from '../is-node-runtime';
|
|
3
3
|
export const shouldForceBrowserRuntimeInNode = () => {
|
|
4
4
|
if (!isNodeRuntime())
|
|
5
5
|
return false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ContentVariantsPrps } from '../components/content-variants/content-variants.types
|
|
2
|
-
import type { Dictionary } from '../types/typescript
|
|
3
|
-
import type { GetContentOptions } from './get-content/types
|
|
1
|
+
import type { ContentVariantsPrps } from '../components/content-variants/content-variants.types';
|
|
2
|
+
import type { Dictionary } from '../types/typescript';
|
|
3
|
+
import type { GetContentOptions } from './get-content/types';
|
|
4
4
|
type GetBuilderPropsOptions = (Omit<GetContentOptions, 'model'> & {
|
|
5
5
|
model?: string;
|
|
6
6
|
}) & ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getBuilderSearchParams } from './get-builder-search-params/index
|
|
2
|
-
import { fetchOneEntry } from './get-content/index
|
|
1
|
+
import { getBuilderSearchParams } from './get-builder-search-params/index';
|
|
2
|
+
import { fetchOneEntry } from './get-content/index';
|
|
3
3
|
/**
|
|
4
4
|
* Given an `apiKey` and `url` (or `path` + `searchParams`), provides all props that `Content` needs to render Builder Content.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
type Options = {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
type Actions = {
|
|
4
4
|
[index: string]: (event: Event) => any;
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TARGET } from '../constants/target
|
|
2
|
-
import { getEventHandlerName } from './event-handler-name
|
|
3
|
-
import { createEventHandler } from './get-block-actions-handler
|
|
1
|
+
import { TARGET } from '../constants/target';
|
|
2
|
+
import { getEventHandlerName } from './event-handler-name';
|
|
3
|
+
import { createEventHandler } from './get-block-actions-handler';
|
|
4
4
|
export function getBlockActions(options) {
|
|
5
5
|
const obj = {};
|
|
6
6
|
const optionActions = options.block.actions ?? {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
2
2
|
export declare function getBlockComponentOptions(block: BuilderBlock): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
export declare function getBlockProperties({ block, context }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getClassPropName } from './get-class-prop-name
|
|
2
|
-
import { getStyle } from './get-style
|
|
3
|
-
import { transformBlockProperties } from './transform-block-properties
|
|
1
|
+
import { getClassPropName } from './get-class-prop-name';
|
|
2
|
+
import { getStyle } from './get-style';
|
|
3
|
+
import { transformBlockProperties } from './transform-block-properties';
|
|
4
4
|
const extractRelevantRootBlockProperties = (block) => {
|
|
5
5
|
// currently we are only spreading the `href` property
|
|
6
6
|
// TO-DO: potentially spread all properties from block, but only if they are not already defined by BuilderBlock
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { QueryObject } from '../../helpers/search/search
|
|
1
|
+
import type { QueryObject } from '../../helpers/search/search';
|
|
2
2
|
/**
|
|
3
3
|
* Receives a `URLSearchParams` object or a regular query object, and returns the subset of query params that are
|
|
4
4
|
* relevant to the Builder SDK.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { normalizeSearchParams } from '../../helpers/search/search
|
|
2
|
-
import { isBrowser } from '../is-browser
|
|
1
|
+
import { normalizeSearchParams } from '../../helpers/search/search';
|
|
2
|
+
import { isBrowser } from '../is-browser';
|
|
3
3
|
const BUILDER_SEARCHPARAMS_PREFIX = 'builder.';
|
|
4
4
|
const BUILDER_OPTIONS_PREFIX = 'options.';
|
|
5
5
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { GetContentOptions } from './types
|
|
1
|
+
import type { GetContentOptions } from './types';
|
|
2
2
|
export declare const generateContentUrl: (options: GetContentOptions) => URL;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { flatten } from '../../helpers/flatten
|
|
2
|
-
import { normalizeSearchParams } from '../../helpers/search/search
|
|
3
|
-
import { DEFAULT_API_VERSION } from '../../types/api-version
|
|
4
|
-
import { getBuilderSearchParamsFromWindow } from '../get-builder-search-params/index
|
|
1
|
+
import { flatten } from '../../helpers/flatten';
|
|
2
|
+
import { normalizeSearchParams } from '../../helpers/search/search';
|
|
3
|
+
import { DEFAULT_API_VERSION } from '../../types/api-version';
|
|
4
|
+
import { getBuilderSearchParamsFromWindow } from '../get-builder-search-params/index';
|
|
5
5
|
const isPositiveNumber = (thing) => typeof thing === 'number' && !isNaN(thing) && thing >= 0;
|
|
6
6
|
export const generateContentUrl = (options) => {
|
|
7
7
|
const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContent } from '../../types/builder-content
|
|
2
|
-
import type { GetContentOptions } from './types
|
|
1
|
+
import type { BuilderContent } from '../../types/builder-content';
|
|
2
|
+
import type { GetContentOptions } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Returns the first content entry that matches the given options.
|
|
5
5
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { TARGET } from '../../constants/target
|
|
2
|
-
import { handleABTesting } from '../../helpers/ab-tests
|
|
3
|
-
import { getDefaultCanTrack } from '../../helpers/canTrack
|
|
4
|
-
import { logger } from '../../helpers/logger
|
|
5
|
-
import { getPreviewContent } from '../../helpers/preview-lru-cache/get
|
|
6
|
-
import { fetch } from '../get-fetch
|
|
7
|
-
import { isBrowser } from '../is-browser
|
|
8
|
-
import { generateContentUrl } from './generate-content-url
|
|
1
|
+
import { TARGET } from '../../constants/target';
|
|
2
|
+
import { handleABTesting } from '../../helpers/ab-tests';
|
|
3
|
+
import { getDefaultCanTrack } from '../../helpers/canTrack';
|
|
4
|
+
import { logger } from '../../helpers/logger';
|
|
5
|
+
import { getPreviewContent } from '../../helpers/preview-lru-cache/get';
|
|
6
|
+
import { fetch } from '../get-fetch';
|
|
7
|
+
import { isBrowser } from '../is-browser';
|
|
8
|
+
import { generateContentUrl } from './generate-content-url';
|
|
9
9
|
const checkContentHasResults = (content) => 'results' in content;
|
|
10
10
|
/**
|
|
11
11
|
* Returns the first content entry that matches the given options.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
export declare function getProcessedBlock({ block, context, shouldEvaluateBindings, localState, rootState, rootSetState }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { evaluate } from './evaluate/index
|
|
2
|
-
import { fastClone } from './fast-clone
|
|
3
|
-
import { set } from './set
|
|
4
|
-
import { transformBlock } from './transform-block
|
|
1
|
+
import { evaluate } from './evaluate/index';
|
|
2
|
+
import { fastClone } from './fast-clone';
|
|
3
|
+
import { set } from './set';
|
|
4
|
+
import { transformBlock } from './transform-block';
|
|
5
5
|
const evaluateBindings = ({ block, context, localState, rootState, rootSetState }) => {
|
|
6
6
|
if (!block.bindings) {
|
|
7
7
|
return block;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
export declare const getStyle: ({ block, context }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
context: BuilderContextInterface;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TARGET } from '../constants/target
|
|
2
|
-
import { convertStyleMapToCSSArray } from '../helpers/css
|
|
3
|
-
import { transformStyleProperty } from './transform-style-property
|
|
1
|
+
import { TARGET } from '../constants/target';
|
|
2
|
+
import { convertStyleMapToCSSArray } from '../helpers/css';
|
|
3
|
+
import { transformStyleProperty } from './transform-style-property';
|
|
4
4
|
export const getStyle = ({ block, context }) => {
|
|
5
5
|
return mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
6
6
|
style: block.style || {},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isBrowser } from './is-browser
|
|
2
|
-
import { isNodeRuntime } from './is-node-runtime
|
|
1
|
+
import { isBrowser } from './is-browser';
|
|
2
|
+
import { isNodeRuntime } from './is-node-runtime';
|
|
3
3
|
/**
|
|
4
4
|
* Identifies edge runtimes (edge, workers, serverless, etc.)
|
|
5
5
|
*/
|