@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.
@@ -53,22 +53,26 @@ const getClassPropName = () => {
53
53
  case "vue":
54
54
  case "solid":
55
55
  case "qwik":
56
+ case "angular":
56
57
  return "class";
57
58
  }
58
59
  };
60
+ const attrs = function attrs2(props, state) {
61
+ return {
62
+ ...props.attributes,
63
+ [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
64
+ ...props.link ? {
65
+ href: props.link,
66
+ target: props.openLinkInNewTab ? "_blank" : void 0,
67
+ role: "link"
68
+ } : {
69
+ role: "button"
70
+ }
71
+ };
72
+ };
59
73
  const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
60
74
  return /* @__PURE__ */ qwik._jsxC(DynamicRenderer, {
61
- attributes: {
62
- ...props.attributes,
63
- [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
64
- ...props.link ? {
65
- href: props.link,
66
- target: props.openLinkInNewTab ? "_blank" : void 0,
67
- role: "link"
68
- } : {
69
- role: "button"
70
- }
71
- },
75
+ attributes: attrs(props),
72
76
  get TagName() {
73
77
  return props.link ? props.builderLinkComponent || "a" : "button";
74
78
  },
@@ -688,6 +692,7 @@ function mapStyleObjToStrIfNeeded(style) {
688
692
  case "svelte":
689
693
  case "vue":
690
694
  case "solid":
695
+ case "angular":
691
696
  return convertStyleMapToCSSArray(style).join(" ");
692
697
  case "qwik":
693
698
  case "reactNative":
@@ -748,6 +753,23 @@ const getRepeatItemData = ({ block, context }) => {
748
753
  }));
749
754
  return repeatArray;
750
755
  };
756
+ const shouldPassLinkComponent = (blockName) => {
757
+ return blockName && [
758
+ "Core:Button",
759
+ "Symbol",
760
+ "Columns",
761
+ "Form:Form",
762
+ "Builder: Tabs"
763
+ ].includes(blockName);
764
+ };
765
+ const shouldPassRegisteredComponents = (blockName) => {
766
+ return blockName && [
767
+ "Symbol",
768
+ "Columns",
769
+ "Form:Form",
770
+ "Builder: Tabs"
771
+ ].includes(blockName);
772
+ };
751
773
  const SIZES = {
752
774
  small: {
753
775
  min: 320,
@@ -991,22 +1013,35 @@ const BlockWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
991
1013
  }, 1, "87_1");
992
1014
  }, "BlockWrapper_component_kOI0j0aW8Nw"));
993
1015
  const InteractiveElement = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
994
- return /* @__PURE__ */ qwik._jsxC(props.Wrapper, {
995
- ...props.wrapperProps,
996
- attributes: props.includeBlockProps ? {
1016
+ const attributes = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
1017
+ const [props2] = qwik.useLexicalScope();
1018
+ return props2.includeBlockProps ? {
997
1019
  ...getBlockProperties({
998
- block: props.block,
999
- context: props.context
1020
+ block: props2.block,
1021
+ context: props2.context
1000
1022
  }),
1001
1023
  ...getBlockActions({
1002
- block: props.block,
1003
- rootState: props.context.rootState,
1004
- rootSetState: props.context.rootSetState,
1005
- localState: props.context.localState,
1006
- context: props.context.context
1024
+ block: props2.block,
1025
+ rootState: props2.context.rootState,
1026
+ rootSetState: props2.context.rootSetState,
1027
+ localState: props2.context.localState,
1028
+ context: props2.context.context
1007
1029
  })
1008
- } : {},
1009
- children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "q0_0")
1030
+ } : {};
1031
+ }, "InteractiveElement_component_attributes_useComputed_0kUhl8Qa4CE", [
1032
+ props
1033
+ ]));
1034
+ return /* @__PURE__ */ qwik._jsxC(props.Wrapper, {
1035
+ ...props.wrapperProps,
1036
+ get attributes() {
1037
+ return attributes.value;
1038
+ },
1039
+ children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "q0_0"),
1040
+ [qwik._IMMUTABLE]: {
1041
+ attributes: qwik._fnSignal((p0) => p0.value, [
1042
+ attributes
1043
+ ], "p0.value")
1044
+ }
1010
1045
  }, 0, "q0_1");
1011
1046
  }, "InteractiveElement_component_0UqfJpjhn0g"));
1012
1047
  const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }) => {
@@ -1184,7 +1219,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
1184
1219
  repeatItem
1185
1220
  ]));
1186
1221
  const componentRefProps = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
1187
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
1222
+ var _a2, _b, _c, _d, _e;
1188
1223
  const [blockComponent2, processedBlock2, props2] = qwik.useLexicalScope();
1189
1224
  return {
1190
1225
  blockChildren: processedBlock2.value.children ?? [],
@@ -1192,10 +1227,10 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
1192
1227
  componentOptions: {
1193
1228
  ...getBlockComponentOptions(processedBlock2.value),
1194
1229
  builderContext: props2.context,
1195
- ...((_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" ? {
1230
+ ...shouldPassLinkComponent((_b = blockComponent2.value) == null ? void 0 : _b.name) ? {
1196
1231
  builderLinkComponent: props2.linkComponent
1197
1232
  } : {},
1198
- ...((_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" ? {
1233
+ ...shouldPassRegisteredComponents((_c = blockComponent2.value) == null ? void 0 : _c.name) ? {
1199
1234
  builderComponents: props2.registeredComponents
1200
1235
  } : {}
1201
1236
  },
@@ -1203,8 +1238,8 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
1203
1238
  linkComponent: props2.linkComponent,
1204
1239
  registeredComponents: props2.registeredComponents,
1205
1240
  builderBlock: processedBlock2.value,
1206
- includeBlockProps: ((_i = blockComponent2.value) == null ? void 0 : _i.noWrap) === true,
1207
- isInteractive: !((_j = blockComponent2.value) == null ? void 0 : _j.isRSC)
1241
+ includeBlockProps: ((_d = blockComponent2.value) == null ? void 0 : _d.noWrap) === true,
1242
+ isInteractive: !((_e = blockComponent2.value) == null ? void 0 : _e.isRSC)
1208
1243
  };
1209
1244
  }, "Block_component_componentRefProps_useComputed_Ikbl8VO04ho", [
1210
1245
  blockComponent,
@@ -1441,7 +1476,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
1441
1476
  }, 1, "jN_4") : null
1442
1477
  }, 1, "jN_5");
1443
1478
  }, "Block_component_nnPv0RY0U0k"));
