@builder.io/sdk-qwik 0.14.16 → 0.14.18

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.
@@ -49,22 +49,26 @@ const getClassPropName = () => {
49
49
  case "vue":
50
50
  case "solid":
51
51
  case "qwik":
52
+ case "angular":
52
53
  return "class";
53
54
  }
54
55
  };
56
+ const attrs = function attrs2(props, state) {
57
+ return {
58
+ ...props.attributes,
59
+ [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
60
+ ...props.link ? {
61
+ href: props.link,
62
+ target: props.openLinkInNewTab ? "_blank" : void 0,
63
+ role: "link"
64
+ } : {
65
+ role: "button"
66
+ }
67
+ };
68
+ };
55
69
  const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
56
70
  return /* @__PURE__ */ _jsxC(DynamicRenderer, {
57
- attributes: {
58
- ...props.attributes,
59
- [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
60
- ...props.link ? {
61
- href: props.link,
62
- target: props.openLinkInNewTab ? "_blank" : void 0,
63
- role: "link"
64
- } : {
65
- role: "button"
66
- }
67
- },
71
+ attributes: attrs(props),
68
72
  get TagName() {
69
73
  return props.link ? props.builderLinkComponent || "a" : "button";
70
74
  },
@@ -3515,10 +3519,8 @@ _EvalCache.cacheLimit = 20;
3515
3519
  _EvalCache.cache = /* @__PURE__ */ new Map();
3516
3520
  let EvalCache = _EvalCache;
3517
3521
  function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression = true, enableCache }) {
3518
- if (code === "") {
3519
- logger.warn("Skipping evaluation of empty code block.");
3522
+ if (code === "")
3520
3523
  return void 0;
3521
- }
3522
3524
  const args = {
3523
3525
  code: parseCode(code, {
3524
3526
  isExpression
@@ -3797,6 +3799,7 @@ function mapStyleObjToStrIfNeeded(style) {
3797
3799
  case "svelte":
3798
3800
  case "vue":
3799
3801
  case "solid":
3802
+ case "angular":
3800
3803
  return convertStyleMapToCSSArray(style).join(" ");
3801
3804
  case "qwik":
3802
3805
  case "reactNative":
@@ -3857,6 +3860,23 @@ const getRepeatItemData = ({ block, context }) => {
3857
3860
  }));
3858
3861
  return repeatArray;
3859
3862
  };
3863
+ const shouldPassLinkComponent = (blockName) => {
3864
+ return blockName && [
3865
+ "Core:Button",
3866
+ "Symbol",
3867
+ "Columns",
3868
+ "Form:Form",
3869
+ "Builder: Tabs"
3870
+ ].includes(blockName);
3871
+ };
3872
+ const shouldPassRegisteredComponents = (blockName) => {
3873
+ return blockName && [
3874
+ "Symbol",
3875
+ "Columns",
3876
+ "Form:Form",
3877
+ "Builder: Tabs"
3878
+ ].includes(blockName);
3879
+ };
3860
3880
  const SIZES = {
3861
3881
  small: {
3862
3882
  min: 320,
@@ -4100,22 +4120,35 @@ const BlockWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
4100
4120
  }, 1, "87_1");
4101
4121
  }, "BlockWrapper_component_kOI0j0aW8Nw"));
4102
4122
  const InteractiveElement = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
4103
- return /* @__PURE__ */ _jsxC(props.Wrapper, {
4104
- ...props.wrapperProps,
4105
- attributes: props.includeBlockProps ? {
4123
+ const attributes = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
4124
+ const [props2] = useLexicalScope();
4125
+ return props2.includeBlockProps ? {
4106
4126
  ...getBlockProperties({
4107
- block: props.block,
4108
- context: props.context
4127
+ block: props2.block,
4128
+ context: props2.context
4109
4129
  }),
4110
4130
  ...getBlockActions({
4111
- block: props.block,
4112
- rootState: props.context.rootState,
4113
- rootSetState: props.context.rootSetState,
4114
- localState: props.context.localState,
4115
- context: props.context.context
4131
+ block: props2.block,
4132
+ rootState: props2.context.rootState,
4133
+ rootSetState: props2.context.rootSetState,
4134
+ localState: props2.context.localState,
4135
+ context: props2.context.context
4116
4136
  })
4117
- } : {},
4118
- children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "q0_0")
4137
+ } : {};
4138
+ }, "InteractiveElement_component_attributes_useComputed_0kUhl8Qa4CE", [
4139
+ props
4140
+ ]));
4141
+ return /* @__PURE__ */ _jsxC(props.Wrapper, {
4142
+ ...props.wrapperProps,
4143
+ get attributes() {
4144
+ return attributes.value;
4145
+ },
4146
+ children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "q0_0"),
4147
+ [_IMMUTABLE]: {
4148
+ attributes: _fnSignal((p0) => p0.value, [
4149
+ attributes
4150
+ ], "p0.value")
4151
+ }
4119
4152
  }, 0, "q0_1");
4120
4153
  }, "InteractiveElement_component_0UqfJpjhn0g"));
4121
4154
  const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }) => {
@@ -4293,7 +4326,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
4293
4326
  repeatItem
4294
4327
  ]));
4295
4328
  const componentRefProps = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
4296
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
4329
+ var _a2, _b, _c, _d, _e;
4297
4330
  const [blockComponent2, processedBlock2, props2] = useLexicalScope();
4298
4331
  return {
4299
4332
  blockChildren: processedBlock2.value.children ?? [],
@@ -4301,10 +4334,10 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
4301
4334
  componentOptions: {
4302
4335
  ...getBlockComponentOptions(processedBlock2.value),
4303
4336
  builderContext: props2.context,
4304
- ...((_b = blockComponent2.value) == null ? void 0 : _b.name) === "Core:Button" || ((_c = blockComponent2.value) == null ? void 0 : _c.name) === "Symbol" || ((_d = blockComponent2.value) == null ? void 0 : _d.name) === "Columns" || ((_e = blockComponent2.value) == null ? void 0 : _e.name) === "Form:Form" ? {
4337
+ ...shouldPassLinkComponent((_b = blockComponent2.value) == null ? void 0 : _b.name) ? {
4305
4338
  builderLinkComponent: props2.linkComponent
4306
4339
  } : {},
4307
- ...((_f = blockComponent2.value) == null ? void 0 : _f.name) === "Symbol" || ((_g = blockComponent2.value) == null ? void 0 : _g.name) === "Columns" || ((_h = blockComponent2.value) == null ? void 0 : _h.name) === "Form:Form" ? {
4340
+ ...shouldPassRegisteredComponents((_c = blockComponent2.value) == null ? void 0 : _c.name) ? {
4308
4341
  builderComponents: props2.registeredComponents
4309
4342
  } : {}
4310
4343
  },
@@ -4312,8 +4345,8 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
4312
4345
  linkComponent: props2.linkComponent,
4313
4346
  registeredComponents: props2.registeredComponents,
4314
4347
  builderBlock: processedBlock2.value,
4315
- includeBlockProps: ((_i = blockComponent2.value) == null ? void 0 : _i.noWrap) === true,
4316
- isInteractive: !((_j = blockComponent2.value) == null ? void 0 : _j.isRSC)
4348
+ includeBlockProps: ((_d = blockComponent2.value) == null ? void 0 : _d.noWrap) === true,
4349
+ isInteractive: !((_e = blockComponent2.value) == null ? void 0 : _e.isRSC)
4317
4350
  };
4318
4351
  }, "Block_component_componentRefProps_useComputed_Ikbl8VO04ho", [
4319
4352
  blockComponent,
@@ -4550,7 +4583,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
4550
4583
  }, 1, "jN_4") : null
