@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/edge/index.js CHANGED
@@ -1,5 +1,5 @@
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
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
@@ -9,42 +9,97 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
9
9
  return require.apply(this, arguments);
10
10
  throw Error('Dynamic require of "' + x + '" is not supported');
11
11
  });
12
- var _tmpl$ = /* @__PURE__ */ template(`<a>`);
13
- var _tmpl$2 = /* @__PURE__ */ template(`<button role=button>`);
14
- function Button(props) {
12
+
13
+ // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
14
+ var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
15
+ var isEmptyElement = (tagName) => {
16
+ return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
17
+ };
18
+
19
+ // src/components/dynamic-renderer/dynamic-renderer.tsx
20
+ function DynamicRenderer(props) {
15
21
  return createComponent(Show, {
16
22
  get fallback() {
17
- return (() => {
18
- const _el$2 = _tmpl$2();
19
- spread(_el$2, mergeProps({
20
- get ["class"]() {
21
- return `builder-button ${props.attributes.class}`;
22
- }
23
- }, {}, () => props.attributes, {
24
- get style() {
25
- return props.attributes.style;
26
- }
27
- }), false, true);
28
- insert(_el$2, () => props.text);
29
- return _el$2;
30
- })();
23
+ return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
24
+ get component() {
25
+ return props.TagName;
26
+ }
27
+ }));
31
28
  },
32
29
  get when() {
33
- return props.link;
30
+ return !isEmptyElement(props.TagName);
34
31
  },
35
32
  get children() {
36
- const _el$ = _tmpl$();
37
- spread(_el$, mergeProps({}, () => props.attributes, {
38
- get href() {
39
- return props.link;
33
+ return createComponent(Show, {
34
+ get fallback() {
35
+ return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
36
+ get component() {
37
+ return props.TagName;
38
+ },
39
+ get children() {
40
+ return props.children;
41
+ }
42
+ }));
40
43
  },
41
- get target() {
42
- return props.openLinkInNewTab ? "_blank" : void 0;
44
+ get when() {
45
+ return typeof props.TagName === "string";
43
46
  },
44
- "role": "button"
45
- }), false, true);
46
- insert(_el$, () => props.text);
47
- return _el$;
47
+ get children() {
48
+ return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
49
+ get component() {
50
+ return props.TagName;
51
+ },
52
+ get children() {
53
+ return props.children;
54
+ }
55
+ }));
56
+ }
57
+ });
58
+ }
59
+ });
60
+ }
61
+ var dynamic_renderer_default = DynamicRenderer;
62
+
63
+ // src/constants/target.ts
64
+ var TARGET = "solid";
65
+
66
+ // src/functions/get-class-prop-name.ts
67
+ var getClassPropName = () => {
68
+ switch (TARGET) {
69
+ case "react":
70
+ case "reactNative":
71
+ case "rsc":
72
+ return "className";
73
+ case "svelte":
74
+ case "vue":
75
+ case "solid":
76
+ case "qwik":
77
+ return "class";
78
+ }
79
+ };
80
+
81
+ // src/blocks/button/button.tsx
82
+ function Button(props) {
83
+ return createComponent(dynamic_renderer_default, {
84
+ get TagName() {
85
+ return props.link ? props.builderLinkComponent || "a" : "button";
86
+ },
87
+ get attributes() {
88
+ return {
89
+ ...props.attributes,
90
+ [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
91
+ ...props.link ? {
92
+ href: props.link,
93
+ target: props.openLinkInNewTab ? "_blank" : void 0,
94
+ role: "link"
95
+ } : {
96
+ role: "button"
97
+ }
98
+ };
99
+ },
100
+ actionAttributes: {},
101
+ get children() {
102
+ return props.text;
48
103
  }
49
104
  });
50
105
  }
@@ -90,9 +145,6 @@ function isBrowser() {
90
145
  return typeof window !== "undefined" && typeof document !== "undefined";
91
146
  }
92
147
 
93
- // src/constants/target.ts
94
- var TARGET = "solid";
95
-
96
148
  // src/functions/is-iframe.ts
97
149
  function isIframe() {
98
150
  return isBrowser() && window.self !== window.top;
@@ -3379,8 +3431,33 @@ theFunction();
3379
3431
  }
3380
3432
  };