1444
- const onClick$1 = function onClick2(props, state) {
1479
+ const onClick$1 = function onClick2(props, state, className) {
1445
1480
  var _a, _b;
1446
1481
  if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
1447
1482
  (_b = window.parent) == null ? void 0 : _b.postMessage({
@@ -1452,7 +1487,7 @@ const onClick$1 = function onClick2(props, state) {
1452
1487
  }
1453
1488
  }, "*");
1454
1489
  };
1455
- const onMouseEnter = function onMouseEnter2(props, state) {
1490
+ const onMouseEnter = function onMouseEnter2(props, state, className) {
1456
1491
  var _a, _b;
1457
1492
  if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
1458
1493
  (_b = window.parent) == null ? void 0 : _b.postMessage({
@@ -1487,23 +1522,26 @@ const BlocksWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
1487
1522
  return props.styleProp;
1488
1523
  },
1489
1524
  onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
1490
- const [props2, state2] = qwik.useLexicalScope();
1525
+ const [className2, props2, state2] = qwik.useLexicalScope();
1491
1526
  return onClick$1(props2);
1492
1527
  }, "BlocksWrapper_component_onClick_ufezvOupQrM", [
1528
+ className,
1493
1529
  props,
1494
1530
  state
1495
1531
  ]),
1496
1532
  onKeyPress$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
1497
- const [props2, state2] = qwik.useLexicalScope();
1533
+ const [className2, props2, state2] = qwik.useLexicalScope();
1498
1534
  return onClick$1(props2);
1499
1535
  }, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
1536
+ className,
1500
1537
  props,
1501
1538
  state
1502
1539
  ]),
1503
1540
  onMouseEnter$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
1504
- const [props2, state2] = qwik.useLexicalScope();
1541
+ const [className2, props2, state2] = qwik.useLexicalScope();
1505
1542
  return onMouseEnter(props2);
1506
1543
  }, "BlocksWrapper_component_onMouseEnter_j4FJjnLtraQ", [
1544
+ className,
1507
1545
  props,
1508
1546
  state
1509
1547
  ]),
@@ -1616,6 +1654,12 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
1616
1654
  function deoptSignal(value) {
1617
1655
  return value;
1618
1656
  }