4551
4584
  }, 1, "jN_5");
4552
4585
  }, "Block_component_nnPv0RY0U0k"));
4553
- const onClick$1 = function onClick2(props, state) {
4586
+ const onClick$1 = function onClick2(props, state, className) {
4554
4587
  var _a, _b;
4555
4588
  if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
4556
4589
  (_b = window.parent) == null ? void 0 : _b.postMessage({
@@ -4561,7 +4594,7 @@ const onClick$1 = function onClick2(props, state) {
4561
4594
  }
4562
4595
  }, "*");
4563
4596
  };
4564
- const onMouseEnter = function onMouseEnter2(props, state) {
4597
+ const onMouseEnter = function onMouseEnter2(props, state, className) {
4565
4598
  var _a, _b;
4566
4599
  if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
4567
4600
  (_b = window.parent) == null ? void 0 : _b.postMessage({
@@ -4596,23 +4629,26 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
4596
4629
  return props.styleProp;
4597
4630
  },
4598
4631
  onClick$: /* @__PURE__ */ inlinedQrl((event) => {
4599
- const [props2, state2] = useLexicalScope();
4632
+ const [className2, props2, state2] = useLexicalScope();
4600
4633
  return onClick$1(props2);
4601
4634
  }, "BlocksWrapper_component_onClick_ufezvOupQrM", [
4635
+ className,
4602
4636
  props,
4603
4637
  state
4604
4638
  ]),
4605
4639
  onKeyPress$: /* @__PURE__ */ inlinedQrl((event) => {
4606
- const [props2, state2] = useLexicalScope();
4640
+ const [className2, props2, state2] = useLexicalScope();
4607
4641
  return onClick$1(props2);
4608
4642
  }, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
4643
+ className,
4609
4644
  props,
4610
4645
  state
4611
4646
  ]),
4612
4647
  onMouseEnter$: /* @__PURE__ */ inlinedQrl((event) => {
4613
- const [props2, state2] = useLexicalScope();
4648
+ const [className2, props2, state2] = useLexicalScope();
4614
4649
  return onMouseEnter(props2);
4615
4650
  }, "BlocksWrapper_component_onMouseEnter_j4FJjnLtraQ", [
4651
+ className,
4616
4652
  props,
4617
4653
  state
4618
4654
  ]),
@@ -4725,6 +4761,12 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
4725
4761
  function deoptSignal(value) {
4726
4762
  return value;
4727
4763
  }
4764
+ const getColumnsClass = (id2) => {
4765
+ return `builder-columns ${id2}-breakpoints`;
4766
+ };
4767
+ const getTagName = function getTagName2(props, state, column) {
4768
+ return column.link ? props.builderLinkComponent || "a" : "div";
4769
+ };
4728
4770
  const getWidth = function getWidth2(props, state, index) {
4729
4771
  var _a;
4730
4772
  return ((_a = state.cols[index]) == null ? void 0 : _a.width) || 100 / state.cols.length;
@@ -4739,6 +4781,15 @@ const getTabletStyle = function getTabletStyle2(props, state, { stackedStyle, de
4739
4781
  const getMobileStyle = function getMobileStyle2(props, state, { stackedStyle, desktopStyle }) {
4740
4782
  return state.stackAt === "never" ? desktopStyle : stackedStyle;
4741
4783
  };
4784
+ const columnsCssVars = function columnsCssVars2(props, state) {
4785
+ return {
4786
+ "--flex-dir": state.flexDir,
4787
+ "--flex-dir-tablet": getTabletStyle(props, state, {
4788
+ stackedStyle: state.flexDir,
4789
+ desktopStyle: "row"
4790
+ })
4791
+ };
4792
+ };
4742
4793
  const columnCssVars = function columnCssVars2(props, state, index) {
4743
4794
  const gutter = index === 0 ? 0 : state.gutterSize;
4744
4795
  const width = getColumnCssWidth(props, state, index);
@@ -4778,90 +4829,68 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
4778
4829
  const breakpointSizes = getSizesForBreakpoints(((_b = (_a = props.builderContext.content) == null ? void 0 : _a.meta) == null ? void 0 : _b.breakpoints) || {});
4779
4830
  return breakpointSizes[size].max;
4780
4831
  };
4781
- const Columns = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
4782
- _jsxBranch();
4783
- const state = useStore({
4784
- cols: props.columns || [],
4785
- flexDir: props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column",
4786
- gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
4787
- stackAt: props.stackColumnsAt || "tablet"
4788
- });
4789
- useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_s7JLZz7MCCQ"));
4790
- const columnsCssVars = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
4791
- const [props2, state2] = useLexicalScope();
4792
- return {
4793
- "--flex-dir": state2.flexDir,
4794
- "--flex-dir-tablet": getTabletStyle(props2, state2, {
4795
- stackedStyle: state2.flexDir,
4796
- desktopStyle: "row"
4797
- })
4798
- };
4799
- }, "Columns_component_columnsCssVars_useComputed_adFEq2RWT9s", [
4800
- props,
4801
- state
4802
- ]));
4803
- const columnsStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
4804
- const [props2, state2] = useLexicalScope();
4805
- return `
4806
- @media (max-width: ${getWidthForBreakpointSize(props2, state2, "medium")}px) {
4807
- .${props2.builderBlock.id}-breakpoints {
4832
+ const columnsStyles = function columnsStyles2(props, state) {
4833
+ return `
4834
+ @media (max-width: ${getWidthForBreakpointSize(props, state, "medium")}px) {
4835
+ .${props.builderBlock.id}-breakpoints {
4808
4836
  flex-direction: var(--flex-dir-tablet);
4809
4837
  align-items: stretch;
4810
4838
  }
4811
4839
 
4812
- .${props2.builderBlock.id}-breakpoints > .builder-column {
4840
+ .${props.builderBlock.id}-breakpoints > .builder-column {
4813
4841
  width: var(--column-width-tablet) !important;
4814
4842
  margin-left: var(--column-margin-left-tablet) !important;
4815
4843
  }
4816
4844
  }
4817
4845
 
4818
- @media (max-width: ${getWidthForBreakpointSize(props2, state2, "small")}px) {
4819
- .${props2.builderBlock.id}-breakpoints {
4846
+ @media (max-width: ${getWidthForBreakpointSize(props, state, "small")}px) {
4847
+ .${props.builderBlock.id}-breakpoints {
4820
4848
  flex-direction: var(--flex-dir);
4821
4849
  align-items: stretch;
4822
4850
  }
4823
4851
 
4824
- .${props2.builderBlock.id}-breakpoints > .builder-column {
4852
+ .${props.builderBlock.id}-breakpoints > .builder-column {
4825
4853
  width: var(--column-width-mobile) !important;
4826
4854
  margin-left: var(--column-margin-left-mobile) !important;
4827
4855
  }
4828
4856
  },
4829
4857
  `;
4830
- }, "Columns_component_columnsStyles_useComputed_nBtMPbzd1Wc", [
4831
- props,
4832
- state
4833
- ]));
4834
- return /* @__PURE__ */ _jsxQ("div", null, {
4835
- class: _fnSignal((p0) => `builder-columns ${p0.builderBlock.id}-breakpoints div-Columns`, [
4836
- props
4837
- ], '`builder-columns ${p0.builderBlock.id}-breakpoints`+" div-Columns"'),
4838
- style: _fnSignal((p0) => p0.value, [
4839
- columnsCssVars
4840
- ], "p0.value")
4841
- }, [
4858
+ };
4859
+ const getAttributes = function getAttributes2(props, state, column, index) {
4860
+ return {
4861
+ ...column.link ? {
4862
+ href: column.link
4863
+ } : {},
4864
+ [getClassPropName()]: "builder-column",
4865
+ style: mapStyleObjToStrIfNeeded(columnCssVars(props, state, index))
4866
+ };
4867
+ };
4868
+ const Columns = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
4869
+ var _a;
4870
+ _jsxBranch();
4871
+ const state = useStore({
4872
+ cols: props.columns || [],
4873
+ flexDir: props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column",
4874
+ gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
4875
+ stackAt: props.stackColumnsAt || "tablet"
4876
+ });
4877
+ useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_s7JLZz7MCCQ"));
4878
+ return /* @__PURE__ */ _jsxQ("div", {
4879
+ class: getColumnsClass((_a = props.builderBlock) == null ? void 0 : _a.id) + " div-Columns",
4880
+ style: columnsCssVars(props, state)
4881
+ }, null, [
4842
4882
  /* @__PURE__ */ _jsxC(InlinedStyles, {
4843
4883
  id: "builderio-columns",
4844
- get styles() {
4845
- return columnsStyles.value;
4846
- },
4884
+ styles: columnsStyles(props, state),
4847
4885
  [_IMMUTABLE]: {
4848
- id: _IMMUTABLE,
4849
- styles: _fnSignal((p0) => p0.value, [
4850
- columnsStyles
4851
- ], "p0.value")
4886
+ id: _IMMUTABLE
4852
4887
  }
4853
4888
  }, 3, "c0_0"),
4854
4889
  (props.columns || []).map((column, index) => {
4855
4890
  return /* @__PURE__ */ _jsxC(DynamicRenderer, {
4856
- TagName: column.link ? props.builderLinkComponent || "a" : "div",
4891
+ TagName: getTagName(props, state, column),
4857
4892
  actionAttributes: {},
4858
- attributes: {
4859
- ...column.link ? {
4860
- href: column.link
4861
- } : {},
4862
- [getClassPropName()]: "builder-column",
4863
- style: mapStyleObjToStrIfNeeded(columnCssVars(props, state, index))
4864
- },
4893
+ attributes: getAttributes(props, state, column, index),
4865
4894
  children: /* @__PURE__ */ _jsxC(Blocks, {
4866
4895
  path: `component.options.columns.${index}.blocks`,
4867
4896
  get parent() {
@@ -4969,7 +4998,7 @@ function getSrcSet(url) {
4969
4998
  return url;
4970
4999
  }
4971
5000
  const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
4972
- var _a, _b, _c, _d;
5001
+ var _a, _b, _c, _d, _e, _f;
4973
5002
  _jsxBranch();
4974
5003
  useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$1, "Image_component_useStylesScoped_fBMYiVf9fuU"));
4975
5004
  const srcSetToUse = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
@@ -5065,7 +5094,7 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
5065
5094
  ], '{paddingTop:p0.aspectRatio*100+"%"}')
5066
5095
  }, null, 3, "0A_1") : null,
5067
5096
  ((_d = (_c = props.builderBlock) == null ? void 0 : _c.children) == null ? void 0 : _d.length) && props.fitContent ? /* @__PURE__ */ _jsxC(Slot$1, null, 3, "0A_2") : null,
5068
- !props.fitContent && props.children ? /* @__PURE__ */ _jsxQ("div", null, {
5097
+ !props.fitContent && ((_f = (_e = props.builderBlock) == null ? void 0 : _e.children) == null ? void 0 : _f.length) ? /* @__PURE__ */ _jsxQ("div", null, {
5069
5098
  class: "div-Image-2"
5070
5099
  }, /* @__PURE__ */ _jsxC(Slot$1, null, 3, "0A_3"), 1, "0A_4") : null
5071
5100
  ]
@@ -5284,7 +5313,7 @@ const handleABTesting = async ({ item, canTrack }) => {
5284
5313
  };
5285
5314
  };
5286
5315
  const getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
5287
- const componentInfo$f = {
5316
+ const componentInfo$g = {
5288
5317
  name: "Core:Button",
5289
5318
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
5290
5319
  defaultStyles: {
@@ -5322,7 +5351,7 @@ const componentInfo$f = {
5322
5351
  static: true,
5323
5352
  noWrap: true
5324
5353
  };
5325
- const componentInfo$e = {
5354
+ const componentInfo$f = {
5326
5355
  // TODO: ways to statically preprocess JSON for references, functions, etc
5327
5356
  name: "Columns",
5328
5357
  isRSC: true,
@@ -5564,14 +5593,14 @@ const componentInfo$e = {
5564
5593
  }
5565
5594
  ]
5566
5595
  };
5567
- const componentInfo$d = {
5596
+ const componentInfo$e = {
5568
5597
  name: "Fragment",
5569
5598
  static: true,
5570
5599
  hidden: true,
5571
5600
  canHaveChildren: true,
5572
5601
  noWrap: true
5573
5602
  };
5574
- const componentInfo$c = {
5603
+ const componentInfo$d = {
5575
5604
  name: "Image",
5576
5605
  static: true,
5577
5606
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
@@ -5719,7 +5748,7 @@ const componentInfo$c = {
5719
5748
  }
5720
5749
  ]
5721
5750
  };
5722
- const componentInfo$b = {
5751
+ const componentInfo$c = {
5723
5752
  name: "Core:Section",
5724
5753
  static: true,
5725
5754
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -5764,7 +5793,7 @@ const componentInfo$b = {
5764
5793
  }
5765
5794
  ]
5766
5795
  };
5767
- const componentInfo$a = {
5796
+ const componentInfo$b = {
5768
5797
  name: "Slot",
5769
5798
  isRSC: true,
5770
5799
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -5819,7 +5848,7 @@ const Slot = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
5819
5848
  }
5820
5849
  }, 0, "B1_1");
5821
5850
  }, "Slot_component_WWgWgfV0bb0"));
5822
- const componentInfo$9 = {
5851
+ const componentInfo$a = {
5823
5852
  name: "Symbol",
5824
5853
  noWrap: true,
5825
5854
  static: true,
@@ -5859,6 +5888,282 @@ const componentInfo$9 = {
5859
5888
  }
5860
5889
  ]
5861
5890
  };
5891
+ const defaultTab = {
5892
+ "@type": "@builder.io/sdk:Element",
5893
+ responsiveStyles: {
5894
+ large: {
5895
+ paddingLeft: "20px",
5896
+ paddingRight: "20px",
5897
+ paddingTop: "10px",
5898
+ paddingBottom: "10px",
5899
+ minWidth: "100px",
5900
+ textAlign: "center",
5901
+ display: "flex",
5902
+ flexDirection: "column",
5903
+ cursor: "pointer",
5904
+ userSelect: "none"
5905
+ }
5906
+ },
5907
+ component: {
5908
+ name: "Text",
5909
+ options: {
5910
+ text: "New tab"
5911
+ }
5912
+ }
5913
+ };
5914
+ const defaultElement = {
5915
+ "@type": "@builder.io/sdk:Element",
5916
+ responsiveStyles: {
5917
+ large: {
5918
+ height: "200px",
5919
+ display: "flex",
5920
+ marginTop: "20px",
5921
+ flexDirection: "column"
5922
+ }
5923
+ },
5924
+ component: {
5925
+ name: "Text",
5926
+ options: {
5927
+ text: "New tab content "
5928
+ }
5929
+ }
5930
+ };
5931
+ const componentInfo$9 = {
5932
+ name: "Builder: Tabs",
5933
+ inputs: [
5934
+ {
5935
+ name: "tabs",
5936
+ type: "list",
5937
+ broadcast: true,
5938
+ subFields: [
5939
+ {
5940
+ name: "label",
5941
+ type: "uiBlocks",
5942
+ hideFromUI: true,
5943
+ defaultValue: [
5944
+ defaultTab
5945
+ ]
5946
+ },
5947
+ {
5948
+ name: "content",
5949
+ type: "uiBlocks",
5950
+ hideFromUI: true,
5951
+ defaultValue: [
5952
+ defaultElement
5953
+ ]
5954
+ }
5955
+ ],
5956
+ defaultValue: [
5957
+ {
5958
+ label: [
5959
+ {
5960
+ ...defaultTab,
5961
+ component: {
5962
+ name: "Text",
5963
+ options: {
5964
+ text: "Tab 1"
5965
+ }
5966
+ }
5967
+ }
5968
+ ],
5969
+ content: [
5970
+ {
5971
+ ...defaultElement,
5972
+ component: {
5973
+ name: "Text",
5974
+ options: {
5975
+ text: "Tab 1 content"
5976
+ }
5977
+ }
5978
+ }
5979
+ ]
5980
+ },
5981
+ {
5982
+ label: [
5983
+ {
5984
+ ...defaultTab,
5985
+ component: {
5986
+ name: "Text",
5987
+ options: {
5988
+ text: "Tab 2"
5989
+ }
5990
+ }
5991
+ }
5992
+ ],
5993
+ content: [
5994
+ {
5995
+ ...defaultElement,
5996
+ component: {
5997
+ name: "Text",
5998
+ options: {
5999
+ text: "Tab 2 content"
6000
+ }
6001
+ }
6002
+ }
6003
+ ]
6004
+ }
6005
+ ]
6006
+ },
6007
+ {
6008
+ name: "activeTabStyle",
6009
+ type: "uiStyle",
6010
+ helperText: "CSS styles for the active tab",
6011
+ defaultValue: {
6012
+ backgroundColor: "rgba(0, 0, 0, 0.1)"
6013
+ }
6014
+ },
6015
+ {
6016
+ name: "defaultActiveTab",
6017
+ type: "number",
6018
+ helperText: 'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',
6019
+ defaultValue: 1,
6020
+ advanced: true
6021
+ },
6022
+ {
6023
+ name: "collapsible",
6024
+ type: "boolean",
6025
+ helperText: "If on, clicking an open tab closes it so no tabs are active",
6026
+ defaultValue: false,
6027
+ advanced: true
6028
+ },
6029
+ {
6030
+ name: "tabHeaderLayout",
6031
+ type: "enum",
6032
+ helperText: "Change the layout of the tab headers (uses justify-content)",
6033
+ defaultValue: "flex-start",
6034
+ enum: [
6035
+ {
6036
+ label: "Center",
6037
+ value: "center"
6038
+ },
6039
+ {
6040
+ label: "Space between",
6041
+ value: "space-between"
6042
+ },
6043
+ {
6044
+ label: "Space around",
6045
+ value: "space-around"
6046
+ },
6047
+ {
6048
+ label: "Left",
6049
+ value: "flex-start"
6050
+ },
6051
+ {
6052
+ label: "Right",
6053
+ value: "flex-end"
6054
+ }
6055
+ ]
6056
+ }
6057
+ ]
6058
+ };
6059
+ const activeTabContent = function activeTabContent2(props, state, active) {
6060
+ return props.tabs && props.tabs[active].content;
6061
+ };
6062
+ const getActiveTabStyle = function getActiveTabStyle2(props, state, index) {
6063
+ return state.activeTab === index ? props.activeTabStyle : {};
6064
+ };
6065
+ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
6066
+ _jsxBranch();
6067
+ const state = useStore({
6068
+ activeTab: props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
6069
+ });
6070
+ return /* @__PURE__ */ _jsxQ("div", null, null, [
6071
+ /* @__PURE__ */ _jsxQ("div", null, {
6072
+ class: "builder-tabs-wrap",
6073
+ style: _fnSignal((p0) => ({
6074
+ display: "flex",
6075
+ flexDirection: "row",
6076
+ justifyContent: p0.tabHeaderLayout || "flex-start",
6077
+ overflow: "auto"
6078
+ }), [
6079
+ props
6080
+ ], '{display:"flex",flexDirection:"row",justifyContent:p0.tabHeaderLayout||"flex-start",overflow:"auto"}')
6081
+ }, (props.tabs || []).map((tab, index) => {
6082
+ return /* @__PURE__ */ _jsxQ("span", {
6083
+ class: `builder-tab-wrap ${state.activeTab === index ? "builder-tab-active" : ""}`,
6084
+ onClick$: /* @__PURE__ */ inlinedQrl((event) => {
6085
+ const [index2, props2, state2] = useLexicalScope();
6086
+ if (index2 === state2.activeTab && props2.collapsible)
6087
+ state2.activeTab = -1;
6088
+ else
6089
+ state2.activeTab = index2;
6090
+ }, "Tabs_component_div_div_span_onClick_hSTBabAHGks", [
6091
+ index,
6092
+ props,
6093
+ state
6094
+ ]),
6095
+ style: getActiveTabStyle(props, state, index)
6096
+ }, null, /* @__PURE__ */ _jsxC(Blocks, {
6097
+ get parent() {
6098
+ return props.builderBlock.id;
6099
+ },
6100
+ path: `component.options.tabs.${index}.label`,
6101
+ get blocks() {
6102
+ return tab.label;
6103
+ },
6104
+ get context() {
6105
+ return props.builderContext;
6106
+ },
6107
+ get registeredComponents() {
6108
+ return props.builderComponents;
6109
+ },
6110
+ get linkComponent() {
6111
+ return props.builderLinkComponent;
6112
+ },
6113
+ [_IMMUTABLE]: {
6114
+ blocks: _wrapProp(tab, "label"),
6115
+ context: _fnSignal((p0) => p0.builderContext, [
6116
+ props
6117
+ ], "p0.builderContext"),
6118
+ linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
6119
+ props
6120
+ ], "p0.builderLinkComponent"),
6121
+ parent: _fnSignal((p0) => p0.builderBlock.id, [
6122
+ props
6123
+ ], "p0.builderBlock.id"),
6124
+ registeredComponents: _fnSignal((p0) => p0.builderComponents, [
6125
+ props
6126
+ ], "p0.builderComponents")
6127
+ }
6128
+ }, 3, "6k_0"), 0, index);
6129
+ }), 1, null),
6130
+ activeTabContent(props, state, state.activeTab) ? /* @__PURE__ */ _jsxQ("div", null, null, /* @__PURE__ */ _jsxC(Blocks, {
6131
+ get parent() {
6132
+ return props.builderBlock.id;
6133
+ },
6134
+ get path() {
6135
+ return `component.options.tabs.${state.activeTab}.content`;
6136
+ },
6137
+ blocks: activeTabContent(props, state, state.activeTab),
6138
+ get context() {
6139
+ return props.builderContext;
6140
+ },
6141
+ get registeredComponents() {
6142
+ return props.builderComponents;
6143
+ },
6144
+ get linkComponent() {
6145
+ return props.builderLinkComponent;
6146
+ },
6147
+ [_IMMUTABLE]: {
6148
+ context: _fnSignal((p0) => p0.builderContext, [
6149
+ props
6150
+ ], "p0.builderContext"),
6151
+ linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
6152
+ props
6153
+ ], "p0.builderLinkComponent"),
6154
+ parent: _fnSignal((p0) => p0.builderBlock.id, [
6155
+ props
6156
+ ], "p0.builderBlock.id"),
6157
+ path: _fnSignal((p0) => `component.options.tabs.${p0.activeTab}.content`, [
6158
+ state
6159
+ ], "`component.options.tabs.${p0.activeTab}.content`"),
6160
+ registeredComponents: _fnSignal((p0) => p0.builderComponents, [
6161
+ props
6162
+ ], "p0.builderComponents")
6163
+ }
6164
+ }, 3, "6k_1"), 1, "6k_2") : null
6165
+ ], 1, "6k_3");
6166
+ }, "Tabs_component_MhWcxXy0lMY"));
5862
6167
  const componentInfo$8 = {
5863
6168
  name: "Text",
5864
6169
  static: true,
@@ -7138,36 +7443,42 @@ const getExtraComponents = () => [
7138
7443
  const getDefaultRegisteredComponents = () => [
7139
7444
  {
7140
7445
  component: Button,
7141
- ...componentInfo$f
7446
+ ...componentInfo$g
7142
7447
  },
7143
7448
  {
7144
7449
  component: Columns,
7145
- ...componentInfo$e
7450
+ ...componentInfo$f
7146
7451
  },
7147
7452
  {
7148
7453
  component: FragmentComponent,
7149
- ...componentInfo$d
7454
+ ...componentInfo$e
7150
7455
  },
7151
7456
  {
7152
7457
  component: Image,
7153
- ...componentInfo$c
7458
+ ...componentInfo$d
7154
7459
  },
7155
7460
  {
7156
7461
  component: SectionComponent,
7157
- ...componentInfo$b
7462
+ ...componentInfo$c
7158
7463
  },
7159
7464
  {
7160
7465
  component: Slot,
7161
- ...componentInfo$a
7466
+ ...componentInfo$b
7162
7467
  },
7163
7468
  {
7164
7469
  component: Symbol$1,
7165
- ...componentInfo$9
7470
+ ...componentInfo$a
7166
7471
  },
7167
7472
  {
7168
7473
  component: Text,
7169
7474
  ...componentInfo$8
7170
7475
  },
7476
+ ...[
7477
+ {
7478
+ component: Tabs,
7479
+ ...componentInfo$9
7480
+ }
7481
+ ],
7171
7482
  ...getExtraComponents()
7172
7483
  ];
7173
7484
  const createRegisterComponentMessage = (info) => ({
@@ -7613,7 +7924,7 @@ function isFromTrustedHost(trustedHosts, e) {
7613
7924
  const url = new URL(e.origin), hostname = url.hostname;
7614
7925
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
7615
7926
  }
7616
- const SDK_VERSION = "0.14.16";
7927
+ const SDK_VERSION = "0.14.18";
7617
7928
  const registry = {};
7618
7929
  function register(type, info) {
7619
7930
  let typeList = registry[type];
@@ -7796,7 +8107,75 @@ const subscribeToEditor = (model, callback, options) => {
7796
8107
  window.removeEventListener("message", listener);
7797
8108
  };
7798
8109
  };
7799
- const mergeNewRootState = function mergeNewRootState22(props, state, elementRef, newData) {
8110
+ const getCssFromFont = (font) => {
8111
+ var _a;
8112
+ const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
8113
+ const name = family.split(",")[0];
8114
+ const url = font.fileUrl ?? ((_a = font == null ? void 0 : font.files) == null ? void 0 : _a.regular);
8115
+ let str = "";
8116
+ if (url && family && name)
8117
+ str += `
8118
+ @font-face {
8119
+ font-family: "${family}";
8120
+ src: local("${name}"), url('${url}') format('woff2');
8121
+ font-display: fallback;
8122
+ font-weight: 400;
8123
+ }
8124
+ `.trim();
8125
+ if (font.files)
8126
+ for (const weight in font.files) {
8127
+ const isNumber = String(Number(weight)) === weight;
8128
+ if (!isNumber)
8129
+ continue;
8130
+ const weightUrl = font.files[weight];
8131
+ if (weightUrl && weightUrl !== url)
8132
+ str += `
8133
+ @font-face {
8134
+ font-family: "${family}";
8135
+ src: url('${weightUrl}') format('woff2');
8136
+ font-display: fallback;
8137
+ font-weight: ${weight};
8138
+ }
8139
+ `.trim();
8140
+ }
8141
+ return str;
8142
+ };
8143
+ const getFontCss = ({ customFonts }) => {
8144
+ var _a;
8145
+ return ((_a = customFonts == null ? void 0 : customFonts.map((font) => getCssFromFont(font))) == null ? void 0 : _a.join(" ")) || "";
8146
+ };
8147
+ const getCss = ({ cssCode, contentId }) => {
8148
+ if (!cssCode)
8149
+ return "";
8150
+ if (!contentId)
8151
+ return cssCode;
8152
+ return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
8153
+ };
8154
+ const DEFAULT_STYLES = `
8155
+ .builder-button {
8156
+ all: unset;
8157
+ }
8158
+
8159
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
8160
+ margin: 0;
8161
+ }
8162
+ .builder-text > p, .builder-text > .builder-paragraph {
8163
+ color: inherit;
8164
+ line-height: inherit;
8165
+ letter-spacing: inherit;
8166
+ font-weight: inherit;
8167
+ font-size: inherit;
8168
+ text-align: inherit;
8169
+ font-family: inherit;
8170
+ }
8171
+ `;
8172
+ const getDefaultStyles = (isNested) => {
8173
+ return !isNested ? DEFAULT_STYLES : "";
8174
+ };
8175
+ const getWrapperClassName = (variationId) => {
8176
+ return `variant-${variationId}`;
8177
+ };
8178
+ const mergeNewRootState = function mergeNewRootState22(props, state, showContentProps, elementRef, newData) {
7800
8179
  var _a, _b;
7801
8180
  const combinedState = {
7802
8181
  ...props.builderContextSignal.rootState,
@@ -7807,7 +8186,7 @@ const mergeNewRootState = function mergeNewRootState22(props, state, elementRef,
7807
8186
  else
7808
8187
  props.builderContextSignal.rootState = combinedState;
7809
8188
  };
7810
- const mergeNewContent = function mergeNewContent2(props, state, elementRef, newContent) {
8189
+ const mergeNewContent = function mergeNewContent2(props, state, showContentProps, elementRef, newContent) {
7811
8190
  var _a, _b, _c, _d, _e;
7812
8191
  const newContentValue = {
7813
8192
  ...props.builderContextSignal.content,
@@ -7824,7 +8203,7 @@ const mergeNewContent = function mergeNewContent2(props, state, elementRef, newC
7824
8203
  };
7825
8204
  props.builderContextSignal.content = newContentValue;
7826
8205
  };
7827
- const processMessage = function processMessage2(props, state, elementRef, event) {
8206
+ const processMessage = function processMessage2(props, state, showContentProps, elementRef, event) {
7828
8207
  return createEditorListener({
7829
8208
  model: props.model,
7830
8209
  trustedHosts: props.trustedHosts,
@@ -7835,7 +8214,7 @@ const processMessage = function processMessage2(props, state, elementRef, event)
7835
8214
  if (!contentId || contentId !== ((_a = props.builderContextSignal.content) == null ? void 0 : _a.id))
7836
8215
  return;
7837
8216
  if (breakpoints)
7838
- mergeNewContent(props, state, elementRef, {
8217
+ mergeNewContent(props, state, showContentProps, elementRef, {
7839
8218
  meta: {
7840
8219
  breakpoints
7841
8220
  }
@@ -7845,12 +8224,12 @@ const processMessage = function processMessage2(props, state, elementRef, event)
7845
8224
  triggerAnimation(animation);
7846
8225
  },
7847
8226
  contentUpdate: (newContent) => {
7848
- mergeNewContent(props, state, elementRef, newContent);
8227
+ mergeNewContent(props, state, showContentProps, elementRef, newContent);
7849
8228
  }
7850
8229
  }
7851
8230
  })(event);
7852
8231
  };
7853
- const evaluateJsCode = function evaluateJsCode2(props, state, elementRef) {
8232
+ const evaluateJsCode = function evaluateJsCode2(props, state, showContentProps, elementRef) {
7854
8233
  var _a, _b;
7855
8234
  const jsCode = (_b = (_a = props.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.jsCode;
7856
8235
  if (jsCode)
@@ -7866,7 +8245,7 @@ const evaluateJsCode = function evaluateJsCode2(props, state, elementRef) {
7866
8245
  enableCache: false
7867
8246
  });
7868
8247
  };
7869
- const onClick = function onClick22(props, state, elementRef, event) {
8248
+ const onClick = function onClick22(props, state, showContentProps, elementRef, event) {
7870
8249
  var _a, _b;
7871
8250
  if (props.builderContextSignal.content) {
7872
8251
  const variationId = (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
@@ -7884,7 +8263,7 @@ const onClick = function onClick22(props, state, elementRef, event) {
7884
8263
  if (!state.clicked)
7885
8264
  state.clicked = true;
7886
8265
  };
7887
- const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
8266
+ const runHttpRequests = function runHttpRequests2(props, state, showContentProps, elementRef) {
7888
8267
  var _a, _b;
7889
8268
  const requests = ((_b = (_a = props.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.httpRequests) ?? {};
7890
8269
  Object.entries(requests).forEach(([key, url]) => {
@@ -7904,7 +8283,7 @@ const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
7904
8283
  enableCache: true
7905
8284
  })));
7906
8285
  fetch$1(evaluatedUrl).then((response) => response.json()).then((json) => {
7907
- mergeNewRootState(props, state, elementRef, {
8286
+ mergeNewRootState(props, state, showContentProps, elementRef, {
7908
8287
  [key]: json
7909
8288
  });
7910
8289
  state.httpReqsData[key] = true;
@@ -7915,7 +8294,7 @@ const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
7915
8294
  });
7916
8295
  });
7917
8296
  };
7918
- const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
8297
+ const emitStateUpdate = function emitStateUpdate2(props, state, showContentProps, elementRef) {
7919
8298
  if (isEditing())
7920
8299
  window.dispatchEvent(new CustomEvent("builder:component:stateChange", {
7921
8300
  detail: {
@@ -7927,7 +8306,17 @@ const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
7927
8306
  }));
7928
8307
  };
7929
8308
  const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
8309
+ var _a, _b;
7930
8310
  _jsxBranch();
8311
+ const showContentProps = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
8312
+ const [props2] = useLexicalScope();
8313
+ return props2.showContent ? {} : {
8314
+ hidden: true,
8315
+ "aria-hidden": true
8316
+ };
8317
+ }, "EnableEditor_component_showContentProps_useComputed_aHr3V0Y8sNs", [
8318
+ props
8319
+ ]));
7931
8320
  const elementRef = useSignal();
7932
8321
  const state = useStore({
7933
8322
  ContentWrapper: props.contentWrapper || "div",
@@ -7938,8 +8327,8 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
7938
8327
  deep: true
7939
8328
  });
7940
8329
  useOn("initeditingbldr", /* @__PURE__ */ inlinedQrl((event, element) => {
7941
- const [elementRef2, props2, state2] = useLexicalScope();
7942
- window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
8330
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8331
+ window.addEventListener("message", processMessage.bind(null, props2, state2, showContentProps2, elementRef2));
7943
8332
  registerInsertMenu();
7944
8333
  setupBrowserForEditing({
7945
8334
  ...props2.locale ? {
@@ -7953,18 +8342,19 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
7953
8342
  } : {}
7954
8343
  });
7955
8344
  Object.values(props2.builderContextSignal.componentInfos).forEach((registeredComponent) => {
7956
- var _a;
8345
+ var _a2;
7957
8346
  const message = createRegisterComponentMessage(registeredComponent);
7958
- (_a = window.parent) == null ? void 0 : _a.postMessage(message, "*");
8347
+ (_a2 = window.parent) == null ? void 0 : _a2.postMessage(message, "*");
7959
8348
  });
7960
- window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
8349
+ window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, showContentProps2, elementRef2));
7961
8350
  }, "EnableEditor_component_useOn_Qs8c0yql2i0", [
7962
8351
  elementRef,
7963
8352
  props,
8353
+ showContentProps,
7964
8354
  state
7965
8355
  ]));
7966
8356
  useOn("initpreviewingbldr", /* @__PURE__ */ inlinedQrl((event, element) => {
7967
- const [elementRef2, props2, state2] = useLexicalScope();
8357
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
7968
8358
  const searchParams = new URL(location.href).searchParams;
7969
8359
  const searchParamPreviewModel = searchParams.get("builder.preview");
7970
8360
  const searchParamPreviewId = searchParams.get(`builder.preview.${searchParamPreviewModel}`);
@@ -7976,23 +8366,24 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
7976
8366
  apiVersion: props2.builderContextSignal.apiVersion
7977
8367
  }).then((content) => {
7978
8368
  if (content)
7979
- mergeNewContent(props2, state2, elementRef2, content);
8369
+ mergeNewContent(props2, state2, showContentProps2, elementRef2, content);
7980
8370
  });
7981
8371
  }, "EnableEditor_component_useOn_1_F94YipmknvI", [
7982
8372
  elementRef,
7983
8373
  props,
8374
+ showContentProps,
7984
8375
  state
7985
8376
  ]));
7986
8377
  useOn("qvisible", /* @__PURE__ */ inlinedQrl((event, element) => {
7987
- var _a, _b, _c, _d;
8378
+ var _a2, _b2, _c, _d;
7988
8379
  if (isBrowser()) {
7989
8380
  if (isEditing()) {
7990
8381
  if (element)
7991
8382
  element.dispatchEvent(new CustomEvent("initeditingbldr"));
7992
8383
  }
7993
- const shouldTrackImpression = ((_a = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a.value) === "true";
8384
+ const shouldTrackImpression = ((_a2 = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a2.value) === "true";
7994
8385
  if (shouldTrackImpression) {
7995
- const variationId = (_b = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b.value;
8386
+ const variationId = (_b2 = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b2.value;
7996
8387
  const contentId = (_c = element.attributes.getNamedItem("contentId")) == null ? void 0 : _c.value;
7997
8388
  const apiKeyProp = (_d = element.attributes.getNamedItem("apiKey")) == null ? void 0 : _d.value;
7998
8389
  _track({
@@ -8011,80 +8402,87 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
8011
8402
  }, "EnableEditor_component_useOn_2_FyR0YPSlJlw"));
8012
8403
  useContextProvider(builderContext, props.builderContextSignal);
8013
8404
  useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
8014
- const [elementRef2, props2, state2] = useLexicalScope();
8405
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8015
8406
  if (!props2.apiKey)
8016
8407
  logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
8017
8408
  evaluateJsCode(props2);
8018
- runHttpRequests(props2, state2, elementRef2);
8409
+ runHttpRequests(props2, state2, showContentProps2, elementRef2);
8019
8410
  emitStateUpdate(props2);
8020
8411
  }, "EnableEditor_component_useTask_Nb2VI04qp0M", [
8021
8412
  elementRef,
8022
8413
  props,
8414
+ showContentProps,
8023
8415
  state
8024
8416
  ]));
8025
8417
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8026
- const [elementRef2, props2, state2] = useLexicalScope();
8418
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8027
8419
  track2(() => props2.content);
8028
8420
  if (props2.content)
8029
- mergeNewContent(props2, state2, elementRef2, props2.content);
8421
+ mergeNewContent(props2, state2, showContentProps2, elementRef2, props2.content);
8030
8422
  }, "EnableEditor_component_useTask_1_m0y1Z9vk4eQ", [
8031
8423
  elementRef,
8032
8424
  props,
8425
+ showContentProps,
8033
8426
  state
8034
8427
  ]));
8035
8428
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8036
- const [elementRef2, props2, state2] = useLexicalScope();
8429
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8037
8430
  track2(() => {
8038
- var _a, _b;
8039
- return (_b = (_a = props2.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.jsCode;
8431
+ var _a2, _b2;
8432
+ return (_b2 = (_a2 = props2.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.jsCode;
8040
8433
  });
8041
8434
  evaluateJsCode(props2);
8042
8435
  }, "EnableEditor_component_useTask_2_xVyv0tDqZLs", [
8043
8436
  elementRef,
8044
8437
  props,
8438
+ showContentProps,
8045
8439
  state
8046
8440
  ]));
8047
8441
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8048
- const [elementRef2, props2, state2] = useLexicalScope();
8442
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8049
8443
  track2(() => {
8050
- var _a, _b;
8051
- return (_b = (_a = props2.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.httpRequests;
8444
+ var _a2, _b2;
8445
+ return (_b2 = (_a2 = props2.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.httpRequests;
8052
8446
  });
8053
- runHttpRequests(props2, state2, elementRef2);
8447
+ runHttpRequests(props2, state2, showContentProps2, elementRef2);
8054
8448
  }, "EnableEditor_component_useTask_3_bQ0e5LHZwWE", [
8055
8449
  elementRef,
8056
8450
  props,
8451
+ showContentProps,
8057
8452
  state
8058
8453
  ]));
8059
8454
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8060
- const [elementRef2, props2, state2] = useLexicalScope();
8455
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8061
8456
  track2(() => props2.builderContextSignal.rootState);
8062
8457
  emitStateUpdate(props2);
8063
8458
  }, "EnableEditor_component_useTask_4_moHYZG8uNVU", [
8064
8459
  elementRef,
8065
8460
  props,
8461
+ showContentProps,
8066
8462
  state
8067
8463
  ]));
8068
8464
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8069
- const [elementRef2, props2, state2] = useLexicalScope();
8465
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8070
8466
  track2(() => props2.data);
8071
8467
  if (props2.data)
8072
- mergeNewRootState(props2, state2, elementRef2, props2.data);
8468
+ mergeNewRootState(props2, state2, showContentProps2, elementRef2, props2.data);
8073
8469
  }, "EnableEditor_component_useTask_5_24QxS0r0KF8", [
8074
8470
  elementRef,
8075
8471
  props,
8472
+ showContentProps,
8076
8473
  state
8077
8474
  ]));
8078
8475
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8079
- const [elementRef2, props2, state2] = useLexicalScope();
8476
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8080
8477
  track2(() => props2.locale);
8081
8478
  if (props2.locale)
8082
- mergeNewRootState(props2, state2, elementRef2, {
8479
+ mergeNewRootState(props2, state2, showContentProps2, elementRef2, {
8083
8480
  locale: props2.locale
8084
8481
  });
8085
8482
  }, "EnableEditor_component_useTask_6_0CaFTUOgv08", [
8086
8483
  elementRef,
8087
8484
  props,
8485
+ showContentProps,
8088
8486
  state
8089
8487
  ]));
8090
8488
  return /* @__PURE__ */ _jsxC(Fragment, {
@@ -8093,69 +8491,58 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
8093
8491
  return props.apiKey;
8094
8492
  },
8095
8493
  get contentId() {
8096
- var _a;
8097
- return (_a = props.builderContextSignal.content) == null ? void 0 : _a.id;
8494
+ var _a2;
8495
+ return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.id;
8098
8496
  },
8099
8497
  get variationId() {
8100
- var _a;
8101
- return (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
8498
+ var _a2;
8499
+ return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.testVariationId;
8102
8500
  },
8103
8501
  onClick$: /* @__PURE__ */ inlinedQrl((event) => {
8104
- const [elementRef2, props2, state2] = useLexicalScope();
8105
- return onClick(props2, state2, elementRef2, event);
8502
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8503
+ return onClick(props2, state2, showContentProps2, elementRef2, event);
8106
8504
  }, "EnableEditor_component__Fragment_onClick_b4nYT3DrjEk", [
8107
8505
  elementRef,
8108
8506
  props,
8507
+ showContentProps,
8109
8508
  state
8110
8509
  ]),
8111
8510
  ref: elementRef,
8112
8511
  shouldTrack: String(props.builderContextSignal.content && getDefaultCanTrack(props.canTrack)),
8113
8512
  get "builder-content-id"() {
8114
- var _a;
8115
- return (_a = props.builderContextSignal.content) == null ? void 0 : _a.id;
8513
+ var _a2;
8514
+ return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.id;
8116
8515
  },
8117
8516
  get "builder-model"() {
8118
8517
  return props.model;
8119
8518
  },
8120
- ...props.showContent ? {} : {
8121
- hidden: true,
8122
- "aria-hidden": true
8123
- },
8519
+ ...showContentProps.value,
8124
8520
  ...props.contentWrapperProps,
8125
- get class() {
8126
- var _a, _b;
8127
- return `variant-${((_a = props.content) == null ? void 0 : _a.testVariationId) || ((_b = props.content) == null ? void 0 : _b.id)}`;
8128
- },
8129
8521
  children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "06_0"),
8522
+ class: getWrapperClassName(((_a = props.content) == null ? void 0 : _a.testVariationId) || ((_b = props.content) == null ? void 0 : _b.id)),
8130
8523
  [_IMMUTABLE]: {
8131
8524
  apiKey: _fnSignal((p0) => p0.apiKey, [
8132
8525
  props
8133
8526
  ], "p0.apiKey"),
8134
8527
  "builder-content-id": _fnSignal((p0) => {
8135
- var _a;
8136
- return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.id;
8528
+ var _a2;
8529
+ return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.id;
8137
8530
  }, [
8138
8531
  props
8139
8532
  ], "p0.builderContextSignal.content?.id"),
8140
8533
  "builder-model": _fnSignal((p0) => p0.model, [
8141
8534
  props
8142
8535
  ], "p0.model"),
8143
- class: _fnSignal((p0) => {
8144
- var _a, _b;
8145
- return `variant-${((_a = p0.content) == null ? void 0 : _a.testVariationId) || ((_b = p0.content) == null ? void 0 : _b.id)}`;
8146
- }, [
8147
- props
8148
- ], "`variant-${p0.content?.testVariationId||p0.content?.id}`"),
8149
8536
  contentId: _fnSignal((p0) => {
8150
- var _a;
8151
- return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.id;
8537
+ var _a2;
8538
+ return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.id;
8152
8539
  }, [
8153
8540
  props
8154
8541
  ], "p0.builderContextSignal.content?.id"),
8155
8542
  ref: _IMMUTABLE,
8156
8543
  variationId: _fnSignal((p0) => {
8157
- var _a;
8158
- return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
8544
+ var _a2;
8545
+ return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.testVariationId;
8159
8546
  }, [
8160
8547
  props
8161
8548
  ], "p0.builderContextSignal.content?.testVariationId")
@@ -8163,71 +8550,6 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
8163
8550
  }, 0, "06_1") : null
8164
8551
  }, 1, "06_2");
8165
8552
  }, "EnableEditor_component_ko1mO8oaj8k"));
8166
- const getCssFromFont = (font) => {
8167
- var _a;
8168
- const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
8169
- const name = family.split(",")[0];
8170
- const url = font.fileUrl ?? ((_a = font == null ? void 0 : font.files) == null ? void 0 : _a.regular);
8171
- let str = "";
8172
- if (url && family && name)
8173
- str += `
8174
- @font-face {
8175
- font-family: "${family}";
8176
- src: local("${name}"), url('${url}') format('woff2');
8177
- font-display: fallback;
8178
- font-weight: 400;
8179
- }
8180
- `.trim();
8181
- if (font.files)
8182
- for (const weight in font.files) {
8183
- const isNumber = String(Number(weight)) === weight;
8184
- if (!isNumber)
8185
- continue;
8186
- const weightUrl = font.files[weight];
8187
- if (weightUrl && weightUrl !== url)
8188
- str += `
8189
- @font-face {
8190
- font-family: "${family}";
8191
- src: url('${weightUrl}') format('woff2');
8192
- font-display: fallback;
8193
- font-weight: ${weight};
8194
- }
8195
- `.trim();
8196
- }
8197
- return str;
8198
- };
8199
- const getFontCss = ({ customFonts }) => {
8200
- var _a;
8201
- return ((_a = customFonts == null ? void 0 : customFonts.map((font) => getCssFromFont(font))) == null ? void 0 : _a.join(" ")) || "";
8202
- };
8203
- const getCss = ({ cssCode, contentId }) => {
8204
- if (!cssCode)
8205
- return "";
8206
- if (!contentId)
8207
- return cssCode;
8208
- return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
8209
- };
8210
- const DEFAULT_STYLES = `
8211
- .builder-button {
8212
- all: unset;
8213
- }
8214
-
8215
- .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
8216
- margin: 0;
8217
- }
8218
- .builder-text > p, .builder-text > .builder-paragraph {
8219
- color: inherit;
8220
- line-height: inherit;
8221
- letter-spacing: inherit;
8222
- font-weight: inherit;
8223
- font-size: inherit;
8224
- text-align: inherit;
8225
- font-family: inherit;
8226
- }
8227
- `;
8228
- const getDefaultStyles = (isNested) => {
8229
- return !isNested ? DEFAULT_STYLES : "";
8230
- };
8231
8553
  const ContentStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
8232
8554
  const state = useStore({
8233
8555
  injectedStyles: `
@@ -8832,7 +9154,7 @@ const fetchSymbolContent = async ({ builderContextValue, symbol }) => {
8832
9154
  });
8833
9155
  return void 0;
8834
9156
  };
8835
- const setContent = function setContent2(props, state) {
9157
+ const setContent = function setContent2(props, state, blocksWrapper, contentWrapper, className) {
8836
9158
  if (state.contentToUse)
8837
9159
  return;
8838
9160
  fetchSymbolContent({
@@ -8845,6 +9167,12 @@ const setContent = function setContent2(props, state) {
8845
9167
  };
8846
9168
  const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
8847
9169
  var _a;
9170
+ const blocksWrapper = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
9171
+ return "div";
9172
+ }, "Symbol_component_blocksWrapper_useComputed_B5dlF985gMM"));
9173
+ const contentWrapper = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
9174
+ return "div";
9175
+ }, "Symbol_component_contentWrapper_useComputed_EvmPpPj8JTo"));
8848
9176
  const className = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
8849
9177
  var _a2, _b;
8850
9178
  const [props2] = useLexicalScope();
@@ -8861,10 +9189,13 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
8861
9189
  contentToUse: (_a = props.symbol) == null ? void 0 : _a.content
8862
9190
  });