3381
3433
 
3434
+ // src/helpers/nullable.ts
3435
+ var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
3436
+
3437
+ // src/functions/is-node-runtime.ts
3438
+ function isNodeRuntime() {
3439
+ return typeof process !== "undefined" && checkIsDefined(process?.versions?.node);
3440
+ }
3441
+
3442
+ // src/functions/evaluate/should-force-browser-runtime-in-node.ts
3443
+ var shouldForceBrowserRuntimeInNode = () => {
3444
+ if (!isNodeRuntime())
3445
+ return false;
3446
+ const isArm64 = process.arch === "arm64";
3447
+ const isNode20 = process.version.startsWith("v20");
3448
+ const hasNoNodeSnapshotNodeOption = process.env.NODE_OPTIONS?.includes("--no-node-snapshot");
3449
+ if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
3450
+ logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
3451
+ 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.
3452
+ See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
3453
+ `);
3454
+ return true;
3455
+ }
3456
+ return false;
3457
+ };
3458
+
3382
3459
  // src/functions/evaluate/choose-eval.ts
3383
- var chooseBrowserOrServerEval = (args) => isBrowser() ? runInBrowser(args) : runInEdge(args);
3460
+ var chooseBrowserOrServerEval = (args) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInEdge(args);
3384
3461
 
3385
3462
  // src/functions/evaluate/evaluate.ts
3386
3463
  function evaluate({
@@ -3596,9 +3673,6 @@ var getSizesForBreakpoints = ({
3596
3673
  // src/functions/camel-to-kebab-case.ts
3597
3674
  var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
3598
3675
 
3599
- // src/helpers/nullable.ts
3600
- var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
3601
-
3602
3676
  // src/helpers/css.ts
3603
3677
  var convertStyleMapToCSSArray = (style) => {
3604
3678
  const cssProps = Object.entries(style).map(([key, value]) => {
@@ -3627,10 +3701,10 @@ var createCssClass = ({
3627
3701
  return cssClass;
3628
3702
  }
3629
3703
  };
3630
- var _tmpl$3 = /* @__PURE__ */ template(`<style>`);
3704
+ var _tmpl$ = /* @__PURE__ */ template(`<style>`);
3631
3705
  function InlinedStyles(props) {
3632
3706
  return (() => {
3633
- const _el$ = _tmpl$3();
3707
+ const _el$ = _tmpl$();
3634
3708
  effect((_p$) => {
3635
3709
  const _v$ = props.styles, _v$2 = props.id;
3636
3710
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -3756,6 +3830,38 @@ function getBlockActions(options) {
3756
3830
  return obj;
3757
3831
  }
3758
3832
 
3833
+ // src/functions/transform-style-property.ts
3834
+ function transformStyleProperty({
3835
+ style
3836
+ }) {
3837
+ return style;
3838
+ }
3839
+
3840
+ // src/functions/get-style.ts
3841
+ var getStyle = ({
3842
+ block,
3843
+ context
3844
+ }) => {
3845
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
3846
+ style: block.style || {},
3847
+ context,
3848
+ block
3849
+ }));
3850
+ };
3851
+ function mapStyleObjToStrIfNeeded(style) {
3852
+ switch (TARGET) {
3853
+ case "svelte":
3854
+ case "vue":
3855
+ case "solid":
3856
+ return convertStyleMapToCSSArray(style).join(" ");
3857
+ case "qwik":
3858
+ case "reactNative":
3859
+ case "react":
3860
+ case "rsc":
3861
+ return style;
3862
+ }
3863
+ }
3864
+
3759
3865
  // src/functions/transform-block-properties.ts
3760
3866
  function transformBlockProperties({
3761
3867
  properties
@@ -3777,8 +3883,11 @@ function getBlockProperties({
3777
3883
  ...extractRelevantRootBlockProperties(block),
3778
3884
  ...block.properties,
3779
3885
  "builder-id": block.id,
3780
- style: block.style ? getStyleAttribute(block.style) : void 0,
3781
- class: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
3886
+ style: getStyle({
3887
+ block,
3888
+ context
3889
+ }),
3890
+ [getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
3782
3891
  };
3783
3892
  return transformBlockProperties({
3784
3893
  properties,
@@ -3786,69 +3895,6 @@ function getBlockProperties({
3786
3895
  block
3787
3896
  });
3788
3897
  }
3789
- function getStyleAttribute(style) {
3790
- switch (TARGET) {
3791
- case "svelte":
3792
- case "vue":
3793
- case "solid":
3794
- return convertStyleMapToCSSArray(style).join(" ");
3795
- case "qwik":
3796
- case "reactNative":
3797
- case "react":
3798
- case "rsc":
3799
- return style;
3800
- }
3801
- }
3802
-
3803
- // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
3804
- var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
3805
- var isEmptyElement = (tagName) => {
3806
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
3807
- };
3808
-
3809
- // src/components/dynamic-renderer/dynamic-renderer.tsx
3810
- function DynamicRenderer(props) {
3811
- return createComponent(Show, {
3812
- get fallback() {
3813
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
3814
- get component() {
3815
- return props.TagName;
3816
- }
3817
- }));
3818
- },
3819
- get when() {
3820
- return !isEmptyElement(props.TagName);
3821
- },
3822
- get children() {
3823
- return createComponent(Show, {
3824
- get fallback() {
3825
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
3826
- get component() {
3827
- return props.TagName;
3828
- },
3829
- get children() {
3830
- return props.children;
3831
- }
3832
- }));
3833
- },
3834
- get when() {
3835
- return typeof props.TagName === "string";
3836
- },
3837
- get children() {
3838
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
3839
- get component() {
3840
- return props.TagName;
3841
- },
3842
- get children() {
3843
- return props.children;
3844
- }
3845
- }));
3846
- }
3847
- });
3848
- }
3849
- });
3850
- }
3851
- var dynamic_renderer_default = DynamicRenderer;
3852
3898
 
3853
3899
  // src/components/block/components/block-wrapper.tsx
3854
3900
  function BlockWrapper(props) {
@@ -3951,6 +3997,7 @@ function ComponentRef(props) {
3951
3997
  builderBlock: props.builderBlock,
3952
3998
  context: props.context,
3953
3999
  componentRef: props.componentRef,
4000
+ linkComponent: props.linkComponent,
3954
4001
  includeBlockProps: props.includeBlockProps,
3955
4002
  isInteractive: props.isInteractive,
3956
4003
  contextValue: props.context
@@ -3975,6 +4022,9 @@ function ComponentRef(props) {
3975
4022
  },
3976
4023
  get registeredComponents() {
3977
4024
  return props.registeredComponents;
4025
+ },
4026
+ get linkComponent() {
4027
+ return props.linkComponent;
3978
4028
  }
3979
4029
  });
3980
4030
  }
@@ -4001,6 +4051,9 @@ function RepeatedBlock(props) {
4001
4051
  },
4002
4052
  get registeredComponents() {
4003
4053
  return props.registeredComponents;
4054
+ },
4055
+ get linkComponent() {
4056
+ return props.linkComponent;
4004
4057
  }
4005
4058
  });
4006
4059
  }
@@ -4035,6 +4088,10 @@ function Block(props) {
4035
4088
  });
4036
4089
  }
4037
4090
  function Tag() {
4091
+ const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
4092
+ if (shouldUseLink) {
4093
+ return props.linkComponent || "a";
4094
+ }
4038
4095
  return props.block.tagName || "div";
4039
4096
  }
4040
4097
  function canShowBlock() {
@@ -4058,11 +4115,15 @@ function Block(props) {
4058
4115
  componentOptions: {
4059
4116
  ...getBlockComponentOptions(processedBlock()),
4060
4117
  builderContext: props.context,
4118
+ ...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
4119
+ builderLinkComponent: props.linkComponent
4120
+ } : {},
4061
4121
  ...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
4062
4122
  builderComponents: props.registeredComponents
4063
4123
  } : {}
4064
4124
  },
4065
4125
  context: childrenContext(),
4126
+ linkComponent: props.linkComponent,
4066
4127
  registeredComponents: props.registeredComponents,
4067
4128
  builderBlock: processedBlock(),
4068
4129
  includeBlockProps: blockComponent()?.noWrap === true,
@@ -4099,6 +4160,9 @@ function Block(props) {
4099
4160
  get registeredComponents() {
4100
4161
  return componentRefProps().registeredComponents;
4101
4162
  },
4163
+ get linkComponent() {
4164
+ return componentRefProps().linkComponent;
4165
+ },
4102
4166
  get builderBlock() {
4103
4167
  return componentRefProps().builderBlock;
4104
4168
  },
@@ -4132,6 +4196,9 @@ function Block(props) {
4132
4196
  },
4133
4197
  get registeredComponents() {
4134
4198
  return props.registeredComponents;
4199
+ },
4200
+ get linkComponent() {
4201
+ return props.linkComponent;
4135
4202
  }
4136
4203
  });
4137
4204
  }
@@ -4151,6 +4218,9 @@ function Block(props) {
4151
4218
  get context() {
4152
4219
  return props.context;
4153
4220
  },
4221
+ get linkComponent() {
4222
+ return props.linkComponent;
4223
+ },
4154
4224
  get children() {
4155
4225
  return [createComponent(component_ref_default, {
4156
4226
  get componentRef() {
@@ -4168,6 +4238,9 @@ function Block(props) {
4168
4238
  get registeredComponents() {
4169
4239
  return componentRefProps().registeredComponents;
4170
4240
  },
4241
+ get linkComponent() {
4242
+ return componentRefProps().linkComponent;
4243
+ },
4171
4244
  get builderBlock() {
4172
4245
  return componentRefProps().builderBlock;
4173
4246
  },
@@ -4193,6 +4266,9 @@ function Block(props) {
4193
4266
  },
4194
4267
  get registeredComponents() {
4195
4268
  return props.registeredComponents;
4269
+ },
4270
+ get linkComponent() {
4271
+ return props.linkComponent;
4196
4272
  }
4197
4273
  });
4198
4274
  }
@@ -4305,6 +4381,9 @@ function Blocks(props) {
4305
4381
  return block.id;
4306
4382
  },
4307
4383
  block,
4384
+ get linkComponent() {
4385
+ return props.linkComponent;
4386
+ },
4308
4387
  get context() {
4309
4388
  return props.context || builderContext;
4310
4389
  },
@@ -4322,7 +4401,7 @@ function Blocks(props) {
4322
4401
  var blocks_default = Blocks;
4323
4402
 
4324
4403
  // src/blocks/columns/columns.tsx
4325
- var _tmpl$4 = /* @__PURE__ */ template(`<div>`);
4404
+ var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
4326
4405
  function Columns(props) {
4327
4406
  const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
4328
4407
  const [cols, setCols] = createSignal(props.columns || []);
@@ -4363,7 +4442,13 @@ function Columns(props) {
4363
4442
  const mobileWidth = "100%";
4364
4443
  const mobileMarginLeft = 0;
4365
4444
  const marginLeftKey = "margin-left";
4445
+ const sharedStyles = {
4446
+ display: "flex",
4447
+ flexDirection: "column",
4448
+ alignItems: "stretch"
4449
+ };
4366
4450
  return {
4451
+ ...sharedStyles,
4367
4452
  width,
4368
4453
  [marginLeftKey]: gutterPixels,
4369
4454
  "--column-width-mobile": getMobileStyle({
@@ -4416,7 +4501,7 @@ function Columns(props) {
4416
4501
  `;
4417
4502
  }
