@builder.io/sdk-qwik 0.14.17 → 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
  },
@@ -3795,6 +3799,7 @@ function mapStyleObjToStrIfNeeded(style) {
3795
3799
  case "svelte":
3796
3800
  case "vue":
3797
3801
  case "solid":
3802
+ case "angular":
3798
3803
  return convertStyleMapToCSSArray(style).join(" ");
3799
3804
  case "qwik":
3800
3805
  case "reactNative":
@@ -3855,6 +3860,23 @@ const getRepeatItemData = ({ block, context }) => {
3855
3860
  }));
3856
3861
  return repeatArray;
3857
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
+ };
3858
3880
  const SIZES = {
3859
3881
  small: {
3860
3882
  min: 320,
@@ -4098,22 +4120,35 @@ const BlockWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
4098
4120
  }, 1, "87_1");
4099
4121
  }, "BlockWrapper_component_kOI0j0aW8Nw"));
4100
4122
  const InteractiveElement = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
4101
- return /* @__PURE__ */ _jsxC(props.Wrapper, {
4102
- ...props.wrapperProps,
4103
- attributes: props.includeBlockProps ? {
4123
+ const attributes = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
4124
+ const [props2] = useLexicalScope();
4125
+ return props2.includeBlockProps ? {
4104
4126
  ...getBlockProperties({
4105
- block: props.block,
4106
- context: props.context
4127
+ block: props2.block,
4128
+ context: props2.context
4107
4129
  }),
4108
4130
  ...getBlockActions({
4109
- block: props.block,
4110
- rootState: props.context.rootState,
4111
- rootSetState: props.context.rootSetState,
4112
- localState: props.context.localState,
4113
- 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
4114
4136
  })
4115
- } : {},
4116
- 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
+ }
4117
4152
  }, 0, "q0_1");
4118
4153
  }, "InteractiveElement_component_0UqfJpjhn0g"));
4119
4154
  const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }) => {
@@ -4291,7 +4326,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
4291
4326
  repeatItem
4292
4327
  ]));
4293
4328
  const componentRefProps = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
4294
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
4329
+ var _a2, _b, _c, _d, _e;
4295
4330
  const [blockComponent2, processedBlock2, props2] = useLexicalScope();
4296
4331
  return {
4297
4332
  blockChildren: processedBlock2.value.children ?? [],
@@ -4299,10 +4334,10 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
4299
4334
  componentOptions: {
4300
4335
  ...getBlockComponentOptions(processedBlock2.value),
4301
4336
  builderContext: props2.context,
4302
- ...((_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) ? {
4303
4338
  builderLinkComponent: props2.linkComponent
4304
4339
  } : {},
4305
- ...((_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) ? {
4306
4341
  builderComponents: props2.registeredComponents
4307
4342
  } : {}
4308
4343
  },
@@ -4310,8 +4345,8 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
4310
4345
  linkComponent: props2.linkComponent,
4311
4346
  registeredComponents: props2.registeredComponents,
4312
4347
  builderBlock: processedBlock2.value,
4313
- includeBlockProps: ((_i = blockComponent2.value) == null ? void 0 : _i.noWrap) === true,
4314
- 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)
4315
4350
  };
4316
4351
  }, "Block_component_componentRefProps_useComputed_Ikbl8VO04ho", [
4317
4352
  blockComponent,
@@ -4548,7 +4583,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
4548
4583
  }, 1, "jN_4") : null
4549
4584
  }, 1, "jN_5");
4550
4585
  }, "Block_component_nnPv0RY0U0k"));
