@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
|
@@ -17,10 +17,11 @@ const runInBrowser = ({ code, builder, context, event, localState, rootSetState,
|
|
|
17
17
|
function flattenState({ rootState, localState, rootSetState }) {
|
|
18
18
|
return new Proxy(rootState, {
|
|
19
19
|
get: (target, prop) => {
|
|
20
|
-
if (localState && prop in localState)
|
|
20
|
+
if (localState && prop in localState) {
|
|
21
21
|
return localState[prop];
|
|
22
|
+
}
|
|
22
23
|
const val = target[prop];
|
|
23
|
-
if (typeof val === "object" && val !== null)
|
|
24
|
+
if (typeof val === "object" && val !== null) {
|
|
24
25
|
return flattenState({
|
|
25
26
|
rootState: val,
|
|
26
27
|
localState: void 0,
|
|
@@ -29,11 +30,13 @@ function flattenState({ rootState, localState, rootSetState }) {
|
|
|
29
30
|
rootSetState(target);
|
|
30
31
|
} : void 0
|
|
31
32
|
});
|
|
33
|
+
}
|
|
32
34
|
return val;
|
|
33
35
|
},
|
|
34
36
|
set: (target, prop, value) => {
|
|
35
|
-
if (localState && prop in localState)
|
|
37
|
+
if (localState && prop in localState) {
|
|
36
38
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
39
|
+
}
|
|
37
40
|
target[prop] = value;
|
|
38
41
|
rootSetState == null ? void 0 : rootSetState(target);
|
|
39
42
|
return true;
|
|
@@ -15,10 +15,11 @@ const runInBrowser = ({ code, builder, context, event, localState, rootSetState,
|
|
|
15
15
|
function flattenState({ rootState, localState, rootSetState }) {
|
|
16
16
|
return new Proxy(rootState, {
|
|
17
17
|
get: (target, prop) => {
|
|
18
|
-
if (localState && prop in localState)
|
|
18
|
+
if (localState && prop in localState) {
|
|
19
19
|
return localState[prop];
|
|
20
|
+
}
|
|
20
21
|
const val = target[prop];
|
|
21
|
-
if (typeof val === "object" && val !== null)
|
|
22
|
+
if (typeof val === "object" && val !== null) {
|
|
22
23
|
return flattenState({
|
|
23
24
|
rootState: val,
|
|
24
25
|
localState: void 0,
|
|
@@ -27,11 +28,13 @@ function flattenState({ rootState, localState, rootSetState }) {
|
|
|
27
28
|
rootSetState(target);
|
|
28
29
|
} : void 0
|
|
29
30
|
});
|
|
31
|
+
}
|
|
30
32
|
return val;
|
|
31
33
|
},
|
|
32
34
|
set: (target, prop, value) => {
|
|
33
|
-
if (localState && prop in localState)
|
|
35
|
+
if (localState && prop in localState) {
|
|
34
36
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
37
|
+
}
|
|
35
38
|
target[prop] = value;
|
|
36
39
|
rootSetState == null ? void 0 : rootSetState(target);
|
|
37
40
|
return true;
|
|
@@ -4,5 +4,7 @@ const build = require("@builder.io/qwik/build");
|
|
|
4
4
|
const browser = require("./browser-runtime/browser.qwik.cjs");
|
|
5
5
|
const nodeRuntime = require("./node-runtime/node-runtime.qwik.cjs");
|
|
6
6
|
const shouldForceBrowserRuntimeInNode = require("./should-force-browser-runtime-in-node.qwik.cjs");
|
|
7
|
-
const chooseBrowserOrServerEval = (args) => build.isBrowser || shouldForceBrowserRuntimeInNode.shouldForceBrowserRuntimeInNode(
|
|
7
|
+
const chooseBrowserOrServerEval = (args) => build.isBrowser || shouldForceBrowserRuntimeInNode.shouldForceBrowserRuntimeInNode({
|
|
8
|
+
shouldLogWarning: true
|
|
9
|
+
}) ? browser.runInBrowser(args) : nodeRuntime.runInNode(args);
|
|
8
10
|
exports.chooseBrowserOrServerEval = chooseBrowserOrServerEval;
|
|
@@ -2,7 +2,9 @@ import { isBrowser } from "@builder.io/qwik/build";
|
|
|
2
2
|
import { runInBrowser } from "./browser-runtime/browser.qwik.mjs";
|
|
3
3
|
import { runInNode } from "./node-runtime/node-runtime.qwik.mjs";
|
|
4
4
|
import { shouldForceBrowserRuntimeInNode } from "./should-force-browser-runtime-in-node.qwik.mjs";
|
|
5
|
-
const chooseBrowserOrServerEval = (args) => isBrowser || shouldForceBrowserRuntimeInNode(
|
|
5
|
+
const chooseBrowserOrServerEval = (args) => isBrowser || shouldForceBrowserRuntimeInNode({
|
|
6
|
+
shouldLogWarning: true
|
|
7
|
+
}) ? runInBrowser(args) : runInNode(args);
|
|
6
8
|
export {
|
|
7
9
|
chooseBrowserOrServerEval
|
|
8
10
|
};
|
|
@@ -18,8 +18,9 @@ const _EvalCache = class _EvalCache2 {
|
|
|
18
18
|
return cachedVal;
|
|
19
19
|
}
|
|
20
20
|
static setCachedValue(key, value) {
|
|
21
|
-
if (_EvalCache2.cache.size > 20)
|
|
21
|
+
if (_EvalCache2.cache.size > 20) {
|
|
22
22
|
_EvalCache2.cache.delete(_EvalCache2.cache.keys().next().value);
|
|
23
|
+
}
|
|
23
24
|
_EvalCache2.cache.set(key, {
|
|
24
25
|
value
|
|
25
26
|
});
|
|
@@ -29,8 +30,9 @@ _EvalCache.cacheLimit = 20;
|
|
|
29
30
|
_EvalCache.cache = /* @__PURE__ */ new Map();
|
|
30
31
|
let EvalCache = _EvalCache;
|
|
31
32
|
function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression = true, enableCache }) {
|
|
32
|
-
if (code === "")
|
|
33
|
+
if (code === "") {
|
|
33
34
|
return void 0;
|
|
35
|
+
}
|
|
34
36
|
const args = {
|
|
35
37
|
code: helpers.parseCode(code, {
|
|
36
38
|
isExpression
|
|
@@ -45,8 +47,9 @@ function evaluate({ code, context, localState, rootState, rootSetState, event, i
|
|
|
45
47
|
if (enableCache && !DISABLE_CACHE) {
|
|
46
48
|
const cacheKey = EvalCache.getCacheKey(args);
|
|
47
49
|
const cachedValue = EvalCache.getCachedValue(cacheKey);
|
|
48
|
-
if (cachedValue)
|
|
50
|
+
if (cachedValue) {
|
|
49
51
|
return cachedValue.value;
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
try {
|
|
52
55
|
const newEval = chooseEval.chooseBrowserOrServerEval(args);
|
|
@@ -16,8 +16,9 @@ const _EvalCache = class _EvalCache2 {
|
|
|
16
16
|
return cachedVal;
|
|
17
17
|
}
|
|
18
18
|
static setCachedValue(key, value) {
|
|
19
|
-
if (_EvalCache2.cache.size > 20)
|
|
19
|
+
if (_EvalCache2.cache.size > 20) {
|
|
20
20
|
_EvalCache2.cache.delete(_EvalCache2.cache.keys().next().value);
|
|
21
|
+
}
|
|
21
22
|
_EvalCache2.cache.set(key, {
|
|
22
23
|
value
|
|
23
24
|
});
|
|
@@ -27,8 +28,9 @@ _EvalCache.cacheLimit = 20;
|
|
|
27
28
|
_EvalCache.cache = /* @__PURE__ */ new Map();
|
|
28
29
|
let EvalCache = _EvalCache;
|
|
29
30
|
function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression = true, enableCache }) {
|
|
30
|
-
if (code === "")
|
|
31
|
+
if (code === "") {
|
|
31
32
|
return void 0;
|
|
33
|
+
}
|
|
32
34
|
const args = {
|
|
33
35
|
code: parseCode(code, {
|
|
34
36
|
isExpression
|
|
@@ -43,8 +45,9 @@ function evaluate({ code, context, localState, rootState, rootSetState, event, i
|
|
|
43
45
|
if (enableCache && !DISABLE_CACHE) {
|
|
44
46
|
const cacheKey = EvalCache.getCacheKey(args);
|
|
45
47
|
const cachedValue = EvalCache.getCachedValue(cacheKey);
|
|
46
|
-
if (cachedValue)
|
|
48
|
+
if (cachedValue) {
|
|
47
49
|
return cachedValue.value;
|
|
50
|
+
}
|
|
48
51
|
}
|
|
49
52
|
try {
|
|
50
53
|
const newEval = chooseBrowserOrServerEval(args);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const shouldForceBrowserRuntimeInNode = require("../should-force-browser-runtime-in-node.qwik.cjs");
|
|
3
4
|
const ivm = require("isolated-vm");
|
|
4
5
|
const nodeRuntime = require("./node-runtime.qwik.cjs");
|
|
5
6
|
const initializeNodeRuntime = (args) => {
|
|
7
|
+
if (shouldForceBrowserRuntimeInNode.shouldForceBrowserRuntimeInNode({
|
|
8
|
+
shouldLogWarning: true
|
|
9
|
+
})) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
6
12
|
const { ivmIsolateOptions } = args || {};
|
|
7
13
|
nodeRuntime.setIvm(ivm, ivmIsolateOptions);
|
|
8
14
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { shouldForceBrowserRuntimeInNode } from "../should-force-browser-runtime-in-node.qwik.mjs";
|
|
1
2
|
import ivm from "isolated-vm";
|
|
2
3
|
import { setIvm } from "./node-runtime.qwik.mjs";
|
|
3
4
|
const initializeNodeRuntime = (args) => {
|
|
5
|
+
if (shouldForceBrowserRuntimeInNode({
|
|
6
|
+
shouldLogWarning: true
|
|
7
|
+
})) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
4
10
|
const { ivmIsolateOptions } = args || {};
|
|
5
11
|
setIvm(ivm, ivmIsolateOptions);
|
|
6
12
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const logger = require("../../helpers/logger.qwik.cjs");
|
|
4
4
|
const isNodeRuntime = require("../is-node-runtime.qwik.cjs");
|
|
5
|
-
const shouldForceBrowserRuntimeInNode = () => {
|
|
5
|
+
const shouldForceBrowserRuntimeInNode = ({ shouldLogWarning }) => {
|
|
6
6
|
var _a;
|
|
7
7
|
if (!isNodeRuntime.isNodeRuntime())
|
|
8
8
|
return false;
|
|
@@ -10,10 +10,12 @@ const shouldForceBrowserRuntimeInNode = () => {
|
|
|
10
10
|
const isNode20 = process.version.startsWith("v20");
|
|
11
11
|
const hasNoNodeSnapshotNodeOption = (_a = process.env.NODE_OPTIONS) == null ? void 0 : _a.includes("--no-node-snapshot");
|
|
12
12
|
if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
|
|
13
|
-
|
|
13
|
+
if (shouldLogWarning) {
|
|
14
|
+
logger.logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
|
|
14
15
|
If you would like to use the \`isolated-vm\` package on this machine, please provide the \`NODE_OPTIONS=--no-node-snapshot\` config to your Node process.
|
|
15
16
|
See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
|
|
16
17
|
`);
|
|
18
|
+
}
|
|
17
19
|
return true;
|
|
18
20
|
}
|
|
19
21
|
return false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from "../../helpers/logger.qwik.mjs";
|
|
2
2
|
import { isNodeRuntime } from "../is-node-runtime.qwik.mjs";
|
|
3
|
-
const shouldForceBrowserRuntimeInNode = () => {
|
|
3
|
+
const shouldForceBrowserRuntimeInNode = ({ shouldLogWarning }) => {
|
|
4
4
|
var _a;
|
|
5
5
|
if (!isNodeRuntime())
|
|
6
6
|
return false;
|
|
@@ -8,10 +8,12 @@ const shouldForceBrowserRuntimeInNode = () => {
|
|
|
8
8
|
const isNode20 = process.version.startsWith("v20");
|
|
9
9
|
const hasNoNodeSnapshotNodeOption = (_a = process.env.NODE_OPTIONS) == null ? void 0 : _a.includes("--no-node-snapshot");
|
|
10
10
|
if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
|
|
11
|
-
|
|
11
|
+
if (shouldLogWarning) {
|
|
12
|
+
logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
|
|
12
13
|
If you would like to use the \`isolated-vm\` package on this machine, please provide the \`NODE_OPTIONS=--no-node-snapshot\` config to your Node process.
|
|
13
14
|
See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
|
|
14
15
|
`);
|
|
16
|
+
}
|
|
15
17
|
return true;
|
|
16
18
|
}
|
|
17
19
|
return false;
|
|
@@ -3,20 +3,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const qwik = require("@builder.io/qwik");
|
|
4
4
|
const evaluate = require("./evaluate/evaluate.qwik.cjs");
|
|
5
5
|
function createEventHandler(value, options) {
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
enableCache: true
|
|
16
|
-
});
|
|
17
|
-
}, "createEventHandler_7wCAiJVliNE", [
|
|
18
|
-
options,
|
|
19
|
-
value
|
|
20
|
-
]);
|
|
6
|
+
return qwik.$((event) => evaluate.evaluate({
|
|
7
|
+
code: value,
|
|
8
|
+
context: options.context,
|
|
9
|
+
localState: options.localState,
|
|
10
|
+
rootState: options.rootState,
|
|
11
|
+
rootSetState: options.rootSetState,
|
|
12
|
+
event,
|
|
13
|
+
enableCache: true
|
|
14
|
+
}));
|
|
21
15
|
}
|
|
22
16
|
exports.createEventHandler = createEventHandler;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ } from "@builder.io/qwik";
|
|
2
2
|
import { evaluate } from "./evaluate/evaluate.qwik.mjs";
|
|
3
3
|
function createEventHandler(value, options) {
|
|
4
|
-
return
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
enableCache: true
|
|
14
|
-
});
|
|
15
|
-
}, "createEventHandler_7wCAiJVliNE", [
|
|
16
|
-
options,
|
|
17
|
-
value
|
|
18
|
-
]);
|
|
4
|
+
return $((event) => evaluate({
|
|
5
|
+
code: value,
|
|
6
|
+
context: options.context,
|
|
7
|
+
localState: options.localState,
|
|
8
|
+
rootState: options.rootState,
|
|
9
|
+
rootSetState: options.rootSetState,
|
|
10
|
+
event,
|
|
11
|
+
enableCache: true
|
|
12
|
+
}));
|
|
19
13
|
}
|
|
20
14
|
export {
|
|
21
15
|
createEventHandler
|
|
@@ -7,11 +7,12 @@ function getBlockActions(options) {
|
|
|
7
7
|
const obj = {};
|
|
8
8
|
const optionActions = options.block.actions ?? {};
|
|
9
9
|
for (const key in optionActions) {
|
|
10
|
-
if (!optionActions.hasOwnProperty(key))
|
|
10
|
+
if (!optionActions.hasOwnProperty(key)) {
|
|
11
11
|
continue;
|
|
12
|
+
}
|
|
12
13
|
const value = optionActions[key];
|
|
13
14
|
let eventHandlerName$1 = eventHandlerName.getEventHandlerName(key);
|
|
14
|
-
if (options.stripPrefix)
|
|
15
|
+
if (options.stripPrefix) {
|
|
15
16
|
switch (target.TARGET) {
|
|
16
17
|
case "vue":
|
|
17
18
|
eventHandlerName$1 = eventHandlerName$1.replace("v-on:", "");
|
|
@@ -20,6 +21,7 @@ function getBlockActions(options) {
|
|
|
20
21
|
eventHandlerName$1 = eventHandlerName$1.replace("on:", "");
|
|
21
22
|
break;
|
|
22
23
|
}
|
|
24
|
+
}
|
|
23
25
|
obj[eventHandlerName$1] = getBlockActionsHandler.createEventHandler(value, options);
|
|
24
26
|
}
|
|
25
27
|
return obj;
|
|
@@ -5,11 +5,12 @@ function getBlockActions(options) {
|
|
|
5
5
|
const obj = {};
|
|
6
6
|
const optionActions = options.block.actions ?? {};
|
|
7
7
|
for (const key in optionActions) {
|
|
8
|
-
if (!optionActions.hasOwnProperty(key))
|
|
8
|
+
if (!optionActions.hasOwnProperty(key)) {
|
|
9
9
|
continue;
|
|
10
|
+
}
|
|
10
11
|
const value = optionActions[key];
|
|
11
12
|
let eventHandlerName = getEventHandlerName(key);
|
|
12
|
-
if (options.stripPrefix)
|
|
13
|
+
if (options.stripPrefix) {
|
|
13
14
|
switch (TARGET) {
|
|
14
15
|
case "vue":
|
|
15
16
|
eventHandlerName = eventHandlerName.replace("v-on:", "");
|
|
@@ -18,6 +19,7 @@ function getBlockActions(options) {
|
|
|
18
19
|
eventHandlerName = eventHandlerName.replace("on:", "");
|
|
19
20
|
break;
|
|
20
21
|
}
|
|
22
|
+
}
|
|
21
23
|
obj[eventHandlerName] = createEventHandler(value, options);
|
|
22
24
|
}
|
|
23
25
|
return obj;
|
|
@@ -5,8 +5,9 @@ const isBrowser = require("../is-browser.qwik.cjs");
|
|
|
5
5
|
const BUILDER_SEARCHPARAMS_PREFIX = "builder.";
|
|
6
6
|
const BUILDER_OPTIONS_PREFIX = "options.";
|
|
7
7
|
const getBuilderSearchParams = (_options) => {
|
|
8
|
-
if (!_options)
|
|
8
|
+
if (!_options) {
|
|
9
9
|
return {};
|
|
10
|
+
}
|
|
10
11
|
const options = search.normalizeSearchParams(_options);
|
|
11
12
|
const newOptions = {};
|
|
12
13
|
Object.keys(options).forEach((key) => {
|
|
@@ -18,8 +19,9 @@ const getBuilderSearchParams = (_options) => {
|
|
|
18
19
|
return newOptions;
|
|
19
20
|
};
|
|
20
21
|
const getBuilderSearchParamsFromWindow = () => {
|
|
21
|
-
if (!isBrowser.isBrowser())
|
|
22
|
+
if (!isBrowser.isBrowser()) {
|
|
22
23
|
return {};
|
|
24
|
+
}
|
|
23
25
|
const searchParams = new URLSearchParams(window.location.search);
|
|
24
26
|
return getBuilderSearchParams(searchParams);
|
|
25
27
|
};
|
|
@@ -3,8 +3,9 @@ import { isBrowser } from "../is-browser.qwik.mjs";
|
|
|
3
3
|
const BUILDER_SEARCHPARAMS_PREFIX = "builder.";
|
|
4
4
|
const BUILDER_OPTIONS_PREFIX = "options.";
|
|
5
5
|
const getBuilderSearchParams = (_options) => {
|
|
6
|
-
if (!_options)
|
|
6
|
+
if (!_options) {
|
|
7
7
|
return {};
|
|
8
|
+
}
|
|
8
9
|
const options = normalizeSearchParams(_options);
|
|
9
10
|
const newOptions = {};
|
|
10
11
|
Object.keys(options).forEach((key) => {
|
|
@@ -16,8 +17,9 @@ const getBuilderSearchParams = (_options) => {
|
|
|
16
17
|
return newOptions;
|
|
17
18
|
};
|
|
18
19
|
const getBuilderSearchParamsFromWindow = () => {
|
|
19
|
-
if (!isBrowser())
|
|
20
|
+
if (!isBrowser()) {
|
|
20
21
|
return {};
|
|
22
|
+
}
|
|
21
23
|
const searchParams = new URLSearchParams(window.location.search);
|
|
22
24
|
return getBuilderSearchParams(searchParams);
|
|
23
25
|
};
|
|
@@ -7,12 +7,14 @@ const index = require("../get-builder-search-params/index.qwik.cjs");
|
|
|
7
7
|
const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
|
|
8
8
|
const generateContentUrl = (options) => {
|
|
9
9
|
const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion: apiVersion$1 = apiVersion.DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
|
|
10
|
-
if (!apiKey)
|
|
10
|
+
if (!apiKey) {
|
|
11
11
|
throw new Error("Missing API key");
|
|
12
|
+
}
|
|
12
13
|
if (![
|
|
13
14
|
"v3"
|
|
14
|
-
].includes(apiVersion$1))
|
|
15
|
+
].includes(apiVersion$1)) {
|
|
15
16
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${apiVersion$1}'`);
|
|
17
|
+
}
|
|
16
18
|
const noTraverse = limit !== 1;
|
|
17
19
|
const url = new URL(`https://cdn.builder.io/api/${apiVersion$1}/content/${model}`);
|
|
18
20
|
url.searchParams.set("apiKey", apiKey);
|
|
@@ -24,38 +26,47 @@ const generateContentUrl = (options) => {
|
|
|
24
26
|
if (enrich)
|
|
25
27
|
url.searchParams.set("enrich", String(enrich));
|
|
26
28
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
27
|
-
if (fields)
|
|
29
|
+
if (fields) {
|
|
28
30
|
url.searchParams.set("fields", fields);
|
|
29
|
-
|
|
31
|
+
}
|
|
32
|
+
if (Number.isFinite(offset) && offset > -1) {
|
|
30
33
|
url.searchParams.set("offset", String(Math.floor(offset)));
|
|
31
|
-
|
|
34
|
+
}
|
|
35
|
+
if (typeof includeUnpublished === "boolean") {
|
|
32
36
|
url.searchParams.set("includeUnpublished", String(includeUnpublished));
|
|
33
|
-
|
|
37
|
+
}
|
|
38
|
+
if (cacheSeconds && isPositiveNumber(cacheSeconds)) {
|
|
34
39
|
url.searchParams.set("cacheSeconds", String(cacheSeconds));
|
|
35
|
-
|
|
40
|
+
}
|
|
41
|
+
if (staleCacheSeconds && isPositiveNumber(staleCacheSeconds)) {
|
|
36
42
|
url.searchParams.set("staleCacheSeconds", String(staleCacheSeconds));
|
|
43
|
+
}
|
|
37
44
|
if (sort) {
|
|
38
45
|
const flattened2 = flatten.flatten({
|
|
39
46
|
sort
|
|
40
47
|
});
|
|
41
|
-
for (const key in flattened2)
|
|
48
|
+
for (const key in flattened2) {
|
|
42
49
|
url.searchParams.set(key, JSON.stringify(flattened2[key]));
|
|
50
|
+
}
|
|
43
51
|
}
|
|
44
52
|
const queryOptions = {
|
|
45
53
|
...index.getBuilderSearchParamsFromWindow(),
|
|
46
54
|
...search.normalizeSearchParams(options.options || {})
|
|
47
55
|
};
|
|
48
56
|
const flattened = flatten.flatten(queryOptions);
|
|
49
|
-
for (const key in flattened)
|
|
57
|
+
for (const key in flattened) {
|
|
50
58
|
url.searchParams.set(key, String(flattened[key]));
|
|
51
|
-
|
|
59
|
+
}
|
|
60
|
+
if (userAttributes) {
|
|
52
61
|
url.searchParams.set("userAttributes", JSON.stringify(userAttributes));
|
|
62
|
+
}
|
|
53
63
|
if (query) {
|
|
54
64
|
const flattened2 = flatten.flattenMongoQuery({
|
|
55
65
|
query
|
|
56
66
|
});
|
|
57
|
-
for (const key in flattened2)
|
|
67
|
+
for (const key in flattened2) {
|
|
58
68
|
url.searchParams.set(key, JSON.stringify(flattened2[key]));
|
|
69
|
+
}
|
|
59
70
|
}
|
|
60
71
|
return url;
|
|
61
72
|
};
|
|
@@ -5,12 +5,14 @@ import { getBuilderSearchParamsFromWindow } from "../get-builder-search-params/i
|
|
|
5
5
|
const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
|
|
6
6
|
const generateContentUrl = (options) => {
|
|
7
7
|
const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
|
|
8
|
-
if (!apiKey)
|
|
8
|
+
if (!apiKey) {
|
|
9
9
|
throw new Error("Missing API key");
|
|
10
|
+
}
|
|
10
11
|
if (![
|
|
11
12
|
"v3"
|
|
12
|
-
].includes(apiVersion))
|
|
13
|
+
].includes(apiVersion)) {
|
|
13
14
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${apiVersion}'`);
|
|
15
|
+
}
|
|
14
16
|
const noTraverse = limit !== 1;
|
|
15
17
|
const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}`);
|
|
16
18
|
url.searchParams.set("apiKey", apiKey);
|
|
@@ -22,38 +24,47 @@ const generateContentUrl = (options) => {
|
|
|
22
24
|
if (enrich)
|
|
23
25
|
url.searchParams.set("enrich", String(enrich));
|
|
24
26
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
25
|
-
if (fields)
|
|
27
|
+
if (fields) {
|
|
26
28
|
url.searchParams.set("fields", fields);
|
|
27
|
-
|
|
29
|
+
}
|
|
30
|
+
if (Number.isFinite(offset) && offset > -1) {
|
|
28
31
|
url.searchParams.set("offset", String(Math.floor(offset)));
|
|
29
|
-
|
|
32
|
+
}
|
|
33
|
+
if (typeof includeUnpublished === "boolean") {
|
|
30
34
|
url.searchParams.set("includeUnpublished", String(includeUnpublished));
|
|
31
|
-
|
|
35
|
+
}
|
|
36
|
+
if (cacheSeconds && isPositiveNumber(cacheSeconds)) {
|
|
32
37
|
url.searchParams.set("cacheSeconds", String(cacheSeconds));
|
|
33
|
-
|
|
38
|
+
}
|
|
39
|
+
if (staleCacheSeconds && isPositiveNumber(staleCacheSeconds)) {
|
|
34
40
|
url.searchParams.set("staleCacheSeconds", String(staleCacheSeconds));
|
|
41
|
+
}
|
|
35
42
|
if (sort) {
|
|
36
43
|
const flattened2 = flatten({
|
|
37
44
|
sort
|
|
38
45
|
});
|
|
39
|
-
for (const key in flattened2)
|
|
46
|
+
for (const key in flattened2) {
|
|
40
47
|
url.searchParams.set(key, JSON.stringify(flattened2[key]));
|
|
48
|
+
}
|
|
41
49
|
}
|
|
42
50
|
const queryOptions = {
|
|
43
51
|
...getBuilderSearchParamsFromWindow(),
|
|
44
52
|
...normalizeSearchParams(options.options || {})
|
|
45
53
|
};
|
|
46
54
|
const flattened = flatten(queryOptions);
|
|
47
|
-
for (const key in flattened)
|
|
55
|
+
for (const key in flattened) {
|
|
48
56
|
url.searchParams.set(key, String(flattened[key]));
|
|
49
|
-
|
|
57
|
+
}
|
|
58
|
+
if (userAttributes) {
|
|
50
59
|
url.searchParams.set("userAttributes", JSON.stringify(userAttributes));
|
|
60
|
+
}
|
|
51
61
|
if (query) {
|
|
52
62
|
const flattened2 = flattenMongoQuery({
|
|
53
63
|
query
|
|
54
64
|
});
|
|
55
|
-
for (const key in flattened2)
|
|
65
|
+
for (const key in flattened2) {
|
|
56
66
|
url.searchParams.set(key, JSON.stringify(flattened2[key]));
|
|
67
|
+
}
|
|
57
68
|
}
|
|
58
69
|
return url;
|
|
59
70
|
};
|
|
@@ -13,8 +13,9 @@ async function fetchOneEntry(options) {
|
|
|
13
13
|
...options,
|
|
14
14
|
limit: 1
|
|
15
15
|
});
|
|
16
|
-
if (allContent)
|
|
16
|
+
if (allContent) {
|
|
17
17
|
return allContent[0] || null;
|
|
18
|
+
}
|
|
18
19
|
return null;
|
|
19
20
|
}
|
|
20
21
|
const _fetchContent = async (options) => {
|
|
@@ -33,11 +34,12 @@ const _processContentResult = async (options, content, url = generateContentUrl.
|
|
|
33
34
|
return content.results;
|
|
34
35
|
try {
|
|
35
36
|
const newResults = [];
|
|
36
|
-
for (const item of content.results)
|
|
37
|
+
for (const item of content.results) {
|
|
37
38
|
newResults.push(await abTests.handleABTesting({
|
|
38
39
|
item,
|
|
39
40
|
canTrack: canTrack$1
|
|
40
41
|
}));
|
|
42
|
+
}
|
|
41
43
|
content.results = newResults;
|
|
42
44
|
} catch (e) {
|
|
43
45
|
logger.logger.error("Could not process A/B tests. ", e);
|
|
@@ -11,8 +11,9 @@ async function fetchOneEntry(options) {
|
|
|
11
11
|
...options,
|
|
12
12
|
limit: 1
|
|
13
13
|
});
|
|
14
|
-
if (allContent)
|
|
14
|
+
if (allContent) {
|
|
15
15
|
return allContent[0] || null;
|
|
16
|
+
}
|
|
16
17
|
return null;
|
|
17
18
|
}
|
|
18
19
|
const _fetchContent = async (options) => {
|
|
@@ -31,11 +32,12 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
31
32
|
return content.results;
|
|
32
33
|
try {
|
|
33
34
|
const newResults = [];
|
|
34
|
-
for (const item of content.results)
|
|
35
|
+
for (const item of content.results) {
|
|
35
36
|
newResults.push(await handleABTesting({
|
|
36
37
|
item,
|
|
37
38
|
canTrack
|
|
38
39
|
}));
|
|
40
|
+
}
|
|
39
41
|
content.results = newResults;
|
|
40
42
|
} catch (e) {
|
|
41
43
|
logger.error("Could not process A/B tests. ", e);
|
|
@@ -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 {
|