@builder.io/sdk-solid 0.12.3 → 0.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,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;
@@ -479,10 +531,10 @@ var createCssClass = ({
479
531
  return cssClass;
480
532
  }
481
533
  };
482
- var _tmpl$3 = /* @__PURE__ */ template(`<style>`);
534
+ var _tmpl$ = /* @__PURE__ */ template(`<style>`);
483
535
  function InlinedStyles(props) {
484
536
  return (() => {
485
- const _el$ = _tmpl$3();
537
+ const _el$ = _tmpl$();
486
538
  effect((_p$) => {
487
539
  const _v$ = props.styles, _v$2 = props.id;
488
540
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -608,6 +660,38 @@ function getBlockActions(options) {
608
660
  return obj;
609
661
  }
610
662
 
663
+ // src/functions/transform-style-property.ts
664
+ function transformStyleProperty({
665
+ style
666
+ }) {
667
+ return style;
668
+ }
669
+
670
+ // src/functions/get-style.ts
671
+ var getStyle = ({
672
+ block,
673
+ context
674
+ }) => {
675
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
676
+ style: block.style || {},
677
+ context,
678
+ block
679
+ }));
680
+ };
681
+ function mapStyleObjToStrIfNeeded(style) {
682
+ switch (TARGET) {
683
+ case "svelte":
684
+ case "vue":
685
+ case "solid":
686
+ return convertStyleMapToCSSArray(style).join(" ");
687
+ case "qwik":
688
+ case "reactNative":
689
+ case "react":
690
+ case "rsc":
691
+ return style;
692
+ }
693
+ }
694
+
611
695
  // src/functions/transform-block-properties.ts
612
696
  function transformBlockProperties({
613
697
  properties
@@ -629,8 +713,11 @@ function getBlockProperties({
629
713
  ...extractRelevantRootBlockProperties(block),
630
714
  ...block.properties,
631
715
  "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(" ")
716
+ style: getStyle({
717
+ block,
718
+ context
719
+ }),
720
+ [getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
634
721
  };
635
722
  return transformBlockProperties({
636
723
  properties,
@@ -638,69 +725,6 @@ function getBlockProperties({
638
725
  block
639
726
  });
640
727
  }
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
728
 
705
729
  // src/components/block/components/block-wrapper.tsx
706
730
  function BlockWrapper(props) {
@@ -803,6 +827,7 @@ function ComponentRef(props) {
803
827
  builderBlock: props.builderBlock,
804
828
  context: props.context,
805
829
  componentRef: props.componentRef,
830
+ linkComponent: props.linkComponent,
806
831
  includeBlockProps: props.includeBlockProps,
807
832
  isInteractive: props.isInteractive,
808
833
  contextValue: props.context
@@ -827,6 +852,9 @@ function ComponentRef(props) {
827
852
  },
828
853
  get registeredComponents() {
829
854
  return props.registeredComponents;
855
+ },
856
+ get linkComponent() {
857
+ return props.linkComponent;
830
858
  }
831
859
  });
832
860
  }
@@ -853,6 +881,9 @@ function RepeatedBlock(props) {
853
881
  },
854
882
  get registeredComponents() {
855
883
  return props.registeredComponents;
884
+ },
885
+ get linkComponent() {
886
+ return props.linkComponent;
856
887
  }
857
888
  });
858
889
  }
@@ -887,6 +918,10 @@ function Block(props) {
887
918
  });
888
919
  }
889
920
  function Tag() {
921
+ const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
922
+ if (shouldUseLink) {
923
+ return props.linkComponent || "a";
924
+ }
890
925
  return props.block.tagName || "div";
891
926
  }
892
927
  function canShowBlock() {
@@ -910,11 +945,15 @@ function Block(props) {
910
945
  componentOptions: {
911
946
  ...getBlockComponentOptions(processedBlock()),
912
947
  builderContext: props.context,
948
+ ...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
949
+ builderLinkComponent: props.linkComponent
950
+ } : {},
913
951
  ...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
914
952
  builderComponents: props.registeredComponents
915
953
  } : {}
916
954
  },
917
955
  context: childrenContext(),
956
+ linkComponent: props.linkComponent,
918
957
  registeredComponents: props.registeredComponents,
919
958
  builderBlock: processedBlock(),
920
959
  includeBlockProps: blockComponent()?.noWrap === true,
@@ -951,6 +990,9 @@ function Block(props) {
951
990
  get registeredComponents() {
952
991
  return componentRefProps().registeredComponents;
953
992
  },
993
+ get linkComponent() {
994
+ return componentRefProps().linkComponent;
995
+ },
954
996
  get builderBlock() {
955
997
  return componentRefProps().builderBlock;
956
998
  },
@@ -984,6 +1026,9 @@ function Block(props) {
984
1026
  },
985
1027
  get registeredComponents() {
986
1028
  return props.registeredComponents;
1029
+ },
1030
+ get linkComponent() {
1031
+ return props.linkComponent;
987
1032
  }
988
1033
  });