1657
+ const getColumnsClass = (id) => {
1658
+ return `builder-columns ${id}-breakpoints`;
1659
+ };
1660
+ const getTagName = function getTagName2(props, state, column) {
1661
+ return column.link ? props.builderLinkComponent || "a" : "div";
1662
+ };
1619
1663
  const getWidth = function getWidth2(props, state, index) {
1620
1664
  var _a;
1621
1665
  return ((_a = state.cols[index]) == null ? void 0 : _a.width) || 100 / state.cols.length;
@@ -1630,6 +1674,15 @@ const getTabletStyle = function getTabletStyle2(props, state, { stackedStyle, de
1630
1674
  const getMobileStyle = function getMobileStyle2(props, state, { stackedStyle, desktopStyle }) {
1631
1675
  return state.stackAt === "never" ? desktopStyle : stackedStyle;
1632
1676
  };
1677
+ const columnsCssVars = function columnsCssVars2(props, state) {
1678
+ return {
1679
+ "--flex-dir": state.flexDir,
1680
+ "--flex-dir-tablet": getTabletStyle(props, state, {
1681
+ stackedStyle: state.flexDir,
1682
+ desktopStyle: "row"
1683
+ })
1684
+ };
1685
+ };
1633
1686
  const columnCssVars = function columnCssVars2(props, state, index) {
1634
1687
  const gutter = index === 0 ? 0 : state.gutterSize;
1635
1688
  const width = getColumnCssWidth(props, state, index);
@@ -1669,90 +1722,68 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
1669
1722
  const breakpointSizes = getSizesForBreakpoints(((_b = (_a = props.builderContext.content) == null ? void 0 : _a.meta) == null ? void 0 : _b.breakpoints) || {});
1670
1723
  return breakpointSizes[size].max;
1671
1724
  };
1672
- const Columns = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
1673
- qwik._jsxBranch();
1674
- const state = qwik.useStore({
1675
- cols: props.columns || [],
1676
- flexDir: props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column",
1677
- gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
1678
- stackAt: props.stackColumnsAt || "tablet"
1679
- });
1680
- qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_s7JLZz7MCCQ"));
1681
- const columnsCssVars = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
1682
- const [props2, state2] = qwik.useLexicalScope();
1683
- return {
1684
- "--flex-dir": state2.flexDir,
1685
- "--flex-dir-tablet": getTabletStyle(props2, state2, {
1686
- stackedStyle: state2.flexDir,
1687
- desktopStyle: "row"
1688
- })
1689
- };
1690
- }, "Columns_component_columnsCssVars_useComputed_adFEq2RWT9s", [
1691
- props,
1692
- state
1693
- ]));
1694
- const columnsStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
1695
- const [props2, state2] = qwik.useLexicalScope();
1696
- return `
1697
- @media (max-width: ${getWidthForBreakpointSize(props2, state2, "medium")}px) {
1698
- .${props2.builderBlock.id}-breakpoints {
1725
+ const columnsStyles = function columnsStyles2(props, state) {
1726
+ return `
1727
+ @media (max-width: ${getWidthForBreakpointSize(props, state, "medium")}px) {
1728
+ .${props.builderBlock.id}-breakpoints {
1699
1729
  flex-direction: var(--flex-dir-tablet);
1700
1730
  align-items: stretch;
1701
1731
  }
1702
1732
 
1703
- .${props2.builderBlock.id}-breakpoints > .builder-column {
1733
+ .${props.builderBlock.id}-breakpoints > .builder-column {
1704
1734
  width: var(--column-width-tablet) !important;
1705
1735
  margin-left: var(--column-margin-left-tablet) !important;
1706
1736
  }
1707
1737
  }
1708
1738
 
1709
- @media (max-width: ${getWidthForBreakpointSize(props2, state2, "small")}px) {
1710
- .${props2.builderBlock.id}-breakpoints {
1739
+ @media (max-width: ${getWidthForBreakpointSize(props, state, "small")}px) {
1740
+ .${props.builderBlock.id}-breakpoints {
1711
1741
  flex-direction: var(--flex-dir);
1712
1742
  align-items: stretch;
1713
1743
  }
1714
1744
 
1715
- .${props2.builderBlock.id}-breakpoints > .builder-column {
1745
+ .${props.builderBlock.id}-breakpoints > .builder-column {
1716
1746
  width: var(--column-width-mobile) !important;
1717
1747
  margin-left: var(--column-margin-left-mobile) !important;
1718
1748
  }
1719
1749
  },
1720
1750
  `;
1721
- }, "Columns_component_columnsStyles_useComputed_nBtMPbzd1Wc", [
1722
- props,
1723
- state
1724
- ]));
1725
- return /* @__PURE__ */ qwik._jsxQ("div", null, {
1726
- class: qwik._fnSignal((p0) => `builder-columns ${p0.builderBlock.id}-breakpoints div-Columns`, [
1727
- props
1728
- ], '`builder-columns ${p0.builderBlock.id}-breakpoints`+" div-Columns"'),
1729
- style: qwik._fnSignal((p0) => p0.value, [
1730
- columnsCssVars
1731
- ], "p0.value")
1732
- }, [
1751
+ };
1752
+ const getAttributes = function getAttributes2(props, state, column, index) {
1753
+ return {
1754
+ ...column.link ? {
1755
+ href: column.link
1756
+ } : {},
1757
+ [getClassPropName()]: "builder-column",
1758
+ style: mapStyleObjToStrIfNeeded(columnCssVars(props, state, index))
1759
+ };
1760
+ };
1761
+ const Columns = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
1762
+ var _a;
1763
+ qwik._jsxBranch();
1764
+ const state = qwik.useStore({
1765
+ cols: props.columns || [],
1766
+ flexDir: props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column",
1767
+ gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
1768
+ stackAt: props.stackColumnsAt || "tablet"
1769
+ });
1770
+ qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_s7JLZz7MCCQ"));
1771
+ return /* @__PURE__ */ qwik._jsxQ("div", {
1772
+ class: getColumnsClass((_a = props.builderBlock) == null ? void 0 : _a.id) + " div-Columns",
1773
+ style: columnsCssVars(props, state)
1774
+ }, null, [
1733
1775
  /* @__PURE__ */ qwik._jsxC(InlinedStyles, {
1734
1776
  id: "builderio-columns",
1735
- get styles() {
1736
- return columnsStyles.value;
1737
- },
1777
+ styles: columnsStyles(props, state),
1738
1778
  [qwik._IMMUTABLE]: {
1739
- id: qwik._IMMUTABLE,
1740
- styles: qwik._fnSignal((p0) => p0.value, [
1741
- columnsStyles
1742
- ], "p0.value")
1779
+ id: qwik._IMMUTABLE
1743
1780
  }
1744
1781
  }, 3, "c0_0"),
1745
1782
  (props.columns || []).map((column, index) => {
1746
1783
  return /* @__PURE__ */ qwik._jsxC(DynamicRenderer, {
1747
- TagName: column.link ? props.builderLinkComponent || "a" : "div",
1784
+ TagName: getTagName(props, state, column),
1748
1785
  actionAttributes: {},
1749
- attributes: {
1750
- ...column.link ? {
1751
- href: column.link
1752
- } : {},
1753
- [getClassPropName()]: "builder-column",
1754
- style: mapStyleObjToStrIfNeeded(columnCssVars(props, state, index))
1755
- },
1786
+ attributes: getAttributes(props, state, column, index),
1756
1787
  children: /* @__PURE__ */ qwik._jsxC(Blocks, {
1757
1788
  path: `component.options.columns.${index}.blocks`,
1758
1789
  get parent() {
@@ -1860,7 +1891,7 @@ function getSrcSet(url) {
1860
1891
  return url;
1861
1892
  }
1862
1893
  const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
1863
- var _a, _b, _c, _d;
1894
+ var _a, _b, _c, _d, _e, _f;
1864
1895
  qwik._jsxBranch();
1865
1896
  qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES$1, "Image_component_useStylesScoped_fBMYiVf9fuU"));
1866
1897
  const srcSetToUse = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
@@ -1956,7 +1987,7 @@ const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
1956
1987
  ], '{paddingTop:p0.aspectRatio*100+"%"}')
1957
1988
  }, null, 3, "0A_1") : null,
1958
1989
  ((_d = (_c = props.builderBlock) == null ? void 0 : _c.children) == null ? void 0 : _d.length) && props.fitContent ? /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "0A_2") : null,
1959
- !props.fitContent && props.children ? /* @__PURE__ */ qwik._jsxQ("div", null, {
1990
+ !props.fitContent && ((_f = (_e = props.builderBlock) == null ? void 0 : _e.children) == null ? void 0 : _f.length) ? /* @__PURE__ */ qwik._jsxQ("div", null, {
1960
1991
  class: "div-Image-2"
1961
1992
  }, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "0A_3"), 1, "0A_4") : null
1962
1993
  ]
@@ -2175,7 +2206,7 @@ const handleABTesting = async ({ item, canTrack }) => {
2175
2206
  };
2176
2207
  };
2177
2208
  const getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
2178
- const componentInfo$f = {
2209
+ const componentInfo$g = {
2179
2210
  name: "Core:Button",
2180
2211
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
2181
2212
  defaultStyles: {
@@ -2213,7 +2244,7 @@ const componentInfo$f = {
2213
2244
  static: true,
2214
2245
  noWrap: true
2215
2246
  };
2216
- const componentInfo$e = {
2247
+ const componentInfo$f = {
2217
2248
  // TODO: ways to statically preprocess JSON for references, functions, etc
2218
2249
  name: "Columns",
2219
2250
  isRSC: true,
@@ -2455,14 +2486,14 @@ const componentInfo$e = {
2455
2486
  }
2456
2487
  ]
2457
2488
  };
2458
- const componentInfo$d = {
2489
+ const componentInfo$e = {
2459
2490
  name: "Fragment",
2460
2491
  static: true,
2461
2492
  hidden: true,
2462
2493
  canHaveChildren: true,
2463
2494
  noWrap: true
2464
2495
  };
2465
- const componentInfo$c = {
2496
+ const componentInfo$d = {
2466
2497
  name: "Image",
2467
2498
  static: true,
2468
2499
  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",
@@ -2610,7 +2641,7 @@ const componentInfo$c = {
2610
2641
  }
2611
2642
  ]
2612
2643
  };
2613
- const componentInfo$b = {
2644
+ const componentInfo$c = {
2614
2645
  name: "Core:Section",
2615
2646
  static: true,
2616
2647
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -2655,7 +2686,7 @@ const componentInfo$b = {
2655
2686
  }
2656
2687
  ]
2657
2688
  };
2658
- const componentInfo$a = {
2689
+ const componentInfo$b = {
2659
2690
  name: "Slot",
2660
2691
  isRSC: true,
2661
2692
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -2710,7 +2741,7 @@ const Slot = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
2710
2741
  }
2711
2742
  }, 0, "B1_1");
2712
2743
  }, "Slot_component_WWgWgfV0bb0"));
2713
- const componentInfo$9 = {
2744
+ const componentInfo$a = {
2714
2745
  name: "Symbol",
2715
2746
  noWrap: true,
2716
2747
  static: true,
@@ -2750,6 +2781,282 @@ const componentInfo$9 = {
2750
2781
  }
2751
2782
  ]
2752
2783
  };
2784
+ const defaultTab = {
2785
+ "@type": "@builder.io/sdk:Element",
2786
+ responsiveStyles: {
2787
+ large: {
2788
+ paddingLeft: "20px",
2789
+ paddingRight: "20px",
2790
+ paddingTop: "10px",
2791
+ paddingBottom: "10px",
2792
+ minWidth: "100px",
2793
+ textAlign: "center",
2794
+ display: "flex",
2795
+ flexDirection: "column",
2796
+ cursor: "pointer",
2797
+ userSelect: "none"
2798
+ }
2799
+ },
2800
+ component: {
2801
+ name: "Text",
2802
+ options: {
2803
+ text: "New tab"
2804
+ }
2805
+ }
2806
+ };
2807
+ const defaultElement = {
2808
+ "@type": "@builder.io/sdk:Element",
2809
+ responsiveStyles: {
2810
+ large: {
2811
+ height: "200px",
2812
+ display: "flex",
2813
+ marginTop: "20px",
2814
+ flexDirection: "column"
2815
+ }
2816
+ },
2817
+ component: {
2818
+ name: "Text",
2819
+ options: {
2820
+ text: "New tab content "
2821
+ }
2822
+ }
2823
+ };
2824
+ const componentInfo$9 = {
2825
+ name: "Builder: Tabs",
2826
+ inputs: [
2827
+ {
2828
+ name: "tabs",
2829
+ type: "list",
2830
+ broadcast: true,
2831
+ subFields: [
2832
+ {
2833
+ name: "label",
2834
+ type: "uiBlocks",
2835
+ hideFromUI: true,
2836
+ defaultValue: [
2837
+ defaultTab
2838
+ ]
2839
+ },
2840
+ {
2841
+ name: "content",
2842
+ type: "uiBlocks",
2843
+ hideFromUI: true,
2844
+ defaultValue: [
2845
+ defaultElement
2846
+ ]
2847
+ }
2848
+ ],
2849
+ defaultValue: [
2850
+ {
2851
+ label: [
2852
+ {
2853
+ ...defaultTab,
2854
+ component: {
2855
+ name: "Text",
2856
+ options: {
2857
+ text: "Tab 1"
2858
+ }
2859
+ }
2860
+ }
2861
+ ],
2862
+ content: [
2863
+ {
2864
+ ...defaultElement,
2865
+ component: {
2866
+ name: "Text",
2867
+ options: {
2868
+ text: "Tab 1 content"
2869
+ }
2870
+ }
2871
+ }
2872
+ ]
2873
+ },
2874
+ {
2875
+ label: [
2876
+ {
2877
+ ...defaultTab,
2878
+ component: {
2879
+ name: "Text",
2880
+ options: {
2881
+ text: "Tab 2"
2882
+ }
2883
+ }
2884
+ }
2885
+ ],
2886
+ content: [
2887
+ {
2888
+ ...defaultElement,
2889
+ component: {
2890
+ name: "Text",
2891
+ options: {
2892
+ text: "Tab 2 content"
2893
+ }
2894
+ }
2895
+ }
2896
+ ]
2897
+ }
2898
+ ]
2899
+ },
2900
+ {
2901
+ name: "activeTabStyle",
2902
+ type: "uiStyle",
2903
+ helperText: "CSS styles for the active tab",
2904
+ defaultValue: {
2905
+ backgroundColor: "rgba(0, 0, 0, 0.1)"
2906
+ }
2907
+ },
2908
+ {
2909
+ name: "defaultActiveTab",
2910
+ type: "number",
2911
+ helperText: 'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',
2912
+ defaultValue: 1,
2913
+ advanced: true
2914
+ },
2915
+ {
2916
+ name: "collapsible",
2917
+ type: "boolean",
2918
+ helperText: "If on, clicking an open tab closes it so no tabs are active",
2919
+ defaultValue: false,
2920
+ advanced: true
2921
+ },
2922
+ {
2923
+ name: "tabHeaderLayout",
2924
+ type: "enum",
2925
+ helperText: "Change the layout of the tab headers (uses justify-content)",
2926
+ defaultValue: "flex-start",
2927
+ enum: [
2928
+ {
2929
+ label: "Center",
2930
+ value: "center"
2931
+ },
2932
+ {
2933
+ label: "Space between",
2934
+ value: "space-between"
2935
+ },
2936
+ {
2937
+ label: "Space around",
2938
+ value: "space-around"
2939
+ },
2940
+ {
2941
+ label: "Left",
2942
+ value: "flex-start"
2943
+ },
2944
+ {
2945
+ label: "Right",
2946
+ value: "flex-end"
2947
+ }
2948
+ ]
2949
+ }
2950
+ ]
2951
+ };
2952
+ const activeTabContent = function activeTabContent2(props, state, active) {
2953
+ return props.tabs && props.tabs[active].content;
2954
+ };
2955
+ const getActiveTabStyle = function getActiveTabStyle2(props, state, index) {
2956
+ return state.activeTab === index ? props.activeTabStyle : {};
2957
+ };
2958
+ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
2959
+ qwik._jsxBranch();
2960
+ const state = qwik.useStore({
2961
+ activeTab: props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
2962
+ });
2963
+ return /* @__PURE__ */ qwik._jsxQ("div", null, null, [
2964
+ /* @__PURE__ */ qwik._jsxQ("div", null, {
2965
+ class: "builder-tabs-wrap",
2966
+ style: qwik._fnSignal((p0) => ({
2967
+ display: "flex",
2968
+ flexDirection: "row",
2969
+ justifyContent: p0.tabHeaderLayout || "flex-start",
2970
+ overflow: "auto"
2971
+ }), [
2972
+ props
2973
+ ], '{display:"flex",flexDirection:"row",justifyContent:p0.tabHeaderLayout||"flex-start",overflow:"auto"}')
2974
+ }, (props.tabs || []).map((tab, index) => {
2975
+ return /* @__PURE__ */ qwik._jsxQ("span", {
2976
+ class: `builder-tab-wrap ${state.activeTab === index ? "builder-tab-active" : ""}`,
2977
+ onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
2978
+ const [index2, props2, state2] = qwik.useLexicalScope();
2979
+ if (index2 === state2.activeTab && props2.collapsible)
2980
+ state2.activeTab = -1;
2981
+ else
2982
+ state2.activeTab = index2;
2983
+ }, "Tabs_component_div_div_span_onClick_hSTBabAHGks", [
2984
+ index,
2985
+ props,
2986
+ state
2987
+ ]),
2988
+ style: getActiveTabStyle(props, state, index)
2989
+ }, null, /* @__PURE__ */ qwik._jsxC(Blocks, {
2990
+ get parent() {
2991
+ return props.builderBlock.id;
2992
+ },
2993
+ path: `component.options.tabs.${index}.label`,
2994
+ get blocks() {
2995
+ return tab.label;
2996
+ },
2997
+ get context() {
2998
+ return props.builderContext;
2999
+ },
3000
+ get registeredComponents() {
3001
+ return props.builderComponents;
3002
+ },
3003
+ get linkComponent() {
3004
+ return props.builderLinkComponent;
3005
+ },
3006
+ [qwik._IMMUTABLE]: {
3007
+ blocks: qwik._wrapProp(tab, "label"),
3008
+ context: qwik._fnSignal((p0) => p0.builderContext, [
3009
+ props
3010
+ ], "p0.builderContext"),
3011
+ linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
3012
+ props
3013
+ ], "p0.builderLinkComponent"),
3014
+ parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
3015
+ props
3016
+ ], "p0.builderBlock.id"),
3017
+ registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
3018
+ props
3019
+ ], "p0.builderComponents")
3020
+ }
3021
+ }, 3, "6k_0"), 0, index);
3022
+ }), 1, null),
3023
+ activeTabContent(props, state, state.activeTab) ? /* @__PURE__ */ qwik._jsxQ("div", null, null, /* @__PURE__ */ qwik._jsxC(Blocks, {
3024
+ get parent() {
3025
+ return props.builderBlock.id;
3026
+ },
3027
+ get path() {
3028
+ return `component.options.tabs.${state.activeTab}.content`;
3029
+ },
3030
+ blocks: activeTabContent(props, state, state.activeTab),
3031
+ get context() {
3032
+ return props.builderContext;
3033
+ },
3034
+ get registeredComponents() {
3035
+ return props.builderComponents;
3036
+ },
3037
+ get linkComponent() {
3038
+ return props.builderLinkComponent;
3039
+ },
3040
+ [qwik._IMMUTABLE]: {
3041
+ context: qwik._fnSignal((p0) => p0.builderContext, [
3042
+ props
3043
+ ], "p0.builderContext"),
3044
+ linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
3045
+ props
3046
+ ], "p0.builderLinkComponent"),
3047
+ parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
3048
+ props
3049
+ ], "p0.builderBlock.id"),
3050
+ path: qwik._fnSignal((p0) => `component.options.tabs.${p0.activeTab}.content`, [
3051
+ state
3052
+ ], "`component.options.tabs.${p0.activeTab}.content`"),
3053
+ registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
3054
+ props
3055
+ ], "p0.builderComponents")
3056
+ }
3057
+ }, 3, "6k_1"), 1, "6k_2") : null
3058
+ ], 1, "6k_3");
3059
+ }, "Tabs_component_MhWcxXy0lMY"));
2753
3060
  const componentInfo$8 = {
2754
3061
  name: "Text",
2755
3062
  static: true,
@@ -4029,36 +4336,42 @@ const getExtraComponents = () => [
4029
4336
  const getDefaultRegisteredComponents = () => [
4030
4337
  {
4031
4338
  component: Button,
4032
- ...componentInfo$f
4339
+ ...componentInfo$g
4033
4340
  },
4034
4341
  {
4035
4342
  component: Columns,
4036
- ...componentInfo$e
4343
+ ...componentInfo$f
4037
4344
  },
4038
4345
  {
4039
4346
  component: FragmentComponent,
4040
- ...componentInfo$d
4347
+ ...componentInfo$e
4041
4348
  },
4042
4349
  {
4043
4350
  component: Image,
4044
- ...componentInfo$c
4351
+ ...componentInfo$d
4045
4352
  },
4046
4353
  {
4047
4354
  component: SectionComponent,
4048
- ...componentInfo$b
4355
+ ...componentInfo$c
4049
4356
  },
4050
4357
  {
4051
4358
  component: Slot,
4052
- ...componentInfo$a
4359
+ ...componentInfo$b
4053
4360
  },
4054
4361
  {
4055
4362
  component: Symbol$1,
4056
- ...componentInfo$9
4363
+ ...componentInfo$a
4057
4364
  },
4058
4365
  {
4059
4366
  component: Text,
4060
4367
  ...componentInfo$8
4061
4368
  },
4369
+ ...[
4370
+ {
4371
+ component: Tabs,
4372
+ ...componentInfo$9
4373
+ }
4374
+ ],
4062
4375
  ...getExtraComponents()
4063
4376
  ];
4064
4377
  const createRegisterComponentMessage = (info) => ({
@@ -4504,7 +4817,7 @@ function isFromTrustedHost(trustedHosts, e) {
4504
4817
  const url = new URL(e.origin), hostname = url.hostname;
4505
4818
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
4506
4819
  }
4507
- const SDK_VERSION = "0.14.17";
4820
+ const SDK_VERSION = "0.14.18";
4508
4821
  const registry = {};
4509
4822
  function register(type, info) {
4510
4823
  let typeList = registry[type];
@@ -4687,7 +5000,75 @@ const subscribeToEditor = (model, callback, options) => {
4687
5000
  window.removeEventListener("message", listener);
4688
5001
  };
4689
5002
  };
4690
- const mergeNewRootState = function mergeNewRootState22(props, state, elementRef, newData) {
5003
+ const getCssFromFont = (font) => {
5004
+ var _a;
5005
+ const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
5006
+ const name = family.split(",")[0];
5007
+ const url = font.fileUrl ?? ((_a = font == null ? void 0 : font.files) == null ? void 0 : _a.regular);
5008
+ let str = "";
5009
+ if (url && family && name)
5010
+ str += `
5011
+ @font-face {
5012
+ font-family: "${family}";
5013
+ src: local("${name}"), url('${url}') format('woff2');
5014
+ font-display: fallback;
5015
+ font-weight: 400;
5016
+ }
5017
+ `.trim();
5018
+ if (font.files)
5019
+ for (const weight in font.files) {
5020
+ const isNumber = String(Number(weight)) === weight;
5021
+ if (!isNumber)
5022
+ continue;
5023
+ const weightUrl = font.files[weight];
5024
+ if (weightUrl && weightUrl !== url)
5025
+ str += `
5026
+ @font-face {
5027
+ font-family: "${family}";
5028
+ src: url('${weightUrl}') format('woff2');
5029
+ font-display: fallback;
5030
+ font-weight: ${weight};
5031
+ }
5032
+ `.trim();
5033
+ }
5034
+ return str;
5035
+ };
5036
+ const getFontCss = ({ customFonts }) => {
5037
+ var _a;
5038
+ return ((_a = customFonts == null ? void 0 : customFonts.map((font) => getCssFromFont(font))) == null ? void 0 : _a.join(" ")) || "";
5039
+ };
5040
+ const getCss = ({ cssCode, contentId }) => {
5041
+ if (!cssCode)
5042
+ return "";
5043
+ if (!contentId)
5044
+ return cssCode;
5045
+ return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
5046
+ };
5047
+ const DEFAULT_STYLES = `
5048
+ .builder-button {
5049
+ all: unset;
5050
+ }
5051
+
5052
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
5053
+ margin: 0;
5054
+ }
5055
+ .builder-text > p, .builder-text > .builder-paragraph {
5056
+ color: inherit;
5057
+ line-height: inherit;
5058
+ letter-spacing: inherit;
5059
+ font-weight: inherit;
5060
+ font-size: inherit;
5061
+ text-align: inherit;
5062
+ font-family: inherit;
5063
+ }
5064
+ `;
5065
+ const getDefaultStyles = (isNested) => {
5066
+ return !isNested ? DEFAULT_STYLES : "";
5067
+ };
5068
+ const getWrapperClassName = (variationId) => {
5069
+ return `variant-${variationId}`;
5070
+ };
5071
+ const mergeNewRootState = function mergeNewRootState22(props, state, showContentProps, elementRef, newData) {
4691
5072
  var _a, _b;
4692
5073
  const combinedState = {
4693
5074
  ...props.builderContextSignal.rootState,
@@ -4698,7 +5079,7 @@ const mergeNewRootState = function mergeNewRootState22(props, state, elementRef,
4698
5079
  else
4699
5080
  props.builderContextSignal.rootState = combinedState;
4700
5081
  };
4701
- const mergeNewContent = function mergeNewContent2(props, state, elementRef, newContent) {
5082
+ const mergeNewContent = function mergeNewContent2(props, state, showContentProps, elementRef, newContent) {
4702
5083
  var _a, _b, _c, _d, _e;
4703
5084
  const newContentValue = {
4704
5085
  ...props.builderContextSignal.content,
@@ -4715,7 +5096,7 @@ const mergeNewContent = function mergeNewContent2(props, state, elementRef, newC
4715
5096
  };
4716
5097
  props.builderContextSignal.content = newContentValue;
4717
5098
  };
4718
- const processMessage = function processMessage2(props, state, elementRef, event) {
5099
+ const processMessage = function processMessage2(props, state, showContentProps, elementRef, event) {
4719
5100
  return createEditorListener({
4720
5101
  model: props.model,
4721
5102
  trustedHosts: props.trustedHosts,
@@ -4726,7 +5107,7 @@ const processMessage = function processMessage2(props, state, elementRef, event)
4726
5107
  if (!contentId || contentId !== ((_a = props.builderContextSignal.content) == null ? void 0 : _a.id))
4727
5108
  return;
4728
5109
  if (breakpoints)
4729
- mergeNewContent(props, state, elementRef, {
5110
+ mergeNewContent(props, state, showContentProps, elementRef, {
4730
5111
  meta: {
4731
5112
  breakpoints
4732
5113
  }
@@ -4736,12 +5117,12 @@ const processMessage = function processMessage2(props, state, elementRef, event)
4736
5117
  triggerAnimation(animation);
4737
5118
  },
4738
5119
  contentUpdate: (newContent) => {
4739
- mergeNewContent(props, state, elementRef, newContent);
5120
+ mergeNewContent(props, state, showContentProps, elementRef, newContent);
4740
5121
  }
4741
5122
  }
4742
5123
  })(event);
4743
5124
  };
4744
- const evaluateJsCode = function evaluateJsCode2(props, state, elementRef) {
5125
+ const evaluateJsCode = function evaluateJsCode2(props, state, showContentProps, elementRef) {
4745
5126
  var _a, _b;
4746
5127
  const jsCode = (_b = (_a = props.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.jsCode;
4747
5128
  if (jsCode)
@@ -4757,7 +5138,7 @@ const evaluateJsCode = function evaluateJsCode2(props, state, elementRef) {
4757
5138
  enableCache: false
4758
5139
  });
4759
5140
  };
4760
- const onClick = function onClick22(props, state, elementRef, event) {
5141
+ const onClick = function onClick22(props, state, showContentProps, elementRef, event) {
4761
5142
  var _a, _b;
4762
5143
  if (props.builderContextSignal.content) {
4763
5144
  const variationId = (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
@@ -4775,7 +5156,7 @@ const onClick = function onClick22(props, state, elementRef, event) {
4775
5156
  if (!state.clicked)
4776
5157
  state.clicked = true;
4777
5158
  };
4778
- const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
5159
+ const runHttpRequests = function runHttpRequests2(props, state, showContentProps, elementRef) {
4779
5160
  var _a, _b;
4780
5161
  const requests = ((_b = (_a = props.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.httpRequests) ?? {};
4781
5162
  Object.entries(requests).forEach(([key, url]) => {
@@ -4795,7 +5176,7 @@ const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
4795
5176
  enableCache: true
4796
5177
  })));
4797
5178
  fetch$1(evaluatedUrl).then((response) => response.json()).then((json) => {
4798
- mergeNewRootState(props, state, elementRef, {
5179
+ mergeNewRootState(props, state, showContentProps, elementRef, {
4799
5180
  [key]: json
4800
5181
  });
4801
5182
  state.httpReqsData[key] = true;
@@ -4806,7 +5187,7 @@ const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
4806
5187
  });
4807
5188
  });
4808
5189
  };
4809
- const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
5190
+ const emitStateUpdate = function emitStateUpdate2(props, state, showContentProps, elementRef) {
4810
5191
  if (isEditing())
4811
5192
  window.dispatchEvent(new CustomEvent("builder:component:stateChange", {
4812
5193
  detail: {
@@ -4818,7 +5199,17 @@ const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
4818
5199
  }));
4819
5200
  };
4820
5201
  const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
5202
+ var _a, _b;
4821
5203
  qwik._jsxBranch();
5204
+ const showContentProps = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
5205
+ const [props2] = qwik.useLexicalScope();
5206
+ return props2.showContent ? {} : {
5207
+ hidden: true,
5208
+ "aria-hidden": true
5209
+ };
5210
+ }, "EnableEditor_component_showContentProps_useComputed_aHr3V0Y8sNs", [
5211
+ props
5212
+ ]));
4822
5213
  const elementRef = qwik.useSignal();
4823
5214
  const state = qwik.useStore({
4824
5215
  ContentWrapper: props.contentWrapper || "div",
@@ -4829,8 +5220,8 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4829
5220
  deep: true
4830
5221
  });
4831
5222
  qwik.useOn("initeditingbldr", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
4832
- const [elementRef2, props2, state2] = qwik.useLexicalScope();
4833
- window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
5223
+ const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
5224
+ window.addEventListener("message", processMessage.bind(null, props2, state2, showContentProps2, elementRef2));
4834
5225
  registerInsertMenu();
4835
5226
  setupBrowserForEditing({
4836
5227
  ...props2.locale ? {
@@ -4844,18 +5235,19 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4844
5235
  } : {}
4845
5236
  });
4846
5237
  Object.values(props2.builderContextSignal.componentInfos).forEach((registeredComponent) => {
4847
- var _a;
5238
+ var _a2;
4848
5239
  const message = createRegisterComponentMessage(registeredComponent);
4849
- (_a = window.parent) == null ? void 0 : _a.postMessage(message, "*");
5240
+ (_a2 = window.parent) == null ? void 0 : _a2.postMessage(message, "*");
4850
5241
  });
4851
- window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
5242
+ window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, showContentProps2, elementRef2));
4852
5243
  }, "EnableEditor_component_useOn_Qs8c0yql2i0", [
4853
5244
  elementRef,
4854
5245
  props,
5246
+ showContentProps,
4855
5247
  state
4856
5248
  ]));
4857
5249
  qwik.useOn("initpreviewingbldr", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
4858
- const [elementRef2, props2, state2] = qwik.useLexicalScope();
5250
+ const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
4859
5251
  const searchParams = new URL(location.href).searchParams;
4860
5252
  const searchParamPreviewModel = searchParams.get("builder.preview");
4861
5253
  const searchParamPreviewId = searchParams.get(`builder.preview.${searchParamPreviewModel}`);
@@ -4867,23 +5259,24 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4867
5259
  apiVersion: props2.builderContextSignal.apiVersion
4868
5260
  }).then((content) => {
4869
5261
  if (content)
4870
- mergeNewContent(props2, state2, elementRef2, content);
5262
+ mergeNewContent(props2, state2, showContentProps2, elementRef2, content);
4871
5263
  });
4872
5264
  }, "EnableEditor_component_useOn_1_F94YipmknvI", [
4873
5265
  elementRef,
4874
5266
  props,
5267
+ showContentProps,
4875
5268
  state
4876
5269
  ]));
4877
5270
  qwik.useOn("qvisible", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
4878
- var _a, _b, _c, _d;
5271
+ var _a2, _b2, _c, _d;
4879
5272
  if (isBrowser()) {
4880
5273
  if (isEditing()) {
4881
5274
  if (element)
4882
5275
  element.dispatchEvent(new CustomEvent("initeditingbldr"));
4883
5276
  }
4884
- const shouldTrackImpression = ((_a = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a.value) === "true";
5277
+ const shouldTrackImpression = ((_a2 = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a2.value) === "true";
4885
5278
  if (shouldTrackImpression) {
4886
- const variationId = (_b = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b.value;
5279
+ const variationId = (_b2 = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b2.value;
4887
5280
  const contentId = (_c = element.attributes.getNamedItem("contentId")) == null ? void 0 : _c.value;
4888
5281
  const apiKeyProp = (_d = element.attributes.getNamedItem("apiKey")) == null ? void 0 : _d.value;
4889
5282
  _track({
@@ -4902,80 +5295,87 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4902
5295
  }, "EnableEditor_component_useOn_2_FyR0YPSlJlw"));
4903
5296
  qwik.useContextProvider(builderContext, props.builderContextSignal);
4904
5297
  qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
4905
- const [elementRef2, props2, state2] = qwik.useLexicalScope();
5298
+ const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
4906
5299
  if (!props2.apiKey)
4907
5300
  logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
4908
5301
  evaluateJsCode(props2);
4909
- runHttpRequests(props2, state2, elementRef2);
5302
+ runHttpRequests(props2, state2, showContentProps2, elementRef2);
4910
5303
  emitStateUpdate(props2);
4911
5304
  }, "EnableEditor_component_useTask_Nb2VI04qp0M", [
4912
5305
  elementRef,
4913
5306
  props,
5307
+ showContentProps,
4914
5308
  state
4915
5309
  ]));
4916
5310
  qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
4917
- const [elementRef2, props2, state2] = qwik.useLexicalScope();
5311
+ const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
4918
5312
  track2(() => props2.content);
4919
5313
  if (props2.content)
4920
- mergeNewContent(props2, state2, elementRef2, props2.content);
5314
+ mergeNewContent(props2, state2, showContentProps2, elementRef2, props2.content);
4921
5315
  }, "EnableEditor_component_useTask_1_m0y1Z9vk4eQ", [
4922
5316
  elementRef,
4923
5317
  props,
5318
+ showContentProps,
4924
5319
  state
4925
5320
  ]));
4926
5321
  qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
4927
- const [elementRef2, props2, state2] = qwik.useLexicalScope();
5322
+ const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
4928
5323
  track2(() => {
4929
- var _a, _b;
4930
- return (_b = (_a = props2.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.jsCode;
5324
+ var _a2, _b2;
5325
+ return (_b2 = (_a2 = props2.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.jsCode;
4931
5326
  });
4932
5327
  evaluateJsCode(props2);
4933
5328
  }, "EnableEditor_component_useTask_2_xVyv0tDqZLs", [
4934
5329
  elementRef,
4935
5330
  props,
5331
+ showContentProps,
4936
5332
  state
4937
5333
  ]));
4938
5334
  qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
4939
- const [elementRef2, props2, state2] = qwik.useLexicalScope();
5335
+ const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
4940
5336
  track2(() => {
4941
- var _a, _b;
4942
- return (_b = (_a = props2.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.httpRequests;
5337
+ var _a2, _b2;
5338
+ return (_b2 = (_a2 = props2.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.httpRequests;
4943
5339
  });
4944
- runHttpRequests(props2, state2, elementRef2);
5340
+ runHttpRequests(props2, state2, showContentProps2, elementRef2);
4945
5341
  }, "EnableEditor_component_useTask_3_bQ0e5LHZwWE", [
4946
5342
  elementRef,
4947
5343
  props,
5344
+ showContentProps,
4948
5345
  state
4949
5346
  ]));
4950
5347
  qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
4951
- const [elementRef2, props2, state2] = qwik.useLexicalScope();
5348
+ const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
4952
5349
  track2(() => props2.builderContextSignal.rootState);
4953
5350
  emitStateUpdate(props2);
4954
5351
  }, "EnableEditor_component_useTask_4_moHYZG8uNVU", [
4955
5352
  elementRef,
4956
5353
  props,
5354
+ showContentProps,
4957
5355
  state
4958
5356
  ]));
4959
5357
  qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
4960
- const [elementRef2, props2, state2] = qwik.useLexicalScope();
5358
+ const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
4961
5359
  track2(() => props2.data);
4962
5360
  if (props2.data)
4963
- mergeNewRootState(props2, state2, elementRef2, props2.data);
5361
+ mergeNewRootState(props2, state2, showContentProps2, elementRef2, props2.data);
4964
5362
  }, "EnableEditor_component_useTask_5_24QxS0r0KF8", [
4965
5363
  elementRef,
4966
5364
  props,
5365
+ showContentProps,
4967
5366
  state
4968
5367
  ]));
4969
5368
  qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
4970
- const [elementRef2, props2, state2] = qwik.useLexicalScope();
5369
+ const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
4971
5370
  track2(() => props2.locale);
4972
5371
  if (props2.locale)
4973
- mergeNewRootState(props2, state2, elementRef2, {
5372
+ mergeNewRootState(props2, state2, showContentProps2, elementRef2, {
4974
5373
  locale: props2.locale
4975
5374
  });
4976
5375
  }, "EnableEditor_component_useTask_6_0CaFTUOgv08", [
4977
5376
  elementRef,
4978
5377
  props,
5378
+ showContentProps,
4979
5379
  state
4980
5380
  ]));
4981
5381
  return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
@@ -4984,69 +5384,58 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4984
5384
  return props.apiKey;
4985
5385
  },
4986
5386
  get contentId() {
4987
- var _a;
4988
- return (_a = props.builderContextSignal.content) == null ? void 0 : _a.id;
5387
+ var _a2;
5388
+ return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.id;
4989
5389
  },
4990
5390
  get variationId() {
4991
- var _a;
4992
- return (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
5391
+ var _a2;
5392
+ return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.testVariationId;
4993
5393
  },
4994
5394
  onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
4995
- const [elementRef2, props2, state2] = qwik.useLexicalScope();
4996
- return onClick(props2, state2, elementRef2, event);
5395
+ const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
5396
+ return onClick(props2, state2, showContentProps2, elementRef2, event);
4997
5397
  }, "EnableEditor_component__Fragment_onClick_b4nYT3DrjEk", [
4998
5398
  elementRef,
4999
5399
  props,
5400
+ showContentProps,
5000
5401
  state
5001
5402
  ]),
5002
5403
  ref: elementRef,
5003
5404
  shouldTrack: String(props.builderContextSignal.content && getDefaultCanTrack(props.canTrack)),
5004
5405
  get "builder-content-id"() {
5005
- var _a;
5006
- return (_a = props.builderContextSignal.content) == null ? void 0 : _a.id;
5406
+ var _a2;
5407
+ return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.id;
5007
5408
  },
5008
5409
  get "builder-model"() {
5009
5410
  return props.model;
5010
5411
  },
5011
- ...props.showContent ? {} : {
5012
- hidden: true,
5013
- "aria-hidden": true
5014
- },
5412
+ ...showContentProps.value,
5015
5413
  ...props.contentWrapperProps,
5016
- get class() {
5017
- var _a, _b;
5018
- return `variant-${((_a = props.content) == null ? void 0 : _a.testVariationId) || ((_b = props.content) == null ? void 0 : _b.id)}`;
5019
- },
5020
5414
  children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "06_0"),
5415
+ class: getWrapperClassName(((_a = props.content) == null ? void 0 : _a.testVariationId) || ((_b = props.content) == null ? void 0 : _b.id)),
5021
5416
  [qwik._IMMUTABLE]: {
5022
5417
  apiKey: qwik._fnSignal((p0) => p0.apiKey, [
5023
5418
  props
5024
5419
  ], "p0.apiKey"),
5025
5420
  "builder-content-id": qwik._fnSignal((p0) => {
5026
- var _a;
5027
- return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.id;
5421
+ var _a2;
5422
+ return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.id;
5028
5423
  }, [
5029
5424
  props
5030
5425
  ], "p0.builderContextSignal.content?.id"),
5031
5426
  "builder-model": qwik._fnSignal((p0) => p0.model, [
5032
5427
  props
5033
5428
  ], "p0.model"),
5034
- class: qwik._fnSignal((p0) => {
5035
- var _a, _b;
5036
- return `variant-${((_a = p0.content) == null ? void 0 : _a.testVariationId) || ((_b = p0.content) == null ? void 0 : _b.id)}`;
5037
- }, [
5038
- props
5039
- ], "`variant-${p0.content?.testVariationId||p0.content?.id}`"),
5040
5429
  contentId: qwik._fnSignal((p0) => {
5041
- var _a;
5042
- return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.id;
5430
+ var _a2;
5431
+ return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.id;
5043
5432
  }, [
5044
5433
  props
5045
5434
  ], "p0.builderContextSignal.content?.id"),
5046
5435
  ref: qwik._IMMUTABLE,
5047
5436
  variationId: qwik._fnSignal((p0) => {
5048
- var _a;
5049
- return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
5437
+ var _a2;
5438
+ return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.testVariationId;
5050
5439
  }, [
5051
5440
  props
5052
5441
  ], "p0.builderContextSignal.content?.testVariationId")
@@ -5054,71 +5443,6 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
5054
5443
  }, 0, "06_1") : null
5055
5444
  }, 1, "06_2");
5056
5445
  }, "EnableEditor_component_ko1mO8oaj8k"));
5057
- const getCssFromFont = (font) => {
5058
- var _a;
5059
- const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
5060
- const name = family.split(",")[0];
5061
- const url = font.fileUrl ?? ((_a = font == null ? void 0 : font.files) == null ? void 0 : _a.regular);
5062
- let str = "";
5063
- if (url && family && name)
5064
- str += `
5065
- @font-face {
5066
- font-family: "${family}";
5067
- src: local("${name}"), url('${url}') format('woff2');
5068
- font-display: fallback;
5069
- font-weight: 400;
5070
- }
5071
- `.trim();
5072
- if (font.files)
5073
- for (const weight in font.files) {
5074
- const isNumber = String(Number(weight)) === weight;
5075
- if (!isNumber)
5076
- continue;
5077
- const weightUrl = font.files[weight];
5078
- if (weightUrl && weightUrl !== url)
5079
- str += `
5080
- @font-face {
5081
- font-family: "${family}";
5082
- src: url('${weightUrl}') format('woff2');
5083
- font-display: fallback;
5084
- font-weight: ${weight};
5085
- }
5086
- `.trim();
5087
- }
5088
- return str;
5089
- };
5090
- const getFontCss = ({ customFonts }) => {
5091
- var _a;
5092
- return ((_a = customFonts == null ? void 0 : customFonts.map((font) => getCssFromFont(font))) == null ? void 0 : _a.join(" ")) || "";
5093
- };
5094
- const getCss = ({ cssCode, contentId }) => {
5095
- if (!cssCode)
5096
- return "";
5097
- if (!contentId)
5098
- return cssCode;
5099
- return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
5100
- };
5101
- const DEFAULT_STYLES = `
5102
- .builder-button {
5103
- all: unset;
5104
- }
5105
-
5106
- .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
5107
- margin: 0;
5108
- }
5109
- .builder-text > p, .builder-text > .builder-paragraph {
5110
- color: inherit;
5111
- line-height: inherit;
5112
- letter-spacing: inherit;
5113
- font-weight: inherit;
5114
- font-size: inherit;
5115
- text-align: inherit;
5116
- font-family: inherit;
5117
- }
5118
- `;
5119
- const getDefaultStyles = (isNested) => {
5120
- return !isNested ? DEFAULT_STYLES : "";
5121
- };
5122
5446
  const ContentStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
5123
5447
  const state = qwik.useStore({
5124
5448
  injectedStyles: `
@@ -5723,7 +6047,7 @@ const fetchSymbolContent = async ({ builderContextValue, symbol }) => {
5723
6047
  });
5724
6048
  return void 0;
5725
6049
  };