4551
- const onClick$1 = function onClick2(props, state) {
4586
+ const onClick$1 = function onClick2(props, state, className) {
4552
4587
  var _a, _b;
4553
4588
  if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
4554
4589
  (_b = window.parent) == null ? void 0 : _b.postMessage({
@@ -4559,7 +4594,7 @@ const onClick$1 = function onClick2(props, state) {
4559
4594
  }
4560
4595
  }, "*");
4561
4596
  };
4562
- const onMouseEnter = function onMouseEnter2(props, state) {
4597
+ const onMouseEnter = function onMouseEnter2(props, state, className) {
4563
4598
  var _a, _b;
4564
4599
  if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
4565
4600
  (_b = window.parent) == null ? void 0 : _b.postMessage({
@@ -4594,23 +4629,26 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
4594
4629
  return props.styleProp;
4595
4630
  },
4596
4631
  onClick$: /* @__PURE__ */ inlinedQrl((event) => {
4597
- const [props2, state2] = useLexicalScope();
4632
+ const [className2, props2, state2] = useLexicalScope();
4598
4633
  return onClick$1(props2);
4599
4634
  }, "BlocksWrapper_component_onClick_ufezvOupQrM", [
4635
+ className,
4600
4636
  props,
4601
4637
  state
4602
4638
  ]),
4603
4639
  onKeyPress$: /* @__PURE__ */ inlinedQrl((event) => {
4604
- const [props2, state2] = useLexicalScope();
4640
+ const [className2, props2, state2] = useLexicalScope();
4605
4641
  return onClick$1(props2);
4606
4642
  }, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
4643
+ className,
4607
4644
  props,
4608
4645
  state
4609
4646
  ]),
4610
4647
  onMouseEnter$: /* @__PURE__ */ inlinedQrl((event) => {
4611
- const [props2, state2] = useLexicalScope();
4648
+ const [className2, props2, state2] = useLexicalScope();
4612
4649
  return onMouseEnter(props2);
4613
4650
  }, "BlocksWrapper_component_onMouseEnter_j4FJjnLtraQ", [
4651
+ className,
4614
4652
  props,
4615
4653
  state
4616
4654
  ]),
@@ -4723,6 +4761,12 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
4723
4761
  function deoptSignal(value) {
4724
4762
  return value;
4725
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
+ };
4726
4770
  const getWidth = function getWidth2(props, state, index) {
4727
4771
  var _a;
4728
4772
  return ((_a = state.cols[index]) == null ? void 0 : _a.width) || 100 / state.cols.length;
@@ -4737,6 +4781,15 @@ const getTabletStyle = function getTabletStyle2(props, state, { stackedStyle, de
4737
4781
  const getMobileStyle = function getMobileStyle2(props, state, { stackedStyle, desktopStyle }) {
4738
4782
  return state.stackAt === "never" ? desktopStyle : stackedStyle;
4739
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
+ };
4740
4793
  const columnCssVars = function columnCssVars2(props, state, index) {
4741
4794
  const gutter = index === 0 ? 0 : state.gutterSize;
4742
4795
  const width = getColumnCssWidth(props, state, index);
@@ -4776,90 +4829,68 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
4776
4829
  const breakpointSizes = getSizesForBreakpoints(((_b = (_a = props.builderContext.content) == null ? void 0 : _a.meta) == null ? void 0 : _b.breakpoints) || {});
4777
4830
  return breakpointSizes[size].max;
4778
4831
  };
4779
- const Columns = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
4780
- _jsxBranch();
4781
- const state = useStore({
4782
- cols: props.columns || [],
4783
- flexDir: props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column",
4784
- gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
4785
- stackAt: props.stackColumnsAt || "tablet"
4786
- });
4787
- useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_s7JLZz7MCCQ"));
4788
- const columnsCssVars = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
4789
- const [props2, state2] = useLexicalScope();
4790
- return {
4791
- "--flex-dir": state2.flexDir,
4792
- "--flex-dir-tablet": getTabletStyle(props2, state2, {
4793
- stackedStyle: state2.flexDir,
4794
- desktopStyle: "row"
4795
- })
4796
- };
4797
- }, "Columns_component_columnsCssVars_useComputed_adFEq2RWT9s", [
4798
- props,
4799
- state
4800
- ]));
4801
- const columnsStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
4802
- const [props2, state2] = useLexicalScope();
4803
- return `
4804
- @media (max-width: ${getWidthForBreakpointSize(props2, state2, "medium")}px) {
4805
- .${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 {
4806
4836
  flex-direction: var(--flex-dir-tablet);
4807
4837
  align-items: stretch;
4808
4838
  }
4809
4839
 
4810
- .${props2.builderBlock.id}-breakpoints > .builder-column {
4840
+ .${props.builderBlock.id}-breakpoints > .builder-column {
4811
4841
  width: var(--column-width-tablet) !important;
4812
4842
  margin-left: var(--column-margin-left-tablet) !important;
4813
4843
  }
4814
4844
  }
4815
4845
 
4816
- @media (max-width: ${getWidthForBreakpointSize(props2, state2, "small")}px) {
4817
- .${props2.builderBlock.id}-breakpoints {
4846
+ @media (max-width: ${getWidthForBreakpointSize(props, state, "small")}px) {
4847
+ .${props.builderBlock.id}-breakpoints {
4818
4848
  flex-direction: var(--flex-dir);
4819
4849
  align-items: stretch;
4820
4850
  }
4821
4851
 
4822
- .${props2.builderBlock.id}-breakpoints > .builder-column {
4852
+ .${props.builderBlock.id}-breakpoints > .builder-column {
4823
4853
  width: var(--column-width-mobile) !important;
4824
4854
  margin-left: var(--column-margin-left-mobile) !important;
4825
4855
  }
4826
4856
  },
4827
4857
  `;
4828
- }, "Columns_component_columnsStyles_useComputed_nBtMPbzd1Wc", [
4829
- props,
4830
- state
4831
- ]));
4832
- return /* @__PURE__ */ _jsxQ("div", null, {
4833
- class: _fnSignal((p0) => `builder-columns ${p0.builderBlock.id}-breakpoints div-Columns`, [
4834
- props
4835
- ], '`builder-columns ${p0.builderBlock.id}-breakpoints`+" div-Columns"'),
4836
- style: _fnSignal((p0) => p0.value, [
4837
- columnsCssVars
4838
- ], "p0.value")
4839
- }, [
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, [
4840
4882
  /* @__PURE__ */ _jsxC(InlinedStyles, {
4841
4883
  id: "builderio-columns",
4842
- get styles() {
4843
- return columnsStyles.value;
4844
- },
4884
+ styles: columnsStyles(props, state),
4845
4885
  [_IMMUTABLE]: {
4846
- id: _IMMUTABLE,
4847
- styles: _fnSignal((p0) => p0.value, [
4848
- columnsStyles
4849
- ], "p0.value")
4886
+ id: _IMMUTABLE
4850
4887
  }
4851
4888
  }, 3, "c0_0"),
4852
4889
  (props.columns || []).map((column, index) => {
4853
4890
  return /* @__PURE__ */ _jsxC(DynamicRenderer, {
4854
- TagName: column.link ? props.builderLinkComponent || "a" : "div",
4891
+ TagName: getTagName(props, state, column),
4855
4892
  actionAttributes: {},
4856
- attributes: {
4857
- ...column.link ? {
4858
- href: column.link
4859
- } : {},
4860
- [getClassPropName()]: "builder-column",
4861
- style: mapStyleObjToStrIfNeeded(columnCssVars(props, state, index))
4862
- },
4893
+ attributes: getAttributes(props, state, column, index),
4863
4894
  children: /* @__PURE__ */ _jsxC(Blocks, {
4864
4895
  path: `component.options.columns.${index}.blocks`,
4865
4896
  get parent() {
@@ -4967,7 +4998,7 @@ function getSrcSet(url) {
4967
4998
  return url;
4968
4999
  }
4969
5000
  const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
4970
- var _a, _b, _c, _d;
5001
+ var _a, _b, _c, _d, _e, _f;
4971
5002
  _jsxBranch();
4972
5003
  useStylesScopedQrl(/* @__PURE__ */ inlinedQrl(STYLES$1, "Image_component_useStylesScoped_fBMYiVf9fuU"));
4973
5004
  const srcSetToUse = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
@@ -5063,7 +5094,7 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
5063
5094
  ], '{paddingTop:p0.aspectRatio*100+"%"}')
5064
5095
  }, null, 3, "0A_1") : null,
5065
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,
5066
- !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, {
5067
5098
  class: "div-Image-2"
5068
5099
  }, /* @__PURE__ */ _jsxC(Slot$1, null, 3, "0A_3"), 1, "0A_4") : null
5069
5100
  ]
@@ -5282,7 +5313,7 @@ const handleABTesting = async ({ item, canTrack }) => {
5282
5313
  };
5283
5314
  };
5284
5315
  const getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
5285
- const componentInfo$f = {
5316
+ const componentInfo$g = {
5286
5317
  name: "Core:Button",
5287
5318
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
5288
5319
  defaultStyles: {
@@ -5320,7 +5351,7 @@ const componentInfo$f = {
5320
5351
  static: true,
5321
5352
  noWrap: true
5322
5353
  };
5323
- const componentInfo$e = {
5354
+ const componentInfo$f = {
5324
5355
  // TODO: ways to statically preprocess JSON for references, functions, etc
5325
5356
  name: "Columns",
5326
5357
  isRSC: true,
@@ -5562,14 +5593,14 @@ const componentInfo$e = {
5562
5593
  }
5563
5594
  ]
5564
5595
  };
5565
- const componentInfo$d = {
5596
+ const componentInfo$e = {
5566
5597
  name: "Fragment",
5567
5598
  static: true,
5568
5599
  hidden: true,
5569
5600
  canHaveChildren: true,
5570
5601
  noWrap: true
5571
5602
  };
5572
- const componentInfo$c = {
5603
+ const componentInfo$d = {
5573
5604
  name: "Image",
5574
5605
  static: true,
5575
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",
@@ -5717,7 +5748,7 @@ const componentInfo$c = {
5717
5748
  }
5718
5749
  ]
5719
5750
  };
5720
- const componentInfo$b = {
5751
+ const componentInfo$c = {
5721
5752
  name: "Core:Section",
5722
5753
  static: true,
5723
5754
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -5762,7 +5793,7 @@ const componentInfo$b = {
5762
5793
  }
5763
5794
  ]
5764
5795
  };
5765
- const componentInfo$a = {
5796
+ const componentInfo$b = {
5766
5797
  name: "Slot",
5767
5798
  isRSC: true,
5768
5799
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -5817,7 +5848,7 @@ const Slot = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
5817
5848
  }
5818
5849
  }, 0, "B1_1");
5819
5850
  }, "Slot_component_WWgWgfV0bb0"));
5820
- const componentInfo$9 = {
5851
+ const componentInfo$a = {
5821
5852
  name: "Symbol",
5822
5853
  noWrap: true,
5823
5854
  static: true,
@@ -5857,6 +5888,282 @@ const componentInfo$9 = {
5857
5888
  }
5858
5889
  ]
5859
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"));
5860
6167
  const componentInfo$8 = {
5861
6168
  name: "Text",
5862
6169
  static: true,
@@ -7136,36 +7443,42 @@ const getExtraComponents = () => [
7136
7443
  const getDefaultRegisteredComponents = () => [
7137
7444
  {
7138
7445
  component: Button,
7139
- ...componentInfo$f
7446
+ ...componentInfo$g
7140
7447
  },
7141
7448
  {
7142
7449
  component: Columns,
7143
- ...componentInfo$e
7450
+ ...componentInfo$f
7144
7451
  },
7145
7452
  {
7146
7453
  component: FragmentComponent,
7147
- ...componentInfo$d
7454
+ ...componentInfo$e
7148
7455
  },
7149
7456
  {
7150
7457
  component: Image,
7151
- ...componentInfo$c
7458
+ ...componentInfo$d
7152
7459
  },
7153
7460
  {
7154
7461
  component: SectionComponent,
7155
- ...componentInfo$b
7462
+ ...componentInfo$c
7156
7463
  },
7157
7464
  {
7158
7465
  component: Slot,
7159
- ...componentInfo$a
7466
+ ...componentInfo$b
7160
7467
  },
7161
7468
  {
7162
7469
  component: Symbol$1,
7163
- ...componentInfo$9
7470
+ ...componentInfo$a
7164
7471
  },
7165
7472
  {
7166
7473
  component: Text,
7167
7474
  ...componentInfo$8
7168
7475
  },
7476
+ ...[
7477
+ {
7478
+ component: Tabs,
7479
+ ...componentInfo$9
7480
+ }
7481
+ ],
7169
7482
  ...getExtraComponents()
7170
7483
  ];
7171
7484
  const createRegisterComponentMessage = (info) => ({
@@ -7611,7 +7924,7 @@ function isFromTrustedHost(trustedHosts, e) {
7611
7924
  const url = new URL(e.origin), hostname = url.hostname;
7612
7925
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
7613
7926
  }
7614
- const SDK_VERSION = "0.14.17";
7927
+ const SDK_VERSION = "0.14.18";
7615
7928
  const registry = {};
7616
7929
  function register(type, info) {
7617
7930
  let typeList = registry[type];
@@ -7794,7 +8107,75 @@ const subscribeToEditor = (model, callback, options) => {
7794
8107
  window.removeEventListener("message", listener);
7795
8108
  };
7796
8109
  };
7797
- 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) {
7798
8179
  var _a, _b;
7799
8180
  const combinedState = {
7800
8181
  ...props.builderContextSignal.rootState,
@@ -7805,7 +8186,7 @@ const mergeNewRootState = function mergeNewRootState22(props, state, elementRef,
7805
8186
  else
7806
8187
  props.builderContextSignal.rootState = combinedState;
7807
8188
  };
7808
- const mergeNewContent = function mergeNewContent2(props, state, elementRef, newContent) {
8189
+ const mergeNewContent = function mergeNewContent2(props, state, showContentProps, elementRef, newContent) {
7809
8190
  var _a, _b, _c, _d, _e;
7810
8191
  const newContentValue = {
7811
8192
  ...props.builderContextSignal.content,
@@ -7822,7 +8203,7 @@ const mergeNewContent = function mergeNewContent2(props, state, elementRef, newC
7822
8203
  };
7823
8204
  props.builderContextSignal.content = newContentValue;
7824
8205
  };
7825
- const processMessage = function processMessage2(props, state, elementRef, event) {
8206
+ const processMessage = function processMessage2(props, state, showContentProps, elementRef, event) {
7826
8207
  return createEditorListener({
7827
8208
  model: props.model,
7828
8209
  trustedHosts: props.trustedHosts,
@@ -7833,7 +8214,7 @@ const processMessage = function processMessage2(props, state, elementRef, event)
7833
8214
  if (!contentId || contentId !== ((_a = props.builderContextSignal.content) == null ? void 0 : _a.id))
7834
8215
  return;
7835
8216
  if (breakpoints)
7836
- mergeNewContent(props, state, elementRef, {
8217
+ mergeNewContent(props, state, showContentProps, elementRef, {
7837
8218
  meta: {
7838
8219
  breakpoints
7839
8220
  }
@@ -7843,12 +8224,12 @@ const processMessage = function processMessage2(props, state, elementRef, event)
7843
8224
  triggerAnimation(animation);
7844
8225
  },
7845
8226
  contentUpdate: (newContent) => {
7846
- mergeNewContent(props, state, elementRef, newContent);
8227
+ mergeNewContent(props, state, showContentProps, elementRef, newContent);
7847
8228
  }
7848
8229
  }
7849
8230
  })(event);
7850
8231
  };
7851
- const evaluateJsCode = function evaluateJsCode2(props, state, elementRef) {
8232
+ const evaluateJsCode = function evaluateJsCode2(props, state, showContentProps, elementRef) {
7852
8233
  var _a, _b;
7853
8234
  const jsCode = (_b = (_a = props.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.jsCode;
7854
8235
  if (jsCode)
@@ -7864,7 +8245,7 @@ const evaluateJsCode = function evaluateJsCode2(props, state, elementRef) {
7864
8245
  enableCache: false
7865
8246
  });
7866
8247
  };
7867
- const onClick = function onClick22(props, state, elementRef, event) {
8248
+ const onClick = function onClick22(props, state, showContentProps, elementRef, event) {
7868
8249
  var _a, _b;
7869
8250
  if (props.builderContextSignal.content) {
7870
8251
  const variationId = (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
@@ -7882,7 +8263,7 @@ const onClick = function onClick22(props, state, elementRef, event) {
7882
8263
  if (!state.clicked)
7883
8264
  state.clicked = true;
7884
8265
  };
7885
- const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
8266
+ const runHttpRequests = function runHttpRequests2(props, state, showContentProps, elementRef) {
7886
8267
  var _a, _b;
7887
8268
  const requests = ((_b = (_a = props.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.httpRequests) ?? {};
7888
8269
  Object.entries(requests).forEach(([key, url]) => {
@@ -7902,7 +8283,7 @@ const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
7902
8283
  enableCache: true
7903
8284
  })));
7904
8285
  fetch$1(evaluatedUrl).then((response) => response.json()).then((json) => {
7905
- mergeNewRootState(props, state, elementRef, {
8286
+ mergeNewRootState(props, state, showContentProps, elementRef, {
7906
8287
  [key]: json
7907
8288
  });
7908
8289
  state.httpReqsData[key] = true;
@@ -7913,7 +8294,7 @@ const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
7913
8294
  });
7914
8295
  });
7915
8296
  };
7916
- const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
8297
+ const emitStateUpdate = function emitStateUpdate2(props, state, showContentProps, elementRef) {
7917
8298
  if (isEditing())
7918
8299
  window.dispatchEvent(new CustomEvent("builder:component:stateChange", {
7919
8300
  detail: {
@@ -7925,7 +8306,17 @@ const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
7925
8306
  }));
7926
8307
  };
7927
8308
  const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
8309
+ var _a, _b;
7928
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
+ ]));
7929
8320
  const elementRef = useSignal();
7930
8321
  const state = useStore({
7931
8322
  ContentWrapper: props.contentWrapper || "div",
@@ -7936,8 +8327,8 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
7936
8327
  deep: true
7937
8328
  });
7938
8329
  useOn("initeditingbldr", /* @__PURE__ */ inlinedQrl((event, element) => {
7939
- const [elementRef2, props2, state2] = useLexicalScope();
7940
- 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));
7941
8332
  registerInsertMenu();
7942
8333
  setupBrowserForEditing({
7943
8334
  ...props2.locale ? {
@@ -7951,18 +8342,19 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
7951
8342
  } : {}
7952
8343
  });
7953
8344
  Object.values(props2.builderContextSignal.componentInfos).forEach((registeredComponent) => {
7954
- var _a;
8345
+ var _a2;
7955
8346
  const message = createRegisterComponentMessage(registeredComponent);
7956
- (_a = window.parent) == null ? void 0 : _a.postMessage(message, "*");
8347
+ (_a2 = window.parent) == null ? void 0 : _a2.postMessage(message, "*");
7957
8348
  });
7958
- window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
8349
+ window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, showContentProps2, elementRef2));
7959
8350
  }, "EnableEditor_component_useOn_Qs8c0yql2i0", [
7960
8351
  elementRef,
7961
8352
  props,
8353
+ showContentProps,
7962
8354
  state
7963
8355
  ]));
7964
8356
  useOn("initpreviewingbldr", /* @__PURE__ */ inlinedQrl((event, element) => {
7965
- const [elementRef2, props2, state2] = useLexicalScope();
8357
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
7966
8358
  const searchParams = new URL(location.href).searchParams;
7967
8359
  const searchParamPreviewModel = searchParams.get("builder.preview");
7968
8360
  const searchParamPreviewId = searchParams.get(`builder.preview.${searchParamPreviewModel}`);
@@ -7974,23 +8366,24 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
7974
8366
  apiVersion: props2.builderContextSignal.apiVersion
7975
8367
  }).then((content) => {
7976
8368
  if (content)
7977
- mergeNewContent(props2, state2, elementRef2, content);
8369
+ mergeNewContent(props2, state2, showContentProps2, elementRef2, content);
7978
8370
  });
7979
8371
  }, "EnableEditor_component_useOn_1_F94YipmknvI", [
7980
8372
  elementRef,
7981
8373
  props,
8374
+ showContentProps,
7982
8375
  state
7983
8376
  ]));
7984
8377
  useOn("qvisible", /* @__PURE__ */ inlinedQrl((event, element) => {
7985
- var _a, _b, _c, _d;
8378
+ var _a2, _b2, _c, _d;
7986
8379
  if (isBrowser()) {
7987
8380
  if (isEditing()) {
7988
8381
  if (element)
7989
8382
  element.dispatchEvent(new CustomEvent("initeditingbldr"));
7990
8383
  }
7991
- 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";
7992
8385
  if (shouldTrackImpression) {
7993
- 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;
7994
8387
  const contentId = (_c = element.attributes.getNamedItem("contentId")) == null ? void 0 : _c.value;
7995
8388
  const apiKeyProp = (_d = element.attributes.getNamedItem("apiKey")) == null ? void 0 : _d.value;
7996
8389
  _track({
@@ -8009,80 +8402,87 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
8009
8402
  }, "EnableEditor_component_useOn_2_FyR0YPSlJlw"));
8010
8403
  useContextProvider(builderContext, props.builderContextSignal);
8011
8404
  useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
8012
- const [elementRef2, props2, state2] = useLexicalScope();
8405
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8013
8406
  if (!props2.apiKey)
8014
8407
  logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
8015
8408
  evaluateJsCode(props2);
8016
- runHttpRequests(props2, state2, elementRef2);
8409
+ runHttpRequests(props2, state2, showContentProps2, elementRef2);
8017
8410
  emitStateUpdate(props2);
8018
8411
  }, "EnableEditor_component_useTask_Nb2VI04qp0M", [
8019
8412
  elementRef,
8020
8413
  props,
8414
+ showContentProps,
8021
8415
  state
8022
8416
  ]));
8023
8417
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8024
- const [elementRef2, props2, state2] = useLexicalScope();
8418
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8025
8419
  track2(() => props2.content);
8026
8420
  if (props2.content)
8027
- mergeNewContent(props2, state2, elementRef2, props2.content);
8421
+ mergeNewContent(props2, state2, showContentProps2, elementRef2, props2.content);
8028
8422
  }, "EnableEditor_component_useTask_1_m0y1Z9vk4eQ", [
8029
8423
  elementRef,
8030
8424
  props,
8425
+ showContentProps,
8031
8426
  state
8032
8427
  ]));
8033
8428
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8034
- const [elementRef2, props2, state2] = useLexicalScope();
8429
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8035
8430
  track2(() => {
8036
- var _a, _b;
8037
- 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;
8038
8433
  });
8039
8434
  evaluateJsCode(props2);
8040
8435
  }, "EnableEditor_component_useTask_2_xVyv0tDqZLs", [
8041
8436
  elementRef,
8042
8437
  props,
8438
+ showContentProps,
8043
8439
  state
8044
8440
  ]));
8045
8441
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8046
- const [elementRef2, props2, state2] = useLexicalScope();
8442
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8047
8443
  track2(() => {
8048
- var _a, _b;
8049
- 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;
8050
8446
  });
8051
- runHttpRequests(props2, state2, elementRef2);
8447
+ runHttpRequests(props2, state2, showContentProps2, elementRef2);
8052
8448
  }, "EnableEditor_component_useTask_3_bQ0e5LHZwWE", [
8053
8449
  elementRef,
8054
8450
  props,
8451
+ showContentProps,
8055
8452
  state
8056
8453
  ]));
8057
8454
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8058
- const [elementRef2, props2, state2] = useLexicalScope();
8455
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8059
8456
  track2(() => props2.builderContextSignal.rootState);
8060
8457
  emitStateUpdate(props2);
8061
8458
  }, "EnableEditor_component_useTask_4_moHYZG8uNVU", [
8062
8459
  elementRef,
8063
8460
  props,
8461
+ showContentProps,
8064
8462
  state
8065
8463
  ]));
8066
8464
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8067
- const [elementRef2, props2, state2] = useLexicalScope();
8465
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8068
8466
  track2(() => props2.data);
8069
8467
  if (props2.data)
8070
- mergeNewRootState(props2, state2, elementRef2, props2.data);
8468
+ mergeNewRootState(props2, state2, showContentProps2, elementRef2, props2.data);
8071
8469
  }, "EnableEditor_component_useTask_5_24QxS0r0KF8", [
8072
8470
  elementRef,
8073
8471
  props,
8472
+ showContentProps,
8074
8473
  state
8075
8474
  ]));
