@builder.io/sdk-solid 0.12.2 → 0.12.4

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.
@@ -1,33 +1,81 @@
1
- // src/blocks/button/button.tsx
1
+ // src/components/dynamic-renderer/dynamic-renderer.tsx
2
2
  import { Show } from "solid-js";
3
- import { css } from "solid-styled-components";
4
- function Button(props) {
3
+ import { Dynamic } from "solid-js/web";
4
+
5
+ // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
6
+ var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
7
+ var isEmptyElement = (tagName) => {
8
+ return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
9
+ };
10
+
11
+ // src/components/dynamic-renderer/dynamic-renderer.tsx
12
+ function DynamicRenderer(props) {
5
13
  return <Show
6
- fallback={<button
7
- class={props.attributes.class + " " + css({
8
- all: "unset"
9
- })}
10
- {...{}}
14
+ fallback={<Dynamic
11
15
  {...props.attributes}
12
- style={props.attributes.style}
13
- >{props.text}</button>}
14
- when={props.link}
15
- ><a
16
- {...{}}
16
+ {...props.actionAttributes}
17
+ component={props.TagName}
18
+ />}
19
+ when={!isEmptyElement(props.TagName)}
20
+ ><Show
21
+ fallback={<Dynamic
22
+ {...props.attributes}
23
+ {...props.actionAttributes}
24
+ component={props.TagName}
25
+ >{props.children}</Dynamic>}
26
+ when={typeof props.TagName === "string"}
27
+ ><Dynamic
17
28
  {...props.attributes}
18
- href={props.link}
19
- target={props.openLinkInNewTab ? "_blank" : void 0}
20
- role="button"
21
- >{props.text}</a></Show>;
29
+ {...props.actionAttributes}
30
+ component={props.TagName}
31
+ >{props.children}</Dynamic></Show></Show>;
32
+ }
33
+ var Dynamic_renderer_default = DynamicRenderer;
34
+
35
+ // src/constants/target.ts
36
+ var TARGET = "solid";
37
+
38
+ // src/functions/get-class-prop-name.ts
39
+ var getClassPropName = () => {
40
+ switch (TARGET) {
41
+ case "react":
42
+ case "reactNative":
43
+ case "rsc":
44
+ return "className";
45
+ case "svelte":
46
+ case "vue":
47
+ case "solid":
48
+ case "qwik":
49
+ return "class";
50
+ }
51
+ };
52
+
53
+ // src/blocks/button/button.tsx
54
+ function Button(props) {
55
+ return <Dynamic_renderer_default
56
+ TagName={props.link ? props.builderLinkComponent || "a" : "button"}
57
+ attributes={{
58
+ ...props.attributes,
59
+ [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
60
+ ...props.link ? {
61
+ href: props.link,
62
+ target: props.openLinkInNewTab ? "_blank" : void 0,
63
+ role: "link"
64
+ } : {
65
+ role: "button"
66
+ }
67
+ }}
68
+ actionAttributes={{}}
69
+ >{props.text}</Dynamic_renderer_default>;
22
70
  }
23
71
  var button_default = Button;
24
72
 
25
73
  // src/blocks/columns/columns.tsx
26
- import { Show as Show7, For as For4, createSignal as createSignal5 } from "solid-js";
27
- import { css as css3 } from "solid-styled-components";
74
+ import { Show as Show6, For as For4, createSignal as createSignal5 } from "solid-js";
75
+ import { css as css2 } from "solid-styled-components";
28
76
 
29
77
  // src/components/blocks/blocks.tsx
30
- import { useContext, Show as Show6, For as For3 } from "solid-js";
78
+ import { useContext, Show as Show5, For as For3 } from "solid-js";
31
79
 
32
80
  // src/context/builder.context.ts
33
81
  import { createContext } from "solid-js";
@@ -51,7 +99,7 @@ import { createContext as createContext2 } from "solid-js";
51
99
  var components_context_default = createContext2({ registeredComponents: {} });
52
100
 
53
101
  // src/components/block/block.tsx
54
- import { Show as Show5, For as For2, createSignal as createSignal4 } from "solid-js";
102
+ import { Show as Show4, For as For2, createSignal as createSignal4 } from "solid-js";
55
103
 
56
104
  // src/functions/get-block-component-options.ts
57
105
  function getBlockComponentOptions(block) {
@@ -79,9 +127,6 @@ function isBrowser() {
79
127
  return typeof window !== "undefined" && typeof document !== "undefined";
80
128
  }
81
129
 
82
- // src/constants/target.ts
83
- var TARGET = "solid";
84
-
85
130
  // src/functions/is-iframe.ts
86
131
  function isIframe() {
87
132
  return isBrowser() && window.self !== window.top;
@@ -502,7 +547,7 @@ function BlockStyles(props) {
502
547
  }
503
548
  return true;
504
549
  }
505
- function css5() {
550
+ function css4() {
506
551
  const processedBlock = getProcessedBlock({
507
552
  block: props.block,
508
553
  localState: props.context.localState,
@@ -545,7 +590,7 @@ function BlockStyles(props) {
545
590
  }) : "";
546
591
  return [largeStylesClass, mediumStylesClass, smallStylesClass].join(" ");
547
592
  }
548
- return <Show2 when={TARGET !== "reactNative" && css5() && canShowBlock()}><Inlined_styles_default styles={css5()} /></Show2>;
593
+ return <Show2 when={TARGET !== "reactNative" && css4() && canShowBlock()}><Inlined_styles_default styles={css4()} /></Show2>;
549
594
  }
550
595
  var Block_styles_default = BlockStyles;
551
596
 
@@ -591,6 +636,38 @@ function getBlockActions(options) {
591
636
  return obj;
592
637
  }
593
638
 
639
+ // src/functions/transform-style-property.ts
640
+ function transformStyleProperty({
641
+ style
642
+ }) {
643
+ return style;
644
+ }
645
+
646
+ // src/functions/get-style.ts
647
+ var getStyle = ({
648
+ block,
649
+ context
650
+ }) => {
651
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
652
+ style: block.style || {},
653
+ context,
654
+ block
655
+ }));
656
+ };
657
+ function mapStyleObjToStrIfNeeded(style) {
658
+ switch (TARGET) {
659
+ case "svelte":
660
+ case "vue":
661
+ case "solid":
662
+ return convertStyleMapToCSSArray(style).join(" ");
663
+ case "qwik":
664
+ case "reactNative":
665
+ case "react":
666
+ case "rsc":
667
+ return style;
668
+ }
669
+ }
670
+
594
671
  // src/functions/transform-block-properties.ts
595
672
  function transformBlockProperties({
596
673
  properties
@@ -612,8 +689,11 @@ function getBlockProperties({
612
689
  ...extractRelevantRootBlockProperties(block),
613
690
  ...block.properties,
614
691
  "builder-id": block.id,
615
- style: block.style ? getStyleAttribute(block.style) : void 0,
616
- class: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
692
+ style: getStyle({
693
+ block,
694
+ context
695
+ }),
696
+ [getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
617
697
  };
618
698
  return transformBlockProperties({
619
699
  properties,
@@ -621,53 +701,6 @@ function getBlockProperties({
621
701
  block
622
702
  });
623
703
  }
624
- function getStyleAttribute(style) {
625
- switch (TARGET) {
626
- case "svelte":
627
- case "vue":
628
- case "solid":
629
- return convertStyleMapToCSSArray(style).join(" ");
630
- case "qwik":
631
- case "reactNative":
632
- case "react":
633
- case "rsc":
634
- return style;
635
- }
636
- }
637
-
638
- // src/components/dynamic-renderer/dynamic-renderer.tsx
639
- import { Show as Show3 } from "solid-js";
640
- import { Dynamic } from "solid-js/web";
641
-
642
- // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
643
- var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
644
- var isEmptyElement = (tagName) => {
645
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
646
- };
647
-
648
- // src/components/dynamic-renderer/dynamic-renderer.tsx
649
- function DynamicRenderer(props) {
650
- return <Show3
651
- fallback={<Dynamic
652
- {...props.attributes}
653
- {...props.actionAttributes}
654
- component={props.TagName}
655
- />}
656
- when={!isEmptyElement(props.TagName)}
657
- ><Show3
658
- fallback={<Dynamic
659
- {...props.attributes}
660
- {...props.actionAttributes}
661
- component={props.TagName}
662
- >{props.children}</Dynamic>}
663
- when={typeof props.TagName === "string"}
664
- ><Dynamic
665
- {...props.attributes}
666
- {...props.actionAttributes}
667
- component={props.TagName}
668
- >{props.children}</Dynamic></Show3></Show3>;
669
- }
670
- var Dynamic_renderer_default = DynamicRenderer;
671
704
 
672
705
  // src/components/block/components/block-wrapper.tsx
673
706
  function BlockWrapper(props) {
@@ -690,7 +723,7 @@ function BlockWrapper(props) {
690
723
  var Block_wrapper_default = BlockWrapper;
691
724
 
692
725
  // src/components/block/components/component-ref/component-ref.tsx
693
- import { Show as Show4, For, createSignal as createSignal2 } from "solid-js";
726
+ import { Show as Show3, For, createSignal as createSignal2 } from "solid-js";
694
727
  import { Dynamic as Dynamic3 } from "solid-js/web";
695
728
 
696
729
  // src/components/block/components/interactive-element.tsx
@@ -754,12 +787,13 @@ function ComponentRef(props) {
754
787
  const [Wrapper, setWrapper] = createSignal2(
755
788
  props.isInteractive ? interactive_element_default : props.componentRef
756
789
  );
757
- return <Show4 when={props.componentRef}><Dynamic3
790
+ return <Show3 when={props.componentRef}><Dynamic3
758
791
  {...getWrapperProps({
759
792
  componentOptions: props.componentOptions,
760
793
  builderBlock: props.builderBlock,
761
794
  context: props.context,
762
795
  componentRef: props.componentRef,
796
+ linkComponent: props.linkComponent,
763
797
  includeBlockProps: props.includeBlockProps,
764
798
  isInteractive: props.isInteractive,
765
799
  contextValue: props.context
@@ -772,8 +806,9 @@ function ComponentRef(props) {
772
806
  block={child}
773
807
  context={props.context}
774
808
  registeredComponents={props.registeredComponents}
809
+ linkComponent={props.linkComponent}
775
810
  />;
776
- }}</For></Dynamic3></Show4>;
811
+ }}</For></Dynamic3></Show3>;
777
812
  }
778
813
  var Component_ref_default = ComponentRef;
779
814
 
@@ -785,6 +820,7 @@ function RepeatedBlock(props) {
785
820
  block={props.block}
786
821
  context={store()}
787
822
  registeredComponents={props.registeredComponents}
823
+ linkComponent={props.linkComponent}
788
824
  /></builder_context_default.Provider>;
789
825
  }
790
826
  var Repeated_block_default = RepeatedBlock;
@@ -816,6 +852,10 @@ function Block(props) {
816
852
  });
817
853
  }
818
854
  function Tag() {
855
+ const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
856
+ if (shouldUseLink) {
857
+ return props.linkComponent || "a";
858
+ }
819
859
  return props.block.tagName || "div";
820
860
  }
821
861
  function canShowBlock() {
@@ -839,32 +879,37 @@ function Block(props) {
839
879
  componentOptions: {
840
880
  ...getBlockComponentOptions(processedBlock()),
841
881
  builderContext: props.context,
882
+ ...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
883
+ builderLinkComponent: props.linkComponent
884
+ } : {},
842
885
  ...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
843
886
  builderComponents: props.registeredComponents
844
887
  } : {}
845
888
  },
846
889
  context: childrenContext(),
890
+ linkComponent: props.linkComponent,
847
891
  registeredComponents: props.registeredComponents,
848
892
  builderBlock: processedBlock(),
849
893
  includeBlockProps: blockComponent()?.noWrap === true,
850
894
  isInteractive: !blockComponent()?.isRSC
851
895
  };
852
896
  }
853
- return <Show5 when={canShowBlock()}>
897
+ return <Show4 when={canShowBlock()}>
854
898
  <Block_styles_default block={props.block} context={props.context} />
855
- <Show5
899
+ <Show4
856
900
  fallback={<Component_ref_default
857
901
  componentRef={componentRefProps().componentRef}
858
902
  componentOptions={componentRefProps().componentOptions}
859
903
  blockChildren={componentRefProps().blockChildren}
860
904
  context={componentRefProps().context}
861
905
  registeredComponents={componentRefProps().registeredComponents}
906
+ linkComponent={componentRefProps().linkComponent}
862
907
  builderBlock={componentRefProps().builderBlock}
863
908
  includeBlockProps={componentRefProps().includeBlockProps}
864
909
  isInteractive={componentRefProps().isInteractive}
865
910
  />}
866
911
  when={!blockComponent()?.noWrap}
867
- ><Show5
912
+ ><Show4
868
913
  fallback={<For2 each={repeatItem()}>{(data, _index) => {
869
914
  const index = _index();
870
915
  return <Repeated_block_default
@@ -872,6 +917,7 @@ function Block(props) {
872
917
  repeatContext={data.context}
873
918
  block={data.block}
874
919
  registeredComponents={props.registeredComponents}
920
+ linkComponent={props.linkComponent}
875
921
  />;
876
922
  }}</For2>}
877
923
  when={!repeatItem()}
@@ -879,6 +925,7 @@ function Block(props) {
879
925
  Wrapper={Tag()}
880
926
  block={processedBlock()}
881
927
  context={props.context}
928
+ linkComponent={props.linkComponent}
882
929
  >
883
930
  <Component_ref_default
884
931
  componentRef={componentRefProps().componentRef}
@@ -886,6 +933,7 @@ function Block(props) {
886
933
  blockChildren={componentRefProps().blockChildren}
887
934
  context={componentRefProps().context}
888
935
  registeredComponents={componentRefProps().registeredComponents}
936
+ linkComponent={componentRefProps().linkComponent}
889
937
  builderBlock={componentRefProps().builderBlock}
890
938
  includeBlockProps={componentRefProps().includeBlockProps}
891
939
  isInteractive={componentRefProps().isInteractive}
@@ -897,16 +945,17 @@ function Block(props) {
897
945
  block={child}
898
946
  context={childrenContext()}
899
947
  registeredComponents={props.registeredComponents}
948
+ linkComponent={props.linkComponent}
900
949
  />;
901
950
  }}</For2>
902
- </Block_wrapper_default></Show5></Show5>
903
- </Show5>;
951
+ </Block_wrapper_default></Show4></Show4>
952
+ </Show4>;
904
953
  }
905
954
  var Block_default = Block;
906
955
 
907
956
  // src/components/blocks/blocks-wrapper.tsx
908
957
  import { Dynamic as Dynamic4 } from "solid-js/web";
909
- import { css as css2 } from "solid-styled-components";
958
+ import { css } from "solid-styled-components";
910
959
  function BlocksWrapper(props) {
911
960
  function className() {
912
961
  return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
@@ -940,7 +989,7 @@ function BlocksWrapper(props) {
940
989
  }
941
990
  }
942
991
  return <Dynamic4
943
- class={className() + " " + css2({
992
+ class={className() + " " + css({
944
993
  display: "flex",
945
994
  flexDirection: "column",
946
995
  alignItems: "stretch"
@@ -969,15 +1018,16 @@ function Blocks(props) {
969
1018
  styleProp={props.styleProp}
970
1019
  BlocksWrapper={props.context?.BlocksWrapper}
971
1020
  BlocksWrapperProps={props.context?.BlocksWrapperProps}
972
- ><Show6 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
1021
+ ><Show5 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
973
1022
  const index = _index();
974
1023
  return <Block_default
975
1024
  key={block.id}
976
1025
  block={block}
1026
+ linkComponent={props.linkComponent}
977
1027
  context={props.context || builderContext}
978
1028
  registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
979
1029
  />;
980
- }}</For3></Show6></Blocks_wrapper_default>;
1030
+ }}</For3></Show5></Blocks_wrapper_default>;
981
1031
  }
982
1032
  var Blocks_default = Blocks;
983
1033
 
@@ -1026,7 +1076,13 @@ function Columns(props) {
1026
1076
  const mobileWidth = "100%";
1027
1077
  const mobileMarginLeft = 0;
1028
1078
  const marginLeftKey = "margin-left";
1079
+ const sharedStyles = {
1080
+ display: "flex",
1081
+ flexDirection: "column",
1082
+ alignItems: "stretch"
1083
+ };
1029
1084
  return {
1085
+ ...sharedStyles,
1030
1086
  width,
1031
1087
  [marginLeftKey]: gutterPixels,
1032
1088
  "--column-width-mobile": getMobileStyle({
@@ -1081,25 +1137,28 @@ function Columns(props) {
1081
1137
  `;
1082
1138
  }
1083
1139
  return <div
1084
- class={`builder-columns ${props.builderBlock.id}-breakpoints ` + css3({
1140
+ class={`builder-columns ${props.builderBlock.id}-breakpoints ` + css2({
1085
1141
  display: "flex",
1086
1142
  lineHeight: "normal"
1087
1143
  })}
1088
1144
  style={columnsCssVars()}
1089
1145
  {...{}}
1090
1146
  >
1091
- <Show7 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show7>
1147
+ <Show6 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show6>
1092
1148
  <For4 each={props.columns}>{(column, _index) => {
1093
1149
  const index = _index();
1094
- return <div
1095
- class={"builder-column " + css3({
1096
- display: "flex",
1097
- flexDirection: "column",
1098
- alignItems: "stretch"
1099
- })}
1100
- style={columnCssVars(index)}
1101
- {...{}}
1150
+ return <Dynamic_renderer_default
1102
1151
  key={index}
1152
+ TagName={column.link ? props.builderLinkComponent || "a" : "div"}
1153
+ actionAttributes={{}}
1154
+ attributes={{
1155
+ ...{},
1156
+ ...column.link ? {
1157
+ href: column.link
1158
+ } : {},
1159
+ [getClassPropName()]: "builder-column",
1160
+ style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1161
+ }}
1103
1162
  ><Blocks_default
1104
1163
  path={`component.options.columns.${index}.blocks`}
1105
1164
  parent={props.builderBlock.id}
@@ -1108,8 +1167,9 @@ function Columns(props) {
1108
1167
  }}
1109
1168
  context={props.builderContext}
1110
1169
  registeredComponents={props.builderComponents}
1170
+ linkComponent={props.builderLinkComponent}
1111
1171
  blocks={column.blocks}
1112
- /></div>;
1172
+ /></Dynamic_renderer_default>;
1113
1173
  }}</For4>
1114
1174
  </div>;
1115
1175
  }
@@ -1122,8 +1182,8 @@ function FragmentComponent(props) {
1122
1182
  var fragment_default = FragmentComponent;
1123
1183
 
1124
1184
  // src/blocks/image/image.tsx
1125
- import { Show as Show8 } from "solid-js";
1126
- import { css as css4 } from "solid-styled-components";
1185
+ import { Show as Show7 } from "solid-js";
1186
+ import { css as css3 } from "solid-styled-components";
1127
1187
 
1128
1188
  // src/blocks/image/image.helpers.ts
1129
1189
  function removeProtocol(path) {
@@ -1212,9 +1272,9 @@ function Image(props) {
1212
1272
  }
1213
1273
  return <>
1214
1274
  <picture>
1215
- <Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
1275
+ <Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
1216
1276
  <img
1217
- class={"builder-image" + (props.className ? " " + props.className : "") + " " + css4({
1277
+ class={"builder-image" + (props.className ? " " + props.className : "") + " " + css3({
1218
1278
  opacity: "1",
1219
1279
  transition: "opacity 0.2s ease-in-out"
1220
1280
  })}
@@ -1231,10 +1291,10 @@ function Image(props) {
1231
1291
  sizes={props.sizes}
1232
1292
  />
1233
1293
  </picture>
1234
- <Show8
1294
+ <Show7
1235
1295
  when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
1236
1296
  ><div
1237
- class={"builder-image-sizer " + css4({
1297
+ class={"builder-image-sizer " + css3({
1238
1298
  width: "100%",
1239
1299
  pointerEvents: "none",
1240
1300
  fontSize: "0"
@@ -1242,10 +1302,10 @@ function Image(props) {
1242
1302
  style={{
1243
1303
  "padding-top": props.aspectRatio * 100 + "%"
1244
1304
  }}
1245
- /></Show8>
1246
- <Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
1247
- <Show8 when={!props.fitContent && props.children}><div
1248
- class={css4({
1305
+ /></Show7>
1306
+ <Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
1307
+ <Show7 when={!props.fitContent && props.children}><div
1308
+ class={css3({
1249
1309
  display: "flex",
1250
1310
  flexDirection: "column",
1251
1311
  alignItems: "stretch",
@@ -1255,7 +1315,7 @@ function Image(props) {
1255
1315
  width: "100%",
1256
1316
  height: "100%"
1257
1317
  })}
1258
- >{props.children}</div></Show8>
1318
+ >{props.children}</div></Show7>
1259
1319
  </>;
1260
1320
  }
1261
1321
  var image_default = Image;
@@ -1285,7 +1345,7 @@ var section_default = SectionComponent;
1285
1345
  import { onMount as onMount4, on as on3, createEffect as createEffect3, createSignal as createSignal14 } from "solid-js";
1286
1346
 
1287
1347
  // src/components/content-variants/content-variants.tsx
1288
- import { Show as Show12, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
1348
+ import { Show as Show11, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
1289
1349
 
1290
1350
  // src/helpers/url.ts
1291
1351
  var getTopLevelDomain = (host) => {
@@ -1479,7 +1539,7 @@ var handleABTesting = async ({
1479
1539
  var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
1480
1540
 
1481
1541
  // src/components/content/content.tsx
1482
- import { Show as Show11, createSignal as createSignal12 } from "solid-js";
1542
+ import { Show as Show10, createSignal as createSignal12 } from "solid-js";
1483
1543
 
1484
1544
  // src/blocks/button/component-info.ts
1485
1545
  var componentInfo = {
@@ -2288,7 +2348,7 @@ var componentInfo12 = {
2288
2348
  };
2289
2349
 
2290
2350
  // src/blocks/video/video.tsx
2291
- import { Show as Show9 } from "solid-js";
2351
+ import { Show as Show8 } from "solid-js";
2292
2352
  function Video(props) {
2293
2353
  function videoProps() {
2294
2354
  return {
@@ -2339,8 +2399,8 @@ function Video(props) {
2339
2399
  }}
2340
2400
  src={props.video || "no-src"}
2341
2401
  poster={props.posterImage}
2342
- ><Show9 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show9></video>
2343
- <Show9
2402
+ ><Show8 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show8></video>
2403
+ <Show8
2344
2404
  when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
2345
2405
  ><div
2346
2406
  style={{
@@ -2349,15 +2409,15 @@ function Video(props) {
2349
2409
  "pointer-events": "none",
2350
2410
  "font-size": "0px"
2351
2411
  }}
2352
- /></Show9>
2353
- <Show9 when={props.builderBlock?.children?.length && props.fitContent}><div
2412
+ /></Show8>
2413
+ <Show8 when={props.builderBlock?.children?.length && props.fitContent}><div
2354
2414
  style={{
2355
2415
  display: "flex",
2356
2416
  "flex-direction": "column",
2357
2417
  "align-items": "stretch"
2358
2418
  }}
2359
- >{props.children}</div></Show9>
2360
- <Show9 when={props.builderBlock?.children?.length && !props.fitContent}><div
2419
+ >{props.children}</div></Show8>
2420
+ <Show8 when={props.builderBlock?.children?.length && !props.fitContent}><div
2361
2421
  style={{
2362
2422
  "pointer-events": "none",
2363
2423
  display: "flex",
@@ -2369,7 +2429,7 @@ function Video(props) {
2369
2429
  width: "100%",
2370
2430
  height: "100%"
2371
2431
  }}
2372
- >{props.children}</div></Show9>
2432
+ >{props.children}</div></Show8>
2373
2433
  </div>;
2374
2434
  }
2375
2435
  var video_default = Video;
@@ -2489,7 +2549,7 @@ function InlinedScript(props) {
2489
2549
  var Inlined_script_default = InlinedScript;
2490
2550
 
2491
2551
  // src/components/content/components/enable-editor.tsx
2492
- import { Show as Show10, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
2552
+ import { Show as Show9, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
2493
2553
  import { Dynamic as Dynamic5 } from "solid-js/web";
2494
2554
 
2495
2555
  // src/helpers/preview-lru-cache/get.ts
@@ -2984,7 +3044,7 @@ var getInteractionPropertiesForEvent = (event) => {
2984
3044
  };
2985
3045
 
2986
3046
  // src/constants/sdk-version.ts
2987
- var SDK_VERSION = "0.12.2";
3047
+ var SDK_VERSION = "0.12.4";
2988
3048
 
2989
3049
  // src/functions/register.ts
2990
3050
  var registry = {};
@@ -3408,7 +3468,7 @@ function EnableEditor(props) {
3408
3468
  }
3409
3469
  }
3410
3470
  createEffect2(on2(() => [props.locale], onUpdateFn_6));
3411
- return <builder_context_default.Provider value={props.builderContextSignal}><Show10 when={props.builderContextSignal.content}><Dynamic5
3471
+ return <builder_context_default.Provider value={props.builderContextSignal}><Show9 when={props.builderContextSignal.content}><Dynamic5
3412
3472
  class={`variant-${props.content?.testVariationId || props.content?.id}`}
3413
3473
  {...{}}
3414
3474
  key={forceReRenderCount()}
@@ -3423,7 +3483,7 @@ function EnableEditor(props) {
3423
3483
  }}
3424
3484
  {...props.contentWrapperProps}
3425
3485
  component={ContentWrapper()}
3426
- >{props.children}</Dynamic5></Show10></builder_context_default.Provider>;
3486
+ >{props.children}</Dynamic5></Show9></builder_context_default.Provider>;
3427
3487
  }
3428
3488
  var Enable_editor_default = EnableEditor;
3429
3489
 
@@ -3497,6 +3557,10 @@ ${getFontCss({
3497
3557
  customFonts: props.customFonts
3498
3558
  })}
3499
3559
 
3560
+ .builder-button {
3561
+ all: unset;
3562
+ }
3563
+
3500
3564
  .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
3501
3565
  margin: 0;
3502
3566
  }
@@ -3641,21 +3705,23 @@ function ContentComponent(props) {
3641
3705
  builderContextSignal={builderContextSignal()}
3642
3706
  contentWrapper={props.contentWrapper}
3643
3707
  contentWrapperProps={props.contentWrapperProps}
3708
+ linkComponent={props.linkComponent}
3644
3709
  trustedHosts={props.trustedHosts}
3645
3710
  {...{
3646
3711
  setBuilderContextSignal
3647
3712
  }}
3648
3713
  >
3649
- <Show11 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show11>
3650
- <Show11 when={TARGET !== "reactNative"}><Styles_default
3714
+ <Show10 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show10>
3715
+ <Show10 when={TARGET !== "reactNative"}><Styles_default
3651
3716
  contentId={builderContextSignal().content?.id}
3652
3717
  cssCode={builderContextSignal().content?.data?.cssCode}
3653
3718
  customFonts={builderContextSignal().content?.data?.customFonts}
3654
- /></Show11>
3719
+ /></Show10>
3655
3720
  <Blocks_default
3656
3721
  blocks={builderContextSignal().content?.data?.blocks}
3657
3722
  context={builderContextSignal()}
3658
3723
  registeredComponents={registeredComponents()}
3724
+ linkComponent={props.linkComponent}
3659
3725
  />
3660
3726
  </Enable_editor_default></components_context_default.Provider>;
3661
3727
  }
@@ -3694,8 +3760,8 @@ function ContentVariants(props) {
3694
3760
  setShouldRenderVariants(false);
3695
3761
  });
3696
3762
  return <>
3697
- <Show12 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show12>
3698
- <Show12 when={shouldRenderVariants()}>
3763
+ <Show11 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show11>
3764
+ <Show11 when={shouldRenderVariants()}>
3699
3765
  <Inlined_styles_default
3700
3766
  id={`variants-styles-${props.content?.id}`}
3701
3767
  styles={hideVariantsStyleString()}
@@ -3715,6 +3781,7 @@ function ContentVariants(props) {
3715
3781
  apiKey={props.apiKey}
3716
3782
  apiVersion={props.apiVersion}
3717
3783
  customComponents={props.customComponents}
3784
+ linkComponent={props.linkComponent}
3718
3785
  canTrack={props.canTrack}
3719
3786
  locale={props.locale}
3720
3787
  includeRefs={props.includeRefs}
@@ -3727,7 +3794,7 @@ function ContentVariants(props) {
3727
3794
  trustedHosts={props.trustedHosts}
3728
3795
  />;
3729
3796
  }}</For5>
3730
- </Show12>
3797
+ </Show11>
3731
3798
  <Content_default
3732
3799
  {...{}}
3733
3800
  content={defaultContent()}
@@ -3738,6 +3805,7 @@ function ContentVariants(props) {
3738
3805
  apiKey={props.apiKey}
3739
3806
  apiVersion={props.apiVersion}
3740
3807
  customComponents={props.customComponents}
3808
+ linkComponent={props.linkComponent}
3741
3809
  canTrack={props.canTrack}
3742
3810
  locale={props.locale}
3743
3811
  includeRefs={props.includeRefs}
@@ -3782,7 +3850,7 @@ function Symbol(props) {
3782
3850
  const [contentToUse, setContentToUse] = createSignal14(props.symbol?.content);
3783
3851
  function className() {
3784
3852
  return [
3785
- ...[props.attributes.class],
3853
+ ...[props.attributes[getClassPropName()]],
3786
3854
  "builder-symbol",
3787
3855
  props.symbol?.inline ? "builder-inline-symbol" : void 0,
3788
3856
  props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0
@@ -3823,6 +3891,7 @@ function Symbol(props) {
3823
3891
  }}
3824
3892
  model={props.symbol?.model}
3825
3893
  content={contentToUse()}
3894
+ linkComponent={props.builderLinkComponent}
3826
3895
  /></div>;
3827
3896
  }
3828
3897
  var symbol_default = Symbol;