5726
- const setContent = function setContent2(props, state) {
6050
+ const setContent = function setContent2(props, state, blocksWrapper, contentWrapper, className) {
5727
6051
  if (state.contentToUse)
5728
6052
  return;
5729
6053
  fetchSymbolContent({
@@ -5736,6 +6060,12 @@ const setContent = function setContent2(props, state) {
5736
6060
  };
5737
6061
  const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
5738
6062
  var _a;
6063
+ const blocksWrapper = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
6064
+ return "div";
6065
+ }, "Symbol_component_blocksWrapper_useComputed_B5dlF985gMM"));
6066
+ const contentWrapper = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
6067
+ return "div";
6068
+ }, "Symbol_component_contentWrapper_useComputed_EvmPpPj8JTo"));
5739
6069
  const className = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
5740
6070
  var _a2, _b;
5741
6071
  const [props2] = qwik.useLexicalScope();
@@ -5752,10 +6082,13 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
5752
6082
  contentToUse: (_a = props.symbol) == null ? void 0 : _a.content
5753
6083
  });
5754
6084
  qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
5755
- const [props2, state2] = qwik.useLexicalScope();
6085
+ const [blocksWrapper2, className2, contentWrapper2, props2, state2] = qwik.useLexicalScope();
5756
6086
  track2(() => props2.symbol);
