@builder.io/sdk-react 2.0.24-4 → 2.0.25
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 +2 -2
- package/lib/browser/blocks-exports.mjs +4 -4
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/server-entry-350f7ecc.js +701 -0
- package/lib/browser/server-entry-f8b08c1e.cjs +2 -0
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-985d80e5.cjs → accordion-d14d05aa.cjs} +1 -1
- package/lib/edge/{accordion-f69d6e22.js → accordion-e2aeca0a.js} +1 -1
- package/lib/edge/{blocks-a9dfda85.cjs → blocks-5a60a8fa.cjs} +5 -5
- package/lib/edge/{blocks-08df0336.js → blocks-9a763eda.js} +25 -25
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-286bd20e.js → button-265653d5.js} +2 -2
- package/lib/edge/{button-ae1b9d7b.cjs → button-6ab0c490.cjs} +1 -1
- package/lib/edge/{columns-f1c4af32.js → columns-346d4ab7.js} +4 -4
- package/lib/edge/{columns-5319c0d2.cjs → columns-449335a4.cjs} +1 -1
- package/lib/edge/{content-variants-0eb27f48.cjs → content-variants-71459280.cjs} +1 -1
- package/lib/edge/{content-variants-582c8283.js → content-variants-bdb3d738.js} +11 -11
- package/lib/edge/{evaluate-322711e6.js → evaluate-be86a5d8.js} +1 -1
- package/lib/edge/{evaluate-8ba3acb6.cjs → evaluate-db1f9237.cjs} +1 -1
- package/lib/edge/{form-3aa4916c.js → form-41305e00.js} +4 -4
- package/lib/edge/{form-67f85cf1.cjs → form-90310cab.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-a62b4faa.cjs → get-class-prop-name-711d58eb.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-e91f3997.js → get-class-prop-name-b49b7684.js} +1 -1
- package/lib/edge/{img-dff54673.cjs → img-1ab7ba48.cjs} +1 -1
- package/lib/edge/{img-faea3d08.js → img-a75bf17b.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-d2659b98.cjs → input-137d07aa.cjs} +1 -1
- package/lib/edge/{input-6e519eca.js → input-6c50146c.js} +1 -1
- package/lib/edge/{select-4bd3e6f1.cjs → select-55d2c8fa.cjs} +1 -1
- package/lib/edge/{select-2d29658c.js → select-b6c2fdd5.js} +1 -1
- package/lib/edge/server-entry-ae44ef40.cjs +2 -0
- package/lib/edge/server-entry-e914f16e.js +699 -0
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-04b4ef3f.js → slot-84e40920.js} +4 -4
- package/lib/edge/{slot-bd7569c2.cjs → slot-8d3b7707.cjs} +1 -1
- package/lib/edge/{symbol-36f8ff9a.cjs → symbol-468348d8.cjs} +1 -1
- package/lib/edge/{symbol-55cb3d28.js → symbol-7436ff06.js} +2 -2
- package/lib/edge/{tabs-d16dc29a.js → tabs-65d455da.js} +4 -4
- package/lib/edge/{tabs-edb19af7.cjs → tabs-802a32f0.cjs} +1 -1
- package/lib/edge/{text-e93b2e5f.js → text-423e3303.js} +2 -2
- package/lib/edge/{text-d43cb037.cjs → text-450bf7e4.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +21 -21
- package/lib/node/blocks-exports.mjs +9 -10
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +25 -26
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +5 -6
- package/lib/node/server-entry-569f32b2.js +702 -0
- package/lib/node/server-entry-781dde88.cjs +2 -0
- 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-13070d3a.cjs +48 -0
- package/lib/node/{setIvm-ef48cefa.js → should-force-browser-runtime-in-node-3f610831.js} +57 -45
- package/package.json +3 -9
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/browser/server-entry-416ffa04.cjs +0 -2
- package/lib/browser/server-entry-9d006173.js +0 -690
- package/lib/edge/server-entry-bfd03b60.cjs +0 -2
- package/lib/edge/server-entry-cb45c291.js +0 -688
- package/lib/node/server-entry-2b6abd6c.js +0 -691
- package/lib/node/server-entry-2dc8afb6.cjs +0 -2
- package/lib/node/setIvm-3ef2ce91.cjs +0 -48
- package/lib/node/setIvm.cjs +0 -1
- package/lib/node/setIvm.mjs +0 -5
- package/lib/node/should-force-browser-runtime-in-node-5098dffa.cjs +0 -1
- package/lib/node/should-force-browser-runtime-in-node-eb0799a1.js +0 -17
- package/types/blocks/textarea/component-info.d.ts +0 -2
- package/types/blocks/textarea/index.d.ts +0 -1
- package/types/blocks/textarea/textarea.d.ts +0 -13
- package/types/cjs/blocks/BaseText.d.cts +0 -6
- package/types/cjs/blocks/button/button.d.cts +0 -4
- package/types/cjs/blocks/button/button.types.d.cts +0 -7
- package/types/cjs/blocks/button/component-info.d.cts +0 -2
- package/types/cjs/blocks/button/index.d.cts +0 -1
- package/types/cjs/blocks/columns/columns.d.cts +0 -4
- package/types/cjs/blocks/columns/columns.types.d.cts +0 -15
- package/types/cjs/blocks/columns/component-info.d.cts +0 -2
- package/types/cjs/blocks/columns/helpers.d.cts +0 -1
- package/types/cjs/blocks/columns/index.d.cts +0 -1
- package/types/cjs/blocks/custom-code/component-info.d.cts +0 -2
- package/types/cjs/blocks/custom-code/custom-code.d.cts +0 -7
- package/types/cjs/blocks/custom-code/index.d.cts +0 -1
- package/types/cjs/blocks/embed/component-info.d.cts +0 -2
- package/types/cjs/blocks/embed/embed.d.cts +0 -6
- package/types/cjs/blocks/embed/helpers.d.cts +0 -1
- package/types/cjs/blocks/embed/index.d.cts +0 -1
- package/types/cjs/blocks/form/form/component-info.d.cts +0 -2
- package/types/cjs/blocks/form/form/form.d.cts +0 -33
- package/types/cjs/blocks/form/form/index.d.cts +0 -1
- package/types/cjs/blocks/form/input/component-info.d.cts +0 -2
- package/types/cjs/blocks/form/input/index.d.cts +0 -1
- package/types/cjs/blocks/form/input/input.d.cts +0 -15
- package/types/cjs/blocks/form/select/component-info.d.cts +0 -2
- package/types/cjs/blocks/form/select/index.d.cts +0 -1
- package/types/cjs/blocks/form/select/select.d.cts +0 -16
- package/types/cjs/blocks/form/submit-button/component-info.d.cts +0 -2
- package/types/cjs/blocks/form/submit-button/index.d.cts +0 -1
- package/types/cjs/blocks/form/submit-button/submit-button.d.cts +0 -10
- package/types/cjs/blocks/fragment/component-info.d.cts +0 -2
- package/types/cjs/blocks/fragment/fragment.d.cts +0 -4
- package/types/cjs/blocks/fragment/fragment.types.d.cts +0 -5
- package/types/cjs/blocks/fragment/index.d.cts +0 -1
- package/types/cjs/blocks/helpers.d.cts +0 -13
- package/types/cjs/blocks/image/component-info.d.cts +0 -2
- package/types/cjs/blocks/image/image.d.cts +0 -4
- package/types/cjs/blocks/image/image.helpers.d.cts +0 -1
- package/types/cjs/blocks/image/image.types.d.cts +0 -19
- package/types/cjs/blocks/image/index.d.cts +0 -1
- package/types/cjs/blocks/img/component-info.d.cts +0 -2
- package/types/cjs/blocks/img/img.d.cts +0 -14
- package/types/cjs/blocks/img/index.d.cts +0 -1
- package/types/cjs/blocks/raw-text/component-info.d.cts +0 -2
- package/types/cjs/blocks/raw-text/index.d.cts +0 -1
- package/types/cjs/blocks/raw-text/raw-text.d.cts +0 -7
- package/types/cjs/blocks/section/component-info.d.cts +0 -2
- package/types/cjs/blocks/section/index.d.cts +0 -1
- package/types/cjs/blocks/section/section.d.cts +0 -4
- package/types/cjs/blocks/section/section.types.d.cts +0 -6
- package/types/cjs/blocks/slot/component-info.d.cts +0 -2
- package/types/cjs/blocks/slot/index.d.cts +0 -1
- package/types/cjs/blocks/slot/slot.d.cts +0 -8
- package/types/cjs/blocks/symbol/component-info.d.cts +0 -2
- package/types/cjs/blocks/symbol/index.d.cts +0 -1
- package/types/cjs/blocks/symbol/symbol.d.cts +0 -4
- package/types/cjs/blocks/symbol/symbol.helpers.d.cts +0 -14
- package/types/cjs/blocks/symbol/symbol.types.d.cts +0 -18
- package/types/cjs/blocks/tabs/component-info.d.cts +0 -2
- package/types/cjs/blocks/tabs/index.d.cts +0 -1
- package/types/cjs/blocks/tabs/tabs.d.cts +0 -4
- package/types/cjs/blocks/tabs/tabs.types.d.cts +0 -13
- package/types/cjs/blocks/text/component-info.d.cts +0 -2
- package/types/cjs/blocks/text/index.d.cts +0 -1
- package/types/cjs/blocks/text/text.d.cts +0 -4
- package/types/cjs/blocks/text/text.types.d.cts +0 -4
- package/types/cjs/blocks/textarea/component-info.d.cts +0 -2
- package/types/cjs/blocks/textarea/index.d.cts +0 -1
- package/types/cjs/blocks/textarea/textarea.d.cts +0 -13
- package/types/cjs/blocks/video/component-info.d.cts +0 -2
- package/types/cjs/blocks/video/index.d.cts +0 -1
- package/types/cjs/blocks/video/video.d.cts +0 -4
- package/types/cjs/blocks/video/video.types.d.cts +0 -21
- package/types/cjs/components/block/animator.d.cts +0 -5
- package/types/cjs/components/block/block.d.cts +0 -11
- package/types/cjs/components/block/block.helpers.d.cts +0 -18
- package/types/cjs/components/block/components/block-styles.d.cts +0 -9
- package/types/cjs/components/block/components/block-wrapper.d.cts +0 -15
- package/types/cjs/components/block/components/component-ref/component-ref.d.cts +0 -4
- package/types/cjs/components/block/components/component-ref/component-ref.helpers.d.cts +0 -31
- package/types/cjs/components/block/components/interactive-element.d.cts +0 -14
- package/types/cjs/components/block/components/repeated-block.d.cts +0 -8
- package/types/cjs/components/block/types.d.cts +0 -6
- package/types/cjs/components/blocks/blocks-wrapper.d.cts +0 -19
- package/types/cjs/components/blocks/blocks.d.cts +0 -4
- package/types/cjs/components/blocks/blocks.types.d.cts +0 -7
- package/types/cjs/components/blocks/index.d.cts +0 -1
- package/types/cjs/components/content/components/enable-editor.d.cts +0 -10
- package/types/cjs/components/content/components/styles.d.cts +0 -10
- package/types/cjs/components/content/components/styles.helpers.d.cts +0 -17
- package/types/cjs/components/content/content.d.cts +0 -4
- package/types/cjs/components/content/content.helpers.d.cts +0 -7
- package/types/cjs/components/content/content.types.d.cts +0 -13
- package/types/cjs/components/content/contentProps.types.d.cts +0 -17
- package/types/cjs/components/content/index.d.cts +0 -1
- package/types/cjs/components/content/wrap-component-ref.d.cts +0 -6
- package/types/cjs/components/content-variants/content-variants.d.cts +0 -10
- package/types/cjs/components/content-variants/content-variants.types.d.cts +0 -71
- package/types/cjs/components/content-variants/helpers.d.cts +0 -41
- package/types/cjs/components/content-variants/index.d.cts +0 -1
- package/types/cjs/components/content-variants/inlined-fns.d.cts +0 -14
- package/types/cjs/components/dynamic-div.d.cts +0 -15
- package/types/cjs/components/dynamic-renderer/dynamic-renderer.d.cts +0 -9
- package/types/cjs/components/dynamic-renderer/dynamic-renderer.helpers.d.cts +0 -1
- package/types/cjs/components/error-boundary.d.cts +0 -11
- package/types/cjs/components/inlined-script.d.cts +0 -7
- package/types/cjs/components/inlined-styles.d.cts +0 -7
- package/types/cjs/constants/builder-registered-components.d.cts +0 -6
- package/types/cjs/constants/device-sizes.d.cts +0 -13
- package/types/cjs/constants/extra-components.d.cts +0 -7
- package/types/cjs/constants/sdk-version.d.cts +0 -1
- package/types/cjs/constants/target.d.cts +0 -2
- package/types/cjs/context/builder.context.d.cts +0 -3
- package/types/cjs/context/components.context.d.cts +0 -3
- package/types/cjs/context/index.d.cts +0 -1
- package/types/cjs/context/types.d.cts +0 -36
- package/types/cjs/functions/apply-patch-with-mutation.d.cts +0 -10
- package/types/cjs/functions/camel-to-kebab-case.d.cts +0 -1
- package/types/cjs/functions/deopt.d.cts +0 -4
- package/types/cjs/functions/evaluate/browser-runtime/browser.d.cts +0 -8
- package/types/cjs/functions/evaluate/browser-runtime/index.d.cts +0 -1
- package/types/cjs/functions/evaluate/choose-eval.d.cts +0 -6
- package/types/cjs/functions/evaluate/edge-runtime/acorn-interpreter.d.cts +0 -2
- package/types/cjs/functions/evaluate/edge-runtime/edge-runtime.d.cts +0 -2
- package/types/cjs/functions/evaluate/edge-runtime/index.d.cts +0 -1
- package/types/cjs/functions/evaluate/evaluate.d.cts +0 -4
- package/types/cjs/functions/evaluate/helpers.d.cts +0 -25
- package/types/cjs/functions/evaluate/index.d.cts +0 -1
- package/types/cjs/functions/evaluate/node-runtime/index.d.cts +0 -1
- package/types/cjs/functions/evaluate/node-runtime/init.d.cts +0 -13
- package/types/cjs/functions/evaluate/node-runtime/node-runtime.d.cts +0 -11
- package/types/cjs/functions/evaluate/node-runtime/safeDynamicRequire.d.cts +0 -6
- package/types/cjs/functions/evaluate/placeholder-runtime.d.cts +0 -2
- package/types/cjs/functions/evaluate/should-force-browser-runtime-in-node.d.cts +0 -1
- package/types/cjs/functions/event-handler-name.d.cts +0 -1
- package/types/cjs/functions/extract-text-styles.d.cts +0 -4
- package/types/cjs/functions/fast-clone.d.cts +0 -4
- package/types/cjs/functions/fetch-builder-props.d.cts +0 -53
- package/types/cjs/functions/get-block-actions-handler.d.cts +0 -8
- package/types/cjs/functions/get-block-actions.d.cts +0 -10
- package/types/cjs/functions/get-block-component-options.d.cts +0 -2
- package/types/cjs/functions/get-block-properties.d.cts +0 -10
- package/types/cjs/functions/get-builder-search-params/index.d.cts +0 -9
- package/types/cjs/functions/get-class-prop-name.d.cts +0 -1
- package/types/cjs/functions/get-content/generate-content-url.d.cts +0 -2
- package/types/cjs/functions/get-content/index.d.cts +0 -18
- package/types/cjs/functions/get-content/types.d.cts +0 -139
- package/types/cjs/functions/get-env.d.cts +0 -2
- package/types/cjs/functions/get-fetch.d.cts +0 -1
- package/types/cjs/functions/get-global-this.d.cts +0 -4
- package/types/cjs/functions/get-processed-block.d.cts +0 -10
- package/types/cjs/functions/get-style.d.cts +0 -12
- package/types/cjs/functions/get.d.cts +0 -1
- package/types/cjs/functions/is-browser.d.cts +0 -1
- package/types/cjs/functions/is-edge-runtime.d.cts +0 -4
- package/types/cjs/functions/is-editing.d.cts +0 -2
- package/types/cjs/functions/is-from-trusted-host.d.cts +0 -3
- package/types/cjs/functions/is-iframe.d.cts +0 -1
- package/types/cjs/functions/is-node-runtime.d.cts +0 -4
- package/types/cjs/functions/is-previewing.d.cts +0 -2
- package/types/cjs/functions/on-change.d.cts +0 -7
- package/types/cjs/functions/register-component.d.cts +0 -6
- package/types/cjs/functions/register.d.cts +0 -16
- package/types/cjs/functions/set-editor-settings.d.cts +0 -4
- package/types/cjs/functions/set.d.cts +0 -7
- package/types/cjs/functions/track/helpers.d.cts +0 -5
- package/types/cjs/functions/track/index.d.cts +0 -51
- package/types/cjs/functions/track/interaction.d.cts +0 -13
- package/types/cjs/functions/transform-block-properties.d.cts +0 -7
- package/types/cjs/functions/transform-block.d.cts +0 -2
- package/types/cjs/functions/transform-style-property.d.cts +0 -7
- package/types/cjs/helpers/ab-tests.d.cts +0 -9
- package/types/cjs/helpers/canTrack.d.cts +0 -1
- package/types/cjs/helpers/cookie.d.cts +0 -19
- package/types/cjs/helpers/css.d.cts +0 -7
- package/types/cjs/helpers/flatten.d.cts +0 -16
- package/types/cjs/helpers/localStorage.d.cts +0 -9
- package/types/cjs/helpers/logger.d.cts +0 -7
- package/types/cjs/helpers/nullable.d.cts +0 -2
- package/types/cjs/helpers/omit.d.cts +0 -1
- package/types/cjs/helpers/preview-lru-cache/get.d.cts +0 -2
- package/types/cjs/helpers/preview-lru-cache/helpers.d.cts +0 -1
- package/types/cjs/helpers/preview-lru-cache/init.d.cts +0 -6
- package/types/cjs/helpers/preview-lru-cache/set.d.cts +0 -7
- package/types/cjs/helpers/preview-lru-cache/types.d.cts +0 -1
- package/types/cjs/helpers/search/search.d.cts +0 -5
- package/types/cjs/helpers/sessionId.d.cts +0 -6
- package/types/cjs/helpers/subscribe-to-editor.d.cts +0 -35
- package/types/cjs/helpers/time.d.cts +0 -1
- package/types/cjs/helpers/url.d.cts +0 -6
- package/types/cjs/helpers/uuid.d.cts +0 -8
- package/types/cjs/helpers/visitorId.d.cts +0 -6
- package/types/cjs/index-helpers/blocks-exports.d.cts +0 -14
- package/types/cjs/index-helpers/top-of-file.d.cts +0 -1
- package/types/cjs/index.d.cts +0 -10
- package/types/cjs/scripts/init-editing.d.cts +0 -7
- package/types/cjs/server-index.d.cts +0 -39
- package/types/cjs/types/api-version.d.cts +0 -2
- package/types/cjs/types/builder-block.d.cts +0 -84
- package/types/cjs/types/builder-content.d.cts +0 -44
- package/types/cjs/types/builder-props.d.cts +0 -12
- package/types/cjs/types/can-track.d.cts +0 -3
- package/types/cjs/types/components.d.cts +0 -110
- package/types/cjs/types/deep-partial.d.cts +0 -3
- package/types/cjs/types/element.d.cts +0 -59
- package/types/cjs/types/enforced-partials.d.cts +0 -26
- package/types/cjs/types/input.d.cts +0 -122
- package/types/cjs/types/targets.d.cts +0 -1
- package/types/cjs/types/typescript.d.cts +0 -8
- package/types/esm/blocks/BaseText.d.mts +0 -6
- package/types/esm/blocks/button/button.d.mts +0 -4
- package/types/esm/blocks/button/button.types.d.mts +0 -7
- package/types/esm/blocks/button/component-info.d.mts +0 -2
- package/types/esm/blocks/button/index.d.mts +0 -1
- package/types/esm/blocks/columns/columns.d.mts +0 -4
- package/types/esm/blocks/columns/columns.types.d.mts +0 -15
- package/types/esm/blocks/columns/component-info.d.mts +0 -2
- package/types/esm/blocks/columns/helpers.d.mts +0 -1
- package/types/esm/blocks/columns/index.d.mts +0 -1
- package/types/esm/blocks/custom-code/component-info.d.mts +0 -2
- package/types/esm/blocks/custom-code/custom-code.d.mts +0 -7
- package/types/esm/blocks/custom-code/index.d.mts +0 -1
- package/types/esm/blocks/embed/component-info.d.mts +0 -2
- package/types/esm/blocks/embed/embed.d.mts +0 -6
- package/types/esm/blocks/embed/helpers.d.mts +0 -1
- package/types/esm/blocks/embed/index.d.mts +0 -1
- package/types/esm/blocks/form/form/component-info.d.mts +0 -2
- package/types/esm/blocks/form/form/form.d.mts +0 -33
- package/types/esm/blocks/form/form/index.d.mts +0 -1
- package/types/esm/blocks/form/input/component-info.d.mts +0 -2
- package/types/esm/blocks/form/input/index.d.mts +0 -1
- package/types/esm/blocks/form/input/input.d.mts +0 -15
- package/types/esm/blocks/form/select/component-info.d.mts +0 -2
- package/types/esm/blocks/form/select/index.d.mts +0 -1
- package/types/esm/blocks/form/select/select.d.mts +0 -16
- package/types/esm/blocks/form/submit-button/component-info.d.mts +0 -2
- package/types/esm/blocks/form/submit-button/index.d.mts +0 -1
- package/types/esm/blocks/form/submit-button/submit-button.d.mts +0 -10
- package/types/esm/blocks/fragment/component-info.d.mts +0 -2
- package/types/esm/blocks/fragment/fragment.d.mts +0 -4
- package/types/esm/blocks/fragment/fragment.types.d.mts +0 -5
- package/types/esm/blocks/fragment/index.d.mts +0 -1
- package/types/esm/blocks/helpers.d.mts +0 -13
- package/types/esm/blocks/image/component-info.d.mts +0 -2
- package/types/esm/blocks/image/image.d.mts +0 -4
- package/types/esm/blocks/image/image.helpers.d.mts +0 -1
- package/types/esm/blocks/image/image.types.d.mts +0 -19
- package/types/esm/blocks/image/index.d.mts +0 -1
- package/types/esm/blocks/img/component-info.d.mts +0 -2
- package/types/esm/blocks/img/img.d.mts +0 -14
- package/types/esm/blocks/img/index.d.mts +0 -1
- package/types/esm/blocks/raw-text/component-info.d.mts +0 -2
- package/types/esm/blocks/raw-text/index.d.mts +0 -1
- package/types/esm/blocks/raw-text/raw-text.d.mts +0 -7
- package/types/esm/blocks/section/component-info.d.mts +0 -2
- package/types/esm/blocks/section/index.d.mts +0 -1
- package/types/esm/blocks/section/section.d.mts +0 -4
- package/types/esm/blocks/section/section.types.d.mts +0 -6
- package/types/esm/blocks/slot/component-info.d.mts +0 -2
- package/types/esm/blocks/slot/index.d.mts +0 -1
- package/types/esm/blocks/slot/slot.d.mts +0 -8
- package/types/esm/blocks/symbol/component-info.d.mts +0 -2
- package/types/esm/blocks/symbol/index.d.mts +0 -1
- package/types/esm/blocks/symbol/symbol.d.mts +0 -4
- package/types/esm/blocks/symbol/symbol.helpers.d.mts +0 -14
- package/types/esm/blocks/symbol/symbol.types.d.mts +0 -18
- package/types/esm/blocks/tabs/component-info.d.mts +0 -2
- package/types/esm/blocks/tabs/index.d.mts +0 -1
- package/types/esm/blocks/tabs/tabs.d.mts +0 -4
- package/types/esm/blocks/tabs/tabs.types.d.mts +0 -13
- package/types/esm/blocks/text/component-info.d.mts +0 -2
- package/types/esm/blocks/text/index.d.mts +0 -1
- package/types/esm/blocks/text/text.d.mts +0 -4
- package/types/esm/blocks/text/text.types.d.mts +0 -4
- package/types/esm/blocks/textarea/component-info.d.mts +0 -2
- package/types/esm/blocks/textarea/index.d.mts +0 -1
- package/types/esm/blocks/textarea/textarea.d.mts +0 -13
- package/types/esm/blocks/video/component-info.d.mts +0 -2
- package/types/esm/blocks/video/index.d.mts +0 -1
- package/types/esm/blocks/video/video.d.mts +0 -4
- package/types/esm/blocks/video/video.types.d.mts +0 -21
- package/types/esm/components/block/animator.d.mts +0 -5
- package/types/esm/components/block/block.d.mts +0 -11
- package/types/esm/components/block/block.helpers.d.mts +0 -18
- package/types/esm/components/block/components/block-styles.d.mts +0 -9
- package/types/esm/components/block/components/block-wrapper.d.mts +0 -15
- package/types/esm/components/block/components/component-ref/component-ref.d.mts +0 -4
- package/types/esm/components/block/components/component-ref/component-ref.helpers.d.mts +0 -31
- package/types/esm/components/block/components/interactive-element.d.mts +0 -14
- package/types/esm/components/block/components/repeated-block.d.mts +0 -8
- package/types/esm/components/block/types.d.mts +0 -6
- package/types/esm/components/blocks/blocks-wrapper.d.mts +0 -19
- package/types/esm/components/blocks/blocks.d.mts +0 -4
- package/types/esm/components/blocks/blocks.types.d.mts +0 -7
- package/types/esm/components/blocks/index.d.mts +0 -1
- package/types/esm/components/content/components/enable-editor.d.mts +0 -10
- package/types/esm/components/content/components/styles.d.mts +0 -10
- package/types/esm/components/content/components/styles.helpers.d.mts +0 -17
- package/types/esm/components/content/content.d.mts +0 -4
- package/types/esm/components/content/content.helpers.d.mts +0 -7
- package/types/esm/components/content/content.types.d.mts +0 -13
- package/types/esm/components/content/contentProps.types.d.mts +0 -17
- package/types/esm/components/content/index.d.mts +0 -1
- package/types/esm/components/content/wrap-component-ref.d.mts +0 -6
- package/types/esm/components/content-variants/content-variants.d.mts +0 -10
- package/types/esm/components/content-variants/content-variants.types.d.mts +0 -71
- package/types/esm/components/content-variants/helpers.d.mts +0 -41
- package/types/esm/components/content-variants/index.d.mts +0 -1
- package/types/esm/components/content-variants/inlined-fns.d.mts +0 -14
- package/types/esm/components/dynamic-div.d.mts +0 -15
- package/types/esm/components/dynamic-renderer/dynamic-renderer.d.mts +0 -9
- package/types/esm/components/dynamic-renderer/dynamic-renderer.helpers.d.mts +0 -1
- package/types/esm/components/error-boundary.d.mts +0 -11
- package/types/esm/components/inlined-script.d.mts +0 -7
- package/types/esm/components/inlined-styles.d.mts +0 -7
- package/types/esm/constants/builder-registered-components.d.mts +0 -6
- package/types/esm/constants/device-sizes.d.mts +0 -13
- package/types/esm/constants/extra-components.d.mts +0 -7
- package/types/esm/constants/sdk-version.d.mts +0 -1
- package/types/esm/constants/target.d.mts +0 -2
- package/types/esm/context/builder.context.d.mts +0 -3
- package/types/esm/context/components.context.d.mts +0 -3
- package/types/esm/context/index.d.mts +0 -1
- package/types/esm/context/types.d.mts +0 -36
- package/types/esm/functions/apply-patch-with-mutation.d.mts +0 -10
- package/types/esm/functions/camel-to-kebab-case.d.mts +0 -1
- package/types/esm/functions/deopt.d.mts +0 -4
- package/types/esm/functions/evaluate/browser-runtime/browser.d.mts +0 -8
- package/types/esm/functions/evaluate/browser-runtime/index.d.mts +0 -1
- package/types/esm/functions/evaluate/choose-eval.d.mts +0 -6
- package/types/esm/functions/evaluate/edge-runtime/acorn-interpreter.d.mts +0 -2
- package/types/esm/functions/evaluate/edge-runtime/edge-runtime.d.mts +0 -2
- package/types/esm/functions/evaluate/edge-runtime/index.d.mts +0 -1
- package/types/esm/functions/evaluate/evaluate.d.mts +0 -4
- package/types/esm/functions/evaluate/helpers.d.mts +0 -25
- package/types/esm/functions/evaluate/index.d.mts +0 -1
- package/types/esm/functions/evaluate/node-runtime/index.d.mts +0 -1
- package/types/esm/functions/evaluate/node-runtime/init.d.mts +0 -13
- package/types/esm/functions/evaluate/node-runtime/node-runtime.d.mts +0 -11
- package/types/esm/functions/evaluate/node-runtime/safeDynamicRequire.d.mts +0 -6
- package/types/esm/functions/evaluate/placeholder-runtime.d.mts +0 -2
- package/types/esm/functions/evaluate/should-force-browser-runtime-in-node.d.mts +0 -1
- package/types/esm/functions/event-handler-name.d.mts +0 -1
- package/types/esm/functions/extract-text-styles.d.mts +0 -4
- package/types/esm/functions/fast-clone.d.mts +0 -4
- package/types/esm/functions/fetch-builder-props.d.mts +0 -53
- package/types/esm/functions/get-block-actions-handler.d.mts +0 -8
- package/types/esm/functions/get-block-actions.d.mts +0 -10
- package/types/esm/functions/get-block-component-options.d.mts +0 -2
- package/types/esm/functions/get-block-properties.d.mts +0 -10
- package/types/esm/functions/get-builder-search-params/index.d.mts +0 -9
- package/types/esm/functions/get-class-prop-name.d.mts +0 -1
- package/types/esm/functions/get-content/generate-content-url.d.mts +0 -2
- package/types/esm/functions/get-content/index.d.mts +0 -18
- package/types/esm/functions/get-content/types.d.mts +0 -139
- package/types/esm/functions/get-env.d.mts +0 -2
- package/types/esm/functions/get-fetch.d.mts +0 -1
- package/types/esm/functions/get-global-this.d.mts +0 -4
- package/types/esm/functions/get-processed-block.d.mts +0 -10
- package/types/esm/functions/get-style.d.mts +0 -12
- package/types/esm/functions/get.d.mts +0 -1
- package/types/esm/functions/is-browser.d.mts +0 -1
- package/types/esm/functions/is-edge-runtime.d.mts +0 -4
- package/types/esm/functions/is-editing.d.mts +0 -2
- package/types/esm/functions/is-from-trusted-host.d.mts +0 -3
- package/types/esm/functions/is-iframe.d.mts +0 -1
- package/types/esm/functions/is-node-runtime.d.mts +0 -4
- package/types/esm/functions/is-previewing.d.mts +0 -2
- package/types/esm/functions/on-change.d.mts +0 -7
- package/types/esm/functions/register-component.d.mts +0 -6
- package/types/esm/functions/register.d.mts +0 -16
- package/types/esm/functions/set-editor-settings.d.mts +0 -4
- package/types/esm/functions/set.d.mts +0 -7
- package/types/esm/functions/track/helpers.d.mts +0 -5
- package/types/esm/functions/track/index.d.mts +0 -51
- package/types/esm/functions/track/interaction.d.mts +0 -13
- package/types/esm/functions/transform-block-properties.d.mts +0 -7
- package/types/esm/functions/transform-block.d.mts +0 -2
- package/types/esm/functions/transform-style-property.d.mts +0 -7
- package/types/esm/helpers/ab-tests.d.mts +0 -9
- package/types/esm/helpers/canTrack.d.mts +0 -1
- package/types/esm/helpers/cookie.d.mts +0 -19
- package/types/esm/helpers/css.d.mts +0 -7
- package/types/esm/helpers/flatten.d.mts +0 -16
- package/types/esm/helpers/localStorage.d.mts +0 -9
- package/types/esm/helpers/logger.d.mts +0 -7
- package/types/esm/helpers/nullable.d.mts +0 -2
- package/types/esm/helpers/omit.d.mts +0 -1
- package/types/esm/helpers/preview-lru-cache/get.d.mts +0 -2
- package/types/esm/helpers/preview-lru-cache/helpers.d.mts +0 -1
- package/types/esm/helpers/preview-lru-cache/init.d.mts +0 -6
- package/types/esm/helpers/preview-lru-cache/set.d.mts +0 -7
- package/types/esm/helpers/preview-lru-cache/types.d.mts +0 -1
- package/types/esm/helpers/search/search.d.mts +0 -5
- package/types/esm/helpers/sessionId.d.mts +0 -6
- package/types/esm/helpers/subscribe-to-editor.d.mts +0 -35
- package/types/esm/helpers/time.d.mts +0 -1
- package/types/esm/helpers/url.d.mts +0 -6
- package/types/esm/helpers/uuid.d.mts +0 -8
- package/types/esm/helpers/visitorId.d.mts +0 -6
- package/types/esm/index-helpers/blocks-exports.d.mts +0 -14
- package/types/esm/index-helpers/top-of-file.d.mts +0 -1
- package/types/esm/index.d.mts +0 -10
- package/types/esm/index.d.mts.d.mts +0 -10
- package/types/esm/scripts/init-editing.d.mts +0 -7
- package/types/esm/server-index.d.mts +0 -39
- package/types/esm/types/api-version.d.mts +0 -2
- package/types/esm/types/builder-block.d.mts +0 -84
- package/types/esm/types/builder-content.d.mts +0 -44
- package/types/esm/types/builder-props.d.mts +0 -12
- package/types/esm/types/can-track.d.mts +0 -3
- package/types/esm/types/components.d.mts +0 -110
- package/types/esm/types/deep-partial.d.mts +0 -3
- package/types/esm/types/element.d.mts +0 -59
- package/types/esm/types/enforced-partials.d.mts +0 -26
- package/types/esm/types/input.d.mts +0 -122
- package/types/esm/types/targets.d.mts +0 -1
- package/types/esm/types/typescript.d.mts +0 -8
- package/types/functions/evaluate/node-runtime/setIvm.d.ts +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { BuilderContent } from '../types/builder-content.js';
|
|
2
|
-
import type { CanTrack } from '../types/can-track.js';
|
|
3
|
-
import type { Nullable } from '../types/typescript.js';
|
|
4
|
-
export declare const handleABTestingSync: ({ item, canTrack }: {
|
|
5
|
-
item: Nullable<BuilderContent>;
|
|
6
|
-
} & CanTrack) => Nullable<BuilderContent>;
|
|
7
|
-
export declare const handleABTesting: ({ item, canTrack }: {
|
|
8
|
-
item: BuilderContent;
|
|
9
|
-
} & CanTrack) => Promise<BuilderContent>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getDefaultCanTrack: (canTrack?: boolean) => boolean;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { CanTrack } from '../types/can-track.js';
|
|
2
|
-
type GetCookieArgs = {
|
|
3
|
-
name: string;
|
|
4
|
-
} & CanTrack;
|
|
5
|
-
export declare const getCookieSync: ({ name, canTrack }: GetCookieArgs) => string | undefined;
|
|
6
|
-
/**
|
|
7
|
-
* NOTE: This function is `async` because its react-native override is async. Do not remove the `async` keyword!
|
|
8
|
-
* The sync version is only safe to use in code blocks that `react-native` is guaranteed not to not run.
|
|
9
|
-
*/
|
|
10
|
-
export declare const getCookie: (args: GetCookieArgs) => Promise<string>;
|
|
11
|
-
/**
|
|
12
|
-
* NOTE: This function is `async` because its react-native override is async. Do not remove the `async` keyword!
|
|
13
|
-
*/
|
|
14
|
-
export declare const setCookie: ({ name, value, expires, canTrack }: {
|
|
15
|
-
name: string;
|
|
16
|
-
value: string;
|
|
17
|
-
expires?: Date;
|
|
18
|
-
} & CanTrack) => Promise<void>;
|
|
19
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const convertStyleMapToCSSArray: (style: Partial<CSSStyleDeclaration>) => string[];
|
|
2
|
-
export declare const convertStyleMapToCSS: (style: Partial<CSSStyleDeclaration>) => string;
|
|
3
|
-
export declare const createCssClass: ({ mediaQuery, className, styles }: {
|
|
4
|
-
mediaQuery?: string;
|
|
5
|
-
className: string;
|
|
6
|
-
styles: Partial<CSSStyleDeclaration>;
|
|
7
|
-
}) => string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert deep object to a flat object with dots
|
|
3
|
-
*
|
|
4
|
-
* { foo: { bar: 'baz' }} -> { 'foo.bar': 'baz' }
|
|
5
|
-
*/
|
|
6
|
-
export declare function flatten<T extends Record<string, any>>(object: T, path?: string | null, separator?: string): T;
|
|
7
|
-
/**
|
|
8
|
-
* Flatten a nested MongoDB query object into a flat object with dot-separated keys.
|
|
9
|
-
* $ keys are not flattened and are left as is.
|
|
10
|
-
*
|
|
11
|
-
* { foo: { bar: { $gt: 5 }}} -> { 'foo.bar': { '$gt': 5 }}
|
|
12
|
-
* { foo: {'bar.id': { $elemMatch: { 'baz.id': { $in: ['abc', 'bcd'] }}}}} -> { 'foo.bar.id': { '$elemMatch': { 'baz.id': { '$in': ['abc', 'bcd'] }}}}
|
|
13
|
-
*/
|
|
14
|
-
export declare function flattenMongoQuery(obj: any, _current?: any, _res?: any): {
|
|
15
|
-
[key: string]: string;
|
|
16
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CanTrack } from '../types/can-track.js';
|
|
2
|
-
import type { Nullable } from './nullable.js';
|
|
3
|
-
export declare const getLocalStorageItem: ({ key, canTrack }: {
|
|
4
|
-
key: string;
|
|
5
|
-
} & CanTrack) => Nullable<string>;
|
|
6
|
-
export declare const setLocalStorageItem: ({ key, canTrack, value }: {
|
|
7
|
-
key: string;
|
|
8
|
-
value: string;
|
|
9
|
-
} & CanTrack) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function omit<T extends object>(obj: T, ...values: (keyof T)[]): Partial<T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type QueryObject = Record<string, string | string[]>;
|
|
2
|
-
export declare const convertSearchParamsToQueryObject: (searchParams: URLSearchParams) => QueryObject;
|
|
3
|
-
export declare const normalizeSearchParams: (searchParams: QueryObject | URLSearchParams) => QueryObject;
|
|
4
|
-
export type Search = URLSearchParams | string | QueryObject;
|
|
5
|
-
export declare const getSearchString: (search: Search) => string;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { CanTrack } from '../types/can-track.js';
|
|
2
|
-
export declare const getSessionId: ({ canTrack }: CanTrack) => Promise<string | undefined>;
|
|
3
|
-
export declare const createSessionId: () => string;
|
|
4
|
-
export declare const setSessionId: ({ id, canTrack }: {
|
|
5
|
-
id: string;
|
|
6
|
-
} & CanTrack) => Promise<void>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { ContentProps } from '../components/content/content.types.js';
|
|
2
|
-
import type { BuilderAnimation } from '../types/builder-block.js';
|
|
3
|
-
import type { BuilderContent } from '../types/builder-content.js';
|
|
4
|
-
type ContentListener = Required<Pick<ContentProps, 'model' | 'trustedHosts'>> & {
|
|
5
|
-
callbacks: {
|
|
6
|
-
contentUpdate: (updatedContent: BuilderContent) => void;
|
|
7
|
-
animation: (updatedContent: BuilderAnimation) => void;
|
|
8
|
-
configureSdk: (updatedContent: any) => void;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export declare const createEditorListener: ({ model, trustedHosts, callbacks }: ContentListener) => (event: MessageEvent<any>) => void;
|
|
12
|
-
type SubscribeToEditor = (
|
|
13
|
-
/**
|
|
14
|
-
* The Builder `model` to subscribe to
|
|
15
|
-
*/
|
|
16
|
-
model: string,
|
|
17
|
-
/**
|
|
18
|
-
* The callback function to call when the content is updated.
|
|
19
|
-
*/
|
|
20
|
-
callback: (updatedContent: BuilderContent) => void,
|
|
21
|
-
/**
|
|
22
|
-
* Extra options for the listener.
|
|
23
|
-
*/
|
|
24
|
-
options?: {
|
|
25
|
-
/**
|
|
26
|
-
* List of hosts to allow editing content from.
|
|
27
|
-
*/
|
|
28
|
-
trustedHosts?: string[] | undefined;
|
|
29
|
-
}) => () => void;
|
|
30
|
-
/**
|
|
31
|
-
* Subscribes to the Builder editor and listens to `content` updates of a certain `model`.
|
|
32
|
-
* Sends the updated `content` to the `callback` function.
|
|
33
|
-
*/
|
|
34
|
-
export declare const subscribeToEditor: SubscribeToEditor;
|
|
35
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getCurrentDatePlusMinutes: (minutes?: number) => Date;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { CanTrack } from '../types/can-track.js';
|
|
2
|
-
export declare const getVisitorId: ({ canTrack }: CanTrack) => string | undefined;
|
|
3
|
-
export declare const createVisitorId: () => string;
|
|
4
|
-
export declare const setVisitorId: ({ id, canTrack }: {
|
|
5
|
-
id: string;
|
|
6
|
-
} & CanTrack) => void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export { default as Button } from '../blocks/button/index.js';
|
|
2
|
-
export { default as Columns } from '../blocks/columns/index.js';
|
|
3
|
-
export { default as Fragment } from '../blocks/fragment/index.js';
|
|
4
|
-
export { default as Image } from '../blocks/image/index.js';
|
|
5
|
-
export { default as Section } from '../blocks/section/index.js';
|
|
6
|
-
export { default as Symbol } from '../blocks/symbol/index.js';
|
|
7
|
-
export { default as Text } from '../blocks/text/index.js';
|
|
8
|
-
export { default as Video } from '../blocks/video/index.js';
|
|
9
|
-
export { default as Blocks } from '../components/blocks/index.js';
|
|
10
|
-
export { default as Content } from '../components/content-variants/index.js';
|
|
11
|
-
/**
|
|
12
|
-
* Builder Context
|
|
13
|
-
*/
|
|
14
|
-
export { BuilderContext } from '../context/index.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default undefined;
|
package/types/cjs/index.d.cts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './index-helpers/top-of-file.js';
|
|
2
|
-
/**
|
|
3
|
-
* In the React SDK, this file is marked with `use client`.
|
|
4
|
-
*/
|
|
5
|
-
export * from './index-helpers/blocks-exports.js';
|
|
6
|
-
/**
|
|
7
|
-
* In the React SDK, this file is not marked with `use client`, to allow
|
|
8
|
-
* NextJS App Directory to use the SDK helper functions without issues.
|
|
9
|
-
*/
|
|
10
|
-
export * from './server-index.js';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export * from './index-helpers/top-of-file.js';
|
|
2
|
-
/**
|
|
3
|
-
* Component Prop types
|
|
4
|
-
*/
|
|
5
|
-
export type { ButtonProps } from './blocks/button/button.types.js';
|
|
6
|
-
export type { ColumnProps } from './blocks/columns/columns.types.js';
|
|
7
|
-
export type { FragmentProps } from './blocks/fragment/fragment.types.js';
|
|
8
|
-
export type { ImageProps } from './blocks/image/image.types.js';
|
|
9
|
-
export type { SectionProps } from './blocks/section/section.types.js';
|
|
10
|
-
export type { SymbolProps } from './blocks/symbol/symbol.types.js';
|
|
11
|
-
export type { TextProps } from './blocks/text/text.types.js';
|
|
12
|
-
export type { VideoProps } from './blocks/video/video.types.js';
|
|
13
|
-
export type { BlocksProps } from './components/blocks/blocks.types.js';
|
|
14
|
-
export type { ContentVariantsPrps as ContentProps } from './components/content-variants/content-variants.types.js';
|
|
15
|
-
/**
|
|
16
|
-
* General Builder types
|
|
17
|
-
*/
|
|
18
|
-
export type { RegisteredComponent } from './context/types.js';
|
|
19
|
-
export type { BuilderBlock } from './types/builder-block.js';
|
|
20
|
-
export type { BuilderContent } from './types/builder-content.js';
|
|
21
|
-
export type { ComponentInfo } from './types/components.js';
|
|
22
|
-
/**
|
|
23
|
-
* Helper functions
|
|
24
|
-
*/
|
|
25
|
-
export { isEditing } from './functions/is-editing.js';
|
|
26
|
-
export { isPreviewing } from './functions/is-previewing.js';
|
|
27
|
-
export { createRegisterComponentMessage } from './functions/register-component.js';
|
|
28
|
-
export { register } from './functions/register.js';
|
|
29
|
-
export type { InsertMenuConfig, InsertMenuItem } from './functions/register.js';
|
|
30
|
-
export { setEditorSettings } from './functions/set-editor-settings.js';
|
|
31
|
-
export type { Settings } from './functions/set-editor-settings.js';
|
|
32
|
-
export { getBuilderSearchParams } from './functions/get-builder-search-params/index.js';
|
|
33
|
-
export { track } from './functions/track/index.js';
|
|
34
|
-
export { subscribeToEditor } from './helpers/subscribe-to-editor.js';
|
|
35
|
-
/**
|
|
36
|
-
* Content fetching
|
|
37
|
-
*/
|
|
38
|
-
export { fetchBuilderProps } from './functions/fetch-builder-props.js';
|
|
39
|
-
export { _processContentResult, fetchEntries, fetchOneEntry } from './functions/get-content/index.js';
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
type JSONValue = string | number | boolean | JSONObject | JSONArray;
|
|
2
|
-
interface JSONObject {
|
|
3
|
-
[x: string]: JSONValue;
|
|
4
|
-
}
|
|
5
|
-
interface JSONArray extends Array<JSONValue> {
|
|
6
|
-
}
|
|
7
|
-
export interface AnimationStep {
|
|
8
|
-
styles: {
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
};
|
|
11
|
-
delay?: number;
|
|
12
|
-
}
|
|
13
|
-
export interface BuilderAnimation {
|
|
14
|
-
elementId: string;
|
|
15
|
-
trigger: string;
|
|
16
|
-
steps: AnimationStep[];
|
|
17
|
-
duration: number;
|
|
18
|
-
delay?: number;
|
|
19
|
-
easing?: string;
|
|
20
|
-
id?: string;
|
|
21
|
-
repeat?: boolean;
|
|
22
|
-
thresholdPercent?: number;
|
|
23
|
-
}
|
|
24
|
-
/** @todo typedoc this */
|
|
25
|
-
export interface BuilderBlock {
|
|
26
|
-
'@type': '@builder.io/sdk:Element';
|
|
27
|
-
'@version'?: number;
|
|
28
|
-
id?: string;
|
|
29
|
-
tagName?: string;
|
|
30
|
-
layerName?: string;
|
|
31
|
-
groupLocked?: boolean;
|
|
32
|
-
layerLocked?: boolean;
|
|
33
|
-
/** @todo make alias for properties.class */
|
|
34
|
-
class?: string;
|
|
35
|
-
children?: BuilderBlock[];
|
|
36
|
-
responsiveStyles?: {
|
|
37
|
-
large?: Partial<CSSStyleDeclaration>;
|
|
38
|
-
medium?: Partial<CSSStyleDeclaration>;
|
|
39
|
-
small?: Partial<CSSStyleDeclaration>;
|
|
40
|
-
/** @deprecated */
|
|
41
|
-
xsmall?: Partial<CSSStyleDeclaration>;
|
|
42
|
-
};
|
|
43
|
-
component?: {
|
|
44
|
-
name: string;
|
|
45
|
-
options?: any;
|
|
46
|
-
tag?: string;
|
|
47
|
-
};
|
|
48
|
-
bindings?: {
|
|
49
|
-
[key: string]: string;
|
|
50
|
-
};
|
|
51
|
-
meta?: {
|
|
52
|
-
[key: string]: JSONValue;
|
|
53
|
-
};
|
|
54
|
-
actions?: {
|
|
55
|
-
[key: string]: string;
|
|
56
|
-
};
|
|
57
|
-
properties?: {
|
|
58
|
-
[key: string]: string;
|
|
59
|
-
};
|
|
60
|
-
code?: {
|
|
61
|
-
bindings?: {
|
|
62
|
-
[key: string]: string;
|
|
63
|
-
};
|
|
64
|
-
actions?: {
|
|
65
|
-
[key: string]: string;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
repeat?: {
|
|
69
|
-
collection: string;
|
|
70
|
-
itemName?: string;
|
|
71
|
-
} | null;
|
|
72
|
-
animations?: BuilderAnimation[];
|
|
73
|
-
style?: Partial<CSSStyleDeclaration>;
|
|
74
|
-
href?: string;
|
|
75
|
-
/**
|
|
76
|
-
* generated by the "Hide If" binding
|
|
77
|
-
*/
|
|
78
|
-
hide?: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* generated by the "Show If" binding
|
|
81
|
-
*/
|
|
82
|
-
show?: boolean;
|
|
83
|
-
}
|
|
84
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { BuilderBlock } from './builder-block.js';
|
|
2
|
-
import type { Input } from './input.js';
|
|
3
|
-
import type { Nullable } from './typescript.js';
|
|
4
|
-
export interface Breakpoints {
|
|
5
|
-
small: number;
|
|
6
|
-
medium: number;
|
|
7
|
-
}
|
|
8
|
-
export interface BuilderContentVariation {
|
|
9
|
-
data?: {
|
|
10
|
-
title?: string;
|
|
11
|
-
blocks?: BuilderBlock[];
|
|
12
|
-
inputs?: Input[];
|
|
13
|
-
state?: {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
jsCode?: string;
|
|
17
|
-
tsCode?: string;
|
|
18
|
-
httpRequests?: {
|
|
19
|
-
[key: string]: string;
|
|
20
|
-
};
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
};
|
|
23
|
-
name?: string;
|
|
24
|
-
testRatio?: number;
|
|
25
|
-
id?: string;
|
|
26
|
-
meta?: {
|
|
27
|
-
breakpoints?: Nullable<Breakpoints>;
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export interface BuilderContent extends BuilderContentVariation {
|
|
32
|
-
'@version'?: number;
|
|
33
|
-
published?: 'published' | 'draft' | 'archived';
|
|
34
|
-
modelId?: string;
|
|
35
|
-
priority?: number;
|
|
36
|
-
lastUpdated?: number;
|
|
37
|
-
startDate?: number;
|
|
38
|
-
endDate?: number;
|
|
39
|
-
variations?: {
|
|
40
|
-
[id: string]: BuilderContentVariation;
|
|
41
|
-
};
|
|
42
|
-
testVariationId?: string;
|
|
43
|
-
testVariationName?: string;
|
|
44
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BuilderContextInterface, RegisteredComponents } from '../context/types.js';
|
|
2
|
-
import type { BuilderBlock } from './builder-block.js';
|
|
3
|
-
export type BuilderDataProps = {
|
|
4
|
-
builderBlock: BuilderBlock;
|
|
5
|
-
builderContext: BuilderContextInterface;
|
|
6
|
-
};
|
|
7
|
-
export type BuilderComponentsProp = {
|
|
8
|
-
builderComponents: RegisteredComponents;
|
|
9
|
-
};
|
|
10
|
-
export type BuilderLinkComponentProp = {
|
|
11
|
-
builderLinkComponent?: any;
|
|
12
|
-
};
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import type { BuilderElement } from './element.js';
|
|
2
|
-
import type { Input } from './input.js';
|
|
3
|
-
export interface ComponentInfo {
|
|
4
|
-
/**
|
|
5
|
-
* Name your component something unique, e.g. 'MyButton'. You can override built-in components
|
|
6
|
-
* by registering a component with the same name, e.g. 'Text', to replace the built-in text component
|
|
7
|
-
*/
|
|
8
|
-
name: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Link to a documentation page for this component
|
|
12
|
-
*/
|
|
13
|
-
docsLink?: string;
|
|
14
|
-
image?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Input schema for your component for users to fill in the options
|
|
17
|
-
*/
|
|
18
|
-
inputs?: Input[];
|
|
19
|
-
class?: any;
|
|
20
|
-
type?: 'angular' | 'webcomponent' | 'react' | 'vue';
|
|
21
|
-
defaultStyles?: {
|
|
22
|
-
[key: string]: string;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Turn on if your component can accept children. Be sure to use in combination with
|
|
26
|
-
* withChildren(YourComponent) like here
|
|
27
|
-
* github.com/BuilderIO/builder/blob/master/examples/react-design-system/src/components/HeroWithChildren/HeroWithChildren.builder.js#L5
|
|
28
|
-
*/
|
|
29
|
-
canHaveChildren?: boolean;
|
|
30
|
-
fragment?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Do not wrap a component in a dom element. Be sure to use {...props.attributes} with this option
|
|
33
|
-
* like here github.com/BuilderIO/builder/blob/master/packages/react/src/blocks/forms/Input.tsx#L34
|
|
34
|
-
*/
|
|
35
|
-
noWrap?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* TO-DO: make this optional only for RSC SDK.
|
|
38
|
-
*
|
|
39
|
-
* Set this to `true` if your component is a React Server Component (RSC).
|
|
40
|
-
*/
|
|
41
|
-
isRSC?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Default children
|
|
44
|
-
*/
|
|
45
|
-
defaultChildren?: BuilderElement[];
|
|
46
|
-
defaults?: Partial<BuilderElement>;
|
|
47
|
-
hooks?: {
|
|
48
|
-
[key: string]: string | Function;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Hide your component in editor, useful for gradually deprecating components
|
|
52
|
-
*/
|
|
53
|
-
hideFromInsertMenu?: boolean;
|
|
54
|
-
tag?: string;
|
|
55
|
-
static?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Passing a list of model names will restrict using the component to only the models listed here, otherwise it'll be available for all models
|
|
58
|
-
*/
|
|
59
|
-
models?: string[];
|
|
60
|
-
/**
|
|
61
|
-
* Specify restrictions direct children must match
|
|
62
|
-
*/
|
|
63
|
-
childRequirements?: {
|
|
64
|
-
/** Message to show when this doesn't match, e.g. "Children of 'Columns' must be a 'Column'" */
|
|
65
|
-
message: string;
|
|
66
|
-
/** Simple way to say children must be a specific component name */
|
|
67
|
-
component?: string;
|
|
68
|
-
/**
|
|
69
|
-
* More advanced - specify a MongoDB-style query (using sift.js github.com/crcn/sift.js)
|
|
70
|
-
* of what the children objects should match, e.g.
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* query: {
|
|
74
|
-
* // Child of this element must be a 'Button' or 'Text' component
|
|
75
|
-
* 'component.name': { $in: ['Button', 'Text'] }
|
|
76
|
-
* }
|
|
77
|
-
*/
|
|
78
|
-
query?: any;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Specify restrictions any parent must match
|
|
82
|
-
*/
|
|
83
|
-
requiresParent?: {
|
|
84
|
-
/** Message to show when this doesn't match, e.g. "'Add to cart' buttons must be within a 'Product box'" */
|
|
85
|
-
message: string;
|
|
86
|
-
/** Simple way to say a parent must be a specific component name, e.g. 'Product box' */
|
|
87
|
-
component?: string;
|
|
88
|
-
/**
|
|
89
|
-
* More advanced - specify a MongoDB-style query (using sift.js github.com/crcn/sift.js)
|
|
90
|
-
* of what at least one parent in the parents hierarchy should match, e.g.
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* query: {
|
|
94
|
-
* // Thils element must be somewhere inside either a 'Product box' or 'Collection' component
|
|
95
|
-
* 'component.name': { $in: ['Product Box', 'Collection'] }
|
|
96
|
-
* }
|
|
97
|
-
*/
|
|
98
|
-
query?: any;
|
|
99
|
-
};
|
|
100
|
-
friendlyName?: string;
|
|
101
|
-
/**
|
|
102
|
-
* Use to restrict access to your component based on a the current user permissions
|
|
103
|
-
* By default components will show to all users
|
|
104
|
-
* for more information on permissions in builder check https://www.builder.io/c/docs/guides/roles-and-permissions
|
|
105
|
-
*/
|
|
106
|
-
requiredPermissions?: Array<Permission>;
|
|
107
|
-
hidden?: boolean;
|
|
108
|
-
}
|
|
109
|
-
type Permission = 'read' | 'publish' | 'editCode' | 'editDesigns' | 'admin' | 'create';
|
|
110
|
-
export {};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
type JSONValue = string | number | boolean | JSONObject | JSONArray;
|
|
2
|
-
interface JSONObject {
|
|
3
|
-
[x: string]: JSONValue;
|
|
4
|
-
}
|
|
5
|
-
interface JSONArray extends Array<JSONValue> {
|
|
6
|
-
}
|
|
7
|
-
/** @todo typedoc this */
|
|
8
|
-
export interface BuilderElement {
|
|
9
|
-
'@type': '@builder.io/sdk:Element';
|
|
10
|
-
'@version'?: number;
|
|
11
|
-
id?: string;
|
|
12
|
-
tagName?: string;
|
|
13
|
-
layerName?: string;
|
|
14
|
-
groupLocked?: boolean;
|
|
15
|
-
layerLocked?: boolean;
|
|
16
|
-
/** @todo make alias for properties.class */
|
|
17
|
-
class?: string;
|
|
18
|
-
children?: BuilderElement[];
|
|
19
|
-
responsiveStyles?: {
|
|
20
|
-
large?: Partial<CSSStyleDeclaration>;
|
|
21
|
-
medium?: Partial<CSSStyleDeclaration>;
|
|
22
|
-
small?: Partial<CSSStyleDeclaration>;
|
|
23
|
-
/** @deprecated */
|
|
24
|
-
xsmall?: Partial<CSSStyleDeclaration>;
|
|
25
|
-
};
|
|
26
|
-
component?: {
|
|
27
|
-
name: string;
|
|
28
|
-
options?: any;
|
|
29
|
-
tag?: string;
|
|
30
|
-
};
|
|
31
|
-
bindings?: {
|
|
32
|
-
[key: string]: string;
|
|
33
|
-
};
|
|
34
|
-
meta?: {
|
|
35
|
-
[key: string]: JSONValue;
|
|
36
|
-
};
|
|
37
|
-
actions?: {
|
|
38
|
-
[key: string]: string;
|
|
39
|
-
};
|
|
40
|
-
properties?: {
|
|
41
|
-
[key: string]: string;
|
|
42
|
-
};
|
|
43
|
-
code?: {
|
|
44
|
-
bindings?: {
|
|
45
|
-
[key: string]: string;
|
|
46
|
-
};
|
|
47
|
-
actions?: {
|
|
48
|
-
[key: string]: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
repeat?: {
|
|
52
|
-
collection: string;
|
|
53
|
-
itemName?: string;
|
|
54
|
-
} | null;
|
|
55
|
-
animations?: Animation[];
|
|
56
|
-
}
|
|
57
|
-
interface Animation {
|
|
58
|
-
}
|
|
59
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Prettify } from './typescript.js';
|
|
2
|
-
/**
|
|
3
|
-
* Lol Typescript
|
|
4
|
-
* https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
|
|
5
|
-
*/
|
|
6
|
-
type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
7
|
-
type OptionalFieldsOnly<T> = {
|
|
8
|
-
[K in keyof T as T[K] extends Required<T>[K] ? IfAny<T[K], K, never> : K]: T[K];
|
|
9
|
-
};
|
|
10
|
-
type RequiredFieldsOnly<T> = {
|
|
11
|
-
[K in keyof T as T[K] extends Required<T>[K] ? IfAny<T[K], never, K> : never]: T[K];
|
|
12
|
-
};
|
|
13
|
-
type Enforced<T> = {
|
|
14
|
-
[K in keyof T]-?: T[K];
|
|
15
|
-
};
|
|
16
|
-
type AndUndefined<T> = {
|
|
17
|
-
[K in keyof T]: T[K] | undefined;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Enforce that all optional fields are undefined
|
|
21
|
-
* @example
|
|
22
|
-
* type Foo = { a: string, b?: number }
|
|
23
|
-
* type Bar = EnforcePartials<Foo> // { a: string, b: number | undefined }
|
|
24
|
-
*/
|
|
25
|
-
export type EnforcePartials<From> = Prettify<AndUndefined<Enforced<OptionalFieldsOnly<From>>> & RequiredFieldsOnly<From>>;
|
|
26
|
-
export {};
|