989
1034
  }
@@ -1003,6 +1048,9 @@ function Block(props) {
1003
1048
  get context() {
1004
1049
  return props.context;
1005
1050
  },
1051
+ get linkComponent() {
1052
+ return props.linkComponent;
1053
+ },
1006
1054
  get children() {
1007
1055
  return [createComponent(component_ref_default, {
1008
1056
  get componentRef() {
@@ -1020,6 +1068,9 @@ function Block(props) {
1020
1068
  get registeredComponents() {
1021
1069
  return componentRefProps().registeredComponents;
1022
1070
  },
1071
+ get linkComponent() {
1072
+ return componentRefProps().linkComponent;
1073
+ },
1023
1074
  get builderBlock() {
1024
1075
  return componentRefProps().builderBlock;
1025
1076
  },
@@ -1045,6 +1096,9 @@ function Block(props) {
1045
1096
  },
1046
1097
  get registeredComponents() {
1047
1098
  return props.registeredComponents;
1099
+ },
1100
+ get linkComponent() {
1101
+ return props.linkComponent;
1048
1102
  }
1049
1103
  });
1050
1104
  }
@@ -1157,6 +1211,9 @@ function Blocks(props) {
1157
1211
  return block.id;
1158
1212
  },
1159
1213
  block,
1214
+ get linkComponent() {
1215
+ return props.linkComponent;
1216
+ },
1160
1217
  get context() {
1161
1218
  return props.context || builderContext;
1162
1219
  },
@@ -1174,7 +1231,7 @@ function Blocks(props) {
1174
1231
  var blocks_default = Blocks;
1175
1232
 
1176
1233
  // src/blocks/columns/columns.tsx
1177
- var _tmpl$4 = /* @__PURE__ */ template(`<div>`);
1234
+ var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
1178
1235
  function Columns(props) {
1179
1236
  const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
1180
1237
  const [cols, setCols] = createSignal(props.columns || []);
@@ -1215,7 +1272,13 @@ function Columns(props) {
1215
1272
  const mobileWidth = "100%";
1216
1273
  const mobileMarginLeft = 0;
1217
1274
  const marginLeftKey = "margin-left";
1275
+ const sharedStyles = {
1276
+ display: "flex",
1277
+ flexDirection: "column",
1278
+ alignItems: "stretch"
1279
+ };
1218
1280
  return {
1281
+ ...sharedStyles,
1219
1282
  width,
1220
1283
  [marginLeftKey]: gutterPixels,
1221
1284
  "--column-width-mobile": getMobileStyle({
@@ -1268,7 +1331,7 @@ function Columns(props) {
1268
1331
  `;
1269
1332
  }
1270
1333
  return (() => {
1271
- const _el$ = _tmpl$4();
1334
+ const _el$ = _tmpl$2();
1272
1335
  spread(_el$, mergeProps({
1273
1336
  get ["class"]() {
1274
1337
  return `builder-columns ${props.builderBlock.id}-breakpoints ` + css({
@@ -1296,52 +1359,56 @@ function Columns(props) {
1296
1359
  },
1297
1360
  children: (column, _index) => {
1298
1361
  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
- })();
1362
+ return createComponent(dynamic_renderer_default, {
1363
+ key: index,
1364
+ get TagName() {
1365
+ return column.link ? props.builderLinkComponent || "a" : "div";
1366
+ },
1367
+ actionAttributes: {},
1368
+ get attributes() {
1369
+ return {
1370
+ ...{},
1371
+ ...column.link ? {
1372
+ href: column.link
1373
+ } : {},
1374
+ [getClassPropName()]: "builder-column",
1375
+ style: mapStyleObjToStrIfNeeded(columnCssVars(index))
1376
+ };
1377
+ },
1378
+ get children() {
1379
+ return createComponent(blocks_default, {
1380
+ path: `component.options.columns.${index}.blocks`,
1381
+ get parent() {
1382
+ return props.builderBlock.id;
1383
+ },
1384
+ styleProp: {
1385
+ flexGrow: "1"
1386
+ },
1387
+ get context() {
1388
+ return props.builderContext;
1389
+ },
1390
+ get registeredComponents() {
1391
+ return props.builderComponents;
1392
+ },
1393
+ get linkComponent() {
1394
+ return props.builderLinkComponent;
1395
+ },
1396
+ get blocks() {
1397
+ return column.blocks;
1398
+ }
1399
+ });
1400
+ }
1401
+ });
1335
1402
  }
1336
1403
  }), null);
1337
1404
  return _el$;
1338
1405
  })();
1339
1406
  }
1340
1407
  var columns_default = Columns;
1341
- var _tmpl$5 = /* @__PURE__ */ template(`<span>`);
1408
+ var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
1342
1409
  function FragmentComponent(props) {
1343
1410
  return (() => {
1344
- const _el$ = _tmpl$5();
1411
+ const _el$ = _tmpl$3();
1345
1412
  insert(_el$, () => props.children);
1346
1413
  return _el$;
1347
1414
  })();
@@ -1396,7 +1463,7 @@ function getSrcSet(url) {
1396
1463
  }
1397
1464
 
1398
1465
  // src/blocks/image/image.tsx
1399
- var _tmpl$6 = /* @__PURE__ */ template(`<source type=image/webp>`);
1466
+ var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
1400
1467
  var _tmpl$22 = /* @__PURE__ */ template(`<picture><img loading=lazy>`);
1401
1468
  var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
1402
1469
  function Image(props) {
@@ -1443,7 +1510,7 @@ function Image(props) {
1443
1510
  return webpSrcSet();
1444
1511
  },
1445
1512
  get children() {
1446
- const _el$2 = _tmpl$6();
1513
+ const _el$2 = _tmpl$4();
1447
1514
  effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
1448
1515
  return _el$2;
1449
1516
  }
@@ -1525,10 +1592,10 @@ function Image(props) {
1525
1592
  })];
1526
1593
  }
1527
1594
  var image_default = Image;
1528
- var _tmpl$7 = /* @__PURE__ */ template(`<section>`);
1595
+ var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
1529
1596
  function SectionComponent(props) {
1530
1597
  return (() => {
1531
- const _el$ = _tmpl$7();
1598
+ const _el$ = _tmpl$5();
1532
1599
  spread(_el$, mergeProps({}, () => props.attributes, {
1533
1600
  get style() {
1534
1601
  return {
@@ -2022,7 +2089,7 @@ var componentInfo3 = {
2022
2089
  advanced: true
2023
2090
  }]
2024
2091
  };
2025
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
2092
+ var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
2026
2093
  function CustomCode(props) {
2027
2094
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
2028
2095
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -2057,7 +2124,7 @@ function CustomCode(props) {
2057
2124
  }
2058
2125
  });
2059
2126
  return (() => {
2060
- const _el$ = _tmpl$8();
2127
+ const _el$ = _tmpl$6();
2061
2128
  const _ref$ = elementRef;
2062
2129
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
2063
2130
  effect((_p$) => {
@@ -2117,7 +2184,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
2117
2184
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
2118
2185
 
2119
2186
  // src/blocks/embed/embed.tsx
2120
- var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-embed>`);
2187
+ var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-embed>`);
2121
2188
  function Embed(props) {
2122
2189
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
2123
2190
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -2153,7 +2220,7 @@ function Embed(props) {
2153
2220
  }
2154
2221
  createEffect(on(() => [elem, ranInitFn()], onUpdateFn_0));
2155
2222
  return (() => {
2156
- const _el$ = _tmpl$9();
2223
+ const _el$ = _tmpl$7();
2157
2224
  const _ref$ = elem;
2158
2225
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
2159
2226
  effect(() => _el$.innerHTML = props.content);
@@ -2310,10 +2377,10 @@ var componentInfo7 = {
2310
2377
  noWrap: true,
2311
2378
  static: true
2312
2379
  };
2313
- var _tmpl$10 = /* @__PURE__ */ template(`<img>`);
2380
+ var _tmpl$8 = /* @__PURE__ */ template(`<img>`);
2314
2381
  function ImgComponent(props) {
2315
2382
  return (() => {
2316
- const _el$ = _tmpl$10();
2383
+ const _el$ = _tmpl$8();
2317
2384
  spread(_el$, mergeProps({
2318
2385
  get style() {
2319
2386
  return {
@@ -2393,10 +2460,10 @@ var componentInfo9 = {
2393
2460
  defaultValue: "children"
2394
2461
  }]
2395
2462
  };
2396
- var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
2463
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
2397
2464
  function Slot(props) {
2398
2465
  return (() => {
2399
- const _el$ = _tmpl$11();
2466
+ const _el$ = _tmpl$9();
2400
2467
  _el$.style.setProperty("pointer-events", "auto");
2401
2468
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
2402
2469
  "builder-slot": props.name
@@ -2476,10 +2543,10 @@ var componentInfo11 = {
2476
2543
  textAlign: "center"
2477
2544
  }
2478
2545
  };
2479
- var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
2546
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
2480
2547
  function Text(props) {
2481
2548
  return (() => {
2482
- const _el$ = _tmpl$12();
2549
+ const _el$ = _tmpl$10();
2483
2550
  _el$.style.setProperty("outline", "none");
2484
2551
  effect(() => _el$.innerHTML = props.text?.toString() || "");
2485
2552
  return _el$;
@@ -2570,7 +2637,7 @@ var componentInfo12 = {
2570
2637
  advanced: true
2571
2638
  }]
2572
2639
  };
2573
- var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
2640
+ var _tmpl$11 = /* @__PURE__ */ template(`<source type=video/mp4>`);
2574
2641
  var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
2575
2642
  var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
2576
2643
  function Video(props) {
@@ -2633,7 +2700,7 @@ function Video(props) {
2633
2700
  return !props.lazyLoad;
2634
2701
  },
2635
2702
  get children() {
2636
- const _el$3 = _tmpl$13();
2703
+ const _el$3 = _tmpl$11();
2637
2704
  effect(() => setAttribute(_el$3, "src", props.video));
2638
2705
  return _el$3;
2639
2706
  }
@@ -2795,10 +2862,10 @@ var getUpdateVariantVisibilityScript = ({
2795
2862
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
2796
2863
  "${variationId}", "${contentId}", ${isHydrationTarget}
2797
2864
  )`;
2798
- var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
2865
+ var _tmpl$12 = /* @__PURE__ */ template(`<script>`);
2799
2866
  function InlinedScript(props) {
2800
2867
  return (() => {
2801
- const _el$ = _tmpl$14();
2868
+ const _el$ = _tmpl$12();
2802
2869
  effect((_p$) => {
2803
2870
  const _v$ = props.scriptStr, _v$2 = props.id || "";
2804
2871
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -3305,7 +3372,7 @@ var getInteractionPropertiesForEvent = (event) => {
3305
3372
  };
3306
3373
 
3307
3374
  // src/constants/sdk-version.ts
3308
- var SDK_VERSION = "0.12.3";
3375
+ var SDK_VERSION = "0.12.4";
3309
3376
 
3310
3377
  // src/functions/register.ts
3311
3378
  var registry = {};
@@ -3994,6 +4061,9 @@ function ContentComponent(props) {
3994
4061
  get contentWrapperProps() {
3995
4062
  return props.contentWrapperProps;
3996
4063
  },
4064
+ get linkComponent() {
4065
+ return props.linkComponent;
4066
+ },
3997
4067
  get trustedHosts() {
3998
4068
  return props.trustedHosts;
3999
4069
  }
@@ -4036,6 +4106,9 @@ function ContentComponent(props) {
4036
4106
  },
4037
4107
  get registeredComponents() {
4038
4108
  return registeredComponents();
4109
+ },
4110
+ get linkComponent() {
4111
+ return props.linkComponent;
4039
4112
  }
4040
4113
  })];
4041
4114
  }
@@ -4129,6 +4202,9 @@ function ContentVariants(props) {
4129
4202
  get customComponents() {
4130
4203
  return props.customComponents;
4131
4204
  },
4205
+ get linkComponent() {
4206
+ return props.linkComponent;
4207
+ },
4132
4208
  get canTrack() {
4133
4209
  return props.canTrack;
4134
4210
  },
@@ -4186,6 +4262,9 @@ function ContentVariants(props) {
4186
4262
  get customComponents() {
4187
4263
  return props.customComponents;
4188
4264
  },
4265
+ get linkComponent() {
4266
+ return props.linkComponent;
4267
+ },
4189
4268
  get canTrack() {
4190
4269
  return props.canTrack;
4191
4270
  },
@@ -4245,11 +4324,11 @@ var fetchSymbolContent = async ({
4245
4324
  };
4246
4325
 
4247
4326
  // src/blocks/symbol/symbol.tsx
4248
- var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
4327
+ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
4249
4328
  function Symbol(props) {
4250
4329
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
4251
4330
  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(" ");
4331
+ 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
4332
  }
4254
4333
  function setContent() {
4255
4334
  if (contentToUse())
@@ -4271,7 +4350,7 @@ function Symbol(props) {
4271
4350
  }
4272
4351
  createEffect(on(() => [props.symbol], onUpdateFn_0));
4273
4352
  return (() => {
4274
- const _el$ = _tmpl$15();
4353
+ const _el$ = _tmpl$13();
4275
4354
  spread(_el$, mergeProps({
4276
4355
  get ["class"]() {
4277
4356
  return className();
@@ -4306,6 +4385,9 @@ function Symbol(props) {
4306
4385
  },
4307
4386
  get content() {
4308
4387
  return contentToUse();
4388
+ },
4389
+ get linkComponent() {
4390
+ return props.builderLinkComponent;
4309
4391
  }
4310
4392
  }));
4311
4393
  return _el$;