8076
8475
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8077
- const [elementRef2, props2, state2] = useLexicalScope();
8476
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8078
8477
  track2(() => props2.locale);
8079
8478
  if (props2.locale)
8080
- mergeNewRootState(props2, state2, elementRef2, {
8479
+ mergeNewRootState(props2, state2, showContentProps2, elementRef2, {
8081
8480
  locale: props2.locale
8082
8481
  });
8083
8482
  }, "EnableEditor_component_useTask_6_0CaFTUOgv08", [
8084
8483
  elementRef,
8085
8484
  props,
8485
+ showContentProps,
8086
8486
  state
8087
8487
  ]));
8088
8488
  return /* @__PURE__ */ _jsxC(Fragment, {
@@ -8091,69 +8491,58 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
8091
8491
  return props.apiKey;
8092
8492
  },
8093
8493
  get contentId() {
8094
- var _a;
8095
- return (_a = props.builderContextSignal.content) == null ? void 0 : _a.id;
8494
+ var _a2;
8495
+ return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.id;
8096
8496
  },
8097
8497
  get variationId() {
8098
- var _a;
8099
- return (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
8498
+ var _a2;
8499
+ return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.testVariationId;
8100
8500
  },
8101
8501
  onClick$: /* @__PURE__ */ inlinedQrl((event) => {
8102
- const [elementRef2, props2, state2] = useLexicalScope();
8103
- return onClick(props2, state2, elementRef2, event);
8502
+ const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
8503
+ return onClick(props2, state2, showContentProps2, elementRef2, event);
8104
8504
  }, "EnableEditor_component__Fragment_onClick_b4nYT3DrjEk", [
8105
8505
  elementRef,
8106
8506
  props,
8507
+ showContentProps,
8107
8508
  state
8108
8509
  ]),
8109
8510
  ref: elementRef,
8110
8511
  shouldTrack: String(props.builderContextSignal.content && getDefaultCanTrack(props.canTrack)),
8111
8512
  get "builder-content-id"() {
8112
- var _a;
8113
- return (_a = props.builderContextSignal.content) == null ? void 0 : _a.id;
8513
+ var _a2;
8514
+ return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.id;
8114
8515
  },
8115
8516
  get "builder-model"() {
8116
8517
  return props.model;
8117
8518
  },
8118
- ...props.showContent ? {} : {
8119
- hidden: true,
8120
- "aria-hidden": true
8121
- },
8519
+ ...showContentProps.value,
8122
8520
  ...props.contentWrapperProps,
8123
- get class() {
8124
- var _a, _b;
8125
- return `variant-${((_a = props.content) == null ? void 0 : _a.testVariationId) || ((_b = props.content) == null ? void 0 : _b.id)}`;
8126
- },
8127
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)),
8128
8523
  [_IMMUTABLE]: {
8129
8524
  apiKey: _fnSignal((p0) => p0.apiKey, [
8130
8525
  props
8131
8526
  ], "p0.apiKey"),
8132
8527
  "builder-content-id": _fnSignal((p0) => {
8133
- var _a;
8134
- return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.id;
8528
+ var _a2;
8529
+ return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.id;
8135
8530
  }, [
8136
8531
  props
8137
8532
  ], "p0.builderContextSignal.content?.id"),
8138
8533
  "builder-model": _fnSignal((p0) => p0.model, [
8139
8534
  props
8140
8535
  ], "p0.model"),
8141
- class: _fnSignal((p0) => {
8142
- var _a, _b;
8143
- return `variant-${((_a = p0.content) == null ? void 0 : _a.testVariationId) || ((_b = p0.content) == null ? void 0 : _b.id)}`;
8144
- }, [
8145
- props
8146
- ], "`variant-${p0.content?.testVariationId||p0.content?.id}`"),
8147
8536
  contentId: _fnSignal((p0) => {
8148
- var _a;
8149
- return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.id;
8537
+ var _a2;
8538
+ return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.id;
8150
8539
  }, [
8151
8540
  props
8152
8541
  ], "p0.builderContextSignal.content?.id"),
8153
8542
  ref: _IMMUTABLE,
8154
8543
  variationId: _fnSignal((p0) => {
8155
- var _a;
8156
- return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
8544
+ var _a2;
8545
+ return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.testVariationId;
8157
8546
  }, [
8158
8547
  props
8159
8548
  ], "p0.builderContextSignal.content?.testVariationId")
@@ -8161,71 +8550,6 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
8161
8550
  }, 0, "06_1") : null
