@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/index.js CHANGED
@@ -1,45 +1,100 @@
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
  import { createRequire } from 'node:module';
5
5
 
6
6
  // src/blocks/button/button.tsx
7
- var _tmpl$ = /* @__PURE__ */ template(`<a>`);
8
- var _tmpl$2 = /* @__PURE__ */ template(`<button role=button>`);
9
- function Button(props) {
7
+
8
+ // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
9
+ var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
10
+ var isEmptyElement = (tagName) => {
11
+ return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
12
+ };
13
+
14
+ // src/components/dynamic-renderer/dynamic-renderer.tsx
15
+ function DynamicRenderer(props) {
10
16
  return createComponent(Show, {
11
17
  get fallback() {
12
- return (() => {
13
- const _el$2 = _tmpl$2();
14
- spread(_el$2, mergeProps({
15
- get ["class"]() {
16
- return `builder-button ${props.attributes.class}`;
17
- }
18
- }, {}, () => props.attributes, {
19
- get style() {
20
- return props.attributes.style;
21
- }
22
- }), false, true);
23
- insert(_el$2, () => props.text);
24
- return _el$2;
25
- })();
18
+ return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
19
+ get component() {
20
+ return props.TagName;
21
+ }
22
+ }));
26
23
  },
27
24
  get when() {
28
- return props.link;
25
+ return !isEmptyElement(props.TagName);
29
26
  },
30
27
  get children() {
31
- const _el$ = _tmpl$();
32
- spread(_el$, mergeProps({}, () => props.attributes, {
33
- get href() {
34
- return props.link;
28
+ return createComponent(Show, {
29
+ get fallback() {
30
+ return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
31
+ get component() {
32
+ return props.TagName;
33
+ },
34
+ get children() {
35
+ return props.children;
36
+ }
37
+ }));
35
38
  },
36
- get target() {
37
- return props.openLinkInNewTab ? "_blank" : void 0;
39
+ get when() {
40
+ return typeof props.TagName === "string";
38
41
  },
39
- "role": "button"
40
- }), false, true);
41
- insert(_el$, () => props.text);
42
- return _el$;
42
+ get children() {
43
+ return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
44
+ get component() {
45
+ return props.TagName;
46
+ },
47
+ get children() {
48
+ return props.children;
49
+ }
50
+ }));
51
+ }
52
+ });
53
+ }
54
+ });
55
+ }
56
+ var dynamic_renderer_default = DynamicRenderer;
57
+
58
+ // src/constants/target.ts
59
+ var TARGET = "solid";
60
+
61
+ // src/functions/get-class-prop-name.ts
62
+ var getClassPropName = () => {
63
+ switch (TARGET) {
64
+ case "react":
65
+ case "reactNative":
66
+ case "rsc":
67
+ return "className";
68
+ case "svelte":
69
+ case "vue":
70
+ case "solid":
71
+ case "qwik":
72
+ return "class";
73
+ }
74
+ };
75
+
76
+ // src/blocks/button/button.tsx
77
+ function Button(props) {
78
+ return createComponent(dynamic_renderer_default, {
79
+ get TagName() {
80
+ return props.link ? props.builderLinkComponent || "a" : "button";
81
+ },
82
+ get attributes() {
83
+ return {
84
+ ...props.attributes,
85
+ [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
86
+ ...props.link ? {
87
+ href: props.link,
88
+ target: props.openLinkInNewTab ? "_blank" : void 0,
89
+ role: "link"
90
+ } : {
91
+ role: "button"
92
+ }
93
+ };
94
+ },
95
+ actionAttributes: {},
96
+ get children() {
97
+ return props.text;
43
98
  }
44
99
  });
45
100
  }
@@ -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;
@@ -352,8 +404,33 @@ var runInNode = ({
352
404
  }
353
405
  };
354
406
 
407
+ // src/helpers/nullable.ts
408
+ var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
409
+
410
+ // src/functions/is-node-runtime.ts
411
+ function isNodeRuntime() {
412
+ return typeof process !== "undefined" && checkIsDefined(process?.versions?.node);
413
+ }
414
+
415
+ // src/functions/evaluate/should-force-browser-runtime-in-node.ts
416
+ var shouldForceBrowserRuntimeInNode = () => {
417
+ if (!isNodeRuntime())
418
+ return false;
419
+ const isArm64 = process.arch === "arm64";
420
+ const isNode20 = process.version.startsWith("v20");
421
+ const hasNoNodeSnapshotNodeOption = process.env.NODE_OPTIONS?.includes("--no-node-snapshot");
422
+ if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
423
+ logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
424
+ 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.
425
+ See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
426
+ `);
427
+ return true;
428
+ }
429
+ return false;
430
+ };
431
+
355
432
  // src/functions/evaluate/choose-eval.ts
356
- var chooseBrowserOrServerEval = (args) => isBrowser() ? runInBrowser(args) : runInNode(args);
433
+ var chooseBrowserOrServerEval = (args) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInNode(args);
357
434
 
358
435
  // src/functions/evaluate/evaluate.ts
359
436
  function evaluate({
@@ -566,9 +643,6 @@ var getSizesForBreakpoints = ({
566
643
  // src/functions/camel-to-kebab-case.ts
567
644
  var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
568
645
 
569
- // src/helpers/nullable.ts
570
- var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
571
-
572
646
  // src/helpers/css.ts
573
647
  var convertStyleMapToCSSArray = (style) => {
574
648
  const cssProps = Object.entries(style).map(([key, value]) => {
@@ -597,10 +671,10 @@ var createCssClass = ({
597
671
  return cssClass;
598
672
  }
599
673
  };
600
- var _tmpl$3 = /* @__PURE__ */ template(`<style>`);
674
+ var _tmpl$ = /* @__PURE__ */ template(`<style>`);
601
675
  function InlinedStyles(props) {
602
676
  return (() => {
603
- const _el$ = _tmpl$3();
677
+ const _el$ = _tmpl$();
604
678
  effect((_p$) => {
605
679
  const _v$ = props.styles, _v$2 = props.id;
606
680
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -726,6 +800,38 @@ function getBlockActions(options) {
726
800
  return obj;
727
801
  }
728
802
 
803
+ // src/functions/transform-style-property.ts
804
+ function transformStyleProperty({
805
+ style
806
+ }) {
807
+ return style;
808
+ }
809
+
810
+ // src/functions/get-style.ts
811
+ var getStyle = ({
812
+ block,
813
+ context
814
+ }) => {
815
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
816
+ style: block.style || {},
817
+ context,
818
+ block
819
+ }));
820
+ };
821
+ function mapStyleObjToStrIfNeeded(style) {
822
+ switch (TARGET) {
823
+ case "svelte":
824
+ case "vue":
825
+ case "solid":
826
+ return convertStyleMapToCSSArray(style).join(" ");
827
+ case "qwik":
828
+ case "reactNative":
829
+ case "react":
830
+ case "rsc":
831
+ return style;
832
+ }
833
+ }
834
+
729
835
  // src/functions/transform-block-properties.ts
730
836
  function transformBlockProperties({
731
837
  properties
@@ -747,8 +853,11 @@ function getBlockProperties({
747
853
  ...extractRelevantRootBlockProperties(block),
748
854
  ...block.properties,
749
855
  "builder-id": block.id,
750
- style: block.style ? getStyleAttribute(block.style) : void 0,
751
- class: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
856
+ style: getStyle({
857
+ block,
858
+ context
859
+ }),
860
+ [getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
752
861
  };
753
862
  return transformBlockProperties({
754
863
  properties,
@@ -756,69 +865,6 @@ function getBlockProperties({
756
865
  block
757
866
  });
758
867
  }
759
- function getStyleAttribute(style) {
760
- switch (TARGET) {
761
- case "svelte":
762
- case "vue":
763
- case "solid":
764
- return convertStyleMapToCSSArray(style).join(" ");
765
- case "qwik":
766
- case "reactNative":
767
- case "react":
768
- case "rsc":
769
- return style;
770
- }
771
- }
772
-
773
- // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
774
- var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
775
- var isEmptyElement = (tagName) => {
776
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
777
- };
778
-
779
- // src/components/dynamic-renderer/dynamic-renderer.tsx
780
- function DynamicRenderer(props) {
781
- return createComponent(Show, {
782
- get fallback() {
783
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
784
- get component() {
785
- return props.TagName;
786
- }
787
- }));
788
- },
789
- get when() {
790
- return !isEmptyElement(props.TagName);
791
- },
792
- get children() {
793
- return createComponent(Show, {
794
- get fallback() {
795
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
796
- get component() {
797
- return props.TagName;
798
- },
799
- get children() {
800
- return props.children;
801
- }
802
- }));
803
- },
804
- get when() {
805
- return typeof props.TagName === "string";
806
- },
807
- get children() {
808
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
809
- get component() {
810
- return props.TagName;
811
- },
812
- get children() {
813
- return props.children;
814
- }
815
- }));
816
- }
817
- });
818
- }
819
- });
820
- }
821
- var dynamic_renderer_default = DynamicRenderer;
822
868
 
823
869
  // src/components/block/components/block-wrapper.tsx
824
870
  function BlockWrapper(props) {
@@ -921,6 +967,7 @@ function ComponentRef(props) {
921
967
  builderBlock: props.builderBlock,
922
968
  context: props.context,
923
969
  componentRef: props.componentRef,
970
+ linkComponent: props.linkComponent,
924
971
  includeBlockProps: props.includeBlockProps,
925
972
  isInteractive: props.isInteractive,
926
973
  contextValue: props.context
@@ -945,6 +992,9 @@ function ComponentRef(props) {
945
992
  },
946
993
  get registeredComponents() {
947
994
  return props.registeredComponents;
995
+ },
996
+ get linkComponent() {
997
+ return props.linkComponent;
948
998
  }
949
999
  });
950
1000
  }
@@ -971,6 +1021,9 @@ function RepeatedBlock(props) {
971
1021
  },
972
1022
  get registeredComponents() {
973
1023
  return props.registeredComponents;
1024
+ },
1025
+ get linkComponent() {
1026
+ return props.linkComponent;
974
1027
  }
975
1028
  });
976
1029
  }
@@ -1005,6 +1058,10 @@ function Block(props) {
1005
1058
  });
1006
1059
  }
1007
1060
  function Tag() {
1061
+ const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
1062
+ if (shouldUseLink) {
1063
+ return props.linkComponent || "a";
1064
+ }
1008
1065
  return props.block.tagName || "div";
1009
1066
  }
1010
1067
  function canShowBlock() {
@@ -1028,11 +1085,15 @@ function Block(props) {
1028
1085
  componentOptions: {
1029
1086
  ...getBlockComponentOptions(processedBlock()),
1030
1087
  builderContext: props.context,
1088
+ ...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
1089
+ builderLinkComponent: props.linkComponent
1090
+ } : {},
1031
1091
  ...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
1032
1092
  builderComponents: props.registeredComponents
1033
1093
  } : {}
1034
1094
  },
1035
1095
  context: childrenContext(),
1096
+ linkComponent: props.linkComponent,
1036
1097
  registeredComponents: props.registeredComponents,
1037
1098
  builderBlock: processedBlock(),
1038
1099
  includeBlockProps: blockComponent()?.noWrap === true,
@@ -1069,6 +1130,9 @@ function Block(props) {
1069
1130
  get registeredComponents() {
1070
1131
  return componentRefProps().registeredComponents;
1071
1132
  },
1133
+ get linkComponent() {
1134
+ return componentRefProps().linkComponent;
1135
+ },
1072
1136
  get builderBlock() {
1073
1137
  return componentRefProps().builderBlock;
1074
1138
  },
@@ -1102,6 +1166,9 @@ function Block(props) {
1102
1166
  },
1103
1167
  get registeredComponents() {
1104
1168
  return props.registeredComponents;
1169
+ },
1170
+ get linkComponent() {
1171
+ return props.linkComponent;
1105
1172
  }
1106
1173
  });
1107
1174
  }
@@ -1121,6 +1188,9 @@ function Block(props) {
1121
1188
  get context() {
1122
1189
  return props.context;
1123
1190
  },
1191
+ get linkComponent() {
1192
+ return props.linkComponent;
1193
+ },
1124
1194
  get children() {
1125
1195
  return [createComponent(component_ref_default, {
1126
1196
  get componentRef() {
@@ -1138,6 +1208,9 @@ function Block(props) {
1138
1208
  get registeredComponents() {
1139
1209
  return componentRefProps().registeredComponents;
1140
1210
  },
1211
+ get linkComponent() {
1212
+ return componentRefProps().linkComponent;
1213
+ },
1141
1214
  get builderBlock() {
1142
1215
  return componentRefProps().builderBlock;
1143
1216
  },
@@ -1163,6 +1236,9 @@ function Block(props) {
1163
1236
  },
1164
1237
  get registeredComponents() {
1165
1238
  return props.registeredComponents;
1239
+ },
1240
+ get linkComponent() {
1241
+ return props.linkComponent;
1166
1242
  }
1167
1243
  });
1168
1244
  }
@@ -1275,6 +1351,9 @@ function Blocks(props) {
1275
1351
  return block.id;
1276
1352
  },
1277
1353
  block,
1354
+ get linkComponent() {
1355
+ return props.linkComponent;
1356
+ },
1278
1357
  get context() {
1279
1358
  return props.context || builderContext;
1280
1359
  },
@@ -1292,7 +1371,7 @@ function Blocks(props) {
1292
1371
  var blocks_default = Blocks;
1293
1372
 
1294
1373
  // src/blocks/columns/columns.tsx
1295
- var _tmpl$4 = /* @__PURE__ */ template(`<div>`);
1374
+ var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
1296
1375
  function Columns(props) {
1297
1376
  const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
1298
1377
  const [cols, setCols] = createSignal(props.columns || []);
@@ -1333,7 +1412,13 @@ function Columns(props) {
1333
1412
  const mobileWidth = "100%";
1334
1413
  const mobileMarginLeft = 0;
1335
1414
  const marginLeftKey = "margin-left";
1415
+ const sharedStyles = {
1416
+ display: "flex",
1417
+ flexDirection: "column",
1418
+ alignItems: "stretch"
1419
+ };
1336
1420
  return {
1421
+ ...sharedStyles,
1337
1422
  width,
1338
1423
  [marginLeftKey]: gutterPixels,
1339
1424
  "--column-width-mobile": getMobileStyle({
@@ -1386,7 +1471,7 @@ function Columns(props) {
1386
1471
  `;
1387
1472
  }
1388
1473
  return (() => {
1389
- const _el$ = _tmpl$4();
1474
+ const _el$ = _tmpl$2();
1390
1475
  spread(_el$, mergeProps({
1391
1476
  get ["class"]() {
1392
1477
  return `builder-columns ${props.builderBlock.id}-breakpoints ` + css({
@@ -1414,52 +1499,56 @@ function Columns(props) {
1414
1499
  },
1415
1500
  children: (column, _index) => {
1416
1501
  const index = _index();
1417
- return (() => {
1418
- const _el$2 = _tmpl$4();
1419
- spread(_el$2, mergeProps({
1420
- get ["class"]() {
1421
- return "builder-column " + css({
1422
- display: "flex",
1423
- flexDirection: "column",
1424
- alignItems: "stretch"
1425
- });
1426
- },
1427
- get style() {
1428
- return columnCssVars(index);
1429
- }
1430
- }, {}, {
1431
- "key": index
1432
- }), false, true);
1433
- insert(_el$2, createComponent(blocks_default, {
1434
- path: `component.options.columns.${index}.blocks`,
1435
- get parent() {
1436
- return props.builderBlock.id;
1437
- },
1438
- styleProp: {
1439
- flexGrow: "1"
1440
- },
1441
- get context() {
1442
- return props.builderContext;
1443
- },
1444
- get registeredComponents() {
1445
- return props.builderComponents;
1446
- },
1447
- get blocks() {
1448
- return column.blocks;
1449
- }
1450
- }));
1451
- return _el$2;
1452
- })();
1502
+ return createComponent(dynamic_renderer_default, {
1503
+ key: index,
1504
+ get TagName() {
1505
+ return column.link ? props.builderLinkComponent || "a" : "div";
1506
+ },
1507
+ actionAttributes: {},
1508
+ get attributes() {
1509
+ return {
1510
+ ...{},
1511
+ ...column.link ? {
1512
+ href: column.link
1513
+ } : {},
1514
+ [getClassPropName()]: "builder-column",
1515
+ style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1516
+ };
1517
+ },
1518
+ get children() {
1519
+ return createComponent(blocks_default, {
1520
+ path: `component.options.columns.${index}.blocks`,
1521
+ get parent() {
1522
+ return props.builderBlock.id;
1523
+ },
1524
+ styleProp: {
1525
+ flexGrow: "1"
1526
+ },
1527
+ get context() {
1528
+ return props.builderContext;
1529
+ },
1530
+ get registeredComponents() {
1531
+ return props.builderComponents;
1532
+ },
1533
+ get linkComponent() {
1534
+ return props.builderLinkComponent;
1535
+ },
1536
+ get blocks() {
1537
+ return column.blocks;
1538
+ }
1539
+ });
1540
+ }
1541
+ });
1453
1542
  }
1454
1543
  }), null);
1455
1544
  return _el$;
1456
1545
  })();
1457
1546
  }
1458
1547
  var columns_default = Columns;
1459
- var _tmpl$5 = /* @__PURE__ */ template(`<span>`);
1548
+ var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
1460
1549
  function FragmentComponent(props) {
1461
1550
  return (() => {
1462
- const _el$ = _tmpl$5();
1551
+ const _el$ = _tmpl$3();
1463
1552
  insert(_el$, () => props.children);
1464
1553
  return _el$;
1465
1554
  })();
@@ -1514,7 +1603,7 @@ function getSrcSet(url) {
1514
1603
  }
1515
1604
 
1516
1605
  // src/blocks/image/image.tsx
1517
- var _tmpl$6 = /* @__PURE__ */ template(`<source type=image/webp>`);
1606
+ var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
1518
1607
  var _tmpl$22 = /* @__PURE__ */ template(`<picture><img loading=lazy>`);
1519
1608
  var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
1520
1609
  function Image(props) {
@@ -1560,7 +1649,7 @@ function Image(props) {
1560
1649
  return webpSrcSet();
1561
1650
  },
1562
1651
  get children() {
1563
- const _el$2 = _tmpl$6();
1652
+ const _el$2 = _tmpl$4();
1564
1653
  effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
1565
1654
  return _el$2;
1566
1655
  }
@@ -1642,10 +1731,10 @@ function Image(props) {
1642
1731
  })];
1643
1732
  }
1644
1733
  var image_default = Image;
1645
- var _tmpl$7 = /* @__PURE__ */ template(`<section>`);
1734
+ var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
1646
1735
  function SectionComponent(props) {
1647
1736
  return (() => {
1648
- const _el$ = _tmpl$7();
1737
+ const _el$ = _tmpl$5();
1649
1738
  spread(_el$, mergeProps({}, () => props.attributes, {
1650
1739
  get style() {
1651
1740
  return {
@@ -2139,7 +2228,7 @@ var componentInfo3 = {
2139
2228
  advanced: true
2140
2229
  }]
2141
2230
  };
2142
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
2231
+ var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
2143
2232
  function CustomCode(props) {
2144
2233
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
2145
2234
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -2173,7 +2262,7 @@ function CustomCode(props) {
2173
2262
  }
2174
2263
  });
2175
2264
  return (() => {
2176
- const _el$ = _tmpl$8();
2265
+ const _el$ = _tmpl$6();
2177
2266
  const _ref$ = elementRef;
2178
2267
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
2179
2268
  effect((_p$) => {
@@ -2233,7 +2322,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
2233
2322
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
2234
2323
 
2235
2324
  // src/blocks/embed/embed.tsx
2236
- var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-embed>`);
2325
+ var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-embed>`);
2237
2326
  function Embed(props) {
2238
2327
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
2239
2328
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -2268,7 +2357,7 @@ function Embed(props) {
2268
2357
  }
2269
2358
  createEffect(on(() => [elem, ranInitFn()], onUpdateFn_0));
2270
2359
  return (() => {
2271
- const _el$ = _tmpl$9();
2360
+ const _el$ = _tmpl$7();
2272
2361
  const _ref$ = elem;
2273
2362
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
2274
2363
  effect(() => _el$.innerHTML = props.content);
@@ -2424,10 +2513,10 @@ var componentInfo7 = {
2424
2513
  noWrap: true,
2425
2514
  static: true
2426
2515
  };
2427
- var _tmpl$10 = /* @__PURE__ */ template(`<img>`);
2516
+ var _tmpl$8 = /* @__PURE__ */ template(`<img>`);
2428
2517
  function ImgComponent(props) {
2429
2518
  return (() => {
2430
- const _el$ = _tmpl$10();
2519
+ const _el$ = _tmpl$8();
2431
2520
  spread(_el$, mergeProps({
2432
2521
  get style() {
2433
2522
  return {
@@ -2507,10 +2596,10 @@ var componentInfo9 = {
2507
2596
  defaultValue: "children"
2508
2597
  }]
2509
2598
  };
2510
- var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
2599
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
2511
2600
  function Slot(props) {
2512
2601
  return (() => {
2513
- const _el$ = _tmpl$11();
2602
+ const _el$ = _tmpl$9();
2514
2603
  _el$.style.setProperty("pointer-events", "auto");
2515
2604
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
2516
2605
  "builder-slot": props.name
@@ -2590,10 +2679,10 @@ var componentInfo11 = {
2590
2679
  textAlign: "center"
2591
2680
  }
2592
2681
  };
2593
- var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
2682
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
2594
2683
  function Text(props) {
2595
2684
  return (() => {
2596
- const _el$ = _tmpl$12();
2685
+ const _el$ = _tmpl$10();
2597
2686
  _el$.style.setProperty("outline", "none");
2598
2687
  effect(() => _el$.innerHTML = props.text?.toString() || "");
2599
2688
  return _el$;
@@ -2684,7 +2773,7 @@ var componentInfo12 = {
2684
2773
  advanced: true
2685
2774
  }]
2686
2775
  };
2687
- var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
2776
+ var _tmpl$11 = /* @__PURE__ */ template(`<source type=video/mp4>`);
2688
2777
  var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
2689
2778
  var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
2690
2779
  function Video(props) {
@@ -2747,7 +2836,7 @@ function Video(props) {
2747
2836
  return !props.lazyLoad;
2748
2837
  },
2749
2838
  get children() {
2750
- const _el$3 = _tmpl$13();
2839
+ const _el$3 = _tmpl$11();
2751
2840
  effect(() => setAttribute(_el$3, "src", props.video));
2752
2841
  return _el$3;
2753
2842
  }
@@ -2909,10 +2998,10 @@ var getUpdateVariantVisibilityScript = ({
2909
2998
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
2910
2999
  "${variationId}", "${contentId}", ${isHydrationTarget}
2911
3000
  )`;
2912
- var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
3001
+ var _tmpl$12 = /* @__PURE__ */ template(`<script>`);
2913
3002
  function InlinedScript(props) {
2914
3003
  return (() => {
2915
- const _el$ = _tmpl$14();
3004
+ const _el$ = _tmpl$12();
2916
3005
  effect((_p$) => {
2917
3006
  const _v$ = props.scriptStr, _v$2 = props.id || "";
2918
3007
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -3414,7 +3503,7 @@ var getInteractionPropertiesForEvent = (event) => {
3414
3503
  };
3415
3504
 
3416
3505
  // src/constants/sdk-version.ts
3417
- var SDK_VERSION = "0.12.3";
3506
+ var SDK_VERSION = "0.12.5";
3418
3507
 
3419
3508
  // src/functions/register.ts
3420
3509
  var registry = {};
@@ -4101,6 +4190,9 @@ function ContentComponent(props) {
4101
4190
  get contentWrapperProps() {
4102
4191
  return props.contentWrapperProps;
4103
4192
  },
4193
+ get linkComponent() {
4194
+ return props.linkComponent;
4195
+ },
4104
4196
  get trustedHosts() {
4105
4197
  return props.trustedHosts;
4106
4198
  }
@@ -4143,6 +4235,9 @@ function ContentComponent(props) {
4143
4235
  },
4144
4236
  get registeredComponents() {
4145
4237
  return registeredComponents();
4238
+ },
4239
+ get linkComponent() {
4240
+ return props.linkComponent;
4146
4241
  }
4147
4242
  })];
4148
4243
  }
@@ -4236,6 +4331,9 @@ function ContentVariants(props) {
4236
4331
  get customComponents() {
4237
4332
  return props.customComponents;
4238
4333
  },
4334
+ get linkComponent() {
4335
+ return props.linkComponent;
4336
+ },
4239
4337
  get canTrack() {
4240
4338
  return props.canTrack;
4241
4339
  },
@@ -4293,6 +4391,9 @@ function ContentVariants(props) {
4293
4391
  get customComponents() {
4294
4392
  return props.customComponents;
4295
4393
  },
4394
+ get linkComponent() {
4395
+ return props.linkComponent;
4396
+ },
4296
4397
  get canTrack() {
4297
4398
  return props.canTrack;
4298
4399
  },
@@ -4352,11 +4453,11 @@ var fetchSymbolContent = async ({
4352
4453
  };
4353
4454
 
4354
4455
  // src/blocks/symbol/symbol.tsx
4355
- var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
4456
+ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
4356
4457
  function Symbol(props) {
4357
4458
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
4358
4459
  function className() {
4359
- 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(" ");
4460
+ 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(" ");
4360
4461
  }
4361
4462
  function setContent() {
4362
4463
  if (contentToUse())
@@ -4378,7 +4479,7 @@ function Symbol(props) {
4378
4479
  }
4379
4480
  createEffect(on(() => [props.symbol], onUpdateFn_0));
4380
4481
  return (() => {
4381
- const _el$ = _tmpl$15();
4482
+ const _el$ = _tmpl$13();
4382
4483
  spread(_el$, mergeProps({
4383
4484
  get ["class"]() {
4384
4485
  return className();
@@ -4413,6 +4514,9 @@ function Symbol(props) {
4413
4514
  },
4414
4515
  get content() {
4415
4516
  return contentToUse();
4517
+ },
4518
+ get linkComponent() {
4519
+ return props.builderLinkComponent;
4416
4520
  }
4417
4521
  }));
4418
4522
  return _el$;