@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.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
  }
@@ -86,9 +141,6 @@ function isBrowser() {
86
141
  return typeof window !== "undefined" && typeof document !== "undefined";
87
142
  }
88
143
 
89
- // src/constants/target.ts
90
- var TARGET = "solid";
91
-
92
144
  // src/functions/is-iframe.ts
93
145
  function isIframe() {
94
146
  return isBrowser() && window.self !== window.top;
@@ -355,8 +407,33 @@ var runInNode = ({
355
407
  }
356
408
  };
357
409
 
410
+ // src/helpers/nullable.ts
411
+ var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
412
+
413
+ // src/functions/is-node-runtime.ts
414
+ function isNodeRuntime() {
415
+ return typeof process !== "undefined" && checkIsDefined(process?.versions?.node);
416
+ }
417
+
418
+ // src/functions/evaluate/should-force-browser-runtime-in-node.ts
419
+ var shouldForceBrowserRuntimeInNode = () => {
420
+ if (!isNodeRuntime())
421
+ return false;
422
+ const isArm64 = process.arch === "arm64";
423
+ const isNode20 = process.version.startsWith("v20");
424
+ const hasNoNodeSnapshotNodeOption = process.env.NODE_OPTIONS?.includes("--no-node-snapshot");
425
+ if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
426
+ logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
427
+ 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.
428
+ See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
429
+ `);
430
+ return true;
431
+ }
432
+ return false;
433
+ };
434
+
358
435
  // src/functions/evaluate/choose-eval.ts
359
- var chooseBrowserOrServerEval = (args) => isBrowser() ? runInBrowser(args) : runInNode(args);
436
+ var chooseBrowserOrServerEval = (args) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInNode(args);
360
437
 
361
438
  // src/functions/evaluate/evaluate.ts
362
439
  function evaluate({
@@ -572,9 +649,6 @@ var getSizesForBreakpoints = ({
572
649
  // src/functions/camel-to-kebab-case.ts
573
650
  var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
574
651
 
575
- // src/helpers/nullable.ts
576
- var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
577
-
578
652
  // src/helpers/css.ts
579
653
  var convertStyleMapToCSSArray = (style) => {
580
654
  const cssProps = Object.entries(style).map(([key, value]) => {
@@ -603,10 +677,10 @@ var createCssClass = ({
603
677
  return cssClass;
604
678
  }
605
679
  };
606
- var _tmpl$3 = /* @__PURE__ */ template(`<style>`);
680
+ var _tmpl$ = /* @__PURE__ */ template(`<style>`);
607
681
  function InlinedStyles(props) {
608
682
  return (() => {
609
- const _el$ = _tmpl$3();
683
+ const _el$ = _tmpl$();
610
684
  effect((_p$) => {
611
685
  const _v$ = props.styles, _v$2 = props.id;
612
686
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -732,6 +806,38 @@ function getBlockActions(options) {
732
806
  return obj;
733
807
  }
734
808
 
809
+ // src/functions/transform-style-property.ts
810
+ function transformStyleProperty({
811
+ style
812
+ }) {
813
+ return style;
814
+ }
815
+
816
+ // src/functions/get-style.ts
817
+ var getStyle = ({
818
+ block,
819
+ context
820
+ }) => {
821
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
822
+ style: block.style || {},
823
+ context,
824
+ block
825
+ }));
826
+ };
827
+ function mapStyleObjToStrIfNeeded(style) {
828
+ switch (TARGET) {
829
+ case "svelte":
830
+ case "vue":
831
+ case "solid":
832
+ return convertStyleMapToCSSArray(style).join(" ");
833
+ case "qwik":
834
+ case "reactNative":
835
+ case "react":
836
+ case "rsc":
837
+ return style;
838
+ }
839
+ }
840
+
735
841
  // src/functions/transform-block-properties.ts
736
842
  function transformBlockProperties({
737
843
  properties
@@ -753,8 +859,11 @@ function getBlockProperties({
753
859
  ...extractRelevantRootBlockProperties(block),
754
860
  ...block.properties,
755
861
  "builder-id": block.id,
756
- style: block.style ? getStyleAttribute(block.style) : void 0,
757
- class: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
862
+ style: getStyle({
863
+ block,
864
+ context
865
+ }),
866
+ [getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
758
867
  };
759
868
  return transformBlockProperties({
760
869
  properties,
@@ -762,69 +871,6 @@ function getBlockProperties({
762
871
  block
763
872
  });
764
873
  }
765
- function getStyleAttribute(style) {
766
- switch (TARGET) {
767
- case "svelte":
768
- case "vue":
769
- case "solid":
770
- return convertStyleMapToCSSArray(style).join(" ");
771
- case "qwik":
772
- case "reactNative":
773
- case "react":
774
- case "rsc":
775
- return style;
776
- }
777
- }
778
-
779
- // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
780
- var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
781
- var isEmptyElement = (tagName) => {
782
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
783
- };
784
-
785
- // src/components/dynamic-renderer/dynamic-renderer.tsx
786
- function DynamicRenderer(props) {
787
- return createComponent(Show, {
788
- get fallback() {
789
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
790
- get component() {
791
- return props.TagName;
792
- }
793
- }));
794
- },
795
- get when() {
796
- return !isEmptyElement(props.TagName);
797
- },
798
- get children() {
799
- return createComponent(Show, {
800
- get fallback() {
801
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
802
- get component() {
803
- return props.TagName;
804
- },
805
- get children() {
806
- return props.children;
807
- }
808
- }));
809
- },
810
- get when() {
811
- return typeof props.TagName === "string";
812
- },
813
- get children() {
814
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
815
- get component() {
816
- return props.TagName;
817
- },
818
- get children() {
819
- return props.children;
820
- }
821
- }));
822
- }
823
- });
824
- }
825
- });
826
- }
827
- var dynamic_renderer_default = DynamicRenderer;
828
874
 
829
875
  // src/components/block/components/block-wrapper.tsx
830
876
  function BlockWrapper(props) {
@@ -927,6 +973,7 @@ function ComponentRef(props) {
927
973
  builderBlock: props.builderBlock,
928
974
  context: props.context,
929
975
  componentRef: props.componentRef,
976
+ linkComponent: props.linkComponent,
930
977
  includeBlockProps: props.includeBlockProps,
931
978
  isInteractive: props.isInteractive,
932
979
  contextValue: props.context
@@ -951,6 +998,9 @@ function ComponentRef(props) {
951
998
  },
952
999
  get registeredComponents() {
953
1000
  return props.registeredComponents;
1001
+ },
1002
+ get linkComponent() {
1003
+ return props.linkComponent;
954
1004
  }
955
1005
  });
956
1006
  }
@@ -977,6 +1027,9 @@ function RepeatedBlock(props) {
977
1027
  },
978
1028
  get registeredComponents() {
979
1029
  return props.registeredComponents;
1030
+ },
1031
+ get linkComponent() {
1032
+ return props.linkComponent;
980
1033
  }
981
1034
  });
982
1035
  }
@@ -1011,6 +1064,10 @@ function Block(props) {
1011
1064
  });
1012
1065
  }
1013
1066
  function Tag() {
1067
+ const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
1068
+ if (shouldUseLink) {
1069
+ return props.linkComponent || "a";
1070
+ }
1014
1071
  return props.block.tagName || "div";
1015
1072
  }
1016
1073
  function canShowBlock() {
@@ -1034,11 +1091,15 @@ function Block(props) {
1034
1091
  componentOptions: {
1035
1092
  ...getBlockComponentOptions(processedBlock()),
1036
1093
  builderContext: props.context,
1094
+ ...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
1095
+ builderLinkComponent: props.linkComponent
1096
+ } : {},
1037
1097
  ...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
1038
1098
  builderComponents: props.registeredComponents
1039
1099
  } : {}
1040
1100
  },
1041
1101
  context: childrenContext(),
1102
+ linkComponent: props.linkComponent,
1042
1103
  registeredComponents: props.registeredComponents,
1043
1104
  builderBlock: processedBlock(),
1044
1105
  includeBlockProps: blockComponent()?.noWrap === true,
@@ -1075,6 +1136,9 @@ function Block(props) {
1075
1136
  get registeredComponents() {
1076
1137
  return componentRefProps().registeredComponents;
1077
1138
  },
1139
+ get linkComponent() {
1140
+ return componentRefProps().linkComponent;
1141
+ },
1078
1142
  get builderBlock() {
1079
1143
  return componentRefProps().builderBlock;
1080
1144
  },
@@ -1108,6 +1172,9 @@ function Block(props) {
1108
1172
  },
1109
1173
  get registeredComponents() {
1110
1174
  return props.registeredComponents;
1175
+ },
1176
+ get linkComponent() {
1177
+ return props.linkComponent;
1111
1178
  }
1112
1179
  });
1113
1180
  }
@@ -1127,6 +1194,9 @@ function Block(props) {
1127
1194
  get context() {
1128
1195
  return props.context;
1129
1196
  },
1197
+ get linkComponent() {
1198
+ return props.linkComponent;
1199
+ },
1130
1200
  get children() {
1131
1201
  return [createComponent(component_ref_default, {
1132
1202
  get componentRef() {
@@ -1144,6 +1214,9 @@ function Block(props) {
1144
1214
  get registeredComponents() {
1145
1215
  return componentRefProps().registeredComponents;
1146
1216
  },
1217
+ get linkComponent() {
1218
+ return componentRefProps().linkComponent;
1219
+ },
1147
1220
  get builderBlock() {
1148
1221
  return componentRefProps().builderBlock;
1149
1222
  },
@@ -1169,6 +1242,9 @@ function Block(props) {
1169
1242
  },
1170
1243
  get registeredComponents() {
1171
1244
  return props.registeredComponents;
1245
+ },
1246
+ get linkComponent() {
1247
+ return props.linkComponent;
1172
1248
  }
1173
1249
  });
1174
1250
  }
@@ -1281,6 +1357,9 @@ function Blocks(props) {
1281
1357
  return block.id;
1282
1358
  },
1283
1359
  block,
1360
+ get linkComponent() {
1361
+ return props.linkComponent;
1362
+ },
1284
1363
  get context() {
1285
1364
  return props.context || builderContext;
1286
1365
  },
@@ -1298,7 +1377,7 @@ function Blocks(props) {
1298
1377
  var blocks_default = Blocks;
1299
1378
 
1300
1379
  // src/blocks/columns/columns.tsx
1301
- var _tmpl$4 = /* @__PURE__ */ template(`<div>`);
1380
+ var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
1302
1381
  function Columns(props) {
1303
1382
  const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
1304
1383
  const [cols, setCols] = createSignal(props.columns || []);
@@ -1339,7 +1418,13 @@ function Columns(props) {
1339
1418
  const mobileWidth = "100%";
1340
1419
  const mobileMarginLeft = 0;
1341
1420
  const marginLeftKey = "margin-left";
1421
+ const sharedStyles = {
1422
+ display: "flex",
1423
+ flexDirection: "column",
1424
+ alignItems: "stretch"
1425
+ };
1342
1426
  return {
1427
+ ...sharedStyles,
1343
1428
  width,
1344
1429
  [marginLeftKey]: gutterPixels,
1345
1430
  "--column-width-mobile": getMobileStyle({
@@ -1392,7 +1477,7 @@ function Columns(props) {
1392
1477
  `;
1393
1478
  }
1394
1479
  return (() => {
1395
- const _el$ = _tmpl$4();
1480
+ const _el$ = _tmpl$2();
1396
1481
  spread(_el$, mergeProps({
1397
1482
  get ["class"]() {
1398
1483
  return `builder-columns ${props.builderBlock.id}-breakpoints ` + css({
@@ -1420,52 +1505,56 @@ function Columns(props) {
1420
1505
  },
1421
1506
  children: (column, _index) => {
1422
1507
  const index = _index();
1423
- return (() => {
1424
- const _el$2 = _tmpl$4();
1425
- spread(_el$2, mergeProps({
1426
- get ["class"]() {
1427
- return "builder-column " + css({
1428
- display: "flex",
1429
- flexDirection: "column",
1430
- alignItems: "stretch"
1431
- });
1432
- },
1433
- get style() {
1434
- return columnCssVars(index);
1435
- }
1436
- }, {}, {
1437
- "key": index
1438
- }), false, true);
1439
- insert(_el$2, createComponent(blocks_default, {
1440
- path: `component.options.columns.${index}.blocks`,
1441
- get parent() {
1442
- return props.builderBlock.id;
1443
- },
1444
- styleProp: {
1445
- flexGrow: "1"
1446
- },
1447
- get context() {
1448
- return props.builderContext;
1449
- },
1450
- get registeredComponents() {
1451
- return props.builderComponents;
1452
- },
1453
- get blocks() {
1454
- return column.blocks;
1455
- }
1456
- }));
1457
- return _el$2;
1458
- })();
1508
+ return createComponent(dynamic_renderer_default, {
1509
+ key: index,
1510
+ get TagName() {
1511
+ return column.link ? props.builderLinkComponent || "a" : "div";
1512
+ },
1513
+ actionAttributes: {},
1514
+ get attributes() {
1515
+ return {
1516
+ ...{},
1517
+ ...column.link ? {
1518
+ href: column.link
1519
+ } : {},
1520
+ [getClassPropName()]: "builder-column",
1521
+ style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1522
+ };
1523
+ },
1524
+ get children() {
1525
+ return createComponent(blocks_default, {
1526
+ path: `component.options.columns.${index}.blocks`,
1527
+ get parent() {
1528
+ return props.builderBlock.id;
1529
+ },
1530
+ styleProp: {
1531
+ flexGrow: "1"
1532
+ },
1533
+ get context() {
1534
+ return props.builderContext;
1535
+ },
1536
+ get registeredComponents() {
1537
+ return props.builderComponents;
1538
+ },
1539
+ get linkComponent() {
1540
+ return props.builderLinkComponent;
1541
+ },
1542
+ get blocks() {
1543
+ return column.blocks;
1544
+ }
1545
+ });
1546
+ }
1547
+ });
1459
1548
  }
1460
1549
  }), null);
1461
1550
  return _el$;
1462
1551
  })();
1463
1552
  }
1464
1553
  var columns_default = Columns;
1465
- var _tmpl$5 = /* @__PURE__ */ template(`<span>`);
1554
+ var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
1466
1555
  function FragmentComponent(props) {
1467
1556
  return (() => {
1468
- const _el$ = _tmpl$5();
1557
+ const _el$ = _tmpl$3();
1469
1558
  insert(_el$, () => props.children);
1470
1559
  return _el$;
1471
1560
  })();
@@ -1520,7 +1609,7 @@ function getSrcSet(url) {
1520
1609
  }
1521
1610
 
1522
1611
  // src/blocks/image/image.tsx
1523
- var _tmpl$6 = /* @__PURE__ */ template(`<source type=image/webp>`);
1612
+ var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
1524
1613
  var _tmpl$22 = /* @__PURE__ */ template(`<picture><img loading=lazy>`);
1525
1614
  var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
1526
1615
  function Image(props) {
@@ -1567,7 +1656,7 @@ function Image(props) {
1567
1656
  return webpSrcSet();
1568
1657
  },
1569
1658
  get children() {
1570
- const _el$2 = _tmpl$6();
1659
+ const _el$2 = _tmpl$4();
1571
1660
  effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
1572
1661
  return _el$2;
1573
1662
  }
@@ -1649,10 +1738,10 @@ function Image(props) {
1649
1738
  })];
1650
1739
  }
1651
1740
  var image_default = Image;
1652
- var _tmpl$7 = /* @__PURE__ */ template(`<section>`);
1741
+ var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
1653
1742
  function SectionComponent(props) {
1654
1743
  return (() => {
1655
- const _el$ = _tmpl$7();
1744
+ const _el$ = _tmpl$5();
1656
1745
  spread(_el$, mergeProps({}, () => props.attributes, {
1657
1746
  get style() {
1658
1747
  return {
@@ -2146,7 +2235,7 @@ var componentInfo3 = {
2146
2235
  advanced: true
2147
2236
  }]
2148
2237
  };
2149
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
2238
+ var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
2150
2239
  function CustomCode(props) {
2151
2240
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
2152
2241
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -2181,7 +2270,7 @@ function CustomCode(props) {
2181
2270
  }
2182
2271
  });
2183
2272
  return (() => {
2184
- const _el$ = _tmpl$8();
2273
+ const _el$ = _tmpl$6();
2185
2274
  const _ref$ = elementRef;
2186
2275
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
2187
2276
  effect((_p$) => {
@@ -2241,7 +2330,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
2241
2330
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
2242
2331
 
2243
2332
  // src/blocks/embed/embed.tsx
2244
- var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-embed>`);
2333
+ var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-embed>`);
2245
2334
  function Embed(props) {
2246
2335
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
2247
2336
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -2277,7 +2366,7 @@ function Embed(props) {
2277
2366
  }
2278
2367
  createEffect(on(() => [elem, ranInitFn()], onUpdateFn_0));
2279
2368
  return (() => {
2280
- const _el$ = _tmpl$9();
2369
+ const _el$ = _tmpl$7();
2281
2370
  const _ref$ = elem;
2282
2371
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
2283
2372
  effect(() => _el$.innerHTML = props.content);
@@ -2434,10 +2523,10 @@ var componentInfo7 = {
2434
2523
  noWrap: true,
2435
2524
  static: true
2436
2525
  };
2437
- var _tmpl$10 = /* @__PURE__ */ template(`<img>`);
2526
+ var _tmpl$8 = /* @__PURE__ */ template(`<img>`);
2438
2527
  function ImgComponent(props) {
2439
2528
  return (() => {
2440
- const _el$ = _tmpl$10();
2529
+ const _el$ = _tmpl$8();
2441
2530
  spread(_el$, mergeProps({
2442
2531
  get style() {
2443
2532
  return {
@@ -2517,10 +2606,10 @@ var componentInfo9 = {
2517
2606
  defaultValue: "children"
2518
2607
  }]
2519
2608
  };
2520
- var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
2609
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
2521
2610
  function Slot(props) {
2522
2611
  return (() => {
2523
- const _el$ = _tmpl$11();
2612
+ const _el$ = _tmpl$9();
2524
2613
  _el$.style.setProperty("pointer-events", "auto");
2525
2614
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
2526
2615
  "builder-slot": props.name
@@ -2600,10 +2689,10 @@ var componentInfo11 = {
2600
2689
  textAlign: "center"
2601
2690
  }
2602
2691
  };
2603
- var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
2692
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
2604
2693
  function Text(props) {
2605
2694
  return (() => {
2606
- const _el$ = _tmpl$12();
2695
+ const _el$ = _tmpl$10();
2607
2696
  _el$.style.setProperty("outline", "none");
2608
2697
  effect(() => _el$.innerHTML = props.text?.toString() || "");
2609
2698
  return _el$;
@@ -2694,7 +2783,7 @@ var componentInfo12 = {
2694
2783
  advanced: true
2695
2784
  }]
2696
2785
  };
2697
- var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
2786
+ var _tmpl$11 = /* @__PURE__ */ template(`<source type=video/mp4>`);
2698
2787
  var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
2699
2788
  var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
2700
2789
  function Video(props) {
@@ -2757,7 +2846,7 @@ function Video(props) {
2757
2846
  return !props.lazyLoad;
2758
2847
  },
2759
2848
  get children() {
2760
- const _el$3 = _tmpl$13();
2849
+ const _el$3 = _tmpl$11();
2761
2850
  effect(() => setAttribute(_el$3, "src", props.video));
2762
2851
  return _el$3;
2763
2852
  }
@@ -2919,10 +3008,10 @@ var getUpdateVariantVisibilityScript = ({
2919
3008
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
2920
3009
  "${variationId}", "${contentId}", ${isHydrationTarget}
2921
3010
  )`;
2922
- var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
3011
+ var _tmpl$12 = /* @__PURE__ */ template(`<script>`);
2923
3012
  function InlinedScript(props) {
2924
3013
  return (() => {
2925
- const _el$ = _tmpl$14();
3014
+ const _el$ = _tmpl$12();
2926
3015
  effect((_p$) => {
2927
3016
  const _v$ = props.scriptStr, _v$2 = props.id || "";
2928
3017
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -3429,7 +3518,7 @@ var getInteractionPropertiesForEvent = (event) => {
3429
3518
  };
3430
3519
 
3431
3520
  // src/constants/sdk-version.ts
3432
- var SDK_VERSION = "0.12.3";
3521
+ var SDK_VERSION = "0.12.5";
3433
3522
 
3434
3523
  // src/functions/register.ts
3435
3524
  var registry = {};
@@ -4118,6 +4207,9 @@ function ContentComponent(props) {
4118
4207
  get contentWrapperProps() {
4119
4208
  return props.contentWrapperProps;
4120
4209
  },
4210
+ get linkComponent() {
4211
+ return props.linkComponent;
4212
+ },
4121
4213
  get trustedHosts() {
4122
4214
  return props.trustedHosts;
4123
4215
  }
@@ -4160,6 +4252,9 @@ function ContentComponent(props) {
4160
4252
  },
4161
4253
  get registeredComponents() {
4162
4254
  return registeredComponents();
4255
+ },
4256
+ get linkComponent() {
4257
+ return props.linkComponent;
4163
4258
  }
4164
4259
  })];
4165
4260
  }
@@ -4253,6 +4348,9 @@ function ContentVariants(props) {
4253
4348
  get customComponents() {
4254
4349
  return props.customComponents;
4255
4350
  },
4351
+ get linkComponent() {
4352
+ return props.linkComponent;
4353
+ },
4256
4354
  get canTrack() {
4257
4355
  return props.canTrack;
4258
4356
  },
@@ -4310,6 +4408,9 @@ function ContentVariants(props) {
4310
4408
  get customComponents() {
4311
4409
  return props.customComponents;
4312
4410
  },
4411
+ get linkComponent() {
4412
+ return props.linkComponent;
4413
+ },
4313
4414
  get canTrack() {
4314
4415
  return props.canTrack;
4315
4416
  },
@@ -4369,11 +4470,11 @@ var fetchSymbolContent = async ({
4369
4470
  };
4370
4471
 
4371
4472
  // src/blocks/symbol/symbol.tsx
4372
- var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
4473
+ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
4373
4474
  function Symbol(props) {
4374
4475
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
4375
4476
  function className() {
4376
- 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(" ");
4477
+ 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(" ");
4377
4478
  }
4378
4479
  function setContent() {
4379
4480
  if (contentToUse())
@@ -4395,7 +4496,7 @@ function Symbol(props) {
4395
4496
  }
4396
4497
  createEffect(on(() => [props.symbol], onUpdateFn_0));
4397
4498
  return (() => {
4398
- const _el$ = _tmpl$15();
4499
+ const _el$ = _tmpl$13();
4399
4500
  spread(_el$, mergeProps({
4400
4501
  get ["class"]() {
4401
4502
  return className();
@@ -4430,6 +4531,9 @@ function Symbol(props) {
4430
4531
  },
4431
4532
  get content() {
4432
4533
  return contentToUse();
4534
+ },
4535
+ get linkComponent() {
4536
+ return props.builderLinkComponent;
4433
4537
  }
4434
4538
  }));
4435
4539
  return _el$;