8162
8551
  }, 1, "06_2");
8163
8552
  }, "EnableEditor_component_ko1mO8oaj8k"));
8164
- const getCssFromFont = (font) => {
8165
- var _a;
8166
- const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
8167
- const name = family.split(",")[0];
8168
- const url = font.fileUrl ?? ((_a = font == null ? void 0 : font.files) == null ? void 0 : _a.regular);
8169
- let str = "";
8170
- if (url && family && name)
8171
- str += `
8172
- @font-face {
8173
- font-family: "${family}";
8174
- src: local("${name}"), url('${url}') format('woff2');
8175
- font-display: fallback;
8176
- font-weight: 400;
8177
- }
8178
- `.trim();
8179
- if (font.files)
8180
- for (const weight in font.files) {
8181
- const isNumber = String(Number(weight)) === weight;
8182
- if (!isNumber)
8183
- continue;
8184
- const weightUrl = font.files[weight];
8185
- if (weightUrl && weightUrl !== url)
8186
- str += `
8187
- @font-face {
8188
- font-family: "${family}";
8189
- src: url('${weightUrl}') format('woff2');
8190
- font-display: fallback;
8191
- font-weight: ${weight};
8192
- }
8193
- `.trim();
8194
- }
8195
- return str;
8196
- };
8197
- const getFontCss = ({ customFonts }) => {
8198
- var _a;
8199
- return ((_a = customFonts == null ? void 0 : customFonts.map((font) => getCssFromFont(font))) == null ? void 0 : _a.join(" ")) || "";
8200
- };
8201
- const getCss = ({ cssCode, contentId }) => {
8202
- if (!cssCode)
8203
- return "";
8204
- if (!contentId)
8205
- return cssCode;
8206
- return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
8207
- };
8208
- const DEFAULT_STYLES = `
8209
- .builder-button {
8210
- all: unset;
8211
- }
8212
-
8213
- .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
8214
- margin: 0;
8215
- }
8216
- .builder-text > p, .builder-text > .builder-paragraph {
8217
- color: inherit;
8218
- line-height: inherit;
8219
- letter-spacing: inherit;
8220
- font-weight: inherit;
8221
- font-size: inherit;
8222
- text-align: inherit;
8223
- font-family: inherit;
8224
- }
8225
- `;
8226
- const getDefaultStyles = (isNested) => {
8227
- return !isNested ? DEFAULT_STYLES : "";
8228
- };
8229
8553
  const ContentStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
