@builder.io/sdk-vue 1.0.23 → 1.0.25

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.
Files changed (116) hide show
  1. package/README.md +1 -1
  2. package/lib/browser/{block-styles-vJjDjr-p.cjs → block-styles-TOjks1KV.cjs} +1 -1
  3. package/lib/browser/{block-styles-dCtjVM33.js → block-styles-VucTuDWS.js} +1 -1
  4. package/lib/browser/{block-wrapper--ZdEHV8w.cjs → block-wrapper-OMsQa5hi.cjs} +1 -1
  5. package/lib/browser/{block-wrapper-JRsL0Mr2.js → block-wrapper-PSbhfk7Q.js} +3 -3
  6. package/lib/browser/blocks/button/button.vue.d.ts +9 -2
  7. package/lib/browser/blocks/columns/columns.types.d.ts +1 -1
  8. package/lib/browser/blocks/columns/columns.vue.d.ts +10 -7
  9. package/lib/browser/blocks/columns/helpers.d.ts +1 -0
  10. package/lib/browser/blocks/symbol/symbol.vue.d.ts +2 -0
  11. package/lib/browser/blocks/tabs/component-info.d.ts +2 -0
  12. package/lib/browser/blocks/tabs/index.d.ts +1 -0
  13. package/lib/browser/blocks/tabs/tabs.types.d.ts +13 -0
  14. package/lib/browser/blocks/tabs/tabs.vue.d.ts +37 -0
  15. package/lib/browser/blocks/text/text.types.d.ts +2 -1
  16. package/lib/browser/component-ref-N6zY_dT6.cjs +1 -0
  17. package/lib/browser/component-ref-fp2vR2QJ.js +114 -0
  18. package/lib/browser/components/block/block.helpers.d.ts +4 -2
  19. package/lib/browser/components/block/components/interactive-element.vue.d.ts +6 -9
  20. package/lib/browser/components/content/components/enable-editor.vue.d.ts +11 -3
  21. package/lib/browser/components/content/components/styles.helpers.d.ts +1 -0
  22. package/lib/browser/components/content/content.vue.d.ts +3 -3
  23. package/lib/browser/components/dynamic-div.vue.d.ts +14 -0
  24. package/lib/browser/constants/sdk-version.d.ts +1 -1
  25. package/lib/browser/functions/evaluate/node-runtime/init.d.ts +17 -1
  26. package/lib/browser/functions/evaluate/node-runtime/node-runtime.d.ts +4 -1
  27. package/lib/browser/{get-block-properties-U49zKnMK.js → get-block-properties-a19LfOQA.js} +1 -1
  28. package/lib/browser/{get-block-properties-qdvSfWjS.cjs → get-block-properties-gBJL4NRb.cjs} +1 -1
  29. package/lib/browser/index-Nde8uRU0.cjs +166 -0
  30. package/lib/browser/{index-T89gD77O.js → index-buEOnV4i.js} +1109 -864
  31. package/lib/browser/index.cjs +1 -1
  32. package/lib/browser/index.js +1 -1
  33. package/lib/browser/{repeated-block-oYGHWwW3.js → repeated-block-CJGGYuy2.js} +2 -2
  34. package/lib/browser/{repeated-block-GnmpQPxE.cjs → repeated-block-KDWlk2Eu.cjs} +1 -1
  35. package/lib/browser/style.css +1 -1
  36. package/lib/browser/types/targets.d.ts +1 -1
  37. package/lib/edge/{block-styles-9nbFFeOH.cjs → block-styles-sqvAdjqJ.cjs} +1 -1
  38. package/lib/edge/{block-styles-nidJqmvF.js → block-styles-uRgD0InT.js} +1 -1
  39. package/lib/edge/{block-wrapper-7WuameoR.js → block-wrapper-q9GCekB1.js} +3 -3
  40. package/lib/{node/block-wrapper-a_fu1ViB.cjs → edge/block-wrapper-vF6xSOlT.cjs} +1 -1
  41. package/lib/edge/blocks/button/button.vue.d.ts +9 -2
  42. package/lib/edge/blocks/columns/columns.types.d.ts +1 -1
  43. package/lib/edge/blocks/columns/columns.vue.d.ts +10 -7
  44. package/lib/edge/blocks/columns/helpers.d.ts +1 -0
  45. package/lib/edge/blocks/symbol/symbol.vue.d.ts +2 -0
  46. package/lib/edge/blocks/tabs/component-info.d.ts +2 -0
  47. package/lib/edge/blocks/tabs/index.d.ts +1 -0
  48. package/lib/edge/blocks/tabs/tabs.types.d.ts +13 -0
  49. package/lib/edge/blocks/tabs/tabs.vue.d.ts +37 -0
  50. package/lib/edge/blocks/text/text.types.d.ts +2 -1
  51. package/lib/edge/component-ref-C_xxaolq.cjs +1 -0
  52. package/lib/edge/component-ref-GSX3hUTE.js +113 -0
  53. package/lib/edge/components/block/block.helpers.d.ts +4 -2
  54. package/lib/edge/components/block/components/interactive-element.vue.d.ts +6 -9
  55. package/lib/edge/components/content/components/enable-editor.vue.d.ts +11 -3
  56. package/lib/edge/components/content/components/styles.helpers.d.ts +1 -0
  57. package/lib/edge/components/content/content.vue.d.ts +3 -3
  58. package/lib/edge/components/dynamic-div.vue.d.ts +14 -0
  59. package/lib/edge/constants/sdk-version.d.ts +1 -1
  60. package/lib/edge/functions/evaluate/node-runtime/init.d.ts +17 -1
  61. package/lib/edge/functions/evaluate/node-runtime/node-runtime.d.ts +4 -1
  62. package/lib/edge/{get-block-properties-uUwzuzd6.js → get-block-properties--c5BLvuL.js} +1 -1
  63. package/lib/edge/{get-block-properties-hpLeBYvo.cjs → get-block-properties-PXCuNfSA.cjs} +1 -1
  64. package/lib/edge/{index-hIX7Gefu.js → index-2elTOk5W.js} +1667 -1422
  65. package/lib/edge/index-skxp2Ewn.cjs +186 -0
  66. package/lib/edge/index.cjs +1 -1
  67. package/lib/edge/index.js +1 -1
  68. package/lib/edge/{repeated-block-TT5biOEz.cjs → repeated-block-U4_8enXQ.cjs} +1 -1
  69. package/lib/edge/{repeated-block-otH5LpjC.js → repeated-block-YWOeWOGJ.js} +2 -2
  70. package/lib/edge/style.css +1 -1
  71. package/lib/edge/types/targets.d.ts +1 -1
  72. package/lib/node/{block-styles-4KxeWlDy.cjs → block-styles-Vbqn78RJ.cjs} +1 -1
  73. package/lib/node/{block-styles-FYc9WmuJ.js → block-styles-iBhjsABq.js} +1 -1
  74. package/lib/node/{block-wrapper-NWQoMvJs.js → block-wrapper-YZKm3LpK.js} +3 -3
  75. package/lib/{edge/block-wrapper-OitVCHV4.cjs → node/block-wrapper-rpKNd9vl.cjs} +1 -1
  76. package/lib/node/blocks/button/button.vue.d.ts +9 -2
  77. package/lib/node/blocks/columns/columns.types.d.ts +1 -1
  78. package/lib/node/blocks/columns/columns.vue.d.ts +10 -7
  79. package/lib/node/blocks/columns/helpers.d.ts +1 -0
  80. package/lib/node/blocks/symbol/symbol.vue.d.ts +2 -0
  81. package/lib/node/blocks/tabs/component-info.d.ts +2 -0
  82. package/lib/node/blocks/tabs/index.d.ts +1 -0
  83. package/lib/node/blocks/tabs/tabs.types.d.ts +13 -0
  84. package/lib/node/blocks/tabs/tabs.vue.d.ts +37 -0
  85. package/lib/node/blocks/text/text.types.d.ts +2 -1
  86. package/lib/node/component-ref-1NweYcUx.cjs +1 -0
  87. package/lib/node/component-ref-3OyOJABh.js +113 -0
  88. package/lib/node/components/block/block.helpers.d.ts +4 -2
  89. package/lib/node/components/block/components/interactive-element.vue.d.ts +6 -9
  90. package/lib/node/components/content/components/enable-editor.vue.d.ts +11 -3
  91. package/lib/node/components/content/components/styles.helpers.d.ts +1 -0
  92. package/lib/node/components/content/content.vue.d.ts +3 -3
  93. package/lib/node/components/dynamic-div.vue.d.ts +14 -0
  94. package/lib/node/constants/sdk-version.d.ts +1 -1
  95. package/lib/node/functions/evaluate/node-runtime/init.d.ts +17 -1
  96. package/lib/node/functions/evaluate/node-runtime/node-runtime.d.ts +4 -1
  97. package/lib/node/{get-block-properties-ddOPipN4.js → get-block-properties-HVClRTfg.js} +1 -1
  98. package/lib/node/{get-block-properties-DnPEkmGq.cjs → get-block-properties-roggPLLH.cjs} +1 -1
  99. package/lib/node/index-MaEGzpWl.cjs +213 -0
  100. package/lib/node/{index-Bc6eCrlT.js → index-t6-975XL.js} +601 -354
  101. package/lib/node/index.cjs +1 -1
  102. package/lib/node/index.js +1 -1
  103. package/lib/node/{repeated-block-sdoj-hCY.js → repeated-block-97rfq-8J.js} +2 -2
  104. package/lib/node/{repeated-block-W2kKB7D3.cjs → repeated-block-SwobyHB-.cjs} +1 -1
  105. package/lib/node/style.css +1 -1
  106. package/lib/node/types/targets.d.ts +1 -1
  107. package/package.json +1 -1
  108. package/lib/browser/component-ref-IfYzvEjh.js +0 -114
  109. package/lib/browser/component-ref-YU4cmBVZ.cjs +0 -1
  110. package/lib/browser/index-YYfrLt1V.cjs +0 -166
  111. package/lib/edge/component-ref-Z3GxM6cH.cjs +0 -1
  112. package/lib/edge/component-ref-fkgFjHYh.js +0 -113
  113. package/lib/edge/index-CKoC6tWI.cjs +0 -186
  114. package/lib/node/component-ref-jllHNOll.cjs +0 -1
  115. package/lib/node/component-ref-jqz9fyL1.js +0 -113
  116. package/lib/node/index-ixVpFh79.cjs +0 -213
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Builder.io Vue SDK
2
2
 