4418
4503
  return (() => {
4419
- const _el$ = _tmpl$4();
4504
+ const _el$ = _tmpl$2();
4420
4505
  spread(_el$, mergeProps({
4421
4506
  get ["class"]() {
4422
4507
  return `builder-columns ${props.builderBlock.id}-breakpoints ` + css({
@@ -4444,52 +4529,56 @@ function Columns(props) {
4444
4529
  },
4445
4530
  children: (column, _index) => {
4446
4531
  const index = _index();
4447
- return (() => {
4448
- const _el$2 = _tmpl$4();
4449
- spread(_el$2, mergeProps({
4450
- get ["class"]() {
4451
- return "builder-column " + css({
4452
- display: "flex",
4453
- flexDirection: "column",
4454
- alignItems: "stretch"
4455
- });
4456
- },
4457
- get style() {
4458
- return columnCssVars(index);
4459
- }
4460
- }, {}, {
4461
- "key": index
4462
- }), false, true);
4463
- insert(_el$2, createComponent(blocks_default, {
4464
- path: `component.options.columns.${index}.blocks`,
4465
- get parent() {
4466
- return props.builderBlock.id;
4467
- },
4468
- styleProp: {
4469
- flexGrow: "1"
4470
- },
4471
- get context() {
4472
- return props.builderContext;
4473
- },
4474
- get registeredComponents() {
4475
- return props.builderComponents;
4476
- },
4477
- get blocks() {
4478
- return column.blocks;
4479
- }
4480
- }));
4481
- return _el$2;
4482
- })();
4532
+ return createComponent(dynamic_renderer_default, {
4533
+ key: index,
4534
+ get TagName() {
4535
+ return column.link ? props.builderLinkComponent || "a" : "div";
4536
+ },
4537
+ actionAttributes: {},
4538
+ get attributes() {
4539
+ return {
4540
+ ...{},
4541
+ ...column.link ? {
4542
+ href: column.link
4543
+ } : {},
4544
+ [getClassPropName()]: "builder-column",
4545
+ style: mapStyleObjToStrIfNeeded(columnCssVars(index))
4546
+ };
4547
+ },
4548
+ get children() {
4549
+ return createComponent(blocks_default, {
4550
+ path: `component.options.columns.${index}.blocks`,
4551
+ get parent() {
4552
+ return props.builderBlock.id;
4553
+ },
4554
+ styleProp: {
4555
+ flexGrow: "1"
4556
+ },
4557
+ get context() {
4558
+ return props.builderContext;
4559
+ },
4560
+ get registeredComponents() {
4561
+ return props.builderComponents;
4562
+ },
4563
+ get linkComponent() {
4564
+ return props.builderLinkComponent;
4565
+ },
4566
+ get blocks() {
4567
+ return column.blocks;
4568
+ }
4569
+ });
4570
+ }
4571
+ });
4483
4572
  }
4484
4573
  }), null);
4485
4574
  return _el$;
4486
4575
  })();
4487
4576
  }
4488
4577
  var columns_default = Columns;
4489
- var _tmpl$5 = /* @__PURE__ */ template(`<span>`);
4578
+ var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
4490
4579
  function FragmentComponent(props) {
4491
4580
  return (() => {
4492
- const _el$ = _tmpl$5();
4581
+ const _el$ = _tmpl$3();
4493
4582
  insert(_el$, () => props.children);
4494
4583
  return _el$;
4495
4584
  })();
@@ -4544,7 +4633,7 @@ function getSrcSet(url) {
4544
4633
  }
4545
4634
 
4546
4635
  // src/blocks/image/image.tsx
4547
- var _tmpl$6 = /* @__PURE__ */ template(`<source type=image/webp>`);
4636
+ var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
4548
4637
  var _tmpl$22 = /* @__PURE__ */ template(`<picture><img loading=lazy>`);
4549
4638
  var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
4550
4639
  function Image(props) {
@@ -4590,7 +4679,7 @@ function Image(props) {
4590
4679
  return webpSrcSet();
4591
4680
  },
4592
4681
  get children() {
4593
- const _el$2 = _tmpl$6();
4682
+ const _el$2 = _tmpl$4();
4594
4683
  effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
4595
4684
  return _el$2;
4596
4685
  }
@@ -4672,10 +4761,10 @@ function Image(props) {
4672
4761
  })];
4673
4762
  }
4674
4763
  var image_default = Image;
4675
- var _tmpl$7 = /* @__PURE__ */ template(`<section>`);
4764
+ var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
4676
4765
  function SectionComponent(props) {
4677
4766
  return (() => {
4678
- const _el$ = _tmpl$7();
4767
+ const _el$ = _tmpl$5();
4679
4768
  spread(_el$, mergeProps({}, () => props.attributes, {
4680
4769
  get style() {
4681
4770
  return {
@@ -5169,7 +5258,7 @@ var componentInfo3 = {
5169
5258
  advanced: true
5170
5259
  }]
5171
5260
  };
5172
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
5261
+ var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
5173
5262
  function CustomCode(props) {
5174
5263
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
5175
5264
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -5203,7 +5292,7 @@ function CustomCode(props) {
5203
5292
  }
5204
5293
  });
5205
5294
  return (() => {
5206
- const _el$ = _tmpl$8();
5295
+ const _el$ = _tmpl$6();
5207
5296
  const _ref$ = elementRef;
5208
5297
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
5209
5298
  effect((_p$) => {
@@ -5263,7 +5352,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
5263
5352
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
5264
5353
 
5265
5354
  // src/blocks/embed/embed.tsx
5266
- var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-embed>`);
5355
+ var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-embed>`);
5267
5356
  function Embed(props) {
5268
5357
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
5269
5358
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -5298,7 +5387,7 @@ function Embed(props) {
5298
5387
  }
5299
5388
  createEffect(on(() => [elem, ranInitFn()], onUpdateFn_0));
5300
5389
  return (() => {
5301
- const _el$ = _tmpl$9();
5390
+ const _el$ = _tmpl$7();
5302
5391
  const _ref$ = elem;
5303
5392
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
5304
5393
  effect(() => _el$.innerHTML = props.content);
@@ -5454,10 +5543,10 @@ var componentInfo7 = {
5454
5543
  noWrap: true,
5455
5544
  static: true
5456
5545
  };
5457
- var _tmpl$10 = /* @__PURE__ */ template(`<img>`);
5546
+ var _tmpl$8 = /* @__PURE__ */ template(`<img>`);
5458
5547
  function ImgComponent(props) {
5459
5548
  return (() => {
5460
- const _el$ = _tmpl$10();
5549
+ const _el$ = _tmpl$8();
5461
5550
  spread(_el$, mergeProps({
5462
5551
  get style() {
5463
5552
  return {
@@ -5537,10 +5626,10 @@ var componentInfo9 = {
5537
5626
  defaultValue: "children"
5538
5627
  }]
5539
5628
  };
5540
- var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
5629
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
5541
5630
  function Slot(props) {
5542
5631
  return (() => {
5543
- const _el$ = _tmpl$11();
5632
+ const _el$ = _tmpl$9();
5544
5633
  _el$.style.setProperty("pointer-events", "auto");
5545
5634
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
5546
5635
  "builder-slot": props.name
@@ -5620,10 +5709,10 @@ var componentInfo11 = {
5620
5709
  textAlign: "center"
5621
5710
  }
5622
5711
  };
5623
- var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
5712
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
5624
5713
  function Text(props) {
5625
5714
  return (() => {
5626
- const _el$ = _tmpl$12();
5715
+ const _el$ = _tmpl$10();
5627
5716
  _el$.style.setProperty("outline", "none");
5628
5717
  effect(() => _el$.innerHTML = props.text?.toString() || "");
5629
5718
  return _el$;
@@ -5714,7 +5803,7 @@ var componentInfo12 = {
5714
5803
  advanced: true
5715
5804
  }]
5716
5805
  };
5717
- var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
5806
+ var _tmpl$11 = /* @__PURE__ */ template(`<source type=video/mp4>`);
5718
5807
  var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
5719
5808
  var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
5720
5809
  function Video(props) {
@@ -5777,7 +5866,7 @@ function Video(props) {
5777
5866
  return !props.lazyLoad;
5778
5867
  },
5779
5868
  get children() {
5780
- const _el$3 = _tmpl$13();
5869
+ const _el$3 = _tmpl$11();
5781
5870
  effect(() => setAttribute(_el$3, "src", props.video));
5782
5871
  return _el$3;
5783
5872
  }
@@ -5939,10 +6028,10 @@ var getUpdateVariantVisibilityScript = ({
5939
6028
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
5940
6029
  "${variationId}", "${contentId}", ${isHydrationTarget}
5941
6030
  )`;
5942
- var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
6031
+ var _tmpl$12 = /* @__PURE__ */ template(`<script>`);
5943
6032
  function InlinedScript(props) {
5944
6033
  return (() => {
5945
- const _el$ = _tmpl$14();
6034
+ const _el$ = _tmpl$12();
5946
6035
  effect((_p$) => {
5947
6036
  const _v$ = props.scriptStr, _v$2 = props.id || "";
5948
6037
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -6444,7 +6533,7 @@ var getInteractionPropertiesForEvent = (event) => {
6444
6533
  };
6445
6534
 
6446
6535
  // src/constants/sdk-version.ts
6447
- var SDK_VERSION = "0.12.3";
6536
+ var SDK_VERSION = "0.12.5";
6448
6537
 
6449
6538
  // src/functions/register.ts
6450
6539
  var registry = {};
@@ -7131,6 +7220,9 @@ function ContentComponent(props) {
7131
7220
  get contentWrapperProps() {
7132
7221
  return props.contentWrapperProps;
7133
7222
  },
7223
+ get linkComponent() {
7224
+ return props.linkComponent;
7225
+ },
7134
7226
  get trustedHosts() {
7135
7227
  return props.trustedHosts;
7136
7228
  }
@@ -7173,6 +7265,9 @@ function ContentComponent(props) {
7173
7265
  },
7174
7266
  get registeredComponents() {
7175
7267
  return registeredComponents();
7268
+ },
7269
+ get linkComponent() {
7270
+ return props.linkComponent;
7176
7271
  }
7177
7272
  })];
7178
7273
  }
@@ -7266,6 +7361,9 @@ function ContentVariants(props) {
7266
7361
  get customComponents() {
7267
7362
  return props.customComponents;
7268
7363
  },
7364
+ get linkComponent() {
7365
+ return props.linkComponent;
7366
+ },
7269
7367
  get canTrack() {
7270
7368
  return props.canTrack;
7271
7369
  },
@@ -7323,6 +7421,9 @@ function ContentVariants(props) {
7323
7421
  get customComponents() {
7324
7422
  return props.customComponents;
7325
7423
  },
7424
+ get linkComponent() {
7425
+ return props.linkComponent;
7426
+ },
7326
7427
  get canTrack() {
7327
7428
  return props.canTrack;
7328
7429
  },
@@ -7382,11 +7483,11 @@ var fetchSymbolContent = async ({
7382
7483
  };
7383
7484
 
7384
7485
  // src/blocks/symbol/symbol.tsx
7385
- var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
7486
+ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
7386
7487
  function Symbol2(props) {
7387
7488
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
7388
7489
  function className() {
7389
- 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(" ");
7490
+ 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(" ");
7390
7491
  }
7391
7492
  function setContent() {
7392
7493
  if (contentToUse())
@@ -7408,7 +7509,7 @@ function Symbol2(props) {
7408
7509
  }
7409
7510
  createEffect(on(() => [props.symbol], onUpdateFn_0));
7410
7511
  return (() => {
7411
- const _el$ = _tmpl$15();
7512
+ const _el$ = _tmpl$13();
7412
7513
  spread(_el$, mergeProps({
7413
7514
  get ["class"]() {
7414
7515
  return className();
@@ -7443,6 +7544,9 @@ function Symbol2(props) {
7443
7544
  },
7444
7545
  get content() {
7445
7546
  return contentToUse();
7547
+ },
7548
+ get linkComponent() {
7549
+ return props.builderLinkComponent;
7446
7550
  }
7447
7551
  }));
7448
7552
  return _el$;