@builder.io/sdk-qwik 0.16.11 → 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 +2 -2
- 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/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
|
@@ -5,8 +5,9 @@ const getLocalStorage = () => isBrowser.isBrowser() && typeof localStorage !== "
|
|
|
5
5
|
const getLocalStorageItem = ({ key, canTrack }) => {
|
|
6
6
|
var _a;
|
|
7
7
|
try {
|
|
8
|
-
if (canTrack)
|
|
8
|
+
if (canTrack) {
|
|
9
9
|
return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
|
|
10
|
+
}
|
|
10
11
|
return void 0;
|
|
11
12
|
} catch (err) {
|
|
12
13
|
console.debug("[LocalStorage] GET error: ", err);
|
|
@@ -16,8 +17,9 @@ const getLocalStorageItem = ({ key, canTrack }) => {
|
|
|
16
17
|
const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
17
18
|
var _a;
|
|
18
19
|
try {
|
|
19
|
-
if (canTrack)
|
|
20
|
+
if (canTrack) {
|
|
20
21
|
(_a = getLocalStorage()) == null ? void 0 : _a.setItem(key, value);
|
|
22
|
+
}
|
|
21
23
|
} catch (err) {
|
|
22
24
|
console.debug("[LocalStorage] SET error: ", err);
|
|
23
25
|
}
|
|
@@ -3,8 +3,9 @@ const getLocalStorage = () => isBrowser() && typeof localStorage !== "undefined"
|
|
|
3
3
|
const getLocalStorageItem = ({ key, canTrack }) => {
|
|
4
4
|
var _a;
|
|
5
5
|
try {
|
|
6
|
-
if (canTrack)
|
|
6
|
+
if (canTrack) {
|
|
7
7
|
return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
|
|
8
|
+
}
|
|
8
9
|
return void 0;
|
|
9
10
|
} catch (err) {
|
|
10
11
|
console.debug("[LocalStorage] GET error: ", err);
|
|
@@ -14,8 +15,9 @@ const getLocalStorageItem = ({ key, canTrack }) => {
|
|
|
14
15
|
const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
15
16
|
var _a;
|
|
16
17
|
try {
|
|
17
|
-
if (canTrack)
|
|
18
|
+
if (canTrack) {
|
|
18
19
|
(_a = getLocalStorage()) == null ? void 0 : _a.setItem(key, value);
|
|
20
|
+
}
|
|
19
21
|
} catch (err) {
|
|
20
22
|
console.debug("[LocalStorage] SET error: ", err);
|
|
21
23
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
function omit(obj, ...values) {
|
|
4
4
|
const newObject = Object.assign({}, obj);
|
|
5
|
-
for (const key of values)
|
|
5
|
+
for (const key of values) {
|
|
6
6
|
delete newObject[key];
|
|
7
|
+
}
|
|
7
8
|
return newObject;
|
|
8
9
|
}
|
|
9
10
|
exports.omit = omit;
|
|
@@ -9,10 +9,11 @@ const convertSearchParamsToQueryObject = (searchParams) => {
|
|
|
9
9
|
};
|
|
10
10
|
const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
|
|
11
11
|
const getSearchString = (search) => {
|
|
12
|
-
if (typeof search === "string")
|
|
12
|
+
if (typeof search === "string") {
|
|
13
13
|
return search;
|
|
14
|
-
else if (search instanceof URLSearchParams)
|
|
14
|
+
} else if (search instanceof URLSearchParams) {
|
|
15
15
|
return search.toString();
|
|
16
|
+
}
|
|
16
17
|
return new URLSearchParams(search).toString();
|
|
17
18
|
};
|
|
18
19
|
exports.convertSearchParamsToQueryObject = convertSearchParamsToQueryObject;
|
|
@@ -7,10 +7,11 @@ const convertSearchParamsToQueryObject = (searchParams) => {
|
|
|
7
7
|
};
|
|
8
8
|
const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
|
|
9
9
|
const getSearchString = (search) => {
|
|
10
|
-
if (typeof search === "string")
|
|
10
|
+
if (typeof search === "string") {
|
|
11
11
|
return search;
|
|
12
|
-
else if (search instanceof URLSearchParams)
|
|
12
|
+
} else if (search instanceof URLSearchParams) {
|
|
13
13
|
return search.toString();
|
|
14
|
+
}
|
|
14
15
|
return new URLSearchParams(search).toString();
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
@@ -5,15 +5,16 @@ const nullable = require("./nullable.qwik.cjs");
|
|
|
5
5
|
const uuid = require("./uuid.qwik.cjs");
|
|
6
6
|
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
7
7
|
const getSessionId = async ({ canTrack }) => {
|
|
8
|
-
if (!canTrack)
|
|
8
|
+
if (!canTrack) {
|
|
9
9
|
return void 0;
|
|
10
|
+
}
|
|
10
11
|
const sessionId = await cookie.getCookie({
|
|
11
12
|
name: SESSION_LOCAL_STORAGE_KEY,
|
|
12
13
|
canTrack
|
|
13
14
|
});
|
|
14
|
-
if (nullable.checkIsDefined(sessionId))
|
|
15
|
+
if (nullable.checkIsDefined(sessionId)) {
|
|
15
16
|
return sessionId;
|
|
16
|
-
else {
|
|
17
|
+
} else {
|
|
17
18
|
const newSessionId = createSessionId();
|
|
18
19
|
setSessionId({
|
|
19
20
|
id: newSessionId,
|
|
@@ -3,15 +3,16 @@ import { checkIsDefined } from "./nullable.qwik.mjs";
|
|
|
3
3
|
import { uuid } from "./uuid.qwik.mjs";
|
|
4
4
|
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
5
5
|
const getSessionId = async ({ canTrack }) => {
|
|
6
|
-
if (!canTrack)
|
|
6
|
+
if (!canTrack) {
|
|
7
7
|
return void 0;
|
|
8
|
+
}
|
|
8
9
|
const sessionId = await getCookie({
|
|
9
10
|
name: SESSION_LOCAL_STORAGE_KEY,
|
|
10
11
|
canTrack
|
|
11
12
|
});
|
|
12
|
-
if (checkIsDefined(sessionId))
|
|
13
|
+
if (checkIsDefined(sessionId)) {
|
|
13
14
|
return sessionId;
|
|
14
|
-
else {
|
|
15
|
+
} else {
|
|
15
16
|
const newSessionId = createSessionId();
|
|
16
17
|
setSessionId({
|
|
17
18
|
id: newSessionId,
|
|
@@ -6,26 +6,31 @@ const initEditing = require("../scripts/init-editing.qwik.cjs");
|
|
|
6
6
|
const logger = require("./logger.qwik.cjs");
|
|
7
7
|
const createEditorListener = ({ model, trustedHosts, callbacks }) => {
|
|
8
8
|
return (event) => {
|
|
9
|
-
if (!isFromTrustedHost.isFromTrustedHost(trustedHosts, event))
|
|
9
|
+
if (!isFromTrustedHost.isFromTrustedHost(trustedHosts, event)) {
|
|
10
10
|
return;
|
|
11
|
+
}
|
|
11
12
|
const { data } = event;
|
|
12
|
-
if (data)
|
|
13
|
+
if (data) {
|
|
13
14
|
switch (data.type) {
|
|
14
|
-
case "builder.configureSdk":
|
|
15
|
+
case "builder.configureSdk": {
|
|
15
16
|
callbacks.configureSdk(data.data);
|
|
16
17
|
break;
|
|
17
|
-
|
|
18
|
+
}
|
|
19
|
+
case "builder.triggerAnimation": {
|
|
18
20
|
callbacks.animation(data.data);
|
|
19
21
|
break;
|
|
22
|
+
}
|
|
20
23
|
case "builder.contentUpdate": {
|
|
21
24
|
const messageContent = data.data;
|
|
22
25
|
const key = messageContent.key || messageContent.alias || messageContent.entry || messageContent.modelName;
|
|
23
26
|
const contentData = messageContent.data;
|
|
24
|
-
if (key === model)
|
|
27
|
+
if (key === model) {
|
|
25
28
|
callbacks.contentUpdate(contentData);
|
|
29
|
+
}
|
|
26
30
|
break;
|
|
27
31
|
}
|
|
28
32
|
}
|
|
33
|
+
}
|
|
29
34
|
};
|
|
30
35
|
};
|
|
31
36
|
const subscribeToEditor = (model, callback, options) => {
|
|
@@ -4,26 +4,31 @@ import { setupBrowserForEditing } from "../scripts/init-editing.qwik.mjs";
|
|
|
4
4
|
import { logger } from "./logger.qwik.mjs";
|
|
5
5
|
const createEditorListener = ({ model, trustedHosts, callbacks }) => {
|
|
6
6
|
return (event) => {
|
|
7
|
-
if (!isFromTrustedHost(trustedHosts, event))
|
|
7
|
+
if (!isFromTrustedHost(trustedHosts, event)) {
|
|
8
8
|
return;
|
|
9
|
+
}
|
|
9
10
|
const { data } = event;
|
|
10
|
-
if (data)
|
|
11
|
+
if (data) {
|
|
11
12
|
switch (data.type) {
|
|
12
|
-
case "builder.configureSdk":
|
|
13
|
+
case "builder.configureSdk": {
|
|
13
14
|
callbacks.configureSdk(data.data);
|
|
14
15
|
break;
|
|
15
|
-
|
|
16
|
+
}
|
|
17
|
+
case "builder.triggerAnimation": {
|
|
16
18
|
callbacks.animation(data.data);
|
|
17
19
|
break;
|
|
20
|
+
}
|
|
18
21
|
case "builder.contentUpdate": {
|
|
19
22
|
const messageContent = data.data;
|
|
20
23
|
const key = messageContent.key || messageContent.alias || messageContent.entry || messageContent.modelName;
|
|
21
24
|
const contentData = messageContent.data;
|
|
22
|
-
if (key === model)
|
|
25
|
+
if (key === model) {
|
|
23
26
|
callbacks.contentUpdate(contentData);
|
|
27
|
+
}
|
|
24
28
|
break;
|
|
25
29
|
}
|
|
26
30
|
}
|
|
31
|
+
}
|
|
27
32
|
};
|
|
28
33
|
};
|
|
29
34
|
const subscribeToEditor = (model, callback, options) => {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const getTopLevelDomain = (host) => {
|
|
4
|
-
if (host === "localhost" || host === "127.0.0.1")
|
|
4
|
+
if (host === "localhost" || host === "127.0.0.1") {
|
|
5
5
|
return host;
|
|
6
|
+
}
|
|
6
7
|
const parts = host.split(".");
|
|
7
|
-
if (parts.length > 2)
|
|
8
|
+
if (parts.length > 2) {
|
|
8
9
|
return parts.slice(1).join(".");
|
|
10
|
+
}
|
|
9
11
|
return host;
|
|
10
12
|
};
|
|
11
13
|
exports.getTopLevelDomain = getTopLevelDomain;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
const getTopLevelDomain = (host) => {
|
|
2
|
-
if (host === "localhost" || host === "127.0.0.1")
|
|
2
|
+
if (host === "localhost" || host === "127.0.0.1") {
|
|
3
3
|
return host;
|
|
4
|
+
}
|
|
4
5
|
const parts = host.split(".");
|
|
5
|
-
if (parts.length > 2)
|
|
6
|
+
if (parts.length > 2) {
|
|
6
7
|
return parts.slice(1).join(".");
|
|
8
|
+
}
|
|
7
9
|
return host;
|
|
8
10
|
};
|
|
9
11
|
export {
|
|
@@ -5,15 +5,16 @@ const nullable = require("./nullable.qwik.cjs");
|
|
|
5
5
|
const uuid = require("./uuid.qwik.cjs");
|
|
6
6
|
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
7
7
|
const getVisitorId = ({ canTrack }) => {
|
|
8
|
-
if (!canTrack)
|
|
8
|
+
if (!canTrack) {
|
|
9
9
|
return void 0;
|
|
10
|
+
}
|
|
10
11
|
const visitorId = localStorage.getLocalStorageItem({
|
|
11
12
|
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
12
13
|
canTrack
|
|
13
14
|
});
|
|
14
|
-
if (nullable.checkIsDefined(visitorId))
|
|
15
|
+
if (nullable.checkIsDefined(visitorId)) {
|
|
15
16
|
return visitorId;
|
|
16
|
-
else {
|
|
17
|
+
} else {
|
|
17
18
|
const newVisitorId = createVisitorId();
|
|
18
19
|
setVisitorId({
|
|
19
20
|
id: newVisitorId,
|
|
@@ -3,15 +3,16 @@ import { checkIsDefined } from "./nullable.qwik.mjs";
|
|
|
3
3
|
import { uuid } from "./uuid.qwik.mjs";
|
|
4
4
|
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
5
5
|
const getVisitorId = ({ canTrack }) => {
|
|
6
|
-
if (!canTrack)
|
|
6
|
+
if (!canTrack) {
|
|
7
7
|
return void 0;
|
|
8
|
+
}
|
|
8
9
|
const visitorId = getLocalStorageItem({
|
|
9
10
|
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
10
11
|
canTrack
|
|
11
12
|
});
|
|
12
|
-
if (checkIsDefined(visitorId))
|
|
13
|
+
if (checkIsDefined(visitorId)) {
|
|
13
14
|
return visitorId;
|
|
14
|
-
else {
|
|
15
|
+
} else {
|
|
15
16
|
const newVisitorId = createVisitorId();
|
|
16
17
|
setVisitorId({
|
|
17
18
|
id: newVisitorId,
|
|
@@ -42,8 +42,9 @@ const registerInsertMenu = () => {
|
|
|
42
42
|
let isSetupForEditing = false;
|
|
43
43
|
const setupBrowserForEditing = (options = {}) => {
|
|
44
44
|
var _a, _b;
|
|
45
|
-
if (isSetupForEditing)
|
|
45
|
+
if (isSetupForEditing) {
|
|
46
46
|
return;
|
|
47
|
+
}
|
|
47
48
|
isSetupForEditing = true;
|
|
48
49
|
if (isBrowser.isBrowser()) {
|
|
49
50
|
(_a = window.parent) == null ? void 0 : _a.postMessage({
|
|
@@ -66,11 +67,13 @@ const setupBrowserForEditing = (options = {}) => {
|
|
|
66
67
|
}, "*");
|
|
67
68
|
window.addEventListener("message", (event) => {
|
|
68
69
|
var _a2, _b2;
|
|
69
|
-
if (!isFromTrustedHost.isFromTrustedHost(options.trustedHosts, event))
|
|
70
|
+
if (!isFromTrustedHost.isFromTrustedHost(options.trustedHosts, event)) {
|
|
70
71
|
return;
|
|
72
|
+
}
|
|
71
73
|
const { data } = event;
|
|
72
|
-
if (!(data == null ? void 0 : data.type))
|
|
74
|
+
if (!(data == null ? void 0 : data.type)) {
|
|
73
75
|
return;
|
|
76
|
+
}
|
|
74
77
|
switch (data.type) {
|
|
75
78
|
case "builder.evaluate": {
|
|
76
79
|
const text = data.data.text;
|
|
@@ -84,7 +87,7 @@ const setupBrowserForEditing = (options = {}) => {
|
|
|
84
87
|
} catch (err) {
|
|
85
88
|
error = err;
|
|
86
89
|
}
|
|
87
|
-
if (error)
|
|
90
|
+
if (error) {
|
|
88
91
|
(_a2 = window.parent) == null ? void 0 : _a2.postMessage({
|
|
89
92
|
type: "builder.evaluateError",
|
|
90
93
|
data: {
|
|
@@ -92,25 +95,28 @@ const setupBrowserForEditing = (options = {}) => {
|
|
|
92
95
|
error: error.message
|
|
93
96
|
}
|
|
94
97
|
}, "*");
|
|
95
|
-
else
|
|
96
|
-
result.then
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
} else {
|
|
99
|
+
if (result && typeof result.then === "function") {
|
|
100
|
+
result.then((finalResult) => {
|
|
101
|
+
var _a3;
|
|
102
|
+
(_a3 = window.parent) == null ? void 0 : _a3.postMessage({
|
|
103
|
+
type: "builder.evaluateResult",
|
|
104
|
+
data: {
|
|
105
|
+
id,
|
|
106
|
+
result: finalResult
|
|
107
|
+
}
|
|
108
|
+
}, "*");
|
|
109
|
+
}).catch(console.error);
|
|
110
|
+
} else {
|
|
111
|
+
(_b2 = window.parent) == null ? void 0 : _b2.postMessage({
|
|
99
112
|
type: "builder.evaluateResult",
|
|
100
113
|
data: {
|
|
101
|
-
|
|
102
|
-
|
|
114
|
+
result,
|
|
115
|
+
id
|
|
103
116
|
}
|
|
104
117
|
}, "*");
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
(_b2 = window.parent) == null ? void 0 : _b2.postMessage({
|
|
108
|
-
type: "builder.evaluateResult",
|
|
109
|
-
data: {
|
|
110
|
-
result,
|
|
111
|
-
id
|
|
112
|
-
}
|
|
113
|
-
}, "*");
|
|
118
|
+
}
|
|
119
|
+
}
|
|
114
120
|
break;
|
|
115
121
|
}
|
|
116
122
|
}
|
|
@@ -40,8 +40,9 @@ const registerInsertMenu = () => {
|
|
|
40
40
|
let isSetupForEditing = false;
|
|
41
41
|
const setupBrowserForEditing = (options = {}) => {
|
|
42
42
|
var _a, _b;
|
|
43
|
-
if (isSetupForEditing)
|
|
43
|
+
if (isSetupForEditing) {
|
|
44
44
|
return;
|
|
45
|
+
}
|
|
45
46
|
isSetupForEditing = true;
|
|
46
47
|
if (isBrowser()) {
|
|
47
48
|
(_a = window.parent) == null ? void 0 : _a.postMessage({
|
|
@@ -64,11 +65,13 @@ const setupBrowserForEditing = (options = {}) => {
|
|
|
64
65
|
}, "*");
|
|
65
66
|
window.addEventListener("message", (event) => {
|
|
66
67
|
var _a2, _b2;
|
|
67
|
-
if (!isFromTrustedHost(options.trustedHosts, event))
|
|
68
|
+
if (!isFromTrustedHost(options.trustedHosts, event)) {
|
|
68
69
|
return;
|
|
70
|
+
}
|
|
69
71
|
const { data } = event;
|
|
70
|
-
if (!(data == null ? void 0 : data.type))
|
|
72
|
+
if (!(data == null ? void 0 : data.type)) {
|
|
71
73
|
return;
|
|
74
|
+
}
|
|
72
75
|
switch (data.type) {
|
|
73
76
|
case "builder.evaluate": {
|
|
74
77
|
const text = data.data.text;
|
|
@@ -82,7 +85,7 @@ const setupBrowserForEditing = (options = {}) => {
|
|
|
82
85
|
} catch (err) {
|
|
83
86
|
error = err;
|
|
84
87
|
}
|
|
85
|
-
if (error)
|
|
88
|
+
if (error) {
|
|
86
89
|
(_a2 = window.parent) == null ? void 0 : _a2.postMessage({
|
|
87
90
|
type: "builder.evaluateError",
|
|
88
91
|
data: {
|
|
@@ -90,25 +93,28 @@ const setupBrowserForEditing = (options = {}) => {
|
|
|
90
93
|
error: error.message
|
|
91
94
|
}
|
|
92
95
|
}, "*");
|
|
93
|
-
else
|
|
94
|
-
result.then
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
} else {
|
|
97
|
+
if (result && typeof result.then === "function") {
|
|
98
|
+
result.then((finalResult) => {
|
|
99
|
+
var _a3;
|
|
100
|
+
(_a3 = window.parent) == null ? void 0 : _a3.postMessage({
|
|
101
|
+
type: "builder.evaluateResult",
|
|
102
|
+
data: {
|
|
103
|
+
id,
|
|
104
|
+
result: finalResult
|
|
105
|
+
}
|
|
106
|
+
}, "*");
|
|
107
|
+
}).catch(console.error);
|
|
108
|
+
} else {
|
|
109
|
+
(_b2 = window.parent) == null ? void 0 : _b2.postMessage({
|
|
97
110
|
type: "builder.evaluateResult",
|
|
98
111
|
data: {
|
|
99
|
-
|
|
100
|
-
|
|
112
|
+
result,
|
|
113
|
+
id
|
|
101
114
|
}
|
|
102
115
|
}, "*");
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
(_b2 = window.parent) == null ? void 0 : _b2.postMessage({
|
|
106
|
-
type: "builder.evaluateResult",
|
|
107
|
-
data: {
|
|
108
|
-
result,
|
|
109
|
-
id
|
|
110
|
-
}
|
|
111
|
-
}, "*");
|
|
116
|
+
}
|
|
117
|
+
}
|
|
112
118
|
break;
|
|
113
119
|
}
|
|
114
120
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-qwik",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.13",
|
|
4
4
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/qwik",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"isolated-vm": "^5.0.0"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
-
"@builder.io/qwik": "^1.
|
|
118
|
+
"@builder.io/qwik": "^1.7.3",
|
|
119
119
|
"@builder.io/sdks": "workspace:*",
|
|
120
120
|
"@types/node": "latest",
|
|
121
121
|
"typescript": "5.5.2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.16.
|
|
1
|
+
export declare const SDK_VERSION = "0.16.13";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const target = require("./target.qwik.cjs");
|
|
4
|
-
const SDK_NAME_FOR_TARGET = (() => {
|
|
5
|
-
switch (target.TARGET) {
|
|
6
|
-
case "rsc":
|
|
7
|
-
return "react-nextjs";
|
|
8
|
-
case "reactNative":
|
|
9
|
-
return "react-native";
|
|
10
|
-
default:
|
|
11
|
-
return target.TARGET;
|
|
12
|
-
}
|
|
13
|
-
})();
|
|
14
|
-
const SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`;
|
|
15
|
-
exports.SDK_NAME = SDK_NAME;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TARGET } from "./target.qwik.mjs";
|
|
2
|
-
const SDK_NAME_FOR_TARGET = (() => {
|
|
3
|
-
switch (TARGET) {
|
|
4
|
-
case "rsc":
|
|
5
|
-
return "react-nextjs";
|
|
6
|
-
case "reactNative":
|
|
7
|
-
return "react-native";
|
|
8
|
-
default:
|
|
9
|
-
return TARGET;
|
|
10
|
-
}
|
|
11
|
-
})();
|
|
12
|
-
const SDK_NAME = `@builder.io/sdk-${SDK_NAME_FOR_TARGET}`;
|
|
13
|
-
export {
|
|
14
|
-
SDK_NAME
|
|
15
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const ivm = require("isolated-vm");
|
|
4
|
-
const nodeRuntime = require("./node-runtime.qwik.cjs");
|
|
5
|
-
const initializeNodeRuntime = (args) => {
|
|
6
|
-
const { ivmIsolateOptions } = args || {};
|
|
7
|
-
nodeRuntime.setIvm(ivm, ivmIsolateOptions);
|
|
8
|
-
};
|
|
9
|
-
exports.initializeNodeRuntime = initializeNodeRuntime;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const sdkName = require("../../../constants/sdk-name.qwik.cjs");
|
|
4
|
-
const logger = require("../../../helpers/logger.qwik.cjs");
|
|
5
|
-
const safeDynamicRequire = require("./safeDynamicRequire.qwik.cjs");
|
|
6
|
-
const INJECTED_IVM_GLOBAL = "BUILDER_IVM";
|
|
7
|
-
let IVM_INSTANCE = null;
|
|
8
|
-
const setIvm = (ivm, options = {}) => {
|
|
9
|
-
IVM_INSTANCE = ivm;
|
|
10
|
-
setIsolateContext(options);
|
|
11
|
-
};
|
|
12
|
-
const SHOULD_MENTION_INITIALIZE_SCRIPT = sdkName.SDK_NAME === "@builder.io/sdk-react-nextjs" || sdkName.SDK_NAME === "@builder.io/sdk-react" || sdkName.SDK_NAME === "@builder.io/sdk-qwik";
|
|
13
|
-
const getIvm = () => {
|
|
14
|
-
try {
|
|
15
|
-
if (IVM_INSTANCE)
|
|
16
|
-
return IVM_INSTANCE;
|
|
17
|
-
const dynRequiredIvm = safeDynamicRequire.safeDynamicRequire("isolated-vm");
|
|
18
|
-
if (dynRequiredIvm)
|
|
19
|
-
return dynRequiredIvm;
|
|
20
|
-
} catch (error) {
|
|
21
|
-
logger.logger.error("isolated-vm import error.", error);
|
|
22
|
-
}
|
|
23
|
-
const ERROR_MESSAGE = `${logger.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
|
|
24
|
-
|
|
25
|
-
SOLUTION: In a server-only execution path within your application, do one of the following:
|
|
26
|
-
|
|
27
|
-
${SHOULD_MENTION_INITIALIZE_SCRIPT ? `- import and call \`initializeNodeRuntime()\` from "${sdkName.SDK_NAME}/node/init".` : ""}
|
|
28
|
-
- add the following import: \`await import('isolated-vm')\`.
|
|
29
|
-
|
|
30
|
-
For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
|
|
31
|
-
throw new Error(ERROR_MESSAGE);
|
|
32
|
-
};
|
|
33
|
-
function setIsolateContext(options = {
|
|
34
|
-
memoryLimit: 128
|
|
35
|
-
}) {
|
|
36
|
-
const ivm = getIvm();
|
|
37
|
-
const isolate = new ivm.Isolate(options);
|
|
38
|
-
const context = isolate.createContextSync();
|
|
39
|
-
const jail = context.global;
|
|
40
|
-
jail.setSync("global", jail.derefInto());
|
|
41
|
-
jail.setSync("log", function(...logArgs) {
|
|
42
|
-
console.log(...logArgs);
|
|
43
|
-
});
|
|
44
|
-
jail.setSync(INJECTED_IVM_GLOBAL, ivm);
|
|
45
|
-
return context;
|
|
46
|
-
}
|
|
47
|
-
exports.setIvm = setIvm;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { SDK_NAME } from "../../../constants/sdk-name.qwik.mjs";
|
|
2
|
-
import { logger, MSG_PREFIX } from "../../../helpers/logger.qwik.mjs";
|
|
3
|
-
import { safeDynamicRequire } from "./safeDynamicRequire.qwik.mjs";
|
|
4
|
-
const INJECTED_IVM_GLOBAL = "BUILDER_IVM";
|
|
5
|
-
let IVM_INSTANCE = null;
|
|
6
|
-
const setIvm = (ivm, options = {}) => {
|
|
7
|
-
IVM_INSTANCE = ivm;
|
|
8
|
-
setIsolateContext(options);
|
|
9
|
-
};
|
|
10
|
-
const SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react" || SDK_NAME === "@builder.io/sdk-qwik";
|
|
11
|
-
const getIvm = () => {
|
|
12
|
-
try {
|
|
13
|
-
if (IVM_INSTANCE)
|
|
14
|
-
return IVM_INSTANCE;
|
|
15
|
-
const dynRequiredIvm = safeDynamicRequire("isolated-vm");
|
|
16
|
-
if (dynRequiredIvm)
|
|
17
|
-
return dynRequiredIvm;
|
|
18
|
-
} catch (error) {
|
|
19
|
-
logger.error("isolated-vm import error.", error);
|
|
20
|
-
}
|
|
21
|
-
const ERROR_MESSAGE = `${MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
|
|
22
|
-
|
|
23
|
-
SOLUTION: In a server-only execution path within your application, do one of the following:
|
|
24
|
-
|
|
25
|
-
${SHOULD_MENTION_INITIALIZE_SCRIPT ? `- import and call \`initializeNodeRuntime()\` from "${SDK_NAME}/node/init".` : ""}
|
|
26
|
-
- add the following import: \`await import('isolated-vm')\`.
|
|
27
|
-
|
|
28
|
-
For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
|
|
29
|
-
throw new Error(ERROR_MESSAGE);
|
|
30
|
-
};
|
|
31
|
-
function setIsolateContext(options = {
|
|
32
|
-
memoryLimit: 128
|
|
33
|
-
}) {
|
|
34
|
-
const ivm = getIvm();
|
|
35
|
-
const isolate = new ivm.Isolate(options);
|
|
36
|
-
const context = isolate.createContextSync();
|
|
37
|
-
const jail = context.global;
|
|
38
|
-
jail.setSync("global", jail.derefInto());
|
|
39
|
-
jail.setSync("log", function(...logArgs) {
|
|
40
|
-
console.log(...logArgs);
|
|
41
|
-
});
|
|
42
|
-
jail.setSync(INJECTED_IVM_GLOBAL, ivm);
|
|
43
|
-
return context;
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
setIvm
|
|
47
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const node_module = require("node:module");
|
|
4
|
-
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
5
|
-
const noop = () => {
|
|
6
|
-
};
|
|
7
|
-
exports.safeDynamicRequire = noop;
|
|
8
|
-
try {
|
|
9
|
-
exports.safeDynamicRequire = node_module.createRequire(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.src || new URL("functions/evaluate/node-runtime/safeDynamicRequire.qwik.cjs", document.baseURI).href);
|
|
10
|
-
} catch (error) {
|
|
11
|
-
try {
|
|
12
|
-
exports.safeDynamicRequire = eval("require");
|
|
13
|
-
} catch (error2) {
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
const noop = () => {
|
|
3
|
-
};
|
|
4
|
-
let safeDynamicRequire = noop;
|
|
5
|
-
try {
|
|
6
|
-
safeDynamicRequire = createRequire(import.meta.url);
|
|
7
|
-
} catch (error) {
|
|
8
|
-
try {
|
|
9
|
-
safeDynamicRequire = eval("require");
|
|
10
|
-
} catch (error2) {
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
safeDynamicRequire
|
|
15
|
-
};
|