3
- This is the Builder Vue SDK. It is currently in beta.
3
+ This is Builder's Gen2 Vue SDK.
4
4
 
5
5
  ## Getting Started
6
6
 
@@ -1 +1 @@
1
- var b=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),e=require("./index-YYfrLt1V.cjs"),f=a.defineComponent({name:"block-styles",components:{InlinedStyles:e._sfc_main},props:["block","context"],data(){return{TARGET:e.TARGET}},computed:{canShowBlock(){const t=e.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0});return e.checkIsDefined(t.hide)?!t.hide:e.checkIsDefined(t.show)?t.show:!0},css(){var m,h,y;const t=e.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0}),s=t.responsiveStyles,c=this.context.content,r=e.getSizesForBreakpoints(((m=c==null?void 0:c.meta)==null?void 0:m.breakpoints)||{}),i=s==null?void 0:s.large,d=s==null?void 0:s.medium,l=s==null?void 0:s.small,n=t.id;if(!n)return"";const p=i?e.createCssClass({className:n,styles:i}):"",k=d?e.createCssClass({className:n,styles:d,mediaQuery:e.getMaxWidthQueryForSize("medium",r)}):"",C=l?e.createCssClass({className:n,styles:l,mediaQuery:e.getMaxWidthQueryForSize("small",r)}):"",o=t.animations&&t.animations.find(u=>u.trigger==="hover");let S="";if(o){const u=((y=(h=o.steps)==null?void 0:h[1])==null?void 0:y.styles)||{};S=e.createCssClass({className:`${n}:hover`,styles:{...u,transition:`all ${o.duration}s ${e.camelCaseToKebabCase(o.easing)}`,transitionDelay:o.delay?`${o.delay}s`:"0s"}})||""}return[p,k,C,S].join(" ")}}});function g(t,s,c,r,i,d){const l=a.resolveComponent("inlined-styles");return t.TARGET!=="reactNative"&&t.css&&t.canShowBlock?(a.openBlock(),a.createBlock(l,{key:0,id:"builderio-block",styles:t.css},null,8,["styles"])):a.createCommentVNode("",!0)}const x=e._export_sfc(f,[["render",g]]);exports.default=x;
1
+ var b=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),e=require("./index-Nde8uRU0.cjs"),f=a.defineComponent({name:"block-styles",components:{InlinedStyles:e._sfc_main},props:["block","context"],data(){return{TARGET:e.TARGET}},computed:{canShowBlock(){const t=e.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0});return e.checkIsDefined(t.hide)?!t.hide:e.checkIsDefined(t.show)?t.show:!0},css(){var m,h,y;const t=e.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0}),s=t.responsiveStyles,c=this.context.content,r=e.getSizesForBreakpoints(((m=c==null?void 0:c.meta)==null?void 0:m.breakpoints)||{}),i=s==null?void 0:s.large,d=s==null?void 0:s.medium,l=s==null?void 0:s.small,n=t.id;if(!n)return"";const p=i?e.createCssClass({className:n,styles:i}):"",k=d?e.createCssClass({className:n,styles:d,mediaQuery:e.getMaxWidthQueryForSize("medium",r)}):"",C=l?e.createCssClass({className:n,styles:l,mediaQuery:e.getMaxWidthQueryForSize("small",r)}):"",o=t.animations&&t.animations.find(u=>u.trigger==="hover");let S="";if(o){const u=((y=(h=o.steps)==null?void 0:h[1])==null?void 0:y.styles)||{};S=e.createCssClass({className:`${n}:hover`,styles:{...u,transition:`all ${o.duration}s ${e.camelCaseToKebabCase(o.easing)}`,transitionDelay:o.delay?`${o.delay}s`:"0s"}})||""}return[p,k,C,S].join(" ")}}});function g(t,s,c,r,i,d){const l=a.resolveComponent("inlined-styles");return t.TARGET!=="reactNative"&&t.css&&t.canShowBlock?(a.openBlock(),a.createBlock(l,{key:0,id:"builderio-block",styles:t.css},null,8,["styles"])):a.createCommentVNode("",!0)}const x=e._export_sfc(f,[["render",g]]);exports.default=x;
@@ -1,6 +1,6 @@
1
1
  import "./style.css";
