@builder.io/sdk-qwik 0.16.10 → 0.16.13
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 +74 -143
- package/lib/browser/blocks/accordion/accordion.qwik.mjs +74 -143
- package/lib/browser/blocks/accordion/component-info.qwik.cjs +2 -1
- package/lib/browser/blocks/accordion/component-info.qwik.mjs +2 -1
- package/lib/browser/blocks/button/button.qwik.cjs +8 -17
- package/lib/browser/blocks/button/button.qwik.mjs +8 -17
- package/lib/browser/blocks/columns/columns.qwik.cjs +33 -67
- package/lib/browser/blocks/columns/columns.qwik.mjs +33 -67
- package/lib/browser/blocks/columns/component-info.qwik.cjs +4 -3
- package/lib/browser/blocks/columns/component-info.qwik.mjs +4 -3
- package/lib/browser/blocks/custom-code/custom-code.qwik.cjs +18 -22
- package/lib/browser/blocks/custom-code/custom-code.qwik.mjs +19 -23
- package/lib/browser/blocks/embed/embed.qwik.cjs +17 -23
- package/lib/browser/blocks/embed/embed.qwik.mjs +17 -23
- package/lib/browser/blocks/form/form/form.qwik.cjs +74 -128
- package/lib/browser/blocks/form/form/form.qwik.mjs +75 -129
- 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 +7 -5
- package/lib/browser/blocks/form/select/select.qwik.mjs +8 -6
- package/lib/browser/blocks/form/submit-button/submit-button.qwik.cjs +7 -9
- package/lib/browser/blocks/form/submit-button/submit-button.qwik.mjs +8 -10
- package/lib/browser/blocks/form/textarea/textarea.qwik.cjs +11 -21
- package/lib/browser/blocks/form/textarea/textarea.qwik.mjs +12 -22
- package/lib/browser/blocks/fragment/fragment.qwik.cjs +6 -3
- package/lib/browser/blocks/fragment/fragment.qwik.mjs +7 -4
- package/lib/browser/blocks/image/component-info.qwik.cjs +6 -3
- package/lib/browser/blocks/image/component-info.qwik.mjs +6 -3
- package/lib/browser/blocks/image/image.helpers.qwik.cjs +12 -6
- package/lib/browser/blocks/image/image.helpers.qwik.mjs +12 -6
- package/lib/browser/blocks/image/image.qwik.cjs +63 -89
- package/lib/browser/blocks/image/image.qwik.mjs +63 -89
- package/lib/browser/blocks/img/img.qwik.cjs +12 -18
- package/lib/browser/blocks/img/img.qwik.mjs +12 -18
- package/lib/browser/blocks/section/section.qwik.cjs +7 -6
- package/lib/browser/blocks/section/section.qwik.mjs +8 -7
- package/lib/browser/blocks/slot/slot.qwik.cjs +17 -43
- package/lib/browser/blocks/slot/slot.qwik.mjs +17 -43
- package/lib/browser/blocks/symbol/symbol.helpers.qwik.cjs +2 -1
- package/lib/browser/blocks/symbol/symbol.helpers.qwik.mjs +2 -1
- package/lib/browser/blocks/symbol/symbol.qwik.cjs +45 -137
- package/lib/browser/blocks/symbol/symbol.qwik.mjs +45 -137
- package/lib/browser/blocks/tabs/tabs.qwik.cjs +45 -99
- package/lib/browser/blocks/tabs/tabs.qwik.mjs +45 -99
- package/lib/browser/blocks/text/text.qwik.cjs +11 -15
- package/lib/browser/blocks/text/text.qwik.mjs +11 -15
- package/lib/browser/blocks/video/video.qwik.cjs +73 -87
- package/lib/browser/blocks/video/video.qwik.mjs +74 -88
- package/lib/browser/components/block/animator.qwik.cjs +22 -11
- package/lib/browser/components/block/animator.qwik.mjs +22 -11
- package/lib/browser/components/block/block.helpers.qwik.cjs +8 -4
- package/lib/browser/components/block/block.helpers.qwik.mjs +8 -4
- package/lib/browser/components/block/block.qwik.cjs +114 -320
- package/lib/browser/components/block/block.qwik.mjs +115 -321
- package/lib/browser/components/block/components/block-styles.qwik.cjs +22 -39
- package/lib/browser/components/block/components/block-styles.qwik.mjs +23 -40
- package/lib/browser/components/block/components/block-wrapper.qwik.cjs +12 -18
- package/lib/browser/components/block/components/block-wrapper.qwik.mjs +12 -18
- package/lib/browser/components/block/components/component-ref/component-ref.qwik.cjs +12 -29
- package/lib/browser/components/block/components/component-ref/component-ref.qwik.mjs +14 -31
- package/lib/browser/components/block/components/interactive-element.qwik.cjs +18 -27
- package/lib/browser/components/block/components/interactive-element.qwik.mjs +18 -27
- package/lib/browser/components/block/components/repeated-block.qwik.cjs +10 -31
- package/lib/browser/components/block/components/repeated-block.qwik.mjs +11 -32
- package/lib/browser/components/blocks/blocks-wrapper.qwik.cjs +24 -72
- package/lib/browser/components/blocks/blocks-wrapper.qwik.mjs +24 -72
- package/lib/browser/components/blocks/blocks.qwik.cjs +19 -78
- package/lib/browser/components/blocks/blocks.qwik.mjs +20 -79
- package/lib/browser/components/content/components/enable-editor.qwik.cjs +101 -193
- package/lib/browser/components/content/components/enable-editor.qwik.mjs +102 -194
- package/lib/browser/components/content/components/styles.helpers.qwik.cjs +12 -6
- package/lib/browser/components/content/components/styles.helpers.qwik.mjs +12 -6
- package/lib/browser/components/content/components/styles.qwik.cjs +8 -20
- package/lib/browser/components/content/components/styles.qwik.mjs +8 -20
- package/lib/browser/components/content/content.helpers.qwik.cjs +2 -1
- package/lib/browser/components/content/content.helpers.qwik.mjs +2 -1
- package/lib/browser/components/content/content.qwik.cjs +39 -189
- package/lib/browser/components/content/content.qwik.mjs +39 -189
- package/lib/browser/components/content-variants/content-variants.qwik.cjs +74 -313
- package/lib/browser/components/content-variants/content-variants.qwik.mjs +75 -314
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.cjs +11 -12
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.mjs +12 -13
- package/lib/browser/components/inlined-script.qwik.cjs +8 -13
- package/lib/browser/components/inlined-script.qwik.mjs +9 -14
- package/lib/browser/components/inlined-styles.qwik.cjs +8 -13
- package/lib/browser/components/inlined-styles.qwik.mjs +9 -14
- package/lib/browser/constants/device-sizes.qwik.cjs +2 -1
- package/lib/browser/constants/device-sizes.qwik.mjs +2 -1
- 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/browser-runtime/browser.qwik.cjs +6 -3
- package/lib/browser/functions/evaluate/browser-runtime/browser.qwik.mjs +6 -3
- package/lib/browser/functions/evaluate/choose-eval.qwik.cjs +3 -1
- package/lib/browser/functions/evaluate/choose-eval.qwik.mjs +3 -1
- package/lib/browser/functions/evaluate/evaluate.qwik.cjs +6 -3
- package/lib/browser/functions/evaluate/evaluate.qwik.mjs +6 -3
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +4 -2
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +4 -2
- package/lib/browser/functions/get-block-actions-handler.qwik.cjs +9 -15
- package/lib/browser/functions/get-block-actions-handler.qwik.mjs +10 -16
- package/lib/browser/functions/get-block-actions.qwik.cjs +4 -2
- package/lib/browser/functions/get-block-actions.qwik.mjs +4 -2
- package/lib/browser/functions/get-builder-search-params/index.qwik.cjs +4 -2
- package/lib/browser/functions/get-builder-search-params/index.qwik.mjs +4 -2
- package/lib/browser/functions/get-content/generate-content-url.qwik.cjs +22 -11
- package/lib/browser/functions/get-content/generate-content-url.qwik.mjs +22 -11
- package/lib/browser/functions/get-content/index.qwik.cjs +4 -2
- package/lib/browser/functions/get-content/index.qwik.mjs +4 -2
- package/lib/browser/functions/get-global-this.qwik.cjs +8 -4
- package/lib/browser/functions/get-global-this.qwik.mjs +8 -4
- package/lib/browser/functions/get-processed-block.qwik.cjs +15 -8
- package/lib/browser/functions/get-processed-block.qwik.mjs +15 -8
- package/lib/browser/functions/is-from-trusted-host.qwik.cjs +2 -1
- package/lib/browser/functions/is-from-trusted-host.qwik.mjs +2 -1
- package/lib/browser/functions/is-previewing.qwik.cjs +2 -1
- package/lib/browser/functions/is-previewing.qwik.mjs +2 -1
- package/lib/browser/functions/register-component.qwik.cjs +2 -1
- package/lib/browser/functions/register-component.qwik.mjs +2 -1
- package/lib/browser/functions/register.qwik.cjs +6 -3
- package/lib/browser/functions/register.qwik.mjs +6 -3
- package/lib/browser/functions/set.qwik.cjs +2 -1
- package/lib/browser/functions/set.qwik.mjs +2 -1
- package/lib/browser/functions/track/helpers.qwik.cjs +2 -1
- package/lib/browser/functions/track/helpers.qwik.mjs +2 -1
- package/lib/browser/functions/track/index.qwik.cjs +8 -4
- package/lib/browser/functions/track/index.qwik.mjs +8 -4
- package/lib/browser/functions/track/interaction.qwik.cjs +6 -3
- package/lib/browser/functions/track/interaction.qwik.mjs +6 -3
- package/lib/browser/helpers/ab-tests.qwik.cjs +15 -8
- package/lib/browser/helpers/ab-tests.qwik.mjs +16 -9
- package/lib/browser/helpers/cookie.qwik.cjs +4 -2
- package/lib/browser/helpers/cookie.qwik.mjs +4 -2
- package/lib/browser/helpers/css.qwik.cjs +6 -4
- package/lib/browser/helpers/css.qwik.mjs +6 -4
- package/lib/browser/helpers/flatten.qwik.cjs +3 -2
- package/lib/browser/helpers/flatten.qwik.mjs +3 -2
- package/lib/browser/helpers/localStorage.qwik.cjs +4 -2
- package/lib/browser/helpers/localStorage.qwik.mjs +4 -2
- package/lib/browser/helpers/omit.qwik.cjs +2 -1
- package/lib/browser/helpers/omit.qwik.mjs +2 -1
- package/lib/browser/helpers/search/search.qwik.cjs +3 -2
- package/lib/browser/helpers/search/search.qwik.mjs +3 -2
- package/lib/browser/helpers/sessionId.qwik.cjs +4 -3
- package/lib/browser/helpers/sessionId.qwik.mjs +4 -3
- package/lib/browser/helpers/subscribe-to-editor.qwik.cjs +10 -5
- package/lib/browser/helpers/subscribe-to-editor.qwik.mjs +10 -5
- package/lib/browser/helpers/url.qwik.cjs +4 -2
- package/lib/browser/helpers/url.qwik.mjs +4 -2
- package/lib/browser/helpers/visitorId.qwik.cjs +4 -3
- package/lib/browser/helpers/visitorId.qwik.mjs +4 -3
- package/lib/browser/scripts/init-editing.qwik.cjs +25 -19
- package/lib/browser/scripts/init-editing.qwik.mjs +25 -19
- package/lib/edge/blocks/accordion/accordion.qwik.cjs +74 -143
- package/lib/edge/blocks/accordion/accordion.qwik.mjs +74 -143
- package/lib/edge/blocks/accordion/component-info.qwik.cjs +2 -1
- package/lib/edge/blocks/accordion/component-info.qwik.mjs +2 -1
- package/lib/edge/blocks/button/button.qwik.cjs +8 -17
- package/lib/edge/blocks/button/button.qwik.mjs +8 -17
- package/lib/edge/blocks/columns/columns.qwik.cjs +33 -67
- package/lib/edge/blocks/columns/columns.qwik.mjs +33 -67
- package/lib/edge/blocks/columns/component-info.qwik.cjs +4 -3
- package/lib/edge/blocks/columns/component-info.qwik.mjs +4 -3
- package/lib/edge/blocks/custom-code/custom-code.qwik.cjs +18 -22
- package/lib/edge/blocks/custom-code/custom-code.qwik.mjs +19 -23
- package/lib/edge/blocks/embed/embed.qwik.cjs +17 -23
- package/lib/edge/blocks/embed/embed.qwik.mjs +17 -23
- package/lib/edge/blocks/form/form/form.qwik.cjs +74 -128
- package/lib/edge/blocks/form/form/form.qwik.mjs +75 -129
- 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 +7 -5
- package/lib/edge/blocks/form/select/select.qwik.mjs +8 -6
- package/lib/edge/blocks/form/submit-button/submit-button.qwik.cjs +7 -9
- package/lib/edge/blocks/form/submit-button/submit-button.qwik.mjs +8 -10
- package/lib/edge/blocks/form/textarea/textarea.qwik.cjs +11 -21
- package/lib/edge/blocks/form/textarea/textarea.qwik.mjs +12 -22
- package/lib/edge/blocks/fragment/fragment.qwik.cjs +6 -3
- package/lib/edge/blocks/fragment/fragment.qwik.mjs +7 -4
- package/lib/edge/blocks/image/component-info.qwik.cjs +6 -3
- package/lib/edge/blocks/image/component-info.qwik.mjs +6 -3
- package/lib/edge/blocks/image/image.helpers.qwik.cjs +12 -6
- package/lib/edge/blocks/image/image.helpers.qwik.mjs +12 -6
- package/lib/edge/blocks/image/image.qwik.cjs +63 -89
- package/lib/edge/blocks/image/image.qwik.mjs +63 -89
- package/lib/edge/blocks/img/img.qwik.cjs +12 -18
- package/lib/edge/blocks/img/img.qwik.mjs +12 -18
- package/lib/edge/blocks/section/section.qwik.cjs +7 -6
- package/lib/edge/blocks/section/section.qwik.mjs +8 -7
- package/lib/edge/blocks/slot/slot.qwik.cjs +17 -43
- package/lib/edge/blocks/slot/slot.qwik.mjs +17 -43
- package/lib/edge/blocks/symbol/symbol.helpers.qwik.cjs +2 -1
- package/lib/edge/blocks/symbol/symbol.helpers.qwik.mjs +2 -1
- package/lib/edge/blocks/symbol/symbol.qwik.cjs +45 -137
- package/lib/edge/blocks/symbol/symbol.qwik.mjs +45 -137
- package/lib/edge/blocks/tabs/tabs.qwik.cjs +45 -99
- package/lib/edge/blocks/tabs/tabs.qwik.mjs +45 -99
- package/lib/edge/blocks/text/text.qwik.cjs +11 -15
- package/lib/edge/blocks/text/text.qwik.mjs +11 -15
- package/lib/edge/blocks/video/video.qwik.cjs +73 -87
- package/lib/edge/blocks/video/video.qwik.mjs +74 -88
- package/lib/edge/components/block/animator.qwik.cjs +22 -11
- package/lib/edge/components/block/animator.qwik.mjs +22 -11
- package/lib/edge/components/block/block.helpers.qwik.cjs +8 -4
- package/lib/edge/components/block/block.helpers.qwik.mjs +8 -4
- package/lib/edge/components/block/block.qwik.cjs +114 -320
- package/lib/edge/components/block/block.qwik.mjs +115 -321
- package/lib/edge/components/block/components/block-styles.qwik.cjs +22 -39
- package/lib/edge/components/block/components/block-styles.qwik.mjs +23 -40
- package/lib/edge/components/block/components/block-wrapper.qwik.cjs +12 -18
- package/lib/edge/components/block/components/block-wrapper.qwik.mjs +12 -18
- package/lib/edge/components/block/components/component-ref/component-ref.qwik.cjs +12 -29
- package/lib/edge/components/block/components/component-ref/component-ref.qwik.mjs +14 -31
- package/lib/edge/components/block/components/interactive-element.qwik.cjs +18 -27
- package/lib/edge/components/block/components/interactive-element.qwik.mjs +18 -27
- package/lib/edge/components/block/components/repeated-block.qwik.cjs +10 -31
- package/lib/edge/components/block/components/repeated-block.qwik.mjs +11 -32
- package/lib/edge/components/blocks/blocks-wrapper.qwik.cjs +24 -72
- package/lib/edge/components/blocks/blocks-wrapper.qwik.mjs +24 -72
- package/lib/edge/components/blocks/blocks.qwik.cjs +19 -78
- package/lib/edge/components/blocks/blocks.qwik.mjs +20 -79
- package/lib/edge/components/content/components/enable-editor.qwik.cjs +101 -193
- package/lib/edge/components/content/components/enable-editor.qwik.mjs +102 -194
- package/lib/edge/components/content/components/styles.helpers.qwik.cjs +12 -6
- package/lib/edge/components/content/components/styles.helpers.qwik.mjs +12 -6
- package/lib/edge/components/content/components/styles.qwik.cjs +8 -20
- package/lib/edge/components/content/components/styles.qwik.mjs +8 -20
- package/lib/edge/components/content/content.helpers.qwik.cjs +2 -1
- package/lib/edge/components/content/content.helpers.qwik.mjs +2 -1
- package/lib/edge/components/content/content.qwik.cjs +39 -189
- package/lib/edge/components/content/content.qwik.mjs +39 -189
- package/lib/edge/components/content-variants/content-variants.qwik.cjs +74 -313
- package/lib/edge/components/content-variants/content-variants.qwik.mjs +75 -314
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.cjs +11 -12
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.mjs +12 -13
- package/lib/edge/components/inlined-script.qwik.cjs +8 -13
- package/lib/edge/components/inlined-script.qwik.mjs +9 -14
- package/lib/edge/components/inlined-styles.qwik.cjs +8 -13
- package/lib/edge/components/inlined-styles.qwik.mjs +9 -14
- package/lib/edge/constants/device-sizes.qwik.cjs +2 -1
- package/lib/edge/constants/device-sizes.qwik.mjs +2 -1
- 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/browser-runtime/browser.qwik.cjs +6 -3
- package/lib/edge/functions/evaluate/browser-runtime/browser.qwik.mjs +6 -3
- package/lib/edge/functions/evaluate/choose-eval.qwik.cjs +3 -1
- package/lib/edge/functions/evaluate/choose-eval.qwik.mjs +3 -1
- package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.cjs +6 -7
- package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.mjs +6 -7
- package/lib/edge/functions/evaluate/evaluate.qwik.cjs +6 -3
- package/lib/edge/functions/evaluate/evaluate.qwik.mjs +6 -3
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +4 -2
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +4 -2
- package/lib/edge/functions/get-block-actions-handler.qwik.cjs +9 -15
- package/lib/edge/functions/get-block-actions-handler.qwik.mjs +10 -16
- package/lib/edge/functions/get-block-actions.qwik.cjs +4 -2
- package/lib/edge/functions/get-block-actions.qwik.mjs +4 -2
- package/lib/edge/functions/get-builder-search-params/index.qwik.cjs +4 -2
- package/lib/edge/functions/get-builder-search-params/index.qwik.mjs +4 -2
- package/lib/edge/functions/get-content/generate-content-url.qwik.cjs +22 -11
- package/lib/edge/functions/get-content/generate-content-url.qwik.mjs +22 -11
- package/lib/edge/functions/get-content/index.qwik.cjs +4 -2
- package/lib/edge/functions/get-content/index.qwik.mjs +4 -2
- package/lib/edge/functions/get-global-this.qwik.cjs +8 -4
- package/lib/edge/functions/get-global-this.qwik.mjs +8 -4
- package/lib/edge/functions/get-processed-block.qwik.cjs +15 -8
- package/lib/edge/functions/get-processed-block.qwik.mjs +15 -8
- package/lib/edge/functions/is-from-trusted-host.qwik.cjs +2 -1
- package/lib/edge/functions/is-from-trusted-host.qwik.mjs +2 -1
- package/lib/edge/functions/is-previewing.qwik.cjs +2 -1
- package/lib/edge/functions/is-previewing.qwik.mjs +2 -1
- package/lib/edge/functions/register-component.qwik.cjs +2 -1
- package/lib/edge/functions/register-component.qwik.mjs +2 -1
- package/lib/edge/functions/register.qwik.cjs +6 -3
- package/lib/edge/functions/register.qwik.mjs +6 -3
- package/lib/edge/functions/set.qwik.cjs +2 -1
- package/lib/edge/functions/set.qwik.mjs +2 -1
- package/lib/edge/functions/track/helpers.qwik.cjs +2 -1
- package/lib/edge/functions/track/helpers.qwik.mjs +2 -1
- package/lib/edge/functions/track/index.qwik.cjs +8 -4
- package/lib/edge/functions/track/index.qwik.mjs +8 -4
- package/lib/edge/functions/track/interaction.qwik.cjs +6 -3
- package/lib/edge/functions/track/interaction.qwik.mjs +6 -3
- package/lib/edge/helpers/ab-tests.qwik.cjs +15 -8
- package/lib/edge/helpers/ab-tests.qwik.mjs +16 -9
- package/lib/edge/helpers/cookie.qwik.cjs +4 -2
- package/lib/edge/helpers/cookie.qwik.mjs +4 -2
- package/lib/edge/helpers/css.qwik.cjs +6 -4
- package/lib/edge/helpers/css.qwik.mjs +6 -4
- package/lib/edge/helpers/flatten.qwik.cjs +3 -2
- package/lib/edge/helpers/flatten.qwik.mjs +3 -2
- package/lib/edge/helpers/localStorage.qwik.cjs +4 -2
- package/lib/edge/helpers/localStorage.qwik.mjs +4 -2
- package/lib/edge/helpers/omit.qwik.cjs +2 -1
- package/lib/edge/helpers/omit.qwik.mjs +2 -1
- package/lib/edge/helpers/search/search.qwik.cjs +3 -2
- package/lib/edge/helpers/search/search.qwik.mjs +3 -2
- package/lib/edge/helpers/sessionId.qwik.cjs +4 -3
- package/lib/edge/helpers/sessionId.qwik.mjs +4 -3
- package/lib/edge/helpers/subscribe-to-editor.qwik.cjs +10 -5
- package/lib/edge/helpers/subscribe-to-editor.qwik.mjs +10 -5
- package/lib/edge/helpers/url.qwik.cjs +4 -2
- package/lib/edge/helpers/url.qwik.mjs +4 -2
- package/lib/edge/helpers/visitorId.qwik.cjs +4 -3
- package/lib/edge/helpers/visitorId.qwik.mjs +4 -3
- package/lib/edge/scripts/init-editing.qwik.cjs +25 -19
- package/lib/edge/scripts/init-editing.qwik.mjs +25 -19
- package/lib/node/blocks/accordion/accordion.qwik.cjs +74 -143
- package/lib/node/blocks/accordion/accordion.qwik.mjs +74 -143
- package/lib/node/blocks/accordion/component-info.qwik.cjs +2 -1
- package/lib/node/blocks/accordion/component-info.qwik.mjs +2 -1
- package/lib/node/blocks/button/button.qwik.cjs +8 -17
- package/lib/node/blocks/button/button.qwik.mjs +8 -17
- package/lib/node/blocks/columns/columns.qwik.cjs +33 -67
- package/lib/node/blocks/columns/columns.qwik.mjs +33 -67
- package/lib/node/blocks/columns/component-info.qwik.cjs +4 -3
- package/lib/node/blocks/columns/component-info.qwik.mjs +4 -3
- package/lib/node/blocks/custom-code/custom-code.qwik.cjs +18 -22
- package/lib/node/blocks/custom-code/custom-code.qwik.mjs +19 -23
- package/lib/node/blocks/embed/embed.qwik.cjs +17 -23
- package/lib/node/blocks/embed/embed.qwik.mjs +17 -23
- package/lib/node/blocks/form/form/form.qwik.cjs +74 -128
- package/lib/node/blocks/form/form/form.qwik.mjs +75 -129
- 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 +7 -5
- package/lib/node/blocks/form/select/select.qwik.mjs +8 -6
- package/lib/node/blocks/form/submit-button/submit-button.qwik.cjs +7 -9
- package/lib/node/blocks/form/submit-button/submit-button.qwik.mjs +8 -10
- package/lib/node/blocks/form/textarea/textarea.qwik.cjs +11 -21
- package/lib/node/blocks/form/textarea/textarea.qwik.mjs +12 -22
- package/lib/node/blocks/fragment/fragment.qwik.cjs +6 -3
- package/lib/node/blocks/fragment/fragment.qwik.mjs +7 -4
- package/lib/node/blocks/image/component-info.qwik.cjs +6 -3
- package/lib/node/blocks/image/component-info.qwik.mjs +6 -3
- package/lib/node/blocks/image/image.helpers.qwik.cjs +12 -6
- package/lib/node/blocks/image/image.helpers.qwik.mjs +12 -6
- package/lib/node/blocks/image/image.qwik.cjs +63 -89
- package/lib/node/blocks/image/image.qwik.mjs +63 -89
- package/lib/node/blocks/img/img.qwik.cjs +12 -18
- package/lib/node/blocks/img/img.qwik.mjs +12 -18
- package/lib/node/blocks/section/section.qwik.cjs +7 -6
- package/lib/node/blocks/section/section.qwik.mjs +8 -7
- package/lib/node/blocks/slot/slot.qwik.cjs +17 -43
- package/lib/node/blocks/slot/slot.qwik.mjs +17 -43
- package/lib/node/blocks/symbol/symbol.helpers.qwik.cjs +2 -1
- package/lib/node/blocks/symbol/symbol.helpers.qwik.mjs +2 -1
- package/lib/node/blocks/symbol/symbol.qwik.cjs +45 -137
- package/lib/node/blocks/symbol/symbol.qwik.mjs +45 -137
- package/lib/node/blocks/tabs/tabs.qwik.cjs +45 -99
- package/lib/node/blocks/tabs/tabs.qwik.mjs +45 -99
- package/lib/node/blocks/text/text.qwik.cjs +11 -15
- package/lib/node/blocks/text/text.qwik.mjs +11 -15
- package/lib/node/blocks/video/video.qwik.cjs +73 -87
- package/lib/node/blocks/video/video.qwik.mjs +74 -88
- package/lib/node/components/block/animator.qwik.cjs +22 -11
- package/lib/node/components/block/animator.qwik.mjs +22 -11
- package/lib/node/components/block/block.helpers.qwik.cjs +8 -4
- package/lib/node/components/block/block.helpers.qwik.mjs +8 -4
- package/lib/node/components/block/block.qwik.cjs +114 -320
- package/lib/node/components/block/block.qwik.mjs +115 -321
- package/lib/node/components/block/components/block-styles.qwik.cjs +22 -39
- package/lib/node/components/block/components/block-styles.qwik.mjs +23 -40
- package/lib/node/components/block/components/block-wrapper.qwik.cjs +12 -18
- package/lib/node/components/block/components/block-wrapper.qwik.mjs +12 -18
- package/lib/node/components/block/components/component-ref/component-ref.qwik.cjs +12 -29
- package/lib/node/components/block/components/component-ref/component-ref.qwik.mjs +14 -31
- package/lib/node/components/block/components/interactive-element.qwik.cjs +18 -27
- package/lib/node/components/block/components/interactive-element.qwik.mjs +18 -27
- package/lib/node/components/block/components/repeated-block.qwik.cjs +10 -31
- package/lib/node/components/block/components/repeated-block.qwik.mjs +11 -32
- package/lib/node/components/blocks/blocks-wrapper.qwik.cjs +24 -72
- package/lib/node/components/blocks/blocks-wrapper.qwik.mjs +24 -72
- package/lib/node/components/blocks/blocks.qwik.cjs +19 -78
- package/lib/node/components/blocks/blocks.qwik.mjs +20 -79
- package/lib/node/components/content/components/enable-editor.qwik.cjs +101 -193
- package/lib/node/components/content/components/enable-editor.qwik.mjs +102 -194
- package/lib/node/components/content/components/styles.helpers.qwik.cjs +12 -6
- package/lib/node/components/content/components/styles.helpers.qwik.mjs +12 -6
- package/lib/node/components/content/components/styles.qwik.cjs +8 -20
- package/lib/node/components/content/components/styles.qwik.mjs +8 -20
- package/lib/node/components/content/content.helpers.qwik.cjs +2 -1
- package/lib/node/components/content/content.helpers.qwik.mjs +2 -1
- package/lib/node/components/content/content.qwik.cjs +39 -189
- package/lib/node/components/content/content.qwik.mjs +39 -189
- package/lib/node/components/content-variants/content-variants.qwik.cjs +74 -313
- package/lib/node/components/content-variants/content-variants.qwik.mjs +75 -314
- package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.cjs +11 -12
- package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.mjs +12 -13
- package/lib/node/components/inlined-script.qwik.cjs +8 -13
- package/lib/node/components/inlined-script.qwik.mjs +9 -14
- package/lib/node/components/inlined-styles.qwik.cjs +8 -13
- package/lib/node/components/inlined-styles.qwik.mjs +9 -14
- package/lib/node/constants/device-sizes.qwik.cjs +2 -1
- package/lib/node/constants/device-sizes.qwik.mjs +2 -1
- 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/browser-runtime/browser.qwik.cjs +6 -3
- package/lib/node/functions/evaluate/browser-runtime/browser.qwik.mjs +6 -3
- package/lib/node/functions/evaluate/choose-eval.qwik.cjs +3 -1
- package/lib/node/functions/evaluate/choose-eval.qwik.mjs +3 -1
- package/lib/node/functions/evaluate/evaluate.qwik.cjs +6 -3
- package/lib/node/functions/evaluate/evaluate.qwik.mjs +6 -3
- package/lib/node/functions/evaluate/node-runtime/init.qwik.cjs +6 -0
- package/lib/node/functions/evaluate/node-runtime/init.qwik.mjs +6 -0
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +4 -2
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +4 -2
- package/lib/node/functions/get-block-actions-handler.qwik.cjs +9 -15
- package/lib/node/functions/get-block-actions-handler.qwik.mjs +10 -16
- package/lib/node/functions/get-block-actions.qwik.cjs +4 -2
- package/lib/node/functions/get-block-actions.qwik.mjs +4 -2
- package/lib/node/functions/get-builder-search-params/index.qwik.cjs +4 -2
- package/lib/node/functions/get-builder-search-params/index.qwik.mjs +4 -2
- package/lib/node/functions/get-content/generate-content-url.qwik.cjs +22 -11
- package/lib/node/functions/get-content/generate-content-url.qwik.mjs +22 -11
- package/lib/node/functions/get-content/index.qwik.cjs +4 -2
- package/lib/node/functions/get-content/index.qwik.mjs +4 -2
- package/lib/node/functions/get-global-this.qwik.cjs +8 -4
- package/lib/node/functions/get-global-this.qwik.mjs +8 -4
- package/lib/node/functions/get-processed-block.qwik.cjs +15 -8
- package/lib/node/functions/get-processed-block.qwik.mjs +15 -8
- package/lib/node/functions/is-from-trusted-host.qwik.cjs +2 -1
- package/lib/node/functions/is-from-trusted-host.qwik.mjs +2 -1
- package/lib/node/functions/is-previewing.qwik.cjs +2 -1
- package/lib/node/functions/is-previewing.qwik.mjs +2 -1
- package/lib/node/functions/register-component.qwik.cjs +2 -1
- package/lib/node/functions/register-component.qwik.mjs +2 -1
- package/lib/node/functions/register.qwik.cjs +6 -3
- package/lib/node/functions/register.qwik.mjs +6 -3
- package/lib/node/functions/set.qwik.cjs +2 -1
- package/lib/node/functions/set.qwik.mjs +2 -1
- package/lib/node/functions/track/helpers.qwik.cjs +2 -1
- package/lib/node/functions/track/helpers.qwik.mjs +2 -1
- package/lib/node/functions/track/index.qwik.cjs +8 -4
- package/lib/node/functions/track/index.qwik.mjs +8 -4
- package/lib/node/functions/track/interaction.qwik.cjs +6 -3
- package/lib/node/functions/track/interaction.qwik.mjs +6 -3
- package/lib/node/helpers/ab-tests.qwik.cjs +15 -8
- package/lib/node/helpers/ab-tests.qwik.mjs +16 -9
- package/lib/node/helpers/cookie.qwik.cjs +4 -2
- package/lib/node/helpers/cookie.qwik.mjs +4 -2
- package/lib/node/helpers/css.qwik.cjs +6 -4
- package/lib/node/helpers/css.qwik.mjs +6 -4
- package/lib/node/helpers/flatten.qwik.cjs +3 -2
- package/lib/node/helpers/flatten.qwik.mjs +3 -2
- package/lib/node/helpers/localStorage.qwik.cjs +4 -2
- package/lib/node/helpers/localStorage.qwik.mjs +4 -2
- package/lib/node/helpers/omit.qwik.cjs +2 -1
- package/lib/node/helpers/omit.qwik.mjs +2 -1
- package/lib/node/helpers/search/search.qwik.cjs +3 -2
- package/lib/node/helpers/search/search.qwik.mjs +3 -2
- package/lib/node/helpers/sessionId.qwik.cjs +4 -3
- package/lib/node/helpers/sessionId.qwik.mjs +4 -3
- package/lib/node/helpers/subscribe-to-editor.qwik.cjs +10 -5
- package/lib/node/helpers/subscribe-to-editor.qwik.mjs +10 -5
- package/lib/node/helpers/url.qwik.cjs +4 -2
- package/lib/node/helpers/url.qwik.mjs +4 -2
- package/lib/node/helpers/visitorId.qwik.cjs +4 -3
- package/lib/node/helpers/visitorId.qwik.mjs +4 -3
- package/lib/node/scripts/init-editing.qwik.cjs +25 -19
- package/lib/node/scripts/init-editing.qwik.mjs +25 -19
- package/package.json +3 -5
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/evaluate/should-force-browser-runtime-in-node.d.ts +3 -1
- package/types/src/server-index.d.ts +1 -0
- package/lib/browser/constants/sdk-name.qwik.cjs +0 -15
- package/lib/browser/constants/sdk-name.qwik.mjs +0 -15
- package/lib/browser/functions/evaluate/node-runtime/init.qwik.cjs +0 -9
- package/lib/browser/functions/evaluate/node-runtime/init.qwik.mjs +0 -9
- package/lib/browser/functions/evaluate/node-runtime/node-runtime.qwik.cjs +0 -47
- package/lib/browser/functions/evaluate/node-runtime/node-runtime.qwik.mjs +0 -47
- package/lib/browser/functions/evaluate/node-runtime/safeDynamicRequire.qwik.cjs +0 -15
- package/lib/browser/functions/evaluate/node-runtime/safeDynamicRequire.qwik.mjs +0 -15
- package/lib/edge/constants/sdk-name.qwik.cjs +0 -15
- package/lib/edge/constants/sdk-name.qwik.mjs +0 -15
- package/lib/edge/functions/evaluate/node-runtime/init.qwik.cjs +0 -9
- package/lib/edge/functions/evaluate/node-runtime/init.qwik.mjs +0 -9
- package/lib/edge/functions/evaluate/node-runtime/node-runtime.qwik.cjs +0 -47
- package/lib/edge/functions/evaluate/node-runtime/node-runtime.qwik.mjs +0 -47
- package/lib/edge/functions/evaluate/node-runtime/safeDynamicRequire.qwik.cjs +0 -15
- package/lib/edge/functions/evaluate/node-runtime/safeDynamicRequire.qwik.mjs +0 -15
|
@@ -1,14 +1,18 @@
|
|
|
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
|
-
|
|
6
|
+
}
|
|
7
|
+
if (typeof window !== "undefined") {
|
|
7
8
|
return window;
|
|
8
|
-
|
|
9
|
+
}
|
|
10
|
+
if (typeof global !== "undefined") {
|
|
9
11
|
return global;
|
|
10
|
-
|
|
12
|
+
}
|
|
13
|
+
if (typeof self !== "undefined") {
|
|
11
14
|
return self;
|
|
15
|
+
}
|
|
12
16
|
return globalThis;
|
|
13
17
|
}
|
|
14
18
|
exports.getGlobalThis = getGlobalThis;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
function getGlobalThis() {
|
|
2
|
-
if (typeof globalThis !== "undefined")
|
|
2
|
+
if (typeof globalThis !== "undefined") {
|
|
3
3
|
return globalThis;
|
|
4
|
-
|
|
4
|
+
}
|
|
5
|
+
if (typeof window !== "undefined") {
|
|
5
6
|
return window;
|
|
6
|
-
|
|
7
|
+
}
|
|
8
|
+
if (typeof global !== "undefined") {
|
|
7
9
|
return global;
|
|
8
|
-
|
|
10
|
+
}
|
|
11
|
+
if (typeof self !== "undefined") {
|
|
9
12
|
return self;
|
|
13
|
+
}
|
|
10
14
|
return globalThis;
|
|
11
15
|
}
|
|
12
16
|
export {
|
|
@@ -7,16 +7,21 @@ 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
|
-
|
|
12
|
+
}
|
|
13
|
+
if (Array.isArray(obj)) {
|
|
13
14
|
return obj.map((item) => deepCloneWithConditions(item));
|
|
14
|
-
|
|
15
|
+
}
|
|
16
|
+
if (obj["@type"] === "@builder.io/sdk:Element") {
|
|
15
17
|
return obj;
|
|
18
|
+
}
|
|
16
19
|
const clonedObj = {};
|
|
17
|
-
for (const key in obj)
|
|
18
|
-
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key))
|
|
20
|
+
for (const key in obj) {
|
|
21
|
+
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
19
22
|
clonedObj[key] = deepCloneWithConditions(obj[key]);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
20
25
|
return clonedObj;
|
|
21
26
|
}
|
|
22
27
|
const IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK = [
|
|
@@ -55,8 +60,9 @@ const getCopy = (block) => {
|
|
|
55
60
|
}
|
|
56
61
|
};
|
|
57
62
|
const evaluateBindings = ({ block, context, localState, rootState, rootSetState }) => {
|
|
58
|
-
if (!block.bindings)
|
|
63
|
+
if (!block.bindings) {
|
|
59
64
|
return block;
|
|
65
|
+
}
|
|
60
66
|
const copied = getCopy(block);
|
|
61
67
|
for (const binding in block.bindings) {
|
|
62
68
|
const expression = block.bindings[binding];
|
|
@@ -74,7 +80,7 @@ const evaluateBindings = ({ block, context, localState, rootState, rootSetState
|
|
|
74
80
|
};
|
|
75
81
|
function getProcessedBlock({ block, context, shouldEvaluateBindings, localState, rootState, rootSetState }) {
|
|
76
82
|
const transformedBlock = transformBlock.transformBlock(block);
|
|
77
|
-
if (shouldEvaluateBindings)
|
|
83
|
+
if (shouldEvaluateBindings) {
|
|
78
84
|
return evaluateBindings({
|
|
79
85
|
block: transformedBlock,
|
|
80
86
|
localState,
|
|
@@ -82,8 +88,9 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
82
88
|
rootSetState,
|
|
83
89
|
context
|
|
84
90
|
});
|
|
85
|
-
else
|
|
91
|
+
} else {
|
|
86
92
|
return transformedBlock;
|
|
93
|
+
}
|
|
87
94
|
}
|
|
88
95
|
exports.deepCloneWithConditions = deepCloneWithConditions;
|
|
89
96
|
exports.getProcessedBlock = getProcessedBlock;
|
|
@@ -5,16 +5,21 @@ 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
|
-
|
|
10
|
+
}
|
|
11
|
+
if (Array.isArray(obj)) {
|
|
11
12
|
return obj.map((item) => deepCloneWithConditions(item));
|
|
12
|
-
|
|
13
|
+
}
|
|
14
|
+
if (obj["@type"] === "@builder.io/sdk:Element") {
|
|
13
15
|
return obj;
|
|
16
|
+
}
|
|
14
17
|
const clonedObj = {};
|
|
15
|
-
for (const key in obj)
|
|
16
|
-
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key))
|
|
18
|
+
for (const key in obj) {
|
|
19
|
+
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
17
20
|
clonedObj[key] = deepCloneWithConditions(obj[key]);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
18
23
|
return clonedObj;
|
|
19
24
|
}
|
|
20
25
|
const IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK = [
|
|
@@ -53,8 +58,9 @@ const getCopy = (block) => {
|
|
|
53
58
|
}
|
|
54
59
|
};
|
|
55
60
|
const evaluateBindings = ({ block, context, localState, rootState, rootSetState }) => {
|
|
56
|
-
if (!block.bindings)
|
|
61
|
+
if (!block.bindings) {
|
|
57
62
|
return block;
|
|
63
|
+
}
|
|
58
64
|
const copied = getCopy(block);
|
|
59
65
|
for (const binding in block.bindings) {
|
|
60
66
|
const expression = block.bindings[binding];
|
|
@@ -72,7 +78,7 @@ const evaluateBindings = ({ block, context, localState, rootState, rootSetState
|
|
|
72
78
|
};
|
|
73
79
|
function getProcessedBlock({ block, context, shouldEvaluateBindings, localState, rootState, rootSetState }) {
|
|
74
80
|
const transformedBlock = transformBlock(block);
|
|
75
|
-
if (shouldEvaluateBindings)
|
|
81
|
+
if (shouldEvaluateBindings) {
|
|
76
82
|
return evaluateBindings({
|
|
77
83
|
block: transformedBlock,
|
|
78
84
|
localState,
|
|
@@ -80,8 +86,9 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
80
86
|
rootSetState,
|
|
81
87
|
context
|
|
82
88
|
});
|
|
83
|
-
else
|
|
89
|
+
} else {
|
|
84
90
|
return transformedBlock;
|
|
91
|
+
}
|
|
85
92
|
}
|
|
86
93
|
export {
|
|
87
94
|
deepCloneWithConditions,
|
|
@@ -8,8 +8,9 @@ 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
|
+
}
|
|
13
14
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
14
15
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
15
16
|
}
|
|
@@ -6,8 +6,9 @@ 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
|
+
}
|
|
11
12
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
12
13
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
13
14
|
}
|
|
@@ -4,8 +4,9 @@ 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
|
+
}
|
|
9
10
|
const normalizedSearch = search.getSearchString(search$1);
|
|
10
11
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
11
12
|
}
|
|
@@ -2,8 +2,9 @@ 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
|
+
}
|
|
7
8
|
const normalizedSearch = getSearchString(search);
|
|
8
9
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
9
10
|
}
|
|
@@ -11,8 +11,9 @@ 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
|
+
}
|
|
16
17
|
return value;
|
|
17
18
|
}));
|
|
18
19
|
}
|
|
@@ -9,8 +9,9 @@ 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
|
+
}
|
|
14
15
|
return value;
|
|
15
16
|
}));
|
|
16
17
|
}
|
|
@@ -4,11 +4,13 @@ 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
|
+
}
|
|
9
10
|
let typeList = registry[type];
|
|
10
|
-
if (!typeList)
|
|
11
|
+
if (!typeList) {
|
|
11
12
|
typeList = registry[type] = [];
|
|
13
|
+
}
|
|
12
14
|
typeList.push(info);
|
|
13
15
|
if (isBrowser.isBrowser()) {
|
|
14
16
|
const message = {
|
|
@@ -20,8 +22,9 @@ function register(type, info) {
|
|
|
20
22
|
};
|
|
21
23
|
try {
|
|
22
24
|
parent.postMessage(message, "*");
|
|
23
|
-
if (parent !== window)
|
|
25
|
+
if (parent !== window) {
|
|
24
26
|
window.postMessage(message, "*");
|
|
27
|
+
}
|
|
25
28
|
} catch (err) {
|
|
26
29
|
console.debug("Could not postmessage", err);
|
|
27
30
|
}
|
|
@@ -2,11 +2,13 @@ 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
|
+
}
|
|
7
8
|
let typeList = registry[type];
|
|
8
|
-
if (!typeList)
|
|
9
|
+
if (!typeList) {
|
|
9
10
|
typeList = registry[type] = [];
|
|
11
|
+
}
|
|
10
12
|
typeList.push(info);
|
|
11
13
|
if (isBrowser()) {
|
|
12
14
|
const message = {
|
|
@@ -18,8 +20,9 @@ function register(type, info) {
|
|
|
18
20
|
};
|
|
19
21
|
try {
|
|
20
22
|
parent.postMessage(message, "*");
|
|
21
|
-
if (parent !== window)
|
|
23
|
+
if (parent !== window) {
|
|
22
24
|
window.postMessage(message, "*");
|
|
25
|
+
}
|
|
23
26
|
} catch (err) {
|
|
24
27
|
console.debug("Could not postmessage", err);
|
|
25
28
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
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
|
+
}
|
|
6
7
|
const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
|
|
7
8
|
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;
|
|
8
9
|
return obj;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const set = (obj, _path, value) => {
|
|
2
|
-
if (Object(obj) !== obj)
|
|
2
|
+
if (Object(obj) !== obj) {
|
|
3
3
|
return obj;
|
|
4
|
+
}
|
|
4
5
|
const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
|
|
5
6
|
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;
|
|
6
7
|
return obj;
|
|
@@ -5,8 +5,9 @@ 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
|
+
}
|
|
10
11
|
return parsedLocation;
|
|
11
12
|
} else {
|
|
12
13
|
console.warn("Cannot get location for tracking in non-browser environment");
|
|
@@ -3,8 +3,9 @@ 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
|
+
}
|
|
8
9
|
return parsedLocation;
|
|
9
10
|
} else {
|
|
10
11
|
console.warn("Cannot get location for tracking in non-browser environment");
|
|
@@ -8,11 +8,12 @@ const isBrowser = require("../is-browser.qwik.cjs");
|
|
|
8
8
|
const isEditing = require("../is-editing.qwik.cjs");
|
|
9
9
|
const helpers = require("./helpers.qwik.cjs");
|
|
10
10
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
11
|
-
if (!canTrack)
|
|
11
|
+
if (!canTrack) {
|
|
12
12
|
return {
|
|
13
13
|
visitorId: void 0,
|
|
14
14
|
sessionId: void 0
|
|
15
15
|
};
|
|
16
|
+
}
|
|
16
17
|
const sessionId$1 = await sessionId.getSessionId({
|
|
17
18
|
canTrack
|
|
18
19
|
});
|
|
@@ -44,12 +45,15 @@ async function _track(eventProps) {
|
|
|
44
45
|
logger.logger.error("Missing API key for track call. Please provide your API key.");
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
if (!eventProps.canTrack)
|
|
48
|
+
if (!eventProps.canTrack) {
|
|
48
49
|
return;
|
|
49
|
-
|
|
50
|
+
}
|
|
51
|
+
if (isEditing.isEditing()) {
|
|
50
52
|
return;
|
|
51
|
-
|
|
53
|
+
}
|
|
54
|
+
if (!(isBrowser.isBrowser() || target.TARGET === "reactNative")) {
|
|
52
55
|
return;
|
|
56
|
+
}
|
|
53
57
|
return fetch(`https://cdn.builder.io/api/v1/track`, {
|
|
54
58
|
method: "POST",
|
|
55
59
|
body: JSON.stringify({
|
|
@@ -6,11 +6,12 @@ import { isBrowser } from "../is-browser.qwik.mjs";
|
|
|
6
6
|
import { isEditing } from "../is-editing.qwik.mjs";
|
|
7
7
|
import { getUserAttributes } from "./helpers.qwik.mjs";
|
|
8
8
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
9
|
-
if (!canTrack)
|
|
9
|
+
if (!canTrack) {
|
|
10
10
|
return {
|
|
11
11
|
visitorId: void 0,
|
|
12
12
|
sessionId: void 0
|
|
13
13
|
};
|
|
14
|
+
}
|
|
14
15
|
const sessionId = await getSessionId({
|
|
15
16
|
canTrack
|
|
16
17
|
});
|
|
@@ -42,12 +43,15 @@ async function _track(eventProps) {
|
|
|
42
43
|
logger.error("Missing API key for track call. Please provide your API key.");
|
|
43
44
|
return;
|
|
44
45
|
}
|
|
45
|
-
if (!eventProps.canTrack)
|
|
46
|
+
if (!eventProps.canTrack) {
|
|
46
47
|
return;
|
|
47
|
-
|
|
48
|
+
}
|
|
49
|
+
if (isEditing()) {
|
|
48
50
|
return;
|
|
49
|
-
|
|
51
|
+
}
|
|
52
|
+
if (!(isBrowser() || TARGET === "reactNative")) {
|
|
50
53
|
return;
|
|
54
|
+
}
|
|
51
55
|
return fetch(`https://cdn.builder.io/api/v1/track`, {
|
|
52
56
|
method: "POST",
|
|
53
57
|
body: JSON.stringify({
|
|
@@ -4,15 +4,18 @@ 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
|
+
}
|
|
9
10
|
let parent = checkElement ? target : target.parentElement;
|
|
10
11
|
do {
|
|
11
|
-
if (!parent)
|
|
12
|
+
if (!parent) {
|
|
12
13
|
return null;
|
|
14
|
+
}
|
|
13
15
|
const matches = callback(parent);
|
|
14
|
-
if (matches)
|
|
16
|
+
if (matches) {
|
|
15
17
|
return parent;
|
|
18
|
+
}
|
|
16
19
|
} while (parent = parent.parentElement);
|
|
17
20
|
return null;
|
|
18
21
|
};
|
|
@@ -2,15 +2,18 @@ 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
|
+
}
|
|
7
8
|
let parent = checkElement ? target : target.parentElement;
|
|
8
9
|
do {
|
|
9
|
-
if (!parent)
|
|
10
|
+
if (!parent) {
|
|
10
11
|
return null;
|
|
12
|
+
}
|
|
11
13
|
const matches = callback(parent);
|
|
12
|
-
if (matches)
|
|
14
|
+
if (matches) {
|
|
13
15
|
return parent;
|
|
16
|
+
}
|
|
14
17
|
} while (parent = parent.parentElement);
|
|
15
18
|
return null;
|
|
16
19
|
};
|
|
@@ -26,8 +26,9 @@ 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
|
+
}
|
|
31
32
|
}
|
|
32
33
|
return id;
|
|
33
34
|
};
|
|
@@ -44,25 +45,29 @@ const getAndSetVariantId = (args) => {
|
|
|
44
45
|
const getTestFields = ({ item, testGroupId }) => {
|
|
45
46
|
const variationValue = item.variations[testGroupId];
|
|
46
47
|
if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
47
|
-
!variationValue)
|
|
48
|
+
!variationValue) {
|
|
48
49
|
return {
|
|
49
50
|
testVariationId: item.id,
|
|
50
51
|
testVariationName: "Default"
|
|
51
52
|
};
|
|
52
|
-
else
|
|
53
|
+
} else {
|
|
53
54
|
return {
|
|
54
55
|
data: variationValue.data,
|
|
55
56
|
testVariationId: variationValue.id,
|
|
56
57
|
testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
|
|
57
58
|
};
|
|
59
|
+
}
|
|
58
60
|
};
|
|
59
61
|
const handleABTestingSync = ({ item, canTrack }) => {
|
|
60
|
-
if (!canTrack)
|
|
62
|
+
if (!canTrack) {
|
|
61
63
|
return item;
|
|
62
|
-
|
|
64
|
+
}
|
|
65
|
+
if (!item) {
|
|
63
66
|
return void 0;
|
|
64
|
-
|
|
67
|
+
}
|
|
68
|
+
if (!checkIsBuilderContentWithVariations(item)) {
|
|
65
69
|
return item;
|
|
70
|
+
}
|
|
66
71
|
const testGroupId = getContentVariationCookieSync({
|
|
67
72
|
contentId: item.id
|
|
68
73
|
}) || getAndSetVariantId({
|
|
@@ -79,10 +84,12 @@ const handleABTestingSync = ({ item, canTrack }) => {
|
|
|
79
84
|
};
|
|
80
85
|
};
|
|
81
86
|
const handleABTesting = async ({ item, canTrack }) => {
|
|
82
|
-
if (!canTrack)
|
|
87
|
+
if (!canTrack) {
|
|
83
88
|
return item;
|
|
84
|
-
|
|
89
|
+
}
|
|
90
|
+
if (!checkIsBuilderContentWithVariations(item)) {
|
|
85
91
|
return item;
|
|
92
|
+
}
|
|
86
93
|
const cookieValue = await getContentVariationCookie({
|
|
87
94
|
contentId: item.id
|
|
88
95
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { checkIsDefined } from "./nullable.qwik.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { getCookieSync, getCookie, setCookie } from "./cookie.qwik.mjs";
|
|
3
3
|
import { logger } from "./logger.qwik.mjs";
|
|
4
4
|
const BUILDER_STORE_PREFIX = "builder.tests";
|
|
5
5
|
const getContentTestKey = (id) => `${BUILDER_STORE_PREFIX}.${id}`;
|
|
@@ -24,8 +24,9 @@ const getRandomVariationId = ({ id, variations }) => {
|
|
|
24
24
|
for (const id2 in variations) {
|
|
25
25
|
const testRatio = (_a = variations[id2]) == null ? void 0 : _a.testRatio;
|
|
26
26
|
n += testRatio;
|
|
27
|
-
if (random < n)
|
|
27
|
+
if (random < n) {
|
|
28
28
|
return id2;
|
|
29
|
+
}
|
|
29
30
|
}
|
|
30
31
|
return id;
|
|
31
32
|
};
|
|
@@ -42,25 +43,29 @@ const getAndSetVariantId = (args) => {
|
|
|
42
43
|
const getTestFields = ({ item, testGroupId }) => {
|
|
43
44
|
const variationValue = item.variations[testGroupId];
|
|
44
45
|
if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
|
|
45
|
-
!variationValue)
|
|
46
|
+
!variationValue) {
|
|
46
47
|
return {
|
|
47
48
|
testVariationId: item.id,
|
|
48
49
|
testVariationName: "Default"
|
|
49
50
|
};
|
|
50
|
-
else
|
|
51
|
+
} else {
|
|
51
52
|
return {
|
|
52
53
|
data: variationValue.data,
|
|
53
54
|
testVariationId: variationValue.id,
|
|
54
55
|
testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
|
|
55
56
|
};
|
|
57
|
+
}
|
|
56
58
|
};
|
|
57
59
|
const handleABTestingSync = ({ item, canTrack }) => {
|
|
58
|
-
if (!canTrack)
|
|
60
|
+
if (!canTrack) {
|
|
59
61
|
return item;
|
|
60
|
-
|
|
62
|
+
}
|
|
63
|
+
if (!item) {
|
|
61
64
|
return void 0;
|
|
62
|
-
|
|
65
|
+
}
|
|
66
|
+
if (!checkIsBuilderContentWithVariations(item)) {
|
|
63
67
|
return item;
|
|
68
|
+
}
|
|
64
69
|
const testGroupId = getContentVariationCookieSync({
|
|
65
70
|
contentId: item.id
|
|
66
71
|
}) || getAndSetVariantId({
|
|
@@ -77,10 +82,12 @@ const handleABTestingSync = ({ item, canTrack }) => {
|
|
|
77
82
|
};
|
|
78
83
|
};
|
|
79
84
|
const handleABTesting = async ({ item, canTrack }) => {
|
|
80
|
-
if (!canTrack)
|
|
85
|
+
if (!canTrack) {
|
|
81
86
|
return item;
|
|
82
|
-
|
|
87
|
+
}
|
|
88
|
+
if (!checkIsBuilderContentWithVariations(item)) {
|
|
83
89
|
return item;
|
|
90
|
+
}
|
|
84
91
|
const cookieValue = await getContentVariationCookie({
|
|
85
92
|
contentId: item.id
|
|
86
93
|
});
|
|
@@ -7,8 +7,9 @@ const url = require("./url.qwik.cjs");
|
|
|
7
7
|
const getCookieSync = ({ name, canTrack }) => {
|
|
8
8
|
var _a;
|
|
9
9
|
try {
|
|
10
|
-
if (!canTrack)
|
|
10
|
+
if (!canTrack) {
|
|
11
11
|
return void 0;
|
|
12
|
+
}
|
|
12
13
|
return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
|
|
13
14
|
} catch (err) {
|
|
14
15
|
logger.logger.warn("[COOKIE] GET error: ", (err == null ? void 0 : err.message) || err);
|
|
@@ -61,8 +62,9 @@ const createCookieString = ({ name, value, expires }) => {
|
|
|
61
62
|
};
|
|
62
63
|
const setCookie = async ({ name, value, expires, canTrack }) => {
|
|
63
64
|
try {
|
|
64
|
-
if (!canTrack)
|
|
65
|
+
if (!canTrack) {
|
|
65
66
|
return;
|
|
67
|
+
}
|
|
66
68
|
const cookie = createCookieString({
|
|
67
69
|
name,
|
|
68
70
|
value,
|
|
@@ -5,8 +5,9 @@ import { getTopLevelDomain } from "./url.qwik.mjs";
|
|
|
5
5
|
const getCookieSync = ({ name, canTrack }) => {
|
|
6
6
|
var _a;
|
|
7
7
|
try {
|
|
8
|
-
if (!canTrack)
|
|
8
|
+
if (!canTrack) {
|
|
9
9
|
return void 0;
|
|
10
|
+
}
|
|
10
11
|
return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
|
|
11
12
|
} catch (err) {
|
|
12
13
|
logger.warn("[COOKIE] GET error: ", (err == null ? void 0 : err.message) || err);
|
|
@@ -59,8 +60,9 @@ const createCookieString = ({ name, value, expires }) => {
|
|
|
59
60
|
};
|
|
60
61
|
const setCookie = async ({ name, value, expires, canTrack }) => {
|
|
61
62
|
try {
|
|
62
|
-
if (!canTrack)
|
|
63
|
+
if (!canTrack) {
|
|
63
64
|
return;
|
|
65
|
+
}
|
|
64
66
|
const cookie = createCookieString({
|
|
65
67
|
name,
|
|
66
68
|
value,
|
|
@@ -4,10 +4,11 @@ const camelToKebabCase = require("../functions/camel-to-kebab-case.qwik.cjs");
|
|
|
4
4
|
const nullable = require("./nullable.qwik.cjs");
|
|
5
5
|
const convertStyleMapToCSSArray = (style) => {
|
|
6
6
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
7
|
-
if (typeof value === "string")
|
|
7
|
+
if (typeof value === "string") {
|
|
8
8
|
return `${camelToKebabCase.camelToKebabCase(key)}: ${value};`;
|
|
9
|
-
else
|
|
9
|
+
} else {
|
|
10
10
|
return void 0;
|
|
11
|
+
}
|
|
11
12
|
});
|
|
12
13
|
return cssProps.filter(nullable.checkIsDefined);
|
|
13
14
|
};
|
|
@@ -16,12 +17,13 @@ const createCssClass = ({ mediaQuery, className, styles }) => {
|
|
|
16
17
|
const cssClass = `.${className} {
|
|
17
18
|
${convertStyleMapToCSS(styles)}
|
|
18
19
|
}`;
|
|
19
|
-
if (mediaQuery)
|
|
20
|
+
if (mediaQuery) {
|
|
20
21
|
return `${mediaQuery} {
|
|
21
22
|
${cssClass}
|
|
22
23
|
}`;
|
|
23
|
-
else
|
|
24
|
+
} else {
|
|
24
25
|
return cssClass;
|
|
26
|
+
}
|
|
25
27
|
};
|
|
26
28
|
exports.convertStyleMapToCSS = convertStyleMapToCSS;
|
|
27
29
|
exports.convertStyleMapToCSSArray = convertStyleMapToCSSArray;
|