@builder.io/sdk-qwik 0.16.19 → 0.16.21
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/accordion/accordion.qwik.cjs +143 -74
- package/lib/browser/blocks/accordion/accordion.qwik.mjs +143 -74
- package/lib/browser/blocks/accordion/component-info.qwik.cjs +1 -2
- package/lib/browser/blocks/accordion/component-info.qwik.mjs +1 -2
- package/lib/browser/blocks/button/button.qwik.cjs +17 -8
- package/lib/browser/blocks/button/button.qwik.mjs +17 -8
- package/lib/browser/blocks/columns/columns.qwik.cjs +119 -66
- package/lib/browser/blocks/columns/columns.qwik.mjs +119 -66
- package/lib/browser/blocks/columns/component-info.qwik.cjs +3 -4
- package/lib/browser/blocks/columns/component-info.qwik.mjs +3 -4
- package/lib/browser/blocks/custom-code/custom-code.qwik.cjs +22 -18
- package/lib/browser/blocks/custom-code/custom-code.qwik.mjs +23 -19
- package/lib/browser/blocks/embed/embed.qwik.cjs +23 -17
- package/lib/browser/blocks/embed/embed.qwik.mjs +23 -17
- package/lib/browser/blocks/form/form/form.qwik.cjs +128 -74
- package/lib/browser/blocks/form/form/form.qwik.mjs +129 -75
- package/lib/browser/blocks/form/input/input.qwik.cjs +2 -2
- package/lib/browser/blocks/form/input/input.qwik.mjs +3 -3
- package/lib/browser/blocks/form/select/select.qwik.cjs +5 -7
- package/lib/browser/blocks/form/select/select.qwik.mjs +6 -8
- package/lib/browser/blocks/form/submit-button/submit-button.qwik.cjs +9 -7
- package/lib/browser/blocks/form/submit-button/submit-button.qwik.mjs +10 -8
- package/lib/browser/blocks/form/textarea/textarea.qwik.cjs +21 -11
- package/lib/browser/blocks/form/textarea/textarea.qwik.mjs +22 -12
- package/lib/browser/blocks/fragment/fragment.qwik.cjs +3 -6
- package/lib/browser/blocks/fragment/fragment.qwik.mjs +4 -7
- package/lib/browser/blocks/image/component-info.qwik.cjs +3 -6
- package/lib/browser/blocks/image/component-info.qwik.mjs +3 -6
- package/lib/browser/blocks/image/image.helpers.qwik.cjs +6 -12
- package/lib/browser/blocks/image/image.helpers.qwik.mjs +6 -12
- package/lib/browser/blocks/image/image.qwik.cjs +89 -63
- package/lib/browser/blocks/image/image.qwik.mjs +89 -63
- package/lib/browser/blocks/img/img.qwik.cjs +18 -12
- package/lib/browser/blocks/img/img.qwik.mjs +18 -12
- package/lib/browser/blocks/section/section.qwik.cjs +6 -7
- package/lib/browser/blocks/section/section.qwik.mjs +7 -8
- package/lib/browser/blocks/slot/slot.qwik.cjs +43 -17
- package/lib/browser/blocks/slot/slot.qwik.mjs +43 -17
- package/lib/browser/blocks/symbol/symbol.helpers.qwik.cjs +1 -2
- package/lib/browser/blocks/symbol/symbol.helpers.qwik.mjs +1 -2
- package/lib/browser/blocks/symbol/symbol.qwik.cjs +137 -45
- package/lib/browser/blocks/symbol/symbol.qwik.mjs +137 -45
- package/lib/browser/blocks/tabs/tabs.qwik.cjs +99 -45
- package/lib/browser/blocks/tabs/tabs.qwik.mjs +99 -45
- package/lib/browser/blocks/text/text.qwik.cjs +15 -11
- package/lib/browser/blocks/text/text.qwik.mjs +15 -11
- package/lib/browser/blocks/video/video.qwik.cjs +87 -73
- package/lib/browser/blocks/video/video.qwik.mjs +88 -74
- package/lib/browser/components/awaiter.qwik.cjs +7 -8
- package/lib/browser/components/awaiter.qwik.mjs +8 -9
- package/lib/browser/components/block/animator.qwik.cjs +11 -22
- package/lib/browser/components/block/animator.qwik.mjs +11 -22
- package/lib/browser/components/block/block.helpers.qwik.cjs +4 -8
- package/lib/browser/components/block/block.helpers.qwik.mjs +4 -8
- package/lib/browser/components/block/block.qwik.cjs +320 -114
- package/lib/browser/components/block/block.qwik.mjs +321 -115
- package/lib/browser/components/block/components/block-styles.qwik.cjs +39 -22
- package/lib/browser/components/block/components/block-styles.qwik.mjs +40 -23
- package/lib/browser/components/block/components/block-wrapper.qwik.cjs +18 -12
- package/lib/browser/components/block/components/block-wrapper.qwik.mjs +18 -12
- package/lib/browser/components/block/components/component-ref/component-ref.qwik.cjs +29 -12
- package/lib/browser/components/block/components/component-ref/component-ref.qwik.mjs +31 -14
- package/lib/browser/components/block/components/interactive-element.qwik.cjs +58 -25
- package/lib/browser/components/block/components/interactive-element.qwik.mjs +59 -26
- package/lib/browser/components/block/components/repeated-block.qwik.cjs +31 -10
- package/lib/browser/components/block/components/repeated-block.qwik.mjs +32 -11
- package/lib/browser/components/blocks/blocks-wrapper.qwik.cjs +73 -25
- package/lib/browser/components/blocks/blocks-wrapper.qwik.mjs +73 -25
- package/lib/browser/components/blocks/blocks.qwik.cjs +84 -20
- package/lib/browser/components/blocks/blocks.qwik.mjs +85 -21
- package/lib/browser/components/content/components/enable-editor.qwik.cjs +175 -90
- package/lib/browser/components/content/components/enable-editor.qwik.mjs +176 -91
- package/lib/browser/components/content/components/styles.helpers.qwik.cjs +6 -12
- package/lib/browser/components/content/components/styles.helpers.qwik.mjs +6 -12
- package/lib/browser/components/content/components/styles.qwik.cjs +20 -8
- package/lib/browser/components/content/components/styles.qwik.mjs +20 -8
- package/lib/browser/components/content/content.helpers.qwik.cjs +1 -2
- package/lib/browser/components/content/content.helpers.qwik.mjs +1 -2
- package/lib/browser/components/content/content.qwik.cjs +213 -51
- package/lib/browser/components/content/content.qwik.mjs +213 -51
- package/lib/browser/components/content-variants/content-variants.qwik.cjs +325 -76
- package/lib/browser/components/content-variants/content-variants.qwik.mjs +326 -77
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.cjs +12 -11
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.mjs +13 -12
- package/lib/browser/components/inlined-script.qwik.cjs +13 -8
- package/lib/browser/components/inlined-script.qwik.mjs +14 -9
- package/lib/browser/components/inlined-styles.qwik.cjs +13 -8
- package/lib/browser/components/inlined-styles.qwik.mjs +14 -9
- package/lib/browser/constants/device-sizes.qwik.cjs +1 -2
- package/lib/browser/constants/device-sizes.qwik.mjs +1 -2
- package/lib/browser/constants/sdk-version.qwik.cjs +1 -1
- package/lib/browser/constants/sdk-version.qwik.mjs +1 -1
- package/lib/browser/functions/evaluate/evaluate.qwik.cjs +2 -4
- package/lib/browser/functions/evaluate/evaluate.qwik.mjs +2 -4
- package/lib/browser/functions/evaluate/helpers.qwik.cjs +3 -6
- package/lib/browser/functions/evaluate/helpers.qwik.mjs +3 -6
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +1 -2
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +1 -2
- package/lib/browser/functions/get-block-actions-handler.qwik.cjs +14 -8
- package/lib/browser/functions/get-block-actions-handler.qwik.mjs +15 -9
- package/lib/browser/functions/get-block-actions.qwik.cjs +2 -4
- package/lib/browser/functions/get-block-actions.qwik.mjs +2 -4
- package/lib/browser/functions/get-builder-search-params/index.qwik.cjs +2 -4
- package/lib/browser/functions/get-builder-search-params/index.qwik.mjs +2 -4
- package/lib/browser/functions/get-content/generate-content-url.qwik.cjs +11 -22
- package/lib/browser/functions/get-content/generate-content-url.qwik.mjs +11 -22
- package/lib/browser/functions/get-content/index.qwik.cjs +2 -4
- package/lib/browser/functions/get-content/index.qwik.mjs +2 -4
- package/lib/browser/functions/get-global-this.qwik.cjs +4 -8
- package/lib/browser/functions/get-global-this.qwik.mjs +4 -8
- package/lib/browser/functions/get-processed-block.qwik.cjs +8 -15
- package/lib/browser/functions/get-processed-block.qwik.mjs +8 -15
- package/lib/browser/functions/is-from-trusted-host.qwik.cjs +1 -2
- package/lib/browser/functions/is-from-trusted-host.qwik.mjs +1 -2
- package/lib/browser/functions/is-previewing.qwik.cjs +1 -2
- package/lib/browser/functions/is-previewing.qwik.mjs +1 -2
- package/lib/browser/functions/register-component.qwik.cjs +1 -2
- package/lib/browser/functions/register-component.qwik.mjs +1 -2
- package/lib/browser/functions/register.qwik.cjs +3 -6
- package/lib/browser/functions/register.qwik.mjs +3 -6
- package/lib/browser/functions/set.qwik.cjs +1 -2
- package/lib/browser/functions/set.qwik.mjs +1 -2
- package/lib/browser/functions/track/helpers.qwik.cjs +1 -2
- package/lib/browser/functions/track/helpers.qwik.mjs +1 -2
- package/lib/browser/functions/track/index.qwik.cjs +4 -8
- package/lib/browser/functions/track/index.qwik.mjs +4 -8
- package/lib/browser/functions/track/interaction.qwik.cjs +3 -6
- package/lib/browser/functions/track/interaction.qwik.mjs +3 -6
- package/lib/browser/helpers/ab-tests.qwik.cjs +8 -15
- package/lib/browser/helpers/ab-tests.qwik.mjs +9 -16
- package/lib/browser/helpers/cookie.qwik.cjs +2 -4
- package/lib/browser/helpers/cookie.qwik.mjs +2 -4
- package/lib/browser/helpers/css.qwik.cjs +4 -6
- package/lib/browser/helpers/css.qwik.mjs +4 -6
- package/lib/browser/helpers/flatten.qwik.cjs +2 -3
- package/lib/browser/helpers/flatten.qwik.mjs +2 -3
- package/lib/browser/helpers/localStorage.qwik.cjs +2 -4
- package/lib/browser/helpers/localStorage.qwik.mjs +2 -4
- package/lib/browser/helpers/omit.qwik.cjs +1 -2
- package/lib/browser/helpers/omit.qwik.mjs +1 -2
- package/lib/browser/helpers/search/search.qwik.cjs +2 -3
- package/lib/browser/helpers/search/search.qwik.mjs +2 -3
- package/lib/browser/helpers/sessionId.qwik.cjs +3 -4
- package/lib/browser/helpers/sessionId.qwik.mjs +3 -4
- package/lib/browser/helpers/subscribe-to-editor.qwik.cjs +5 -10
- package/lib/browser/helpers/subscribe-to-editor.qwik.mjs +5 -10
- package/lib/browser/helpers/url.qwik.cjs +2 -4
- package/lib/browser/helpers/url.qwik.mjs +2 -4
- package/lib/browser/helpers/visitorId.qwik.cjs +3 -4
- package/lib/browser/helpers/visitorId.qwik.mjs +3 -4
- package/lib/browser/scripts/init-editing.qwik.cjs +19 -25
- package/lib/browser/scripts/init-editing.qwik.mjs +19 -25
- package/lib/edge/blocks/accordion/accordion.qwik.cjs +143 -74
- package/lib/edge/blocks/accordion/accordion.qwik.mjs +143 -74
- package/lib/edge/blocks/accordion/component-info.qwik.cjs +1 -2
- package/lib/edge/blocks/accordion/component-info.qwik.mjs +1 -2
- package/lib/edge/blocks/button/button.qwik.cjs +17 -8
- package/lib/edge/blocks/button/button.qwik.mjs +17 -8
- package/lib/edge/blocks/columns/columns.qwik.cjs +119 -66
- package/lib/edge/blocks/columns/columns.qwik.mjs +119 -66
- package/lib/edge/blocks/columns/component-info.qwik.cjs +3 -4
- package/lib/edge/blocks/columns/component-info.qwik.mjs +3 -4
- package/lib/edge/blocks/custom-code/custom-code.qwik.cjs +22 -18
- package/lib/edge/blocks/custom-code/custom-code.qwik.mjs +23 -19
- package/lib/edge/blocks/embed/embed.qwik.cjs +23 -17
- package/lib/edge/blocks/embed/embed.qwik.mjs +23 -17
- package/lib/edge/blocks/form/form/form.qwik.cjs +128 -74
- package/lib/edge/blocks/form/form/form.qwik.mjs +129 -75
- package/lib/edge/blocks/form/input/input.qwik.cjs +2 -2
- package/lib/edge/blocks/form/input/input.qwik.mjs +3 -3
- package/lib/edge/blocks/form/select/select.qwik.cjs +5 -7
- package/lib/edge/blocks/form/select/select.qwik.mjs +6 -8
- package/lib/edge/blocks/form/submit-button/submit-button.qwik.cjs +9 -7
- package/lib/edge/blocks/form/submit-button/submit-button.qwik.mjs +10 -8
- package/lib/edge/blocks/form/textarea/textarea.qwik.cjs +21 -11
- package/lib/edge/blocks/form/textarea/textarea.qwik.mjs +22 -12
- package/lib/edge/blocks/fragment/fragment.qwik.cjs +3 -6
- package/lib/edge/blocks/fragment/fragment.qwik.mjs +4 -7
- package/lib/edge/blocks/image/component-info.qwik.cjs +3 -6
- package/lib/edge/blocks/image/component-info.qwik.mjs +3 -6
- package/lib/edge/blocks/image/image.helpers.qwik.cjs +6 -12
- package/lib/edge/blocks/image/image.helpers.qwik.mjs +6 -12
- package/lib/edge/blocks/image/image.qwik.cjs +89 -63
- package/lib/edge/blocks/image/image.qwik.mjs +89 -63
- package/lib/edge/blocks/img/img.qwik.cjs +18 -12
- package/lib/edge/blocks/img/img.qwik.mjs +18 -12
- package/lib/edge/blocks/section/section.qwik.cjs +6 -7
- package/lib/edge/blocks/section/section.qwik.mjs +7 -8
- package/lib/edge/blocks/slot/slot.qwik.cjs +43 -17
- package/lib/edge/blocks/slot/slot.qwik.mjs +43 -17
- package/lib/edge/blocks/symbol/symbol.helpers.qwik.cjs +1 -2
- package/lib/edge/blocks/symbol/symbol.helpers.qwik.mjs +1 -2
- package/lib/edge/blocks/symbol/symbol.qwik.cjs +137 -45
- package/lib/edge/blocks/symbol/symbol.qwik.mjs +137 -45
- package/lib/edge/blocks/tabs/tabs.qwik.cjs +99 -45
- package/lib/edge/blocks/tabs/tabs.qwik.mjs +99 -45
- package/lib/edge/blocks/text/text.qwik.cjs +15 -11
- package/lib/edge/blocks/text/text.qwik.mjs +15 -11
- package/lib/edge/blocks/video/video.qwik.cjs +87 -73
- package/lib/edge/blocks/video/video.qwik.mjs +88 -74
- package/lib/edge/components/awaiter.qwik.cjs +7 -8
- package/lib/edge/components/awaiter.qwik.mjs +8 -9
- package/lib/edge/components/block/animator.qwik.cjs +11 -22
- package/lib/edge/components/block/animator.qwik.mjs +11 -22
- package/lib/edge/components/block/block.helpers.qwik.cjs +4 -8
- package/lib/edge/components/block/block.helpers.qwik.mjs +4 -8
- package/lib/edge/components/block/block.qwik.cjs +320 -114
- package/lib/edge/components/block/block.qwik.mjs +321 -115
- package/lib/edge/components/block/components/block-styles.qwik.cjs +39 -22
- package/lib/edge/components/block/components/block-styles.qwik.mjs +40 -23
- package/lib/edge/components/block/components/block-wrapper.qwik.cjs +18 -12
- package/lib/edge/components/block/components/block-wrapper.qwik.mjs +18 -12
- package/lib/edge/components/block/components/component-ref/component-ref.qwik.cjs +29 -12
- package/lib/edge/components/block/components/component-ref/component-ref.qwik.mjs +31 -14
- package/lib/edge/components/block/components/interactive-element.qwik.cjs +58 -25
- package/lib/edge/components/block/components/interactive-element.qwik.mjs +59 -26
- package/lib/edge/components/block/components/repeated-block.qwik.cjs +31 -10
- package/lib/edge/components/block/components/repeated-block.qwik.mjs +32 -11
- package/lib/edge/components/blocks/blocks-wrapper.qwik.cjs +73 -25
- package/lib/edge/components/blocks/blocks-wrapper.qwik.mjs +73 -25
- package/lib/edge/components/blocks/blocks.qwik.cjs +84 -20
- package/lib/edge/components/blocks/blocks.qwik.mjs +85 -21
- package/lib/edge/components/content/components/enable-editor.qwik.cjs +175 -90
- package/lib/edge/components/content/components/enable-editor.qwik.mjs +176 -91
- package/lib/edge/components/content/components/styles.helpers.qwik.cjs +6 -12
- package/lib/edge/components/content/components/styles.helpers.qwik.mjs +6 -12
- package/lib/edge/components/content/components/styles.qwik.cjs +20 -8
- package/lib/edge/components/content/components/styles.qwik.mjs +20 -8
- package/lib/edge/components/content/content.helpers.qwik.cjs +1 -2
- package/lib/edge/components/content/content.helpers.qwik.mjs +1 -2
- package/lib/edge/components/content/content.qwik.cjs +213 -51
- package/lib/edge/components/content/content.qwik.mjs +213 -51
- package/lib/edge/components/content-variants/content-variants.qwik.cjs +325 -76
- package/lib/edge/components/content-variants/content-variants.qwik.mjs +326 -77
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.cjs +12 -11
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.mjs +13 -12
- package/lib/edge/components/inlined-script.qwik.cjs +13 -8
- package/lib/edge/components/inlined-script.qwik.mjs +14 -9
- package/lib/edge/components/inlined-styles.qwik.cjs +13 -8
- package/lib/edge/components/inlined-styles.qwik.mjs +14 -9
- package/lib/edge/constants/device-sizes.qwik.cjs +1 -2
- package/lib/edge/constants/device-sizes.qwik.mjs +1 -2
- package/lib/edge/constants/sdk-version.qwik.cjs +1 -1
- package/lib/edge/constants/sdk-version.qwik.mjs +1 -1
- package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.cjs +7 -6
- package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.mjs +7 -6
- package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.qwik.cjs +11 -20
- package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.qwik.mjs +11 -20
- package/lib/edge/functions/evaluate/evaluate.qwik.cjs +2 -4
- package/lib/edge/functions/evaluate/evaluate.qwik.mjs +2 -4
- package/lib/edge/functions/evaluate/helpers.qwik.cjs +3 -6
- package/lib/edge/functions/evaluate/helpers.qwik.mjs +3 -6
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +1 -2
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +1 -2
- package/lib/edge/functions/get-block-actions-handler.qwik.cjs +14 -8
- package/lib/edge/functions/get-block-actions-handler.qwik.mjs +15 -9
- package/lib/edge/functions/get-block-actions.qwik.cjs +2 -4
- package/lib/edge/functions/get-block-actions.qwik.mjs +2 -4
- package/lib/edge/functions/get-builder-search-params/index.qwik.cjs +2 -4
- package/lib/edge/functions/get-builder-search-params/index.qwik.mjs +2 -4
- package/lib/edge/functions/get-content/generate-content-url.qwik.cjs +11 -22
- package/lib/edge/functions/get-content/generate-content-url.qwik.mjs +11 -22
- package/lib/edge/functions/get-content/index.qwik.cjs +2 -4
- package/lib/edge/functions/get-content/index.qwik.mjs +2 -4
- package/lib/edge/functions/get-global-this.qwik.cjs +4 -8
- package/lib/edge/functions/get-global-this.qwik.mjs +4 -8
- package/lib/edge/functions/get-processed-block.qwik.cjs +8 -15
- package/lib/edge/functions/get-processed-block.qwik.mjs +8 -15
- package/lib/edge/functions/is-from-trusted-host.qwik.cjs +1 -2
- package/lib/edge/functions/is-from-trusted-host.qwik.mjs +1 -2
- package/lib/edge/functions/is-previewing.qwik.cjs +1 -2
- package/lib/edge/functions/is-previewing.qwik.mjs +1 -2
- package/lib/edge/functions/register-component.qwik.cjs +1 -2
- package/lib/edge/functions/register-component.qwik.mjs +1 -2
- package/lib/edge/functions/register.qwik.cjs +3 -6
- package/lib/edge/functions/register.qwik.mjs +3 -6
- package/lib/edge/functions/set.qwik.cjs +1 -2
- package/lib/edge/functions/set.qwik.mjs +1 -2
- package/lib/edge/functions/track/helpers.qwik.cjs +1 -2
- package/lib/edge/functions/track/helpers.qwik.mjs +1 -2
- package/lib/edge/functions/track/index.qwik.cjs +4 -8
- package/lib/edge/functions/track/index.qwik.mjs +4 -8
- package/lib/edge/functions/track/interaction.qwik.cjs +3 -6
- package/lib/edge/functions/track/interaction.qwik.mjs +3 -6
- package/lib/edge/helpers/ab-tests.qwik.cjs +8 -15
- package/lib/edge/helpers/ab-tests.qwik.mjs +9 -16
- package/lib/edge/helpers/cookie.qwik.cjs +2 -4
- package/lib/edge/helpers/cookie.qwik.mjs +2 -4
- package/lib/edge/helpers/css.qwik.cjs +4 -6
- package/lib/edge/helpers/css.qwik.mjs +4 -6
- package/lib/edge/helpers/flatten.qwik.cjs +2 -3
- package/lib/edge/helpers/flatten.qwik.mjs +2 -3
- package/lib/edge/helpers/localStorage.qwik.cjs +2 -4
- package/lib/edge/helpers/localStorage.qwik.mjs +2 -4
- package/lib/edge/helpers/omit.qwik.cjs +1 -2
- package/lib/edge/helpers/omit.qwik.mjs +1 -2
- package/lib/edge/helpers/search/search.qwik.cjs +2 -3
- package/lib/edge/helpers/search/search.qwik.mjs +2 -3
- package/lib/edge/helpers/sessionId.qwik.cjs +3 -4
- package/lib/edge/helpers/sessionId.qwik.mjs +3 -4
- package/lib/edge/helpers/subscribe-to-editor.qwik.cjs +5 -10
- package/lib/edge/helpers/subscribe-to-editor.qwik.mjs +5 -10
- package/lib/edge/helpers/url.qwik.cjs +2 -4
- package/lib/edge/helpers/url.qwik.mjs +2 -4
- package/lib/edge/helpers/visitorId.qwik.cjs +3 -4
- package/lib/edge/helpers/visitorId.qwik.mjs +3 -4
- package/lib/edge/scripts/init-editing.qwik.cjs +19 -25
- package/lib/edge/scripts/init-editing.qwik.mjs +19 -25
- package/lib/node/blocks/accordion/accordion.qwik.cjs +143 -74
- package/lib/node/blocks/accordion/accordion.qwik.mjs +143 -74
- package/lib/node/blocks/accordion/component-info.qwik.cjs +1 -2
- package/lib/node/blocks/accordion/component-info.qwik.mjs +1 -2
- package/lib/node/blocks/button/button.qwik.cjs +17 -8
- package/lib/node/blocks/button/button.qwik.mjs +17 -8
- package/lib/node/blocks/columns/columns.qwik.cjs +119 -66
- package/lib/node/blocks/columns/columns.qwik.mjs +119 -66
- package/lib/node/blocks/columns/component-info.qwik.cjs +3 -4
- package/lib/node/blocks/columns/component-info.qwik.mjs +3 -4
- package/lib/node/blocks/custom-code/custom-code.qwik.cjs +22 -18
- package/lib/node/blocks/custom-code/custom-code.qwik.mjs +23 -19
- package/lib/node/blocks/embed/embed.qwik.cjs +23 -17
- package/lib/node/blocks/embed/embed.qwik.mjs +23 -17
- package/lib/node/blocks/form/form/form.qwik.cjs +128 -74
- package/lib/node/blocks/form/form/form.qwik.mjs +129 -75
- package/lib/node/blocks/form/input/input.qwik.cjs +2 -2
- package/lib/node/blocks/form/input/input.qwik.mjs +3 -3
- package/lib/node/blocks/form/select/select.qwik.cjs +5 -7
- package/lib/node/blocks/form/select/select.qwik.mjs +6 -8
- package/lib/node/blocks/form/submit-button/submit-button.qwik.cjs +9 -7
- package/lib/node/blocks/form/submit-button/submit-button.qwik.mjs +10 -8
- package/lib/node/blocks/form/textarea/textarea.qwik.cjs +21 -11
- package/lib/node/blocks/form/textarea/textarea.qwik.mjs +22 -12
- package/lib/node/blocks/fragment/fragment.qwik.cjs +3 -6
- package/lib/node/blocks/fragment/fragment.qwik.mjs +4 -7
- package/lib/node/blocks/image/component-info.qwik.cjs +3 -6
- package/lib/node/blocks/image/component-info.qwik.mjs +3 -6
- package/lib/node/blocks/image/image.helpers.qwik.cjs +6 -12
- package/lib/node/blocks/image/image.helpers.qwik.mjs +6 -12
- package/lib/node/blocks/image/image.qwik.cjs +89 -63
- package/lib/node/blocks/image/image.qwik.mjs +89 -63
- package/lib/node/blocks/img/img.qwik.cjs +18 -12
- package/lib/node/blocks/img/img.qwik.mjs +18 -12
- package/lib/node/blocks/section/section.qwik.cjs +6 -7
- package/lib/node/blocks/section/section.qwik.mjs +7 -8
- package/lib/node/blocks/slot/slot.qwik.cjs +43 -17
- package/lib/node/blocks/slot/slot.qwik.mjs +43 -17
- package/lib/node/blocks/symbol/symbol.helpers.qwik.cjs +1 -2
- package/lib/node/blocks/symbol/symbol.helpers.qwik.mjs +1 -2
- package/lib/node/blocks/symbol/symbol.qwik.cjs +137 -45
- package/lib/node/blocks/symbol/symbol.qwik.mjs +137 -45
- package/lib/node/blocks/tabs/tabs.qwik.cjs +99 -45
- package/lib/node/blocks/tabs/tabs.qwik.mjs +99 -45
- package/lib/node/blocks/text/text.qwik.cjs +15 -11
- package/lib/node/blocks/text/text.qwik.mjs +15 -11
- package/lib/node/blocks/video/video.qwik.cjs +87 -73
- package/lib/node/blocks/video/video.qwik.mjs +88 -74
- package/lib/node/components/awaiter.qwik.cjs +7 -8
- package/lib/node/components/awaiter.qwik.mjs +8 -9
- package/lib/node/components/block/animator.qwik.cjs +11 -22
- package/lib/node/components/block/animator.qwik.mjs +11 -22
- package/lib/node/components/block/block.helpers.qwik.cjs +4 -8
- package/lib/node/components/block/block.helpers.qwik.mjs +4 -8
- package/lib/node/components/block/block.qwik.cjs +320 -114
- package/lib/node/components/block/block.qwik.mjs +321 -115
- package/lib/node/components/block/components/block-styles.qwik.cjs +39 -22
- package/lib/node/components/block/components/block-styles.qwik.mjs +40 -23
- package/lib/node/components/block/components/block-wrapper.qwik.cjs +18 -12
- package/lib/node/components/block/components/block-wrapper.qwik.mjs +18 -12
- package/lib/node/components/block/components/component-ref/component-ref.qwik.cjs +29 -12
- package/lib/node/components/block/components/component-ref/component-ref.qwik.mjs +31 -14
- package/lib/node/components/block/components/interactive-element.qwik.cjs +58 -25
- package/lib/node/components/block/components/interactive-element.qwik.mjs +59 -26
- package/lib/node/components/block/components/repeated-block.qwik.cjs +31 -10
- package/lib/node/components/block/components/repeated-block.qwik.mjs +32 -11
- package/lib/node/components/blocks/blocks-wrapper.qwik.cjs +73 -25
- package/lib/node/components/blocks/blocks-wrapper.qwik.mjs +73 -25
- package/lib/node/components/blocks/blocks.qwik.cjs +84 -20
- package/lib/node/components/blocks/blocks.qwik.mjs +85 -21
- package/lib/node/components/content/components/enable-editor.qwik.cjs +175 -90
- package/lib/node/components/content/components/enable-editor.qwik.mjs +176 -91
- package/lib/node/components/content/components/styles.helpers.qwik.cjs +6 -12
- package/lib/node/components/content/components/styles.helpers.qwik.mjs +6 -12
- package/lib/node/components/content/components/styles.qwik.cjs +20 -8
- package/lib/node/components/content/components/styles.qwik.mjs +20 -8
- package/lib/node/components/content/content.helpers.qwik.cjs +1 -2
- package/lib/node/components/content/content.helpers.qwik.mjs +1 -2
- package/lib/node/components/content/content.qwik.cjs +213 -51
- package/lib/node/components/content/content.qwik.mjs +213 -51
- package/lib/node/components/content-variants/content-variants.qwik.cjs +325 -76
- package/lib/node/components/content-variants/content-variants.qwik.mjs +326 -77
- package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.cjs +12 -11
- package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.mjs +13 -12
- package/lib/node/components/inlined-script.qwik.cjs +13 -8
- package/lib/node/components/inlined-script.qwik.mjs +14 -9
- package/lib/node/components/inlined-styles.qwik.cjs +13 -8
- package/lib/node/components/inlined-styles.qwik.mjs +14 -9
- package/lib/node/constants/device-sizes.qwik.cjs +1 -2
- package/lib/node/constants/device-sizes.qwik.mjs +1 -2
- package/lib/node/constants/sdk-version.qwik.cjs +1 -1
- package/lib/node/constants/sdk-version.qwik.mjs +1 -1
- package/lib/node/functions/evaluate/evaluate.qwik.cjs +2 -4
- package/lib/node/functions/evaluate/evaluate.qwik.mjs +2 -4
- package/lib/node/functions/evaluate/helpers.qwik.cjs +3 -6
- package/lib/node/functions/evaluate/helpers.qwik.mjs +3 -6
- package/lib/node/functions/evaluate/node-runtime/init.qwik.cjs +1 -2
- package/lib/node/functions/evaluate/node-runtime/init.qwik.mjs +1 -2
- package/lib/node/functions/evaluate/node-runtime/node-runtime.qwik.cjs +5 -4
- package/lib/node/functions/evaluate/node-runtime/node-runtime.qwik.mjs +5 -4
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +1 -2
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +1 -2
- package/lib/node/functions/get-block-actions-handler.qwik.cjs +14 -8
- package/lib/node/functions/get-block-actions-handler.qwik.mjs +15 -9
- package/lib/node/functions/get-block-actions.qwik.cjs +2 -4
- package/lib/node/functions/get-block-actions.qwik.mjs +2 -4
- package/lib/node/functions/get-builder-search-params/index.qwik.cjs +2 -4
- package/lib/node/functions/get-builder-search-params/index.qwik.mjs +2 -4
- package/lib/node/functions/get-content/generate-content-url.qwik.cjs +11 -22
- package/lib/node/functions/get-content/generate-content-url.qwik.mjs +11 -22
- package/lib/node/functions/get-content/index.qwik.cjs +2 -4
- package/lib/node/functions/get-content/index.qwik.mjs +2 -4
- package/lib/node/functions/get-global-this.qwik.cjs +4 -8
- package/lib/node/functions/get-global-this.qwik.mjs +4 -8
- package/lib/node/functions/get-processed-block.qwik.cjs +8 -15
- package/lib/node/functions/get-processed-block.qwik.mjs +8 -15
- package/lib/node/functions/is-from-trusted-host.qwik.cjs +1 -2
- package/lib/node/functions/is-from-trusted-host.qwik.mjs +1 -2
- package/lib/node/functions/is-previewing.qwik.cjs +1 -2
- package/lib/node/functions/is-previewing.qwik.mjs +1 -2
- package/lib/node/functions/register-component.qwik.cjs +1 -2
- package/lib/node/functions/register-component.qwik.mjs +1 -2
- package/lib/node/functions/register.qwik.cjs +3 -6
- package/lib/node/functions/register.qwik.mjs +3 -6
- package/lib/node/functions/set.qwik.cjs +1 -2
- package/lib/node/functions/set.qwik.mjs +1 -2
- package/lib/node/functions/track/helpers.qwik.cjs +1 -2
- package/lib/node/functions/track/helpers.qwik.mjs +1 -2
- package/lib/node/functions/track/index.qwik.cjs +4 -8
- package/lib/node/functions/track/index.qwik.mjs +4 -8
- package/lib/node/functions/track/interaction.qwik.cjs +3 -6
- package/lib/node/functions/track/interaction.qwik.mjs +3 -6
- package/lib/node/helpers/ab-tests.qwik.cjs +8 -15
- package/lib/node/helpers/ab-tests.qwik.mjs +9 -16
- package/lib/node/helpers/cookie.qwik.cjs +2 -4
- package/lib/node/helpers/cookie.qwik.mjs +2 -4
- package/lib/node/helpers/css.qwik.cjs +4 -6
- package/lib/node/helpers/css.qwik.mjs +4 -6
- package/lib/node/helpers/flatten.qwik.cjs +2 -3
- package/lib/node/helpers/flatten.qwik.mjs +2 -3
- package/lib/node/helpers/localStorage.qwik.cjs +2 -4
- package/lib/node/helpers/localStorage.qwik.mjs +2 -4
- package/lib/node/helpers/omit.qwik.cjs +1 -2
- package/lib/node/helpers/omit.qwik.mjs +1 -2
- package/lib/node/helpers/search/search.qwik.cjs +2 -3
- package/lib/node/helpers/search/search.qwik.mjs +2 -3
- package/lib/node/helpers/sessionId.qwik.cjs +3 -4
- package/lib/node/helpers/sessionId.qwik.mjs +3 -4
- package/lib/node/helpers/subscribe-to-editor.qwik.cjs +5 -10
- package/lib/node/helpers/subscribe-to-editor.qwik.mjs +5 -10
- package/lib/node/helpers/url.qwik.cjs +2 -4
- package/lib/node/helpers/url.qwik.mjs +2 -4
- package/lib/node/helpers/visitorId.qwik.cjs +3 -4
- package/lib/node/helpers/visitorId.qwik.mjs +3 -4
- package/lib/node/scripts/init-editing.qwik.cjs +19 -25
- package/lib/node/scripts/init-editing.qwik.mjs +19 -25
- package/package.json +2 -2
- package/types/src/blocks/columns/columns.d.ts +10 -10
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/evaluate/node-runtime/setIvm.d.ts +1 -0
|
@@ -5,14 +5,12 @@ import { getBuilderSearchParamsFromWindow } from "../get-builder-search-params/i
|
|
|
5
5
|
const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
|
|
6
6
|
const generateContentUrl = (options) => {
|
|
7
7
|
const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished, apiHost } = options;
|
|
8
|
-
if (!apiKey)
|
|
8
|
+
if (!apiKey)
|
|
9
9
|
throw new Error("Missing API key");
|
|
10
|
-
}
|
|
11
10
|
if (![
|
|
12
11
|
"v3"
|
|
13
|
-
].includes(apiVersion))
|
|
12
|
+
].includes(apiVersion))
|
|
14
13
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${apiVersion}'`);
|
|
15
|
-
}
|
|
16
14
|
const noTraverse = limit !== 1;
|
|
17
15
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
18
16
|
const url = new URL(`${baseUrl}/api/${apiVersion}/content/${model}`);
|
|
@@ -25,47 +23,38 @@ const generateContentUrl = (options) => {
|
|
|
25
23
|
if (enrich)
|
|
26
24
|
url.searchParams.set("enrich", String(enrich));
|
|
27
25
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
28
|
-
if (fields)
|
|
26
|
+
if (fields)
|
|
29
27
|
url.searchParams.set("fields", fields);
|
|
30
|
-
|
|
31
|
-
if (Number.isFinite(offset) && offset > -1) {
|
|
28
|
+
if (Number.isFinite(offset) && offset > -1)
|
|
32
29
|
url.searchParams.set("offset", String(Math.floor(offset)));
|
|
33
|
-
|
|
34
|
-
if (typeof includeUnpublished === "boolean") {
|
|
30
|
+
if (typeof includeUnpublished === "boolean")
|
|
35
31
|
url.searchParams.set("includeUnpublished", String(includeUnpublished));
|
|
36
|
-
|
|
37
|
-
if (cacheSeconds && isPositiveNumber(cacheSeconds)) {
|
|
32
|
+
if (cacheSeconds && isPositiveNumber(cacheSeconds))
|
|
38
33
|
url.searchParams.set("cacheSeconds", String(cacheSeconds));
|
|
39
|
-
|
|
40
|
-
if (staleCacheSeconds && isPositiveNumber(staleCacheSeconds)) {
|
|
34
|
+
if (staleCacheSeconds && isPositiveNumber(staleCacheSeconds))
|
|
41
35
|
url.searchParams.set("staleCacheSeconds", String(staleCacheSeconds));
|
|
42
|
-
}
|
|
43
36
|
if (sort) {
|
|
44
37
|
const flattened2 = flatten({
|
|
45
38
|
sort
|
|
46
39
|
});
|
|
47
|
-
for (const key in flattened2)
|
|
40
|
+
for (const key in flattened2)
|
|
48
41
|
url.searchParams.set(key, JSON.stringify(flattened2[key]));
|
|
49
|
-
}
|
|
50
42
|
}
|
|
51
43
|
const queryOptions = {
|
|
52
44
|
...getBuilderSearchParamsFromWindow(),
|
|
53
45
|
...normalizeSearchParams(options.options || {})
|
|
54
46
|
};
|
|
55
47
|
const flattened = flatten(queryOptions);
|
|
56
|
-
for (const key in flattened)
|
|
48
|
+
for (const key in flattened)
|
|
57
49
|
url.searchParams.set(key, String(flattened[key]));
|
|
58
|
-
|
|
59
|
-
if (userAttributes) {
|
|
50
|
+
if (userAttributes)
|
|
60
51
|
url.searchParams.set("userAttributes", JSON.stringify(userAttributes));
|
|
61
|
-
}
|
|
62
52
|
if (query) {
|
|
63
53
|
const flattened2 = flattenMongoQuery({
|
|
64
54
|
query
|
|
65
55
|
});
|
|
66
|
-
for (const key in flattened2)
|
|
56
|
+
for (const key in flattened2)
|
|
67
57
|
url.searchParams.set(key, JSON.stringify(flattened2[key]));
|
|
68
|
-
}
|
|
69
58
|
}
|
|
70
59
|
return url;
|
|
71
60
|
};
|
|
@@ -14,9 +14,8 @@ async function fetchOneEntry(options) {
|
|
|
14
14
|
...options,
|
|
15
15
|
limit: 1
|
|
16
16
|
});
|
|
17
|
-
if (allContent)
|
|
17
|
+
if (allContent)
|
|
18
18
|
return allContent[0] || null;
|
|
19
|
-
}
|
|
20
19
|
return null;
|
|
21
20
|
}
|
|
22
21
|
const _fetchContent = async (options) => {
|
|
@@ -43,12 +42,11 @@ const _processContentResult = async (options, content, url = generateContentUrl.
|
|
|
43
42
|
return content.results;
|
|
44
43
|
try {
|
|
45
44
|
const newResults = [];
|
|
46
|
-
for (const item of content.results)
|
|
45
|
+
for (const item of content.results)
|
|
47
46
|
newResults.push(await abTests.handleABTesting({
|
|
48
47
|
item,
|
|
49
48
|
canTrack: canTrack$1
|
|
50
49
|
}));
|
|
51
|
-
}
|
|
52
50
|
content.results = newResults;
|
|
53
51
|
} catch (e) {
|
|
54
52
|
logger.logger.error("Could not process A/B tests. ", e);
|
|
@@ -12,9 +12,8 @@ async function fetchOneEntry(options) {
|
|
|
12
12
|
...options,
|
|
13
13
|
limit: 1
|
|
14
14
|
});
|
|
15
|
-
if (allContent)
|
|
15
|
+
if (allContent)
|
|
16
16
|
return allContent[0] || null;
|
|
17
|
-
}
|
|
18
17
|
return null;
|
|
19
18
|
}
|
|
20
19
|
const _fetchContent = async (options) => {
|
|
@@ -41,12 +40,11 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
41
40
|
return content.results;
|
|
42
41
|
try {
|
|
43
42
|
const newResults = [];
|
|
44
|
-
for (const item of content.results)
|
|
43
|
+
for (const item of content.results)
|
|
45
44
|
newResults.push(await handleABTesting({
|
|
46
45
|
item,
|
|
47
46
|
canTrack
|
|
48
47
|
}));
|
|
49
|
-
}
|
|
50
48
|
content.results = newResults;
|
|
51
49
|
} catch (e) {
|
|
52
50
|
logger.error("Could not process A/B tests. ", e);
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
function getGlobalThis() {
|
|
4
|
-
if (typeof globalThis !== "undefined")
|
|
4
|
+
if (typeof globalThis !== "undefined")
|
|
5
5
|
return globalThis;
|
|
6
|
-
|
|
7
|
-
if (typeof window !== "undefined") {
|
|
6
|
+
if (typeof window !== "undefined")
|
|
8
7
|
return window;
|
|
9
|
-
|
|
10
|
-
if (typeof global !== "undefined") {
|
|
8
|
+
if (typeof global !== "undefined")
|
|
11
9
|
return global;
|
|
12
|
-
|
|
13
|
-
if (typeof self !== "undefined") {
|
|
10
|
+
if (typeof self !== "undefined")
|
|
14
11
|
return self;
|
|
15
|
-
}
|
|
16
12
|
return globalThis;
|
|
17
13
|
}
|
|
18
14
|
exports.getGlobalThis = getGlobalThis;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
function getGlobalThis() {
|
|
2
|
-
if (typeof globalThis !== "undefined")
|
|
2
|
+
if (typeof globalThis !== "undefined")
|
|
3
3
|
return globalThis;
|
|
4
|
-
|
|
5
|
-
if (typeof window !== "undefined") {
|
|
4
|
+
if (typeof window !== "undefined")
|
|
6
5
|
return window;
|
|
7
|
-
|
|
8
|
-
if (typeof global !== "undefined") {
|
|
6
|
+
if (typeof global !== "undefined")
|
|
9
7
|
return global;
|
|
10
|
-
|
|
11
|
-
if (typeof self !== "undefined") {
|
|
8
|
+
if (typeof self !== "undefined")
|
|
12
9
|
return self;
|
|
13
|
-
}
|
|
14
10
|
return globalThis;
|
|
15
11
|
}
|
|
16
12
|
export {
|
|
@@ -7,21 +7,16 @@ const fastClone = require("./fast-clone.qwik.cjs");
|
|
|
7
7
|
const set = require("./set.qwik.cjs");
|
|
8
8
|
const transformBlock = require("./transform-block.qwik.cjs");
|
|
9
9
|
function deepCloneWithConditions(obj) {
|
|
10
|
-
if (obj === null || typeof obj !== "object")
|
|
10
|
+
if (obj === null || typeof obj !== "object")
|
|
11
11
|
return obj;
|
|
12
|
-
|
|
13
|
-
if (Array.isArray(obj)) {
|
|
12
|
+
if (Array.isArray(obj))
|
|
14
13
|
return obj.map((item) => deepCloneWithConditions(item));
|
|
15
|
-
|
|
16
|
-
if (obj["@type"] === "@builder.io/sdk:Element") {
|
|
14
|
+
if (obj["@type"] === "@builder.io/sdk:Element")
|
|
17
15
|
return obj;
|
|
18
|
-
}
|
|
19
16
|
const clonedObj = {};
|
|
20
|
-
for (const key in obj)
|
|
21
|
-
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key))
|
|
17
|
+
for (const key in obj)
|
|
18
|
+
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key))
|
|
22
19
|
clonedObj[key] = deepCloneWithConditions(obj[key]);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
20
|
return clonedObj;
|
|
26
21
|
}
|
|
27
22
|
const IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK = [
|
|
@@ -60,9 +55,8 @@ const getCopy = (block) => {
|
|
|
60
55
|
}
|
|
61
56
|
};
|
|
62
57
|
const evaluateBindings = ({ block, context, localState, rootState, rootSetState }) => {
|
|
63
|
-
if (!block.bindings)
|
|
58
|
+
if (!block.bindings)
|
|
64
59
|
return block;
|
|
65
|
-
}
|
|
66
60
|
const copied = getCopy(block);
|
|
67
61
|
for (const binding in block.bindings) {
|
|
68
62
|
const expression = block.bindings[binding];
|
|
@@ -79,7 +73,7 @@ const evaluateBindings = ({ block, context, localState, rootState, rootSetState
|
|
|
79
73
|
};
|
|
80
74
|
function getProcessedBlock({ block, context, shouldEvaluateBindings, localState, rootState, rootSetState }) {
|
|
81
75
|
const transformedBlock = transformBlock.transformBlock(block);
|
|
82
|
-
if (shouldEvaluateBindings)
|
|
76
|
+
if (shouldEvaluateBindings)
|
|
83
77
|
return evaluateBindings({
|
|
84
78
|
block: transformedBlock,
|
|
85
79
|
localState,
|
|
@@ -87,9 +81,8 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
87
81
|
rootSetState,
|
|
88
82
|
context
|
|
89
83
|
});
|
|
90
|
-
|
|
84
|
+
else
|
|
91
85
|
return transformedBlock;
|
|
92
|
-
}
|
|
93
86
|
}
|
|
94
87
|
exports.deepCloneWithConditions = deepCloneWithConditions;
|
|
95
88
|
exports.getProcessedBlock = getProcessedBlock;
|
|
@@ -5,21 +5,16 @@ import { fastClone } from "./fast-clone.qwik.mjs";
|
|
|
5
5
|
import { set } from "./set.qwik.mjs";
|
|
6
6
|
import { transformBlock } from "./transform-block.qwik.mjs";
|
|
7
7
|
function deepCloneWithConditions(obj) {
|
|
8
|
-
if (obj === null || typeof obj !== "object")
|
|
8
|
+
if (obj === null || typeof obj !== "object")
|
|
9
9
|
return obj;
|
|
10
|
-
|
|
11
|
-
if (Array.isArray(obj)) {
|
|
10
|
+
if (Array.isArray(obj))
|
|
12
11
|
return obj.map((item) => deepCloneWithConditions(item));
|
|
13
|
-
|
|
14
|
-
if (obj["@type"] === "@builder.io/sdk:Element") {
|
|
12
|
+
if (obj["@type"] === "@builder.io/sdk:Element")
|
|
15
13
|
return obj;
|
|
16
|
-
}
|
|
17
14
|
const clonedObj = {};
|
|
18
|
-
for (const key in obj)
|
|
19
|
-
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key))
|
|
15
|
+
for (const key in obj)
|
|
16
|
+
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key))
|
|
20
17
|
clonedObj[key] = deepCloneWithConditions(obj[key]);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
18
|
return clonedObj;
|
|
24
19
|
}
|
|
25
20
|
const IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK = [
|
|
@@ -58,9 +53,8 @@ const getCopy = (block) => {
|
|
|
58
53
|
}
|
|
59
54
|
};
|
|
60
55
|
const evaluateBindings = ({ block, context, localState, rootState, rootSetState }) => {
|
|
61
|
-
if (!block.bindings)
|
|
56
|
+
if (!block.bindings)
|
|
62
57
|
return block;
|
|
63
|
-
}
|
|
64
58
|
const copied = getCopy(block);
|
|
65
59
|
for (const binding in block.bindings) {
|
|
66
60
|
const expression = block.bindings[binding];
|
|
@@ -77,7 +71,7 @@ const evaluateBindings = ({ block, context, localState, rootState, rootSetState
|
|
|
77
71
|
};
|
|
78
72
|
function getProcessedBlock({ block, context, shouldEvaluateBindings, localState, rootState, rootSetState }) {
|
|
79
73
|
const transformedBlock = transformBlock(block);
|
|
80
|
-
if (shouldEvaluateBindings)
|
|
74
|
+
if (shouldEvaluateBindings)
|
|
81
75
|
return evaluateBindings({
|
|
82
76
|
block: transformedBlock,
|
|
83
77
|
localState,
|
|
@@ -85,9 +79,8 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
85
79
|
rootSetState,
|
|
86
80
|
context
|
|
87
81
|
});
|
|
88
|
-
|
|
82
|
+
else
|
|
89
83
|
return transformedBlock;
|
|
90
|
-
}
|
|
91
84
|
}
|
|
92
85
|
export {
|
|
93
86
|
deepCloneWithConditions,
|
|
@@ -8,9 +8,8 @@ const DEFAULT_TRUSTED_HOSTS = [
|
|
|
8
8
|
"qa.builder.io"
|
|
9
9
|
];
|
|
10
10
|
function isFromTrustedHost(trustedHosts, e) {
|
|
11
|
-
if (!e.origin.startsWith("http") && !e.origin.startsWith("https"))
|
|
11
|
+
if (!e.origin.startsWith("http") && !e.origin.startsWith("https"))
|
|
12
12
|
return false;
|
|
13
|
-
}
|
|
14
13
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
15
14
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
16
15
|
}
|
|
@@ -6,9 +6,8 @@ const DEFAULT_TRUSTED_HOSTS = [
|
|
|
6
6
|
"qa.builder.io"
|
|
7
7
|
];
|
|
8
8
|
function isFromTrustedHost(trustedHosts, e) {
|
|
9
|
-
if (!e.origin.startsWith("http") && !e.origin.startsWith("https"))
|
|
9
|
+
if (!e.origin.startsWith("http") && !e.origin.startsWith("https"))
|
|
10
10
|
return false;
|
|
11
|
-
}
|
|
12
11
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
13
12
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
14
13
|
}
|
|
@@ -4,9 +4,8 @@ const search = require("../helpers/search/search.qwik.cjs");
|
|
|
4
4
|
const isBrowser = require("./is-browser.qwik.cjs");
|
|
5
5
|
function isPreviewing(_search) {
|
|
6
6
|
const search$1 = _search || (isBrowser.isBrowser() ? window.location.search : void 0);
|
|
7
|
-
if (!search$1)
|
|
7
|
+
if (!search$1)
|
|
8
8
|
return false;
|
|
9
|
-
}
|
|
10
9
|
const normalizedSearch = search.getSearchString(search$1);
|
|
11
10
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
12
11
|
}
|
|
@@ -2,9 +2,8 @@ import { getSearchString } from "../helpers/search/search.qwik.mjs";
|
|
|
2
2
|
import { isBrowser } from "./is-browser.qwik.mjs";
|
|
3
3
|
function isPreviewing(_search) {
|
|
4
4
|
const search = _search || (isBrowser() ? window.location.search : void 0);
|
|
5
|
-
if (!search)
|
|
5
|
+
if (!search)
|
|
6
6
|
return false;
|
|
7
|
-
}
|
|
8
7
|
const normalizedSearch = getSearchString(search);
|
|
9
8
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
10
9
|
}
|
|
@@ -11,9 +11,8 @@ const serializeFn = (fnValue) => {
|
|
|
11
11
|
};
|
|
12
12
|
function serializeIncludingFunctions(info) {
|
|
13
13
|
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
14
|
-
if (typeof value === "function")
|
|
14
|
+
if (typeof value === "function")
|
|
15
15
|
return serializeFn(value);
|
|
16
|
-
}
|
|
17
16
|
return value;
|
|
18
17
|
}));
|
|
19
18
|
}
|
|
@@ -9,9 +9,8 @@ const serializeFn = (fnValue) => {
|
|
|
9
9
|
};
|
|
10
10
|
function serializeIncludingFunctions(info) {
|
|
11
11
|
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
12
|
-
if (typeof value === "function")
|
|
12
|
+
if (typeof value === "function")
|
|
13
13
|
return serializeFn(value);
|
|
14
|
-
}
|
|
15
14
|
return value;
|
|
16
15
|
}));
|
|
17
16
|
}
|
|
@@ -4,13 +4,11 @@ const isBrowser = require("./is-browser.qwik.cjs");
|
|
|
4
4
|
const registerComponent = require("./register-component.qwik.cjs");
|
|
5
5
|
const registry = {};
|
|
6
6
|
function register(type, info) {
|
|
7
|
-
if (type === "plugin")
|
|
7
|
+
if (type === "plugin")
|
|
8
8
|
info = registerComponent.serializeIncludingFunctions(info);
|
|
9
|
-
}
|
|
10
9
|
let typeList = registry[type];
|
|
11
|
-
if (!typeList)
|
|
10
|
+
if (!typeList)
|
|
12
11
|
typeList = registry[type] = [];
|
|
13
|
-
}
|
|
14
12
|
typeList.push(info);
|
|
15
13
|
if (isBrowser.isBrowser()) {
|
|
16
14
|
const message = {
|
|
@@ -22,9 +20,8 @@ function register(type, info) {
|
|
|
22
20
|
};
|
|
23
21
|
try {
|
|
24
22
|
parent.postMessage(message, "*");
|
|
25
|
-
if (parent !== window)
|
|
23
|
+
if (parent !== window)
|
|
26
24
|
window.postMessage(message, "*");
|
|
27
|
-
}
|
|
28
25
|
} catch (err) {
|
|
29
26
|
console.debug("Could not postmessage", err);
|
|
30
27
|
}
|
|
@@ -2,13 +2,11 @@ import { isBrowser } from "./is-browser.qwik.mjs";
|
|
|
2
2
|
import { serializeIncludingFunctions } from "./register-component.qwik.mjs";
|
|
3
3
|
const registry = {};
|
|
4
4
|
function register(type, info) {
|
|
5
|
-
if (type === "plugin")
|
|
5
|
+
if (type === "plugin")
|
|
6
6
|
info = serializeIncludingFunctions(info);
|
|
7
|
-
}
|
|
8
7
|
let typeList = registry[type];
|
|
9
|
-
if (!typeList)
|
|
8
|
+
if (!typeList)
|
|
10
9
|
typeList = registry[type] = [];
|
|
11
|
-
}
|
|
12
10
|
typeList.push(info);
|
|
13
11
|
if (isBrowser()) {
|
|
14
12
|
const message = {
|
|
@@ -20,9 +18,8 @@ function register(type, info) {
|
|
|
20
18
|
};
|
|
21
19
|
try {
|
|
22
20
|
parent.postMessage(message, "*");
|
|
23
|
-
if (parent !== window)
|
|
21
|
+
if (parent !== window)
|
|
24
22
|
window.postMessage(message, "*");
|
|
25
|
-
}
|
|
26
23
|
} catch (err) {
|
|
27
24
|
console.debug("Could not postmessage", err);
|
|
28
25
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const set = (obj, _path, value) => {
|
|
4
|
-
if (Object(obj) !== obj)
|
|
4
|
+
if (Object(obj) !== obj)
|
|
5
5
|
return obj;
|
|
6
|
-
}
|
|
7
6
|
const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
|
|
8
7
|
path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
|
|
9
8
|
return obj;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const set = (obj, _path, value) => {
|
|
2
|
-
if (Object(obj) !== obj)
|
|
2
|
+
if (Object(obj) !== obj)
|
|
3
3
|
return obj;
|
|
4
|
-
}
|
|
5
4
|
const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
|
|
6
5
|
path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
|
|
7
6
|
return obj;
|
|
@@ -5,9 +5,8 @@ const isBrowser = require("../is-browser.qwik.cjs");
|
|
|
5
5
|
const getLocation = () => {
|
|
6
6
|
if (isBrowser.isBrowser()) {
|
|
7
7
|
const parsedLocation = new URL(location.href);
|
|
8
|
-
if (parsedLocation.pathname === "")
|
|
8
|
+
if (parsedLocation.pathname === "")
|
|
9
9
|
parsedLocation.pathname = "/";
|
|
10
|
-
}
|
|
11
10
|
return parsedLocation;
|
|
12
11
|
} else {
|
|
13
12
|
console.warn("Cannot get location for tracking in non-browser environment");
|
|
@@ -3,9 +3,8 @@ import { isBrowser } from "../is-browser.qwik.mjs";
|
|
|
3
3
|
const getLocation = () => {
|
|
4
4
|
if (isBrowser()) {
|
|
5
5
|
const parsedLocation = new URL(location.href);
|
|
6
|
-
if (parsedLocation.pathname === "")
|
|
6
|
+
if (parsedLocation.pathname === "")
|
|
7
7
|
parsedLocation.pathname = "/";
|
|
8
|
-
}
|
|
9
8
|
return parsedLocation;
|
|
10
9
|
} else {
|
|
11
10
|
console.warn("Cannot get location for tracking in non-browser environment");
|
|
@@ -9,12 +9,11 @@ const isBrowser = require("../is-browser.qwik.cjs");
|
|
|
9
9
|
const isEditing = require("../is-editing.qwik.cjs");
|
|
10
10
|
const helpers = require("./helpers.qwik.cjs");
|
|
11
11
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
12
|
-
if (!canTrack)
|
|
12
|
+
if (!canTrack)
|
|
13
13
|
return {
|
|
14
14
|
visitorId: void 0,
|
|
15
15
|
sessionId: void 0
|
|
16
16
|
};
|
|
17
|
-
}
|
|
18
17
|
const sessionId$1 = await sessionId.getSessionId({
|
|
19
18
|
canTrack
|
|
20
19
|
});
|
|
@@ -46,15 +45,12 @@ async function _track({ apiHost, ...eventProps }) {
|
|
|
46
45
|
logger.logger.error("Missing API key for track call. Please provide your API key.");
|
|
47
46
|
return;
|
|
48
47
|
}
|
|
49
|
-
if (!eventProps.canTrack)
|
|
48
|
+
if (!eventProps.canTrack)
|
|
50
49
|
return;
|
|
51
|
-
|
|
52
|
-
if (isEditing.isEditing()) {
|
|
50
|
+
if (isEditing.isEditing())
|
|
53
51
|
return;
|
|
54
|
-
|
|
55
|
-
if (!(isBrowser.isBrowser() || target.TARGET === "reactNative")) {
|
|
52
|
+
if (!(isBrowser.isBrowser() || target.TARGET === "reactNative"))
|
|
56
53
|
return;
|
|
57
|
-
}
|
|
58
54
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
59
55
|
return fetch(`${baseUrl}/api/v1/track`, {
|
|
60
56
|
method: "POST",
|
|
@@ -7,12 +7,11 @@ import { isBrowser } from "../is-browser.qwik.mjs";
|
|
|
7
7
|
import { isEditing } from "../is-editing.qwik.mjs";
|
|
8
8
|
import { getUserAttributes } from "./helpers.qwik.mjs";
|
|
9
9
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
10
|
-
if (!canTrack)
|
|
10
|
+
if (!canTrack)
|
|
11
11
|
return {
|
|
12
12
|
visitorId: void 0,
|
|
13
13
|
sessionId: void 0
|
|
14
14
|
};
|
|
15
|
-
}
|
|
16
15
|
const sessionId = await getSessionId({
|
|
17
16
|
canTrack
|
|
18
17
|
});
|
|
@@ -44,15 +43,12 @@ async function _track({ apiHost, ...eventProps }) {
|
|
|
44
43
|
logger.error("Missing API key for track call. Please provide your API key.");
|
|
45
44
|
return;
|
|
46
45
|
}
|
|
47
|
-
if (!eventProps.canTrack)
|
|
46
|
+
if (!eventProps.canTrack)
|
|
48
47
|
return;
|
|
49
|
-
|
|
50
|
-
if (isEditing()) {
|
|
48
|
+
if (isEditing())
|
|
51
49
|
return;
|
|
52
|
-
|
|
53
|
-
if (!(isBrowser() || TARGET === "reactNative")) {
|
|
50
|
+
if (!(isBrowser() || TARGET === "reactNative"))
|
|
54
51
|
return;
|
|
55
|
-
}
|
|
56
52
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
57
53
|
return fetch(`${baseUrl}/api/v1/track`, {
|
|
58
54
|
method: "POST",
|
|
@@ -4,18 +4,15 @@ function round(num) {
|
|
|
4
4
|
return Math.round(num * 1e3) / 1e3;
|
|
5
5
|
}
|
|
6
6
|
const findParentElement = (target, callback, checkElement = true) => {
|
|
7
|
-
if (!(target instanceof HTMLElement))
|
|
7
|
+
if (!(target instanceof HTMLElement))
|
|
8
8
|
return null;
|
|
9
|
-
}
|
|
10
9
|
let parent = checkElement ? target : target.parentElement;
|
|
11
10
|
do {
|
|
12
|
-
if (!parent)
|
|
11
|
+
if (!parent)
|
|
13
12
|
return null;
|
|
14
|
-
}
|
|
15
13
|
const matches = callback(parent);
|
|
16
|
-
if (matches)
|
|
14
|
+
if (matches)
|
|
17
15
|
return parent;
|
|
18
|
-
}
|
|
19
16
|
} while (parent = parent.parentElement);
|
|
20
17
|
return null;
|
|
21
18
|
};
|
|
@@ -2,18 +2,15 @@ function round(num) {
|
|
|
2
2
|
return Math.round(num * 1e3) / 1e3;
|
|
3
3
|
}
|
|
4
4
|
const findParentElement = (target, callback, checkElement = true) => {
|
|
5
|
-
if (!(target instanceof HTMLElement))
|
|
5
|
+
if (!(target instanceof HTMLElement))
|
|
6
6
|
return null;
|
|
7
|
-
}
|
|
8
7
|
let parent = checkElement ? target : target.parentElement;
|
|
9
8
|
do {
|
|
10
|
-
if (!parent)
|
|
9
|
+
if (!parent)
|
|
11
10
|
return null;
|
|
12
|
-
}
|
|
13
11
|
const matches = callback(parent);
|
|
14
|
-
if (matches)
|
|
12
|
+
if (matches)
|
|
15
13
|
return parent;
|
|
16
|
-
}
|
|
17
14
|
} while (parent = parent.parentElement);
|
|
18
15
|
return null;
|
|
19
16
|
};
|
|
@@ -26,9 +26,8 @@ const getRandomVariationId = ({ id, variations }) => {
|
|
|
26
26
|
for (const id2 in variations) {
|
|
27
27
|
const testRatio = (_a = variations[id2]) == null ? void 0 : _a.testRatio;
|
|
28
28
|
n += testRatio;
|
|
29
|
-
if (random < n)
|
|
29
|
+
if (random < n)
|
|
30
30
|
return id2;
|
|
31
|
-
}
|
|
32
31
|
}
|
|
33
32
|
return id;
|
|
34
33
|
};
|
|
@@ -45,29 +44,25 @@ const getAndSetVariantId = (args) => {
|
|
|
45
44
|
const getTestFields = ({ item, testGroupId }) => {
|
|
46
45
|
const variationValue = item.variations[testGroupId];
|
|
47
46
|
if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
48
|
-
!variationValue)
|
|
47
|
+
!variationValue)
|
|
49
48
|
return {
|
|
50
49
|
testVariationId: item.id,
|
|
51
50
|
testVariationName: "Default"
|
|
52
51
|
};
|
|
53
|
-
|
|
52
|
+
else
|
|
54
53
|
return {
|
|
55
54
|
data: variationValue.data,
|
|
56
55
|
testVariationId: variationValue.id,
|
|
57
56
|
testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
|
|
58
57
|
};
|
|
59
|
-
}
|
|
60
58
|
};
|
|
61
59
|
const handleABTestingSync = ({ item, canTrack }) => {
|
|
62
|
-
if (!canTrack)
|
|
60
|
+
if (!canTrack)
|
|
63
61
|
return item;
|
|
64
|
-
|
|
65
|
-
if (!item) {
|
|
62
|
+
if (!item)
|
|
66
63
|
return void 0;
|
|
67
|
-
|
|
68
|
-
if (!checkIsBuilderContentWithVariations(item)) {
|
|
64
|
+
if (!checkIsBuilderContentWithVariations(item))
|
|
69
65
|
return item;
|
|
70
|
-
}
|
|
71
66
|
const testGroupId = getContentVariationCookieSync({
|
|
72
67
|
contentId: item.id
|
|
73
68
|
}) || getAndSetVariantId({
|
|
@@ -84,12 +79,10 @@ const handleABTestingSync = ({ item, canTrack }) => {
|
|
|
84
79
|
};
|
|
85
80
|
};
|
|
86
81
|
const handleABTesting = async ({ item, canTrack }) => {
|
|
87
|
-
if (!canTrack)
|
|
82
|
+
if (!canTrack)
|
|
88
83
|
return item;
|
|
89
|
-
|
|
90
|
-
if (!checkIsBuilderContentWithVariations(item)) {
|
|
84
|
+
if (!checkIsBuilderContentWithVariations(item))
|
|
91
85
|
return item;
|
|
92
|
-
}
|
|
93
86
|
const cookieValue = await getContentVariationCookie({
|
|
94
87
|
contentId: item.id
|
|
95
88
|
});
|