2
2
  import { defineComponent as g, resolveComponent as B, openBlock as C, createBlock as v, createCommentVNode as _ } from "vue";
3
- import { _ as $, T, g as p, c as y, a as w, b as l, d as k, e as E, f as N } from "./index-T89gD77O.js";
3
+ import { _ as $, T, g as p, c as y, a as w, b as l, d as k, e as E, f as N } from "./index-buEOnV4i.js";
4
4
  const z = g({
5
5
  name: "block-styles",
6
6
  components: { InlinedStyles: $ },
@@ -1 +1 @@
1
- var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-qdvSfWjS.cjs"),n=require("./index-YYfrLt1V.cjs"),c=()=>Promise.resolve().then(()=>require("./index-YYfrLt1V.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),a=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(c)},props:["Wrapper","block","context"],data(){return{getBlockActions:o.getBlockActions,getBlockProperties:o.getBlockProperties}}});function i(e,l,p,d,m,u){const r=t.resolveComponent("dynamic-renderer");return t.openBlock(),t.createBlock(r,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes: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},8,["TagName","attributes","actionAttributes"])}const s=n._export_sfc(a,[["render",i]]);exports.default=s;
1
+ var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-gBJL4NRb.cjs"),n=require("./index-Nde8uRU0.cjs"),c=()=>Promise.resolve().then(()=>require("./index-Nde8uRU0.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),a=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(c)},props:["Wrapper","block","context"],data(){return{getBlockActions:o.getBlockActions,getBlockProperties:o.getBlockProperties}}});function i(e,l,p,d,m,u){const r=t.resolveComponent("dynamic-renderer");return t.openBlock(),t.createBlock(r,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes: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},8,["TagName","attributes","actionAttributes"])}const s=n._export_sfc(a,[["render",i]]);exports.default=s;
@@ -1,8 +1,8 @@
1
1
  import "./style.css";
