@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.
@@ -1,44 +1,99 @@
1
1
  import { createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, Dynamic, memo, use } from 'solid-js/web';
2
- import { createContext, Show, useContext, For, createSignal, onMount, createEffect, on } from 'solid-js';
2
+ import { createContext, useContext, Show, For, createSignal, onMount, createEffect, on } from 'solid-js';
3
3
  import { css } from 'solid-styled-components';
4
4
 
5
5
  // src/blocks/button/button.tsx
6
- var _tmpl$ = /* @__PURE__ */ template(`<a>`);
7
- var _tmpl$2 = /* @__PURE__ */ template(`<button role=button>`);
8
- function Button(props) {
6
+
7
+ // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
8
+ var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
9
+ var isEmptyElement = (tagName) => {
10
+ return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
11
+ };
12
+
13
+ // src/components/dynamic-renderer/dynamic-renderer.tsx
14
+ function DynamicRenderer(props) {
9
15
  return createComponent(Show, {
10
16
  get fallback() {
11
- return (() => {
12
- const _el$2 = _tmpl$2();
13
- spread(_el$2, mergeProps({
14
- get ["class"]() {
15
- return `builder-button ${props.attributes.class}`;
16
- }
17
- }, {}, () => props.attributes, {
18
- get style() {
19
- return props.attributes.style;
20
- }
21
- }), false, true);
22
- insert(_el$2, () => props.text);
23
- return _el$2;
24
- })();
17
+ return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
18
+ get component() {
19
+ return props.TagName;
20
+ }
21
+ }));
25
22
  },
26
23
  get when() {
27
- return props.link;
24
+ return !isEmptyElement(props.TagName);
28
25
  },
29
26
  get children() {
30
- const _el$ = _tmpl$();
31
- spread(_el$, mergeProps({}, () => props.attributes, {
32
- get href() {
33
- return props.link;
27
+ return createComponent(Show, {
28
+ get fallback() {
29
+ return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
30
+ get component() {
31
+ return props.TagName;
32
+ },
33
+ get children() {
34
+ return props.children;
35
+ }
36
+ }));
34
37
  },
35
- get target() {
36
- return props.openLinkInNewTab ? "_blank" : void 0;
38
+ get when() {
39
+ return typeof props.TagName === "string";
37
40
  },
38
- "role": "button"
39
- }), false, true);
40
- insert(_el$, () => props.text);
41
- return _el$;
41
+ get children() {
42
+ return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
43
+ get component() {
44
+ return props.TagName;
45
+ },
46
+ get children() {
47
+ return props.children;
48
+ }
49
+ }));
50
+ }
51
+ });
52
+ }
53
+ });
54
+ }
55
+ var dynamic_renderer_default = DynamicRenderer;
56
+
57
+ // src/constants/target.ts
58
+ var TARGET = "solid";
59
+
60
+ // src/functions/get-class-prop-name.ts
61
+ var getClassPropName = () => {
62
+ switch (TARGET) {
63
+ case "react":
64
+ case "reactNative":
65
+ case "rsc":
66
+ return "className";
67
+ case "svelte":
68
+ case "vue":
69
+ case "solid":
70
+ case "qwik":
71
+ return "class";
72
+ }
73
+ };
74
+
75
+ // src/blocks/button/button.tsx
76
+ function Button(props) {
77
+ return createComponent(dynamic_renderer_default, {
78
+ get TagName() {
79
+ return props.link ? props.builderLinkComponent || "a" : "button";
80
+ },
81
+ get attributes() {
82
+ return {
83
+ ...props.attributes,
84
+ [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
85
+ ...props.link ? {
86
+ href: props.link,
87
+ target: props.openLinkInNewTab ? "_blank" : void 0,
88
+ role: "link"
89
+ } : {
90
+ role: "button"
91
+ }
92
+ };
93
+ },
94
+ actionAttributes: {},
95
+ get children() {
96
+ return props.text;
42
97
  }
43
98
  });
44
99
  }
@@ -85,9 +140,6 @@ function isBrowser() {
85
140
  return typeof window !== "undefined" && typeof document !== "undefined";
86
141
  }
87
142
 
88
- // src/constants/target.ts
89
- var TARGET = "solid";
90
-
91
143
  // src/functions/is-iframe.ts
92
144
  function isIframe() {
93
145
  return isBrowser() && window.self !== window.top;
@@ -218,8 +270,33 @@ function flattenState(rootState, localState, rootSetState) {
218
270
  });
219
271
  }
