@builder.io/sdk-svelte 0.4.4 → 0.5.0
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/package/--package.json +43 -29
- package/package/CHANGELOG.md +13 -0
- package/package/blocks/BaseText.svelte +1 -1
- package/package/blocks/button/button.svelte +18 -33
- package/package/blocks/button/button.svelte.d.ts +3 -1
- package/package/blocks/button/component-info.d.ts +1 -1
- package/package/blocks/button/component-info.js +9 -13
- package/package/blocks/columns/columns.svelte +14 -20
- package/package/blocks/columns/columns.svelte.d.ts +11 -7
- package/package/blocks/columns/component-info.d.ts +1 -1
- package/package/blocks/columns/component-info.js +62 -83
- package/package/blocks/custom-code/component-info.d.ts +1 -1
- package/package/blocks/custom-code/component-info.js +7 -11
- package/package/blocks/embed/component-info.d.ts +1 -1
- package/package/blocks/embed/component-info.js +8 -15
- package/package/blocks/embed/helpers.js +1 -5
- package/package/blocks/form/component-info.d.ts +1 -1
- package/package/blocks/form/component-info.js +94 -129
- package/package/blocks/form/form.svelte +2 -289
- package/package/blocks/form/form.svelte.d.ts +1 -57
- package/package/blocks/fragment/component-info.d.ts +1 -1
- package/package/blocks/fragment/component-info.js +1 -1
- package/package/blocks/helpers.d.ts +13 -0
- package/package/blocks/helpers.js +40 -0
- package/package/blocks/image/component-info.d.ts +1 -1
- package/package/blocks/image/component-info.js +33 -63
- package/package/blocks/image/image.helpers.js +2 -11
- package/package/blocks/image/image.svelte.d.ts +0 -1
- package/package/blocks/img/component-info.d.ts +1 -1
- package/package/blocks/img/component-info.js +4 -6
- package/package/blocks/img/img.svelte +4 -29
- package/package/blocks/img/img.svelte.d.ts +3 -1
- package/package/blocks/input/component-info.d.ts +1 -1
- package/package/blocks/input/component-info.js +15 -40
- package/package/blocks/input/input.svelte +4 -29
- package/package/blocks/input/input.svelte.d.ts +3 -1
- package/package/blocks/raw-text/component-info.d.ts +1 -1
- package/package/blocks/raw-text/component-info.js +3 -5
- package/package/blocks/raw-text/raw-text.svelte +3 -5
- package/package/blocks/raw-text/raw-text.svelte.d.ts +1 -1
- package/package/blocks/section/component-info.d.ts +1 -1
- package/package/blocks/section/component-info.js +13 -18
- package/package/blocks/section/section.svelte +4 -29
- package/package/blocks/section/section.svelte.d.ts +3 -1
- package/package/blocks/select/component-info.d.ts +1 -1
- package/package/blocks/select/component-info.js +22 -34
- package/package/blocks/select/select.svelte +4 -29
- package/package/blocks/select/select.svelte.d.ts +3 -1
- package/package/blocks/submit-button/component-info.d.ts +1 -1
- package/package/blocks/submit-button/component-info.js +5 -7
- package/package/blocks/submit-button/submit-button.svelte +4 -29
- package/package/blocks/submit-button/submit-button.svelte.d.ts +3 -1
- package/package/blocks/symbol/component-info.d.ts +1 -1
- package/package/blocks/symbol/component-info.js +12 -17
- package/package/blocks/symbol/symbol.helpers.d.ts +14 -0
- package/package/blocks/symbol/symbol.helpers.js +31 -0
- package/package/blocks/symbol/symbol.svelte +38 -85
- package/package/blocks/symbol/symbol.svelte.d.ts +13 -7
- package/package/blocks/text/component-info.d.ts +1 -1
- package/package/blocks/text/component-info.js +6 -7
- package/package/blocks/text/text.svelte +1 -1
- package/package/blocks/text/text.svelte.d.ts +1 -1
- package/package/blocks/textarea/component-info.d.ts +1 -1
- package/package/blocks/textarea/component-info.js +13 -19
- package/package/blocks/textarea/textarea.svelte +4 -29
- package/package/blocks/textarea/textarea.svelte.d.ts +3 -1
- package/package/blocks/video/component-info.d.ts +1 -1
- package/package/blocks/video/component-info.js +35 -55
- package/package/blocks/video/video.svelte +4 -30
- package/package/blocks/video/video.svelte.d.ts +2 -0
- package/package/components/block/block.helpers.d.ts +13 -0
- package/package/components/{render-block/render-block.helpers.js → block/block.helpers.js} +12 -29
- package/package/components/block/block.svelte +135 -0
- package/package/components/block/block.svelte.d.ts +26 -0
- package/package/components/{render-block → block/components}/block-styles.svelte +21 -23
- package/package/components/{render-block → block/components}/block-styles.svelte.d.ts +2 -2
- package/package/components/block/components/block-wrapper.svelte +53 -0
- package/package/components/block/components/block-wrapper.svelte.d.ts +33 -0
- package/package/components/block/components/component-ref/component-ref.helpers.d.ts +36 -0
- package/package/components/block/components/component-ref/component-ref.helpers.js +22 -0
- package/package/components/block/components/component-ref/component-ref.svelte +37 -0
- package/package/components/block/components/component-ref/component-ref.svelte.d.ts +24 -0
- package/package/components/block/components/interactive-element.svelte +29 -0
- package/package/components/block/components/interactive-element.svelte.d.ts +31 -0
- package/package/components/{render-block/render-repeated-block.svelte → block/components/repeated-block.svelte} +4 -3
- package/package/components/block/components/repeated-block.svelte.d.ts +25 -0
- package/package/components/{render-blocks.svelte → blocks/blocks-wrapper.svelte} +3 -20
- package/package/components/blocks/blocks-wrapper.svelte.d.ts +29 -0
- package/package/components/blocks/blocks.svelte +26 -0
- package/package/components/blocks/blocks.svelte.d.ts +28 -0
- package/package/components/{render-content/render-content.svelte → content/components/enable-editor.svelte} +51 -169
- package/package/components/content/components/enable-editor.svelte.d.ts +36 -0
- package/package/components/{render-content/components/render-styles.helpers.d.ts → content/components/styles.helpers.d.ts} +1 -1
- package/package/components/{render-content/components/render-styles.helpers.js → content/components/styles.helpers.js} +3 -4
- package/package/components/{render-content/components/render-styles.svelte → content/components/styles.svelte} +4 -4
- package/package/components/{render-content/components/render-styles.svelte.d.ts → content/components/styles.svelte.d.ts} +5 -5
- package/package/components/content/content.helpers.d.ts +7 -0
- package/package/components/content/content.helpers.js +30 -0
- package/package/components/content/content.svelte +113 -0
- package/package/components/content/content.svelte.d.ts +30 -0
- package/package/components/content/content.types.d.ts +24 -0
- package/package/components/content/index.d.ts +1 -0
- package/package/components/content/index.js +1 -0
- package/package/components/content-variants/content-variants.svelte +98 -0
- package/package/components/content-variants/content-variants.svelte.d.ts +34 -0
- package/package/components/content-variants/content-variants.types.d.ts +20 -0
- package/package/components/content-variants/helpers.d.ts +41 -0
- package/package/components/{render-content-variants → content-variants}/helpers.js +46 -41
- package/package/components/inlined-script.svelte +7 -0
- package/package/components/inlined-script.svelte.d.ts +21 -0
- package/package/components/inlined-styles.svelte.d.ts +21 -0
- package/package/constants/builder-registered-components.js +34 -13
- package/package/constants/device-sizes.js +9 -8
- package/package/constants/sdk-version.d.ts +1 -1
- package/package/constants/sdk-version.js +1 -1
- package/package/constants/target.d.ts +1 -1
- package/package/context/builder.context.d.ts +1 -1
- package/package/context/builder.context.js +1 -1
- package/package/context/types.d.ts +1 -1
- package/package/functions/apply-patch-with-mutation.d.ts +10 -0
- package/package/functions/apply-patch-with-mutation.js +54 -0
- package/package/functions/evaluate/acorn.d.ts +0 -0
- package/package/functions/evaluate/acorn.js +2433 -0
- package/package/functions/{evaluate.d.ts → evaluate/evaluate.d.ts} +5 -2
- package/package/functions/{evaluate.js → evaluate/evaluate.js} +34 -13
- package/package/functions/evaluate/index.d.ts +1 -0
- package/package/functions/evaluate/index.js +1 -0
- package/package/functions/evaluate/interpreter.d.ts +2 -0
- package/package/functions/evaluate/interpreter.js +3853 -0
- package/package/functions/evaluate/non-node-runtime.d.ts +2 -0
- package/package/functions/evaluate/non-node-runtime.js +84 -0
- package/package/functions/evaluate/types.d.ts +10 -0
- package/package/functions/extract-text-styles.js +2 -14
- package/package/functions/get-block-actions-handler.js +3 -3
- package/package/functions/get-block-actions.d.ts +1 -0
- package/package/functions/get-block-actions.js +14 -1
- package/package/functions/get-block-component-options.js +1 -1
- package/package/functions/get-block-properties.d.ts +5 -1
- package/package/functions/get-block-properties.js +15 -9
- package/package/functions/get-builder-search-params/index.js +3 -7
- package/package/functions/get-content/generate-content-url.js +7 -5
- package/package/functions/get-content/index.d.ts +2 -6
- package/package/functions/get-content/index.js +26 -6
- package/package/functions/get-processed-block.d.ts +1 -1
- package/package/functions/get-processed-block.js +11 -7
- package/package/functions/get-react-native-block-styles.d.ts +1 -1
- package/package/functions/get-react-native-block-styles.js +2 -2
- package/package/functions/if-target.d.ts +1 -1
- package/package/functions/if-target.js +1 -1
- package/package/functions/is-editing.js +1 -3
- package/package/functions/is-non-node-server.d.ts +4 -0
- package/package/functions/is-non-node-server.js +8 -0
- package/package/functions/on-change.js +1 -1
- package/package/functions/register-component.d.ts +2 -1
- package/package/functions/register-component.js +20 -8
- package/package/functions/register.js +2 -2
- package/package/functions/sanitize-react-native-block-styles.js +13 -5
- package/package/functions/set-editor-settings.js +1 -1
- package/package/functions/set.js +2 -9
- package/package/functions/track/helpers.js +6 -11
- package/package/functions/track/index.js +26 -14
- package/package/functions/track/interaction.js +15 -16
- package/package/helpers/ab-tests.d.ts +2 -2
- package/package/helpers/ab-tests.js +48 -30
- package/package/helpers/canTrack.js +1 -1
- package/package/helpers/cookie.d.ts +2 -2
- package/package/helpers/cookie.js +13 -26
- package/package/helpers/css.d.ts +1 -1
- package/package/helpers/css.js +1 -1
- package/package/helpers/flatten.js +8 -8
- package/package/helpers/localStorage.d.ts +2 -2
- package/package/helpers/localStorage.js +2 -2
- package/package/helpers/logger.js +1 -1
- package/package/helpers/preview-lru-cache/get.d.ts +1 -0
- package/package/helpers/preview-lru-cache/get.js +7 -0
- package/package/helpers/preview-lru-cache/helpers.d.ts +1 -0
- package/package/helpers/preview-lru-cache/helpers.js +9 -0
- package/package/helpers/preview-lru-cache/init.d.ts +6 -0
- package/package/helpers/preview-lru-cache/init.js +15 -0
- package/package/helpers/preview-lru-cache/set.d.ts +7 -0
- package/package/helpers/preview-lru-cache/set.js +9 -0
- package/package/helpers/preview-lru-cache/types.d.ts +12 -0
- package/package/helpers/preview-lru-cache/types.js +6 -0
- package/package/helpers/sessionId.d.ts +2 -2
- package/package/helpers/sessionId.js +11 -4
- package/package/helpers/uuid.js +1 -1
- package/package/helpers/visitorId.d.ts +1 -1
- package/package/helpers/visitorId.js +7 -4
- package/package/index-helpers/blocks-exports.d.ts +2 -2
- package/package/index-helpers/blocks-exports.js +2 -2
- package/package/index.d.ts +2 -2
- package/package/index.js +1 -1
- package/package/scripts/init-editing.js +65 -57
- package/package/types/builder-props.d.ts +10 -0
- package/package/types/components.d.ts +8 -2
- package/package/types/enforced-partials.d.ts +21 -0
- package/package/types/targets.d.ts +1 -3
- package/package/types/typescript.d.ts +6 -0
- package/package.json +2 -2
- package/src/blocks/BaseText.svelte +1 -1
- package/src/blocks/button/button.svelte +21 -34
- package/src/blocks/button/component-info.ts +20 -27
- package/src/blocks/columns/columns.svelte +28 -32
- package/src/blocks/columns/component-info.ts +205 -240
- package/src/blocks/custom-code/component-info.ts +20 -27
- package/src/blocks/embed/component-info.ts +34 -51
- package/src/blocks/embed/helpers.ts +2 -8
- package/src/blocks/form/component-info.ts +204 -253
- package/src/blocks/form/form.svelte +1 -368
- package/src/blocks/fragment/component-info.ts +3 -5
- package/src/blocks/helpers.ts +43 -0
- package/src/blocks/image/component-info.ts +113 -161
- package/src/blocks/image/image.helpers.ts +5 -33
- package/src/blocks/img/component-info.ts +11 -16
- package/src/blocks/img/img.svelte +7 -31
- package/src/blocks/input/component-info.ts +35 -66
- package/src/blocks/input/input.svelte +7 -31
- package/src/blocks/raw-text/component-info.ts +8 -12
- package/src/blocks/raw-text/raw-text.svelte +2 -5
- package/src/blocks/section/component-info.ts +28 -37
- package/src/blocks/section/section.svelte +7 -30
- package/src/blocks/select/component-info.ts +38 -55
- package/src/blocks/select/select.svelte +7 -31
- package/src/blocks/submit-button/component-info.ts +10 -15
- package/src/blocks/submit-button/submit-button.svelte +7 -30
- package/src/blocks/symbol/component-info.ts +31 -39
- package/src/blocks/symbol/symbol.helpers.ts +47 -0
- package/src/blocks/symbol/symbol.svelte +51 -95
- package/src/blocks/text/component-info.ts +14 -18
- package/src/blocks/text/text.svelte +2 -2
- package/src/blocks/textarea/component-info.ts +26 -36
- package/src/blocks/textarea/textarea.svelte +7 -30
- package/src/blocks/video/component-info.ts +77 -103
- package/src/blocks/video/video.svelte +4 -31
- package/src/components/{render-block/render-block.helpers.ts → block/block.helpers.ts} +22 -49
- package/src/components/block/block.svelte +158 -0
- package/src/components/{render-block → block/components}/block-styles.svelte +24 -25
- package/src/components/block/components/block-wrapper.svelte +70 -0
- package/src/components/block/components/component-ref/component-ref.helpers.ts +53 -0
- package/src/components/block/components/component-ref/component-ref.svelte +41 -0
- package/src/components/block/components/interactive-element.svelte +42 -0
- package/src/components/block/components/repeated-block.svelte +30 -0
- package/src/components/{render-block → block}/types.ts +1 -2
- package/src/components/{render-blocks.svelte → blocks/blocks-wrapper.svelte} +14 -32
- package/src/components/blocks/blocks.svelte +39 -0
- package/src/components/{render-content/render-content.svelte → content/components/enable-editor.svelte} +75 -202
- package/src/components/{render-content/components/render-styles.helpers.ts → content/components/styles.helpers.ts} +9 -11
- package/src/components/{render-content/components/render-styles.svelte → content/components/styles.svelte} +5 -5
- package/src/components/content/content.helpers.ts +42 -0
- package/src/components/content/content.svelte +138 -0
- package/src/components/content/content.types.ts +23 -0
- package/src/components/content/index.ts +1 -0
- package/src/components/{render-content → content}/wrap-component-ref.ts +1 -1
- package/src/components/content-variants/content-variants.svelte +120 -0
- package/src/components/content-variants/content-variants.types.ts +20 -0
- package/src/components/{render-content-variants → content-variants}/helpers.ts +53 -94
- package/src/components/inlined-script.svelte +13 -0
- package/src/constants/builder-registered-components.ts +34 -14
- package/src/constants/device-sizes.ts +16 -22
- package/src/constants/sdk-version.ts +1 -1
- package/src/constants/target.ts +3 -1
- package/src/context/builder.context.ts +1 -1
- package/src/context/types.ts +2 -7
- package/src/functions/apply-patch-with-mutation.ts +61 -0
- package/src/functions/camel-to-kebab-case.ts +1 -2
- package/src/functions/evaluate/acorn.ts +2501 -0
- package/src/functions/evaluate/evaluate.ts +90 -0
- package/src/functions/evaluate/index.ts +1 -0
- package/src/functions/evaluate/interpreter.ts +3887 -0
- package/src/functions/evaluate/non-node-runtime.ts +94 -0
- package/src/functions/evaluate/types.ts +10 -0
- package/src/functions/extract-text-styles.ts +3 -18
- package/src/functions/fast-clone.ts +1 -2
- package/src/functions/get-block-actions-handler.ts +11 -20
- package/src/functions/get-block-actions.ts +22 -14
- package/src/functions/get-block-component-options.ts +2 -3
- package/src/functions/get-block-properties.ts +24 -17
- package/src/functions/get-builder-search-params/index.ts +5 -21
- package/src/functions/get-content/generate-content-url.ts +10 -25
- package/src/functions/get-content/index.ts +34 -37
- package/src/functions/get-content/types.ts +4 -2
- package/src/functions/get-fetch.ts +3 -10
- package/src/functions/get-global-this.ts +1 -2
- package/src/functions/get-processed-block.ts +14 -21
- package/src/functions/get-react-native-block-styles.ts +6 -12
- package/src/functions/if-target.ts +2 -3
- package/src/functions/is-browser.ts +1 -1
- package/src/functions/is-editing.ts +2 -7
- package/src/functions/is-iframe.ts +1 -2
- package/src/functions/is-non-node-server.ts +9 -0
- package/src/functions/is-previewing.ts +1 -4
- package/src/functions/on-change.ts +2 -2
- package/src/functions/register-component.ts +24 -26
- package/src/functions/register.ts +6 -8
- package/src/functions/sanitize-react-native-block-styles.ts +17 -24
- package/src/functions/set-editor-settings.ts +5 -6
- package/src/functions/set.ts +3 -15
- package/src/functions/track/helpers.ts +8 -24
- package/src/functions/track/index.ts +37 -42
- package/src/functions/track/interaction.ts +21 -38
- package/src/functions/transform-block-properties.ts +1 -1
- package/src/functions/transform-block.ts +1 -1
- package/src/helpers/ab-tests.ts +69 -78
- package/src/helpers/canTrack.ts +2 -4
- package/src/helpers/cookie.ts +15 -46
- package/src/helpers/css.ts +4 -13
- package/src/helpers/flatten.ts +11 -16
- package/src/helpers/localStorage.ts +4 -8
- package/src/helpers/logger.ts +2 -2
- package/src/helpers/nullable.ts +1 -3
- package/src/helpers/preview-lru-cache/get.ts +8 -0
- package/src/helpers/preview-lru-cache/helpers.ts +9 -0
- package/src/helpers/preview-lru-cache/init.ts +17 -0
- package/src/helpers/preview-lru-cache/set.ts +18 -0
- package/src/helpers/preview-lru-cache/types.ts +12 -0
- package/src/helpers/sessionId.ts +12 -13
- package/src/helpers/time.ts +1 -3
- package/src/helpers/url.ts +1 -2
- package/src/helpers/uuid.ts +3 -3
- package/src/helpers/visitorId.ts +14 -17
- package/src/index-helpers/blocks-exports.ts +2 -2
- package/src/index-helpers/top-of-file.ts +1 -1
- package/src/index.ts +2 -13
- package/src/scripts/init-editing.ts +85 -98
- package/src/types/api-version.ts +1 -1
- package/src/types/builder-block.ts +1 -3
- package/src/types/builder-content.ts +7 -4
- package/src/types/builder-props.ts +10 -0
- package/src/types/can-track.ts +1 -1
- package/src/types/components.ts +17 -13
- package/src/types/deep-partial.ts +1 -7
- package/src/types/element.ts +1 -3
- package/src/types/enforced-partials.ts +13 -0
- package/src/types/input.ts +6 -9
- package/src/types/targets.ts +1 -6
- package/src/types/typescript.ts +10 -5
- package/package/blocks/util.d.ts +0 -4
- package/package/blocks/util.js +0 -13
- package/package/components/render-block/render-block.helpers.d.ts +0 -12
- package/package/components/render-block/render-block.svelte +0 -152
- package/package/components/render-block/render-block.svelte.d.ts +0 -24
- package/package/components/render-block/render-component.svelte +0 -21
- package/package/components/render-block/render-component.svelte.d.ts +0 -34
- package/package/components/render-block/render-repeated-block.svelte.d.ts +0 -23
- package/package/components/render-blocks.svelte.d.ts +0 -26
- package/package/components/render-content/builder-editing.svelte +0 -4
- package/package/components/render-content/builder-editing.svelte.d.ts +0 -14
- package/package/components/render-content/index.d.ts +0 -1
- package/package/components/render-content/index.js +0 -1
- package/package/components/render-content/render-content.helpers.d.ts +0 -7
- package/package/components/render-content/render-content.helpers.js +0 -30
- package/package/components/render-content/render-content.svelte.d.ts +0 -31
- package/package/components/render-content/render-content.types.d.ts +0 -38
- package/package/components/render-content-variants/helpers.d.ts +0 -17
- package/package/components/render-content-variants/render-content-variants.svelte +0 -70
- package/package/components/render-content-variants/render-content-variants.svelte.d.ts +0 -23
- package/package/components/render-inlined-styles.svelte.d.ts +0 -21
- package/package/functions/evaluate.test.js +0 -17
- package/package/functions/get-builder-search-params/fn.test.js +0 -13
- package/package/functions/get-content/generate-content-url.test.js +0 -97
- package/package/functions/get-processed-block.test.js +0 -33
- package/package/functions/on-change.test.d.ts +0 -1
- package/package/functions/on-change.test.js +0 -20
- package/package/functions/set.test.d.ts +0 -1
- package/package/functions/set.test.js +0 -16
- package/package/helpers/url.test.d.ts +0 -1
- package/package/helpers/url.test.js +0 -21
- package/src/blocks/util.ts +0 -18
- package/src/components/render-block/render-block.svelte +0 -173
- package/src/components/render-block/render-component.svelte +0 -40
- package/src/components/render-block/render-repeated-block.svelte +0 -25
- package/src/components/render-content/builder-editing.svelte +0 -4
- package/src/components/render-content/index.ts +0 -1
- package/src/components/render-content/render-content.helpers.ts +0 -48
- package/src/components/render-content/render-content.types.ts +0 -42
- package/src/components/render-content-variants/render-content-variants.svelte +0 -83
- package/src/functions/evaluate.test.ts +0 -21
- package/src/functions/evaluate.ts +0 -99
- package/src/functions/get-builder-search-params/fn.test.ts +0 -19
- package/src/functions/get-content/generate-content-url.test.ts +0 -112
- package/src/functions/get-processed-block.test.ts +0 -35
- package/src/functions/on-change.test.ts +0 -23
- package/src/functions/set.test.ts +0 -19
- package/src/helpers/url.test.ts +0 -23
- /package/package/components/{render-block → block}/types.d.ts +0 -0
- /package/package/components/{render-block → block}/types.js +0 -0
- /package/package/{functions/evaluate.test.d.ts → components/content/content.types.js} +0 -0
- /package/package/components/{render-content → content}/wrap-component-ref.d.ts +0 -0
- /package/package/components/{render-content → content}/wrap-component-ref.js +0 -0
- /package/package/components/{render-content/render-content.types.js → content-variants/content-variants.types.js} +0 -0
- /package/package/components/{render-inlined-styles.svelte → inlined-styles.svelte} +0 -0
- /package/package/functions/{get-builder-search-params/fn.test.d.ts → evaluate/types.js} +0 -0
- /package/package/{functions/get-content/generate-content-url.test.d.ts → types/builder-props.js} +0 -0
- /package/package/{functions/get-processed-block.test.d.ts → types/enforced-partials.js} +0 -0
- /package/src/components/{render-inlined-styles.svelte → inlined-styles.svelte} +0 -0
|
@@ -2,20 +2,17 @@ export const componentInfo = {
|
|
|
2
2
|
name: 'Core:Section',
|
|
3
3
|
static: true,
|
|
4
4
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a',
|
|
5
|
-
inputs: [
|
|
6
|
-
{
|
|
5
|
+
inputs: [{
|
|
7
6
|
name: 'maxWidth',
|
|
8
7
|
type: 'number',
|
|
9
|
-
defaultValue: 1200
|
|
10
|
-
},
|
|
11
|
-
{
|
|
8
|
+
defaultValue: 1200
|
|
9
|
+
}, {
|
|
12
10
|
name: 'lazyLoad',
|
|
13
11
|
type: 'boolean',
|
|
14
12
|
defaultValue: false,
|
|
15
13
|
advanced: true,
|
|
16
|
-
description: 'Only render this section when in view'
|
|
17
|
-
},
|
|
18
|
-
],
|
|
14
|
+
description: 'Only render this section when in view'
|
|
15
|
+
}],
|
|
19
16
|
defaultStyles: {
|
|
20
17
|
paddingLeft: '20px',
|
|
21
18
|
paddingRight: '20px',
|
|
@@ -23,23 +20,21 @@ export const componentInfo = {
|
|
|
23
20
|
paddingBottom: '50px',
|
|
24
21
|
marginTop: '0px',
|
|
25
22
|
width: '100vw',
|
|
26
|
-
marginLeft: 'calc(50% - 50vw)'
|
|
23
|
+
marginLeft: 'calc(50% - 50vw)'
|
|
27
24
|
},
|
|
28
25
|
canHaveChildren: true,
|
|
29
|
-
defaultChildren: [
|
|
30
|
-
{
|
|
26
|
+
defaultChildren: [{
|
|
31
27
|
'@type': '@builder.io/sdk:Element',
|
|
32
28
|
responsiveStyles: {
|
|
33
29
|
large: {
|
|
34
|
-
textAlign: 'center'
|
|
35
|
-
}
|
|
30
|
+
textAlign: 'center'
|
|
31
|
+
}
|
|
36
32
|
},
|
|
37
33
|
component: {
|
|
38
34
|
name: 'Text',
|
|
39
35
|
options: {
|
|
40
|
-
text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
],
|
|
36
|
+
text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}]
|
|
45
40
|
};
|
|
@@ -1,32 +1,7 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
|
-
<script>
|
|
4
|
-
|
|
5
|
-
const filterAttrs = (attrs = {}, filter) => {
|
|
6
|
-
const validAttr = {};
|
|
7
|
-
Object.keys(attrs).forEach((attr) => {
|
|
8
|
-
if (filter(attr)) {
|
|
9
|
-
validAttr[attr] = attrs[attr];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
return validAttr;
|
|
13
|
-
};
|
|
14
|
-
const setAttrs = (node, attrs = {}) => {
|
|
15
|
-
const attrKeys = Object.keys(attrs);
|
|
16
|
-
const setup = (attr) => node.addEventListener(attr.substr(3), attrs[attr]);
|
|
17
|
-
const teardown = (attr) => node.removeEventListener(attr.substr(3), attrs[attr]);
|
|
18
|
-
attrKeys.map(setup);
|
|
19
|
-
return {
|
|
20
|
-
update(attrs = {}) {
|
|
21
|
-
const attrKeys = Object.keys(attrs);
|
|
22
|
-
attrKeys.map(teardown);
|
|
23
|
-
attrKeys.map(setup);
|
|
24
|
-
},
|
|
25
|
-
destroy() {
|
|
26
|
-
attrKeys.map(teardown);
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
};
|
|
3
|
+
<script>import { filterAttrs } from "../helpers.js";
|
|
4
|
+
import { setAttrs } from "../helpers.js";
|
|
30
5
|
export let attributes;
|
|
31
6
|
export let maxWidth;
|
|
32
7
|
function mitosis_styling(node, vars) {
|
|
@@ -54,8 +29,8 @@ function mitosis_styling(node, vars) {
|
|
|
54
29
|
marginLeft: "auto",
|
|
55
30
|
marginRight: "auto",
|
|
56
31
|
}}
|
|
57
|
-
{...filterAttrs(attributes,
|
|
58
|
-
use:setAttrs={filterAttrs(attributes,
|
|
32
|
+
{...filterAttrs(attributes, "on:", false)}
|
|
33
|
+
use:setAttrs={filterAttrs(attributes, "on:", true)}
|
|
59
34
|
>
|
|
60
35
|
<slot />
|
|
61
36
|
</section>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ComponentInfo } from '../../types/components';
|
|
1
|
+
import type { ComponentInfo } from '../../types/components.js';
|
|
2
2
|
export declare const componentInfo: ComponentInfo;
|
|
@@ -2,54 +2,42 @@ export const componentInfo = {
|
|
|
2
2
|
name: 'Form:Select',
|
|
3
3
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045',
|
|
4
4
|
defaultStyles: {
|
|
5
|
-
alignSelf: 'flex-start'
|
|
5
|
+
alignSelf: 'flex-start'
|
|
6
6
|
},
|
|
7
|
-
inputs: [
|
|
8
|
-
{
|
|
7
|
+
inputs: [{
|
|
9
8
|
name: 'options',
|
|
10
9
|
type: 'list',
|
|
11
10
|
required: true,
|
|
12
|
-
subFields: [
|
|
13
|
-
{
|
|
11
|
+
subFields: [{
|
|
14
12
|
name: 'value',
|
|
15
13
|
type: 'text',
|
|
16
|
-
required: true
|
|
17
|
-
},
|
|
18
|
-
{
|
|
14
|
+
required: true
|
|
15
|
+
}, {
|
|
19
16
|
name: 'name',
|
|
20
|
-
type: 'text'
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
value: 'option
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
value: 'option 2',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
{
|
|
17
|
+
type: 'text'
|
|
18
|
+
}],
|
|
19
|
+
defaultValue: [{
|
|
20
|
+
value: 'option 1'
|
|
21
|
+
}, {
|
|
22
|
+
value: 'option 2'
|
|
23
|
+
}]
|
|
24
|
+
}, {
|
|
33
25
|
name: 'name',
|
|
34
26
|
type: 'string',
|
|
35
27
|
required: true,
|
|
36
|
-
helperText: 'Every select in a form needs a unique name describing what it gets, e.g. "email"'
|
|
37
|
-
},
|
|
38
|
-
{
|
|
28
|
+
helperText: 'Every select in a form needs a unique name describing what it gets, e.g. "email"'
|
|
29
|
+
}, {
|
|
39
30
|
name: 'defaultValue',
|
|
40
|
-
type: 'string'
|
|
41
|
-
},
|
|
42
|
-
{
|
|
31
|
+
type: 'string'
|
|
32
|
+
}, {
|
|
43
33
|
name: 'value',
|
|
44
34
|
type: 'string',
|
|
45
|
-
advanced: true
|
|
46
|
-
},
|
|
47
|
-
{
|
|
35
|
+
advanced: true
|
|
36
|
+
}, {
|
|
48
37
|
name: 'required',
|
|
49
38
|
type: 'boolean',
|
|
50
|
-
defaultValue: false
|
|
51
|
-
},
|
|
52
|
-
],
|
|
39
|
+
defaultValue: false
|
|
40
|
+
}],
|
|
53
41
|
static: true,
|
|
54
|
-
noWrap: true
|
|
42
|
+
noWrap: true
|
|
55
43
|
};
|
|
@@ -1,33 +1,8 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>import { isEditing } from "../../functions/is-editing.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const filterAttrs = (attrs = {}, filter) => {
|
|
7
|
-
const validAttr = {};
|
|
8
|
-
Object.keys(attrs).forEach((attr) => {
|
|
9
|
-
if (filter(attr)) {
|
|
10
|
-
validAttr[attr] = attrs[attr];
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
return validAttr;
|
|
14
|
-
};
|
|
15
|
-
const setAttrs = (node, attrs = {}) => {
|
|
16
|
-
const attrKeys = Object.keys(attrs);
|
|
17
|
-
const setup = (attr) => node.addEventListener(attr.substr(3), attrs[attr]);
|
|
18
|
-
const teardown = (attr) => node.removeEventListener(attr.substr(3), attrs[attr]);
|
|
19
|
-
attrKeys.map(setup);
|
|
20
|
-
return {
|
|
21
|
-
update(attrs = {}) {
|
|
22
|
-
const attrKeys = Object.keys(attrs);
|
|
23
|
-
attrKeys.map(teardown);
|
|
24
|
-
attrKeys.map(setup);
|
|
25
|
-
},
|
|
26
|
-
destroy() {
|
|
27
|
-
attrKeys.map(teardown);
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
};
|
|
4
|
+
import { filterAttrs } from "../helpers.js";
|
|
5
|
+
import { setAttrs } from "../helpers.js";
|
|
31
6
|
export let attributes;
|
|
32
7
|
export let value;
|
|
33
8
|
export let defaultValue;
|
|
@@ -36,12 +11,12 @@ export let options;
|
|
|
36
11
|
</script>
|
|
37
12
|
|
|
38
13
|
<select
|
|
39
|
-
{...filterAttrs(attributes,
|
|
14
|
+
{...filterAttrs(attributes, "on:", false)}
|
|
40
15
|
{value}
|
|
41
16
|
key={isEditing() && defaultValue ? defaultValue : "default-key"}
|
|
42
17
|
{defaultValue}
|
|
43
18
|
{name}
|
|
44
|
-
use:setAttrs={filterAttrs(attributes,
|
|
19
|
+
use:setAttrs={filterAttrs(attributes, "on:", true)}
|
|
45
20
|
>
|
|
46
21
|
{#each options as option}
|
|
47
22
|
<option value={option.value}>{option.name || option.value}</option>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ComponentInfo } from '../../types/components';
|
|
1
|
+
import type { ComponentInfo } from '../../types/components.js';
|
|
2
2
|
export declare const componentInfo: ComponentInfo;
|
|
@@ -10,17 +10,15 @@ export const componentInfo = {
|
|
|
10
10
|
backgroundColor: '#3898EC',
|
|
11
11
|
color: 'white',
|
|
12
12
|
borderRadius: '4px',
|
|
13
|
-
cursor: 'pointer'
|
|
13
|
+
cursor: 'pointer'
|
|
14
14
|
},
|
|
15
|
-
inputs: [
|
|
16
|
-
{
|
|
15
|
+
inputs: [{
|
|
17
16
|
name: 'text',
|
|
18
17
|
type: 'text',
|
|
19
|
-
defaultValue: 'Click me'
|
|
20
|
-
},
|
|
21
|
-
],
|
|
18
|
+
defaultValue: 'Click me'
|
|
19
|
+
}],
|
|
22
20
|
static: true,
|
|
23
|
-
noWrap: true
|
|
21
|
+
noWrap: true
|
|
24
22
|
// TODO: optional children? maybe as optional form input
|
|
25
23
|
// that only shows if advanced setting is flipped
|
|
26
24
|
// TODO: defaultChildren
|
|
@@ -1,40 +1,15 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
|
-
<script>
|
|
4
|
-
|
|
5
|
-
const filterAttrs = (attrs = {}, filter) => {
|
|
6
|
-
const validAttr = {};
|
|
7
|
-
Object.keys(attrs).forEach((attr) => {
|
|
8
|
-
if (filter(attr)) {
|
|
9
|
-
validAttr[attr] = attrs[attr];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
return validAttr;
|
|
13
|
-
};
|
|
14
|
-
const setAttrs = (node, attrs = {}) => {
|
|
15
|
-
const attrKeys = Object.keys(attrs);
|
|
16
|
-
const setup = (attr) => node.addEventListener(attr.substr(3), attrs[attr]);
|
|
17
|
-
const teardown = (attr) => node.removeEventListener(attr.substr(3), attrs[attr]);
|
|
18
|
-
attrKeys.map(setup);
|
|
19
|
-
return {
|
|
20
|
-
update(attrs = {}) {
|
|
21
|
-
const attrKeys = Object.keys(attrs);
|
|
22
|
-
attrKeys.map(teardown);
|
|
23
|
-
attrKeys.map(setup);
|
|
24
|
-
},
|
|
25
|
-
destroy() {
|
|
26
|
-
attrKeys.map(teardown);
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
};
|
|
3
|
+
<script>import { filterAttrs } from "../helpers.js";
|
|
4
|
+
import { setAttrs } from "../helpers.js";
|
|
30
5
|
export let attributes;
|
|
31
6
|
export let text;
|
|
32
7
|
</script>
|
|
33
8
|
|
|
34
9
|
<button
|
|
35
10
|
type="submit"
|
|
36
|
-
{...filterAttrs(attributes,
|
|
37
|
-
use:setAttrs={filterAttrs(attributes,
|
|
11
|
+
{...filterAttrs(attributes, "on:", false)}
|
|
12
|
+
use:setAttrs={filterAttrs(attributes, "on:", true)}
|
|
38
13
|
>
|
|
39
14
|
{text}
|
|
40
15
|
</button>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ComponentInfo } from '../../types/components';
|
|
1
|
+
import type { ComponentInfo } from '../../types/components.js';
|
|
2
2
|
export declare const componentInfo: ComponentInfo;
|
|
@@ -2,38 +2,33 @@ export const componentInfo = {
|
|
|
2
2
|
name: 'Symbol',
|
|
3
3
|
noWrap: true,
|
|
4
4
|
static: true,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
isRSC: true,
|
|
6
|
+
inputs: [{
|
|
7
7
|
name: 'symbol',
|
|
8
|
-
type: 'uiSymbol'
|
|
9
|
-
},
|
|
10
|
-
{
|
|
8
|
+
type: 'uiSymbol'
|
|
9
|
+
}, {
|
|
11
10
|
name: 'dataOnly',
|
|
12
11
|
helperText: "Make this a data symbol that doesn't display any UI",
|
|
13
12
|
type: 'boolean',
|
|
14
13
|
defaultValue: false,
|
|
15
14
|
advanced: true,
|
|
16
|
-
hideFromUI: true
|
|
17
|
-
},
|
|
18
|
-
{
|
|
15
|
+
hideFromUI: true
|
|
16
|
+
}, {
|
|
19
17
|
name: 'inheritState',
|
|
20
18
|
helperText: 'Inherit the parent component state and data',
|
|
21
19
|
type: 'boolean',
|
|
22
20
|
defaultValue: false,
|
|
23
|
-
advanced: true
|
|
24
|
-
},
|
|
25
|
-
{
|
|
21
|
+
advanced: true
|
|
22
|
+
}, {
|
|
26
23
|
name: 'renderToLiquid',
|
|
27
24
|
helperText: 'Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting',
|
|
28
25
|
type: 'boolean',
|
|
29
26
|
defaultValue: false,
|
|
30
27
|
advanced: true,
|
|
31
|
-
hideFromUI: true
|
|
32
|
-
},
|
|
33
|
-
{
|
|
28
|
+
hideFromUI: true
|
|
29
|
+
}, {
|
|
34
30
|
name: 'useChildren',
|
|
35
31
|
hideFromUI: true,
|
|
36
|
-
type: 'boolean'
|
|
37
|
-
}
|
|
38
|
-
],
|
|
32
|
+
type: 'boolean'
|
|
33
|
+
}]
|
|
39
34
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../../context/types.js';
|
|
2
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
3
|
+
export interface SymbolInfo {
|
|
4
|
+
model?: string;
|
|
5
|
+
entry?: string;
|
|
6
|
+
data?: any;
|
|
7
|
+
content?: BuilderContent;
|
|
8
|
+
inline?: boolean;
|
|
9
|
+
dynamic?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const fetchContent: ({ builderContextValue, symbol }: {
|
|
12
|
+
symbol: SymbolInfo | undefined;
|
|
13
|
+
builderContextValue: BuilderContextInterface;
|
|
14
|
+
}) => Promise<BuilderContent | null | undefined>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getContent } from '../../functions/get-content/index.js';
|
|
2
|
+
import { logger } from '../../helpers/logger.js';
|
|
3
|
+
export const fetchContent = async ({ builderContextValue, symbol }) => {
|
|
4
|
+
/**
|
|
5
|
+
* If:
|
|
6
|
+
* - we have a symbol prop
|
|
7
|
+
* - yet it does not have any content
|
|
8
|
+
* - and we have not already stored content from before
|
|
9
|
+
* - and it has a model name
|
|
10
|
+
*
|
|
11
|
+
* then we want to re-fetch the symbol content.
|
|
12
|
+
*/
|
|
13
|
+
if (symbol?.model &&
|
|
14
|
+
// This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
15
|
+
builderContextValue?.apiKey) {
|
|
16
|
+
return getContent({
|
|
17
|
+
model: symbol.model,
|
|
18
|
+
apiKey: builderContextValue.apiKey,
|
|
19
|
+
apiVersion: builderContextValue.apiVersion,
|
|
20
|
+
...(symbol?.entry && {
|
|
21
|
+
query: {
|
|
22
|
+
id: symbol.entry
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
}).catch(err => {
|
|
26
|
+
logger.error('Could not fetch symbol content: ', err);
|
|
27
|
+
return undefined;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
};
|
|
@@ -1,107 +1,60 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
|
-
<script>import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const isEvent = (attr) => attr.startsWith("on:");
|
|
10
|
-
const isNonEvent = (attr) => !attr.startsWith("on:");
|
|
11
|
-
const filterAttrs = (attrs = {}, filter) => {
|
|
12
|
-
const validAttr = {};
|
|
13
|
-
Object.keys(attrs).forEach((attr) => {
|
|
14
|
-
if (filter(attr)) {
|
|
15
|
-
validAttr[attr] = attrs[attr];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
return validAttr;
|
|
19
|
-
};
|
|
20
|
-
const setAttrs = (node, attrs = {}) => {
|
|
21
|
-
const attrKeys = Object.keys(attrs);
|
|
22
|
-
const setup = (attr) => node.addEventListener(attr.substr(3), attrs[attr]);
|
|
23
|
-
const teardown = (attr) => node.removeEventListener(attr.substr(3), attrs[attr]);
|
|
24
|
-
attrKeys.map(setup);
|
|
25
|
-
return {
|
|
26
|
-
update(attrs = {}) {
|
|
27
|
-
const attrKeys = Object.keys(attrs);
|
|
28
|
-
attrKeys.map(teardown);
|
|
29
|
-
attrKeys.map(setup);
|
|
30
|
-
},
|
|
31
|
-
destroy() {
|
|
32
|
-
attrKeys.map(teardown);
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
};
|
|
3
|
+
<script>import { onMount } from "svelte";
|
|
4
|
+
import ContentVariants from "../../components/content-variants/content-variants.svelte";
|
|
5
|
+
import { filterAttrs } from "../helpers.js";
|
|
6
|
+
import { setAttrs } from "../helpers.js";
|
|
7
|
+
import { fetchContent } from "./symbol.helpers.js";
|
|
8
|
+
export let js;
|
|
36
9
|
export let attributes;
|
|
37
10
|
export let symbol;
|
|
38
11
|
export let dynamic;
|
|
39
|
-
let builderContext
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
53
|
-
$builderContext?.apiKey) {
|
|
54
|
-
getContent({
|
|
55
|
-
model: symbol.model,
|
|
56
|
-
apiKey: $builderContext.apiKey,
|
|
57
|
-
apiVersion: $builderContext.apiVersion,
|
|
58
|
-
query: {
|
|
59
|
-
id: symbol.entry,
|
|
60
|
-
},
|
|
61
|
-
})
|
|
62
|
-
.then((response) => {
|
|
63
|
-
if (response) {
|
|
64
|
-
contentToUse = response;
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
.catch((err) => {
|
|
68
|
-
logger.error("Could not fetch symbol content: ", err);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
12
|
+
export let builderContext;
|
|
13
|
+
export let builderComponents;
|
|
14
|
+
function setContent() {
|
|
15
|
+
if (contentToUse)
|
|
16
|
+
return;
|
|
17
|
+
fetchContent({
|
|
18
|
+
symbol: symbol,
|
|
19
|
+
builderContextValue: $builderContext,
|
|
20
|
+
}).then((newContent) => {
|
|
21
|
+
if (newContent) {
|
|
22
|
+
contentToUse = newContent;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
71
25
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
26
|
+
$: className = () => {
|
|
27
|
+
return [
|
|
28
|
+
...[attributes.class],
|
|
29
|
+
"builder-symbol",
|
|
30
|
+
symbol?.inline ? "builder-inline-symbol" : undefined,
|
|
31
|
+
symbol?.dynamic || dynamic ? "builder-dynamic-symbol" : undefined,
|
|
32
|
+
]
|
|
33
|
+
.filter(Boolean)
|
|
34
|
+
.join(" ");
|
|
35
|
+
};
|
|
82
36
|
let contentToUse = symbol?.content;
|
|
83
37
|
onMount(() => {
|
|
84
|
-
|
|
38
|
+
setContent();
|
|
85
39
|
});
|
|
86
40
|
function onUpdateFn_0(..._args) {
|
|
87
|
-
|
|
41
|
+
setContent();
|
|
88
42
|
}
|
|
89
43
|
$: onUpdateFn_0(...[symbol]);
|
|
90
44
|
</script>
|
|
91
45
|
|
|
92
46
|
<div
|
|
93
|
-
{...filterAttrs(attributes,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
class={className}
|
|
98
|
-
use:setAttrs={filterAttrs(attributes, isEvent)}
|
|
47
|
+
{...filterAttrs(attributes, "on:", false)}
|
|
48
|
+
{...{}}
|
|
49
|
+
class={className()}
|
|
50
|
+
use:setAttrs={filterAttrs(attributes, "on:", true)}
|
|
99
51
|
>
|
|
100
|
-
<
|
|
52
|
+
<ContentVariants
|
|
53
|
+
__isNestedRender={true}
|
|
101
54
|
apiVersion={$builderContext.apiVersion}
|
|
102
55
|
apiKey={$builderContext.apiKey}
|
|
103
56
|
context={$builderContext.context}
|
|
104
|
-
customComponents={Object.values(
|
|
57
|
+
customComponents={Object.values(builderComponents)}
|
|
105
58
|
data={{
|
|
106
59
|
...symbol?.data,
|
|
107
60
|
...$builderContext.localState,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
+
*/ export interface SymbolInfo {
|
|
3
5
|
model?: string;
|
|
4
6
|
entry?: string;
|
|
5
7
|
data?: any;
|
|
@@ -7,21 +9,25 @@ export interface SymbolInfo {
|
|
|
7
9
|
inline?: boolean;
|
|
8
10
|
dynamic?: boolean;
|
|
9
11
|
}
|
|
10
|
-
|
|
12
|
+
/**
|
|
13
|
+
* This import is used by the Svelte SDK. Do not remove.
|
|
14
|
+
*/ export interface SymbolProps extends BuilderComponentsProp {
|
|
11
15
|
symbol?: SymbolInfo;
|
|
12
16
|
dataOnly?: boolean;
|
|
13
17
|
dynamic?: boolean;
|
|
14
|
-
builderBlock?: BuilderBlock;
|
|
15
18
|
attributes?: any;
|
|
16
19
|
inheritState?: boolean;
|
|
17
20
|
}
|
|
18
21
|
import type { BuilderContent } from "../../types/builder-content.js";
|
|
19
|
-
import type {
|
|
22
|
+
import type { BuilderComponentsProp, PropsWithBuilderData } from "../../types/builder-props.js";
|
|
20
23
|
declare const __propDef: {
|
|
21
24
|
props: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
js: any;
|
|
26
|
+
attributes: PropsWithBuilderData<SymbolProps>["attributes"];
|
|
27
|
+
symbol: PropsWithBuilderData<SymbolProps>["symbol"];
|
|
28
|
+
dynamic: PropsWithBuilderData<SymbolProps>["dynamic"];
|
|
29
|
+
builderContext: PropsWithBuilderData<SymbolProps>["builderContext"];
|
|
30
|
+
builderComponents: PropsWithBuilderData<SymbolProps>["builderComponents"];
|
|
25
31
|
};
|
|
26
32
|
events: {
|
|
27
33
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ComponentInfo } from '../../types/components';
|
|
1
|
+
import type { ComponentInfo } from '../../types/components.js';
|
|
2
2
|
export declare const componentInfo: ComponentInfo;
|