2
2
  import { defineComponent as o, defineAsyncComponent as r, resolveComponent as n, openBlock as a, createBlock as c, withCtx as i, renderSlot as p } from "vue";
3
- import { g as s, a as l } from "./get-block-properties-U49zKnMK.js";
4
- import { f as m } from "./index-T89gD77O.js";
5
- const d = () => import("./index-T89gD77O.js").then((e) => e.G).then((e) => e.default).catch((e) => {
3
+ import { g as s, a as l } from "./get-block-properties-a19LfOQA.js";
4
+ import { f as m } from "./index-buEOnV4i.js";
5
+ const d = () => import("./index-buEOnV4i.js").then((e) => e.G).then((e) => e.default).catch((e) => {
6
6
  throw console.error(
7
7
  "Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
8
8
  e
@@ -6,9 +6,16 @@ declare const _default: import("vue").DefineComponent<Readonly<{
6
6
  openLinkInNewTab?: any;
7
7
  builderLinkComponent?: any;
8
8
  }>, unknown, {
9
- getClassPropName: () => "className" | "class";
10
9
  filterAttrs: typeof filterAttrs;
11
- }, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
10
+ }, {}, {
11
+ attrs(): {
12
+ href: any;
13
+ target: string | undefined;
14
+ role: string;
15
+ } | {
16
+ role: string;
17
+ };
18
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
12
19
  text?: any;
13
20
  link?: any;
14
21
  attributes?: any;
@@ -1,6 +1,6 @@
1
1
  import type { BuilderBlock } from '../../types/builder-block';
2
2
  import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from '../../types/builder-props';
3
- type Column = {
3
+ export type Column = {
4
4
  blocks: BuilderBlock[];
5
5
  width?: number;
6
6
  link?: string;
@@ -1,6 +1,6 @@
1
1
  import type { SizeName } from "../../constants/device-sizes";
2
- import { mapStyleObjToStrIfNeeded } from "../../functions/get-style";
3
2
  import type { Dictionary } from "../../types/typescript";
3
+ import type { Column } from "./columns.types";
4
4
  type CSSVal = string | number;
5
5
  declare const _default: import("vue").DefineComponent<Readonly<{
6
6
  builderContext?: any;
@@ -17,12 +17,9 @@ declare const _default: import("vue").DefineComponent<Readonly<{
17
17
  stackAt: any;
18
18
  flexDir: string;
19
19
  TARGET: import("../../types/targets").Target;
20
- getClassPropName: () => "className" | "class";
21
- mapStyleObjToStrIfNeeded: typeof mapStyleObjToStrIfNeeded;
22
- }, {
23
- columnsCssVars(): Dictionary<string>;
24
- columnsStyles(): string;
25
- }, {
20
+ getColumnsClass: (id?: string | undefined) => string;
21
+ }, {}, {
22
+ getTagName(column: Column): any;
26
23
  getWidth(index: number): any;
27
24
  getColumnCssWidth(index: number): string;
28
25
  getTabletStyle({ stackedStyle, desktopStyle, }: {
@@ -33,8 +30,14 @@ declare const _default: import("vue").DefineComponent<Readonly<{
33
30
  stackedStyle: CSSVal;
34
31
  desktopStyle: CSSVal;
35
32
  }): CSSVal;
33
+ columnsCssVars(): Dictionary<string>;
36
34
  columnCssVars(index: number): Dictionary<string>;
37
35
  getWidthForBreakpointSize(size: SizeName): number;
36
+ columnsStyles(): string;
37
+ getAttributes(column: any, index: number): {
38
+ style: string | Partial<CSSStyleDeclaration>;
39
+ href?: any;
40
+ };
38
41
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
39
42
  builderContext?: any;
40
43
  builderLinkComponent?: any;
@@ -0,0 +1 @@
1
+ export declare const getColumnsClass: (id?: string) => string;
@@ -11,6 +11,8 @@ declare const _default: import("vue").DefineComponent<Readonly<{
11
11
  contentToUse: any;
12
12
  filterAttrs: typeof filterAttrs;
13
13
  }, {
14
+ blocksWrapper(): "div";
15
+ contentWrapper(): "div";
14
16
  className(): string;
15
17
  onUpdateHook0(): {
16
18
  0: any;
@@ -0,0 +1,2 @@
1
+ import type { ComponentInfo } from '../../types/components';
2
+ export declare const componentInfo: ComponentInfo;
@@ -0,0 +1 @@
1
+ export { default } from './tabs.vue';
@@ -0,0 +1,13 @@
1
+ import type { BuilderBlock } from '../../types/builder-block';
2
+ import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from '../../types/builder-props';
3
+ export interface TabsProps extends BuilderComponentsProp, BuilderLinkComponentProp, BuilderDataProps {
4
+ tabs: {
5
+ label: BuilderBlock[];
6
+ content: BuilderBlock[];
7
+ }[];
8
+ builderBlock: BuilderBlock;
9
+ defaultActiveTab?: number;
10
+ collapsible?: boolean;
11
+ tabHeaderLayout?: 'center' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
12
+ activeTabStyle?: any;
13
+ }
@@ -0,0 +1,37 @@
1
+ declare const _default: import("vue").DefineComponent<Readonly<{
2
+ builderContext?: any;
3
+ builderLinkComponent?: any;
4
+ builderBlock?: any;
5
+ builderComponents?: any;
6
+ tabs?: any;
7
+ activeTabStyle?: any;
8
+ defaultActiveTab?: any;
9
+ collapsible?: any;
10
+ tabHeaderLayout?: any;
11
+ }>, unknown, {
12
+ activeTab: number;
13
+ }, {}, {
14
+ activeTabContent(active: number): any;
15
+ getActiveTabStyle(index: number): any;
16
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
17
+ builderContext?: any;
18
+ builderLinkComponent?: any;
19
+ builderBlock?: any;
20
+ builderComponents?: any;
21
+ tabs?: any;
22
+ activeTabStyle?: any;
23
+ defaultActiveTab?: any;
24
+ collapsible?: any;
25
+ tabHeaderLayout?: any;
26
+ }>>>, {
27
+ readonly builderContext?: any;
28
+ readonly builderLinkComponent?: any;
29
+ readonly builderBlock?: any;
30
+ readonly builderComponents?: any;
31
+ readonly tabs?: any;
32
+ readonly activeTabStyle?: any;
33
+ readonly defaultActiveTab?: any;
34
+ readonly collapsible?: any;
35
+ readonly tabHeaderLayout?: any;
36
+ }, {}>;
37
+ export default _default;
@@ -1,3 +1,4 @@
1
+ import type { BuilderDataProps } from '../../types/builder-props';
1
2
  export type TextProps = {
2
3
  text?: string;
3
- };
4
+ } & BuilderDataProps;
@@ -0,0 +1 @@
1
+ var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-Nde8uRU0.cjs"),a=require("./get-block-properties-gBJL4NRb.cjs"),u=t.defineComponent({name:"interactive-element",props:["includeBlockProps","block","context","wrapperProps","Wrapper"],computed:{attributes(){return this.includeBlockProps?{...a.getBlockProperties({block:this.block,context:this.context}),...a.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})}:{}}}});function d(e,o,p,s,n,i){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({attributes:e.attributes},e.wrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"])}const m=c._export_sfc(u,[["render",d]]),b=({componentOptions:e,builderBlock:o,context:p,componentRef:s,includeBlockProps:n,isInteractive:i,contextValue:l})=>{const r={...e,...n?{attributes:a.getBlockProperties({block:o,context:l})}:{}};return i?{Wrapper:s,block:o,context:p,wrapperProps:e,includeBlockProps:n}:r},f=t.defineComponent({name:"component-ref",components:{Block:c.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?c.wrapComponentRef(m):this.componentRef,getWrapperProps:b}}});function C(e,o,p,s,n,i){const l=t.resolveComponent("block");return e.componentRef?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.normalizeProps(t.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.blockChildren,(r,k)=>(t.openBlock(),t.createBlock(l,{key:r.id,block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):t.createCommentVNode("",!0)}const B=c._export_sfc(f,[["render",C]]);exports.default=B;
@@ -0,0 +1,114 @@
1
+ import "./style.css";
2
+ import { defineComponent as m, openBlock as r, createBlock as a, resolveDynamicComponent as k, mergeProps as u, withCtx as d, renderSlot as h, resolveComponent as P, normalizeProps as B, createElementBlock as g, Fragment as $, renderList as v, createCommentVNode as S } from "vue";
3
+ import { f, B as W, w } from "./index-buEOnV4i.js";
4
+ import { a as b, g as R } from "./get-block-properties-a19LfOQA.js";
5
+ const x = m({
6
+ name: "interactive-element",
7
+ props: ["includeBlockProps", "block", "context", "wrapperProps", "Wrapper"],
8
+ computed: {
9
+ attributes() {
10
+ return this.includeBlockProps ? {
11
+ ...b({
12
+ block: this.block,
13
+ context: this.context
14
+ }),
15
+ ...R({
16
+ block: this.block,
17
+ rootState: this.context.rootState,
18
+ rootSetState: this.context.rootSetState,
19
+ localState: this.context.localState,
20
+ context: this.context.context
21
+ })
22
+ } : {};
23
+ }
24
+ }
25
+ });
26
+ function I(e, t, p, s, o, c) {
27
+ return r(), a(k(e.Wrapper), u({ attributes: e.attributes }, e.wrapperProps), {
28
+ default: d(() => [
29
+ h(e.$slots, "default")
30
+ ]),
31
+ _: 3
32
+ }, 16, ["attributes"]);
33
+ }
34
+ const l = /* @__PURE__ */ f(x, [["render", I]]), E = ({
35
+ componentOptions: e,
36
+ builderBlock: t,
37
+ context: p,
38
+ componentRef: s,
39
+ includeBlockProps: o,
40
+ isInteractive: c,
41
+ contextValue: i
42
+ }) => {
43
+ const n = {
44
+ ...e,
45
+ /**
46
+ * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
47
+ * component itself directly. Otherwise, they are provided to the wrapper element.
48
+ */
49
+ ...o ? {
50
+ attributes: b({
51
+ block: t,
52
+ context: i
53
+ })
54
+ } : {}
55
+ };
56
+ return c ? {
57
+ Wrapper: s,
58
+ block: t,
59
+ context: p,
60
+ wrapperProps: e,
61
+ includeBlockProps: o
62
+ } : n;
63
+ }, y = m({
64
+ name: "component-ref",
65
+ components: { Block: W, InteractiveElement: l },
66
+ props: [
67
+ "isInteractive",
68
+ "componentRef",
69
+ "componentOptions",
70
+ "builderBlock",
71
+ "context",
72
+ "linkComponent",
73
+ "includeBlockProps",
74
+ "blockChildren",
75
+ "registeredComponents"
76
+ ],
77
+ data() {
78
+ return {
79
+ Wrapper: this.isInteractive ? w(l) : this.componentRef,
80
+ getWrapperProps: E
81
+ };
82
+ }
83
+ });
84
+ function A(e, t, p, s, o, c) {
85
+ const i = P("block");
86
+ return e.componentRef ? (r(), a(k(e.Wrapper), B(u(
87
+ { key: 0 },
88
+ e.getWrapperProps({
89
+ componentOptions: e.componentOptions,
90
+ builderBlock: e.builderBlock,
91
+ context: e.context,
92
+ componentRef: e.componentRef,
93
+ linkComponent: e.linkComponent,
94
+ includeBlockProps: e.includeBlockProps,
95
+ isInteractive: e.isInteractive,
96
+ contextValue: e.context
97
+ })
98
+ )), {
99
+ default: d(() => [
100
+ (r(!0), g($, null, v(e.blockChildren, (n, C) => (r(), a(i, {
101
+ key: n.id,
102
+ block: n,
103
+ context: e.context,
104
+ registeredComponents: e.registeredComponents,
105
+ linkComponent: e.linkComponent
106
+ }, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128))
107
+ ]),
108
+ _: 1
109
+ }, 16)) : S("", !0);
110
+ }
111
+ const F = /* @__PURE__ */ f(y, [["render", A]]);
112
+ export {
113
+ F as default
114
+ };
@@ -1,11 +1,11 @@
1
- import type { BuilderContextInterface, RegisteredComponents } from '../../context/types';
1
+ import type { BuilderContextInterface, RegisteredComponent, RegisteredComponents } from '../../context/types';
2
2
  import type { BuilderBlock } from '../../types/builder-block';
3
3
  import type { RepeatData } from './types';
4
4
  export declare const getComponent: ({ block, context, registeredComponents }: {
5
5
  block: BuilderBlock;
6
6
  context: BuilderContextInterface;
7
7
  registeredComponents: RegisteredComponents;
8
- }) => import("../../context/types").RegisteredComponent | null | undefined;
8
+ }) => RegisteredComponent | null | undefined;
9
9
  export declare const getRepeatItemData: ({ block, context }: {
10
10
  block: BuilderBlock;
11
11
  context: BuilderContextInterface;
@@ -14,3 +14,5 @@ export declare const getInheritedStyles: ({ block, context }: {
14
14
  block: BuilderBlock;
15
15
  context: BuilderContextInterface;
16
16
  }) => Partial<CSSStyleDeclaration>;
17
+ export declare const shouldPassLinkComponent: (block: RegisteredComponent | null | undefined) => boolean | null | undefined;
18
+ export declare const shouldPassRegisteredComponents: (block: RegisteredComponent | null | undefined) => boolean | null | undefined;
@@ -1,6 +1,4 @@
1
1
  import type { BuilderContextInterface } from "../../../context/types";
2
- import { getBlockActions } from "../../../functions/get-block-actions";
3
- import { getBlockProperties } from "../../../functions/get-block-properties";
4
2
  import type { BuilderBlock } from "../../../types/builder-block";
5
3
  import type { Dictionary } from "../../../types/typescript";
6
4
  export type InteractiveElementProps = {
@@ -14,23 +12,22 @@ export type InteractiveElementProps = {
14
12
  declare const _default: import("vue").DefineComponent<Readonly<{
15
13
  context?: any;
16
14
  block?: any;
17
- wrapperProps?: any;
18
15
  includeBlockProps?: any;
16
+ wrapperProps?: any;
19
17
  Wrapper?: any;
20
- }>, unknown, {
21
- getBlockActions: typeof getBlockActions;
22
- getBlockProperties: typeof getBlockProperties;
23
- }, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
18
+ }>, unknown, unknown, {
19
+ attributes(): {};
20
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
24
21
  context?: any;
25
22
  block?: any;
26
- wrapperProps?: any;
27
23
  includeBlockProps?: any;
24
+ wrapperProps?: any;
28
25
  Wrapper?: any;
29
26
  }>>>, {
30
27
  readonly context?: any;
31
28
  readonly block?: any;
32
- readonly wrapperProps?: any;
33
29
  readonly includeBlockProps?: any;
30
+ readonly wrapperProps?: any;
34
31
  readonly Wrapper?: any;
35
32
  }, {}>;
36
33
  export default _default;
@@ -11,8 +11,8 @@ declare const _default: import("vue").DefineComponent<Readonly<{
11
11
  enrich?: any;
12
12
  trustedHosts?: any;
13
13
  model?: any;
14
- contentWrapper?: any;
15
14
  showContent?: any;
15
+ contentWrapper?: any;
16
16
  contentWrapperProps?: any;
17
17
  }>, unknown, {
18
18
  ContentWrapper: any;
@@ -35,7 +35,15 @@ declare const _default: import("vue").DefineComponent<Readonly<{
35
35
  };
36
36
  key: symbol;
37
37
  };
38
+ getWrapperClassName: (variationId?: string | undefined) => string;
38
39
  }, {
40
+ showContentProps(): {
41
+ hidden?: undefined;
42
+ "aria-hidden"?: undefined;
43
+ } | {
44
+ hidden: boolean;
45
+ "aria-hidden": boolean;
46
+ };
39
47
  onUpdateHook0(): {
40
48
  0: any;
41
49
  };
@@ -75,8 +83,8 @@ declare const _default: import("vue").DefineComponent<Readonly<{
75
83
  enrich?: any;
76
84
  trustedHosts?: any;
77
85
  model?: any;
78
- contentWrapper?: any;
79
86
  showContent?: any;
87
+ contentWrapper?: any;
80
88
  contentWrapperProps?: any;
81
89
  }>>>, {
82
90
  readonly data?: any;
@@ -89,8 +97,8 @@ declare const _default: import("vue").DefineComponent<Readonly<{
89
97
  readonly enrich?: any;
90
98
  readonly trustedHosts?: any;
91
99
  readonly model?: any;
92
- readonly contentWrapper?: any;
93
100
  readonly showContent?: any;
101
+ readonly contentWrapper?: any;
94
102
  readonly contentWrapperProps?: any;
95
103
  }, {}>;
96
104
  export default _default;
@@ -14,3 +14,4 @@ export declare const getCss: ({ cssCode, contentId }: {
14
14
  contentId?: string | undefined;
15
15
  }) => string;
16
16
  export declare const getDefaultStyles: (isNested: boolean | undefined) => "" | "\n.builder-button {\n all: unset;\n}\n\n.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {\n margin: 0;\n}\n.builder-text > p, .builder-text > .builder-paragraph {\n color: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n font-weight: inherit;\n font-size: inherit;\n text-align: inherit;\n font-family: inherit;\n}\n";
17
+ export declare const getWrapperClassName: (variationId?: string) => string;
@@ -14,8 +14,8 @@ declare const _default: import("vue").DefineComponent<Readonly<{
14
14
  enrich?: any;
15
15
  trustedHosts?: any;
16
16
  model?: any;
17
- contentWrapper?: any;
18
17
  showContent?: any;
18
+ contentWrapper?: any;
19
19
  contentWrapperProps?: any;
20
20
  isNestedRender?: any;
21
21
  customComponents?: any;
@@ -55,8 +55,8 @@ declare const _default: import("vue").DefineComponent<Readonly<{
55
55
  enrich?: any;
56
56
  trustedHosts?: any;
57
57
  model?: any;
58
- contentWrapper?: any;
59
58
  showContent?: any;
59
+ contentWrapper?: any;
60
60
  contentWrapperProps?: any;
61
61
  isNestedRender?: any;
62
62
  customComponents?: any;
@@ -75,8 +75,8 @@ declare const _default: import("vue").DefineComponent<Readonly<{
75
75
  readonly enrich?: any;
76
76
  readonly trustedHosts?: any;
77
77
  readonly model?: any;
78
- readonly contentWrapper?: any;
79
78
  readonly showContent?: any;
79
+ readonly contentWrapper?: any;
80
80
  readonly contentWrapperProps?: any;
81
81
  readonly isNestedRender?: any;
82
82
  readonly customComponents?: any;
@@ -0,0 +1,14 @@
1
+ export interface DynamicDivProps {
2
+ children?: any;
3
+ attributes: any;
4
+ actionAttributes: any;
5
+ BlockWrapperProps: any;
6
+ builderPath: any;
7
+ builderParentId: any;
8
+ BlocksWrapperProps: any;
9
+ contentWrapperProps: any;
10
+ builderModel: any;
11
+ ref: any;
12
+ }
13
+ declare const _default: import("vue").DefineComponent<Readonly<{}>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{}>>>, {}, {}>;
14
+ export default _default;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.23";
1
+ export declare const SDK_VERSION = "1.0.25";
@@ -1,3 +1,17 @@
1
+ /**
2
+ * This file:
3
+ * - imports `isolated-vm`, which can only be made from a file that never runs
4
+ * on the client (e.g. Next's `_document.tsx`)
5
+ * - stores the ivm instance in a global variable using `setIvm`
6
+ *
7
+ * This is needed for when bundlers/meta-frameworks are not able to reliably
8
+ * import the `isolated-vm` package using our `safeDynamicRequire` trick.
9
+ *
10
+ * The `isolated-vm` import must exist in this separate file, or it will end up
11
+ * in the SDK's main entry point, causing errors for users.
12
+ */
13
+ import ivm from 'isolated-vm';
14
+ import type { IsolateOptions } from 'isolated-vm';
1
15
  /**
2
16
  * This function initializes the SDK on a Node server. It handles importing the
3
17
  * `isolated-vm` package which is needed for dynamic bindings.
@@ -7,4 +21,6 @@
7
21
  * - The NextJS Pages router's `_document.tsx`
8
22
  * - Your Remix route's `loader`
9
23
  */
10
- export declare const initializeNodeRuntime: () => void;
24
+ export declare const initializeNodeRuntime: ({ ivmIsolateOptions }: {
25
+ ivmIsolateOptions?: ivm.IsolateOptions | undefined;
26
+ }) => void;
@@ -1,8 +1,11 @@
1
+ import type { IsolateOptions } from 'isolated-vm';
1
2
  import type { ExecutorArgs } from '../helpers';
3
+ type IsolatedVMImport = typeof import('isolated-vm');
2
4
  /**
3
5
  * Set the `isolated-vm` instance to be used by the node runtime.
4
6
  * This is useful for environments that are not able to rely on our
5
7
  * `safeDynamicRequire` trick to import the `isolated-vm` package.
6
8
  */
7
- export declare const setIvm: (ivm: typeof import('isolated-vm')) => void;
9
+ export declare const setIvm: (ivm: IsolatedVMImport, options?: IsolateOptions) => void;
8
10
  export declare const runInNode: ({ code, builder, context, event, localState, rootSetState, rootState }: ExecutorArgs) => any;
11
+ export {};
@@ -1,5 +1,5 @@
1
1
  import "./style.css";
2
- import { h as s, T as c, i, j as l } from "./index-T89gD77O.js";
2
+ import { h as s, T as c, i, j as l } from "./index-buEOnV4i.js";
3
3
  const p = (e) => `v-on:${e.toLowerCase()}`, u = (e, t) => (r) => s({
4
4
  code: e,
5
5
  context: t.context,
@@ -1 +1 @@
1
- var d=require("./style.css");const a=require("./index-YYfrLt1V.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>a.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1,enableCache:!0});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const s=r[o];let n=c(o);if(e.stripPrefix)switch(a.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(s,e)}return t}function u({properties:e}){return e}const p=e=>({href:e.href});function f({block:e,context:t}){var o;const r={...p(e),...e.properties,"builder-id":e.id,style:a.getStyle({block:e,context:t}),[a.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return u({properties:r,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=f;
1
+ var d=require("./style.css");const a=require("./index-Nde8uRU0.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>a.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1,enableCache:!0});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const s=r[o];let n=c(o);if(e.stripPrefix)switch(a.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(s,e)}return t}function u({properties:e}){return e}const p=e=>({href:e.href});function f({block:e,context:t}){var o;const r={...p(e),...e.properties,"builder-id":e.id,style:a.getStyle({block:e,context:t}),[a.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return u({properties:r,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=f;