@builder.io/sdk-vue 0.12.1 → 0.12.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-styles.0a1c13cc.cjs → block-styles.76e01443.cjs} +1 -1
- package/lib/browser/{block-styles.15daad04.js → block-styles.eada5366.js} +2 -2
- package/lib/browser/block-wrapper.24b79ff8.cjs +1 -0
- package/lib/browser/block-wrapper.9b2bed3c.js +45 -0
- package/lib/browser/blocks/button/button.vue.d.ts +1 -3
- package/lib/browser/blocks/columns/columns.vue.d.ts +0 -1
- package/lib/browser/blocks/custom-code/custom-code.vue.d.ts +1 -3
- package/lib/browser/blocks/image/image.vue.d.ts +1 -3
- package/lib/browser/blocks/symbol/symbol.vue.d.ts +0 -1
- package/lib/browser/{component-ref.35876089.cjs → component-ref.00682bcb.cjs} +1 -1
- package/lib/browser/{component-ref.408ec744.js → component-ref.a9dd871c.js} +3 -3
- package/lib/browser/components/block/block.helpers.d.ts +0 -1
- package/lib/browser/components/block/block.vue.d.ts +0 -1
- package/lib/browser/components/block/components/block-wrapper.vue.d.ts +0 -7
- package/lib/browser/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
- package/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +8 -1
- package/lib/browser/components/blocks/blocks-wrapper.vue.d.ts +0 -1
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +3 -1
- package/lib/browser/components/content/content.vue.d.ts +3 -0
- package/lib/browser/components/content-variants/content-variants.types.d.ts +4 -0
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +3 -0
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.helpers.d.ts +1 -0
- package/lib/browser/components/dynamic-renderer/dynamic-renderer.vue.d.ts +16 -0
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/{css.e56cc923.js → css.58041866.js} +1 -1
- package/lib/browser/{css.56c01a0f.cjs → css.93429f3b.cjs} +1 -1
- package/lib/browser/dynamic-renderer.587b2b22.cjs +1 -0
- package/lib/browser/dynamic-renderer.807ec99c.js +29 -0
- package/lib/browser/functions/get-block-properties.d.ts +6 -1
- package/lib/browser/functions/is-from-trusted-host.d.ts +3 -0
- package/lib/browser/functions/transform-block-properties.d.ts +7 -5
- package/lib/browser/get-block-actions.3853c568.cjs +1 -0
- package/lib/browser/{get-block-actions.5749164d.js → get-block-actions.7be7f916.js} +21 -30
- package/lib/browser/index-helpers/blocks-exports.d.ts +3 -0
- package/lib/browser/index.8583dad3.cjs +156 -0
- package/lib/browser/{index.1c3cd66d.js → index.b532efb7.js} +438 -510
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.js +1 -1
- package/lib/browser/{repeated-block.f3af0b09.cjs → repeated-block.569f57e3.cjs} +1 -1
- package/lib/browser/{repeated-block.3aa48114.js → repeated-block.b3746f1a.js} +2 -2
- package/lib/browser/scripts/init-editing.d.ts +1 -0
- package/lib/edge/{block-styles.baf84624.js → block-styles.a1440ad7.js} +2 -2
- package/lib/edge/{block-styles.1d36e17e.cjs → block-styles.f491edc2.cjs} +1 -1
- package/lib/edge/block-wrapper.555f21dd.cjs +1 -0
- package/lib/edge/block-wrapper.efc7d98a.js +44 -0
- package/lib/edge/blocks/button/button.vue.d.ts +1 -3
- package/lib/edge/blocks/columns/columns.vue.d.ts +0 -1
- package/lib/edge/blocks/custom-code/custom-code.vue.d.ts +1 -3
- package/lib/edge/blocks/image/image.vue.d.ts +1 -3
- package/lib/edge/blocks/symbol/symbol.vue.d.ts +0 -1
- package/lib/edge/{component-ref.b38c0a17.cjs → component-ref.100a10a4.cjs} +1 -1
- package/lib/edge/{component-ref.a0bf7c30.js → component-ref.bcafb710.js} +3 -3
- package/lib/edge/components/block/block.helpers.d.ts +0 -1
- package/lib/edge/components/block/block.vue.d.ts +0 -1
- package/lib/edge/components/block/components/block-wrapper.vue.d.ts +0 -7
- package/lib/edge/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
- package/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +8 -1
- package/lib/edge/components/blocks/blocks-wrapper.vue.d.ts +0 -1
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +3 -1
- package/lib/edge/components/content/content.vue.d.ts +3 -0
- package/lib/edge/components/content-variants/content-variants.types.d.ts +4 -0
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +3 -0
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.helpers.d.ts +1 -0
- package/lib/edge/components/dynamic-renderer/dynamic-renderer.vue.d.ts +16 -0
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/{node/css.43e589b6.js → edge/css.0b928f4c.js} +1 -1
- package/lib/{node/css.b8f02dce.cjs → edge/css.d6d697ec.cjs} +1 -1
- package/lib/edge/dynamic-renderer.1a8c0430.js +28 -0
- package/lib/edge/dynamic-renderer.b95a1057.cjs +1 -0
- package/lib/edge/functions/get-block-properties.d.ts +6 -1
- package/lib/edge/functions/is-from-trusted-host.d.ts +3 -0
- package/lib/edge/functions/transform-block-properties.d.ts +7 -5
- package/lib/edge/get-block-actions.34ceb0fb.cjs +1 -0
- package/lib/edge/get-block-actions.6f8ccd3c.js +75 -0
- package/lib/edge/index-helpers/blocks-exports.d.ts +3 -0
- package/lib/edge/{index.7f2747c7.cjs → index.332c4c68.cjs} +23 -23
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/{index.d2eea20b.js → index.ffc9a7bc.js} +708 -780
- package/lib/edge/index.js +1 -1
- package/lib/edge/{repeated-block.d2e0b56c.js → repeated-block.090029ef.js} +2 -2
- package/lib/edge/{repeated-block.d802e6a0.cjs → repeated-block.cefa0bf6.cjs} +1 -1
- package/lib/edge/scripts/init-editing.d.ts +1 -0
- package/lib/node/{block-styles.9378e041.js → block-styles.136d6f08.js} +2 -2
- package/lib/node/{block-styles.544d0fa5.cjs → block-styles.589566b1.cjs} +1 -1
- package/lib/node/block-wrapper.18e00652.js +45 -0
- package/lib/node/block-wrapper.831b0d92.cjs +1 -0
- package/lib/node/blocks/button/button.vue.d.ts +1 -3
- package/lib/node/blocks/columns/columns.vue.d.ts +0 -1
- package/lib/node/blocks/custom-code/custom-code.vue.d.ts +1 -3
- package/lib/node/blocks/image/image.vue.d.ts +1 -3
- package/lib/node/blocks/symbol/symbol.vue.d.ts +0 -1
- package/lib/node/{component-ref.85cf8aff.js → component-ref.c1216d72.js} +3 -3
- package/lib/node/{component-ref.36955ca9.cjs → component-ref.c4fd0511.cjs} +1 -1
- package/lib/node/components/block/block.helpers.d.ts +0 -1
- package/lib/node/components/block/block.vue.d.ts +0 -1
- package/lib/node/components/block/components/block-wrapper.vue.d.ts +0 -7
- package/lib/node/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
- package/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +8 -1
- package/lib/node/components/blocks/blocks-wrapper.vue.d.ts +0 -1
- package/lib/node/components/content/components/enable-editor.vue.d.ts +3 -1
- package/lib/node/components/content/content.vue.d.ts +3 -0
- package/lib/node/components/content-variants/content-variants.types.d.ts +4 -0
- package/lib/node/components/content-variants/content-variants.vue.d.ts +3 -0
- package/lib/node/components/dynamic-renderer/dynamic-renderer.helpers.d.ts +1 -0
- package/lib/node/components/dynamic-renderer/dynamic-renderer.vue.d.ts +16 -0
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/{edge/css.817ffaca.cjs → node/css.1037a3f7.cjs} +1 -1
- package/lib/{edge/css.c9cd980b.js → node/css.dd54b8f6.js} +1 -1
- package/lib/node/dynamic-renderer.92a2f84d.cjs +1 -0
- package/lib/node/dynamic-renderer.d189611e.js +29 -0
- package/lib/node/functions/get-block-properties.d.ts +6 -1
- package/lib/node/functions/is-from-trusted-host.d.ts +3 -0
- package/lib/node/functions/transform-block-properties.d.ts +7 -5
- package/lib/node/get-block-actions.64593134.js +75 -0
- package/lib/node/get-block-actions.a79e1825.cjs +1 -0
- package/lib/node/index-helpers/blocks-exports.d.ts +3 -0
- package/lib/node/{index.73c9ec13.js → index.36c2b72c.js} +75 -147
- package/lib/node/index.c18f2b9a.cjs +196 -0
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +1 -1
- package/lib/node/{repeated-block.182fc93f.cjs → repeated-block.4e2006fc.cjs} +1 -1
- package/lib/node/{repeated-block.6972ade9.js → repeated-block.98cf3e1d.js} +2 -2
- package/lib/node/scripts/init-editing.d.ts +1 -0
- package/package.json +1 -1
- package/lib/browser/block-wrapper.3372ead3.cjs +0 -1
- package/lib/browser/block-wrapper.684870c2.js +0 -56
- package/lib/browser/get-block-actions.786a0830.cjs +0 -1
- package/lib/browser/index.caecdbca.cjs +0 -156
- package/lib/edge/block-wrapper.c2e6a717.js +0 -55
- package/lib/edge/block-wrapper.e35eb0ba.cjs +0 -1
- package/lib/edge/get-block-actions.59e642f2.js +0 -84
- package/lib/edge/get-block-actions.c4334ce2.cjs +0 -1
- package/lib/node/block-wrapper.20c333af.js +0 -56
- package/lib/node/block-wrapper.498bd360.cjs +0 -1
- package/lib/node/get-block-actions.9542f4f9.js +0 -84
- package/lib/node/get-block-actions.c427b339.cjs +0 -1
- package/lib/node/index.52366dfd.cjs +0 -196
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, mergeProps, toHandlers, toDisplayString, defineAsyncComponent, resolveComponent, Fragment as Fragment$1, createVNode, createBlock,
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, mergeProps, toHandlers, toDisplayString, defineAsyncComponent, resolveComponent, Fragment as Fragment$1, createVNode, createBlock, withCtx, renderList, createCommentVNode, resolveDynamicComponent, renderSlot, h, createElementVNode, normalizeStyle, normalizeClass, markRaw } from "vue";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
function filterAttrs(e = {}, t, n) {
|
|
4
4
|
const o = {};
|
|
@@ -15,17 +15,6 @@ const _sfc_main$k = defineComponent({
|
|
|
15
15
|
props: ["attributes", "text", "link", "openLinkInNewTab"],
|
|
16
16
|
data() {
|
|
17
17
|
return { filterAttrs };
|
|
18
|
-
},
|
|
19
|
-
methods: {
|
|
20
|
-
_classStringToObject(e) {
|
|
21
|
-
const t = {};
|
|
22
|
-
if (typeof e != "string")
|
|
23
|
-
return t;
|
|
24
|
-
const n = e.trim().split(/\s+/);
|
|
25
|
-
for (const o of n)
|
|
26
|
-
t[o] = !0;
|
|
27
|
-
return t;
|
|
28
|
-
}
|
|
29
18
|
}
|
|
30
19
|
}), button_vue_vue_type_style_index_0_scoped_becdf225_lang = "", _export_sfc = (e, t) => {
|
|
31
20
|
const n = e.__vccOpts || e;
|
|
@@ -42,7 +31,7 @@ function _sfc_render$i(e, t, n, o, r, i) {
|
|
|
42
31
|
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), toDisplayString(e.text), 17, _hoisted_1$6)) : (openBlock(), createElementBlock("button", mergeProps({
|
|
43
32
|
key: 1,
|
|
44
33
|
style: e.attributes.style,
|
|
45
|
-
class: e.
|
|
34
|
+
class: e.attributes.class + " button-21azgz5avex"
|
|
46
35
|
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), toDisplayString(e.text), 17));
|
|
47
36
|
}
|
|
48
37
|
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$i], ["__scopeId", "data-v-becdf225"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/blocks/button/button.vue"]]), key$1 = Symbol(), BuilderContext = {
|
|
@@ -355,7 +344,7 @@ function getProcessedBlock({
|
|
|
355
344
|
context: t
|
|
356
345
|
}) : s;
|
|
357
346
|
}
|
|
358
|
-
const
|
|
347
|
+
const getComponent = ({
|
|
359
348
|
block: e,
|
|
360
349
|
context: t,
|
|
361
350
|
registeredComponents: n
|
|
@@ -410,22 +399,22 @@ const EMPTY_HTML_ELEMENTS = ["area", "base", "br", "col", "embed", "hr", "img",
|
|
|
410
399
|
},
|
|
411
400
|
block: o
|
|
412
401
|
}));
|
|
413
|
-
}, BlockStyles = () => import("./block-styles.
|
|
402
|
+
}, BlockStyles = () => import("./block-styles.136d6f08.js").then((e) => e.default).catch((e) => {
|
|
414
403
|
throw console.error(
|
|
415
404
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
416
405
|
e
|
|
417
406
|
), e;
|
|
418
|
-
}), BlockWrapper = () => import("./block-wrapper.
|
|
407
|
+
}), BlockWrapper = () => import("./block-wrapper.18e00652.js").then((e) => e.default).catch((e) => {
|
|
419
408
|
throw console.error(
|
|
420
409
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
421
410
|
e
|
|
422
411
|
), e;
|
|
423
|
-
}), ComponentRef = () => import("./component-ref.
|
|
412
|
+
}), ComponentRef = () => import("./component-ref.c1216d72.js").then((e) => e.default).catch((e) => {
|
|
424
413
|
throw console.error(
|
|
425
414
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
426
415
|
e
|
|
427
416
|
), e;
|
|
428
|
-
}), RepeatedBlock = () => import("./repeated-block.
|
|
417
|
+
}), RepeatedBlock = () => import("./repeated-block.98cf3e1d.js").then((e) => e.default).catch((e) => {
|
|
429
418
|
throw console.error(
|
|
430
419
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
431
420
|
e
|
|
@@ -435,12 +424,12 @@ const EMPTY_HTML_ELEMENTS = ["area", "base", "br", "col", "embed", "hr", "img",
|
|
|
435
424
|
components: {
|
|
436
425
|
BlockStyles: defineAsyncComponent(BlockStyles),
|
|
437
426
|
ComponentRef: defineAsyncComponent(ComponentRef),
|
|
438
|
-
|
|
439
|
-
|
|
427
|
+
RepeatedBlock: defineAsyncComponent(RepeatedBlock),
|
|
428
|
+
BlockWrapper: defineAsyncComponent(BlockWrapper)
|
|
440
429
|
},
|
|
441
430
|
props: ["block", "context", "registeredComponents"],
|
|
442
431
|
data() {
|
|
443
|
-
return { childrenContext: this.context
|
|
432
|
+
return { childrenContext: this.context };
|
|
444
433
|
},
|
|
445
434
|
computed: {
|
|
446
435
|
blockComponent() {
|
|
@@ -504,13 +493,13 @@ const EMPTY_HTML_ELEMENTS = ["area", "base", "br", "col", "embed", "hr", "img",
|
|
|
504
493
|
});
|
|
505
494
|
function _sfc_render$h(e, t, n, o, r, i) {
|
|
506
495
|
var u;
|
|
507
|
-
const s = resolveComponent("block-styles"), a = resolveComponent("
|
|
496
|
+
const s = resolveComponent("block-styles"), a = resolveComponent("component-ref"), c = resolveComponent("block", !0), l = resolveComponent("block-wrapper"), d = resolveComponent("repeated-block");
|
|
508
497
|
return e.canShowBlock ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
509
498
|
createVNode(s, {
|
|
510
499
|
block: e.block,
|
|
511
500
|
context: e.context
|
|
512
501
|
}, null, 8, ["block", "context"]),
|
|
513
|
-
(u = e.blockComponent) != null && u.noWrap ? (openBlock(), createBlock(
|
|
502
|
+
(u = e.blockComponent) != null && u.noWrap ? (openBlock(), createBlock(a, {
|
|
514
503
|
key: 1,
|
|
515
504
|
componentRef: e.componentRefProps.componentRef,
|
|
516
505
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -521,28 +510,19 @@ function _sfc_render$h(e, t, n, o, r, i) {
|
|
|
521
510
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
522
511
|
isInteractive: e.componentRefProps.isInteractive
|
|
523
512
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "builderBlock", "includeBlockProps", "isInteractive"])) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
524
|
-
e.
|
|
525
|
-
key: 0,
|
|
526
|
-
Wrapper: e.Tag,
|
|
527
|
-
block: e.processedBlock,
|
|
528
|
-
context: e.context,
|
|
529
|
-
hasChildren: !1
|
|
530
|
-
}, null, 8, ["Wrapper", "block", "context"])) : createCommentVNode("v-if", !0),
|
|
531
|
-
!e.isEmptyHtmlElement(e.Tag) && e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (p, m) => (openBlock(), createBlock(c, {
|
|
513
|
+
e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (p, m) => (openBlock(), createBlock(d, {
|
|
532
514
|
key: m,
|
|
533
515
|
repeatContext: p.context,
|
|
534
516
|
block: p.block,
|
|
535
517
|
registeredComponents: e.registeredComponents
|
|
536
|
-
}, null, 8, ["repeatContext", "block", "registeredComponents"]))), 128)) :
|
|
537
|
-
|
|
538
|
-
key: 2,
|
|
518
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents"]))), 128)) : (openBlock(), createBlock(l, {
|
|
519
|
+
key: 0,
|
|
539
520
|
Wrapper: e.Tag,
|
|
540
521
|
block: e.processedBlock,
|
|
541
|
-
context: e.context
|
|
542
|
-
hasChildren: !0
|
|
522
|
+
context: e.context
|
|
543
523
|
}, {
|
|
544
524
|
default: withCtx(() => [
|
|
545
|
-
createVNode(
|
|
525
|
+
createVNode(a, {
|
|
546
526
|
componentRef: e.componentRefProps.componentRef,
|
|
547
527
|
componentOptions: e.componentRefProps.componentOptions,
|
|
548
528
|
blockChildren: e.componentRefProps.blockChildren,
|
|
@@ -552,7 +532,7 @@ function _sfc_render$h(e, t, n, o, r, i) {
|
|
|
552
532
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
553
533
|
isInteractive: e.componentRefProps.isInteractive
|
|
554
534
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "builderBlock", "includeBlockProps", "isInteractive"]),
|
|
555
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (p, m) => (openBlock(), createBlock(
|
|
535
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (p, m) => (openBlock(), createBlock(c, {
|
|
556
536
|
key: p.id,
|
|
557
537
|
block: p,
|
|
558
538
|
context: e.childrenContext,
|
|
@@ -560,7 +540,7 @@ function _sfc_render$h(e, t, n, o, r, i) {
|
|
|
560
540
|
}, null, 8, ["block", "context", "registeredComponents"]))), 128))
|
|
561
541
|
]),
|
|
562
542
|
_: 1
|
|
563
|
-
}, 8, ["Wrapper", "block", "context"]))
|
|
543
|
+
}, 8, ["Wrapper", "block", "context"]))
|
|
564
544
|
], 64))
|
|
565
545
|
], 64)) : createCommentVNode("v-if", !0);
|
|
566
546
|
}
|
|
@@ -609,21 +589,12 @@ const Block = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$h
|
|
|
609
589
|
},
|
|
610
590
|
"*"
|
|
611
591
|
));
|
|
612
|
-
},
|
|
613
|
-
_classStringToObject(e) {
|
|
614
|
-
const t = {};
|
|
615
|
-
if (typeof e != "string")
|
|
616
|
-
return t;
|
|
617
|
-
const n = e.trim().split(/\s+/);
|
|
618
|
-
for (const o of n)
|
|
619
|
-
t[o] = !0;
|
|
620
|
-
return t;
|
|
621
592
|
}
|
|
622
593
|
}
|
|
623
594
|
}), blocksWrapper_vue_vue_type_style_index_0_scoped_1f8aab9f_lang = "";
|
|
624
595
|
function _sfc_render$g(e, t, n, o, r, i) {
|
|
625
596
|
return openBlock(), createBlock(resolveDynamicComponent(e.BlocksWrapper), mergeProps({
|
|
626
|
-
class: e.
|
|
597
|
+
class: e.className + " component-1k2igrjdg3x",
|
|
627
598
|
"builder-path": e.path,
|
|
628
599
|
"builder-parent-id": e.parent,
|
|
629
600
|
style: e.styleProp,
|
|
@@ -831,24 +802,13 @@ const Blocks = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$
|
|
|
831
802
|
return getSizesForBreakpoints(
|
|
832
803
|
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
833
804
|
)[e].max;
|
|
834
|
-
},
|
|
835
|
-
_classStringToObject(e) {
|
|
836
|
-
const t = {};
|
|
837
|
-
if (typeof e != "string")
|
|
838
|
-
return t;
|
|
839
|
-
const n = e.trim().split(/\s+/);
|
|
840
|
-
for (const o of n)
|
|
841
|
-
t[o] = !0;
|
|
842
|
-
return t;
|
|
843
805
|
}
|
|
844
806
|
}
|
|
845
807
|
}), columns_vue_vue_type_style_index_0_scoped_7be099dc_lang = "";
|
|
846
808
|
function _sfc_render$e(e, t, n, o, r, i) {
|
|
847
809
|
const s = resolveComponent("inlined-styles"), a = resolveComponent("blocks");
|
|
848
810
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
849
|
-
class: e.
|
|
850
|
-
`builder-columns ${e.builderBlock.id}-breakpoints div-16nol0lwi20`
|
|
851
|
-
),
|
|
811
|
+
class: `builder-columns ${e.builderBlock.id}-breakpoints div-16nol0lwi20`,
|
|
852
812
|
style: e.columnsCssVars
|
|
853
813
|
}, {}), [
|
|
854
814
|
e.TARGET !== "reactNative" ? (openBlock(), createBlock(s, {
|
|
@@ -956,17 +916,6 @@ const _sfc_main$d = defineComponent({
|
|
|
956
916
|
};
|
|
957
917
|
return this.aspectRatio ? e : void 0;
|
|
958
918
|
}
|
|
959
|
-
},
|
|
960
|
-
methods: {
|
|
961
|
-
_classStringToObject(e) {
|
|
962
|
-
const t = {};
|
|
963
|
-
if (typeof e != "string")
|
|
964
|
-
return t;
|
|
965
|
-
const n = e.trim().split(/\s+/);
|
|
966
|
-
for (const o of n)
|
|
967
|
-
t[o] = !0;
|
|
968
|
-
return t;
|
|
969
|
-
}
|
|
970
919
|
}
|
|
971
920
|
}), image_vue_vue_type_style_index_0_scoped_58ca75d1_lang = "", _hoisted_1$5 = ["srcset"], _hoisted_2$1 = ["alt", "role", "src", "srcset", "sizes"], _hoisted_3$1 = {
|
|
972
921
|
key: 2,
|
|
@@ -991,9 +940,7 @@ function _sfc_render$c(e, t, n, o, r, i) {
|
|
|
991
940
|
...e.aspectRatioCss
|
|
992
941
|
}),
|
|
993
942
|
class: normalizeClass(
|
|
994
|
-
e.
|
|
995
|
-
"builder-image" + (e.className ? " " + e.className : "") + " img-1be3j8m9ewb"
|
|
996
|
-
)
|
|
943
|
+
"builder-image" + (e.className ? " " + e.className : "") + " img-1be3j8m9ewb"
|
|
997
944
|
),
|
|
998
945
|
src: e.image,
|
|
999
946
|
srcset: e.srcSetToUse,
|
|
@@ -1459,27 +1406,12 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render
|
|
|
1459
1406
|
}
|
|
1460
1407
|
}
|
|
1461
1408
|
}
|
|
1462
|
-
},
|
|
1463
|
-
methods: {
|
|
1464
|
-
_classStringToObject(e) {
|
|
1465
|
-
const t = {};
|
|
1466
|
-
if (typeof e != "string")
|
|
1467
|
-
return t;
|
|
1468
|
-
const n = e.trim().split(/\s+/);
|
|
1469
|
-
for (const o of n)
|
|
1470
|
-
t[o] = !0;
|
|
1471
|
-
return t;
|
|
1472
|
-
}
|
|
1473
1409
|
}
|
|
1474
1410
|
}), _hoisted_1$4 = ["innerHTML"];
|
|
1475
1411
|
function _sfc_render$a(e, t, n, o, r, i) {
|
|
1476
1412
|
return openBlock(), createElementBlock("div", {
|
|
1477
1413
|
ref: "elementRef",
|
|
1478
|
-
class: normalizeClass(
|
|
1479
|
-
e._classStringToObject(
|
|
1480
|
-
"builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
|
|
1481
|
-
)
|
|
1482
|
-
),
|
|
1414
|
+
class: normalizeClass("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
|
|
1483
1415
|
innerHTML: e.code
|
|
1484
1416
|
}, null, 10, _hoisted_1$4);
|
|
1485
1417
|
}
|
|
@@ -2333,7 +2265,11 @@ async function fetchEntries(e) {
|
|
|
2333
2265
|
return logger.error("Error fetching data. ", t), null;
|
|
2334
2266
|
}
|
|
2335
2267
|
}
|
|
2336
|
-
const getAllContent = fetchEntries;
|
|
2268
|
+
const getAllContent = fetchEntries, DEFAULT_TRUSTED_HOSTS = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
2269
|
+
function isFromTrustedHost(e, t) {
|
|
2270
|
+
const n = new URL(t.origin), o = n.hostname;
|
|
2271
|
+
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
2272
|
+
}
|
|
2337
2273
|
function isPreviewing() {
|
|
2338
2274
|
return !isBrowser() || isEditing() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
2339
2275
|
}
|
|
@@ -2521,7 +2457,7 @@ const findParentElement = (e, t, n = !0) => {
|
|
|
2521
2457
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2522
2458
|
}
|
|
2523
2459
|
};
|
|
2524
|
-
}, SDK_VERSION = "0.12.
|
|
2460
|
+
}, SDK_VERSION = "0.12.2", registry = {};
|
|
2525
2461
|
function register(e, t) {
|
|
2526
2462
|
let n = registry[e];
|
|
2527
2463
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
@@ -2579,40 +2515,43 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2579
2515
|
data: {
|
|
2580
2516
|
options: e
|
|
2581
2517
|
}
|
|
2582
|
-
}, "*"), window.addEventListener("message", ({
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2518
|
+
}, "*"), window.addEventListener("message", (o) => {
|
|
2519
|
+
var i, s;
|
|
2520
|
+
if (!isFromTrustedHost(e.trustedHosts, o))
|
|
2521
|
+
return;
|
|
2522
|
+
const {
|
|
2523
|
+
data: r
|
|
2524
|
+
} = o;
|
|
2525
|
+
if (!!(r != null && r.type))
|
|
2526
|
+
switch (r.type) {
|
|
2588
2527
|
case "builder.evaluate": {
|
|
2589
|
-
const
|
|
2590
|
-
let
|
|
2528
|
+
const a = r.data.text, c = r.data.arguments || [], l = r.data.id, d = new Function(a);
|
|
2529
|
+
let u, p = null;
|
|
2591
2530
|
try {
|
|
2592
|
-
|
|
2593
|
-
} catch (
|
|
2594
|
-
|
|
2531
|
+
u = d.apply(null, c);
|
|
2532
|
+
} catch (m) {
|
|
2533
|
+
p = m;
|
|
2595
2534
|
}
|
|
2596
|
-
|
|
2535
|
+
p ? (i = window.parent) == null || i.postMessage({
|
|
2597
2536
|
type: "builder.evaluateError",
|
|
2598
2537
|
data: {
|
|
2599
|
-
id:
|
|
2600
|
-
error:
|
|
2538
|
+
id: l,
|
|
2539
|
+
error: p.message
|
|
2601
2540
|
}
|
|
2602
|
-
}, "*") :
|
|
2603
|
-
var
|
|
2604
|
-
(
|
|
2541
|
+
}, "*") : u && typeof u.then == "function" ? u.then((m) => {
|
|
2542
|
+
var f;
|
|
2543
|
+
(f = window.parent) == null || f.postMessage({
|
|
2605
2544
|
type: "builder.evaluateResult",
|
|
2606
2545
|
data: {
|
|
2607
|
-
id:
|
|
2608
|
-
result:
|
|
2546
|
+
id: l,
|
|
2547
|
+
result: m
|
|
2609
2548
|
}
|
|
2610
2549
|
}, "*");
|
|
2611
|
-
}).catch(console.error) : (
|
|
2550
|
+
}).catch(console.error) : (s = window.parent) == null || s.postMessage({
|
|
2612
2551
|
type: "builder.evaluateResult",
|
|
2613
2552
|
data: {
|
|
2614
|
-
result:
|
|
2615
|
-
id:
|
|
2553
|
+
result: u,
|
|
2554
|
+
id: l
|
|
2616
2555
|
}
|
|
2617
2556
|
}, "*");
|
|
2618
2557
|
break;
|
|
@@ -2624,6 +2563,7 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2624
2563
|
props: [
|
|
2625
2564
|
"builderContextSignal",
|
|
2626
2565
|
"contentWrapper",
|
|
2566
|
+
"trustedHosts",
|
|
2627
2567
|
"model",
|
|
2628
2568
|
"context",
|
|
2629
2569
|
"canTrack",
|
|
@@ -2796,6 +2736,8 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2796
2736
|
},
|
|
2797
2737
|
processMessage(e) {
|
|
2798
2738
|
var n;
|
|
2739
|
+
if (!isFromTrustedHost(this.trustedHosts, e))
|
|
2740
|
+
return;
|
|
2799
2741
|
const { data: t } = e;
|
|
2800
2742
|
if (t)
|
|
2801
2743
|
switch (t.type) {
|
|
@@ -2906,6 +2848,9 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2906
2848
|
} : {},
|
|
2907
2849
|
...this.enrich ? {
|
|
2908
2850
|
enrich: this.enrich
|
|
2851
|
+
} : {},
|
|
2852
|
+
...this.trustedHosts ? {
|
|
2853
|
+
trustedHosts: this.trustedHosts
|
|
2909
2854
|
} : {}
|
|
2910
2855
|
}), Object.values(
|
|
2911
2856
|
this.builderContextSignal.componentInfos
|
|
@@ -2929,15 +2874,6 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2929
2874
|
}).then((i) => {
|
|
2930
2875
|
i && this.mergeNewContent(i);
|
|
2931
2876
|
});
|
|
2932
|
-
},
|
|
2933
|
-
_classStringToObject(e) {
|
|
2934
|
-
const t = {};
|
|
2935
|
-
if (typeof e != "string")
|
|
2936
|
-
return t;
|
|
2937
|
-
const n = e.trim().split(/\s+/);
|
|
2938
|
-
for (const o of n)
|
|
2939
|
-
t[o] = !0;
|
|
2940
|
-
return t;
|
|
2941
2877
|
}
|
|
2942
2878
|
}
|
|
2943
2879
|
});
|
|
@@ -2949,9 +2885,7 @@ function _sfc_render$4(e, t, n, o, r, i) {
|
|
|
2949
2885
|
onClick: (l) => e.onClick(l),
|
|
2950
2886
|
"builder-content-id": (s = e.builderContextSignal.content) == null ? void 0 : s.id,
|
|
2951
2887
|
"builder-model": e.model,
|
|
2952
|
-
class: e.
|
|
2953
|
-
`variant-${((a = e.content) == null ? void 0 : a.testVariationId) || ((c = e.content) == null ? void 0 : c.id)}`
|
|
2954
|
-
),
|
|
2888
|
+
class: `variant-${((a = e.content) == null ? void 0 : a.testVariationId) || ((c = e.content) == null ? void 0 : c.id)}`,
|
|
2955
2889
|
onIniteditingbldr: (l) => e.elementRef_onIniteditingbldr(l),
|
|
2956
2890
|
onInitpreviewingbldr: (l) => e.elementRef_onInitpreviewingbldr(l)
|
|
2957
2891
|
}, {
|
|
@@ -3088,6 +3022,7 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
3088
3022
|
"showContent",
|
|
3089
3023
|
"contentWrapper",
|
|
3090
3024
|
"contentWrapperProps",
|
|
3025
|
+
"trustedHosts",
|
|
3091
3026
|
"isSsrAbTest"
|
|
3092
3027
|
],
|
|
3093
3028
|
data() {
|
|
@@ -3173,7 +3108,8 @@ function _sfc_render$2(e, t, n, o, r, i) {
|
|
|
3173
3108
|
showContent: e.showContent,
|
|
3174
3109
|
builderContextSignal: e.builderContextSignal,
|
|
3175
3110
|
contentWrapper: e.contentWrapper,
|
|
3176
|
-
contentWrapperProps: e.contentWrapperProps
|
|
3111
|
+
contentWrapperProps: e.contentWrapperProps,
|
|
3112
|
+
trustedHosts: e.trustedHosts
|
|
3177
3113
|
}, {}), {
|
|
3178
3114
|
default: withCtx(() => {
|
|
3179
3115
|
var d, u, p, m, f, b, y;
|
|
@@ -3196,7 +3132,7 @@ function _sfc_render$2(e, t, n, o, r, i) {
|
|
|
3196
3132
|
];
|
|
3197
3133
|
}),
|
|
3198
3134
|
_: 1
|
|
3199
|
-
}, 16, ["content", "data", "model", "context", "apiKey", "canTrack", "locale", "includeRefs", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps"]);
|
|
3135
|
+
}, 16, ["content", "data", "model", "context", "apiKey", "canTrack", "locale", "includeRefs", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "trustedHosts"]);
|
|
3200
3136
|
}
|
|
3201
3137
|
const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/content/content.vue"]]), _sfc_main$1 = defineComponent({
|
|
3202
3138
|
name: "content-variants",
|
|
@@ -3221,7 +3157,8 @@ const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _s
|
|
|
3221
3157
|
"blocksWrapper",
|
|
3222
3158
|
"blocksWrapperProps",
|
|
3223
3159
|
"contentWrapper",
|
|
3224
|
-
"contentWrapperProps"
|
|
3160
|
+
"contentWrapperProps",
|
|
3161
|
+
"trustedHosts"
|
|
3225
3162
|
],
|
|
3226
3163
|
data() {
|
|
3227
3164
|
return {
|
|
@@ -3295,8 +3232,9 @@ function _sfc_render$1(e, t, n, o, r, i) {
|
|
|
3295
3232
|
blocksWrapper: e.blocksWrapper,
|
|
3296
3233
|
blocksWrapperProps: e.blocksWrapperProps,
|
|
3297
3234
|
contentWrapper: e.contentWrapper,
|
|
3298
|
-
contentWrapperProps: e.contentWrapperProps
|
|
3299
|
-
|
|
3235
|
+
contentWrapperProps: e.contentWrapperProps,
|
|
3236
|
+
trustedHosts: e.trustedHosts
|
|
3237
|
+
}, null, 8, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"]))), 128))
|
|
3300
3238
|
], 64)) : createCommentVNode("v-if", !0),
|
|
3301
3239
|
createVNode(c, mergeProps({
|
|
3302
3240
|
content: e.defaultContent,
|
|
@@ -3315,10 +3253,11 @@ function _sfc_render$1(e, t, n, o, r, i) {
|
|
|
3315
3253
|
blocksWrapper: e.blocksWrapper,
|
|
3316
3254
|
blocksWrapperProps: e.blocksWrapperProps,
|
|
3317
3255
|
contentWrapper: e.contentWrapper,
|
|
3318
|
-
contentWrapperProps: e.contentWrapperProps
|
|
3256
|
+
contentWrapperProps: e.contentWrapperProps,
|
|
3257
|
+
trustedHosts: e.trustedHosts
|
|
3319
3258
|
}, {
|
|
3320
3259
|
key: e.shouldRenderVariants.toString()
|
|
3321
|
-
}), null, 16, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps"])
|
|
3260
|
+
}), null, 16, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
3322
3261
|
], 64);
|
|
3323
3262
|
}
|
|
3324
3263
|
const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/content-variants/content-variants.vue"]]), fetchSymbolContent = async ({
|
|
@@ -3369,7 +3308,7 @@ const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render
|
|
|
3369
3308
|
className() {
|
|
3370
3309
|
var e, t;
|
|
3371
3310
|
return [
|
|
3372
|
-
|
|
3311
|
+
this.attributes.class,
|
|
3373
3312
|
"builder-symbol",
|
|
3374
3313
|
(e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
3375
3314
|
((t = this.symbol) == null ? void 0 : t.dynamic) || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -3389,24 +3328,13 @@ const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render
|
|
|
3389
3328
|
}).then((e) => {
|
|
3390
3329
|
e && (this.contentToUse = e);
|
|
3391
3330
|
});
|
|
3392
|
-
},
|
|
3393
|
-
_classStringToObject(e) {
|
|
3394
|
-
const t = {};
|
|
3395
|
-
if (typeof e != "string")
|
|
3396
|
-
return t;
|
|
3397
|
-
const n = e.trim().split(/\s+/);
|
|
3398
|
-
for (const o of n)
|
|
3399
|
-
t[o] = !0;
|
|
3400
|
-
return t;
|
|
3401
3331
|
}
|
|
3402
3332
|
}
|
|
3403
3333
|
});
|
|
3404
3334
|
function _sfc_render(e, t, n, o, r, i) {
|
|
3405
3335
|
var a, c, l, d, u;
|
|
3406
3336
|
const s = resolveComponent("content-variants");
|
|
3407
|
-
return openBlock(), createElementBlock("div", mergeProps({
|
|
3408
|
-
class: e._classStringToObject(e.className)
|
|
3409
|
-
}, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3337
|
+
return openBlock(), createElementBlock("div", mergeProps({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3410
3338
|
createVNode(s, {
|
|
3411
3339
|
__isNestedRender: !0,
|
|
3412
3340
|
apiVersion: e.builderContext.apiVersion,
|