@builder.io/sdk-vue 0.11.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/{block-wrapper.500ec5f5.js → block-wrapper.166db2f3.js} +2 -2
- package/lib/browser/block-wrapper.c7230ad9.cjs +1 -0
- package/lib/{node/component-ref.ece91a5a.js → browser/component-ref.10189e21.js} +41 -38
- package/lib/browser/component-ref.1ce72666.cjs +1 -0
- package/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +3 -3
- package/lib/browser/components/block/components/interactive-element.vue.d.ts +6 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/get-block-actions.8886d821.cjs +1 -0
- package/lib/{edge/get-block-actions.26e0301d.js → browser/get-block-actions.cf32df43.js} +1 -1
- package/lib/browser/{index.ca5e56e7.cjs → index.12ba04ce.cjs} +7 -7
- package/lib/browser/{index.6983b0a7.js → index.523c82d0.js} +61 -61
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.js +1 -1
- package/lib/browser/repeated-block.a0ed3abf.cjs +1 -0
- package/lib/{edge/repeated-block.b763e176.js → browser/repeated-block.b8d63262.js} +2 -2
- package/lib/edge/block-wrapper.15cada1a.cjs +1 -0
- package/lib/edge/block-wrapper.ca1e4088.js +54 -0
- package/lib/edge/component-ref.8713bd04.cjs +1 -0
- package/lib/edge/{component-ref.ec115a22.js → component-ref.b20baf4e.js} +42 -39
- package/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +3 -3
- package/lib/edge/components/block/components/interactive-element.vue.d.ts +6 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/{browser/get-block-actions.5e600864.js → edge/get-block-actions.01191962.js} +8 -9
- package/lib/edge/get-block-actions.3e82e320.cjs +1 -0
- package/lib/edge/{index.de3da877.cjs → index.0db08bf0.cjs} +8 -8
- package/lib/edge/{index.e558d97b.js → index.75e7a27c.js} +203 -204
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.js +26 -27
- package/lib/edge/repeated-block.c831f250.cjs +1 -0
- package/lib/{node/repeated-block.3506f1b0.js → edge/repeated-block.d5c52934.js} +6 -8
- package/lib/{edge/block-wrapper.05478f7e.cjs → node/block-wrapper.225409d6.cjs} +1 -1
- package/lib/{edge/block-wrapper.aa36cefc.js → node/block-wrapper.90336157.js} +3 -3
- package/lib/node/component-ref.2e739af9.cjs +1 -0
- package/lib/{browser/component-ref.a38e026c.js → node/component-ref.a61e19d0.js} +44 -40
- package/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +3 -3
- package/lib/node/components/block/components/interactive-element.vue.d.ts +6 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-actions.7691fb97.js → get-block-actions.93573479.js} +8 -9
- package/lib/node/get-block-actions.f91cf957.cjs +1 -0
- package/lib/node/{index.94928dd2.cjs → index.c2ecfe73.cjs} +4 -4
- package/lib/node/index.cjs +1 -1
- package/lib/node/{index.df242b65.js → index.e41a8ad1.js} +5 -6
- package/lib/node/index.js +23 -24
- package/lib/{browser/repeated-block.0b341312.cjs → node/repeated-block.088dd1eb.cjs} +1 -1
- package/lib/{browser/repeated-block.816279f7.js → node/repeated-block.7c2934b2.js} +3 -3
- package/nuxt.js +10 -0
- package/package.json +11 -2
- package/lib/browser/block-wrapper.d7918237.cjs +0 -1
- package/lib/browser/component-ref.6996225a.cjs +0 -1
- package/lib/browser/get-block-actions.7411dc4b.cjs +0 -1
- package/lib/edge/component-ref.66ffa7b1.cjs +0 -1
- package/lib/edge/get-block-actions.8eb27dcc.cjs +0 -1
- package/lib/edge/repeated-block.22a79943.cjs +0 -1
- package/lib/node/block-wrapper.2c584354.js +0 -56
- package/lib/node/block-wrapper.549e7f10.cjs +0 -1
- package/lib/node/component-ref.75dd0397.cjs +0 -1
- package/lib/node/get-block-actions.10171a44.cjs +0 -1
- package/lib/node/repeated-block.0684fd84.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as l, openBlock as o, createBlock as t, resolveDynamicComponent as r, mergeProps as n, toHandlers as a, withCtx as c, renderSlot as p } from "vue";
|
|
3
|
-
import { g as s, a as k } from "./get-block-actions.
|
|
4
|
-
import { _ as i } from "./index.
|
|
3
|
+
import { g as s, a as k } from "./get-block-actions.cf32df43.js";
|
|
4
|
+
import { _ as i } from "./index.523c82d0.js";
|
|
5
5
|
const u = l({
|
|
6
6
|
name: "block-wrapper",
|
|
7
7
|
props: ["Wrapper", "block", "context", "hasChildren"],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./get-block-actions.8886d821.cjs"),r=require("./index.12ba04ce.cjs"),n=o.defineComponent({name:"block-wrapper",props:["Wrapper","block","context","hasChildren"],data(){return{getBlockActions:t.getBlockActions,getBlockProperties:t.getBlockProperties}}});function c(e,a,s,p,i,k){return e.hasChildren?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.mergeProps({key:0},e.getBlockProperties({block:e.block,context:e.context}),o.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:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.mergeProps({key:1},e.getBlockProperties({block:e.block,context:e.context}),o.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],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/block-wrapper.vue"]]);exports.default=l;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { defineComponent as f, openBlock as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { g as I, a as C } from "./get-block-actions.
|
|
5
|
-
import "node:module";
|
|
2
|
+
import { defineComponent as f, openBlock as t, createBlock as c, resolveDynamicComponent as v, mergeProps as B, withCtx as P, renderSlot as S, resolveComponent as m, normalizeProps as h, createElementBlock as u, Fragment as k, renderList as d, createCommentVNode as w } from "vue";
|
|
3
|
+
import { _ as g, B as y, a as W, w as R } from "./index.523c82d0.js";
|
|
4
|
+
import { g as I, a as C } from "./get-block-actions.cf32df43.js";
|
|
6
5
|
const E = f({
|
|
7
6
|
name: "interactive-element",
|
|
8
|
-
props: ["wrapperProps", "block", "context", "Wrapper"],
|
|
7
|
+
props: ["wrapperProps", "includeBlockProps", "block", "context", "Wrapper"],
|
|
9
8
|
data() {
|
|
10
9
|
return { getBlockActions: I, getBlockProperties: C };
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
|
-
function A(e, n,
|
|
14
|
-
return
|
|
15
|
-
attributes: {
|
|
12
|
+
function A(e, n, s, p, r, l) {
|
|
13
|
+
return t(), c(v(e.Wrapper), B({
|
|
14
|
+
attributes: e.includeBlockProps ? {
|
|
16
15
|
...e.getBlockProperties({
|
|
17
16
|
block: e.block,
|
|
18
17
|
context: e.context
|
|
@@ -24,40 +23,44 @@ function A(e, n, c, p, s, l) {
|
|
|
24
23
|
localState: e.context.localState,
|
|
25
24
|
context: e.context.context
|
|
26
25
|
})
|
|
27
|
-
}
|
|
26
|
+
} : {}
|
|
28
27
|
}, e.wrapperProps), {
|
|
29
|
-
default:
|
|
28
|
+
default: P(() => [
|
|
30
29
|
S(e.$slots, "default")
|
|
31
30
|
]),
|
|
32
31
|
_: 3
|
|
33
32
|
}, 16, ["attributes"]);
|
|
34
33
|
}
|
|
35
|
-
const b = /* @__PURE__ */
|
|
34
|
+
const b = /* @__PURE__ */ g(E, [["render", A], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/interactive-element.vue"]]), O = ({
|
|
36
35
|
componentOptions: e,
|
|
37
36
|
builderBlock: n,
|
|
38
|
-
context:
|
|
37
|
+
context: s,
|
|
39
38
|
componentRef: p,
|
|
40
|
-
includeBlockProps:
|
|
39
|
+
includeBlockProps: r,
|
|
41
40
|
isInteractive: l,
|
|
42
41
|
contextValue: a
|
|
43
|
-
}) =>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
}) => {
|
|
43
|
+
const i = {
|
|
44
|
+
...e,
|
|
45
|
+
...r ? {
|
|
46
|
+
attributes: C({
|
|
47
|
+
block: n,
|
|
48
|
+
context: a
|
|
49
|
+
})
|
|
50
|
+
} : {}
|
|
51
|
+
};
|
|
52
|
+
return l ? {
|
|
53
|
+
Wrapper: p,
|
|
54
|
+
block: n,
|
|
55
|
+
context: s,
|
|
56
|
+
wrapperProps: e,
|
|
57
|
+
includeBlockProps: r
|
|
58
|
+
} : i;
|
|
56
59
|
}, V = f({
|
|
57
60
|
name: "component-ref",
|
|
58
61
|
components: {
|
|
59
62
|
Block: y,
|
|
60
|
-
BlockStyles:
|
|
63
|
+
BlockStyles: W,
|
|
61
64
|
InteractiveElement: b
|
|
62
65
|
},
|
|
63
66
|
props: [
|
|
@@ -72,14 +75,14 @@ const b = /* @__PURE__ */ P(E, [["render", A], ["__file", "/home/runner/work/bui
|
|
|
72
75
|
],
|
|
73
76
|
data() {
|
|
74
77
|
return {
|
|
75
|
-
Wrapper: this.isInteractive ?
|
|
78
|
+
Wrapper: this.isInteractive ? R(b) : this.componentRef,
|
|
76
79
|
getWrapperProps: O
|
|
77
80
|
};
|
|
78
81
|
}
|
|
79
82
|
});
|
|
80
|
-
function
|
|
83
|
+
function z(e, n, s, p, r, l) {
|
|
81
84
|
const a = m("block"), i = m("block-styles");
|
|
82
|
-
return e.componentRef ? (
|
|
85
|
+
return e.componentRef ? (t(), c(v(e.Wrapper), h(B(
|
|
83
86
|
{ key: 0 },
|
|
84
87
|
e.getWrapperProps({
|
|
85
88
|
componentOptions: e.componentOptions,
|
|
@@ -91,23 +94,23 @@ function x(e, n, c, p, s, l) {
|
|
|
91
94
|
contextValue: e.context
|
|
92
95
|
})
|
|
93
96
|
)), {
|
|
94
|
-
default:
|
|
95
|
-
(
|
|
96
|
-
key: "block-" +
|
|
97
|
-
block:
|
|
97
|
+
default: P(() => [
|
|
98
|
+
(t(!0), u(k, null, d(e.blockChildren, (o, $) => (t(), c(a, {
|
|
99
|
+
key: "block-" + o.id,
|
|
100
|
+
block: o,
|
|
98
101
|
context: e.context,
|
|
99
102
|
registeredComponents: e.registeredComponents
|
|
100
103
|
}, null, 8, ["block", "context", "registeredComponents"]))), 128)),
|
|
101
|
-
(
|
|
102
|
-
key: "block-style-" +
|
|
103
|
-
block:
|
|
104
|
+
(t(!0), u(k, null, d(e.blockChildren, (o, $) => (t(), c(i, {
|
|
105
|
+
key: "block-style-" + o.id,
|
|
106
|
+
block: o,
|
|
104
107
|
context: e.context
|
|
105
108
|
}, null, 8, ["block", "context"]))), 128))
|
|
106
109
|
]),
|
|
107
110
|
_: 1
|
|
108
111
|
}, 16)) : w("v-if", !0);
|
|
109
112
|
}
|
|
110
|
-
const j = /* @__PURE__ */
|
|
113
|
+
const j = /* @__PURE__ */ g(V, [["render", z], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/component-ref/component-ref.vue"]]);
|
|
111
114
|
export {
|
|
112
115
|
j as default
|
|
113
116
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),n=require("./index.12ba04ce.cjs"),k=require("./get-block-actions.8886d821.cjs"),d=o.defineComponent({name:"interactive-element",props:["wrapperProps","includeBlockProps","block","context","Wrapper"],data(){return{getBlockActions:k.getBlockActions,getBlockProperties:k.getBlockProperties}}});function b(e,r,l,s,c,p){return o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.mergeProps({attributes:e.includeBlockProps?{...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 u=n._export_sfc(d,[["render",b],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/interactive-element.vue"]]),B=({componentOptions:e,builderBlock:r,context:l,componentRef:s,includeBlockProps:c,isInteractive:p,contextValue:i})=>{const a={...e,...c?{attributes:k.getBlockProperties({block:r,context:i})}:{}};return p?{Wrapper:s,block:r,context:l,wrapperProps:e,includeBlockProps:c}:a},f=o.defineComponent({name:"component-ref",components:{Block:n.Block,BlockStyles:n.BlockStyles,InteractiveElement:u},props:["isInteractive","componentRef","componentOptions","builderBlock","context","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?n.wrapComponentRef(u):this.componentRef,getWrapperProps:B}}});function g(e,r,l,s,c,p){const i=o.resolveComponent("block"),a=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,m)=>(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,m)=>(o.openBlock(),o.createBlock(a,{key:"block-style-"+t.id,block:t,context:e.context},null,8,["block","context"]))),128))]),_:1},16)):o.createCommentVNode("v-if",!0)}const v=n._export_sfc(f,[["render",g],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/component-ref/component-ref.vue"]]);exports.default=v;
|
|
@@ -2,11 +2,11 @@ import type { ComponentProps } from "./component-ref.helpers.js";
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
3
3
|
context?: any;
|
|
4
4
|
registeredComponents?: any;
|
|
5
|
+
includeBlockProps?: any;
|
|
5
6
|
blockChildren?: any;
|
|
6
7
|
componentRef?: any;
|
|
7
8
|
componentOptions?: any;
|
|
8
9
|
builderBlock?: any;
|
|
9
|
-
includeBlockProps?: any;
|
|
10
10
|
isInteractive?: any;
|
|
11
11
|
}>, unknown, {
|
|
12
12
|
Wrapper: any;
|
|
@@ -20,20 +20,20 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
20
20
|
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
21
21
|
context?: any;
|
|
22
22
|
registeredComponents?: any;
|
|
23
|
+
includeBlockProps?: any;
|
|
23
24
|
blockChildren?: any;
|
|
24
25
|
componentRef?: any;
|
|
25
26
|
componentOptions?: any;
|
|
26
27
|
builderBlock?: any;
|
|
27
|
-
includeBlockProps?: any;
|
|
28
28
|
isInteractive?: any;
|
|
29
29
|
}>>>, {
|
|
30
30
|
readonly context?: any;
|
|
31
31
|
readonly registeredComponents?: any;
|
|
32
|
+
readonly includeBlockProps?: any;
|
|
32
33
|
readonly blockChildren?: any;
|
|
33
34
|
readonly componentRef?: any;
|
|
34
35
|
readonly componentOptions?: any;
|
|
35
36
|
readonly builderBlock?: any;
|
|
36
|
-
readonly includeBlockProps?: any;
|
|
37
37
|
readonly isInteractive?: any;
|
|
38
38
|
}, {}>;
|
|
39
39
|
export default _default;
|
|
@@ -2,16 +2,19 @@ import type { BuilderContextInterface } from "../../../context/types.js";
|
|
|
2
2
|
import { getBlockActions } from "../../../functions/get-block-actions.js";
|
|
3
3
|
import { getBlockProperties } from "../../../functions/get-block-properties.js";
|
|
4
4
|
import type { BuilderBlock } from "../../../types/builder-block.js";
|
|
5
|
+
import type { Dictionary } from "../../../types/typescript.js";
|
|
5
6
|
export type InteractiveElementProps = {
|
|
6
7
|
Wrapper: any;
|
|
7
8
|
block: BuilderBlock;
|
|
8
9
|
context: BuilderContextInterface;
|
|
9
|
-
wrapperProps:
|
|
10
|
+
wrapperProps: Dictionary<any>;
|
|
11
|
+
includeBlockProps: boolean;
|
|
10
12
|
};
|
|
11
13
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
12
14
|
block?: any;
|
|
13
15
|
context?: any;
|
|
14
16
|
wrapperProps?: any;
|
|
17
|
+
includeBlockProps?: any;
|
|
15
18
|
Wrapper?: any;
|
|
16
19
|
}>, unknown, {
|
|
17
20
|
getBlockActions: typeof getBlockActions;
|
|
@@ -20,11 +23,13 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
20
23
|
block?: any;
|
|
21
24
|
context?: any;
|
|
22
25
|
wrapperProps?: any;
|
|
26
|
+
includeBlockProps?: any;
|
|
23
27
|
Wrapper?: any;
|
|
24
28
|
}>>>, {
|
|
25
29
|
readonly block?: any;
|
|
26
30
|
readonly context?: any;
|
|
27
31
|
readonly wrapperProps?: any;
|
|
32
|
+
readonly includeBlockProps?: any;
|
|
28
33
|
readonly Wrapper?: any;
|
|
29
34
|
}, {}>;
|
|
30
35
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.11.
|
|
1
|
+
export declare const SDK_VERSION = "0.11.2";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=require("./style.css");const c=require("./index.12ba04ce.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({properties: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({properties:r,context:t,block:e})}function v(e){switch(c.TARGET){case"svelte":case"vue":case"solid":return c.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const d=e=>`v-on:${e.toLowerCase()}`,S=(e,t)=>r=>c.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1});function p(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=d(n);if(e.stripPrefix)switch(c.TARGET){case"vue":o=o.replace("v-on:","");break;case"svelte":o=o.replace("on:","");break}t[o]=S(a,e)}return t}exports.getBlockActions=p;exports.getBlockProperties=f;
|