8863
9191
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8864
- const [props2, state2] = useLexicalScope();
9192
+ const [blocksWrapper2, className2, contentWrapper2, props2, state2] = useLexicalScope();
8865
9193
  track2(() => props2.symbol);
8866
9194
  setContent(props2, state2);
8867
9195
  }, "Symbol_component_useTask_NIAWAC1bMBo", [
9196
+ blocksWrapper,
9197
+ className,
9198
+ contentWrapper,
8868
9199
  props,
8869
9200
  state
8870
9201
  ]));
@@ -8906,8 +9237,12 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
8906
9237
  get linkComponent() {
8907
9238
  return props.builderLinkComponent;
8908
9239
  },
8909
- blocksWrapper: "div",
8910
- contentWrapper: "div",
9240
+ get blocksWrapper() {
9241
+ return blocksWrapper.value;
9242
+ },
9243
+ get contentWrapper() {
9244
+ return contentWrapper.value;
9245
+ },
8911
9246
  [_IMMUTABLE]: {
8912
9247
  apiKey: _fnSignal((p0) => p0.builderContext.apiKey, [
8913
9248
  props
@@ -8915,11 +9250,15 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
8915
9250
  apiVersion: _fnSignal((p0) => p0.builderContext.apiVersion, [
8916
9251
  props
8917
9252
  ], "p0.builderContext.apiVersion"),
8918
- blocksWrapper: _IMMUTABLE,
9253
+ blocksWrapper: _fnSignal((p0) => p0.value, [
9254
+ blocksWrapper
9255
+ ], "p0.value"),
8919
9256
  content: _fnSignal((p0) => p0.contentToUse, [
8920
9257
  state
8921
9258
  ], "p0.contentToUse"),
8922
- contentWrapper: _IMMUTABLE,
9259
+ contentWrapper: _fnSignal((p0) => p0.value, [
9260
+ contentWrapper
9261
+ ], "p0.value"),
8923
9262
  context: _fnSignal((p0) => {
8924
9263
  var _a2;
8925
9264
  return {