@builder.io/sdk-react 2.0.22 → 2.0.24-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/lib/browser/blocks-exports.cjs +25 -25
- package/lib/browser/blocks-exports.mjs +535 -563
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-5770bca9.cjs → server-entry-3855428f.cjs} +1 -1
- package/lib/browser/{server-entry-b83ba684.js → server-entry-e7cbd2fc.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-78c3d81b.js → accordion-57df597a.js} +1 -1
- package/lib/edge/{accordion-80133dd8.cjs → accordion-91147fe9.cjs} +1 -1
- package/lib/edge/{blocks-852d317b.js → blocks-228052f4.js} +21 -19
- package/lib/edge/blocks-2a92a0c1.cjs +12 -0
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-0a729557.js → button-d681583e.js} +2 -2
- package/lib/edge/{button-a97c0d05.cjs → button-ff78ab2a.cjs} +1 -1
- package/lib/edge/{columns-2bd50130.cjs → columns-354a8faf.cjs} +1 -1
- package/lib/edge/{columns-1149d23a.js → columns-59392fea.js} +4 -4
- package/lib/edge/{content-variants-86962b96.js → content-variants-983cfed6.js} +13 -18
- package/lib/edge/{content-variants-cbd84920.cjs → content-variants-f22b14d7.cjs} +4 -4
- package/lib/edge/{evaluate-46f56681.js → evaluate-b7da3191.js} +706 -726
- package/lib/edge/{evaluate-617e3bee.cjs → evaluate-f8347208.cjs} +11 -11
- package/lib/edge/form-2c8b99e2.cjs +1 -0
- package/lib/edge/form-52e60b8b.js +180 -0
- package/lib/edge/{get-class-prop-name-6e4205e7.js → get-class-prop-name-8c8a1b1c.js} +1 -1
- package/lib/edge/{get-class-prop-name-dc89023a.cjs → get-class-prop-name-956dc1ac.cjs} +1 -1
- package/lib/edge/{img-70b9d719.cjs → img-9e702744.cjs} +1 -1
- package/lib/edge/{img-0bc990ef.js → img-ce324880.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-21071030.cjs → input-09bbebbb.cjs} +1 -1
- package/lib/edge/{input-3689c63d.js → input-c5dda333.js} +1 -1
- package/lib/edge/{select-cb7c2f44.cjs → select-235baf48.cjs} +1 -1
- package/lib/edge/{select-65ebd3fd.js → select-8936ea79.js} +1 -1
- package/lib/edge/{server-entry-9d83b8e5.js → server-entry-b3befa52.js} +1 -1
- package/lib/edge/{server-entry-8ce6f347.cjs → server-entry-f0d7962f.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-21cc91d8.cjs → slot-eb173f0a.cjs} +1 -1
- package/lib/edge/{slot-e5f3b92d.js → slot-f274570e.js} +4 -4
- package/lib/edge/{symbol-56e5b927.js → symbol-0deda8a7.js} +2 -2
- package/lib/edge/{symbol-0cc07e41.cjs → symbol-73a9d7cb.cjs} +1 -1
- package/lib/edge/{tabs-9390d611.cjs → tabs-4e5783b2.cjs} +1 -1
- package/lib/edge/{tabs-0e6f6b5b.js → tabs-791385cc.js} +4 -4
- package/lib/edge/{text-b68c0d5a.js → text-0a14d566.js} +8 -9
- package/lib/edge/text-3dd73c6e.cjs +1 -0
- package/lib/node/blocks-exports.cjs +25 -25
- package/lib/node/blocks-exports.mjs +555 -583
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +4 -3
- package/lib/node/{server-entry-52b8f10a.cjs → server-entry-a7139d8f.cjs} +1 -1
- package/lib/node/{server-entry-5b32494d.js → server-entry-fa11b353.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-253f1726.cjs → should-force-browser-runtime-in-node-0bf7076b.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-68bc74aa.js → should-force-browser-runtime-in-node-ddb84649.js} +1 -1
- package/package.json +3 -2
- package/types/blocks/textarea/component-info.d.ts +2 -0
- package/types/blocks/textarea/index.d.ts +1 -0
- package/types/blocks/textarea/textarea.d.ts +13 -0
- package/types/cjs/blocks/BaseText.d.cts +6 -0
- package/types/cjs/blocks/button/button.d.cts +4 -0
- package/types/cjs/blocks/button/button.types.d.cts +7 -0
- package/types/cjs/blocks/button/component-info.d.cts +2 -0
- package/types/cjs/blocks/button/index.d.cts +1 -0
- package/types/cjs/blocks/columns/columns.d.cts +4 -0
- package/types/cjs/blocks/columns/columns.types.d.cts +15 -0
- package/types/cjs/blocks/columns/component-info.d.cts +2 -0
- package/types/cjs/blocks/columns/helpers.d.cts +1 -0
- package/types/cjs/blocks/columns/index.d.cts +1 -0
- package/types/cjs/blocks/custom-code/component-info.d.cts +2 -0
- package/types/cjs/blocks/custom-code/custom-code.d.cts +7 -0
- package/types/cjs/blocks/custom-code/index.d.cts +1 -0
- package/types/cjs/blocks/embed/component-info.d.cts +2 -0
- package/types/cjs/blocks/embed/embed.d.cts +6 -0
- package/types/cjs/blocks/embed/helpers.d.cts +1 -0
- package/types/cjs/blocks/embed/index.d.cts +1 -0
- package/types/cjs/blocks/form/form/component-info.d.cts +2 -0
- package/types/cjs/blocks/form/form/form.d.cts +33 -0
- package/types/cjs/blocks/form/form/index.d.cts +1 -0
- package/types/cjs/blocks/form/input/component-info.d.cts +2 -0
- package/types/cjs/blocks/form/input/index.d.cts +1 -0
- package/types/cjs/blocks/form/input/input.d.cts +15 -0
- package/types/cjs/blocks/form/select/component-info.d.cts +2 -0
- package/types/cjs/blocks/form/select/index.d.cts +1 -0
- package/types/cjs/blocks/form/select/select.d.cts +16 -0
- package/types/cjs/blocks/form/submit-button/component-info.d.cts +2 -0
- package/types/cjs/blocks/form/submit-button/index.d.cts +1 -0
- package/types/cjs/blocks/form/submit-button/submit-button.d.cts +10 -0
- package/types/cjs/blocks/fragment/component-info.d.cts +2 -0
- package/types/cjs/blocks/fragment/fragment.d.cts +4 -0
- package/types/cjs/blocks/fragment/fragment.types.d.cts +5 -0
- package/types/cjs/blocks/fragment/index.d.cts +1 -0
- package/types/cjs/blocks/helpers.d.cts +13 -0
- package/types/cjs/blocks/image/component-info.d.cts +2 -0
- package/types/cjs/blocks/image/image.d.cts +4 -0
- package/types/cjs/blocks/image/image.helpers.d.cts +1 -0
- package/types/cjs/blocks/image/image.types.d.cts +19 -0
- package/types/cjs/blocks/image/index.d.cts +1 -0
- package/types/cjs/blocks/img/component-info.d.cts +2 -0
- package/types/cjs/blocks/img/img.d.cts +14 -0
- package/types/cjs/blocks/img/index.d.cts +1 -0
- package/types/cjs/blocks/raw-text/component-info.d.cts +2 -0
- package/types/cjs/blocks/raw-text/index.d.cts +1 -0
- package/types/cjs/blocks/raw-text/raw-text.d.cts +7 -0
- package/types/cjs/blocks/section/component-info.d.cts +2 -0
- package/types/cjs/blocks/section/index.d.cts +1 -0
- package/types/cjs/blocks/section/section.d.cts +4 -0
- package/types/cjs/blocks/section/section.types.d.cts +6 -0
- package/types/cjs/blocks/slot/component-info.d.cts +2 -0
- package/types/cjs/blocks/slot/index.d.cts +1 -0
- package/types/cjs/blocks/slot/slot.d.cts +8 -0
- package/types/cjs/blocks/symbol/component-info.d.cts +2 -0
- package/types/cjs/blocks/symbol/index.d.cts +1 -0
- package/types/cjs/blocks/symbol/symbol.d.cts +4 -0
- package/types/cjs/blocks/symbol/symbol.helpers.d.cts +14 -0
- package/types/cjs/blocks/symbol/symbol.types.d.cts +18 -0
- package/types/cjs/blocks/tabs/component-info.d.cts +2 -0
- package/types/cjs/blocks/tabs/index.d.cts +1 -0
- package/types/cjs/blocks/tabs/tabs.d.cts +4 -0
- package/types/cjs/blocks/tabs/tabs.types.d.cts +13 -0
- package/types/cjs/blocks/text/component-info.d.cts +2 -0
- package/types/cjs/blocks/text/index.d.cts +1 -0
- package/types/cjs/blocks/text/text.d.cts +4 -0
- package/types/cjs/blocks/text/text.types.d.cts +4 -0
- package/types/cjs/blocks/textarea/component-info.d.cts +2 -0
- package/types/cjs/blocks/textarea/index.d.cts +1 -0
- package/types/cjs/blocks/textarea/textarea.d.cts +13 -0
- package/types/cjs/blocks/video/component-info.d.cts +2 -0
- package/types/cjs/blocks/video/index.d.cts +1 -0
- package/types/cjs/blocks/video/video.d.cts +4 -0
- package/types/cjs/blocks/video/video.types.d.cts +21 -0
- package/types/cjs/components/block/animator.d.cts +5 -0
- package/types/cjs/components/block/block.d.cts +11 -0
- package/types/cjs/components/block/block.helpers.d.cts +18 -0
- package/types/cjs/components/block/components/block-styles.d.cts +9 -0
- package/types/cjs/components/block/components/block-wrapper.d.cts +15 -0
- package/types/cjs/components/block/components/component-ref/component-ref.d.cts +4 -0
- package/types/cjs/components/block/components/component-ref/component-ref.helpers.d.cts +31 -0
- package/types/cjs/components/block/components/interactive-element.d.cts +14 -0
- package/types/cjs/components/block/components/repeated-block.d.cts +8 -0
- package/types/cjs/components/block/types.d.cts +6 -0
- package/types/cjs/components/blocks/blocks-wrapper.d.cts +19 -0
- package/types/cjs/components/blocks/blocks.d.cts +4 -0
- package/types/cjs/components/blocks/blocks.types.d.cts +7 -0
- package/types/cjs/components/blocks/index.d.cts +1 -0
- package/types/cjs/components/content/components/enable-editor.d.cts +10 -0
- package/types/cjs/components/content/components/styles.d.cts +10 -0
- package/types/cjs/components/content/components/styles.helpers.d.cts +17 -0
- package/types/cjs/components/content/content.d.cts +4 -0
- package/types/cjs/components/content/content.helpers.d.cts +7 -0
- package/types/cjs/components/content/content.types.d.cts +13 -0
- package/types/cjs/components/content/contentProps.types.d.cts +17 -0
- package/types/cjs/components/content/index.d.cts +1 -0
- package/types/cjs/components/content/wrap-component-ref.d.cts +6 -0
- package/types/cjs/components/content-variants/content-variants.d.cts +10 -0
- package/types/cjs/components/content-variants/content-variants.types.d.cts +71 -0
- package/types/cjs/components/content-variants/helpers.d.cts +41 -0
- package/types/cjs/components/content-variants/index.d.cts +1 -0
- package/types/cjs/components/content-variants/inlined-fns.d.cts +14 -0
- package/types/cjs/components/dynamic-div.d.cts +15 -0
- package/types/cjs/components/dynamic-renderer/dynamic-renderer.d.cts +9 -0
- package/types/cjs/components/dynamic-renderer/dynamic-renderer.helpers.d.cts +1 -0
- package/types/cjs/components/error-boundary.d.cts +11 -0
- package/types/cjs/components/inlined-script.d.cts +7 -0
- package/types/cjs/components/inlined-styles.d.cts +7 -0
- package/types/cjs/constants/builder-registered-components.d.cts +6 -0
- package/types/cjs/constants/device-sizes.d.cts +13 -0
- package/types/cjs/constants/extra-components.d.cts +7 -0
- package/types/cjs/constants/sdk-version.d.cts +1 -0
- package/types/cjs/constants/target.d.cts +2 -0
- package/types/cjs/context/builder.context.d.cts +3 -0
- package/types/cjs/context/components.context.d.cts +3 -0
- package/types/cjs/context/index.d.cts +1 -0
- package/types/cjs/context/types.d.cts +36 -0
- package/types/cjs/functions/apply-patch-with-mutation.d.cts +10 -0
- package/types/cjs/functions/camel-to-kebab-case.d.cts +1 -0
- package/types/cjs/functions/deopt.d.cts +4 -0
- package/types/cjs/functions/evaluate/browser-runtime/browser.d.cts +8 -0
- package/types/cjs/functions/evaluate/browser-runtime/index.d.cts +1 -0
- package/types/cjs/functions/evaluate/choose-eval.d.cts +6 -0
- package/types/cjs/functions/evaluate/edge-runtime/acorn-interpreter.d.cts +2 -0
- package/types/cjs/functions/evaluate/edge-runtime/edge-runtime.d.cts +2 -0
- package/types/cjs/functions/evaluate/edge-runtime/index.d.cts +1 -0
- package/types/cjs/functions/evaluate/evaluate.d.cts +4 -0
- package/types/cjs/functions/evaluate/helpers.d.cts +25 -0
- package/types/cjs/functions/evaluate/index.d.cts +1 -0
- package/types/cjs/functions/evaluate/node-runtime/index.d.cts +1 -0
- package/types/cjs/functions/evaluate/node-runtime/init.d.cts +13 -0
- package/types/cjs/functions/evaluate/node-runtime/node-runtime.d.cts +11 -0
- package/types/cjs/functions/evaluate/node-runtime/safeDynamicRequire.d.cts +6 -0
- package/types/cjs/functions/evaluate/placeholder-runtime.d.cts +2 -0
- package/types/cjs/functions/evaluate/should-force-browser-runtime-in-node.d.cts +1 -0
- package/types/cjs/functions/event-handler-name.d.cts +1 -0
- package/types/cjs/functions/extract-text-styles.d.cts +4 -0
- package/types/cjs/functions/fast-clone.d.cts +4 -0
- package/types/cjs/functions/fetch-builder-props.d.cts +53 -0
- package/types/cjs/functions/get-block-actions-handler.d.cts +8 -0
- package/types/cjs/functions/get-block-actions.d.cts +10 -0
- package/types/cjs/functions/get-block-component-options.d.cts +2 -0
- package/types/cjs/functions/get-block-properties.d.cts +10 -0
- package/types/cjs/functions/get-builder-search-params/index.d.cts +9 -0
- package/types/cjs/functions/get-class-prop-name.d.cts +1 -0
- package/types/cjs/functions/get-content/generate-content-url.d.cts +2 -0
- package/types/cjs/functions/get-content/index.d.cts +18 -0
- package/types/cjs/functions/get-content/types.d.cts +139 -0
- package/types/cjs/functions/get-env.d.cts +2 -0
- package/types/cjs/functions/get-fetch.d.cts +1 -0
- package/types/cjs/functions/get-global-this.d.cts +4 -0
- package/types/cjs/functions/get-processed-block.d.cts +10 -0
- package/types/cjs/functions/get-style.d.cts +12 -0
- package/types/cjs/functions/get.d.cts +1 -0
- package/types/cjs/functions/is-browser.d.cts +1 -0
- package/types/cjs/functions/is-edge-runtime.d.cts +4 -0
- package/types/cjs/functions/is-editing.d.cts +2 -0
- package/types/cjs/functions/is-from-trusted-host.d.cts +3 -0
- package/types/cjs/functions/is-iframe.d.cts +1 -0
- package/types/cjs/functions/is-node-runtime.d.cts +4 -0
- package/types/cjs/functions/is-previewing.d.cts +2 -0
- package/types/cjs/functions/on-change.d.cts +7 -0
- package/types/cjs/functions/register-component.d.cts +6 -0
- package/types/cjs/functions/register.d.cts +16 -0
- package/types/cjs/functions/set-editor-settings.d.cts +4 -0
- package/types/cjs/functions/set.d.cts +7 -0
- package/types/cjs/functions/track/helpers.d.cts +5 -0
- package/types/cjs/functions/track/index.d.cts +51 -0
- package/types/cjs/functions/track/interaction.d.cts +13 -0
- package/types/cjs/functions/transform-block-properties.d.cts +7 -0
- package/types/cjs/functions/transform-block.d.cts +2 -0
- package/types/cjs/functions/transform-style-property.d.cts +7 -0
- package/types/cjs/helpers/ab-tests.d.cts +9 -0
- package/types/cjs/helpers/canTrack.d.cts +1 -0
- package/types/cjs/helpers/cookie.d.cts +19 -0
- package/types/cjs/helpers/css.d.cts +7 -0
- package/types/cjs/helpers/flatten.d.cts +16 -0
- package/types/cjs/helpers/localStorage.d.cts +9 -0
- package/types/cjs/helpers/logger.d.cts +7 -0
- package/types/cjs/helpers/nullable.d.cts +2 -0
- package/types/cjs/helpers/omit.d.cts +1 -0
- package/types/cjs/helpers/preview-lru-cache/get.d.cts +2 -0
- package/types/cjs/helpers/preview-lru-cache/helpers.d.cts +1 -0
- package/types/cjs/helpers/preview-lru-cache/init.d.cts +6 -0
- package/types/cjs/helpers/preview-lru-cache/set.d.cts +7 -0
- package/types/cjs/helpers/preview-lru-cache/types.d.cts +1 -0
- package/types/cjs/helpers/search/search.d.cts +5 -0
- package/types/cjs/helpers/sessionId.d.cts +6 -0
- package/types/cjs/helpers/subscribe-to-editor.d.cts +35 -0
- package/types/cjs/helpers/time.d.cts +1 -0
- package/types/cjs/helpers/url.d.cts +6 -0
- package/types/cjs/helpers/uuid.d.cts +8 -0
- package/types/cjs/helpers/visitorId.d.cts +6 -0
- package/types/cjs/index-helpers/blocks-exports.d.cts +14 -0
- package/types/cjs/index-helpers/top-of-file.d.cts +1 -0
- package/types/cjs/index.d.cts +10 -0
- package/types/cjs/scripts/init-editing.d.cts +7 -0
- package/types/cjs/server-index.d.cts +39 -0
- package/types/cjs/types/api-version.d.cts +2 -0
- package/types/cjs/types/builder-block.d.cts +84 -0
- package/types/cjs/types/builder-content.d.cts +44 -0
- package/types/cjs/types/builder-props.d.cts +12 -0
- package/types/cjs/types/can-track.d.cts +3 -0
- package/types/cjs/types/components.d.cts +110 -0
- package/types/cjs/types/deep-partial.d.cts +3 -0
- package/types/cjs/types/element.d.cts +59 -0
- package/types/cjs/types/enforced-partials.d.cts +26 -0
- package/types/cjs/types/input.d.cts +122 -0
- package/types/cjs/types/targets.d.cts +1 -0
- package/types/cjs/types/typescript.d.cts +8 -0
- package/types/components/blocks/blocks-wrapper.d.ts +1 -0
- package/types/components/blocks/blocks.types.d.ts +2 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/esm/blocks/BaseText.d.mts +6 -0
- package/types/esm/blocks/button/button.d.mts +4 -0
- package/types/esm/blocks/button/button.types.d.mts +7 -0
- package/types/esm/blocks/button/component-info.d.mts +2 -0
- package/types/esm/blocks/button/index.d.mts +1 -0
- package/types/esm/blocks/columns/columns.d.mts +4 -0
- package/types/esm/blocks/columns/columns.types.d.mts +15 -0
- package/types/esm/blocks/columns/component-info.d.mts +2 -0
- package/types/esm/blocks/columns/helpers.d.mts +1 -0
- package/types/esm/blocks/columns/index.d.mts +1 -0
- package/types/esm/blocks/custom-code/component-info.d.mts +2 -0
- package/types/esm/blocks/custom-code/custom-code.d.mts +7 -0
- package/types/esm/blocks/custom-code/index.d.mts +1 -0
- package/types/esm/blocks/embed/component-info.d.mts +2 -0
- package/types/esm/blocks/embed/embed.d.mts +6 -0
- package/types/esm/blocks/embed/helpers.d.mts +1 -0
- package/types/esm/blocks/embed/index.d.mts +1 -0
- package/types/esm/blocks/form/form/component-info.d.mts +2 -0
- package/types/esm/blocks/form/form/form.d.mts +33 -0
- package/types/esm/blocks/form/form/index.d.mts +1 -0
- package/types/esm/blocks/form/input/component-info.d.mts +2 -0
- package/types/esm/blocks/form/input/index.d.mts +1 -0
- package/types/esm/blocks/form/input/input.d.mts +15 -0
- package/types/esm/blocks/form/select/component-info.d.mts +2 -0
- package/types/esm/blocks/form/select/index.d.mts +1 -0
- package/types/esm/blocks/form/select/select.d.mts +16 -0
- package/types/esm/blocks/form/submit-button/component-info.d.mts +2 -0
- package/types/esm/blocks/form/submit-button/index.d.mts +1 -0
- package/types/esm/blocks/form/submit-button/submit-button.d.mts +10 -0
- package/types/esm/blocks/fragment/component-info.d.mts +2 -0
- package/types/esm/blocks/fragment/fragment.d.mts +4 -0
- package/types/esm/blocks/fragment/fragment.types.d.mts +5 -0
- package/types/esm/blocks/fragment/index.d.mts +1 -0
- package/types/esm/blocks/helpers.d.mts +13 -0
- package/types/esm/blocks/image/component-info.d.mts +2 -0
- package/types/esm/blocks/image/image.d.mts +4 -0
- package/types/esm/blocks/image/image.helpers.d.mts +1 -0
- package/types/esm/blocks/image/image.types.d.mts +19 -0
- package/types/esm/blocks/image/index.d.mts +1 -0
- package/types/esm/blocks/img/component-info.d.mts +2 -0
- package/types/esm/blocks/img/img.d.mts +14 -0
- package/types/esm/blocks/img/index.d.mts +1 -0
- package/types/esm/blocks/raw-text/component-info.d.mts +2 -0
- package/types/esm/blocks/raw-text/index.d.mts +1 -0
- package/types/esm/blocks/raw-text/raw-text.d.mts +7 -0
- package/types/esm/blocks/section/component-info.d.mts +2 -0
- package/types/esm/blocks/section/index.d.mts +1 -0
- package/types/esm/blocks/section/section.d.mts +4 -0
- package/types/esm/blocks/section/section.types.d.mts +6 -0
- package/types/esm/blocks/slot/component-info.d.mts +2 -0
- package/types/esm/blocks/slot/index.d.mts +1 -0
- package/types/esm/blocks/slot/slot.d.mts +8 -0
- package/types/esm/blocks/symbol/component-info.d.mts +2 -0
- package/types/esm/blocks/symbol/index.d.mts +1 -0
- package/types/esm/blocks/symbol/symbol.d.mts +4 -0
- package/types/esm/blocks/symbol/symbol.helpers.d.mts +14 -0
- package/types/esm/blocks/symbol/symbol.types.d.mts +18 -0
- package/types/esm/blocks/tabs/component-info.d.mts +2 -0
- package/types/esm/blocks/tabs/index.d.mts +1 -0
- package/types/esm/blocks/tabs/tabs.d.mts +4 -0
- package/types/esm/blocks/tabs/tabs.types.d.mts +13 -0
- package/types/esm/blocks/text/component-info.d.mts +2 -0
- package/types/esm/blocks/text/index.d.mts +1 -0
- package/types/esm/blocks/text/text.d.mts +4 -0
- package/types/esm/blocks/text/text.types.d.mts +4 -0
- package/types/esm/blocks/textarea/component-info.d.mts +2 -0
- package/types/esm/blocks/textarea/index.d.mts +1 -0
- package/types/esm/blocks/textarea/textarea.d.mts +13 -0
- package/types/esm/blocks/video/component-info.d.mts +2 -0
- package/types/esm/blocks/video/index.d.mts +1 -0
- package/types/esm/blocks/video/video.d.mts +4 -0
- package/types/esm/blocks/video/video.types.d.mts +21 -0
- package/types/esm/components/block/animator.d.mts +5 -0
- package/types/esm/components/block/block.d.mts +11 -0
- package/types/esm/components/block/block.helpers.d.mts +18 -0
- package/types/esm/components/block/components/block-styles.d.mts +9 -0
- package/types/esm/components/block/components/block-wrapper.d.mts +15 -0
- package/types/esm/components/block/components/component-ref/component-ref.d.mts +4 -0
- package/types/esm/components/block/components/component-ref/component-ref.helpers.d.mts +31 -0
- package/types/esm/components/block/components/interactive-element.d.mts +14 -0
- package/types/esm/components/block/components/repeated-block.d.mts +8 -0
- package/types/esm/components/block/types.d.mts +6 -0
- package/types/esm/components/blocks/blocks-wrapper.d.mts +19 -0
- package/types/esm/components/blocks/blocks.d.mts +4 -0
- package/types/esm/components/blocks/blocks.types.d.mts +7 -0
- package/types/esm/components/blocks/index.d.mts +1 -0
- package/types/esm/components/content/components/enable-editor.d.mts +10 -0
- package/types/esm/components/content/components/styles.d.mts +10 -0
- package/types/esm/components/content/components/styles.helpers.d.mts +17 -0
- package/types/esm/components/content/content.d.mts +4 -0
- package/types/esm/components/content/content.helpers.d.mts +7 -0
- package/types/esm/components/content/content.types.d.mts +13 -0
- package/types/esm/components/content/contentProps.types.d.mts +17 -0
- package/types/esm/components/content/index.d.mts +1 -0
- package/types/esm/components/content/wrap-component-ref.d.mts +6 -0
- package/types/esm/components/content-variants/content-variants.d.mts +10 -0
- package/types/esm/components/content-variants/content-variants.types.d.mts +71 -0
- package/types/esm/components/content-variants/helpers.d.mts +41 -0
- package/types/esm/components/content-variants/index.d.mts +1 -0
- package/types/esm/components/content-variants/inlined-fns.d.mts +14 -0
- package/types/esm/components/dynamic-div.d.mts +15 -0
- package/types/esm/components/dynamic-renderer/dynamic-renderer.d.mts +9 -0
- package/types/esm/components/dynamic-renderer/dynamic-renderer.helpers.d.mts +1 -0
- package/types/esm/components/error-boundary.d.mts +11 -0
- package/types/esm/components/inlined-script.d.mts +7 -0
- package/types/esm/components/inlined-styles.d.mts +7 -0
- package/types/esm/constants/builder-registered-components.d.mts +6 -0
- package/types/esm/constants/device-sizes.d.mts +13 -0
- package/types/esm/constants/extra-components.d.mts +7 -0
- package/types/esm/constants/sdk-version.d.mts +1 -0
- package/types/esm/constants/target.d.mts +2 -0
- package/types/esm/context/builder.context.d.mts +3 -0
- package/types/esm/context/components.context.d.mts +3 -0
- package/types/esm/context/index.d.mts +1 -0
- package/types/esm/context/types.d.mts +36 -0
- package/types/esm/functions/apply-patch-with-mutation.d.mts +10 -0
- package/types/esm/functions/camel-to-kebab-case.d.mts +1 -0
- package/types/esm/functions/deopt.d.mts +4 -0
- package/types/esm/functions/evaluate/browser-runtime/browser.d.mts +8 -0
- package/types/esm/functions/evaluate/browser-runtime/index.d.mts +1 -0
- package/types/esm/functions/evaluate/choose-eval.d.mts +6 -0
- package/types/esm/functions/evaluate/edge-runtime/acorn-interpreter.d.mts +2 -0
- package/types/esm/functions/evaluate/edge-runtime/edge-runtime.d.mts +2 -0
- package/types/esm/functions/evaluate/edge-runtime/index.d.mts +1 -0
- package/types/esm/functions/evaluate/evaluate.d.mts +4 -0
- package/types/esm/functions/evaluate/helpers.d.mts +25 -0
- package/types/esm/functions/evaluate/index.d.mts +1 -0
- package/types/esm/functions/evaluate/node-runtime/index.d.mts +1 -0
- package/types/esm/functions/evaluate/node-runtime/init.d.mts +13 -0
- package/types/esm/functions/evaluate/node-runtime/node-runtime.d.mts +11 -0
- package/types/esm/functions/evaluate/node-runtime/safeDynamicRequire.d.mts +6 -0
- package/types/esm/functions/evaluate/placeholder-runtime.d.mts +2 -0
- package/types/esm/functions/evaluate/should-force-browser-runtime-in-node.d.mts +1 -0
- package/types/esm/functions/event-handler-name.d.mts +1 -0
- package/types/esm/functions/extract-text-styles.d.mts +4 -0
- package/types/esm/functions/fast-clone.d.mts +4 -0
- package/types/esm/functions/fetch-builder-props.d.mts +53 -0
- package/types/esm/functions/get-block-actions-handler.d.mts +8 -0
- package/types/esm/functions/get-block-actions.d.mts +10 -0
- package/types/esm/functions/get-block-component-options.d.mts +2 -0
- package/types/esm/functions/get-block-properties.d.mts +10 -0
- package/types/esm/functions/get-builder-search-params/index.d.mts +9 -0
- package/types/esm/functions/get-class-prop-name.d.mts +1 -0
- package/types/esm/functions/get-content/generate-content-url.d.mts +2 -0
- package/types/esm/functions/get-content/index.d.mts +18 -0
- package/types/esm/functions/get-content/types.d.mts +139 -0
- package/types/esm/functions/get-env.d.mts +2 -0
- package/types/esm/functions/get-fetch.d.mts +1 -0
- package/types/esm/functions/get-global-this.d.mts +4 -0
- package/types/esm/functions/get-processed-block.d.mts +10 -0
- package/types/esm/functions/get-style.d.mts +12 -0
- package/types/esm/functions/get.d.mts +1 -0
- package/types/esm/functions/is-browser.d.mts +1 -0
- package/types/esm/functions/is-edge-runtime.d.mts +4 -0
- package/types/esm/functions/is-editing.d.mts +2 -0
- package/types/esm/functions/is-from-trusted-host.d.mts +3 -0
- package/types/esm/functions/is-iframe.d.mts +1 -0
- package/types/esm/functions/is-node-runtime.d.mts +4 -0
- package/types/esm/functions/is-previewing.d.mts +2 -0
- package/types/esm/functions/on-change.d.mts +7 -0
- package/types/esm/functions/register-component.d.mts +6 -0
- package/types/esm/functions/register.d.mts +16 -0
- package/types/esm/functions/set-editor-settings.d.mts +4 -0
- package/types/esm/functions/set.d.mts +7 -0
- package/types/esm/functions/track/helpers.d.mts +5 -0
- package/types/esm/functions/track/index.d.mts +51 -0
- package/types/esm/functions/track/interaction.d.mts +13 -0
- package/types/esm/functions/transform-block-properties.d.mts +7 -0
- package/types/esm/functions/transform-block.d.mts +2 -0
- package/types/esm/functions/transform-style-property.d.mts +7 -0
- package/types/esm/helpers/ab-tests.d.mts +9 -0
- package/types/esm/helpers/canTrack.d.mts +1 -0
- package/types/esm/helpers/cookie.d.mts +19 -0
- package/types/esm/helpers/css.d.mts +7 -0
- package/types/esm/helpers/flatten.d.mts +16 -0
- package/types/esm/helpers/localStorage.d.mts +9 -0
- package/types/esm/helpers/logger.d.mts +7 -0
- package/types/esm/helpers/nullable.d.mts +2 -0
- package/types/esm/helpers/omit.d.mts +1 -0
- package/types/esm/helpers/preview-lru-cache/get.d.mts +2 -0
- package/types/esm/helpers/preview-lru-cache/helpers.d.mts +1 -0
- package/types/esm/helpers/preview-lru-cache/init.d.mts +6 -0
- package/types/esm/helpers/preview-lru-cache/set.d.mts +7 -0
- package/types/esm/helpers/preview-lru-cache/types.d.mts +1 -0
- package/types/esm/helpers/search/search.d.mts +5 -0
- package/types/esm/helpers/sessionId.d.mts +6 -0
- package/types/esm/helpers/subscribe-to-editor.d.mts +35 -0
- package/types/esm/helpers/time.d.mts +1 -0
- package/types/esm/helpers/url.d.mts +6 -0
- package/types/esm/helpers/uuid.d.mts +8 -0
- package/types/esm/helpers/visitorId.d.mts +6 -0
- package/types/esm/index-helpers/blocks-exports.d.mts +14 -0
- package/types/esm/index-helpers/top-of-file.d.mts +1 -0
- package/types/esm/index.d.mts +10 -0
- package/types/esm/index.d.mts.d.mts +10 -0
- package/types/esm/scripts/init-editing.d.mts +7 -0
- package/types/esm/server-index.d.mts +39 -0
- package/types/esm/types/api-version.d.mts +2 -0
- package/types/esm/types/builder-block.d.mts +84 -0
- package/types/esm/types/builder-content.d.mts +44 -0
- package/types/esm/types/builder-props.d.mts +12 -0
- package/types/esm/types/can-track.d.mts +3 -0
- package/types/esm/types/components.d.mts +110 -0
- package/types/esm/types/deep-partial.d.mts +3 -0
- package/types/esm/types/element.d.mts +59 -0
- package/types/esm/types/enforced-partials.d.mts +26 -0
- package/types/esm/types/input.d.mts +122 -0
- package/types/esm/types/targets.d.mts +1 -0
- package/types/esm/types/typescript.d.mts +8 -0
- package/types/functions/evaluate/evaluate.d.ts +2 -1
- package/types/functions/evaluate/helpers.d.ts +0 -1
- package/types/functions/evaluate/node-runtime/init.d.ts +2 -0
- package/types/helpers/sdk-headers.d.ts +5 -0
- package/lib/edge/blocks-5084bbec.cjs +0 -12
- package/lib/edge/form-1811c08f.js +0 -183
- package/lib/edge/form-c42561fb.cjs +0 -1
- package/lib/edge/text-baaedac7.cjs +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
+
import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from '../../types/builder-props.js';
|
|
3
|
+
export interface TabsProps extends BuilderComponentsProp, BuilderLinkComponentProp, BuilderDataProps {
|
|
4
|
+
tabs: {
|
|
5
|
+
label: BuilderBlock[];
|
|
6
|
+
content: BuilderBlock[];
|
|
7
|
+
}[];
|
|
8
|
+
builderBlock: BuilderBlock;
|
|
9
|
+
defaultActiveTab?: number;
|
|
10
|
+
collapsible?: boolean;
|
|
11
|
+
tabHeaderLayout?: 'center' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
12
|
+
activeTabStyle?: any;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './text.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './textarea.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
+
*/
|
|
5
|
+
export interface TextareaProps {
|
|
6
|
+
attributes?: any;
|
|
7
|
+
name?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
}
|
|
12
|
+
declare function Textarea(props: TextareaProps): React.JSX.Element;
|
|
13
|
+
export default Textarea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './video.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
+
export interface VideoProps {
|
|
3
|
+
attributes?: any;
|
|
4
|
+
video?: string;
|
|
5
|
+
autoPlay?: boolean;
|
|
6
|
+
controls?: boolean;
|
|
7
|
+
muted?: boolean;
|
|
8
|
+
loop?: boolean;
|
|
9
|
+
playsInline?: boolean;
|
|
10
|
+
aspectRatio?: number;
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
fit?: 'contain' | 'cover' | 'fill';
|
|
14
|
+
preload?: 'auto' | 'metadata' | 'none';
|
|
15
|
+
position?: 'center' | 'top' | 'left' | 'right' | 'bottom' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
|
16
|
+
posterImage?: string;
|
|
17
|
+
lazyLoad?: boolean;
|
|
18
|
+
children?: any;
|
|
19
|
+
fitContent?: boolean;
|
|
20
|
+
builderBlock?: BuilderBlock;
|
|
21
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BuilderAnimation } from '../../types/builder-block.js';
|
|
2
|
+
export declare const camelCaseToKebabCase: (str?: string) => string;
|
|
3
|
+
export declare function bindAnimations(animations: BuilderAnimation[]): void;
|
|
4
|
+
export declare function triggerAnimation(animation: BuilderAnimation): void;
|
|
5
|
+
export declare function bindScrollInViewAnimation(animation: BuilderAnimation): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type BlockProps = {
|
|
3
|
+
block: BuilderBlock;
|
|
4
|
+
context: BuilderContextInterface;
|
|
5
|
+
registeredComponents: RegisteredComponents;
|
|
6
|
+
linkComponent: any;
|
|
7
|
+
};
|
|
8
|
+
import type { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
|
|
9
|
+
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
10
|
+
declare function Block(props: BlockProps): React.JSX.Element;
|
|
11
|
+
export default Block;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponent, RegisteredComponents } from '../../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
3
|
+
import type { RepeatData } from './types.js';
|
|
4
|
+
export declare const getComponent: ({ block, context, registeredComponents }: {
|
|
5
|
+
block: BuilderBlock;
|
|
6
|
+
context: BuilderContextInterface;
|
|
7
|
+
registeredComponents: RegisteredComponents;
|
|
8
|
+
}) => RegisteredComponent;
|
|
9
|
+
export declare const getRepeatItemData: ({ block, context }: {
|
|
10
|
+
block: BuilderBlock;
|
|
11
|
+
context: BuilderContextInterface;
|
|
12
|
+
}) => RepeatData[] | undefined;
|
|
13
|
+
export declare const getInheritedStyles: ({ block, context }: {
|
|
14
|
+
block: BuilderBlock;
|
|
15
|
+
context: BuilderContextInterface;
|
|
16
|
+
}) => Partial<CSSStyleDeclaration>;
|
|
17
|
+
export declare const shouldPassLinkComponent: (block: RegisteredComponent | null | undefined) => boolean;
|
|
18
|
+
export declare const shouldPassRegisteredComponents: (block: RegisteredComponent | null | undefined) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type BlockStylesProps = {
|
|
3
|
+
block: BuilderBlock;
|
|
4
|
+
context: BuilderContextInterface;
|
|
5
|
+
};
|
|
6
|
+
import type { BuilderContextInterface } from "../../../context/types.js";
|
|
7
|
+
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
8
|
+
declare function BlockStyles(props: BlockStylesProps): React.JSX.Element;
|
|
9
|
+
export default BlockStyles;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type BlockWrapperProps = {
|
|
3
|
+
Wrapper: string;
|
|
4
|
+
block: BuilderBlock;
|
|
5
|
+
context: BuilderContextInterface;
|
|
6
|
+
linkComponent: any;
|
|
7
|
+
children?: any;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* This component renders a block's wrapper HTML element (from the block's `tagName` property).
|
|
11
|
+
*/
|
|
12
|
+
import type { BuilderContextInterface } from "../../../context/types.js";
|
|
13
|
+
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
14
|
+
declare function BlockWrapper(props: BlockWrapperProps): React.JSX.Element;
|
|
15
|
+
export default BlockWrapper;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../../../../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../../../../types/builder-block.js';
|
|
3
|
+
import type { BuilderDataProps } from '../../../../types/builder-props.js';
|
|
4
|
+
import type { InteractiveElementProps } from '../interactive-element.js';
|
|
5
|
+
type ComponentOptions = BuilderDataProps & {
|
|
6
|
+
[index: string]: any;
|
|
7
|
+
attributes?: {
|
|
8
|
+
[index: string]: any;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export interface ComponentProps {
|
|
12
|
+
componentRef: any;
|
|
13
|
+
componentOptions: ComponentOptions;
|
|
14
|
+
blockChildren: BuilderBlock[];
|
|
15
|
+
context: BuilderContextInterface;
|
|
16
|
+
registeredComponents: RegisteredComponents;
|
|
17
|
+
linkComponent: any;
|
|
18
|
+
builderBlock: BuilderBlock;
|
|
19
|
+
includeBlockProps: boolean;
|
|
20
|
+
isInteractive: boolean | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare const getWrapperProps: ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }: Omit<ComponentProps, "registeredComponents" | "blockChildren"> & {
|
|
23
|
+
contextValue: BuilderContextInterface;
|
|
24
|
+
}) => InteractiveElementProps | {
|
|
25
|
+
attributes?: {
|
|
26
|
+
[index: string]: any;
|
|
27
|
+
};
|
|
28
|
+
builderBlock: BuilderBlock;
|
|
29
|
+
builderContext: BuilderContextInterface;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type InteractiveElementProps = {
|
|
3
|
+
Wrapper: any;
|
|
4
|
+
block: BuilderBlock;
|
|
5
|
+
context: BuilderContextInterface;
|
|
6
|
+
wrapperProps: Dictionary<any>;
|
|
7
|
+
includeBlockProps: boolean;
|
|
8
|
+
children?: any;
|
|
9
|
+
};
|
|
10
|
+
import type { BuilderContextInterface } from "../../../context/types.js";
|
|
11
|
+
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
12
|
+
import type { Dictionary } from "../../../types/typescript.js";
|
|
13
|
+
declare function InteractiveElement(props: InteractiveElementProps): React.JSX.Element;
|
|
14
|
+
export default InteractiveElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Props = Omit<BlockProps, "context"> & {
|
|
3
|
+
repeatContext: BuilderContextInterface;
|
|
4
|
+
};
|
|
5
|
+
import type { BuilderContextInterface } from "../../../context/types.js";
|
|
6
|
+
import type { BlockProps } from "../block.js";
|
|
7
|
+
declare function RepeatedBlock(props: Props): React.JSX.Element;
|
|
8
|
+
export default RepeatedBlock;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type BlocksWrapperProps = {
|
|
3
|
+
blocks: BuilderBlock[] | undefined;
|
|
4
|
+
parent: string | undefined;
|
|
5
|
+
path: string | undefined;
|
|
6
|
+
styleProp: Record<string, any> | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* The element that wraps each list of blocks. Defaults to a `div` element ('ScrollView' in React Native).
|
|
9
|
+
*/
|
|
10
|
+
BlocksWrapper: any;
|
|
11
|
+
/**
|
|
12
|
+
* Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
|
|
13
|
+
*/
|
|
14
|
+
BlocksWrapperProps: any;
|
|
15
|
+
children?: any;
|
|
16
|
+
};
|
|
17
|
+
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
18
|
+
declare function BlocksWrapper(props: BlocksWrapperProps): React.JSX.Element;
|
|
19
|
+
export default BlocksWrapper;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../../context/types.js';
|
|
2
|
+
import type { BlocksWrapperProps } from './blocks-wrapper.js';
|
|
3
|
+
export type BlocksProps = Partial<Omit<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>> & {
|
|
4
|
+
context?: BuilderContextInterface;
|
|
5
|
+
registeredComponents?: RegisteredComponents;
|
|
6
|
+
linkComponent?: any;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './blocks.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps" | "isNestedRender"> & {
|
|
3
|
+
builderContextSignal: BuilderContextInterface;
|
|
4
|
+
setBuilderContextSignal?: (signal: any) => any;
|
|
5
|
+
children?: any;
|
|
6
|
+
};
|
|
7
|
+
import type { BuilderContextInterface } from "../../../context/types.js";
|
|
8
|
+
import type { ContentProps } from "../content.types.js";
|
|
9
|
+
declare function EnableEditor(props: BuilderEditorProps): React.JSX.Element;
|
|
10
|
+
export default EnableEditor;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
cssCode?: string;
|
|
4
|
+
customFonts?: CustomFont[];
|
|
5
|
+
contentId?: string;
|
|
6
|
+
isNestedRender?: boolean;
|
|
7
|
+
}
|
|
8
|
+
import type { CustomFont } from "./styles.helpers.js";
|
|
9
|
+
declare function ContentStyles(props: Props): React.JSX.Element;
|
|
10
|
+
export default ContentStyles;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface CustomFont {
|
|
2
|
+
family?: string;
|
|
3
|
+
kind?: string;
|
|
4
|
+
fileUrl?: string;
|
|
5
|
+
files?: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare const getFontCss: ({ customFonts }: {
|
|
10
|
+
customFonts?: CustomFont[];
|
|
11
|
+
}) => string;
|
|
12
|
+
export declare const getCss: ({ cssCode, contentId }: {
|
|
13
|
+
cssCode?: string;
|
|
14
|
+
contentId?: string;
|
|
15
|
+
}) => string;
|
|
16
|
+
export declare const getDefaultStyles: (isNested: boolean | undefined) => "" | "\n.builder-button {\n all: unset;\n}\n\n.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {\n margin: 0;\n}\n.builder-text > p, .builder-text > .builder-paragraph {\n color: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n font-weight: inherit;\n font-size: inherit;\n text-align: inherit;\n font-family: inherit;\n}\n";
|
|
17
|
+
export declare const getWrapperClassName: (variationId?: string) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
2
|
+
import type { Nullable } from '../../types/typescript.js';
|
|
3
|
+
import type { ContentProps } from './content.types.js';
|
|
4
|
+
export declare const getRootStateInitialValue: ({ content, data, locale }: Pick<ContentProps, 'content' | 'data' | 'locale'>) => {
|
|
5
|
+
locale?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const getContentInitialValue: ({ content, data }: Pick<ContentProps, 'content' | 'data'>) => Nullable<BuilderContent>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BuilderRenderState } from '../../context/types.js';
|
|
2
|
+
export type { ContentProps } from './contentProps.types.js';
|
|
3
|
+
export interface BuilderComponentStateChange {
|
|
4
|
+
state: BuilderRenderState;
|
|
5
|
+
ref: {
|
|
6
|
+
name?: string;
|
|
7
|
+
props?: {
|
|
8
|
+
builderBlock?: {
|
|
9
|
+
id?: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EnforcePartials } from '../../types/enforced-partials.js';
|
|
2
|
+
import type { ContentVariantsPrps } from '../content-variants/content-variants.types.js';
|
|
3
|
+
interface InternalRenderProps {
|
|
4
|
+
showContent: boolean;
|
|
5
|
+
isSsrAbTest: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* This is in a separate file so that we can override it (most notably in Vue,
|
|
9
|
+
* where prop types cannot be wrapped by generics like `EnforcePartials`).
|
|
10
|
+
*/
|
|
11
|
+
export type ContentProps = InternalRenderProps & EnforcePartials<ContentVariantsPrps> & {
|
|
12
|
+
/**
|
|
13
|
+
* For internal use only. Do not provide this prop.
|
|
14
|
+
*/
|
|
15
|
+
isNestedRender?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './content.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type VariantsProviderProps = ContentVariantsPrps & {
|
|
3
|
+
/**
|
|
4
|
+
* For internal use only. Do not provide this prop.
|
|
5
|
+
*/
|
|
6
|
+
isNestedRender?: boolean;
|
|
7
|
+
};
|
|
8
|
+
import type { ContentVariantsPrps } from "./content-variants.types.js";
|
|
9
|
+
declare function ContentVariants(props: VariantsProviderProps): React.JSX.Element;
|
|
10
|
+
export default ContentVariants;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { BuilderRenderContext, RegisteredComponent } from '../../context/types.js';
|
|
2
|
+
import type { ApiVersion } from '../../types/api-version.js';
|
|
3
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
4
|
+
import type { Nullable } from '../../types/typescript.js';
|
|
5
|
+
export interface ContentVariantsPrps {
|
|
6
|
+
/**
|
|
7
|
+
* The Builder content JSON to render (required).
|
|
8
|
+
*/
|
|
9
|
+
content?: Nullable<BuilderContent>;
|
|
10
|
+
/**
|
|
11
|
+
* The Builder content `model` to render (required).
|
|
12
|
+
*/
|
|
13
|
+
model?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Additional data to inject into your Builder content (optional).
|
|
16
|
+
*/
|
|
17
|
+
data?: {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
context?: BuilderRenderContext;
|
|
24
|
+
/**
|
|
25
|
+
* Your API Key: needed to dynamically fetch symbols (required).
|
|
26
|
+
*/
|
|
27
|
+
apiKey: string;
|
|
28
|
+
apiVersion?: ApiVersion;
|
|
29
|
+
/**
|
|
30
|
+
* An array of custom components to register (optional).
|
|
31
|
+
*/
|
|
32
|
+
customComponents?: RegisteredComponent[];
|
|
33
|
+
/**
|
|
34
|
+
* The component to use for rendering links. Defaults to anchor element `<a>`.
|
|
35
|
+
*/
|
|
36
|
+
linkComponent?: any;
|
|
37
|
+
/**
|
|
38
|
+
* A boolean to enable or disable tracking (optional). Defaults to `true`.
|
|
39
|
+
*/
|
|
40
|
+
canTrack?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* If provided, the API will auto-resolve localized objects to the value of this `locale` key (optional).
|
|
43
|
+
*/
|
|
44
|
+
locale?: string;
|
|
45
|
+
/**
|
|
46
|
+
* A boolean to enable or disable enriching API content (optional).
|
|
47
|
+
*
|
|
48
|
+
* Enriching will Include multilevel references in the response. Defaults to `false`.
|
|
49
|
+
*/
|
|
50
|
+
enrich?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The element that wraps your content. Defaults to `<div>` ('ScrollView' in React Native).
|
|
53
|
+
*/
|
|
54
|
+
contentWrapper?: any;
|
|
55
|
+
/**
|
|
56
|
+
* Additonal props to pass to `contentWrapper`. Defaults to `{}`.
|
|
57
|
+
*/
|
|
58
|
+
contentWrapperProps?: any;
|
|
59
|
+
/**
|
|
60
|
+
* The element that wraps your blocks. Defaults to `<div>` ('ScrollView' in React Native).
|
|
61
|
+
*/
|
|
62
|
+
blocksWrapper?: any;
|
|
63
|
+
/**
|
|
64
|
+
* Additonal props to pass to `blocksWrapper`. Defaults to `{}`.
|
|
65
|
+
*/
|
|
66
|
+
blocksWrapperProps?: any;
|
|
67
|
+
/**
|
|
68
|
+
* List of hosts to allow editing content from.
|
|
69
|
+
*/
|
|
70
|
+
trustedHosts?: string[];
|
|
71
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Nullable } from '../../helpers/nullable.js';
|
|
2
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
3
|
+
export declare const getVariants: (content: Nullable<BuilderContent>) => {
|
|
4
|
+
testVariationId: string;
|
|
5
|
+
id: string;
|
|
6
|
+
data?: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
title?: string;
|
|
9
|
+
blocks?: import("../../server-index.js").BuilderBlock[];
|
|
10
|
+
inputs?: import("../../types/input.js").Input[];
|
|
11
|
+
state?: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
jsCode?: string;
|
|
15
|
+
tsCode?: string;
|
|
16
|
+
httpRequests?: {
|
|
17
|
+
[key: string]: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
name?: string;
|
|
21
|
+
testRatio?: number;
|
|
22
|
+
meta?: {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
breakpoints?: import("../../types/builder-content.js").Breakpoints;
|
|
25
|
+
};
|
|
26
|
+
}[];
|
|
27
|
+
export declare const checkShouldRenderVariants: ({ canTrack, content }: {
|
|
28
|
+
canTrack: Nullable<boolean>;
|
|
29
|
+
content: Nullable<BuilderContent>;
|
|
30
|
+
}) => boolean;
|
|
31
|
+
type VariantData = {
|
|
32
|
+
id: string;
|
|
33
|
+
testRatio?: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const getInitVariantsFnsScriptString: () => string;
|
|
36
|
+
export declare const getUpdateCookieAndStylesScript: (variants: VariantData[], contentId: string) => string;
|
|
37
|
+
export declare const getUpdateVariantVisibilityScript: ({ contentId, variationId }: {
|
|
38
|
+
variationId: string;
|
|
39
|
+
contentId: string;
|
|
40
|
+
}) => string;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './content-variants.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WARNING: This file contains functions that get stringified and inlined into the HTML at build-time.
|
|
3
|
+
* They cannot import anything.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* For more information on how this works,
|
|
7
|
+
* see our [SSR A/B Test Docs](https://github.com/BuilderIO/builder/tree/main/packages/sdks/src/SSR_AB_TEST.md)
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* For more information on how this works,
|
|
11
|
+
* see our [SSR A/B Test Docs](https://github.com/BuilderIO/builder/tree/main/packages/sdks/src/SSR_AB_TEST.md)
|
|
12
|
+
*/
|
|
13
|
+
export declare const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n const styleEl = document.currentScript?.previousElementSibling;\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
|
|
14
|
+
export declare const UPDATE_VARIANT_VISIBILITY_SCRIPT = "function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {\n if (!navigator.cookieEnabled) {\n return;\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${defaultContentId}`;\n const winningVariant = getCookie(cookieName);\n const parentDiv = document.currentScript?.parentElement;\n const isDefaultContent = variantContentId === defaultContentId;\n const isWinningVariant = winningVariant === variantContentId;\n if (isWinningVariant && !isDefaultContent) {\n parentDiv?.removeAttribute('hidden');\n parentDiv?.removeAttribute('aria-hidden');\n } else if (!isWinningVariant && isDefaultContent) {\n parentDiv?.setAttribute('hidden', 'true');\n parentDiv?.setAttribute('aria-hidden', 'true');\n }\n if (isHydrationTarget) {\n if (!isWinningVariant) {\n parentDiv?.remove();\n }\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n }\n return;\n}";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface DynamicDivProps {
|
|
3
|
+
children?: any;
|
|
4
|
+
attributes: any;
|
|
5
|
+
actionAttributes: any;
|
|
6
|
+
BlockWrapperProps: any;
|
|
7
|
+
builderPath: any;
|
|
8
|
+
builderParentId: any;
|
|
9
|
+
BlocksWrapperProps: any;
|
|
10
|
+
contentWrapperProps: any;
|
|
11
|
+
builderModel: any;
|
|
12
|
+
ref: any;
|
|
13
|
+
}
|
|
14
|
+
declare function DynamicDiv(props: DynamicDivProps): React.JSX.Element;
|
|
15
|
+
export default DynamicDiv;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface DynamicRendererProps {
|
|
3
|
+
children?: any;
|
|
4
|
+
TagName: any;
|
|
5
|
+
attributes: any;
|
|
6
|
+
actionAttributes: any;
|
|
7
|
+
}
|
|
8
|
+
declare function DynamicRenderer(props: DynamicRendererProps): React.JSX.Element;
|
|
9
|
+
export default DynamicRenderer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isEmptyElement: (tagName: any) => boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default class ErrorBoundary extends React.Component<React.PropsWithChildren, {
|
|
3
|
+
hasError: boolean;
|
|
4
|
+
}> {
|
|
5
|
+
constructor(props: any);
|
|
6
|
+
static getDerivedStateFromError(_error: any): {
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
};
|
|
9
|
+
componentDidCatch(error: any, info: any): void;
|
|
10
|
+
render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RegisteredComponent } from '../context/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a list of all registered components.
|
|
4
|
+
* NOTE: This needs to be a function to work around ESM circular dependencies.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getDefaultRegisteredComponents: () => RegisteredComponent[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type SizeName = 'large' | 'medium' | 'small';
|
|
2
|
+
interface Size {
|
|
3
|
+
min: number;
|
|
4
|
+
default: number;
|
|
5
|
+
max: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const getMaxWidthQueryForSize: (size: SizeName, sizeValues?: Record<SizeName, Size>) => string;
|
|
8
|
+
interface Breakpoints {
|
|
9
|
+
small?: number;
|
|
10
|
+
medium?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const getSizesForBreakpoints: ({ small, medium }: Breakpoints) => Record<SizeName, Size>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These are in a separate file because React Native does not support them (yet).
|
|
3
|
+
* Having them in a separate file allows us to override it to be empty in the
|
|
4
|
+
* React Native SDK.
|
|
5
|
+
*/
|
|
6
|
+
import type { RegisteredComponent } from '../context/types.js';
|
|
7
|
+
export declare const getExtraComponents: () => RegisteredComponent[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_VERSION = "1.0.27";
|