@builder.io/sdk-solid 0.12.3 → 0.12.5

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.
package/lib/node/dev.jsx CHANGED
@@ -1,31 +1,81 @@
1
- // src/blocks/button/button.tsx
1
+ // src/components/dynamic-renderer/dynamic-renderer.tsx
2
2
  import { Show } from "solid-js";
3
- 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) {
4
13
  return <Show
5
- fallback={<button
6
- class={`builder-button ${props.attributes.class}`}
7
- role="button"
8
- {...{}}
14
+ fallback={<Dynamic
9
15
  {...props.attributes}
10
- style={props.attributes.style}
11
- >{props.text}</button>}
12
- when={props.link}
13
- ><a
14
- {...{}}
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
15
28
  {...props.attributes}
16
- href={props.link}
17
- target={props.openLinkInNewTab ? "_blank" : void 0}
18
- role="button"
19
- >{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>;
20
70
  }
21
71
  var button_default = Button;
22
72
 
23
73
  // src/blocks/columns/columns.tsx
24
- import { Show as Show7, For as For4, createSignal as createSignal5 } from "solid-js";
74
+ import { Show as Show6, For as For4, createSignal as createSignal5 } from "solid-js";
25
75
  import { css as css2 } from "solid-styled-components";
26
76
 
27
77
  // src/components/blocks/blocks.tsx
28
- import { useContext, Show as Show6, For as For3 } from "solid-js";
78
+ import { useContext, Show as Show5, For as For3 } from "solid-js";
29
79
 
30
80
  // src/context/builder.context.ts
31
81
  import { createContext } from "solid-js";
@@ -49,7 +99,7 @@ import { createContext as createContext2 } from "solid-js";
49
99
  var components_context_default = createContext2({ registeredComponents: {} });
50
100
 
51
101
  // src/components/block/block.tsx
52
- 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";
53
103
 
54
104
  // src/functions/get-block-component-options.ts
55
105
  function getBlockComponentOptions(block) {
@@ -77,9 +127,6 @@ function isBrowser() {
77
127
  return typeof window !== "undefined" && typeof document !== "undefined";
78
128
  }
79
129
 
80
- // src/constants/target.ts
81
- var TARGET = "solid";
82
-
83
130
  // src/functions/is-iframe.ts
84
131
  function isIframe() {
85
132
  return isBrowser() && window.self !== window.top;
@@ -349,8 +396,33 @@ var runInNode = ({
349
396
  }
350
397
  };
351
398
 
399
+ // src/helpers/nullable.ts
400
+ var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
401
+
402
+ // src/functions/is-node-runtime.ts
403
+ function isNodeRuntime() {
404
+ return typeof process !== "undefined" && checkIsDefined(process?.versions?.node);
405
+ }
406
+
407
+ // src/functions/evaluate/should-force-browser-runtime-in-node.ts
408
+ var shouldForceBrowserRuntimeInNode = () => {
409
+ if (!isNodeRuntime())
410
+ return false;
411
+ const isArm64 = process.arch === "arm64";
412
+ const isNode20 = process.version.startsWith("v20");
413
+ const hasNoNodeSnapshotNodeOption = process.env.NODE_OPTIONS?.includes("--no-node-snapshot");
414
+ if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
415
+ logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
416
+ If you would like to use the \`isolated-vm\` package on this machine, please provide the \`NODE_OPTIONS=--no-node-snapshot\` config to your Node process.
417
+ See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
418
+ `);
419
+ return true;
420
+ }
421
+ return false;
422
+ };
423
+
352
424
  // src/functions/evaluate/choose-eval.ts
353
- var chooseBrowserOrServerEval = (args) => isBrowser() ? runInBrowser(args) : runInNode(args);
425
+ var chooseBrowserOrServerEval = (args) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInNode(args);
354
426
 
355
427
  // src/functions/evaluate/evaluate.ts
356
428
  function evaluate({
@@ -569,9 +641,6 @@ var getSizesForBreakpoints = ({
569
641
  // src/functions/camel-to-kebab-case.ts
570
642
  var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
571
643
 
572
- // src/helpers/nullable.ts
573
- var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
574
-
575
644
  // src/helpers/css.ts
576
645
  var convertStyleMapToCSSArray = (style) => {
577
646
  const cssProps = Object.entries(style).map(([key, value]) => {
@@ -715,6 +784,38 @@ function getBlockActions(options) {
715
784
  return obj;
716
785
  }
717
786
 
787
+ // src/functions/transform-style-property.ts
788
+ function transformStyleProperty({
789
+ style
790
+ }) {
791
+ return style;
792
+ }
793
+
794
+ // src/functions/get-style.ts
795
+ var getStyle = ({
796
+ block,
797
+ context
798
+ }) => {
799
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
800
+ style: block.style || {},
801
+ context,
802
+ block
803
+ }));
804
+ };
805
+ function mapStyleObjToStrIfNeeded(style) {
806
+ switch (TARGET) {
807
+ case "svelte":
808
+ case "vue":
809
+ case "solid":
810
+ return convertStyleMapToCSSArray(style).join(" ");
811
+ case "qwik":
812
+ case "reactNative":
813
+ case "react":
814
+ case "rsc":
815
+ return style;
816
+ }
817
+ }
818
+
718
819
  // src/functions/transform-block-properties.ts
719
820
  function transformBlockProperties({
720
821
  properties
@@ -736,8 +837,11 @@ function getBlockProperties({
736
837
  ...extractRelevantRootBlockProperties(block),
737
838
  ...block.properties,
738
839
  "builder-id": block.id,
739
- style: block.style ? getStyleAttribute(block.style) : void 0,
740
- class: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
840
+ style: getStyle({
841
+ block,
842
+ context
843
+ }),
844
+ [getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
741
845
  };
742
846
  return transformBlockProperties({
743
847
  properties,
@@ -745,53 +849,6 @@ function getBlockProperties({
745
849
  block
746
850
  });
747
851
  }
748
- function getStyleAttribute(style) {
749
- switch (TARGET) {
750
- case "svelte":
751
- case "vue":
752
- case "solid":
753
- return convertStyleMapToCSSArray(style).join(" ");
754
- case "qwik":
755
- case "reactNative":
756
- case "react":
757
- case "rsc":
758
- return style;
759
- }
760
- }
761
-
762
- // src/components/dynamic-renderer/dynamic-renderer.tsx
763
- import { Show as Show3 } from "solid-js";
764
- import { Dynamic } from "solid-js/web";
765
-
766
- // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
767
- var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
768
- var isEmptyElement = (tagName) => {
769
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
770
- };
771
-
772
- // src/components/dynamic-renderer/dynamic-renderer.tsx
773
- function DynamicRenderer(props) {
774
- return <Show3
775
- fallback={<Dynamic
776
- {...props.attributes}
777
- {...props.actionAttributes}
778
- component={props.TagName}
779
- />}
780
- when={!isEmptyElement(props.TagName)}
781
- ><Show3
782
- fallback={<Dynamic
783
- {...props.attributes}
784
- {...props.actionAttributes}
785
- component={props.TagName}
786
- >{props.children}</Dynamic>}
787
- when={typeof props.TagName === "string"}
788
- ><Dynamic
789
- {...props.attributes}
790
- {...props.actionAttributes}
791
- component={props.TagName}
792
- >{props.children}</Dynamic></Show3></Show3>;
793
- }
794
- var Dynamic_renderer_default = DynamicRenderer;
795
852
 
796
853
  // src/components/block/components/block-wrapper.tsx
797
854
  function BlockWrapper(props) {
@@ -814,7 +871,7 @@ function BlockWrapper(props) {
814
871
  var Block_wrapper_default = BlockWrapper;
815
872
 
816
873
  // src/components/block/components/component-ref/component-ref.tsx
817
- import { Show as Show4, For, createSignal as createSignal2 } from "solid-js";
874
+ import { Show as Show3, For, createSignal as createSignal2 } from "solid-js";
818
875
  import { Dynamic as Dynamic3 } from "solid-js/web";
819
876
 
820
877
  // src/components/block/components/interactive-element.tsx
@@ -878,12 +935,13 @@ function ComponentRef(props) {
878
935
  const [Wrapper, setWrapper] = createSignal2(
879
936
  props.isInteractive ? interactive_element_default : props.componentRef
880
937
  );
881
- return <Show4 when={props.componentRef}><Dynamic3
938
+ return <Show3 when={props.componentRef}><Dynamic3
882
939
  {...getWrapperProps({
883
940
  componentOptions: props.componentOptions,
884
941
  builderBlock: props.builderBlock,
885
942
  context: props.context,
886
943
  componentRef: props.componentRef,
944
+ linkComponent: props.linkComponent,
887
945
  includeBlockProps: props.includeBlockProps,
888
946
  isInteractive: props.isInteractive,
889
947
  contextValue: props.context
@@ -896,8 +954,9 @@ function ComponentRef(props) {
896
954
  block={child}
897
955
  context={props.context}
898
956
  registeredComponents={props.registeredComponents}
957
+ linkComponent={props.linkComponent}
899
958
  />;
900
- }}</For></Dynamic3></Show4>;
959
+ }}</For></Dynamic3></Show3>;
901
960
  }
902
961
  var Component_ref_default = ComponentRef;
903
962
 
@@ -909,6 +968,7 @@ function RepeatedBlock(props) {
909
968
  block={props.block}
910
969
  context={store()}
911
970
  registeredComponents={props.registeredComponents}
971
+ linkComponent={props.linkComponent}
912
972
  /></builder_context_default.Provider>;
913
973
  }
914
974
  var Repeated_block_default = RepeatedBlock;
@@ -940,6 +1000,10 @@ function Block(props) {
940
1000
  });
941
1001
  }
942
1002
  function Tag() {
1003
+ const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
1004
+ if (shouldUseLink) {
1005
+ return props.linkComponent || "a";
1006
+ }
943
1007
  return props.block.tagName || "div";
944
1008
  }
945
1009
  function canShowBlock() {
@@ -963,32 +1027,37 @@ function Block(props) {
963
1027
  componentOptions: {
964
1028
  ...getBlockComponentOptions(processedBlock()),
965
1029
  builderContext: props.context,
1030
+ ...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
1031
+ builderLinkComponent: props.linkComponent
1032
+ } : {},
966
1033
  ...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
967
1034
  builderComponents: props.registeredComponents
968
1035
  } : {}
969
1036
  },
970
1037
  context: childrenContext(),
1038
+ linkComponent: props.linkComponent,
971
1039
  registeredComponents: props.registeredComponents,
972
1040
  builderBlock: processedBlock(),
973
1041
  includeBlockProps: blockComponent()?.noWrap === true,
974
1042
  isInteractive: !blockComponent()?.isRSC
975
1043
  };
976
1044
  }
977
- return <Show5 when={canShowBlock()}>
1045
+ return <Show4 when={canShowBlock()}>
978
1046
  <Block_styles_default block={props.block} context={props.context} />
979
- <Show5
1047
+ <Show4
980
1048
  fallback={<Component_ref_default
981
1049
  componentRef={componentRefProps().componentRef}
982
1050
  componentOptions={componentRefProps().componentOptions}
983
1051
  blockChildren={componentRefProps().blockChildren}
984
1052
  context={componentRefProps().context}
985
1053
  registeredComponents={componentRefProps().registeredComponents}
1054
+ linkComponent={componentRefProps().linkComponent}
986
1055
  builderBlock={componentRefProps().builderBlock}
987
1056
  includeBlockProps={componentRefProps().includeBlockProps}
988
1057
  isInteractive={componentRefProps().isInteractive}
989
1058
  />}
990
1059
  when={!blockComponent()?.noWrap}
991
- ><Show5
1060
+ ><Show4
992
1061
  fallback={<For2 each={repeatItem()}>{(data, _index) => {
993
1062
  const index = _index();
994
1063
  return <Repeated_block_default
@@ -996,6 +1065,7 @@ function Block(props) {
996
1065
  repeatContext={data.context}
997
1066
  block={data.block}
998
1067
  registeredComponents={props.registeredComponents}
1068
+ linkComponent={props.linkComponent}
999
1069
  />;
1000
1070
  }}</For2>}
1001
1071
  when={!repeatItem()}
@@ -1003,6 +1073,7 @@ function Block(props) {
1003
1073
  Wrapper={Tag()}
1004
1074
  block={processedBlock()}
1005
1075
  context={props.context}
1076
+ linkComponent={props.linkComponent}
1006
1077
  >
1007
1078
  <Component_ref_default
1008
1079
  componentRef={componentRefProps().componentRef}
@@ -1010,6 +1081,7 @@ function Block(props) {
1010
1081
  blockChildren={componentRefProps().blockChildren}
1011
1082
  context={componentRefProps().context}
1012
1083
  registeredComponents={componentRefProps().registeredComponents}
1084
+ linkComponent={componentRefProps().linkComponent}
1013
1085
  builderBlock={componentRefProps().builderBlock}
1014
1086
  includeBlockProps={componentRefProps().includeBlockProps}
1015
1087
  isInteractive={componentRefProps().isInteractive}
@@ -1021,10 +1093,11 @@ function Block(props) {
1021
1093
  block={child}
1022
1094
  context={childrenContext()}
1023
1095
  registeredComponents={props.registeredComponents}
1096
+ linkComponent={props.linkComponent}
1024
1097
  />;
1025
1098
  }}</For2>
1026
- </Block_wrapper_default></Show5></Show5>
1027
- </Show5>;
1099
+ </Block_wrapper_default></Show4></Show4>
1100
+ </Show4>;
1028
1101
  }
1029
1102
  var Block_default = Block;
1030
1103
 
@@ -1093,15 +1166,16 @@ function Blocks(props) {
1093
1166
  styleProp={props.styleProp}
1094
1167
  BlocksWrapper={props.context?.BlocksWrapper}
1095
1168
  BlocksWrapperProps={props.context?.BlocksWrapperProps}
1096
- ><Show6 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
1169
+ ><Show5 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
1097
1170
  const index = _index();
1098
1171
  return <Block_default
1099
1172
  key={block.id}
1100
1173
  block={block}
1174
+ linkComponent={props.linkComponent}
1101
1175
  context={props.context || builderContext}
1102
1176
  registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
1103
1177
  />;
1104
- }}</For3></Show6></Blocks_wrapper_default>;
1178
+ }}</For3></Show5></Blocks_wrapper_default>;
1105
1179
  }
1106
1180
  var Blocks_default = Blocks;
1107
1181
 
@@ -1150,7 +1224,13 @@ function Columns(props) {
1150
1224
  const mobileWidth = "100%";
1151
1225
  const mobileMarginLeft = 0;
1152
1226
  const marginLeftKey = "margin-left";
1227
+ const sharedStyles = {
1228
+ display: "flex",
1229
+ flexDirection: "column",
1230
+ alignItems: "stretch"
1231
+ };
1153
1232
  return {
1233
+ ...sharedStyles,
1154
1234
  width,
1155
1235
  [marginLeftKey]: gutterPixels,
1156
1236
  "--column-width-mobile": getMobileStyle({
@@ -1212,18 +1292,21 @@ function Columns(props) {
1212
1292
  style={columnsCssVars()}
1213
1293
  {...{}}
1214
1294
  >
1215
- <Show7 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show7>
1295
+ <Show6 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show6>
1216
1296
  <For4 each={props.columns}>{(column, _index) => {
1217
1297
  const index = _index();
1218
- return <div
1219
- class={"builder-column " + css2({
1220
- display: "flex",
1221
- flexDirection: "column",
1222
- alignItems: "stretch"
1223
- })}
1224
- style={columnCssVars(index)}
1225
- {...{}}
1298
+ return <Dynamic_renderer_default
1226
1299
  key={index}
1300
+ TagName={column.link ? props.builderLinkComponent || "a" : "div"}
1301
+ actionAttributes={{}}
1302
+ attributes={{
1303
+ ...{},
1304
+ ...column.link ? {
1305
+ href: column.link
1306
+ } : {},
1307
+ [getClassPropName()]: "builder-column",
1308
+ style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1309
+ }}
1227
1310
  ><Blocks_default
1228
1311
  path={`component.options.columns.${index}.blocks`}
1229
1312
  parent={props.builderBlock.id}
@@ -1232,8 +1315,9 @@ function Columns(props) {
1232
1315
  }}
1233
1316
  context={props.builderContext}
1234
1317
  registeredComponents={props.builderComponents}
1318
+ linkComponent={props.builderLinkComponent}
1235
1319
  blocks={column.blocks}
1236
- /></div>;
1320
+ /></Dynamic_renderer_default>;
1237
1321
  }}</For4>
1238
1322
  </div>;
1239
1323
  }
@@ -1246,7 +1330,7 @@ function FragmentComponent(props) {
1246
1330
  var fragment_default = FragmentComponent;
1247
1331
 
1248
1332
  // src/blocks/image/image.tsx
1249
- import { Show as Show8 } from "solid-js";
1333
+ import { Show as Show7 } from "solid-js";
1250
1334
  import { css as css3 } from "solid-styled-components";
1251
1335
 
1252
1336
  // src/blocks/image/image.helpers.ts
@@ -1336,7 +1420,7 @@ function Image(props) {
1336
1420
  }
1337
1421
  return <>
1338
1422
  <picture>
1339
- <Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
1423
+ <Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
1340
1424
  <img
1341
1425
  class={"builder-image" + (props.className ? " " + props.className : "") + " " + css3({
1342
1426
  opacity: "1",
@@ -1355,7 +1439,7 @@ function Image(props) {
1355
1439
  sizes={props.sizes}
1356
1440
  />
1357
1441
  </picture>
1358
- <Show8
1442
+ <Show7
1359
1443
  when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
1360
1444
  ><div
1361
1445
  class={"builder-image-sizer " + css3({
@@ -1366,9 +1450,9 @@ function Image(props) {
1366
1450
  style={{
1367
1451
  "padding-top": props.aspectRatio * 100 + "%"
1368
1452
  }}
1369
- /></Show8>
1370
- <Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
1371
- <Show8 when={!props.fitContent && props.children}><div
1453
+ /></Show7>
1454
+ <Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
1455
+ <Show7 when={!props.fitContent && props.children}><div
1372
1456
  class={css3({
1373
1457
  display: "flex",
1374
1458
  flexDirection: "column",
@@ -1379,7 +1463,7 @@ function Image(props) {
1379
1463
  width: "100%",
1380
1464
  height: "100%"
1381
1465
  })}
1382
- >{props.children}</div></Show8>
1466
+ >{props.children}</div></Show7>
1383
1467
  </>;
1384
1468
  }
1385
1469
  var image_default = Image;
@@ -1409,7 +1493,7 @@ var section_default = SectionComponent;
1409
1493
  import { onMount as onMount4, on as on3, createEffect as createEffect3, createSignal as createSignal14 } from "solid-js";
1410
1494
 
1411
1495
  // src/components/content-variants/content-variants.tsx
1412
- import { Show as Show12, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
1496
+ import { Show as Show11, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
1413
1497
 
1414
1498
  // src/helpers/url.ts
1415
1499
  var getTopLevelDomain = (host) => {
@@ -1603,7 +1687,7 @@ var handleABTesting = async ({
1603
1687
  var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
1604
1688
 
1605
1689
  // src/components/content/content.tsx
1606
- import { Show as Show11, createSignal as createSignal12 } from "solid-js";
1690
+ import { Show as Show10, createSignal as createSignal12 } from "solid-js";
1607
1691
 
1608
1692
  // src/blocks/button/component-info.ts
1609
1693
  var componentInfo = {
@@ -2412,7 +2496,7 @@ var componentInfo12 = {
2412
2496
  };
2413
2497
 
2414
2498
  // src/blocks/video/video.tsx
2415
- import { Show as Show9 } from "solid-js";
2499
+ import { Show as Show8 } from "solid-js";
2416
2500
  function Video(props) {
2417
2501
  function videoProps() {
2418
2502
  return {
@@ -2463,8 +2547,8 @@ function Video(props) {
2463
2547
  }}
2464
2548
  src={props.video || "no-src"}
2465
2549
  poster={props.posterImage}
2466
- ><Show9 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show9></video>
2467
- <Show9
2550
+ ><Show8 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show8></video>
2551
+ <Show8
2468
2552
  when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
2469
2553
  ><div
2470
2554
  style={{
@@ -2473,15 +2557,15 @@ function Video(props) {
2473
2557
  "pointer-events": "none",
2474
2558
  "font-size": "0px"
2475
2559
  }}
2476
- /></Show9>
2477
- <Show9 when={props.builderBlock?.children?.length && props.fitContent}><div
2560
+ /></Show8>
2561
+ <Show8 when={props.builderBlock?.children?.length && props.fitContent}><div
2478
2562
  style={{
2479
2563
  display: "flex",
2480
2564
  "flex-direction": "column",
2481
2565
  "align-items": "stretch"
2482
2566
  }}
2483
- >{props.children}</div></Show9>
2484
- <Show9 when={props.builderBlock?.children?.length && !props.fitContent}><div
2567
+ >{props.children}</div></Show8>
2568
+ <Show8 when={props.builderBlock?.children?.length && !props.fitContent}><div
2485
2569
  style={{
2486
2570
  "pointer-events": "none",
2487
2571
  display: "flex",
@@ -2493,7 +2577,7 @@ function Video(props) {
2493
2577
  width: "100%",
2494
2578
  height: "100%"
2495
2579
  }}
2496
- >{props.children}</div></Show9>
2580
+ >{props.children}</div></Show8>
2497
2581
  </div>;
2498
2582
  }
2499
2583
  var video_default = Video;
@@ -2613,7 +2697,7 @@ function InlinedScript(props) {
2613
2697
  var Inlined_script_default = InlinedScript;
2614
2698
 
2615
2699
  // src/components/content/components/enable-editor.tsx
2616
- import { Show as Show10, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
2700
+ import { Show as Show9, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
2617
2701
  import { Dynamic as Dynamic5 } from "solid-js/web";
2618
2702
 
2619
2703
  // src/helpers/preview-lru-cache/get.ts
@@ -3108,7 +3192,7 @@ var getInteractionPropertiesForEvent = (event) => {
3108
3192
  };
3109
3193
 
3110
3194
  // src/constants/sdk-version.ts
3111
- var SDK_VERSION = "0.12.3";
3195
+ var SDK_VERSION = "0.12.5";
3112
3196
 
3113
3197
  // src/functions/register.ts
3114
3198
  var registry = {};
@@ -3532,7 +3616,7 @@ function EnableEditor(props) {
3532
3616
  }
3533
3617
  }
3534
3618
  createEffect2(on2(() => [props.locale], onUpdateFn_6));
3535
- return <builder_context_default.Provider value={props.builderContextSignal}><Show10 when={props.builderContextSignal.content}><Dynamic5
3619
+ return <builder_context_default.Provider value={props.builderContextSignal}><Show9 when={props.builderContextSignal.content}><Dynamic5
3536
3620
  class={`variant-${props.content?.testVariationId || props.content?.id}`}
3537
3621
  {...{}}
3538
3622
  key={forceReRenderCount()}
@@ -3547,7 +3631,7 @@ function EnableEditor(props) {
3547
3631
  }}
3548
3632
  {...props.contentWrapperProps}
3549
3633
  component={ContentWrapper()}
3550
- >{props.children}</Dynamic5></Show10></builder_context_default.Provider>;
3634
+ >{props.children}</Dynamic5></Show9></builder_context_default.Provider>;
3551
3635
  }
3552
3636
  var Enable_editor_default = EnableEditor;
3553
3637
 
@@ -3769,21 +3853,23 @@ function ContentComponent(props) {
3769
3853
  builderContextSignal={builderContextSignal()}
3770
3854
  contentWrapper={props.contentWrapper}
3771
3855
  contentWrapperProps={props.contentWrapperProps}
3856
+ linkComponent={props.linkComponent}
3772
3857
  trustedHosts={props.trustedHosts}
3773
3858
  {...{
3774
3859
  setBuilderContextSignal
3775
3860
  }}
3776
3861
  >
3777
- <Show11 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show11>
3778
- <Show11 when={TARGET !== "reactNative"}><Styles_default
3862
+ <Show10 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show10>
3863
+ <Show10 when={TARGET !== "reactNative"}><Styles_default
3779
3864
  contentId={builderContextSignal().content?.id}
3780
3865
  cssCode={builderContextSignal().content?.data?.cssCode}
3781
3866
  customFonts={builderContextSignal().content?.data?.customFonts}
3782
- /></Show11>
3867
+ /></Show10>
3783
3868
  <Blocks_default
3784
3869
  blocks={builderContextSignal().content?.data?.blocks}
3785
3870
  context={builderContextSignal()}
3786
3871
  registeredComponents={registeredComponents()}
3872
+ linkComponent={props.linkComponent}
3787
3873
  />
3788
3874
  </Enable_editor_default></components_context_default.Provider>;
3789
3875
  }
@@ -3822,8 +3908,8 @@ function ContentVariants(props) {
3822
3908
  setShouldRenderVariants(false);
3823
3909
  });
3824
3910
  return <>
3825
- <Show12 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show12>
3826
- <Show12 when={shouldRenderVariants()}>
3911
+ <Show11 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show11>
3912
+ <Show11 when={shouldRenderVariants()}>
3827
3913
  <Inlined_styles_default
3828
3914
  id={`variants-styles-${props.content?.id}`}
3829
3915
  styles={hideVariantsStyleString()}
@@ -3843,6 +3929,7 @@ function ContentVariants(props) {
3843
3929
  apiKey={props.apiKey}
3844
3930
  apiVersion={props.apiVersion}
3845
3931
  customComponents={props.customComponents}
3932
+ linkComponent={props.linkComponent}
3846
3933
  canTrack={props.canTrack}
3847
3934
  locale={props.locale}
3848
3935
  includeRefs={props.includeRefs}
@@ -3855,7 +3942,7 @@ function ContentVariants(props) {
3855
3942
  trustedHosts={props.trustedHosts}
3856
3943
  />;
3857
3944
  }}</For5>
3858
- </Show12>
3945
+ </Show11>
3859
3946
  <Content_default
3860
3947
  {...{}}
3861
3948
  content={defaultContent()}
@@ -3866,6 +3953,7 @@ function ContentVariants(props) {
3866
3953
  apiKey={props.apiKey}
3867
3954
  apiVersion={props.apiVersion}
3868
3955
  customComponents={props.customComponents}
3956
+ linkComponent={props.linkComponent}
3869
3957
  canTrack={props.canTrack}
3870
3958
  locale={props.locale}
3871
3959
  includeRefs={props.includeRefs}
@@ -3910,7 +3998,7 @@ function Symbol(props) {
3910
3998
  const [contentToUse, setContentToUse] = createSignal14(props.symbol?.content);
3911
3999
  function className() {
3912
4000
  return [
3913
- ...[props.attributes.class],
4001
+ ...[props.attributes[getClassPropName()]],
3914
4002
  "builder-symbol",
3915
4003
  props.symbol?.inline ? "builder-inline-symbol" : void 0,
3916
4004
  props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0
@@ -3951,6 +4039,7 @@ function Symbol(props) {
3951
4039
  }}
3952
4040
  model={props.symbol?.model}
3953
4041
  content={contentToUse()}
4042
+ linkComponent={props.builderLinkComponent}
3954
4043
  /></div>;
3955
4044
  }
3956
4045
  var symbol_default = Symbol;