220
272
 
273
+ // src/helpers/nullable.ts
274
+ var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
275
+
276
+ // src/functions/is-node-runtime.ts
277
+ function isNodeRuntime() {
278
+ return typeof process !== "undefined" && checkIsDefined(process?.versions?.node);
279
+ }
280
+
281
+ // src/functions/evaluate/should-force-browser-runtime-in-node.ts
282
+ var shouldForceBrowserRuntimeInNode = () => {
283
+ if (!isNodeRuntime())
284
+ return false;
285
+ const isArm64 = process.arch === "arm64";
286
+ const isNode20 = process.version.startsWith("v20");
287
+ const hasNoNodeSnapshotNodeOption = process.env.NODE_OPTIONS?.includes("--no-node-snapshot");
288
+ if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
289
+ logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
290
+ 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.
291
+ See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
292
+ `);
293
+ return true;
294
+ }
295
+ return false;
296
+ };
297
+
221
298
  // src/functions/evaluate/choose-eval.ts
222
- var chooseBrowserOrServerEval = (args) => isBrowser() ? runInBrowser(args) : runInBrowser(args);
299
+ var chooseBrowserOrServerEval = (args) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInBrowser(args);
223
300
 
224
301
  // src/functions/evaluate/evaluate.ts
225
302
  function evaluate({
@@ -448,9 +525,6 @@ var getSizesForBreakpoints = ({
448
525
  // src/functions/camel-to-kebab-case.ts
449
526
  var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
450
527
 
451
- // src/helpers/nullable.ts
452
- var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
453
-
454
528
  // src/helpers/css.ts
455
529
  var convertStyleMapToCSSArray = (style) => {
456
530
  const cssProps = Object.entries(style).map(([key, value]) => {
@@ -479,10 +553,10 @@ var createCssClass = ({
479
553
  return cssClass;
480
554
  }
481
555
  };
482
- var _tmpl$3 = /* @__PURE__ */ template(`<style>`);
556
+ var _tmpl$ = /* @__PURE__ */ template(`<style>`);
483
557
  function InlinedStyles(props) {
484
558
  return (() => {
485
- const _el$ = _tmpl$3();
559
+ const _el$ = _tmpl$();
486
560
  effect((_p$) => {
487
561
  const _v$ = props.styles, _v$2 = props.id;
488
562
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -608,6 +682,38 @@ function getBlockActions(options) {
608
682
  return obj;
609
683
  }
610
684
 
685
+ // src/functions/transform-style-property.ts
686
+ function transformStyleProperty({
687
+ style
688
+ }) {
689
+ return style;
690
+ }
691
+
692
+ // src/functions/get-style.ts
693
+ var getStyle = ({
694
+ block,
695
+ context
696
+ }) => {
697
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
698
+ style: block.style || {},
699
+ context,
700
+ block
701
+ }));
702
+ };
703
+ function mapStyleObjToStrIfNeeded(style) {
704
+ switch (TARGET) {
705
+ case "svelte":
706
+ case "vue":
707
+ case "solid":
708
+ return convertStyleMapToCSSArray(style).join(" ");
709
+ case "qwik":
710
+ case "reactNative":
711
+ case "react":
712
+ case "rsc":
713
+ return style;
714
+ }
715
+ }
716
+
611
717
  // src/functions/transform-block-properties.ts
612
718
  function transformBlockProperties({
613
719
  properties
@@ -629,8 +735,11 @@ function getBlockProperties({
629
735
  ...extractRelevantRootBlockProperties(block),
630
736
  ...block.properties,
631
737
  "builder-id": block.id,
632
- style: block.style ? getStyleAttribute(block.style) : void 0,
633
- class: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
738
+ style: getStyle({
739
+ block,
740
+ context
741
+ }),
742
+ [getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
634
743
  };
635
744
  return transformBlockProperties({
636
745
  properties,
@@ -638,69 +747,6 @@ function getBlockProperties({
638
747
  block
639
748
  });
640
749
  }
641
- function getStyleAttribute(style) {
642
- switch (TARGET) {
643
- case "svelte":
644
- case "vue":
645
- case "solid":
646
- return convertStyleMapToCSSArray(style).join(" ");
647
- case "qwik":
648
- case "reactNative":
649
- case "react":
650
- case "rsc":
651
- return style;
652
- }
653
- }
654
-
655
- // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
656
- var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
657
- var isEmptyElement = (tagName) => {
658
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
659
- };
660
-
661
- // src/components/dynamic-renderer/dynamic-renderer.tsx
662
- function DynamicRenderer(props) {
663
- return createComponent(Show, {
664
- get fallback() {
665
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
666
- get component() {
667
- return props.TagName;
668
- }
669
- }));
670
- },
671
- get when() {
672
- return !isEmptyElement(props.TagName);
673
- },
674
- get children() {
675
- return createComponent(Show, {
676
- get fallback() {
677
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
678
- get component() {
679
- return props.TagName;
680
- },
681
- get children() {
682
- return props.children;
683
- }
684
- }));
685
- },
686
- get when() {
687
- return typeof props.TagName === "string";
688
- },
689
- get children() {
690
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
691
- get component() {
692
- return props.TagName;
693
- },
694
- get children() {
695
- return props.children;
696
- }
697
- }));
698
- }
699
- });
700
- }
701
- });
702
- }
703
- var dynamic_renderer_default = DynamicRenderer;
704
750
 
705
751
  // src/components/block/components/block-wrapper.tsx
706
752
  function BlockWrapper(props) {
@@ -803,6 +849,7 @@ function ComponentRef(props) {
803
849
  builderBlock: props.builderBlock,
804
850
  context: props.context,
805
851
  componentRef: props.componentRef,
852
+ linkComponent: props.linkComponent,
806
853
  includeBlockProps: props.includeBlockProps,
807
854
  isInteractive: props.isInteractive,
808
855
  contextValue: props.context
@@ -827,6 +874,9 @@ function ComponentRef(props) {
827
874
  },
828
875
  get registeredComponents() {
829
876
  return props.registeredComponents;
877
+ },
878
+ get linkComponent() {
879
+ return props.linkComponent;
830
880
  }
831
881
  });
832
882
  }
@@ -853,6 +903,9 @@ function RepeatedBlock(props) {
853
903
  },
854
904
  get registeredComponents() {
855
905
  return props.registeredComponents;
906
+ },
907
+ get linkComponent() {
908
+ return props.linkComponent;
856
909
  }
857
910
  });
858
911
  }
@@ -887,6 +940,10 @@ function Block(props) {
887
940
  });
888
941
  }
889
942
  function Tag() {
943
+ const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
944
+ if (shouldUseLink) {
945
+ return props.linkComponent || "a";
946
+ }
890
947
  return props.block.tagName || "div";
891
948
  }
892
949
  function canShowBlock() {
@@ -910,11 +967,15 @@ function Block(props) {
910
967
  componentOptions: {
911
968
  ...getBlockComponentOptions(processedBlock()),
912
969
  builderContext: props.context,
970
+ ...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
971
+ builderLinkComponent: props.linkComponent
972
+ } : {},
913
973
  ...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
914
974
  builderComponents: props.registeredComponents
915
975
  } : {}
916
976
  },
917
977
  context: childrenContext(),
978
+ linkComponent: props.linkComponent,
918
979
  registeredComponents: props.registeredComponents,
919
980
  builderBlock: processedBlock(),
920
981
  includeBlockProps: blockComponent()?.noWrap === true,
@@ -951,6 +1012,9 @@ function Block(props) {
951
1012
  get registeredComponents() {
952
1013
  return componentRefProps().registeredComponents;
953
1014
  },
1015
+ get linkComponent() {
1016
+ return componentRefProps().linkComponent;
1017
+ },
954
1018
  get builderBlock() {
955
1019
  return componentRefProps().builderBlock;
956
1020
  },
@@ -984,6 +1048,9 @@ function Block(props) {
984
1048
  },
985
1049
  get registeredComponents() {
986
1050
  return props.registeredComponents;
1051
+ },
1052
+ get linkComponent() {
1053
+ return props.linkComponent;
987
1054
  }
988
1055
  });
989
1056
  }
@@ -1003,6 +1070,9 @@ function Block(props) {
1003
1070
  get context() {
1004
1071
  return props.context;
1005
1072
  },
1073
+ get linkComponent() {
1074
+ return props.linkComponent;
1075
+ },
1006
1076
  get children() {
1007
1077
  return [createComponent(component_ref_default, {
1008
1078
  get componentRef() {
@@ -1020,6 +1090,9 @@ function Block(props) {
1020
1090
  get registeredComponents() {
1021
1091
  return componentRefProps().registeredComponents;
1022
1092
  },
1093
+ get linkComponent() {
1094
+ return componentRefProps().linkComponent;
1095
+ },
1023
1096
  get builderBlock() {
1024
1097
  return componentRefProps().builderBlock;
1025
1098
  },
@@ -1045,6 +1118,9 @@ function Block(props) {
1045
1118
  },
1046
1119
  get registeredComponents() {
1047
1120
  return props.registeredComponents;
1121
+ },
1122
+ get linkComponent() {
1123
+ return props.linkComponent;
1048
1124
  }
1049
1125
  });
1050
1126
  }
@@ -1157,6 +1233,9 @@ function Blocks(props) {
1157
1233
  return block.id;
1158
1234
  },
1159
1235
  block,
1236
+ get linkComponent() {
1237
+ return props.linkComponent;
1238
+ },
1160
1239
  get context() {
1161
1240
  return props.context || builderContext;
1162
1241
  },
@@ -1174,7 +1253,7 @@ function Blocks(props) {
1174
1253
  var blocks_default = Blocks;
1175
1254
 
1176
1255
  // src/blocks/columns/columns.tsx
1177
- var _tmpl$4 = /* @__PURE__ */ template(`<div>`);
1256
+ var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
1178
1257
  function Columns(props) {
1179
1258
  const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
1180
1259
  const [cols, setCols] = createSignal(props.columns || []);
@@ -1215,7 +1294,13 @@ function Columns(props) {
1215
1294
  const mobileWidth = "100%";
1216
1295
  const mobileMarginLeft = 0;
1217
1296
  const marginLeftKey = "margin-left";
1297
+ const sharedStyles = {
1298
+ display: "flex",
1299
+ flexDirection: "column",
1300
+ alignItems: "stretch"
1301
+ };
1218
1302
  return {
1303
+ ...sharedStyles,
1219
1304
  width,
1220
1305
  [marginLeftKey]: gutterPixels,
1221
1306
  "--column-width-mobile": getMobileStyle({
@@ -1268,7 +1353,7 @@ function Columns(props) {
1268
1353
  `;
1269
1354
  }
