@builder.io/sdk-solid 1.0.27 → 1.0.29

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.
@@ -3623,6 +3623,9 @@ function getProcessedBlock({
3623
3623
  }
3624
3624
  }
3625
3625
 
3626
+ // src/functions/camel-to-kebab-case.ts
3627
+ var camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
3628
+
3626
3629
  // src/components/block/animator.ts
3627
3630
  function throttle(func, wait, options = {}) {
3628
3631
  let context;
@@ -3673,7 +3676,6 @@ function assign(target, ..._args) {
3673
3676
  }
3674
3677
  return to;
3675
3678
  }
3676
- var camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
3677
3679
  function bindAnimations(animations) {
3678
3680
  for (const animation of animations) {
3679
3681
  switch (animation.trigger) {
@@ -3725,7 +3727,7 @@ function triggerAnimation(animation) {
3725
3727
  element.style.transitionDelay = "0";
3726
3728
  assign(element.style, animation.steps[0].styles);
3727
3729
  setTimeout(() => {
3728
- element.style.transition = `all ${animation.duration}s ${camelCaseToKebabCase(animation.easing)}`;
3730
+ element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
3729
3731
  if (animation.delay) {
3730
3732
  element.style.transitionDelay = animation.delay + "s";
3731
3733
  }
@@ -3785,7 +3787,7 @@ function bindScrollInViewAnimation(animation) {
3785
3787
  }
3786
3788
  attachDefaultState();
3787
3789
  setTimeout(() => {
3788
- element.style.transition = `all ${animation.duration}s ${camelCaseToKebabCase(animation.easing)}`;
3790
+ element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
3789
3791
  if (animation.delay) {
3790
3792
  element.style.transitionDelay = animation.delay + "s";
3791
3793
  }
@@ -3798,9 +3800,6 @@ function bindScrollInViewAnimation(animation) {
3798
3800
  });
3799
3801
  }
3800
3802
 
3801
- // src/functions/camel-to-kebab-case.ts
3802
- var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
3803
-
3804
3803
  // src/helpers/css.ts
3805
3804
  var convertStyleMapToCSSArray = (style) => {
3806
3805
  const cssProps = Object.entries(style).map(([key, value]) => {
@@ -3927,10 +3926,10 @@ var getRepeatItemData = ({
3927
3926
  return repeatArray;
3928
3927
  };
3929
3928
  var shouldPassLinkComponent = (block) => {
3930
- return block && (block.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(block.name));
3929
+ return block && (block.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(block.name));
3931
3930
  };
3932
3931
  var shouldPassRegisteredComponents = (block) => {
3933
- return block && (block.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(block.name));
3932
+ return block && (block.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(block.name));
3934
3933
  };
3935
3934
 
3936
3935
  // src/components/block/components/block-styles.tsx
@@ -4059,7 +4058,7 @@ function BlockStyles(props) {
4059
4058
  className: `${className}:hover`,
4060
4059
  styles: {
4061
4060
  ...hoverStyles,
4062
- transition: `all ${hoverAnimation.duration}s ${camelCaseToKebabCase(
4061
+ transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(
4063
4062
  hoverAnimation.easing
4064
4063
  )}`,
4065
4064
  transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
@@ -4823,10 +4822,10 @@ function SectionComponent(props) {
4823
4822
  var section_default = SectionComponent;
4824
4823
 
4825
4824
  // src/blocks/symbol/symbol.tsx
4826
- import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as createMemo18, createSignal as createSignal18 } from "solid-js";
4825
+ import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as createMemo19, createSignal as createSignal19 } from "solid-js";
4827
4826
 
4828
4827
  // src/components/content-variants/content-variants.tsx
4829
- import { Show as Show13, For as For8, onMount as onMount4, createSignal as createSignal17, createMemo as createMemo17 } from "solid-js";
4828
+ import { Show as Show14, For as For9, onMount as onMount4, createSignal as createSignal18, createMemo as createMemo18 } from "solid-js";
4830
4829
 
4831
4830
  // src/helpers/url.ts
4832
4831
  var getTopLevelDomain = (host) => {
@@ -5020,10 +5019,286 @@ var handleABTesting = async ({
5020
5019
  var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
5021
5020
 
5022
5021
  // src/components/content/content.tsx
5023
- import { Show as Show12, createSignal as createSignal16 } from "solid-js";
5022
+ import { Show as Show13, createSignal as createSignal17 } from "solid-js";
5024
5023
 
5025
- // src/blocks/button/component-info.ts
5024
+ // src/blocks/accordion/component-info.ts
5025
+ var defaultTitle = {
5026
+ "@type": "@builder.io/sdk:Element",
5027
+ layerName: "Accordion item title",
5028
+ responsiveStyles: {
5029
+ large: {
5030
+ marginTop: "10px",
5031
+ position: "relative",
5032
+ display: "flex",
5033
+ alignItems: "stretch",
5034
+ flexDirection: "column",
5035
+ paddingBottom: "10px"
5036
+ }
5037
+ },
5038
+ children: [{
5039
+ "@type": "@builder.io/sdk:Element",
5040
+ responsiveStyles: {
5041
+ large: {
5042
+ textAlign: "left",
5043
+ display: "flex",
5044
+ flexDirection: "column"
5045
+ }
5046
+ },
5047
+ component: {
5048
+ name: "Text",
5049
+ options: {
5050
+ text: "I am an accordion title. Click me!"
5051
+ }
5052
+ }
5053
+ }]
5054
+ };
5055
+ var defaultDetail = {
5056
+ "@type": "@builder.io/sdk:Element",
5057
+ layerName: "Accordion item detail",
5058
+ responsiveStyles: {
5059
+ large: {
5060
+ position: "relative",
5061
+ display: "flex",
5062
+ alignItems: "stretch",
5063
+ flexDirection: "column",
5064
+ marginTop: "10px",
5065
+ paddingBottom: "10px"
5066
+ }
5067
+ },
5068
+ children: [{
5069
+ "@type": "@builder.io/sdk:Element",
5070
+ responsiveStyles: {
5071
+ large: {
5072
+ paddingTop: "50px",
5073
+ textAlign: "left",
5074
+ display: "flex",
5075
+ flexDirection: "column",
5076
+ paddingBottom: "50px"
5077
+ }
5078
+ },
5079
+ component: {
5080
+ name: "Text",
5081
+ options: {
5082
+ text: "I am an accordion detail, hello!"
5083
+ }
5084
+ }
5085
+ }]
5086
+ };
5026
5087
  var componentInfo = {
5088
+ name: "Builder:Accordion",
5089
+ canHaveChildren: true,
5090
+ image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
5091
+ defaultStyles: {
5092
+ display: "flex",
5093
+ flexDirection: "column",
5094
+ alignItems: "stretch"
5095
+ },
5096
+ inputs: [{
5097
+ name: "items",
5098
+ type: "list",
5099
+ broadcast: true,
5100
+ subFields: [{
5101
+ name: "title",
5102
+ type: "uiBlocks",
5103
+ hideFromUI: true,
5104
+ defaultValue: [defaultTitle]
5105
+ }, {
5106
+ name: "detail",
5107
+ type: "uiBlocks",
5108
+ hideFromUI: true,
5109
+ defaultValue: [defaultDetail]
5110
+ }],
5111
+ defaultValue: [{
5112
+ title: [defaultTitle],
5113
+ detail: [defaultDetail]
5114
+ }, {
5115
+ title: [defaultTitle],
5116
+ detail: [defaultDetail]
5117
+ }],
5118
+ showIf: (options) => !options.get("useChildrenForItems")
5119
+ }, {
5120
+ name: "oneAtATime",
5121
+ helperText: "Only allow opening one at a time (collapse all others when new item openned)",
5122
+ type: "boolean",
5123
+ defaultValue: false
5124
+ }, {
5125
+ name: "grid",
5126
+ helperText: "Display as a grid",
5127
+ type: "boolean",
5128
+ defaultValue: false
5129
+ }, {
5130
+ name: "gridRowWidth",
5131
+ helperText: "Display as a grid",
5132
+ type: "string",
5133
+ showIf: (options) => options.get("grid"),
5134
+ defaultValue: "25%"
5135
+ }, {
5136
+ name: "useChildrenForItems",
5137
+ type: "boolean",
5138
+ helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
5139
+ advanced: true,
5140
+ defaultValue: false,
5141
+ onChange: (options) => {
5142
+ if (options.get("useChildrenForItems") === true) {
5143
+ options.set("items", []);
5144
+ }
5145
+ }
5146
+ }]
5147
+ };
5148
+
5149
+ // src/blocks/accordion/accordion.tsx
5150
+ import { Show as Show8, For as For5, createSignal as createSignal9, createMemo as createMemo9 } from "solid-js";
5151
+
5152
+ // src/blocks/accordion/helpers.ts
5153
+ var convertOrderNumberToString = (order) => {
5154
+ return order.toString();
5155
+ };
5156
+
5157
+ // src/blocks/accordion/accordion.tsx
5158
+ function Accordion(props) {
5159
+ const [open, setOpen] = createSignal9([]);
5160
+ const onlyOneAtATime = createMemo9(() => {
5161
+ return Boolean(props.grid || props.oneAtATime);
5162
+ });
5163
+ const accordionStyles = createMemo9(() => {
5164
+ const styles = {
5165
+ display: "flex",
5166
+ alignItems: "stretch",
5167
+ flexDirection: "column",
5168
+ ...props.grid && {
5169
+ flexDirection: "row",
5170
+ alignItems: "flex-start",
5171
+ flexWrap: "wrap"
5172
+ }
5173
+ };
5174
+ return Object.fromEntries(
5175
+ Object.entries(styles).map(([key, value]) => [
5176
+ camelToKebabCase(key),
5177
+ value
5178
+ ])
5179
+ );
5180
+ });
5181
+ const accordionTitleStyles = createMemo9(() => {
5182
+ const shared = {
5183
+ display: "flex",
5184
+ flexDirection: "column"
5185
+ };
5186
+ const styles = Object.fromEntries(
5187
+ Object.entries({
5188
+ ...shared,
5189
+ alignItems: "stretch",
5190
+ cursor: "pointer"
5191
+ }).map(([key, value]) => [camelToKebabCase(key), value])
5192
+ );
5193
+ return Object.fromEntries(
5194
+ Object.entries(styles).filter(([_, value]) => value !== void 0)
5195
+ );
5196
+ });
5197
+ function getAccordionTitleClassName(index) {
5198
+ return `builder-accordion-title builder-accordion-title-${open().includes(index) ? "open" : "closed"}`;
5199
+ }
5200
+ function getAccordionDetailClassName(index) {
5201
+ return `builder-accordion-detail builder-accordion-detail-${open().includes(index) ? "open" : "closed"}`;
5202
+ }
5203
+ const openGridItemOrder = createMemo9(() => {
5204
+ let itemOrder = null;
5205
+ const getOpenGridItemPosition = props.grid && open().length;
5206
+ if (getOpenGridItemPosition && document) {
5207
+ const openItemIndex = open()[0];
5208
+ const openItem = document.querySelector(
5209
+ `.builder-accordion-title[data-index="${openItemIndex}"]`
5210
+ );
5211
+ let subjectItem = openItem;
5212
+ itemOrder = openItemIndex;
5213
+ if (subjectItem) {
5214
+ let prevItemRect = subjectItem.getBoundingClientRect();
5215
+ while (subjectItem = subjectItem && subjectItem.nextElementSibling) {
5216
+ if (subjectItem) {
5217
+ if (subjectItem.classList.contains("builder-accordion-detail")) {
5218
+ continue;
5219
+ }
5220
+ const subjectItemRect = subjectItem.getBoundingClientRect();
5221
+ if (subjectItemRect.left > prevItemRect.left) {
5222
+ const index = parseInt(
5223
+ subjectItem.getAttribute("data-index") || "",
5224
+ 10
5225
+ );
5226
+ if (!isNaN(index)) {
5227
+ prevItemRect = subjectItemRect;
5228
+ itemOrder = index;
5229
+ }
5230
+ } else {
5231
+ break;
5232
+ }
5233
+ }
5234
+ }
5235
+ }
5236
+ }
5237
+ if (typeof itemOrder === "number") {
5238
+ itemOrder = itemOrder + 1;
5239
+ }
5240
+ return itemOrder;
5241
+ });
5242
+ const accordionDetailStyles = createMemo9(() => {
5243
+ const styles = {
5244
+ ...{
5245
+ order: typeof openGridItemOrder() === "number" ? openGridItemOrder() : void 0
5246
+ },
5247
+ ...props.grid && {
5248
+ width: "100%"
5249
+ }
5250
+ };
5251
+ return Object.fromEntries(
5252
+ Object.entries(styles).filter(([_, value]) => value !== void 0)
5253
+ );
5254
+ });
5255
+ function onClick(index) {
5256
+ if (open().includes(index)) {
5257
+ setOpen(onlyOneAtATime() ? [] : open().filter((item) => item !== index));
5258
+ } else {
5259
+ setOpen(onlyOneAtATime() ? [index] : open().concat(index));
5260
+ }
5261
+ }
5262
+ return <div class="builder-accordion" style={accordionStyles()}><For5 each={props.items}>{(item, _index) => {
5263
+ const index = _index();
5264
+ return <>
5265
+ <div
5266
+ class={getAccordionTitleClassName(index)}
5267
+ style={{
5268
+ ...accordionTitleStyles(),
5269
+ width: props.grid ? props.gridRowWidth : void 0,
5270
+ ...{
5271
+ order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
5272
+ }
5273
+ }}
5274
+ data-index={index}
5275
+ onClick={(event) => onClick(index)}
5276
+ ><Blocks_default
5277
+ blocks={item.title}
5278
+ path={`items.${index}.title`}
5279
+ parent={props.builderBlock.id}
5280
+ context={props.builderContext}
5281
+ registeredComponents={props.builderComponents}
5282
+ linkComponent={props.builderLinkComponent}
5283
+ /></div>
5284
+ <Show8 when={open().includes(index)}><div
5285
+ class={getAccordionDetailClassName(index)}
5286
+ style={accordionDetailStyles()}
5287
+ ><Blocks_default
5288
+ blocks={item.detail}
5289
+ path={`items.${index}.detail`}
5290
+ parent={props.builderBlock.id}
5291
+ context={props.builderContext}
5292
+ registeredComponents={props.builderComponents}
5293
+ linkComponent={props.builderLinkComponent}
5294
+ /></div></Show8>
5295
+ </>;
5296
+ }}</For5></div>;
5297
+ }
5298
+ var accordion_default = Accordion;
5299
+
5300
+ // src/blocks/button/component-info.ts
5301
+ var componentInfo2 = {
5027
5302
  name: "Core:Button",
5028
5303
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
5029
5304
  defaultStyles: {
@@ -5059,7 +5334,7 @@ var componentInfo = {
5059
5334
  };
5060
5335
 
5061
5336
  // src/blocks/columns/component-info.ts
5062
- var componentInfo2 = {
5337
+ var componentInfo3 = {
5063
5338
  // TODO: ways to statically preprocess JSON for references, functions, etc
5064
5339
  name: "Columns",
5065
5340
  isRSC: true,
@@ -5279,7 +5554,7 @@ var componentInfo2 = {
5279
5554
  };
5280
5555
 
5281
5556
  // src/blocks/fragment/component-info.ts
5282
- var componentInfo3 = {
5557
+ var componentInfo4 = {
5283
5558
  name: "Fragment",
5284
5559
  static: true,
5285
5560
  hidden: true,
@@ -5288,7 +5563,7 @@ var componentInfo3 = {
5288
5563
  };
5289
5564
 
5290
5565
  // src/blocks/image/component-info.ts
5291
- var componentInfo4 = {
5566
+ var componentInfo5 = {
5292
5567
  name: "Image",
5293
5568
  static: true,
5294
5569
  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",
@@ -5410,7 +5685,7 @@ var componentInfo4 = {
5410
5685
  };
5411
5686
 
5412
5687
  // src/blocks/section/component-info.ts
5413
- var componentInfo5 = {
5688
+ var componentInfo6 = {
5414
5689
  name: "Core:Section",
5415
5690
  static: true,
5416
5691
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -5452,7 +5727,7 @@ var componentInfo5 = {
5452
5727
  };
5453
5728
 
5454
5729
  // src/blocks/slot/component-info.ts
5455
- var componentInfo6 = {
5730
+ var componentInfo7 = {
5456
5731
  name: "Slot",
5457
5732
  isRSC: true,
5458
5733
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -5486,7 +5761,7 @@ function Slot(props) {
5486
5761
  var slot_default = Slot;
5487
5762
 
5488
5763
  // src/blocks/symbol/component-info.ts
5489
- var componentInfo7 = {
5764
+ var componentInfo8 = {
5490
5765
  name: "Symbol",
5491
5766
  noWrap: true,
5492
5767
  static: true,
@@ -5562,7 +5837,7 @@ var defaultElement = {
5562
5837
  }
5563
5838
  }
5564
5839
  };
5565
- var componentInfo8 = {
5840
+ var componentInfo9 = {
5566
5841
  name: "Builder: Tabs",
5567
5842
  inputs: [{
5568
5843
  name: "tabs",
@@ -5662,16 +5937,20 @@ var componentInfo8 = {
5662
5937
  };
5663
5938
 
5664
5939
  // src/blocks/tabs/tabs.tsx
5665
- import { Show as Show8, For as For5, createSignal as createSignal9 } from "solid-js";
5940
+ import { Show as Show9, For as For6, createSignal as createSignal10 } from "solid-js";
5666
5941
  function Tabs(props) {
5667
- const [activeTab, setActiveTab] = createSignal9(
5942
+ const [activeTab, setActiveTab] = createSignal10(
5668
5943
  props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
5669
5944
  );
5670
5945
  function activeTabContent(active) {
5671
5946
  return props.tabs && props.tabs[active].content;
5672
5947
  }
5673
- function getActiveTabStyle(index) {
5674
- return activeTab() === index ? props.activeTabStyle : {};
5948
+ function onClick(index) {
5949
+ if (index === activeTab() && props.collapsible) {
5950
+ setActiveTab(-1);
5951
+ } else {
5952
+ setActiveTab(index);
5953
+ }
5675
5954
  }
5676
5955
  return <div>
5677
5956
  <div
@@ -5682,19 +5961,15 @@ function Tabs(props) {
5682
5961
  "justify-content": props.tabHeaderLayout || "flex-start",
5683
5962
  overflow: "auto"
5684
5963
  }}
5685
- ><For5 each={props.tabs}>{(tab, _index) => {
5964
+ ><For6 each={props.tabs}>{(tab, _index) => {
5686
5965
  const index = _index();
5687
5966
  return <span
5688
5967
  class={`builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`}
5689
5968
  key={index}
5690
- style={getActiveTabStyle(index)}
5691
- onClick={(event) => {
5692
- if (index === activeTab() && props.collapsible) {
5693
- setActiveTab(-1);
5694
- } else {
5695
- setActiveTab(index);
5696
- }
5969
+ style={{
5970
+ ...activeTab() === index ? props.activeTabStyle : {}
5697
5971
  }}
5972
+ onClick={(event) => onClick(index)}
5698
5973
  ><Blocks_default
5699
5974
  parent={props.builderBlock.id}
5700
5975
  path={`component.options.tabs.${index}.label`}
@@ -5703,21 +5978,21 @@ function Tabs(props) {
5703
5978
  registeredComponents={props.builderComponents}
5704
5979
  linkComponent={props.builderLinkComponent}
5705
5980
  /></span>;
5706
- }}</For5></div>
5707
- <Show8 when={activeTabContent(activeTab())}><div><Blocks_default
5981
+ }}</For6></div>
5982
+ <Show9 when={activeTabContent(activeTab())}><div><Blocks_default
5708
5983
  parent={props.builderBlock.id}
5709
5984
  path={`component.options.tabs.${activeTab()}.content`}
5710
5985
  blocks={activeTabContent(activeTab())}
5711
5986
  context={props.builderContext}
5712
5987
  registeredComponents={props.builderComponents}
5713
5988
  linkComponent={props.builderLinkComponent}
5714
- /></div></Show8>
5989
+ /></div></Show9>
5715
5990
  </div>;
5716
5991
  }
5717
5992
  var tabs_default = Tabs;
5718
5993
 
5719
5994
  // src/blocks/text/component-info.ts
5720
- var componentInfo9 = {
5995
+ var componentInfo10 = {
5721
5996
  name: "Text",
5722
5997
  static: true,
5723
5998
  isRSC: true,
@@ -5750,7 +6025,7 @@ function Text(props) {
5750
6025
  var text_default = Text;
5751
6026
 
5752
6027
  // src/blocks/custom-code/component-info.ts
5753
- var componentInfo10 = {
6028
+ var componentInfo11 = {
5754
6029
  name: "Custom Code",
5755
6030
  static: true,
5756
6031
  requiredPermissions: ["editCode"],
@@ -5775,10 +6050,10 @@ var componentInfo10 = {
5775
6050
  };
5776
6051
 
5777
6052
  // src/blocks/custom-code/custom-code.tsx
5778
- import { onMount as onMount2, createSignal as createSignal10 } from "solid-js";
6053
+ import { onMount as onMount2, createSignal as createSignal11 } from "solid-js";
5779
6054
  function CustomCode(props) {
5780
- const [scriptsInserted, setScriptsInserted] = createSignal10([]);
5781
- const [scriptsRun, setScriptsRun] = createSignal10([]);
6055
+ const [scriptsInserted, setScriptsInserted] = createSignal11([]);
6056
+ const [scriptsRun, setScriptsRun] = createSignal11([]);
5782
6057
  let elementRef;
5783
6058
  onMount2(() => {
5784
6059
  if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
@@ -5821,7 +6096,7 @@ function CustomCode(props) {
5821
6096
  var custom_code_default = CustomCode;
5822
6097
 
5823
6098
  // src/blocks/embed/component-info.ts
5824
- var componentInfo11 = {
6099
+ var componentInfo12 = {
5825
6100
  name: "Embed",
5826
6101
  static: true,
5827
6102
  inputs: [{
@@ -5859,7 +6134,7 @@ var componentInfo11 = {
5859
6134
  };
5860
6135
 
5861
6136
  // src/blocks/embed/embed.tsx
5862
- import { on, createEffect, createMemo as createMemo11, createSignal as createSignal11 } from "solid-js";
6137
+ import { on, createEffect, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
5863
6138
 
5864
6139
  // src/blocks/embed/helpers.ts
5865
6140
  var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
@@ -5867,9 +6142,9 @@ var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
5867
6142
 
5868
6143
  // src/blocks/embed/embed.tsx
5869
6144
  function Embed(props) {
5870
- const [scriptsInserted, setScriptsInserted] = createSignal11([]);
5871
- const [scriptsRun, setScriptsRun] = createSignal11([]);
5872
- const [ranInitFn, setRanInitFn] = createSignal11(false);
6145
+ const [scriptsInserted, setScriptsInserted] = createSignal12([]);
6146
+ const [scriptsRun, setScriptsRun] = createSignal12([]);
6147
+ const [ranInitFn, setRanInitFn] = createSignal12(false);
5873
6148
  function findAndRunScripts() {
5874
6149
  if (!elem || !elem.getElementsByTagName)
5875
6150
  return;
@@ -5892,8 +6167,8 @@ function Embed(props) {
5892
6167
  }
5893
6168
  }
5894
6169
  let elem;
5895
- const onUpdateFn_0_elem = createMemo11(() => elem);
5896
- const onUpdateFn_0_ranInitFn__ = createMemo11(() => ranInitFn());
6170
+ const onUpdateFn_0_elem = createMemo12(() => elem);
6171
+ const onUpdateFn_0_ranInitFn__ = createMemo12(() => ranInitFn());
5897
6172
  function onUpdateFn_0() {
5898
6173
  if (elem && !ranInitFn()) {
5899
6174
  setRanInitFn(true);
@@ -5908,7 +6183,7 @@ function Embed(props) {
5908
6183
  var embed_default = Embed;
5909
6184
 
5910
6185
  // src/blocks/form/form/component-info.ts
5911
- var componentInfo12 = {
6186
+ var componentInfo13 = {
5912
6187
  name: "Form:Form",
5913
6188
  // editableTags: ['builder-form-error']
5914
6189
  defaults: {
@@ -6142,7 +6417,7 @@ var componentInfo12 = {
6142
6417
  };
6143
6418
 
6144
6419
  // src/blocks/form/form/form.tsx
6145
- import { Show as Show9, For as For6, createSignal as createSignal12 } from "solid-js";
6420
+ import { Show as Show10, For as For7, createSignal as createSignal13 } from "solid-js";
6146
6421
  import { css as css4 } from "solid-styled-components";
6147
6422
 
6148
6423
  // src/functions/get-env.ts
@@ -6160,9 +6435,9 @@ var get = (obj, path, defaultValue) => {
6160
6435
 
6161
6436
  // src/blocks/form/form/form.tsx
6162
6437
  function FormComponent(props) {
6163
- const [formState, setFormState] = createSignal12("unsubmitted");
6164
- const [responseData, setResponseData] = createSignal12(null);
6165
- const [formErrorMessage, setFormErrorMessage] = createSignal12("");
6438
+ const [formState, setFormState] = createSignal13("unsubmitted");
6439
+ const [responseData, setResponseData] = createSignal13(null);
6440
+ const [formErrorMessage, setFormErrorMessage] = createSignal13("");
6166
6441
  function mergeNewRootState(newData) {
6167
6442
  const combinedState = {
6168
6443
  ...props.builderContext.rootState,
@@ -6187,13 +6462,11 @@ function FormComponent(props) {
6187
6462
  return;
6188
6463
  }
6189
6464
  event.preventDefault();
6190
- const el = event.currentTarget;
6465
+ const el = event.currentTarget || event.target;
6191
6466
  const headers = props.customHeaders || {};
6192
6467
  let body;
6193
6468
  const formData = new FormData(el);
6194
- const formPairs = Array.from(
6195
- event.currentTarget.querySelectorAll("input,select,textarea")
6196
- ).filter((el2) => !!el2.name).map((el2) => {
6469
+ const formPairs = Array.from(el.querySelectorAll("input,select,textarea")).filter((el2) => !!el2.name).map((el2) => {
6197
6470
  let value;
6198
6471
  const key = el2.name;
6199
6472
  if (el2 instanceof HTMLInputElement) {
@@ -6356,9 +6629,10 @@ function FormComponent(props) {
6356
6629
  name={props.name}
6357
6630
  onSubmit={(event) => onSubmit(event)}
6358
6631
  {...{}}
6632
+ {...{}}
6359
6633
  {...props.attributes}
6360
6634
  >
6361
- <Show9 when={props.builderBlock && props.builderBlock.children}><For6 each={props.builderBlock?.children}>{(block, _index) => {
6635
+ <Show10 when={props.builderBlock && props.builderBlock.children}><For7 each={props.builderBlock?.children}>{(block, _index) => {
6362
6636
  const idx = _index();
6363
6637
  return <Block_default
6364
6638
  key={`form-block-${idx}`}
@@ -6367,35 +6641,35 @@ function FormComponent(props) {
6367
6641
  registeredComponents={props.builderComponents}
6368
6642
  linkComponent={props.builderLinkComponent}
6369
6643
  />;
6370
- }}</For6></Show9>
6371
- <Show9 when={submissionState() === "error"}><Blocks_default
6644
+ }}</For7></Show10>
6645
+ <Show10 when={submissionState() === "error"}><Blocks_default
6372
6646
  path="errorMessage"
6373
6647
  blocks={props.errorMessage}
6374
6648
  context={props.builderContext}
6375
- /></Show9>
6376
- <Show9 when={submissionState() === "sending"}><Blocks_default
6649
+ /></Show10>
6650
+ <Show10 when={submissionState() === "sending"}><Blocks_default
6377
6651
  path="sendingMessage"
6378
6652
  blocks={props.sendingMessage}
6379
6653
  context={props.builderContext}
6380
- /></Show9>
6381
- <Show9 when={submissionState() === "error" && responseData()}><pre
6654
+ /></Show10>
6655
+ <Show10 when={submissionState() === "error" && responseData()}><pre
6382
6656
  class={"builder-form-error-text " + css4({
6383
6657
  padding: "10px",
6384
6658
  color: "red",
6385
6659
  textAlign: "center"
6386
6660
  })}
6387
- >{JSON.stringify(responseData(), null, 2)}</pre></Show9>
6388
- <Show9 when={submissionState() === "success"}><Blocks_default
6661
+ >{JSON.stringify(responseData(), null, 2)}</pre></Show10>
6662
+ <Show10 when={submissionState() === "success"}><Blocks_default
6389
6663
  path="successMessage"
6390
6664
  blocks={props.successMessage}
6391
6665
  context={props.builderContext}
6392
- /></Show9>
6666
+ /></Show10>
6393
6667
  </form>;
6394
6668
  }
6395
6669
  var form_default = FormComponent;
6396
6670
 
6397
6671
  // src/blocks/form/input/component-info.ts
6398
- var componentInfo13 = {
6672
+ var componentInfo14 = {
6399
6673
  name: "Form:Input",
6400
6674
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
6401
6675
  inputs: [
@@ -6465,7 +6739,7 @@ function FormInputComponent(props) {
6465
6739
  var input_default = FormInputComponent;
6466
6740
 
6467
6741
  // src/blocks/form/select/component-info.ts
6468
- var componentInfo14 = {
6742
+ var componentInfo15 = {
6469
6743
  name: "Form:Select",
6470
6744
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
6471
6745
  defaultStyles: {
@@ -6510,7 +6784,7 @@ var componentInfo14 = {
6510
6784
  };
6511
6785
 
6512
6786
  // src/blocks/form/select/select.tsx
6513
- import { For as For7 } from "solid-js";
6787
+ import { For as For8 } from "solid-js";
6514
6788
  function SelectComponent(props) {
6515
6789
  return <select
6516
6790
  {...{}}
@@ -6519,15 +6793,15 @@ function SelectComponent(props) {
6519
6793
  key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
6520
6794
  defaultValue={props.defaultValue}
6521
6795
  name={props.name}
6522
- ><For7 each={props.options}>{(option, _index) => {
6796
+ ><For8 each={props.options}>{(option, _index) => {
6523
6797
  const index = _index();
6524
6798
  return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
6525
- }}</For7></select>;
6799
+ }}</For8></select>;
6526
6800
  }
6527
6801
  var select_default = SelectComponent;
6528
6802
 
6529
6803
  // src/blocks/form/submit-button/component-info.ts
6530
- var componentInfo15 = {
6804
+ var componentInfo16 = {
6531
6805
  name: "Form:SubmitButton",
6532
6806
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
6533
6807
  defaultStyles: {
@@ -6561,7 +6835,7 @@ function SubmitButton(props) {
6561
6835
  var submit_button_default = SubmitButton;
6562
6836
 
6563
6837
  // src/blocks/img/component-info.ts
6564
- var componentInfo16 = {
6838
+ var componentInfo17 = {
6565
6839
  // friendlyName?
6566
6840
  name: "Raw:Img",
6567
6841
  hideFromInsertMenu: true,
@@ -6594,7 +6868,7 @@ function ImgComponent(props) {
6594
6868
  var img_default = ImgComponent;
6595
6869
 
6596
6870
  // src/blocks/video/component-info.ts
6597
- var componentInfo17 = {
6871
+ var componentInfo18 = {
6598
6872
  name: "Video",
6599
6873
  canHaveChildren: true,
6600
6874
  defaultStyles: {
@@ -6678,9 +6952,9 @@ var componentInfo17 = {
6678
6952
  };
6679
6953
 
6680
6954
  // src/blocks/video/video.tsx
6681
- import { Show as Show10, createMemo as createMemo13 } from "solid-js";
6955
+ import { Show as Show11, createMemo as createMemo14 } from "solid-js";
6682
6956
  function Video(props) {
6683
- const videoProps = createMemo13(() => {
6957
+ const videoProps = createMemo14(() => {
6684
6958
  return {
6685
6959
  ...props.autoPlay === true ? {
6686
6960
  autoPlay: true
@@ -6699,7 +6973,7 @@ function Video(props) {
6699
6973
  } : {}
6700
6974
  };
6701
6975
  });
6702
- const spreadProps = createMemo13(() => {
6976
+ const spreadProps = createMemo14(() => {
6703
6977
  return {
6704
6978
  ...videoProps()
6705
6979
  };
@@ -6729,8 +7003,8 @@ function Video(props) {
6729
7003
  }}
6730
7004
  src={props.video || "no-src"}
6731
7005
  poster={props.posterImage}
6732
- ><Show10 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show10></video>
6733
- <Show10
7006
+ ><Show11 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show11></video>
7007
+ <Show11
6734
7008
  when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
6735
7009
  ><div
6736
7010
  style={{
@@ -6739,15 +7013,15 @@ function Video(props) {
6739
7013
  "pointer-events": "none",
6740
7014
  "font-size": "0px"
6741
7015
  }}
6742
- /></Show10>
6743
- <Show10 when={props.builderBlock?.children?.length && props.fitContent}><div
7016
+ /></Show11>
7017
+ <Show11 when={props.builderBlock?.children?.length && props.fitContent}><div
6744
7018
  style={{
6745
7019
  display: "flex",
6746
7020
  "flex-direction": "column",
6747
7021
  "align-items": "stretch"
6748
7022
  }}
6749
- >{props.children}</div></Show10>
6750
- <Show10 when={props.builderBlock?.children?.length && !props.fitContent}><div
7023
+ >{props.children}</div></Show11>
7024
+ <Show11 when={props.builderBlock?.children?.length && !props.fitContent}><div
6751
7025
  style={{
6752
7026
  "pointer-events": "none",
6753
7027
  display: "flex",
@@ -6759,7 +7033,7 @@ function Video(props) {
6759
7033
  width: "100%",
6760
7034
  height: "100%"
6761
7035
  }}
6762
- >{props.children}</div></Show10>
7036
+ >{props.children}</div></Show11>
6763
7037
  </div>;
6764
7038
  }
6765
7039
  var video_default = Video;
@@ -6767,58 +7041,61 @@ var video_default = Video;
6767
7041
  // src/constants/extra-components.ts
6768
7042
  var getExtraComponents = () => [{
6769
7043
  component: custom_code_default,
6770
- ...componentInfo10
7044
+ ...componentInfo11
6771
7045
  }, {
6772
7046
  component: embed_default,
6773
- ...componentInfo11
7047
+ ...componentInfo12
6774
7048
  }, ...TARGET === "rsc" ? [] : [{
6775
7049
  component: form_default,
6776
- ...componentInfo12
7050
+ ...componentInfo13
6777
7051
  }, {
6778
7052
  component: input_default,
6779
- ...componentInfo13
7053
+ ...componentInfo14
6780
7054
  }, {
6781
7055
  component: submit_button_default,
6782
- ...componentInfo15
7056
+ ...componentInfo16
6783
7057
  }, {
6784
7058
  component: select_default,
6785
- ...componentInfo14
7059
+ ...componentInfo15
6786
7060
  }], {
6787
7061
  component: img_default,
6788
- ...componentInfo16
7062
+ ...componentInfo17
6789
7063
  }, {
6790
7064
  component: video_default,
6791
- ...componentInfo17
7065
+ ...componentInfo18
6792
7066
  }];
6793
7067
 
6794
7068
  // src/constants/builder-registered-components.ts
6795
7069
  var getDefaultRegisteredComponents = () => [{
6796
7070
  component: button_default,
6797
- ...componentInfo
7071
+ ...componentInfo2
6798
7072
  }, {
6799
7073
  component: columns_default,
6800
- ...componentInfo2
7074
+ ...componentInfo3
6801
7075
  }, {
6802
7076
  component: fragment_default,
6803
- ...componentInfo3
7077
+ ...componentInfo4
6804
7078
  }, {
6805
7079
  component: image_default,
6806
- ...componentInfo4
7080
+ ...componentInfo5
6807
7081
  }, {
6808
7082
  component: section_default,
6809
- ...componentInfo5
7083
+ ...componentInfo6
6810
7084
  }, {
6811
7085
  component: slot_default,
6812
- ...componentInfo6
7086
+ ...componentInfo7
6813
7087
  }, {
6814
7088
  component: symbol_default,
6815
- ...componentInfo7
7089
+ ...componentInfo8
6816
7090
  }, {
6817
7091
  component: text_default,
6818
- ...componentInfo9
7092
+ ...componentInfo10
6819
7093
  }, ...TARGET === "rsc" ? [] : [{
6820
7094
  component: tabs_default,
6821
- ...componentInfo8
7095
+ ...componentInfo9
7096
+ }, {
7097
+ component: accordion_default,
7098
+ ...componentInfo
6822
7099
  }], ...getExtraComponents()];
6823
7100
 
6824
7101
  // src/functions/register-component.ts
@@ -6897,12 +7174,12 @@ var Inlined_script_default = InlinedScript;
6897
7174
 
6898
7175
  // src/components/content/components/enable-editor.tsx
6899
7176
  import {
6900
- Show as Show11,
7177
+ Show as Show12,
6901
7178
  onMount as onMount3,
6902
7179
  on as on2,
6903
7180
  createEffect as createEffect2,
6904
- createMemo as createMemo14,
6905
- createSignal as createSignal14
7181
+ createMemo as createMemo15,
7182
+ createSignal as createSignal15
6906
7183
  } from "solid-js";
6907
7184
  import { Dynamic as Dynamic5 } from "solid-js/web";
6908
7185
 
@@ -7397,7 +7674,7 @@ function isFromTrustedHost(trustedHosts, e) {
7397
7674
  }
7398
7675
 
7399
7676
  // src/constants/sdk-version.ts
7400
- var SDK_VERSION = "1.0.27";
7677
+ var SDK_VERSION = "1.0.29";
7401
7678
 
7402
7679
  // src/functions/register.ts
7403
7680
  var registry = {};
@@ -7674,12 +7951,12 @@ var getWrapperClassName = (variationId) => {
7674
7951
 
7675
7952
  // src/components/content/components/enable-editor.tsx
7676
7953
  function EnableEditor(props) {
7677
- const [ContentWrapper, setContentWrapper] = createSignal14(
7954
+ const [ContentWrapper, setContentWrapper] = createSignal15(
7678
7955
  props.contentWrapper || "div"
7679
7956
  );
7680
- const [httpReqsData, setHttpReqsData] = createSignal14({});
7681
- const [httpReqsPending, setHttpReqsPending] = createSignal14({});
7682
- const [clicked, setClicked] = createSignal14(false);
7957
+ const [httpReqsData, setHttpReqsData] = createSignal15({});
7958
+ const [httpReqsPending, setHttpReqsPending] = createSignal15({});
7959
+ const [clicked, setClicked] = createSignal15(false);
7683
7960
  function mergeNewRootState(newData) {
7684
7961
  const combinedState = {
7685
7962
  ...props.builderContextSignal.rootState,
@@ -7713,7 +7990,7 @@ function EnableEditor(props) {
7713
7990
  content: newContentValue
7714
7991
  }));
7715
7992
  }
7716
- const showContentProps = createMemo14(() => {
7993
+ const showContentProps = createMemo15(() => {
7717
7994
  return props.showContent ? {} : {
7718
7995
  hidden: true,
7719
7996
  "aria-hidden": true
@@ -7876,7 +8153,7 @@ function EnableEditor(props) {
7876
8153
  const searchParams = new URL(location.href).searchParams;
7877
8154
  const searchParamPreviewModel = searchParams.get("builder.preview");
7878
8155
  const searchParamPreviewId = searchParams.get(
7879
- `builder.preview.${searchParamPreviewModel}`
8156
+ `builder.overrides.${searchParamPreviewModel}`
7880
8157
  );
7881
8158
  const previewApiKey = searchParams.get("apiKey") || searchParams.get("builder.space");
7882
8159
  if (searchParamPreviewModel === props.model && previewApiKey === props.apiKey && (!props.content || searchParamPreviewId === props.content.id)) {
@@ -7896,21 +8173,21 @@ function EnableEditor(props) {
7896
8173
  onMount3(() => {
7897
8174
  if (!props.apiKey) {
7898
8175
  logger.error(
7899
- "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
8176
+ "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
7900
8177
  );
7901
8178
  }
7902
8179
  evaluateJsCode();
7903
8180
  runHttpRequests();
7904
8181
  emitStateUpdate();
7905
8182
  });
7906
- const onUpdateFn_0_props_content = createMemo14(() => props.content);
8183
+ const onUpdateFn_0_props_content = createMemo15(() => props.content);
7907
8184
  function onUpdateFn_0() {
7908
8185
  if (props.content) {
7909
8186
  mergeNewContent(props.content);
7910
8187
  }
7911
8188
  }
7912
8189
  createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
7913
- const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo14(() => props.builderContextSignal.content?.data?.jsCode);
8190
+ const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo15(() => props.builderContextSignal.content?.data?.jsCode);
7914
8191
  function onUpdateFn_1() {
7915
8192
  evaluateJsCode();
7916
8193
  }
@@ -7920,7 +8197,7 @@ function EnableEditor(props) {
7920
8197
  onUpdateFn_1
7921
8198
  )
7922
8199
  );
7923
- const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo14(() => props.builderContextSignal.content?.data?.httpRequests);
8200
+ const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo15(() => props.builderContextSignal.content?.data?.httpRequests);
7924
8201
  function onUpdateFn_2() {
7925
8202
  runHttpRequests();
7926
8203
  }
@@ -7932,7 +8209,7 @@ function EnableEditor(props) {
7932
8209
  onUpdateFn_2
7933
8210
  )
7934
8211
  );
7935
- const onUpdateFn_3_props_builderContextSignal_rootState = createMemo14(
8212
+ const onUpdateFn_3_props_builderContextSignal_rootState = createMemo15(
7936
8213
  () => props.builderContextSignal.rootState
7937
8214
  );
7938
8215
  function onUpdateFn_3() {
@@ -7944,14 +8221,14 @@ function EnableEditor(props) {
7944
8221
  onUpdateFn_3
7945
8222
  )
7946
8223
  );
7947
- const onUpdateFn_4_props_data = createMemo14(() => props.data);
8224
+ const onUpdateFn_4_props_data = createMemo15(() => props.data);
7948
8225
  function onUpdateFn_4() {
7949
8226
  if (props.data) {
7950
8227
  mergeNewRootState(props.data);
7951
8228
  }
7952
8229
  }
7953
8230
  createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
7954
- const onUpdateFn_5_props_locale = createMemo14(() => props.locale);
8231
+ const onUpdateFn_5_props_locale = createMemo15(() => props.locale);
7955
8232
  function onUpdateFn_5() {
7956
8233
  if (props.locale) {
7957
8234
  mergeNewRootState({
@@ -7960,7 +8237,7 @@ function EnableEditor(props) {
7960
8237
  }
7961
8238
  }
7962
8239
  createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
7963
- return <builder_context_default.Provider value={props.builderContextSignal}><Show11 when={props.builderContextSignal.content}><Dynamic5
8240
+ return <builder_context_default.Provider value={props.builderContextSignal}><Show12 when={props.builderContextSignal.content}><Dynamic5
7964
8241
  class={getWrapperClassName(
7965
8242
  props.content?.testVariationId || props.content?.id
7966
8243
  )}
@@ -7973,14 +8250,14 @@ function EnableEditor(props) {
7973
8250
  {...showContentProps()}
7974
8251
  {...props.contentWrapperProps}
7975
8252
  component={ContentWrapper()}
7976
- >{props.children}</Dynamic5></Show11></builder_context_default.Provider>;
8253
+ >{props.children}</Dynamic5></Show12></builder_context_default.Provider>;
7977
8254
  }
7978
8255
  var Enable_editor_default = EnableEditor;
7979
8256
 
7980
8257
  // src/components/content/components/styles.tsx
7981
- import { createSignal as createSignal15 } from "solid-js";
8258
+ import { createSignal as createSignal16 } from "solid-js";
7982
8259
  function ContentStyles(props) {
7983
- const [injectedStyles, setInjectedStyles] = createSignal15(
8260
+ const [injectedStyles, setInjectedStyles] = createSignal16(
7984
8261
  `
7985
8262
  ${getCss({
7986
8263
  cssCode: props.cssCode,
@@ -8037,7 +8314,7 @@ var getContentInitialValue = ({
8037
8314
 
8038
8315
  // src/components/content/content.tsx
8039
8316
  function ContentComponent(props) {
8040
- const [scriptStr, setScriptStr] = createSignal16(
8317
+ const [scriptStr, setScriptStr] = createSignal17(
8041
8318
  getUpdateVariantVisibilityScript({
8042
8319
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
8043
8320
  variationId: props.content?.testVariationId,
@@ -8045,7 +8322,7 @@ function ContentComponent(props) {
8045
8322
  contentId: props.content?.id
8046
8323
  })
8047
8324
  );
8048
- const [registeredComponents, setRegisteredComponents] = createSignal16(
8325
+ const [registeredComponents, setRegisteredComponents] = createSignal17(
8049
8326
  [
8050
8327
  ...getDefaultRegisteredComponents(),
8051
8328
  ...props.customComponents || []
@@ -8060,7 +8337,7 @@ function ContentComponent(props) {
8060
8337
  {}
8061
8338
  )
8062
8339
  );
8063
- const [builderContextSignal, setBuilderContextSignal] = createSignal16({
8340
+ const [builderContextSignal, setBuilderContextSignal] = createSignal17({
8064
8341
  content: getContentInitialValue({
8065
8342
  content: props.content,
8066
8343
  data: props.data
@@ -8118,16 +8395,16 @@ function ContentComponent(props) {
8118
8395
  setBuilderContextSignal
8119
8396
  }}
8120
8397
  >
8121
- <Show12 when={props.isSsrAbTest}><Inlined_script_default
8398
+ <Show13 when={props.isSsrAbTest}><Inlined_script_default
8122
8399
  id="builderio-variant-visibility"
8123
8400
  scriptStr={scriptStr()}
8124
- /></Show12>
8125
- <Show12 when={TARGET !== "reactNative"}><Styles_default
8401
+ /></Show13>
8402
+ <Show13 when={TARGET !== "reactNative"}><Styles_default
8126
8403
  isNestedRender={props.isNestedRender}
8127
8404
  contentId={builderContextSignal().content?.id}
8128
8405
  cssCode={builderContextSignal().content?.data?.cssCode}
8129
8406
  customFonts={builderContextSignal().content?.data?.customFonts}
8130
- /></Show12>
8407
+ /></Show13>
8131
8408
  <Blocks_default
8132
8409
  blocks={builderContextSignal().content?.data?.blocks}
8133
8410
  context={builderContextSignal()}
@@ -8140,13 +8417,13 @@ var Content_default = ContentComponent;
8140
8417
 
8141
8418
  // src/components/content-variants/content-variants.tsx
8142
8419
  function ContentVariants(props) {
8143
- const [shouldRenderVariants, setShouldRenderVariants] = createSignal17(
8420
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal18(
8144
8421
  checkShouldRenderVariants({
8145
8422
  canTrack: getDefaultCanTrack(props.canTrack),
8146
8423
  content: props.content
8147
8424
  })
8148
8425
  );
8149
- const updateCookieAndStylesScriptStr = createMemo17(() => {
8426
+ const updateCookieAndStylesScriptStr = createMemo18(() => {
8150
8427
  return getUpdateCookieAndStylesScript(
8151
8428
  getVariants(props.content).map((value) => ({
8152
8429
  id: value.testVariationId,
@@ -8155,10 +8432,10 @@ function ContentVariants(props) {
8155
8432
  props.content?.id || ""
8156
8433
  );
8157
8434
  });
8158
- const hideVariantsStyleString = createMemo17(() => {
8435
+ const hideVariantsStyleString = createMemo18(() => {
8159
8436
  return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
8160
8437
  });
8161
- const defaultContent = createMemo17(() => {
8438
+ const defaultContent = createMemo18(() => {
8162
8439
  return shouldRenderVariants() ? {
8163
8440
  ...props.content,
8164
8441
  testVariationId: props.content?.id
@@ -8171,11 +8448,11 @@ function ContentVariants(props) {
8171
8448
  setShouldRenderVariants(false);
8172
8449
  });
8173
8450
  return <>
8174
- <Show13 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
8451
+ <Show14 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
8175
8452
  id="builderio-init-variants-fns"
8176
8453
  scriptStr={getInitVariantsFnsScriptString()}
8177
- /></Show13>
8178
- <Show13 when={shouldRenderVariants()}>
8454
+ /></Show14>
8455
+ <Show14 when={shouldRenderVariants()}>
8179
8456
  <Inlined_styles_default
8180
8457
  id="builderio-variants"
8181
8458
  styles={hideVariantsStyleString()}
@@ -8184,7 +8461,7 @@ function ContentVariants(props) {
8184
8461
  id="builderio-variants-visibility"
8185
8462
  scriptStr={updateCookieAndStylesScriptStr()}
8186
8463
  />
8187
- <For8 each={getVariants(props.content)}>{(variant, _index) => {
8464
+ <For9 each={getVariants(props.content)}>{(variant, _index) => {
8188
8465
  const index = _index();
8189
8466
  return <Content_default
8190
8467
  isNestedRender={props.isNestedRender}
@@ -8208,8 +8485,8 @@ function ContentVariants(props) {
8208
8485
  contentWrapperProps={props.contentWrapperProps}
8209
8486
  trustedHosts={props.trustedHosts}
8210
8487
  />;
8211
- }}</For8>
8212
- </Show13>
8488
+ }}</For9>
8489
+ </Show14>
8213
8490
  <Content_default
8214
8491
  isNestedRender={props.isNestedRender}
8215
8492
  {...{}}
@@ -8262,14 +8539,14 @@ var fetchSymbolContent = async ({
8262
8539
 
8263
8540
  // src/blocks/symbol/symbol.tsx
8264
8541
  function Symbol2(props) {
8265
- const [contentToUse, setContentToUse] = createSignal18(props.symbol?.content);
8266
- const blocksWrapper = createMemo18(() => {
8542
+ const [contentToUse, setContentToUse] = createSignal19(props.symbol?.content);
8543
+ const blocksWrapper = createMemo19(() => {
8267
8544
  return "div";
8268
8545
  });
8269
- const contentWrapper = createMemo18(() => {
8546
+ const contentWrapper = createMemo19(() => {
8270
8547
  return "div";
8271
8548
  });
8272
- const className = createMemo18(() => {
8549
+ const className = createMemo19(() => {
8273
8550
  return [
8274
8551
  ...[props.attributes[getClassPropName()]],
8275
8552
  "builder-symbol",
@@ -8291,7 +8568,7 @@ function Symbol2(props) {
8291
8568
  }
8292
8569
  onMount5(() => {
8293
8570
  });
8294
- const onUpdateFn_0_props_symbol = createMemo18(() => props.symbol);
8571
+ const onUpdateFn_0_props_symbol = createMemo19(() => props.symbol);
8295
8572
  function onUpdateFn_0() {
8296
8573
  setContent();
8297
8574
  }