@builder.io/sdk-vue 0.11.2 → 0.11.3
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/README.md +15 -12
- package/lib/browser/block-styles.4dd5487a.js +70 -0
- package/lib/browser/block-styles.6d4042d1.cjs +1 -0
- package/lib/browser/block-wrapper.56a0b862.js +56 -0
- package/lib/browser/block-wrapper.d76c58a5.cjs +1 -0
- package/lib/browser/blocks/button/button.types.d.ts +6 -0
- package/lib/browser/blocks/button/button.vue.d.ts +0 -9
- package/lib/browser/blocks/columns/columns.types.d.ts +15 -0
- package/lib/browser/blocks/columns/columns.vue.d.ts +0 -14
- package/lib/browser/blocks/fragment/fragment.types.d.ts +5 -0
- package/lib/browser/blocks/fragment/fragment.vue.d.ts +0 -5
- package/lib/browser/blocks/image/image.types.d.ts +19 -0
- package/lib/browser/blocks/image/image.vue.d.ts +0 -19
- package/lib/browser/blocks/section/section.types.d.ts +6 -0
- package/lib/browser/blocks/section/section.vue.d.ts +0 -9
- package/lib/browser/blocks/symbol/symbol.types.d.ts +18 -0
- package/lib/browser/blocks/symbol/symbol.vue.d.ts +0 -23
- package/lib/browser/blocks/text/text.types.d.ts +3 -0
- package/lib/browser/blocks/text/text.vue.d.ts +0 -3
- package/lib/browser/blocks/video/video.types.d.ts +21 -0
- package/lib/browser/blocks/video/video.vue.d.ts +0 -21
- package/lib/{edge/component-ref.b20baf4e.js → browser/component-ref.6b764356.js} +40 -47
- package/lib/browser/component-ref.c01f28a8.cjs +1 -0
- package/lib/browser/components/blocks/blocks.types.d.ts +6 -0
- package/lib/browser/components/blocks/blocks.vue.d.ts +0 -6
- package/lib/browser/components/content-variants/content-variants.types.d.ts +30 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/css.bee71b93.js +22 -0
- package/lib/browser/css.c905e549.cjs +6 -0
- package/lib/browser/functions/get-content/index.d.ts +1 -1
- package/lib/browser/functions/get-content/types.d.ts +2 -2
- package/lib/browser/get-block-actions.6c569f39.cjs +1 -0
- package/lib/{node/get-block-actions.93573479.js → browser/get-block-actions.ea82379d.js} +13 -11
- package/lib/browser/{index.523c82d0.js → index.cf8f3cf0.js} +688 -775
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.e420a426.cjs +156 -0
- package/lib/browser/index.js +8 -8
- package/lib/browser/{repeated-block.a0ed3abf.cjs → repeated-block.0e1c5e05.cjs} +1 -1
- package/lib/browser/{repeated-block.b8d63262.js → repeated-block.a2b6e71d.js} +2 -2
- package/lib/browser/server-index.d.ts +10 -1
- package/lib/edge/block-styles.6941072a.cjs +1 -0
- package/lib/edge/block-styles.c251cc50.js +69 -0
- package/lib/{browser/block-wrapper.166db2f3.js → edge/block-wrapper.17244a32.js} +3 -3
- package/lib/edge/block-wrapper.a4b57a19.cjs +1 -0
- package/lib/edge/blocks/button/button.types.d.ts +6 -0
- package/lib/edge/blocks/button/button.vue.d.ts +0 -9
- package/lib/edge/blocks/columns/columns.types.d.ts +15 -0
- package/lib/edge/blocks/columns/columns.vue.d.ts +0 -14
- package/lib/edge/blocks/fragment/fragment.types.d.ts +5 -0
- package/lib/edge/blocks/fragment/fragment.vue.d.ts +0 -5
- package/lib/edge/blocks/image/image.types.d.ts +19 -0
- package/lib/edge/blocks/image/image.vue.d.ts +0 -19
- package/lib/edge/blocks/section/section.types.d.ts +6 -0
- package/lib/edge/blocks/section/section.vue.d.ts +0 -9
- package/lib/edge/blocks/symbol/symbol.types.d.ts +18 -0
- package/lib/edge/blocks/symbol/symbol.vue.d.ts +0 -23
- package/lib/edge/blocks/text/text.types.d.ts +3 -0
- package/lib/edge/blocks/text/text.vue.d.ts +0 -3
- package/lib/edge/blocks/video/video.types.d.ts +21 -0
- package/lib/edge/blocks/video/video.vue.d.ts +0 -21
- package/lib/{browser/component-ref.10189e21.js → edge/component-ref.a9555536.js} +40 -49
- package/lib/edge/component-ref.c6ef9f36.cjs +1 -0
- package/lib/edge/components/blocks/blocks.types.d.ts +6 -0
- package/lib/edge/components/blocks/blocks.vue.d.ts +0 -6
- package/lib/edge/components/content-variants/content-variants.types.d.ts +30 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/css.a1099f86.cjs +6 -0
- package/lib/edge/css.d3b9ec3d.js +21 -0
- package/lib/edge/functions/get-content/index.d.ts +1 -1
- package/lib/edge/functions/get-content/types.d.ts +2 -2
- package/lib/edge/get-block-actions.c862ea25.cjs +1 -0
- package/lib/{browser/get-block-actions.cf32df43.js → edge/get-block-actions.f0aac0c8.js} +4 -4
- package/lib/edge/{index.0db08bf0.cjs → index.6014202a.cjs} +26 -31
- package/lib/edge/{index.75e7a27c.js → index.6b327d2e.js} +1287 -1374
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.js +7 -7
- package/lib/edge/{repeated-block.d5c52934.js → repeated-block.2b8fbf14.js} +2 -2
- package/lib/edge/{repeated-block.c831f250.cjs → repeated-block.409149dc.cjs} +1 -1
- package/lib/edge/server-index.d.ts +10 -1
- package/lib/node/block-styles.b4e350c6.js +70 -0
- package/lib/node/block-styles.daaf5082.cjs +1 -0
- package/lib/node/block-wrapper.35fb80b6.js +56 -0
- package/lib/node/block-wrapper.7ec7b19a.cjs +1 -0
- package/lib/node/blocks/button/button.types.d.ts +6 -0
- package/lib/node/blocks/button/button.vue.d.ts +0 -9
- package/lib/node/blocks/columns/columns.types.d.ts +15 -0
- package/lib/node/blocks/columns/columns.vue.d.ts +0 -14
- package/lib/node/blocks/fragment/fragment.types.d.ts +5 -0
- package/lib/node/blocks/fragment/fragment.vue.d.ts +0 -5
- package/lib/node/blocks/image/image.types.d.ts +19 -0
- package/lib/node/blocks/image/image.vue.d.ts +0 -19
- package/lib/node/blocks/section/section.types.d.ts +6 -0
- package/lib/node/blocks/section/section.vue.d.ts +0 -9
- package/lib/node/blocks/symbol/symbol.types.d.ts +18 -0
- package/lib/node/blocks/symbol/symbol.vue.d.ts +0 -23
- package/lib/node/blocks/text/text.types.d.ts +3 -0
- package/lib/node/blocks/text/text.vue.d.ts +0 -3
- package/lib/node/blocks/video/video.types.d.ts +21 -0
- package/lib/node/blocks/video/video.vue.d.ts +0 -21
- package/lib/node/component-ref.04b89158.cjs +1 -0
- package/lib/node/{component-ref.a61e19d0.js → component-ref.2211624f.js} +40 -48
- package/lib/node/components/blocks/blocks.types.d.ts +6 -0
- package/lib/node/components/blocks/blocks.vue.d.ts +0 -6
- package/lib/node/components/content-variants/content-variants.types.d.ts +30 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/css.92fd0ea1.cjs +6 -0
- package/lib/node/css.9a474d8f.js +21 -0
- package/lib/node/functions/get-content/index.d.ts +1 -1
- package/lib/node/functions/get-content/types.d.ts +2 -2
- package/lib/node/get-block-actions.b15d24e5.cjs +1 -0
- package/lib/{edge/get-block-actions.01191962.js → node/get-block-actions.f7b1ef76.js} +10 -9
- package/lib/node/{index.e41a8ad1.js → index.29fcda33.js} +277 -364
- package/lib/node/{index.c2ecfe73.cjs → index.c9e2c835.cjs} +6 -11
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +8 -8
- package/lib/node/{repeated-block.088dd1eb.cjs → repeated-block.bf2609f9.cjs} +1 -1
- package/lib/node/{repeated-block.7c2934b2.js → repeated-block.f9ea4988.js} +2 -2
- package/lib/node/server-index.d.ts +10 -1
- package/package.json +47 -1
- package/lib/browser/block-wrapper.c7230ad9.cjs +0 -1
- package/lib/browser/component-ref.1ce72666.cjs +0 -1
- package/lib/browser/get-block-actions.8886d821.cjs +0 -1
- package/lib/browser/index.12ba04ce.cjs +0 -161
- package/lib/edge/block-wrapper.15cada1a.cjs +0 -1
- package/lib/edge/block-wrapper.ca1e4088.js +0 -54
- package/lib/edge/component-ref.8713bd04.cjs +0 -1
- package/lib/edge/get-block-actions.3e82e320.cjs +0 -1
- package/lib/node/block-wrapper.225409d6.cjs +0 -1
- package/lib/node/block-wrapper.90336157.js +0 -55
- package/lib/node/component-ref.2e739af9.cjs +0 -1
- package/lib/node/get-block-actions.f91cf957.cjs +0 -1
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
# Builder.io Vue
|
|
1
|
+
# Builder.io Vue SDK
|
|
2
2
|
|
|
3
|
-
This is the
|
|
4
|
-
|
|
5
|
-
NOTE: If you are looking for the stable 1.0 Vue SDK, you can find it [here](/packages/vue)
|
|
3
|
+
This is the Builder Vue SDK. It is currently in beta.
|
|
6
4
|
|
|
7
5
|
## Getting Started
|
|
8
6
|
|
|
@@ -10,20 +8,25 @@ NOTE: If you are looking for the stable 1.0 Vue SDK, you can find it [here](/pac
|
|
|
10
8
|
npm install @builder.io/sdk-vue
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
NOTE: if you are using Nuxt, you will need to
|
|
11
|
+
NOTE: if you are using Nuxt, you will need to add the SDK's Nuxt module in `nuxt.config.js`:
|
|
14
12
|
|
|
15
13
|
```js
|
|
16
|
-
// nuxt.config
|
|
14
|
+
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
17
15
|
export default defineNuxtConfig({
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* You need to transpile the Builder.io Vue SDK for it to work correctly.
|
|
21
|
-
*/
|
|
22
|
-
transpile: ['@builder.io/sdk-vue'],
|
|
23
|
-
},
|
|
16
|
+
module: ['@builder.io/sdk-vue/nuxt'],
|
|
24
17
|
});
|
|
25
18
|
```
|
|
26
19
|
|
|
20
|
+
## CSS
|
|
21
|
+
|
|
22
|
+
If you are using a SSR framework _other_ than Nuxt, you will need to manually import the CSS by adding the following to your entrypoint, before rendering Builder Content:
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<script>
|
|
26
|
+
import '@builder.io/sdk-vue/css';
|
|
27
|
+
</script>
|
|
28
|
+
```
|
|
29
|
+
|
|
27
30
|
## Mitosis
|
|
28
31
|
|
|
29
32
|
This SDK is generated by [Mitosis](https://github.com/BuilderIO/mitosis). To see the Mitosis source-code, go [here](../../).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { defineComponent as k, resolveComponent as y, openBlock as f, createBlock as x, createCommentVNode as b } from "vue";
|
|
3
|
+
import { I as B, T as g, g as m, c as d, a as _, b as u, _ as v } from "./index.cf8f3cf0.js";
|
|
4
|
+
import { c as r } from "./css.bee71b93.js";
|
|
5
|
+
const C = k({
|
|
6
|
+
name: "block-styles",
|
|
7
|
+
components: { InlinedStyles: B },
|
|
8
|
+
props: ["block", "context"],
|
|
9
|
+
data() {
|
|
10
|
+
return { TARGET: g };
|
|
11
|
+
},
|
|
12
|
+
computed: {
|
|
13
|
+
canShowBlock() {
|
|
14
|
+
const t = m({
|
|
15
|
+
block: this.block,
|
|
16
|
+
localState: this.context.localState,
|
|
17
|
+
rootState: this.context.rootState,
|
|
18
|
+
rootSetState: this.context.rootSetState,
|
|
19
|
+
context: this.context.context,
|
|
20
|
+
shouldEvaluateBindings: !0
|
|
21
|
+
});
|
|
22
|
+
return d(t.hide) ? !t.hide : d(t.show) ? t.show : !0;
|
|
23
|
+
},
|
|
24
|
+
css() {
|
|
25
|
+
var i;
|
|
26
|
+
const t = m({
|
|
27
|
+
block: this.block,
|
|
28
|
+
localState: this.context.localState,
|
|
29
|
+
rootState: this.context.rootState,
|
|
30
|
+
rootSetState: this.context.rootSetState,
|
|
31
|
+
context: this.context.context,
|
|
32
|
+
shouldEvaluateBindings: !0
|
|
33
|
+
}), e = t.responsiveStyles, o = this.context.content, c = _(
|
|
34
|
+
((i = o == null ? void 0 : o.meta) == null ? void 0 : i.breakpoints) || {}
|
|
35
|
+
), a = e == null ? void 0 : e.large, l = e == null ? void 0 : e.medium, s = e == null ? void 0 : e.small, n = t.id;
|
|
36
|
+
if (!n)
|
|
37
|
+
return "";
|
|
38
|
+
const p = a ? r({
|
|
39
|
+
className: n,
|
|
40
|
+
styles: a
|
|
41
|
+
}) : "", S = l ? r({
|
|
42
|
+
className: n,
|
|
43
|
+
styles: l,
|
|
44
|
+
mediaQuery: u(
|
|
45
|
+
"medium",
|
|
46
|
+
c
|
|
47
|
+
)
|
|
48
|
+
}) : "", h = s ? r({
|
|
49
|
+
className: n,
|
|
50
|
+
styles: s,
|
|
51
|
+
mediaQuery: u(
|
|
52
|
+
"small",
|
|
53
|
+
c
|
|
54
|
+
)
|
|
55
|
+
}) : "";
|
|
56
|
+
return [p, S, h].join(" ");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
function w(t, e, o, c, a, l) {
|
|
61
|
+
const s = y("inlined-styles");
|
|
62
|
+
return t.TARGET !== "reactNative" && t.css && t.canShowBlock ? (f(), x(s, {
|
|
63
|
+
key: 0,
|
|
64
|
+
styles: t.css
|
|
65
|
+
}, null, 8, ["styles"])) : b("v-if", !0);
|
|
66
|
+
}
|
|
67
|
+
const I = /* @__PURE__ */ v(C, [["render", w], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/block-styles.vue"]]);
|
|
68
|
+
export {
|
|
69
|
+
I as default
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var x=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),s=require("./index.e420a426.cjs"),u=require("./css.c905e549.cjs"),k=o.defineComponent({name:"block-styles",components:{InlinedStyles:s.InlinedStyles},props:["block","context"],data(){return{TARGET:s.TARGET}},computed:{canShowBlock(){const e=s.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0});return s.checkIsDefined(e.hide)?!e.hide:s.checkIsDefined(e.show)?e.show:!0},css(){var d;const e=s.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0}),t=e.responsiveStyles,c=this.context.content,r=s.getSizesForBreakpoints(((d=c==null?void 0:c.meta)==null?void 0:d.breakpoints)||{}),a=t==null?void 0:t.large,i=t==null?void 0:t.medium,n=t==null?void 0:t.small,l=e.id;if(!l)return"";const S=a?u.createCssClass({className:l,styles:a}):"",m=i?u.createCssClass({className:l,styles:i,mediaQuery:s.getMaxWidthQueryForSize("medium",r)}):"",h=n?u.createCssClass({className:l,styles:n,mediaQuery:s.getMaxWidthQueryForSize("small",r)}):"";return[S,m,h].join(" ")}}});function p(e,t,c,r,a,i){const n=o.resolveComponent("inlined-styles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(o.openBlock(),o.createBlock(n,{key:0,styles:e.css},null,8,["styles"])):o.createCommentVNode("v-if",!0)}const y=s._export_sfc(k,[["render",p],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/block-styles.vue"]]);exports.default=y;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { defineComponent as l, openBlock as e, 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 i } from "./get-block-actions.ea82379d.js";
|
|
4
|
+
import { _ as k } from "./index.cf8f3cf0.js";
|
|
5
|
+
import "./css.bee71b93.js";
|
|
6
|
+
const m = l({
|
|
7
|
+
name: "block-wrapper",
|
|
8
|
+
props: ["Wrapper", "block", "context", "hasChildren"],
|
|
9
|
+
data() {
|
|
10
|
+
return { getBlockActions: s, getBlockProperties: i };
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
function u(o, S, b, d, f, g) {
|
|
14
|
+
return o.hasChildren ? (e(), t(r(o.Wrapper), n(
|
|
15
|
+
{ key: 0 },
|
|
16
|
+
o.getBlockProperties({
|
|
17
|
+
block: o.block,
|
|
18
|
+
context: o.context
|
|
19
|
+
}),
|
|
20
|
+
a(
|
|
21
|
+
o.getBlockActions({
|
|
22
|
+
block: o.block,
|
|
23
|
+
rootState: o.context.rootState,
|
|
24
|
+
rootSetState: o.context.rootSetState,
|
|
25
|
+
localState: o.context.localState,
|
|
26
|
+
context: o.context.context,
|
|
27
|
+
stripPrefix: !0
|
|
28
|
+
})
|
|
29
|
+
)
|
|
30
|
+
), {
|
|
31
|
+
default: c(() => [
|
|
32
|
+
p(o.$slots, "default")
|
|
33
|
+
]),
|
|
34
|
+
_: 3
|
|
35
|
+
}, 16)) : (e(), t(r(o.Wrapper), n(
|
|
36
|
+
{ key: 1 },
|
|
37
|
+
o.getBlockProperties({
|
|
38
|
+
block: o.block,
|
|
39
|
+
context: o.context
|
|
40
|
+
}),
|
|
41
|
+
a(
|
|
42
|
+
o.getBlockActions({
|
|
43
|
+
block: o.block,
|
|
44
|
+
rootState: o.context.rootState,
|
|
45
|
+
rootSetState: o.context.rootSetState,
|
|
46
|
+
localState: o.context.localState,
|
|
47
|
+
context: o.context.context,
|
|
48
|
+
stripPrefix: !0
|
|
49
|
+
})
|
|
50
|
+
)
|
|
51
|
+
), null, 16));
|
|
52
|
+
}
|
|
53
|
+
const w = /* @__PURE__ */ k(m, [["render", u], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/block-wrapper.vue"]]);
|
|
54
|
+
export {
|
|
55
|
+
w as default
|
|
56
|
+
};
|
|
@@ -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.6c569f39.cjs"),r=require("./index.e420a426.cjs");require("./css.c905e549.cjs");const n=o.defineComponent({name:"block-wrapper",props:["Wrapper","block","context","hasChildren"],data(){return{getBlockActions:t.getBlockActions,getBlockProperties:t.getBlockProperties}}});function c(e,s,a,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,13 +1,4 @@
|
|
|
1
1
|
import { filterAttrs } from "../helpers.js";
|
|
2
|
-
/**
|
|
3
|
-
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
-
*/
|
|
5
|
-
export interface ButtonProps {
|
|
6
|
-
attributes?: any;
|
|
7
|
-
text?: string;
|
|
8
|
-
link?: string;
|
|
9
|
-
openLinkInNewTab?: boolean;
|
|
10
|
-
}
|
|
11
2
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
12
3
|
text?: any;
|
|
13
4
|
link?: any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
+
import type { BuilderComponentsProp } from '../../types/builder-props.js';
|
|
3
|
+
type Column = {
|
|
4
|
+
blocks: BuilderBlock[];
|
|
5
|
+
width?: number;
|
|
6
|
+
};
|
|
7
|
+
type StackColumnsAt = 'tablet' | 'mobile' | 'never';
|
|
8
|
+
export interface ColumnProps extends BuilderComponentsProp {
|
|
9
|
+
columns?: Column[];
|
|
10
|
+
builderBlock: BuilderBlock;
|
|
11
|
+
space?: number;
|
|
12
|
+
stackColumnsAt?: StackColumnsAt;
|
|
13
|
+
reverseColumnsWhenStacked?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import type { SizeName } from "../../constants/device-sizes.js";
|
|
2
|
-
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
3
|
-
import type { BuilderComponentsProp } from "../../types/builder-props.js";
|
|
4
2
|
import type { Dictionary } from "../../types/typescript.js";
|
|
5
|
-
type Column = {
|
|
6
|
-
blocks: BuilderBlock[];
|
|
7
|
-
width?: number;
|
|
8
|
-
};
|
|
9
3
|
type CSSVal = string | number;
|
|
10
|
-
type StackColumnsAt = "tablet" | "mobile" | "never";
|
|
11
|
-
export interface ColumnProps extends BuilderComponentsProp {
|
|
12
|
-
columns?: Column[];
|
|
13
|
-
builderBlock: BuilderBlock;
|
|
14
|
-
space?: number;
|
|
15
|
-
stackColumnsAt?: StackColumnsAt;
|
|
16
|
-
reverseColumnsWhenStacked?: boolean;
|
|
17
|
-
}
|
|
18
4
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
19
5
|
builderContext?: any;
|
|
20
6
|
columns?: any;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export interface FragmentProps {
|
|
2
|
-
maxWidth?: number;
|
|
3
|
-
attributes?: any;
|
|
4
|
-
children?: any;
|
|
5
|
-
}
|
|
6
1
|
declare const _default: import("vue").DefineComponent<Readonly<{}>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{}>>>, {}, {}>;
|
|
7
2
|
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
+
export interface ImageProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
image: string;
|
|
5
|
+
sizes?: string;
|
|
6
|
+
lazy?: boolean;
|
|
7
|
+
height?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
altText?: string;
|
|
10
|
+
backgroundSize?: 'cover' | 'contain';
|
|
11
|
+
backgroundPosition?: string;
|
|
12
|
+
srcset?: string;
|
|
13
|
+
aspectRatio?: number;
|
|
14
|
+
children?: any;
|
|
15
|
+
fitContent?: boolean;
|
|
16
|
+
builderBlock?: BuilderBlock;
|
|
17
|
+
noWebp?: boolean;
|
|
18
|
+
src?: string;
|
|
19
|
+
}
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
2
|
-
export interface ImageProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
image: string;
|
|
5
|
-
sizes?: string;
|
|
6
|
-
lazy?: boolean;
|
|
7
|
-
height?: number;
|
|
8
|
-
width?: number;
|
|
9
|
-
altText?: string;
|
|
10
|
-
backgroundSize?: "cover" | "contain";
|
|
11
|
-
backgroundPosition?: string;
|
|
12
|
-
srcset?: string;
|
|
13
|
-
aspectRatio?: number;
|
|
14
|
-
children?: any;
|
|
15
|
-
fitContent?: boolean;
|
|
16
|
-
builderBlock?: BuilderBlock;
|
|
17
|
-
noWebp?: boolean;
|
|
18
|
-
src?: string;
|
|
19
|
-
}
|
|
20
1
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
21
2
|
image?: any;
|
|
22
3
|
className?: any;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { filterAttrs } from "../helpers.js";
|
|
2
|
-
/**
|
|
3
|
-
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
-
*/
|
|
5
|
-
export interface SectionProps {
|
|
6
|
-
maxWidth?: number;
|
|
7
|
-
attributes?: any;
|
|
8
|
-
children?: any;
|
|
9
|
-
builderBlock?: any;
|
|
10
|
-
}
|
|
11
2
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
12
3
|
attributes?: any;
|
|
13
4
|
maxWidth?: any;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BuilderContent } from '../../types/builder-content.js';
|
|
2
|
+
import type { BuilderComponentsProp } from '../../types/builder-props.js';
|
|
3
|
+
interface SymbolInfo {
|
|
4
|
+
model?: string;
|
|
5
|
+
entry?: string;
|
|
6
|
+
data?: any;
|
|
7
|
+
content?: BuilderContent;
|
|
8
|
+
inline?: boolean;
|
|
9
|
+
dynamic?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface SymbolProps extends BuilderComponentsProp {
|
|
12
|
+
symbol?: SymbolInfo;
|
|
13
|
+
dataOnly?: boolean;
|
|
14
|
+
dynamic?: boolean;
|
|
15
|
+
attributes?: any;
|
|
16
|
+
inheritState?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import type { BuilderContent } from "../../types/builder-content.js";
|
|
2
|
-
import type { BuilderComponentsProp } from "../../types/builder-props.js";
|
|
3
1
|
import { filterAttrs } from "../helpers.js";
|
|
4
|
-
/**
|
|
5
|
-
* This import is used by the Svelte SDK. Do not remove.
|
|
6
|
-
*/
|
|
7
|
-
export interface SymbolInfo {
|
|
8
|
-
model?: string;
|
|
9
|
-
entry?: string;
|
|
10
|
-
data?: any;
|
|
11
|
-
content?: BuilderContent;
|
|
12
|
-
inline?: boolean;
|
|
13
|
-
dynamic?: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* This import is used by the Svelte SDK. Do not remove.
|
|
17
|
-
*/
|
|
18
|
-
export interface SymbolProps extends BuilderComponentsProp {
|
|
19
|
-
symbol?: SymbolInfo;
|
|
20
|
-
dataOnly?: boolean;
|
|
21
|
-
dynamic?: boolean;
|
|
22
|
-
attributes?: any;
|
|
23
|
-
inheritState?: boolean;
|
|
24
|
-
}
|
|
25
2
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
26
3
|
symbol?: any;
|
|
27
4
|
builderContext?: any;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export interface TextProps {
|
|
2
|
-
text?: string;
|
|
3
|
-
}
|
|
4
1
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
5
2
|
text?: any;
|
|
6
3
|
}>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../../types/builder-block.js';
|
|
2
|
+
export interface VideoProps {
|
|
3
|
+
attributes?: any;
|
|
4
|
+
video?: string;
|
|
5
|
+
autoPlay?: boolean;
|
|
6
|
+
controls?: boolean;
|
|
7
|
+
muted?: boolean;
|
|
8
|
+
loop?: boolean;
|
|
9
|
+
playsInline?: boolean;
|
|
10
|
+
aspectRatio?: number;
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
fit?: 'contain' | 'cover' | 'fill';
|
|
14
|
+
preload?: 'auto' | 'metadata' | 'none';
|
|
15
|
+
position?: 'center' | 'top' | 'left' | 'right' | 'bottom' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
|
16
|
+
posterImage?: string;
|
|
17
|
+
lazyLoad?: boolean;
|
|
18
|
+
children?: any;
|
|
19
|
+
fitContent?: boolean;
|
|
20
|
+
builderBlock?: BuilderBlock;
|
|
21
|
+
}
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
import type { BuilderBlock } from "../../types/builder-block.js";
|
|
2
|
-
export interface VideoProps {
|
|
3
|
-
attributes?: any;
|
|
4
|
-
video?: string;
|
|
5
|
-
autoPlay?: boolean;
|
|
6
|
-
controls?: boolean;
|
|
7
|
-
muted?: boolean;
|
|
8
|
-
loop?: boolean;
|
|
9
|
-
playsInline?: boolean;
|
|
10
|
-
aspectRatio?: number;
|
|
11
|
-
width?: number;
|
|
12
|
-
height?: number;
|
|
13
|
-
fit?: "contain" | "cover" | "fill";
|
|
14
|
-
preload?: "auto" | "metadata" | "none";
|
|
15
|
-
position?: "center" | "top" | "left" | "right" | "bottom" | "top left" | "top right" | "bottom left" | "bottom right";
|
|
16
|
-
posterImage?: string;
|
|
17
|
-
lazyLoad?: boolean;
|
|
18
|
-
children?: any;
|
|
19
|
-
fitContent?: boolean;
|
|
20
|
-
builderBlock?: BuilderBlock;
|
|
21
|
-
}
|
|
22
1
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
23
2
|
video?: any;
|
|
24
3
|
attributes?: any;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { defineComponent as m, openBlock as r, createBlock as i, resolveDynamicComponent as u, mergeProps as k, withCtx as d, renderSlot as P, resolveComponent as g, normalizeProps as B, createElementBlock as C, Fragment as $, renderList as h, createCommentVNode as w } from "vue";
|
|
3
|
+
import { _ as f, B as S, w as W } from "./index.cf8f3cf0.js";
|
|
4
|
+
import { g as R, a as b } from "./get-block-actions.ea82379d.js";
|
|
5
|
+
import "./css.bee71b93.js";
|
|
6
|
+
const I = m({
|
|
5
7
|
name: "interactive-element",
|
|
6
8
|
props: ["wrapperProps", "includeBlockProps", "block", "context", "Wrapper"],
|
|
7
9
|
data() {
|
|
8
|
-
return { getBlockActions:
|
|
10
|
+
return { getBlockActions: R, getBlockProperties: b };
|
|
9
11
|
}
|
|
10
12
|
});
|
|
11
|
-
function
|
|
12
|
-
return
|
|
13
|
+
function E(e, o, p, c, t, s) {
|
|
14
|
+
return r(), i(u(e.Wrapper), k({
|
|
13
15
|
attributes: e.includeBlockProps ? {
|
|
14
16
|
...e.getBlockProperties({
|
|
15
17
|
block: e.block,
|
|
@@ -24,44 +26,40 @@ function A(e, n, s, p, r, l) {
|
|
|
24
26
|
})
|
|
25
27
|
} : {}
|
|
26
28
|
}, e.wrapperProps), {
|
|
27
|
-
default:
|
|
28
|
-
|
|
29
|
+
default: d(() => [
|
|
30
|
+
P(e.$slots, "default")
|
|
29
31
|
]),
|
|
30
32
|
_: 3
|
|
31
33
|
}, 16, ["attributes"]);
|
|
32
34
|
}
|
|
33
|
-
const
|
|
35
|
+
const l = /* @__PURE__ */ f(I, [["render", E], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/interactive-element.vue"]]), y = ({
|
|
34
36
|
componentOptions: e,
|
|
35
|
-
builderBlock:
|
|
36
|
-
context:
|
|
37
|
-
componentRef:
|
|
38
|
-
includeBlockProps:
|
|
39
|
-
isInteractive:
|
|
37
|
+
builderBlock: o,
|
|
38
|
+
context: p,
|
|
39
|
+
componentRef: c,
|
|
40
|
+
includeBlockProps: t,
|
|
41
|
+
isInteractive: s,
|
|
40
42
|
contextValue: a
|
|
41
43
|
}) => {
|
|
42
|
-
const
|
|
44
|
+
const n = {
|
|
43
45
|
...e,
|
|
44
|
-
...
|
|
45
|
-
attributes:
|
|
46
|
-
block:
|
|
46
|
+
...t ? {
|
|
47
|
+
attributes: b({
|
|
48
|
+
block: o,
|
|
47
49
|
context: a
|
|
48
50
|
})
|
|
49
51
|
} : {}
|
|
50
52
|
};
|
|
51
|
-
return
|
|
52
|
-
Wrapper:
|
|
53
|
-
block:
|
|
54
|
-
context:
|
|
53
|
+
return s ? {
|
|
54
|
+
Wrapper: c,
|
|
55
|
+
block: o,
|
|
56
|
+
context: p,
|
|
55
57
|
wrapperProps: e,
|
|
56
|
-
includeBlockProps:
|
|
57
|
-
} :
|
|
58
|
-
},
|
|
58
|
+
includeBlockProps: t
|
|
59
|
+
} : n;
|
|
60
|
+
}, A = m({
|
|
59
61
|
name: "component-ref",
|
|
60
|
-
components: {
|
|
61
|
-
Block: y,
|
|
62
|
-
BlockStyles: W,
|
|
63
|
-
InteractiveElement: b
|
|
64
|
-
},
|
|
62
|
+
components: { Block: S, InteractiveElement: l },
|
|
65
63
|
props: [
|
|
66
64
|
"isInteractive",
|
|
67
65
|
"componentRef",
|
|
@@ -74,14 +72,14 @@ const b = /* @__PURE__ */ g(E, [["render", A], ["__file", "/home/runner/work/bui
|
|
|
74
72
|
],
|
|
75
73
|
data() {
|
|
76
74
|
return {
|
|
77
|
-
Wrapper: this.isInteractive ?
|
|
78
|
-
getWrapperProps:
|
|
75
|
+
Wrapper: this.isInteractive ? W(l) : this.componentRef,
|
|
76
|
+
getWrapperProps: y
|
|
79
77
|
};
|
|
80
78
|
}
|
|
81
79
|
});
|
|
82
|
-
function
|
|
83
|
-
const a =
|
|
84
|
-
return e.componentRef ? (
|
|
80
|
+
function O(e, o, p, c, t, s) {
|
|
81
|
+
const a = g("block");
|
|
82
|
+
return e.componentRef ? (r(), i(u(e.Wrapper), B(k(
|
|
85
83
|
{ key: 0 },
|
|
86
84
|
e.getWrapperProps({
|
|
87
85
|
componentOptions: e.componentOptions,
|
|
@@ -93,23 +91,18 @@ function z(e, n, s, p, r, l) {
|
|
|
93
91
|
contextValue: e.context
|
|
94
92
|
})
|
|
95
93
|
)), {
|
|
96
|
-
default:
|
|
97
|
-
(
|
|
98
|
-
key:
|
|
99
|
-
block:
|
|
94
|
+
default: d(() => [
|
|
95
|
+
(r(!0), C($, null, h(e.blockChildren, (n, v) => (r(), i(a, {
|
|
96
|
+
key: n.id,
|
|
97
|
+
block: n,
|
|
100
98
|
context: e.context,
|
|
101
99
|
registeredComponents: e.registeredComponents
|
|
102
|
-
}, null, 8, ["block", "context", "registeredComponents"]))), 128))
|
|
103
|
-
(t(!0), u(k, null, d(e.blockChildren, (o, $) => (t(), c(i, {
|
|
104
|
-
key: "block-style-" + o.id,
|
|
105
|
-
block: o,
|
|
106
|
-
context: e.context
|
|
107
|
-
}, null, 8, ["block", "context"]))), 128))
|
|
100
|
+
}, null, 8, ["block", "context", "registeredComponents"]))), 128))
|
|
108
101
|
]),
|
|
109
102
|
_: 1
|
|
110
103
|
}, 16)) : w("v-if", !0);
|
|
111
104
|
}
|
|
112
|
-
const N = /* @__PURE__ */
|
|
105
|
+
const N = /* @__PURE__ */ f(A, [["render", O], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/component-ref/component-ref.vue"]]);
|
|
113
106
|
export {
|
|
114
107
|
N as default
|
|
115
108
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var v=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("./index.e420a426.cjs"),a=require("./get-block-actions.6c569f39.cjs");require("./css.c905e549.cjs");const k=o.defineComponent({name:"interactive-element",props:["wrapperProps","includeBlockProps","block","context","Wrapper"],data(){return{getBlockActions:a.getBlockActions,getBlockProperties:a.getBlockProperties}}});function d(e,t,p,s,n,l){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=c._export_sfc(k,[["render",d],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/interactive-element.vue"]]),f=({componentOptions:e,builderBlock:t,context:p,componentRef:s,includeBlockProps:n,isInteractive:l,contextValue:i})=>{const r={...e,...n?{attributes:a.getBlockProperties({block:t,context:i})}:{}};return l?{Wrapper:s,block:t,context:p,wrapperProps:e,includeBlockProps:n}:r},b=o.defineComponent({name:"component-ref",components:{Block:c.Block,InteractiveElement:u},props:["isInteractive","componentRef","componentOptions","builderBlock","context","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?c.wrapComponentRef(u):this.componentRef,getWrapperProps:f}}});function B(e,t,p,s,n,l){const i=o.resolveComponent("block");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,(r,m)=>(o.openBlock(),o.createBlock(i,{key:r.id,block:r,context:e.context,registeredComponents:e.registeredComponents},null,8,["block","context","registeredComponents"]))),128))]),_:1},16)):o.createCommentVNode("v-if",!0)}const g=c._export_sfc(b,[["render",B],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/component-ref/component-ref.vue"]]);exports.default=g;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../../context/types.js';
|
|
2
|
+
import type { BlocksWrapperProps } from './blocks-wrapper.vue';
|
|
3
|
+
export type BlocksProps = Partial<Omit<BlocksWrapperProps, 'BlocksWrapper' | 'BlocksWrapperProps'>> & {
|
|
4
|
+
context?: BuilderContextInterface;
|
|
5
|
+
registeredComponents?: RegisteredComponents;
|
|
6
|
+
};
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import type { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
|
|
2
|
-
import type { BlocksWrapperProps } from "./blocks-wrapper.vue";
|
|
3
|
-
export type BlocksProps = Partial<Omit<BlocksWrapperProps, "BlocksWrapper" | "BlocksWrapperProps">> & {
|
|
4
|
-
context?: BuilderContextInterface;
|
|
5
|
-
registeredComponents?: RegisteredComponents;
|
|
6
|
-
};
|
|
7
1
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
8
2
|
path?: any;
|
|
9
3
|
blocks?: any;
|
|
@@ -3,19 +3,48 @@ import type { ApiVersion } from '../../types/api-version.js';
|
|
|
3
3
|
import type { BuilderContent } from '../../types/builder-content.js';
|
|
4
4
|
import type { Nullable } from '../../types/typescript.js';
|
|
5
5
|
export interface ContentVariantsPrps {
|
|
6
|
+
/**
|
|
7
|
+
* The Builder content JSON to render (required).
|
|
8
|
+
*/
|
|
6
9
|
content?: Nullable<BuilderContent>;
|
|
10
|
+
/**
|
|
11
|
+
* The Builder content `model` to render (required).
|
|
12
|
+
*/
|
|
7
13
|
model?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Additional data to inject into your Builder content (optional).
|
|
16
|
+
*/
|
|
8
17
|
data?: {
|
|
9
18
|
[key: string]: any;
|
|
10
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
11
23
|
context?: BuilderRenderContext;
|
|
24
|
+
/**
|
|
25
|
+
* Your API Key: needed to dynamically fetch symbols (required).
|
|
26
|
+
*/
|
|
12
27
|
apiKey: string;
|
|
13
28
|
apiVersion?: ApiVersion;
|
|
29
|
+
/**
|
|
30
|
+
* An array of custom components to register (optional).
|
|
31
|
+
*/
|
|
14
32
|
customComponents?: RegisteredComponent[];
|
|
33
|
+
/**
|
|
34
|
+
* A boolean to enable or disable tracking (optional). Defaults to `true`.
|
|
35
|
+
*/
|
|
15
36
|
canTrack?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* If provided, the API will auto-resolve localized objects to the value of this `locale` key (optional).
|
|
39
|
+
*/
|
|
16
40
|
locale?: string;
|
|
17
|
-
/** @deprecated use `enrich` instead
|
|
41
|
+
/** @deprecated use `enrich` instead */
|
|
18
42
|
includeRefs?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* A boolean to enable or disable enriching API content (optional).
|
|
45
|
+
*
|
|
46
|
+
* Enriching will Include multilevel references in the response. Defaults to `false`.
|
|
47
|
+
*/
|
|
19
48
|
enrich?: boolean;
|
|
20
49
|
/**
|
|
21
50
|
* The element that wraps your content. Defaults to `div` ('ScrollView' in React Native).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.11.
|
|
1
|
+
export declare const SDK_VERSION = "0.11.3";
|