@builder.io/sdk-vue 0.5.6-0 → 0.5.6
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 +9 -20
- package/packages/_vue2/dist/block-styles.ac28ad89.js +78 -0
- package/packages/_vue2/dist/block-styles.d7a0bd18.cjs +1 -0
- package/packages/_vue2/dist/block-wrapper.4020c35e.cjs +1 -0
- package/packages/_vue2/dist/{block-wrapper-f852f3a4.js → block-wrapper.877d598e.js} +16 -19
- package/packages/_vue2/dist/block.03f6b1f1.cjs +3 -0
- package/packages/_vue2/dist/block.4db8867b.js +179 -0
- package/packages/_vue2/dist/{blocks-wrapper-87a5ef9b.cjs → blocks-wrapper.69dad1d3.cjs} +1 -1
- package/packages/_vue2/dist/{blocks-wrapper-98241c68.js → blocks-wrapper.88129f1c.js} +6 -6
- package/packages/_vue2/dist/component-ref.5beb6576.cjs +1 -0
- package/packages/_vue2/dist/{component-ref-47d34951.js → component-ref.ae6b00e2.js} +21 -29
- package/packages/_vue2/dist/content.4429d811.cjs +1 -0
- package/packages/_vue2/dist/{content-ab735937.js → content.d83d212f.js} +19 -36
- package/packages/_vue2/dist/{css-8b11bb6e.js → css.e33adaf0.js} +1 -1
- package/packages/_vue2/dist/{css-03a9ebe6.cjs → css.ec4684cd.cjs} +1 -1
- package/packages/_vue2/dist/{enable-editor-2d8d86f8.js → enable-editor.2a84c36c.js} +29 -35
- package/packages/_vue2/dist/enable-editor.7bbb8293.cjs +1 -0
- package/packages/_vue2/dist/evaluate.15b2ed56.js +79 -0
- package/packages/_vue2/dist/evaluate.eba0e0f9.cjs +4 -0
- package/packages/_vue2/dist/get-block-actions.1973b4d5.cjs +1 -0
- package/packages/_vue2/dist/get-block-actions.db2ac618.js +36 -0
- package/packages/_vue2/dist/{get-block-properties-f778ef2a.js → get-block-properties.322d544d.js} +2 -2
- package/packages/_vue2/dist/get-block-properties.ef1464fb.cjs +1 -0
- package/packages/_vue2/dist/get-processed-block.9d4edbee.cjs +1 -0
- package/packages/_vue2/dist/get-processed-block.c9980195.js +53 -0
- package/packages/_vue2/dist/index.0c5f9582.cjs +32 -0
- package/packages/_vue2/dist/{index-a089abc3.js → index.fc359faf.js} +173 -201
- package/packages/_vue2/dist/{inlined-script-5ac8fff7.js → inlined-script.1b247526.js} +1 -1
- package/packages/_vue2/dist/{inlined-script-73ce088c.cjs → inlined-script.3e92a79e.cjs} +1 -1
- package/packages/_vue2/dist/{inlined-styles-3a327fbd.js → inlined-styles.32485f82.js} +1 -1
- package/packages/_vue2/dist/inlined-styles.f9ade1ef.cjs +1 -0
- package/packages/_vue2/dist/interactive-element.21050a26.cjs +1 -0
- package/packages/_vue2/dist/{interactive-element-2aec4d6f.js → interactive-element.c8119384.js} +10 -12
- package/packages/{_vue3/dist/non-node-runtime.45773de4.js → _vue2/dist/non-node-runtime.84ddb11a.js} +64 -62
- package/packages/_vue2/dist/non-node-runtime.ddd24d83.cjs +21 -0
- package/packages/_vue2/dist/{repeated-block-a0f25ac2.js → repeated-block.4fbd3217.js} +6 -6
- package/packages/_vue2/dist/repeated-block.f4f2b4be.cjs +1 -0
- package/packages/_vue2/dist/sdk.cjs +1 -0
- package/packages/_vue2/dist/sdk.js +29 -0
- package/packages/_vue2/dist/set.87eb0329.cjs +1 -0
- package/packages/_vue2/dist/set.b219ab0e.js +9 -0
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +2 -2
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +2 -2
- package/packages/_vue2/dist/src/components/block/block.helpers.d.ts +2 -5
- package/packages/_vue2/dist/src/components/block/block.vue.d.ts +4 -2
- package/packages/_vue2/dist/src/components/block/components/block-styles.vue.d.ts +0 -5
- package/packages/_vue2/dist/src/components/block/components/block-wrapper.vue.d.ts +0 -3
- package/packages/_vue2/dist/src/components/block/components/component-ref/component-ref.helpers.d.ts +2 -3
- package/packages/_vue2/dist/src/components/block/components/interactive-element.vue.d.ts +0 -5
- package/packages/_vue2/dist/src/components/block/components/repeated-block.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/blocks/blocks.vue.d.ts +8 -9
- package/packages/_vue2/dist/src/components/content/content.vue.d.ts +0 -1
- package/packages/_vue2/dist/src/components/content-variants/content-variants.types.d.ts +0 -2
- package/packages/_vue2/dist/src/components/content-variants/content-variants.vue.d.ts +0 -3
- 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/functions/evaluate/evaluate.d.ts +7 -6
- package/packages/{_vue3/dist/src/functions/evaluate/node-runtime → _vue2/dist/src/functions/evaluate/non-node-runtime}/index.d.ts +2 -2
- package/packages/_vue2/dist/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +2 -0
- package/packages/_vue2/dist/src/functions/evaluate/types.d.ts +11 -0
- package/packages/_vue2/dist/src/functions/fetch-builder-props.d.ts +3 -3
- package/packages/_vue2/dist/src/functions/get-block-actions-handler.d.ts +5 -2
- package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +3 -3
- package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +3 -5
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/get.d.ts +1 -1
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/set.d.ts +1 -1
- package/packages/_vue2/dist/src/index-helpers/blocks-exports.d.ts +3 -9
- package/packages/_vue2/dist/src/index.d.ts +2 -2
- package/packages/_vue2/dist/src/types/builder-props.d.ts +3 -15
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue2/dist/{styles-183aeb6b.js → styles.29f558ce.js} +18 -18
- package/packages/_vue2/dist/{styles-6e2cbe10.cjs → styles.b060113b.cjs} +5 -5
- package/packages/_vue3/dist/{block-wrapper.5ca35adf.js → block-wrapper.0604faad.js} +2 -2
- package/packages/_vue3/dist/{block-wrapper.500b81ef.cjs → block-wrapper.759209a2.cjs} +1 -1
- package/packages/_vue3/dist/{component-ref.5764cdf2.js → component-ref.72a8476f.js} +2 -2
- package/packages/_vue3/dist/{component-ref.67d028bc.cjs → component-ref.cc553de5.cjs} +1 -1
- package/packages/_vue3/dist/{get-block-actions.0f635805.js → get-block-actions.0fc3b0b7.js} +1 -1
- package/packages/_vue3/dist/{get-block-actions.20d51d99.cjs → get-block-actions.b8fe4107.cjs} +1 -1
- package/packages/_vue3/dist/index.1bb7374b.cjs +72 -0
- package/packages/_vue3/dist/{index.f5a3101b.js → index.ebaa8c07.js} +521 -549
- package/packages/_vue3/dist/non-node-runtime.b16cf7b9.js +2476 -0
- package/packages/_vue3/dist/{non-node-runtime.c8fc465e.cjs → non-node-runtime.d7d010c9.cjs} +9 -9
- package/packages/_vue3/dist/{repeated-block.8ca9be30.cjs → repeated-block.115e1f66.cjs} +1 -1
- package/packages/_vue3/dist/{repeated-block.238616b4.js → repeated-block.ee20f5f0.js} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- 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/functions/evaluate/acorn-interpreter.d.ts +2 -0
- package/packages/_vue3/dist/src/functions/evaluate/evaluate.d.ts +5 -1
- package/packages/_vue3/dist/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +2 -2
- package/packages/_vue3/dist/src/functions/evaluate/types.d.ts +11 -0
- package/packages/_vue3/dist/src/functions/fetch-builder-props.d.ts +3 -3
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/get.d.ts +1 -1
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/set.d.ts +1 -1
- package/packages/_vue3/dist/src/index.d.ts +2 -2
- package/packages/_vue2/dist/block-12099f71.js +0 -189
- package/packages/_vue2/dist/block-246063be.cjs +0 -3
- package/packages/_vue2/dist/block-styles-9360f05a.cjs +0 -1
- package/packages/_vue2/dist/block-styles-cfdd1b51.js +0 -79
- package/packages/_vue2/dist/block-wrapper-857a5d4f.cjs +0 -1
- package/packages/_vue2/dist/component-ref-b891d36b.cjs +0 -1
- package/packages/_vue2/dist/content-043dd197.cjs +0 -1
- package/packages/_vue2/dist/enable-editor-04399d8f.cjs +0 -1
- package/packages/_vue2/dist/evaluate-6a213bca.cjs +0 -1
- package/packages/_vue2/dist/evaluate-c9d68bff.js +0 -76
- package/packages/_vue2/dist/get-block-actions-2b1bc20b.cjs +0 -1
- package/packages/_vue2/dist/get-block-actions-75e52f20.js +0 -36
- package/packages/_vue2/dist/get-block-properties-0e241c2c.cjs +0 -1
- package/packages/_vue2/dist/get-processed-block-41399170.cjs +0 -1
- package/packages/_vue2/dist/get-processed-block-940605b2.js +0 -46
- package/packages/_vue2/dist/helpers-327ed263.js +0 -16
- package/packages/_vue2/dist/helpers-4efe31ac.cjs +0 -1
- package/packages/_vue2/dist/index-537704ba.cjs +0 -1
- package/packages/_vue2/dist/index-c1c356f8.cjs +0 -32
- package/packages/_vue2/dist/index-cc904f8c.js +0 -10
- package/packages/_vue2/dist/inlined-styles-1d50f193.cjs +0 -1
- package/packages/_vue2/dist/interactive-element-67792031.cjs +0 -1
- package/packages/_vue2/dist/main.cjs +0 -1
- package/packages/_vue2/dist/main.js +0 -29
- package/packages/_vue2/dist/node-runtime-25e8d976.js +0 -93
- package/packages/_vue2/dist/node-runtime-5a567c42.cjs +0 -39
- package/packages/_vue2/dist/repeated-block-5eb2f7c6.cjs +0 -1
- package/packages/_vue2/dist/src/functions/evaluate/browser-runtime/browser.d.ts +0 -4
- package/packages/_vue2/dist/src/functions/evaluate/browser-runtime/index.d.ts +0 -1
- package/packages/_vue2/dist/src/functions/evaluate/helpers.d.ts +0 -18
- package/packages/_vue2/dist/src/functions/evaluate/node-runtime/index.d.ts +0 -1
- package/packages/_vue2/dist/src/functions/evaluate/node-runtime/node-runtime.d.ts +0 -2
- package/packages/_vue3/dist/index.0db0f592.cjs +0 -69
- package/packages/_vue3/dist/node-runtime.ba895a23.cjs +0 -39
- package/packages/_vue3/dist/node-runtime.dc2f1f18.js +0 -93
- package/packages/_vue3/dist/src/functions/evaluate/browser-runtime/browser.d.ts +0 -4
- package/packages/_vue3/dist/src/functions/evaluate/browser-runtime/index.d.ts +0 -1
- package/packages/_vue3/dist/src/functions/evaluate/helpers.d.ts +0 -18
- package/packages/_vue3/dist/src/functions/evaluate/node-runtime/node-runtime.d.ts +0 -2
- /package/packages/_vue2/dist/{index.d.ts → sdk.d.ts} +0 -0
- /package/packages/{_vue3/dist/src/functions/evaluate/non-node-runtime → _vue2/dist/src/functions/evaluate}/acorn-interpreter.d.ts +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../../context/types.js';
|
|
2
|
-
import type {
|
|
3
|
-
export
|
|
1
|
+
import type { BuilderContextInterface, BuilderRenderState } from '../../context/types.js';
|
|
2
|
+
import type { ExecutorArgs } from './types.js';
|
|
3
|
+
export declare function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression }: {
|
|
4
4
|
code: string;
|
|
5
5
|
event?: Event;
|
|
6
6
|
isExpression?: boolean;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare
|
|
7
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): any;
|
|
8
|
+
export declare const runInBrowser: ({ useCode, builder, context, event, localState, rootSetState, rootState }: ExecutorArgs) => any;
|
|
9
|
+
export declare const runInNode: (args: ExecutorArgs) => any;
|
|
10
|
+
export declare function flattenState(rootState: Record<string | symbol, any>, localState: Record<string | symbol, any> | undefined, rootSetState: ((rootState: BuilderRenderState) => void) | undefined): BuilderRenderState;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* We need to lazy-load this module so it doesn't leak into the browser, as it is massive and not needed there.
|
|
3
3
|
* https://css-tricks.com/dynamic-conditional-imports/
|
|
4
4
|
*/
|
|
5
|
-
declare let
|
|
6
|
-
export {
|
|
5
|
+
declare let runInNonNode: typeof import('./non-node-runtime.js').runInNonNode;
|
|
6
|
+
export { runInNonNode };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../../context/types';
|
|
2
|
+
export type ExecutorArgs = Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'> & {
|
|
3
|
+
useCode: string;
|
|
4
|
+
builder: {
|
|
5
|
+
isEditing: boolean | undefined;
|
|
6
|
+
isBrowser: boolean | undefined;
|
|
7
|
+
isServer: boolean | undefined;
|
|
8
|
+
};
|
|
9
|
+
event: Event | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type Executor = (args: ExecutorArgs) => any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ContentVariantsProps } from '../components/content-variants/content-variants.types';
|
|
2
|
-
import type { Dictionary } from '../types/typescript';
|
|
3
|
-
import type { GetContentOptions } from './get-content/types';
|
|
1
|
+
import type { ContentVariantsProps } from '../components/content-variants/content-variants.types.js';
|
|
2
|
+
import type { Dictionary } from '../types/typescript.js';
|
|
3
|
+
import type { GetContentOptions } from './get-content/types.js';
|
|
4
4
|
type GetBuilderPropsOptions = (Omit<GetContentOptions, 'model'> & {
|
|
5
5
|
model?: string;
|
|
6
6
|
}) & ({
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
+
type Options = {
|
|
4
|
+
block: BuilderBlock;
|
|
5
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>;
|
|
3
6
|
type EventHandler = (event: Event) => any;
|
|
4
7
|
export declare const createEventHandler: (value: string, options: Options) => EventHandler;
|
|
5
8
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
1
2
|
import type { BuilderBlock } from '../types/builder-block.js';
|
|
2
|
-
import type { Options } from './get-block-actions-handler.js';
|
|
3
3
|
type Actions = {
|
|
4
4
|
[index: string]: (event: Event) => any;
|
|
5
5
|
};
|
|
6
|
-
export declare function getBlockActions(
|
|
6
|
+
export declare function getBlockActions(options: {
|
|
7
7
|
block: BuilderBlock;
|
|
8
8
|
stripPrefix?: boolean;
|
|
9
|
-
} &
|
|
9
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): Actions;
|
|
10
10
|
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types.js';
|
|
1
2
|
import type { BuilderBlock } from '../types/builder-block.js';
|
|
2
|
-
|
|
3
|
-
type PassThroughProps = Pick<EvaluatorArgs, 'localState' | 'context' | 'rootState' | 'rootSetState' | 'serverExecutor'>;
|
|
4
|
-
export declare function getProcessedBlock({ block, shouldEvaluateBindings, ...args }: {
|
|
3
|
+
export declare function getProcessedBlock({ block, context, shouldEvaluateBindings, localState, rootState, rootSetState }: {
|
|
5
4
|
block: BuilderBlock;
|
|
6
5
|
/**
|
|
7
6
|
* In some cases, we want to avoid evaluating bindings and only want framework-specific block transformation. It is
|
|
8
7
|
* also sometimes too early to consider bindings, e.g. when we might be looking at a repeated block.
|
|
9
8
|
*/
|
|
10
9
|
shouldEvaluateBindings: boolean;
|
|
11
|
-
} &
|
|
12
|
-
export {};
|
|
10
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): BuilderBlock;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BuilderContent } from '../../types/builder-content';
|
|
1
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
2
2
|
export declare function getPreviewContent(_searchParams: URLSearchParams): BuilderContent | undefined;
|
|
@@ -13,29 +13,26 @@ export { Blocks, Content };
|
|
|
13
13
|
* @deprecated Use `Blocks` instead.
|
|
14
14
|
*/
|
|
15
15
|
export declare const RenderBlocks: import("vue").DefineComponent<Readonly<{
|
|
16
|
-
components?: any;
|
|
17
16
|
parent?: any;
|
|
18
17
|
blocks?: any;
|
|
19
18
|
path?: any;
|
|
20
19
|
styleProp?: any;
|
|
21
|
-
serverExecutor?: any;
|
|
22
20
|
context?: any;
|
|
21
|
+
registeredComponents?: any;
|
|
23
22
|
}>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
24
|
-
components?: any;
|
|
25
23
|
parent?: any;
|
|
26
24
|
blocks?: any;
|
|
27
25
|
path?: any;
|
|
28
26
|
styleProp?: any;
|
|
29
|
-
serverExecutor?: any;
|
|
30
27
|
context?: any;
|
|
28
|
+
registeredComponents?: any;
|
|
31
29
|
}>>>, {
|
|
32
|
-
readonly components?: any;
|
|
33
30
|
readonly parent?: any;
|
|
34
31
|
readonly blocks?: any;
|
|
35
32
|
readonly path?: any;
|
|
36
33
|
readonly styleProp?: any;
|
|
37
|
-
readonly serverExecutor?: any;
|
|
38
34
|
readonly context?: any;
|
|
35
|
+
readonly registeredComponents?: any;
|
|
39
36
|
}>;
|
|
40
37
|
/**
|
|
41
38
|
* @deprecated Use `Content` instead.
|
|
@@ -43,7 +40,6 @@ export declare const RenderBlocks: import("vue").DefineComponent<Readonly<{
|
|
|
43
40
|
export declare const RenderContent: import("vue").DefineComponent<Readonly<{
|
|
44
41
|
data?: any;
|
|
45
42
|
model?: any;
|
|
46
|
-
serverExecutor?: any;
|
|
47
43
|
context?: any;
|
|
48
44
|
content?: any;
|
|
49
45
|
canTrack?: any;
|
|
@@ -66,7 +62,6 @@ export declare const RenderContent: import("vue").DefineComponent<Readonly<{
|
|
|
66
62
|
}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
67
63
|
data?: any;
|
|
68
64
|
model?: any;
|
|
69
|
-
serverExecutor?: any;
|
|
70
65
|
context?: any;
|
|
71
66
|
content?: any;
|
|
72
67
|
canTrack?: any;
|
|
@@ -80,7 +75,6 @@ export declare const RenderContent: import("vue").DefineComponent<Readonly<{
|
|
|
80
75
|
}>>>, {
|
|
81
76
|
readonly data?: any;
|
|
82
77
|
readonly model?: any;
|
|
83
|
-
readonly serverExecutor?: any;
|
|
84
78
|
readonly context?: any;
|
|
85
79
|
readonly content?: any;
|
|
86
80
|
readonly canTrack?: any;
|
|
@@ -10,7 +10,7 @@ export type { Settings } from './functions/set-editor-settings.js';
|
|
|
10
10
|
export { fetchEntries, fetchOneEntry, 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
|
-
export type { RegisteredComponent } from './context/types';
|
|
14
|
-
export type { ComponentInfo } from './types/components';
|
|
13
|
+
export type { RegisteredComponent } from './context/types.js';
|
|
14
|
+
export type { ComponentInfo } from './types/components.js';
|
|
15
15
|
export type { ContentProps } from './components/content/content.types.js';
|
|
16
16
|
export { fetchBuilderProps } from './functions/fetch-builder-props.js';
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import type { BuilderContextInterface, RegisteredComponents } from '../context/types.js';
|
|
2
2
|
import type { BuilderBlock } from './builder-block.js';
|
|
3
|
-
import type { Executor } from '../functions/evaluate/helpers.js';
|
|
4
3
|
export type PropsWithBuilderData<T> = T & {
|
|
5
4
|
builderBlock: BuilderBlock;
|
|
5
|
+
builderContext: BuilderContextInterface;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
export type BuilderRenderingOptions = {
|
|
11
|
-
context: BuilderContextInterface;
|
|
12
|
-
components: RegisteredComponents;
|
|
13
|
-
serverExecutor?: Executor;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Props needed to be able to render a Builder Content tree. prefixed with `builder`.
|
|
17
|
-
* This is used to pass these props through Builder Blocks like Columns, Symbol, etc.
|
|
18
|
-
*/
|
|
19
|
-
export type BuilderRenderingOptionsProps = {
|
|
20
|
-
[T in keyof BuilderRenderingOptions as T extends string ? `builder${Capitalize<T>}` : never]: BuilderRenderingOptions[T];
|
|
7
|
+
export type BuilderComponentsProp = {
|
|
8
|
+
builderComponents: RegisteredComponents;
|
|
21
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.button-2fnk003dqad[data-v-d03c6eb1]{all:unset}.div-t9spj7joih[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-5vz8uirn7sc[data-v-d01e8c57]{display:flex;flex-direction:column;align-items:stretch}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { n as
|
|
3
|
-
const
|
|
4
|
-
var o;
|
|
5
|
-
const e = t.family + (t.kind && !t.kind.includes("#") ? ", " + t.kind : ""), i = e.split(",")[0], r = t.fileUrl
|
|
1
|
+
import { defineComponent as f } from "vue";
|
|
2
|
+
import { n as c } from "./index.fc359faf.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
6
|
let l = "";
|
|
7
7
|
if (r && e && i && (l += `
|
|
8
8
|
@font-face {
|
|
@@ -26,31 +26,31 @@ font-weight: ${n};
|
|
|
26
26
|
`.trim());
|
|
27
27
|
}
|
|
28
28
|
return l;
|
|
29
|
-
},
|
|
29
|
+
}, u = ({
|
|
30
30
|
customFonts: t
|
|
31
31
|
}) => {
|
|
32
32
|
var e;
|
|
33
|
-
return ((e = t == null ? void 0 : t.map((i) =>
|
|
34
|
-
},
|
|
33
|
+
return ((e = t == null ? void 0 : t.map((i) => m(i))) == null ? void 0 : e.join(" ")) || "";
|
|
34
|
+
}, d = ({
|
|
35
35
|
cssCode: t,
|
|
36
36
|
contentId: e
|
|
37
|
-
}) => t ? e ? (t == null ? void 0 : t.replace(/&/g, `div[builder-content-id="${e}"]`)) || "" : t : "",
|
|
37
|
+
}) => t ? e ? (t == null ? void 0 : t.replace(/&/g, `div[builder-content-id="${e}"]`)) || "" : t : "", p = () => import("./inlined-styles.32485f82.js").then((t) => t.default).catch((t) => {
|
|
38
38
|
throw console.error(
|
|
39
39
|
"Error while attempting to dynamically import component InlinedStyles at ../../inlined-styles.vue",
|
|
40
40
|
t
|
|
41
41
|
), t;
|
|
42
|
-
}),
|
|
42
|
+
}), h = f({
|
|
43
43
|
name: "content-styles",
|
|
44
|
-
components: { "inlined-styles":
|
|
44
|
+
components: { "inlined-styles": p },
|
|
45
45
|
props: ["cssCode", "contentId", "customFonts"],
|
|
46
46
|
data() {
|
|
47
47
|
return {
|
|
48
48
|
injectedStyles: `
|
|
49
|
-
${
|
|
49
|
+
${d({
|
|
50
50
|
cssCode: this.cssCode,
|
|
51
51
|
contentId: this.contentId
|
|
52
52
|
})}
|
|
53
|
-
${
|
|
53
|
+
${u({
|
|
54
54
|
customFonts: this.customFonts
|
|
55
55
|
})}
|
|
56
56
|
|
|
@@ -70,20 +70,20 @@ ${m({
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
var
|
|
73
|
+
var y = function() {
|
|
74
74
|
var e = this, i = e._self._c;
|
|
75
75
|
return e._self._setupProxy, i("inlined-styles", { attrs: { styles: e.injectedStyles } });
|
|
76
|
-
},
|
|
77
|
-
p,
|
|
76
|
+
}, g = [], _ = /* @__PURE__ */ c(
|
|
78
77
|
h,
|
|
79
78
|
y,
|
|
79
|
+
g,
|
|
80
80
|
!1,
|
|
81
81
|
null,
|
|
82
82
|
null,
|
|
83
83
|
null,
|
|
84
84
|
null
|
|
85
85
|
);
|
|
86
|
-
const
|
|
86
|
+
const x = _.exports;
|
|
87
87
|
export {
|
|
88
|
-
|
|
88
|
+
x as default
|
|
89
89
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),f=require("./index.0c5f9582.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
2
|
@font-face {
|
|
3
3
|
font-family: "${t}";
|
|
4
4
|
src: local("${i}"), url('${r}') format('woff2');
|
|
@@ -12,9 +12,9 @@ src: url('${s}') format('woff2');
|
|
|
12
12
|
font-display: fallback;
|
|
13
13
|
font-weight: ${n};
|
|
14
14
|
}
|
|
15
|
-
`.trim())}return l},
|
|
16
|
-
${
|
|
17
|
-
${
|
|
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.f9ade1ef.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
18
|
|
|
19
19
|
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
20
20
|
margin: 0;
|
|
@@ -28,4 +28,4 @@ ${u({customFonts:this.customFonts})}
|
|
|
28
28
|
text-align: inherit;
|
|
29
29
|
font-family: inherit;
|
|
30
30
|
}
|
|
31
|
-
`.trim()}}});var
|
|
31
|
+
`.trim()}}});var y=function(){var t=this,i=t._self._c;return t._self._setupProxy,i("inlined-styles",{attrs:{styles:t.injectedStyles}})},g=[],_=f.normalizeComponent(h,y,g,!1,null,null,null,null);const b=_.exports;exports.default=b;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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.
|
|
3
|
-
import { _ as k } from "./index.
|
|
2
|
+
import { g as s, a as i } from "./get-block-actions.0fc3b0b7.js";
|
|
3
|
+
import { _ as k } from "./index.ebaa8c07.js";
|
|
4
4
|
const S = l({
|
|
5
5
|
name: "block-wrapper",
|
|
6
6
|
props: ["Wrapper", "block", "context", "hasChildren"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-actions.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-actions.b8fe4107.cjs"),r=require("./index.1bb7374b.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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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.
|
|
3
|
-
import { g as I, a as $ } from "./get-block-actions.
|
|
2
|
+
import { _ as C, a as h, b as R } from "./index.ebaa8c07.js";
|
|
3
|
+
import { g as I, a as $ } from "./get-block-actions.0fc3b0b7.js";
|
|
4
4
|
const w = f({
|
|
5
5
|
name: "interactive-element",
|
|
6
6
|
props: ["wrapperProps", "block", "context", "Wrapper"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index.1bb7374b.cjs"),a=require("./get-block-actions.b8fe4107.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;
|
package/packages/_vue3/dist/{get-block-actions.20d51d99.cjs → get-block-actions.b8fe4107.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("./index.
|
|
1
|
+
"use strict";const c=require("./index.1bb7374b.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;
|