5757
6087
  setContent(props2, state2);
5758
6088
  }, "Symbol_component_useTask_NIAWAC1bMBo", [
6089
+ blocksWrapper,
6090
+ className,
6091
+ contentWrapper,
5759
6092
  props,
5760
6093
  state
5761
6094
  ]));
@@ -5797,8 +6130,12 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
5797
6130
  get linkComponent() {
5798
6131
  return props.builderLinkComponent;
5799
6132
  },
5800
- blocksWrapper: "div",
5801
- contentWrapper: "div",
6133
+ get blocksWrapper() {
6134
+ return blocksWrapper.value;
6135
+ },
6136
+ get contentWrapper() {
6137
+ return contentWrapper.value;
6138
+ },
5802
6139
  [qwik._IMMUTABLE]: {
5803
6140
  apiKey: qwik._fnSignal((p0) => p0.builderContext.apiKey, [
5804
6141
  props
@@ -5806,11 +6143,15 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
5806
6143
  apiVersion: qwik._fnSignal((p0) => p0.builderContext.apiVersion, [
5807
6144
  props
5808
6145
  ], "p0.builderContext.apiVersion"),
5809
- blocksWrapper: qwik._IMMUTABLE,
6146
+ blocksWrapper: qwik._fnSignal((p0) => p0.value, [
6147
+ blocksWrapper
6148
+ ], "p0.value"),
5810
6149
  content: qwik._fnSignal((p0) => p0.contentToUse, [
5811
6150
  state
5812
6151
  ], "p0.contentToUse"),
5813
- contentWrapper: qwik._IMMUTABLE,
6152
+ contentWrapper: qwik._fnSignal((p0) => p0.value, [
6153
+ contentWrapper
6154
+ ], "p0.value"),
5814
6155
  context: qwik._fnSignal((p0) => {
5815
6156
  var _a2;
5816
6157
  return {