8230
8554
  const state = useStore({
8231
8555
  injectedStyles: `
@@ -8830,7 +9154,7 @@ const fetchSymbolContent = async ({ builderContextValue, symbol }) => {
8830
9154
  });
8831
9155
  return void 0;
8832
9156
  };
8833
- const setContent = function setContent2(props, state) {
9157
+ const setContent = function setContent2(props, state, blocksWrapper, contentWrapper, className) {
8834
9158
  if (state.contentToUse)
8835
9159
  return;
8836
9160
  fetchSymbolContent({
@@ -8843,6 +9167,12 @@ const setContent = function setContent2(props, state) {
8843
9167
  };
8844
9168
  const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
8845
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"));
8846
9176
  const className = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
8847
9177
  var _a2, _b;
8848
9178
  const [props2] = useLexicalScope();
@@ -8859,10 +9189,13 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
8859
9189
  contentToUse: (_a = props.symbol) == null ? void 0 : _a.content
8860
9190
  });
8861
9191
  useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
8862
- const [props2, state2] = useLexicalScope();
9192
+ const [blocksWrapper2, className2, contentWrapper2, props2, state2] = useLexicalScope();
8863
9193
  track2(() => props2.symbol);
8864
9194
  setContent(props2, state2);
8865
9195
  }, "Symbol_component_useTask_NIAWAC1bMBo", [
9196
+ blocksWrapper,
9197
+ className,
9198
+ contentWrapper,
8866
9199
  props,
8867
9200
  state
8868
9201
  ]));
@@ -8904,8 +9237,12 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
8904
9237
  get linkComponent() {
8905
9238
  return props.builderLinkComponent;
8906
9239
  },
8907
- blocksWrapper: "div",
8908
- contentWrapper: "div",
9240
+ get blocksWrapper() {
9241
+ return blocksWrapper.value;
9242
+ },
9243
+ get contentWrapper() {
9244
+ return contentWrapper.value;
9245
+ },
8909
9246
  [_IMMUTABLE]: {
8910
9247
  apiKey: _fnSignal((p0) => p0.builderContext.apiKey, [
8911
9248
  props
@@ -8913,11 +9250,15 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
8913
9250
  apiVersion: _fnSignal((p0) => p0.builderContext.apiVersion, [
8914
9251
  props
8915
9252
  ], "p0.builderContext.apiVersion"),
8916
- blocksWrapper: _IMMUTABLE,
9253
+ blocksWrapper: _fnSignal((p0) => p0.value, [
9254
+ blocksWrapper
9255
+ ], "p0.value"),
8917
9256
  content: _fnSignal((p0) => p0.contentToUse, [
8918
9257
  state
8919
9258
  ], "p0.contentToUse"),
8920
- contentWrapper: _IMMUTABLE,
9259
+ contentWrapper: _fnSignal((p0) => p0.value, [
9260
+ contentWrapper
9261
+ ], "p0.value"),
8921
9262
  context: _fnSignal((p0) => {
8922
9263
  var _a2;
8923
9264
  return {