@builder.io/sdk-vue 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.json +1 -1
- package/packages/_vue2/dist/block-styles.6a14fec4.cjs +1 -0
- package/packages/_vue2/dist/block-styles.982735c2.js +77 -0
- package/packages/_vue2/dist/block-wrapper.701626ff.cjs +1 -0
- package/packages/_vue2/dist/block-wrapper.fbaeab1b.js +66 -0
- package/packages/_vue2/dist/block.a18a495f.cjs +3 -0
- package/packages/_vue2/dist/block.e9484073.js +178 -0
- package/packages/_vue2/dist/blocks-wrapper.4afaccc5.js +72 -0
- package/packages/_vue2/dist/blocks-wrapper.e0086c60.cjs +1 -0
- package/packages/_vue2/dist/builder.context.29ec27bd.js +18 -0
- package/packages/_vue2/dist/builder.context.e22f06a0.cjs +1 -0
- package/packages/_vue2/dist/component-ref.8772e5f7.cjs +1 -0
- package/packages/_vue2/dist/component-ref.ad8ecffe.js +98 -0
- package/packages/_vue2/dist/content.697b2fbd.js +905 -0
- package/packages/_vue2/dist/content.fb93079e.cjs +1 -0
- package/packages/_vue2/dist/css.1aff1efe.js +21 -0
- package/packages/_vue2/dist/css.daac46ac.cjs +6 -0
- package/packages/_vue2/dist/enable-editor.12c3716b.cjs +1 -0
- package/packages/_vue2/dist/enable-editor.8d1c24b0.js +428 -0
- package/packages/_vue2/dist/evaluate.b0496c3f.js +4970 -0
- package/packages/_vue2/dist/evaluate.d1bef2c5.cjs +31 -0
- package/packages/_vue2/dist/get-block-actions.88b6dbbf.cjs +1 -0
- package/packages/_vue2/dist/get-block-actions.a39f0f6b.js +36 -0
- package/packages/_vue2/dist/get-block-properties.316bbdf9.js +48 -0
- package/packages/_vue2/dist/get-block-properties.3ab4b67f.cjs +1 -0
- package/packages/_vue2/dist/get-processed-block.2c6787e1.js +52 -0
- package/packages/_vue2/dist/get-processed-block.deb6b33a.cjs +1 -0
- package/packages/_vue2/dist/index.051a3d7b.cjs +32 -0
- package/packages/_vue2/dist/index.8352d880.js +1360 -0
- package/packages/_vue2/dist/inlined-script.874c7b5a.cjs +1 -0
- package/packages/_vue2/dist/inlined-script.b4595308.js +23 -0
- package/packages/_vue2/dist/inlined-styles.d8b2af39.cjs +1 -0
- package/packages/_vue2/dist/inlined-styles.dd4a079a.js +23 -0
- package/packages/_vue2/dist/interactive-element.12db10c4.cjs +1 -0
- package/packages/_vue2/dist/interactive-element.e2f7ca88.js +42 -0
- package/packages/_vue2/dist/repeated-block.0343c63e.cjs +1 -0
- package/packages/_vue2/dist/repeated-block.c74334c2.js +39 -0
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +11 -11
- package/packages/_vue2/dist/src/blocks/button/button.vue.d.ts +9 -18
- package/packages/_vue2/dist/src/blocks/button/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +7 -6
- package/packages/_vue2/dist/src/blocks/columns/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/custom-code/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/embed/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/embed/embed.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/fragment/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/helpers.d.ts +13 -0
- package/packages/_vue2/dist/src/blocks/image/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/image/image.vue.d.ts +6 -6
- package/packages/_vue2/dist/src/blocks/img/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +27 -6
- package/packages/_vue2/dist/src/blocks/section/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/section/section.vue.d.ts +9 -6
- package/packages/_vue2/dist/src/blocks/symbol/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/symbol/symbol.helpers.d.ts +14 -0
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +11 -7
- package/packages/_vue2/dist/src/blocks/text/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/text/text.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/video/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/video/video.vue.d.ts +7 -3
- package/packages/_vue2/dist/src/components/block/block.helpers.d.ts +13 -0
- package/packages/{_vue3/dist/src/components/render-block/render-block.vue.d.ts → _vue2/dist/src/components/block/block.vue.d.ts} +3 -2
- package/packages/_vue2/dist/src/components/{render-block → block/components}/block-styles.vue.d.ts +4 -4
- package/packages/_vue2/dist/src/components/block/components/block-wrapper.vue.d.ts +29 -0
- package/packages/_vue2/dist/src/components/block/components/component-ref/component-ref.helpers.d.ts +30 -0
- package/packages/_vue2/dist/src/components/block/components/component-ref/component-ref.vue.d.ts +2 -0
- package/packages/_vue2/dist/src/components/block/components/interactive-element.vue.d.ts +30 -0
- package/packages/_vue2/dist/src/components/block/components/repeated-block.vue.d.ts +16 -0
- package/packages/_vue2/dist/src/components/{render-blocks.vue.d.ts → blocks/blocks-wrapper.vue.d.ts} +6 -6
- package/packages/_vue2/dist/src/components/blocks/blocks.vue.d.ts +29 -0
- package/packages/_vue2/dist/src/components/{render-content/render-content.vue.d.ts → content/components/enable-editor.vue.d.ts} +12 -34
- package/packages/{_vue3/dist/src/components/render-content/components/render-styles.helpers.d.ts → _vue2/dist/src/components/content/components/styles.helpers.d.ts} +1 -1
- package/packages/_vue2/dist/src/components/{render-content/components/render-styles.vue.d.ts → content/components/styles.vue.d.ts} +1 -1
- package/packages/_vue2/dist/src/components/content/content.helpers.d.ts +7 -0
- package/packages/_vue2/dist/src/components/content/content.types.d.ts +24 -0
- package/packages/_vue2/dist/src/components/content/content.vue.d.ts +26 -0
- package/packages/_vue2/dist/src/components/content-variants/content-variants.types.d.ts +20 -0
- package/packages/_vue2/dist/src/components/content-variants/content-variants.vue.d.ts +53 -0
- package/packages/{_vue3/dist/src/components/render-content-variants → _vue2/dist/src/components/content-variants}/helpers.d.ts +6 -5
- package/packages/_vue2/dist/src/components/inlined-script.vue.d.ts +11 -0
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/src/constants/target.d.ts +1 -1
- package/packages/_vue2/dist/src/context/builder.context.d.ts +1 -1
- package/packages/_vue2/dist/src/context/types.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/{evaluate.d.ts → evaluate/evaluate.d.ts} +5 -2
- package/packages/_vue2/dist/src/functions/evaluate/index.d.ts +1 -0
- package/packages/_vue2/dist/src/functions/evaluate/interpreter.d.ts +2 -0
- package/packages/_vue2/dist/src/functions/evaluate/non-node-runtime.d.ts +2 -0
- package/packages/_vue2/dist/src/functions/evaluate/types.d.ts +10 -0
- package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +1 -0
- package/packages/_vue2/dist/src/functions/get-block-properties.d.ts +5 -1
- package/packages/_vue2/dist/src/functions/get-content/index.d.ts +2 -6
- package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-react-native-block-styles.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/is-non-node-server.d.ts +4 -0
- package/packages/_vue2/dist/src/functions/register-component.d.ts +2 -1
- package/packages/_vue2/dist/src/helpers/ab-tests.d.ts +2 -2
- package/packages/_vue2/dist/src/helpers/cookie.d.ts +2 -2
- package/packages/_vue2/dist/src/helpers/css.d.ts +1 -1
- package/packages/_vue2/dist/src/helpers/localStorage.d.ts +2 -2
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/get.d.ts +1 -0
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/helpers.d.ts +1 -0
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/init.d.ts +6 -0
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/set.d.ts +7 -0
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/types.d.ts +12 -0
- package/packages/_vue2/dist/src/helpers/sessionId.d.ts +2 -2
- package/packages/_vue2/dist/src/helpers/visitorId.d.ts +1 -1
- package/packages/_vue2/dist/src/index-helpers/blocks-exports.d.ts +2 -2
- package/packages/_vue2/dist/src/index.d.ts +2 -2
- package/packages/_vue2/dist/src/types/builder-props.d.ts +9 -0
- package/packages/_vue2/dist/src/types/components.d.ts +8 -2
- package/packages/_vue2/dist/src/types/enforced-partials.d.ts +21 -0
- package/packages/_vue2/dist/src/types/targets.d.ts +1 -3
- package/packages/_vue2/dist/src/types/typescript.d.ts +6 -0
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue2/dist/styles.367c17da.js +89 -0
- package/packages/_vue2/dist/styles.716893e3.cjs +31 -0
- package/packages/_vue3/dist/block-wrapper.0590efed.js +54 -0
- package/packages/_vue3/dist/block-wrapper.caa27b4d.cjs +1 -0
- package/packages/_vue3/dist/component-ref.7c88b254.cjs +1 -0
- package/packages/_vue3/dist/component-ref.9039745a.js +111 -0
- package/packages/_vue3/dist/get-block-actions.a8cbb712.cjs +1 -0
- package/packages/_vue3/dist/get-block-actions.cc5999ea.js +79 -0
- package/packages/_vue3/dist/index.52e5e57e.js +8079 -0
- package/packages/_vue3/dist/index.a789f147.cjs +99 -0
- package/packages/_vue3/dist/repeated-block.1eba0fc4.js +33 -0
- package/packages/_vue3/dist/repeated-block.e0f9db51.cjs +1 -0
- package/packages/_vue3/dist/sdk.cjs +1 -72
- package/packages/_vue3/dist/sdk.js +22 -3251
- package/packages/_vue3/dist/src/blocks/button/button.vue.d.ts +10 -6
- package/packages/_vue3/dist/src/blocks/button/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +18 -8
- package/packages/_vue3/dist/src/blocks/columns/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/custom-code/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/blocks/embed/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/fragment/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/helpers.d.ts +13 -0
- package/packages/_vue3/dist/src/blocks/image/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/image/image.vue.d.ts +6 -6
- package/packages/_vue3/dist/src/blocks/img/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +9 -7
- package/packages/_vue3/dist/src/blocks/section/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/section/section.vue.d.ts +9 -6
- package/packages/_vue3/dist/src/blocks/symbol/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/symbol/symbol.helpers.d.ts +14 -0
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +20 -7
- package/packages/_vue3/dist/src/blocks/text/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/text/text.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/video/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/video/video.vue.d.ts +7 -3
- package/packages/_vue3/dist/src/components/block/block.helpers.d.ts +13 -0
- package/packages/{_vue2/dist/src/components/render-block/render-block.vue.d.ts → _vue3/dist/src/components/block/block.vue.d.ts} +3 -2
- package/packages/_vue3/dist/src/components/{render-block → block/components}/block-styles.vue.d.ts +4 -4
- package/packages/_vue3/dist/src/components/block/components/block-wrapper.vue.d.ts +29 -0
- package/packages/_vue3/dist/src/components/block/components/component-ref/component-ref.helpers.d.ts +30 -0
- package/packages/_vue3/dist/src/components/block/components/component-ref/component-ref.vue.d.ts +2 -0
- package/packages/_vue3/dist/src/components/block/components/interactive-element.vue.d.ts +30 -0
- package/packages/_vue3/dist/src/components/{render-block/render-repeated-block.vue.d.ts → block/components/repeated-block.vue.d.ts} +3 -0
- package/packages/_vue3/dist/src/components/{render-blocks.vue.d.ts → blocks/blocks-wrapper.vue.d.ts} +6 -6
- package/packages/_vue3/dist/src/components/blocks/blocks.vue.d.ts +29 -0
- package/packages/_vue3/dist/src/components/{render-content/render-content.vue.d.ts → content/components/enable-editor.vue.d.ts} +21 -55
- package/packages/{_vue2/dist/src/components/render-content/components/render-styles.helpers.d.ts → _vue3/dist/src/components/content/components/styles.helpers.d.ts} +1 -1
- package/packages/_vue3/dist/src/components/content/content.helpers.d.ts +7 -0
- package/packages/_vue3/dist/src/components/content/content.types.d.ts +24 -0
- package/packages/_vue3/dist/src/components/content/content.vue.d.ts +69 -0
- package/packages/_vue3/dist/src/components/content-variants/content-variants.types.d.ts +20 -0
- package/packages/_vue3/dist/src/components/content-variants/content-variants.vue.d.ts +76 -0
- package/packages/_vue3/dist/src/components/content-variants/helpers.d.ts +41 -0
- package/packages/_vue3/dist/src/components/inlined-script.vue.d.ts +11 -0
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/src/constants/target.d.ts +1 -1
- package/packages/_vue3/dist/src/context/builder.context.d.ts +1 -1
- package/packages/_vue3/dist/src/context/types.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/{evaluate.d.ts → evaluate/evaluate.d.ts} +5 -2
- package/packages/_vue3/dist/src/functions/evaluate/index.d.ts +1 -0
- package/packages/_vue3/dist/src/functions/evaluate/interpreter.d.ts +2 -0
- package/packages/_vue3/dist/src/functions/evaluate/non-node-runtime.d.ts +2 -0
- package/packages/_vue3/dist/src/functions/evaluate/types.d.ts +10 -0
- package/packages/_vue3/dist/src/functions/get-block-actions.d.ts +1 -0
- package/packages/_vue3/dist/src/functions/get-block-properties.d.ts +5 -1
- package/packages/_vue3/dist/src/functions/get-content/index.d.ts +2 -6
- package/packages/_vue3/dist/src/functions/get-processed-block.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-react-native-block-styles.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/is-non-node-server.d.ts +4 -0
- package/packages/_vue3/dist/src/functions/register-component.d.ts +2 -1
- package/packages/_vue3/dist/src/helpers/ab-tests.d.ts +2 -2
- package/packages/_vue3/dist/src/helpers/cookie.d.ts +2 -2
- package/packages/_vue3/dist/src/helpers/css.d.ts +1 -1
- package/packages/_vue3/dist/src/helpers/localStorage.d.ts +2 -2
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/get.d.ts +1 -0
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/helpers.d.ts +1 -0
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/init.d.ts +6 -0
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/set.d.ts +7 -0
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/types.d.ts +12 -0
- package/packages/_vue3/dist/src/helpers/sessionId.d.ts +2 -2
- package/packages/_vue3/dist/src/helpers/visitorId.d.ts +1 -1
- package/packages/_vue3/dist/src/index-helpers/blocks-exports.d.ts +2 -2
- package/packages/_vue3/dist/src/index.d.ts +2 -2
- package/packages/_vue3/dist/src/types/builder-props.d.ts +9 -0
- package/packages/_vue3/dist/src/types/components.d.ts +8 -2
- package/packages/_vue3/dist/src/types/enforced-partials.d.ts +21 -0
- package/packages/_vue3/dist/src/types/targets.d.ts +1 -3
- package/packages/_vue3/dist/src/types/typescript.d.ts +6 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.0037defd.cjs +0 -1
- package/packages/_vue2/dist/block-styles.bc8cdc9f.js +0 -76
- package/packages/_vue2/dist/css.5dc54b85.js +0 -75
- package/packages/_vue2/dist/css.91bb94e8.cjs +0 -6
- package/packages/_vue2/dist/evaluate.10e091b0.cjs +0 -4
- package/packages/_vue2/dist/evaluate.f654f563.js +0 -63
- package/packages/_vue2/dist/index.a1dfdaec.js +0 -1374
- package/packages/_vue2/dist/index.a4e21f82.cjs +0 -32
- package/packages/_vue2/dist/render-block.55b40822.cjs +0 -3
- package/packages/_vue2/dist/render-block.df744a97.js +0 -263
- package/packages/_vue2/dist/render-component.9632b476.js +0 -38
- package/packages/_vue2/dist/render-component.baf2d372.cjs +0 -1
- package/packages/_vue2/dist/render-content.30c701ec.js +0 -1358
- package/packages/_vue2/dist/render-content.d464cccb.cjs +0 -1
- package/packages/_vue2/dist/render-inlined-styles.36b7a3a4.js +0 -23
- package/packages/_vue2/dist/render-inlined-styles.469ed053.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.7f4862b2.js +0 -38
- package/packages/_vue2/dist/render-repeated-block.e9bfa3cd.cjs +0 -1
- package/packages/_vue2/dist/render-styles.43e1e2a4.js +0 -87
- package/packages/_vue2/dist/render-styles.ad11935f.cjs +0 -31
- package/packages/_vue2/dist/src/blocks/util.d.ts +0 -4
- package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +0 -12
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +0 -16
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +0 -13
- package/packages/_vue2/dist/src/components/render-content/render-content.helpers.d.ts +0 -7
- package/packages/_vue2/dist/src/components/render-content/render-content.types.d.ts +0 -38
- package/packages/_vue2/dist/src/components/render-content-variants/helpers.d.ts +0 -17
- package/packages/_vue2/dist/src/components/render-content-variants/render-content-variants.vue.d.ts +0 -29
- package/packages/_vue3/dist/src/blocks/util.d.ts +0 -4
- package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +0 -12
- package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +0 -16
- package/packages/_vue3/dist/src/components/render-content/render-content.helpers.d.ts +0 -7
- package/packages/_vue3/dist/src/components/render-content/render-content.types.d.ts +0 -38
- package/packages/_vue3/dist/src/components/render-content-variants/render-content-variants.vue.d.ts +0 -29
- package/packages/_vue2/dist/src/components/{render-block → block}/types.d.ts +0 -0
- package/packages/_vue2/dist/src/components/{render-content → content}/wrap-component-ref.d.ts +0 -0
- package/packages/_vue2/dist/src/components/{render-inlined-styles.vue.d.ts → inlined-styles.vue.d.ts} +3 -3
- package/packages/_vue3/dist/src/components/{render-block → block}/types.d.ts +0 -0
- package/packages/_vue3/dist/src/components/{render-content/components/render-styles.vue.d.ts → content/components/styles.vue.d.ts} +0 -0
- package/packages/_vue3/dist/src/components/{render-content → content}/wrap-component-ref.d.ts +0 -0
- package/packages/_vue3/dist/src/components/{render-inlined-styles.vue.d.ts → inlined-styles.vue.d.ts} +3 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is an LRU cache to hold preview content on the server-side.
|
|
3
|
+
*
|
|
4
|
+
* Note: This logic is only used by the NextJS SDK.
|
|
5
|
+
*/
|
|
6
|
+
import type { LRUCache } from 'lru-cache';
|
|
7
|
+
import type { BuilderContent } from '../../types/builder-content';
|
|
8
|
+
type BuilderLRUCache = LRUCache<string, BuilderContent>;
|
|
9
|
+
export type GlobalWCache = typeof globalThis & {
|
|
10
|
+
_BUILDER_PREVIEW_LRU_CACHE: BuilderLRUCache;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CanTrack } from '../types/can-track.js';
|
|
2
|
-
export declare const getSessionId: ({ canTrack
|
|
2
|
+
export declare const getSessionId: ({ canTrack }: CanTrack) => Promise<string | undefined>;
|
|
3
3
|
export declare const createSessionId: () => string;
|
|
4
|
-
export declare const setSessionId: ({ id, canTrack
|
|
4
|
+
export declare const setSessionId: ({ id, canTrack }: {
|
|
5
5
|
id: string;
|
|
6
6
|
} & CanTrack) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CanTrack } from '../types/can-track.js';
|
|
2
2
|
export declare const getVisitorId: ({ canTrack }: CanTrack) => string | undefined;
|
|
3
3
|
export declare const createVisitorId: () => string;
|
|
4
|
-
export declare const setVisitorId: ({ id, canTrack
|
|
4
|
+
export declare const setVisitorId: ({ id, canTrack }: {
|
|
5
5
|
id: string;
|
|
6
6
|
} & CanTrack) => void;
|
|
@@ -2,9 +2,9 @@ export { default as Button } from '../blocks/button/button.vue';
|
|
|
2
2
|
export { default as Columns } from '../blocks/columns/columns.vue';
|
|
3
3
|
export { default as Fragment } from '../blocks/fragment/fragment.vue';
|
|
4
4
|
export { default as Image } from '../blocks/image/image.vue';
|
|
5
|
-
export { default as RenderBlocks } from '../components/
|
|
5
|
+
export { default as RenderBlocks } from '../components/blocks/blocks.vue';
|
|
6
6
|
export { default as Section } from '../blocks/section/section.vue';
|
|
7
7
|
export { default as Symbol } from '../blocks/symbol/symbol.vue';
|
|
8
8
|
export { default as Text } from '../blocks/text/text.vue';
|
|
9
9
|
export { default as Video } from '../blocks/video/video.vue';
|
|
10
|
-
export { default as RenderContent } from '../components/
|
|
10
|
+
export { default as RenderContent } from '../components/content-variants/content-variants.vue';
|
|
@@ -7,9 +7,9 @@ export { register } from './functions/register.js';
|
|
|
7
7
|
export type { InsertMenuConfig, InsertMenuItem } from './functions/register.js';
|
|
8
8
|
export { setEditorSettings } from './functions/set-editor-settings.js';
|
|
9
9
|
export type { Settings } from './functions/set-editor-settings.js';
|
|
10
|
-
export { getAllContent, getContent, processContentResult
|
|
10
|
+
export { getAllContent, getContent, processContentResult } from './functions/get-content/index.js';
|
|
11
11
|
export { getBuilderSearchParams } from './functions/get-builder-search-params/index.js';
|
|
12
12
|
export { track } from './functions/track/index.js';
|
|
13
13
|
export type { RegisteredComponent } from './context/types';
|
|
14
14
|
export type { ComponentInfo } from './types/components';
|
|
15
|
-
export type {
|
|
15
|
+
export type { ContentProps } from './components/content/content.types.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from './builder-block.js';
|
|
3
|
+
export type PropsWithBuilderData<T> = T & {
|
|
4
|
+
builderBlock: BuilderBlock;
|
|
5
|
+
builderContext: BuilderContextInterface;
|
|
6
|
+
};
|
|
7
|
+
export type BuilderComponentsProp = {
|
|
8
|
+
builderComponents: RegisteredComponents;
|
|
9
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderElement } from './element';
|
|
2
|
-
import type { Input } from './input';
|
|
1
|
+
import type { BuilderElement } from './element.js';
|
|
2
|
+
import type { Input } from './input.js';
|
|
3
3
|
export interface ComponentInfo {
|
|
4
4
|
/**
|
|
5
5
|
* Name your component something unique, e.g. 'MyButton'. You can override built-in components
|
|
@@ -33,6 +33,12 @@ export interface ComponentInfo {
|
|
|
33
33
|
* like here github.com/BuilderIO/builder/blob/master/packages/react/src/blocks/forms/Input.tsx#L34
|
|
34
34
|
*/
|
|
35
35
|
noWrap?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* TO-DO: make this optional only for RSC SDK.
|
|
38
|
+
*
|
|
39
|
+
* Set this to `true` if your component is a React Server Component (RSC).
|
|
40
|
+
*/
|
|
41
|
+
isRSC?: boolean;
|
|
36
42
|
/**
|
|
37
43
|
* Default children
|
|
38
44
|
*/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Prettify } from './typescript.js';
|
|
2
|
+
type OptionalFieldsOnly<T> = {
|
|
3
|
+
[K in keyof T as T[K] extends Required<T>[K] ? never : K]: T[K];
|
|
4
|
+
};
|
|
5
|
+
type RequiredFieldsOnly<T> = {
|
|
6
|
+
[K in keyof T as T[K] extends Required<T>[K] ? K : never]: T[K];
|
|
7
|
+
};
|
|
8
|
+
type Enforced<T> = {
|
|
9
|
+
[K in keyof T]-?: T[K];
|
|
10
|
+
};
|
|
11
|
+
type AndUndefined<T> = {
|
|
12
|
+
[K in keyof T]: T[K] | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Enforce that all optional fields are undefined
|
|
16
|
+
* @example
|
|
17
|
+
* type Foo = { a: string, b?: number }
|
|
18
|
+
* type Bar = EnforcePartials<Foo> // { a: string, b: number | undefined }
|
|
19
|
+
*/
|
|
20
|
+
export type EnforcePartials<From> = Prettify<AndUndefined<Enforced<OptionalFieldsOnly<From>>> & RequiredFieldsOnly<From>>;
|
|
21
|
+
export {};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
type
|
|
2
|
-
export type Target = Extract<MitosisTargets, 'vue3' | 'vue2' | 'reactNative' | 'svelte' | 'qwik' | 'react' | 'solid'>;
|
|
3
|
-
export {};
|
|
1
|
+
export type Target = 'vue3' | 'vue2' | 'reactNative' | 'svelte' | 'qwik' | 'react' | 'solid' | 'rsc';
|
|
@@ -3,3 +3,9 @@ export type Dictionary<T> = {
|
|
|
3
3
|
[key: string]: T;
|
|
4
4
|
};
|
|
5
5
|
export type Overwrite<T, U> = keyof U extends keyof T ? Pick<T, Exclude<keyof T, keyof U>> & U : never;
|
|
6
|
+
export type Prettify<T> = {
|
|
7
|
+
[K in keyof T]: T[K];
|
|
8
|
+
} & {};
|
|
9
|
+
export type PropsWithChildren<P> = P & {
|
|
10
|
+
children?: any;
|
|
11
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.button-2fnk003dqad[data-v-
|
|
1
|
+
.button-2fnk003dqad[data-v-d03c6eb1]{all:unset}.div-t9spj7joih[data-v-b1c2e5e0]{display:flex;line-height:normal}.div-t9spj7joih-2[data-v-b1c2e5e0]{display:flex;flex-direction:column;align-items:stretch}.img-1pl23ac79ld[data-v-29cdebee]{opacity:1;transition:opacity .2s ease-in-out}.div-1pl23ac79ld[data-v-29cdebee]{width:100%;pointer-events:none;font-size:0}.div-1pl23ac79ld-2[data-v-29cdebee]{display:flex;flex-direction:column;align-items:stretch;position:absolute;top:0;left:0;width:100%;height:100%}.div-tqyw9m0iue[data-v-a3106f07]{display:flex;flex-direction:column;align-items:stretch}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { defineComponent as f } from "vue";
|
|
2
|
+
import { n as c } from "./index.8352d880.js";
|
|
3
|
+
const m = (t) => {
|
|
4
|
+
var o, a;
|
|
5
|
+
const e = t.family + (t.kind && !t.kind.includes("#") ? ", " + t.kind : ""), i = e.split(",")[0], r = (a = t.fileUrl) != null ? a : (o = t == null ? void 0 : t.files) == null ? void 0 : o.regular;
|
|
6
|
+
let l = "";
|
|
7
|
+
if (r && e && i && (l += `
|
|
8
|
+
@font-face {
|
|
9
|
+
font-family: "${e}";
|
|
10
|
+
src: local("${i}"), url('${r}') format('woff2');
|
|
11
|
+
font-display: fallback;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
}
|
|
14
|
+
`.trim()), t.files)
|
|
15
|
+
for (const n in t.files) {
|
|
16
|
+
if (!(String(Number(n)) === n))
|
|
17
|
+
continue;
|
|
18
|
+
const s = t.files[n];
|
|
19
|
+
s && s !== r && (l += `
|
|
20
|
+
@font-face {
|
|
21
|
+
font-family: "${e}";
|
|
22
|
+
src: url('${s}') format('woff2');
|
|
23
|
+
font-display: fallback;
|
|
24
|
+
font-weight: ${n};
|
|
25
|
+
}
|
|
26
|
+
`.trim());
|
|
27
|
+
}
|
|
28
|
+
return l;
|
|
29
|
+
}, u = ({
|
|
30
|
+
customFonts: t
|
|
31
|
+
}) => {
|
|
32
|
+
var e;
|
|
33
|
+
return ((e = t == null ? void 0 : t.map((i) => m(i))) == null ? void 0 : e.join(" ")) || "";
|
|
34
|
+
}, d = ({
|
|
35
|
+
cssCode: t,
|
|
36
|
+
contentId: e
|
|
37
|
+
}) => t ? e ? (t == null ? void 0 : t.replace(/&/g, `div[builder-content-id="${e}"]`)) || "" : t : "", p = () => import("./inlined-styles.dd4a079a.js").then((t) => t.default).catch((t) => {
|
|
38
|
+
throw console.error(
|
|
39
|
+
"Error while attempting to dynamically import component InlinedStyles at ../../inlined-styles.vue",
|
|
40
|
+
t
|
|
41
|
+
), t;
|
|
42
|
+
}), h = f({
|
|
43
|
+
name: "content-styles",
|
|
44
|
+
components: { "inlined-styles": p },
|
|
45
|
+
props: ["cssCode", "contentId", "customFonts"],
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
injectedStyles: `
|
|
49
|
+
${d({
|
|
50
|
+
cssCode: this.cssCode,
|
|
51
|
+
contentId: this.contentId
|
|
52
|
+
})}
|
|
53
|
+
${u({
|
|
54
|
+
customFonts: this.customFonts
|
|
55
|
+
})}
|
|
56
|
+
|
|
57
|
+
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
58
|
+
margin: 0;
|
|
59
|
+
}
|
|
60
|
+
.builder-text > p, .builder-text > .builder-paragraph {
|
|
61
|
+
color: inherit;
|
|
62
|
+
line-height: inherit;
|
|
63
|
+
letter-spacing: inherit;
|
|
64
|
+
font-weight: inherit;
|
|
65
|
+
font-size: inherit;
|
|
66
|
+
text-align: inherit;
|
|
67
|
+
font-family: inherit;
|
|
68
|
+
}
|
|
69
|
+
`.trim()
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
var y = function() {
|
|
74
|
+
var e = this, i = e._self._c;
|
|
75
|
+
return e._self._setupProxy, i("inlined-styles", { attrs: { styles: e.injectedStyles } });
|
|
76
|
+
}, g = [], _ = /* @__PURE__ */ c(
|
|
77
|
+
h,
|
|
78
|
+
y,
|
|
79
|
+
g,
|
|
80
|
+
!1,
|
|
81
|
+
null,
|
|
82
|
+
null,
|
|
83
|
+
null,
|
|
84
|
+
null
|
|
85
|
+
);
|
|
86
|
+
const x = _.exports;
|
|
87
|
+
export {
|
|
88
|
+
x as default
|
|
89
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),f=require("./index.051a3d7b.cjs"),u=e=>{var o,a;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),i=t.split(",")[0],r=(a=e.fileUrl)!=null?a:(o=e==null?void 0:e.files)==null?void 0:o.regular;let l="";if(r&&t&&i&&(l+=`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: "${t}";
|
|
4
|
+
src: local("${i}"), url('${r}') format('woff2');
|
|
5
|
+
font-display: fallback;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
}
|
|
8
|
+
`.trim()),e.files)for(const n in e.files){if(!(String(Number(n))===n))continue;const s=e.files[n];s&&s!==r&&(l+=`
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: "${t}";
|
|
11
|
+
src: url('${s}') format('woff2');
|
|
12
|
+
font-display: fallback;
|
|
13
|
+
font-weight: ${n};
|
|
14
|
+
}
|
|
15
|
+
`.trim())}return l},d=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(i=>u(i)))==null?void 0:t.join(" "))||""},m=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",p=()=>Promise.resolve().then(()=>require("./inlined-styles.d8b2af39.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../../inlined-styles.vue",e),e}),h=c.defineComponent({name:"content-styles",components:{"inlined-styles":p},props:["cssCode","contentId","customFonts"],data(){return{injectedStyles:`
|
|
16
|
+
${m({cssCode:this.cssCode,contentId:this.contentId})}
|
|
17
|
+
${d({customFonts:this.customFonts})}
|
|
18
|
+
|
|
19
|
+
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
.builder-text > p, .builder-text > .builder-paragraph {
|
|
23
|
+
color: inherit;
|
|
24
|
+
line-height: inherit;
|
|
25
|
+
letter-spacing: inherit;
|
|
26
|
+
font-weight: inherit;
|
|
27
|
+
font-size: inherit;
|
|
28
|
+
text-align: inherit;
|
|
29
|
+
font-family: inherit;
|
|
30
|
+
}
|
|
31
|
+
`.trim()}}});var y=function(){var t=this,i=t._self._c;return t._self._setupProxy,i("inlined-styles",{attrs:{styles:t.injectedStyles}})},g=[],b=f.normalizeComponent(h,y,g,!1,null,null,null,null);const _=b.exports;exports.default=_;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as l, openBlock as o, createBlock as e, resolveDynamicComponent as r, mergeProps as n, toHandlers as a, withCtx as c, renderSlot as p } from "vue";
|
|
2
|
+
import { g as s, a as i } from "./get-block-actions.cc5999ea.js";
|
|
3
|
+
import { _ as k } from "./index.52e5e57e.js";
|
|
4
|
+
const S = l({
|
|
5
|
+
name: "block-wrapper",
|
|
6
|
+
props: ["Wrapper", "block", "context", "hasChildren"],
|
|
7
|
+
data() {
|
|
8
|
+
return { getBlockActions: s, getBlockProperties: i };
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function f(t, d, m, b, u, g) {
|
|
12
|
+
return t.hasChildren ? (o(), e(r(t.Wrapper), n(
|
|
13
|
+
{ key: 0 },
|
|
14
|
+
t.getBlockProperties({
|
|
15
|
+
block: t.block,
|
|
16
|
+
context: t.context
|
|
17
|
+
}),
|
|
18
|
+
a(
|
|
19
|
+
t.getBlockActions({
|
|
20
|
+
block: t.block,
|
|
21
|
+
rootState: t.context.rootState,
|
|
22
|
+
rootSetState: t.context.rootSetState,
|
|
23
|
+
localState: t.context.localState,
|
|
24
|
+
context: t.context.context,
|
|
25
|
+
stripPrefix: !0
|
|
26
|
+
})
|
|
27
|
+
)
|
|
28
|
+
), {
|
|
29
|
+
default: c(() => [
|
|
30
|
+
p(t.$slots, "default")
|
|
31
|
+
]),
|
|
32
|
+
_: 3
|
|
33
|
+
}, 16)) : (o(), e(r(t.Wrapper), n(
|
|
34
|
+
{ key: 1 },
|
|
35
|
+
t.getBlockProperties({
|
|
36
|
+
block: t.block,
|
|
37
|
+
context: t.context
|
|
38
|
+
}),
|
|
39
|
+
a(
|
|
40
|
+
t.getBlockActions({
|
|
41
|
+
block: t.block,
|
|
42
|
+
rootState: t.context.rootState,
|
|
43
|
+
rootSetState: t.context.rootSetState,
|
|
44
|
+
localState: t.context.localState,
|
|
45
|
+
context: t.context.context,
|
|
46
|
+
stripPrefix: !0
|
|
47
|
+
})
|
|
48
|
+
)
|
|
49
|
+
), null, 16));
|
|
50
|
+
}
|
|
51
|
+
const C = /* @__PURE__ */ k(S, [["render", f]]);
|
|
52
|
+
export {
|
|
53
|
+
C as default
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-actions.a8cbb712.cjs"),r=require("./index.a789f147.cjs"),n=t.defineComponent({name:"block-wrapper",props:["Wrapper","block","context","hasChildren"],data(){return{getBlockActions:o.getBlockActions,getBlockProperties:o.getBlockProperties}}});function c(e,a,s,i,p,k){return e.hasChildren?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:0},e.getBlockProperties({block:e.block,context:e.context}),t.toHandlers(e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}))),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16)):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1},e.getBlockProperties({block:e.block,context:e.context}),t.toHandlers(e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}))),null,16))}const l=r._export_sfc(n,[["render",c]]);exports.default=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index.a789f147.cjs"),a=require("./get-block-actions.a8cbb712.cjs"),d=o.defineComponent({name:"interactive-element",props:["wrapperProps","block","context","Wrapper"],data(){return{getBlockActions:a.getBlockActions,getBlockProperties:a.getBlockProperties}}});function b(e,n,c,l,s,p){return o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.mergeProps({attributes:{...e.getBlockProperties({block:e.block,context:e.context}),...e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}},e.wrapperProps),{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:3},16,["attributes"])}const m=r._export_sfc(d,[["render",b]]),B=({componentOptions:e,builderBlock:n,context:c,componentRef:l,includeBlockProps:s,isInteractive:p,contextValue:i})=>p?{Wrapper:l,block:n,context:c,wrapperProps:e}:{...e,...s?{attributes:a.getBlockProperties({block:n,context:i})}:{}},f=o.defineComponent({name:"component-ref",components:{Block:r.Block,BlockStyles:r.BlockStyles,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?m:this.componentRef,getWrapperProps:B}}});function g(e,n,c,l,s,p){const i=o.resolveComponent("block"),k=o.resolveComponent("block-styles");return e.componentRef?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.normalizeProps(o.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.blockChildren,(t,u)=>(o.openBlock(),o.createBlock(i,{key:"block-"+t.id,block:t,context:e.context,registeredComponents:e.registeredComponents},null,8,["block","context","registeredComponents"]))),128)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.blockChildren,(t,u)=>(o.openBlock(),o.createBlock(k,{key:"block-style-"+t.id,block:t,context:e.context},null,8,["block","context"]))),128))]),_:1},16)):o.createCommentVNode("",!0)}const P=r._export_sfc(f,[["render",g]]);exports.default=P;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineComponent as f, openBlock as o, createBlock as r, resolveDynamicComponent as B, mergeProps as P, withCtx as g, renderSlot as S, resolveComponent as m, normalizeProps as y, createElementBlock as k, Fragment as u, renderList as d, createCommentVNode as W } from "vue";
|
|
2
|
+
import { _ as C, a as h, b as R } from "./index.52e5e57e.js";
|
|
3
|
+
import { g as I, a as $ } from "./get-block-actions.cc5999ea.js";
|
|
4
|
+
const w = f({
|
|
5
|
+
name: "interactive-element",
|
|
6
|
+
props: ["wrapperProps", "block", "context", "Wrapper"],
|
|
7
|
+
data() {
|
|
8
|
+
return { getBlockActions: I, getBlockProperties: $ };
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function E(e, n, c, s, p, l) {
|
|
12
|
+
return o(), r(B(e.Wrapper), P({
|
|
13
|
+
attributes: {
|
|
14
|
+
...e.getBlockProperties({
|
|
15
|
+
block: e.block,
|
|
16
|
+
context: e.context
|
|
17
|
+
}),
|
|
18
|
+
...e.getBlockActions({
|
|
19
|
+
block: e.block,
|
|
20
|
+
rootState: e.context.rootState,
|
|
21
|
+
rootSetState: e.context.rootSetState,
|
|
22
|
+
localState: e.context.localState,
|
|
23
|
+
context: e.context.context
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
}, e.wrapperProps), {
|
|
27
|
+
default: g(() => [
|
|
28
|
+
S(e.$slots, "default")
|
|
29
|
+
]),
|
|
30
|
+
_: 3
|
|
31
|
+
}, 16, ["attributes"]);
|
|
32
|
+
}
|
|
33
|
+
const b = /* @__PURE__ */ C(w, [["render", E]]), A = ({
|
|
34
|
+
componentOptions: e,
|
|
35
|
+
builderBlock: n,
|
|
36
|
+
context: c,
|
|
37
|
+
componentRef: s,
|
|
38
|
+
includeBlockProps: p,
|
|
39
|
+
isInteractive: l,
|
|
40
|
+
contextValue: a
|
|
41
|
+
}) => l ? {
|
|
42
|
+
Wrapper: s,
|
|
43
|
+
block: n,
|
|
44
|
+
context: c,
|
|
45
|
+
wrapperProps: e
|
|
46
|
+
} : {
|
|
47
|
+
...e,
|
|
48
|
+
...p ? {
|
|
49
|
+
attributes: $({
|
|
50
|
+
block: n,
|
|
51
|
+
context: a
|
|
52
|
+
})
|
|
53
|
+
} : {}
|
|
54
|
+
}, O = f({
|
|
55
|
+
name: "component-ref",
|
|
56
|
+
components: {
|
|
57
|
+
Block: h,
|
|
58
|
+
BlockStyles: R,
|
|
59
|
+
InteractiveElement: b
|
|
60
|
+
},
|
|
61
|
+
props: [
|
|
62
|
+
"isInteractive",
|
|
63
|
+
"componentRef",
|
|
64
|
+
"componentOptions",
|
|
65
|
+
"builderBlock",
|
|
66
|
+
"context",
|
|
67
|
+
"includeBlockProps",
|
|
68
|
+
"blockChildren",
|
|
69
|
+
"registeredComponents"
|
|
70
|
+
],
|
|
71
|
+
data() {
|
|
72
|
+
return {
|
|
73
|
+
Wrapper: this.isInteractive ? b : this.componentRef,
|
|
74
|
+
getWrapperProps: A
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
function V(e, n, c, s, p, l) {
|
|
79
|
+
const a = m("block"), i = m("block-styles");
|
|
80
|
+
return e.componentRef ? (o(), r(B(e.Wrapper), y(P(
|
|
81
|
+
{ key: 0 },
|
|
82
|
+
e.getWrapperProps({
|
|
83
|
+
componentOptions: e.componentOptions,
|
|
84
|
+
builderBlock: e.builderBlock,
|
|
85
|
+
context: e.context,
|
|
86
|
+
componentRef: e.componentRef,
|
|
87
|
+
includeBlockProps: e.includeBlockProps,
|
|
88
|
+
isInteractive: e.isInteractive,
|
|
89
|
+
contextValue: e.context
|
|
90
|
+
})
|
|
91
|
+
)), {
|
|
92
|
+
default: g(() => [
|
|
93
|
+
(o(!0), k(u, null, d(e.blockChildren, (t, v) => (o(), r(a, {
|
|
94
|
+
key: "block-" + t.id,
|
|
95
|
+
block: t,
|
|
96
|
+
context: e.context,
|
|
97
|
+
registeredComponents: e.registeredComponents
|
|
98
|
+
}, null, 8, ["block", "context", "registeredComponents"]))), 128)),
|
|
99
|
+
(o(!0), k(u, null, d(e.blockChildren, (t, v) => (o(), r(i, {
|
|
100
|
+
key: "block-style-" + t.id,
|
|
101
|
+
block: t,
|
|
102
|
+
context: e.context
|
|
103
|
+
}, null, 8, ["block", "context"]))), 128))
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
}, 16)) : W("", !0);
|
|
107
|
+
}
|
|
108
|
+
const F = /* @__PURE__ */ C(O, [["render", V]]);
|
|
109
|
+
export {
|
|
110
|
+
F as default
|
|
111
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const c=require("./index.a789f147.cjs");function i(e){const t={};if(typeof e!="string")return t;const r=e.trim().split(/\\s+/);for(const s of r)t[s]=!0;return t}function l(e){return e.class=i(e.class),e}const u=e=>({href:e.href});function f({block:e,context:t}){var s;const r={...u(e),...e.properties,"builder-id":e.id,style:e.style?v(e.style):void 0,class:[e.id,"builder-block",e.class,(s=e.properties)==null?void 0:s.class].filter(Boolean).join(" ")};return l(r)}function v(e){switch(c.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return c.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const p=e=>`v-on:${e.toLowerCase()}`,d=(e,t)=>r=>c.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1});function S(e){var s;const t={},r=(s=e.block.actions)!=null?s:{};for(const n in r){if(!r.hasOwnProperty(n))continue;const a=r[n];let o=p(n);if(e.stripPrefix)switch(c.TARGET){case"vue2":case"vue3":o=o.replace("v-on:","");break;case"svelte":o=o.replace("on:","");break}t[o]=d(a,e)}return t}exports.getBlockActions=S;exports.getBlockProperties=f;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { T as n, c as i, e as l } from "./index.52e5e57e.js";
|
|
2
|
+
function u(e) {
|
|
3
|
+
const t = {};
|
|
4
|
+
if (typeof e != "string")
|
|
5
|
+
return t;
|
|
6
|
+
const r = e.trim().split(/\\s+/);
|
|
7
|
+
for (const s of r)
|
|
8
|
+
t[s] = !0;
|
|
9
|
+
return t;
|
|
10
|
+
}
|
|
11
|
+
function f(e) {
|
|
12
|
+
return e.class = u(e.class), e;
|
|
13
|
+
}
|
|
14
|
+
const v = (e) => ({
|
|
15
|
+
href: e.href
|
|
16
|
+
});
|
|
17
|
+
function y({
|
|
18
|
+
block: e,
|
|
19
|
+
context: t
|
|
20
|
+
}) {
|
|
21
|
+
var s;
|
|
22
|
+
const r = {
|
|
23
|
+
...v(e),
|
|
24
|
+
...e.properties,
|
|
25
|
+
"builder-id": e.id,
|
|
26
|
+
style: e.style ? p(e.style) : void 0,
|
|
27
|
+
class: [e.id, "builder-block", e.class, (s = e.properties) == null ? void 0 : s.class].filter(Boolean).join(" ")
|
|
28
|
+
};
|
|
29
|
+
return f(r);
|
|
30
|
+
}
|
|
31
|
+
function p(e) {
|
|
32
|
+
switch (n) {
|
|
33
|
+
case "svelte":
|
|
34
|
+
case "vue2":
|
|
35
|
+
case "vue3":
|
|
36
|
+
case "solid":
|
|
37
|
+
return i(e).join(" ");
|
|
38
|
+
case "qwik":
|
|
39
|
+
case "reactNative":
|
|
40
|
+
case "react":
|
|
41
|
+
case "rsc":
|
|
42
|
+
return e;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const S = (e) => `v-on:${e.toLowerCase()}`, d = (e, t) => (r) => l({
|
|
46
|
+
code: e,
|
|
47
|
+
context: t.context,
|
|
48
|
+
localState: t.localState,
|
|
49
|
+
rootState: t.rootState,
|
|
50
|
+
rootSetState: t.rootSetState,
|
|
51
|
+
event: r,
|
|
52
|
+
isExpression: !1
|
|
53
|
+
});
|
|
54
|
+
function g(e) {
|
|
55
|
+
var s;
|
|
56
|
+
const t = {}, r = (s = e.block.actions) != null ? s : {};
|
|
57
|
+
for (const o in r) {
|
|
58
|
+
if (!r.hasOwnProperty(o))
|
|
59
|
+
continue;
|
|
60
|
+
const c = r[o];
|
|
61
|
+
let a = S(o);
|
|
62
|
+
if (e.stripPrefix)
|
|
63
|
+
switch (n) {
|
|
64
|
+
case "vue2":
|
|
65
|
+
case "vue3":
|
|
66
|
+
a = a.replace("v-on:", "");
|
|
67
|
+
break;
|
|
68
|
+
case "svelte":
|
|
69
|
+
a = a.replace("on:", "");
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
t[a] = d(c, e);
|
|
73
|
+
}
|
|
74
|
+
return t;
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
y as a,
|
|
78
|
+
g
|
|
79
|
+
};
|