1270
1355
  return (() => {
1271
- const _el$ = _tmpl$4();
1356
+ const _el$ = _tmpl$2();
1272
1357
  spread(_el$, mergeProps({
1273
1358
  get ["class"]() {
1274
1359
  return `builder-columns ${props.builderBlock.id}-breakpoints ` + css({
@@ -1296,52 +1381,56 @@ function Columns(props) {
1296
1381
  },
1297
1382
  children: (column, _index) => {
1298
1383
  const index = _index();
1299
- return (() => {
1300
- const _el$2 = _tmpl$4();
1301
- spread(_el$2, mergeProps({
1302
- get ["class"]() {
1303
- return "builder-column " + css({
1304
- display: "flex",
1305
- flexDirection: "column",
1306
- alignItems: "stretch"
1307
- });
1308
- },
1309
- get style() {
1310
- return columnCssVars(index);
1311
- }
1312
- }, {}, {
1313
- "key": index
1314
- }), false, true);
1315
- insert(_el$2, createComponent(blocks_default, {
1316
- path: `component.options.columns.${index}.blocks`,
1317
- get parent() {
1318
- return props.builderBlock.id;
1319
- },
1320
- styleProp: {
1321
- flexGrow: "1"
1322
- },
1323
- get context() {
1324
- return props.builderContext;
1325
- },
1326
- get registeredComponents() {
1327
- return props.builderComponents;
1328
- },
1329
- get blocks() {
1330
- return column.blocks;
1331
- }
1332
- }));
1333
- return _el$2;
1334
- })();
1384
+ return createComponent(dynamic_renderer_default, {
1385
+ key: index,
1386
+ get TagName() {
1387
+ return column.link ? props.builderLinkComponent || "a" : "div";
1388
+ },
1389
+ actionAttributes: {},
1390
+ get attributes() {
1391
+ return {
1392
+ ...{},
1393
+ ...column.link ? {
1394
+ href: column.link
1395
+ } : {},
1396
+ [getClassPropName()]: "builder-column",
1397
+ style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1398
+ };
1399
+ },
1400
+ get children() {
1401
+ return createComponent(blocks_default, {
1402
+ path: `component.options.columns.${index}.blocks`,
1403
+ get parent() {
1404
+ return props.builderBlock.id;
1405
+ },
1406
+ styleProp: {
1407
+ flexGrow: "1"
1408
+ },
1409
+ get context() {
1410
+ return props.builderContext;
1411
+ },
1412
+ get registeredComponents() {
1413
+ return props.builderComponents;
1414
+ },
1415
+ get linkComponent() {
1416
+ return props.builderLinkComponent;
1417
+ },
1418
+ get blocks() {
1419
+ return column.blocks;
1420
+ }
1421
+ });
1422
+ }
1423
+ });
1335
1424
  }
1336
1425
  }), null);
1337
1426
  return _el$;
1338
1427
  })();
1339
1428
  }
1340
1429
  var columns_default = Columns;
1341
- var _tmpl$5 = /* @__PURE__ */ template(`<span>`);
1430
+ var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
1342
1431
  function FragmentComponent(props) {
1343
1432
  return (() => {
1344
- const _el$ = _tmpl$5();
1433
+ const _el$ = _tmpl$3();
1345
1434
  insert(_el$, () => props.children);
1346
1435
  return _el$;
1347
1436
  })();
@@ -1396,7 +1485,7 @@ function getSrcSet(url) {
1396
1485
  }
1397
1486
 
1398
1487
  // src/blocks/image/image.tsx
1399
- var _tmpl$6 = /* @__PURE__ */ template(`<source type=image/webp>`);
1488
+ var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
1400
1489
  var _tmpl$22 = /* @__PURE__ */ template(`<picture><img loading=lazy>`);
1401
1490
  var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
1402
1491
  function Image(props) {
@@ -1443,7 +1532,7 @@ function Image(props) {
1443
1532
  return webpSrcSet();
1444
1533
  },
1445
1534
  get children() {
1446
- const _el$2 = _tmpl$6();
1535
+ const _el$2 = _tmpl$4();
1447
1536
  effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
1448
1537
  return _el$2;
1449
1538
  }
@@ -1525,10 +1614,10 @@ function Image(props) {
1525
1614
  })];
1526
1615
  }
1527
1616
  var image_default = Image;
1528
- var _tmpl$7 = /* @__PURE__ */ template(`<section>`);
1617
+ var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
1529
1618
  function SectionComponent(props) {
1530
1619
  return (() => {
1531
- const _el$ = _tmpl$7();
1620
+ const _el$ = _tmpl$5();
1532
1621
  spread(_el$, mergeProps({}, () => props.attributes, {
1533
1622
  get style() {
1534
1623
  return {
@@ -2022,7 +2111,7 @@ var componentInfo3 = {
2022
2111
  advanced: true
2023
2112
  }]
2024
2113
  };
2025
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
2114
+ var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
2026
2115
  function CustomCode(props) {
2027
2116
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
2028
2117
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -2057,7 +2146,7 @@ function CustomCode(props) {
2057
2146
  }
2058
2147
  });
2059
2148
  return (() => {
2060
- const _el$ = _tmpl$8();
2149
+ const _el$ = _tmpl$6();
2061
2150
  const _ref$ = elementRef;
2062
2151
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
2063
2152
  effect((_p$) => {
@@ -2117,7 +2206,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
2117
2206
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
2118
2207
 
2119
2208
  // src/blocks/embed/embed.tsx
2120
- var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-embed>`);
2209
+ var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-embed>`);
2121
2210
  function Embed(props) {
2122
2211
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
2123
2212
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -2153,7 +2242,7 @@ function Embed(props) {
2153
2242
  }
2154
2243
  createEffect(on(() => [elem, ranInitFn()], onUpdateFn_0));
2155
2244
  return (() => {
2156
- const _el$ = _tmpl$9();
2245
+ const _el$ = _tmpl$7();
2157
2246
  const _ref$ = elem;
2158
2247
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
2159
2248
  effect(() => _el$.innerHTML = props.content);
@@ -2310,10 +2399,10 @@ var componentInfo7 = {
2310
2399
  noWrap: true,
2311
2400
  static: true
2312
2401
  };
2313
- var _tmpl$10 = /* @__PURE__ */ template(`<img>`);
2402
+ var _tmpl$8 = /* @__PURE__ */ template(`<img>`);
2314
2403
  function ImgComponent(props) {
2315
2404
  return (() => {
2316
- const _el$ = _tmpl$10();
2405
+ const _el$ = _tmpl$8();
2317
2406
  spread(_el$, mergeProps({
2318
2407
  get style() {
2319
2408
  return {
@@ -2393,10 +2482,10 @@ var componentInfo9 = {
2393
2482
  defaultValue: "children"
2394
2483
  }]
2395
2484
  };
2396
- var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
2485
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
2397
2486
  function Slot(props) {
2398
2487
  return (() => {
2399
- const _el$ = _tmpl$11();
2488
+ const _el$ = _tmpl$9();
2400
2489
  _el$.style.setProperty("pointer-events", "auto");
2401
2490
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
2402
2491
  "builder-slot": props.name
@@ -2476,10 +2565,10 @@ var componentInfo11 = {
2476
2565
  textAlign: "center"
2477
2566
  }
2478
2567
  };
2479
- var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
2568
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
2480
2569
  function Text(props) {
2481
2570
  return (() => {
2482
- const _el$ = _tmpl$12();
2571
+ const _el$ = _tmpl$10();
2483
2572
  _el$.style.setProperty("outline", "none");
2484
2573
  effect(() => _el$.innerHTML = props.text?.toString() || "");
2485
2574
  return _el$;
@@ -2570,7 +2659,7 @@ var componentInfo12 = {
2570
2659
  advanced: true
2571
2660
  }]
2572
2661
  };
2573
- var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
2662
+ var _tmpl$11 = /* @__PURE__ */ template(`<source type=video/mp4>`);
2574
2663
  var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
2575
2664
  var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
2576
2665
  function Video(props) {
@@ -2633,7 +2722,7 @@ function Video(props) {
2633
2722
  return !props.lazyLoad;
2634
2723
  },
2635
2724
  get children() {
2636
- const _el$3 = _tmpl$13();
2725
+ const _el$3 = _tmpl$11();
2637
2726
  effect(() => setAttribute(_el$3, "src", props.video));
2638
2727
  return _el$3;
2639
2728
  }
@@ -2795,10 +2884,10 @@ var getUpdateVariantVisibilityScript = ({
2795
2884
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
2796
2885
  "${variationId}", "${contentId}", ${isHydrationTarget}
2797
2886
  )`;
2798
- var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
2887
+ var _tmpl$12 = /* @__PURE__ */ template(`<script>`);
2799
2888
  function InlinedScript(props) {
2800
2889
  return (() => {
2801
- const _el$ = _tmpl$14();
2890
+ const _el$ = _tmpl$12();
2802
2891
  effect((_p$) => {
2803
2892
  const _v$ = props.scriptStr, _v$2 = props.id || "";
2804
2893
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -3305,7 +3394,7 @@ var getInteractionPropertiesForEvent = (event) => {
3305
3394
  };
3306
3395
 
3307
3396
  // src/constants/sdk-version.ts
3308
- var SDK_VERSION = "0.12.3";
3397
+ var SDK_VERSION = "0.12.5";
3309
3398
 
3310
3399
  // src/functions/register.ts
3311
3400
  var registry = {};
@@ -3994,6 +4083,9 @@ function ContentComponent(props) {
3994
4083
  get contentWrapperProps() {
3995
4084
  return props.contentWrapperProps;
3996
4085
  },
4086
+ get linkComponent() {
4087
+ return props.linkComponent;
4088
+ },
3997
4089
  get trustedHosts() {
3998
4090
  return props.trustedHosts;
3999
4091
  }
@@ -4036,6 +4128,9 @@ function ContentComponent(props) {
4036
4128
  },
4037
4129
  get registeredComponents() {
4038
4130
  return registeredComponents();
4131
+ },
4132
+ get linkComponent() {
4133
+ return props.linkComponent;
4039
4134
  }
4040
4135
  })];
4041
4136
  }
@@ -4129,6 +4224,9 @@ function ContentVariants(props) {
4129
4224
  get customComponents() {
4130
4225
  return props.customComponents;
4131
4226
  },
4227
+ get linkComponent() {
4228
+ return props.linkComponent;
4229
+ },
4132
4230
  get canTrack() {
4133
4231
  return props.canTrack;
4134
4232
  },
@@ -4186,6 +4284,9 @@ function ContentVariants(props) {
4186
4284
  get customComponents() {
4187
4285
  return props.customComponents;
4188
4286
  },
4287
+ get linkComponent() {
4288
+ return props.linkComponent;
4289
+ },
4189
4290
  get canTrack() {
4190
4291
  return props.canTrack;
4191
4292
  },
@@ -4245,11 +4346,11 @@ var fetchSymbolContent = async ({
4245
4346
  };
4246
4347
 
4247
4348
  // src/blocks/symbol/symbol.tsx
4248
- var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
4349
+ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
4249
4350
  function Symbol(props) {
4250
4351
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
4251
4352
  function className() {
4252
- return [...[props.attributes.class], "builder-symbol", props.symbol?.inline ? "builder-inline-symbol" : void 0, props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0].filter(Boolean).join(" ");
4353
+ return [...[props.attributes[getClassPropName()]], "builder-symbol", props.symbol?.inline ? "builder-inline-symbol" : void 0, props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0].filter(Boolean).join(" ");
4253
4354
  }
4254
4355
  function setContent() {
4255
4356
  if (contentToUse())
@@ -4271,7 +4372,7 @@ function Symbol(props) {
4271
4372
  }
4272
4373
  createEffect(on(() => [props.symbol], onUpdateFn_0));
4273
4374
  return (() => {
4274
- const _el$ = _tmpl$15();
4375
+ const _el$ = _tmpl$13();
4275
4376
  spread(_el$, mergeProps({
4276
4377
  get ["class"]() {
4277
4378
  return className();
@@ -4306,6 +4407,9 @@ function Symbol(props) {
4306
4407
  },
4307
4408
  get content() {
4308
4409
  return contentToUse();
4410
+ },
4411
+ get linkComponent() {
4412
+ return props.builderLinkComponent;
4309
4413
  }
4310
4414
  }));
4311
4415
  return _el$;