@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/dev.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
  }
@@ -91,9 +146,6 @@ function isBrowser() {
91
146
  return typeof window !== "undefined" && typeof document !== "undefined";
92
147
  }
93
148
 
94
- // src/constants/target.ts
95
- var TARGET = "solid";
96
-
97
149
  // src/functions/is-iframe.ts
98
150
  function isIframe() {
99
151
  return isBrowser() && window.self !== window.top;
@@ -3381,8 +3433,33 @@ theFunction();
3381
3433
  }
3382
3434
  };
3383
3435
 
3436
+ // src/helpers/nullable.ts
3437
+ var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
3438
+
3439
+ // src/functions/is-node-runtime.ts
3440
+ function isNodeRuntime() {
3441
+ return typeof process !== "undefined" && checkIsDefined(process?.versions?.node);
3442
+ }
3443
+
3444
+ // src/functions/evaluate/should-force-browser-runtime-in-node.ts
3445
+ var shouldForceBrowserRuntimeInNode = () => {
3446
+ if (!isNodeRuntime())
3447
+ return false;
3448
+ const isArm64 = process.arch === "arm64";
3449
+ const isNode20 = process.version.startsWith("v20");
3450
+ const hasNoNodeSnapshotNodeOption = process.env.NODE_OPTIONS?.includes("--no-node-snapshot");
3451
+ if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
3452
+ logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
3453
+ 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.
3454
+ See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
3455
+ `);
3456
+ return true;
3457
+ }
3458
+ return false;
3459
+ };
3460
+
3384
3461
  // src/functions/evaluate/choose-eval.ts
3385
- var chooseBrowserOrServerEval = (args) => isBrowser() ? runInBrowser(args) : runInEdge(args);
3462
+ var chooseBrowserOrServerEval = (args) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInEdge(args);
3386
3463
 
3387
3464
  // src/functions/evaluate/evaluate.ts
3388
3465
  function evaluate({
@@ -3601,9 +3678,6 @@ var getSizesForBreakpoints = ({
3601
3678
  // src/functions/camel-to-kebab-case.ts
3602
3679
  var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
3603
3680
 
3604
- // src/helpers/nullable.ts
3605
- var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
3606
-
3607
3681
  // src/helpers/css.ts
3608
3682
  var convertStyleMapToCSSArray = (style) => {
3609
3683
  const cssProps = Object.entries(style).map(([key, value]) => {
@@ -3632,10 +3706,10 @@ var createCssClass = ({
3632
3706
  return cssClass;
3633
3707
  }
3634
3708
  };
3635
- var _tmpl$3 = /* @__PURE__ */ template(`<style>`);
3709
+ var _tmpl$ = /* @__PURE__ */ template(`<style>`);
3636
3710
  function InlinedStyles(props) {
3637
3711
  return (() => {
3638
- const _el$ = _tmpl$3();
3712
+ const _el$ = _tmpl$();
3639
3713
  effect((_p$) => {
3640
3714
  const _v$ = props.styles, _v$2 = props.id;
3641
3715
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -3761,6 +3835,38 @@ function getBlockActions(options) {
3761
3835
  return obj;
3762
3836
  }
3763
3837
 
3838
+ // src/functions/transform-style-property.ts
3839
+ function transformStyleProperty({
3840
+ style
3841
+ }) {
3842
+ return style;
3843
+ }
3844
+
3845
+ // src/functions/get-style.ts
3846
+ var getStyle = ({
3847
+ block,
3848
+ context
3849
+ }) => {
3850
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
3851
+ style: block.style || {},
3852
+ context,
3853
+ block
3854
+ }));
3855
+ };
3856
+ function mapStyleObjToStrIfNeeded(style) {
3857
+ switch (TARGET) {
3858
+ case "svelte":
3859
+ case "vue":
3860
+ case "solid":
3861
+ return convertStyleMapToCSSArray(style).join(" ");
3862
+ case "qwik":
3863
+ case "reactNative":
3864
+ case "react":
3865
+ case "rsc":
3866
+ return style;
3867
+ }
3868
+ }
3869
+
3764
3870
  // src/functions/transform-block-properties.ts
3765
3871
  function transformBlockProperties({
3766
3872
  properties
@@ -3782,8 +3888,11 @@ function getBlockProperties({
3782
3888
  ...extractRelevantRootBlockProperties(block),
3783
3889
  ...block.properties,
3784
3890
  "builder-id": block.id,
3785
- style: block.style ? getStyleAttribute(block.style) : void 0,
3786
- class: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
3891
+ style: getStyle({
3892
+ block,
3893
+ context
3894
+ }),
3895
+ [getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
3787
3896
  };
3788
3897
  return transformBlockProperties({
3789
3898
  properties,
@@ -3791,69 +3900,6 @@ function getBlockProperties({
3791
3900
  block
3792
3901
  });
3793
3902
  }
3794
- function getStyleAttribute(style) {
3795
- switch (TARGET) {
3796
- case "svelte":
3797
- case "vue":
3798
- case "solid":
3799
- return convertStyleMapToCSSArray(style).join(" ");
3800
- case "qwik":
3801
- case "reactNative":
3802
- case "react":
3803
- case "rsc":
3804
- return style;
3805
- }
3806
- }
3807
-
3808
- // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
3809
- var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
3810
- var isEmptyElement = (tagName) => {
3811
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
3812
- };
3813
-
3814
- // src/components/dynamic-renderer/dynamic-renderer.tsx
3815
- function DynamicRenderer(props) {
3816
- return createComponent(Show, {
3817
- get fallback() {
3818
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
3819
- get component() {
3820
- return props.TagName;
3821
- }
3822
- }));
3823
- },
3824
- get when() {
3825
- return !isEmptyElement(props.TagName);
3826
- },
3827
- get children() {
3828
- return createComponent(Show, {
3829
- get fallback() {
3830
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
3831
- get component() {
3832
- return props.TagName;
3833
- },
3834
- get children() {
3835
- return props.children;
3836
- }
3837
- }));
3838
- },
3839
- get when() {
3840
- return typeof props.TagName === "string";
3841
- },
3842
- get children() {
3843
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
3844
- get component() {
3845
- return props.TagName;
3846
- },
3847
- get children() {
3848
- return props.children;
3849
- }
3850
- }));
3851
- }
3852
- });
3853
- }
3854
- });
3855
- }
3856
- var dynamic_renderer_default = DynamicRenderer;
3857
3903
 
3858
3904
  // src/components/block/components/block-wrapper.tsx
3859
3905
  function BlockWrapper(props) {
@@ -3956,6 +4002,7 @@ function ComponentRef(props) {
3956
4002
  builderBlock: props.builderBlock,
3957
4003
  context: props.context,
3958
4004
  componentRef: props.componentRef,
4005
+ linkComponent: props.linkComponent,
3959
4006
  includeBlockProps: props.includeBlockProps,
3960
4007
  isInteractive: props.isInteractive,
3961
4008
  contextValue: props.context
@@ -3980,6 +4027,9 @@ function ComponentRef(props) {
3980
4027
  },
3981
4028
  get registeredComponents() {
3982
4029
  return props.registeredComponents;
4030
+ },
4031
+ get linkComponent() {
4032
+ return props.linkComponent;
3983
4033
  }
3984
4034
  });
3985
4035
  }
@@ -4006,6 +4056,9 @@ function RepeatedBlock(props) {
4006
4056
  },
4007
4057
  get registeredComponents() {
4008
4058
  return props.registeredComponents;
4059
+ },
4060
+ get linkComponent() {
4061
+ return props.linkComponent;
4009
4062
  }
4010
4063
  });
4011
4064
  }
@@ -4040,6 +4093,10 @@ function Block(props) {
4040
4093
  });
4041
4094
  }
4042
4095
  function Tag() {
4096
+ const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
4097
+ if (shouldUseLink) {
4098
+ return props.linkComponent || "a";
4099
+ }
4043
4100
  return props.block.tagName || "div";
4044
4101
  }
4045
4102
  function canShowBlock() {
@@ -4063,11 +4120,15 @@ function Block(props) {
4063
4120
  componentOptions: {
4064
4121
  ...getBlockComponentOptions(processedBlock()),
4065
4122
  builderContext: props.context,
4123
+ ...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
4124
+ builderLinkComponent: props.linkComponent
4125
+ } : {},
4066
4126
  ...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
4067
4127
  builderComponents: props.registeredComponents
4068
4128
  } : {}
4069
4129
  },
4070
4130
  context: childrenContext(),
4131
+ linkComponent: props.linkComponent,
4071
4132
  registeredComponents: props.registeredComponents,
4072
4133
  builderBlock: processedBlock(),
4073
4134
  includeBlockProps: blockComponent()?.noWrap === true,
@@ -4104,6 +4165,9 @@ function Block(props) {
4104
4165
  get registeredComponents() {
4105
4166
  return componentRefProps().registeredComponents;
4106
4167
  },
4168
+ get linkComponent() {
4169
+ return componentRefProps().linkComponent;
4170
+ },
4107
4171
  get builderBlock() {
4108
4172
  return componentRefProps().builderBlock;
4109
4173
  },
@@ -4137,6 +4201,9 @@ function Block(props) {
4137
4201
  },
4138
4202
  get registeredComponents() {
4139
4203
  return props.registeredComponents;
4204
+ },
4205
+ get linkComponent() {
4206
+ return props.linkComponent;
4140
4207
  }
4141
4208
  });
4142
4209
  }
@@ -4156,6 +4223,9 @@ function Block(props) {
4156
4223
  get context() {
4157
4224
  return props.context;
4158
4225
  },
4226
+ get linkComponent() {
4227
+ return props.linkComponent;
4228
+ },
4159
4229
  get children() {
4160
4230
  return [createComponent(component_ref_default, {
4161
4231
  get componentRef() {
@@ -4173,6 +4243,9 @@ function Block(props) {
4173
4243
  get registeredComponents() {
4174
4244
  return componentRefProps().registeredComponents;
4175
4245
  },
4246
+ get linkComponent() {
4247
+ return componentRefProps().linkComponent;
4248
+ },
4176
4249
  get builderBlock() {
4177
4250
  return componentRefProps().builderBlock;
4178
4251
  },
@@ -4198,6 +4271,9 @@ function Block(props) {
4198
4271
  },
4199
4272
  get registeredComponents() {
4200
4273
  return props.registeredComponents;
4274
+ },
4275
+ get linkComponent() {
4276
+ return props.linkComponent;
4201
4277
  }
4202
4278
  });
4203
4279
  }
@@ -4310,6 +4386,9 @@ function Blocks(props) {
4310
4386
  return block.id;
4311
4387
  },
4312
4388
  block,
4389
+ get linkComponent() {
4390
+ return props.linkComponent;
4391
+ },
4313
4392
  get context() {
4314
4393
  return props.context || builderContext;
4315
4394
  },
@@ -4327,7 +4406,7 @@ function Blocks(props) {
4327
4406
  var blocks_default = Blocks;
4328
4407
 
4329
4408
  // src/blocks/columns/columns.tsx
4330
- var _tmpl$4 = /* @__PURE__ */ template(`<div>`);
4409
+ var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
4331
4410
  function Columns(props) {
4332
4411
  const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
4333
4412
  const [cols, setCols] = createSignal(props.columns || []);
@@ -4368,7 +4447,13 @@ function Columns(props) {
4368
4447
  const mobileWidth = "100%";
4369
4448
  const mobileMarginLeft = 0;
4370
4449
  const marginLeftKey = "margin-left";
4450
+ const sharedStyles = {
4451
+ display: "flex",
4452
+ flexDirection: "column",
4453
+ alignItems: "stretch"
4454
+ };
4371
4455
  return {
4456
+ ...sharedStyles,
4372
4457
  width,
4373
4458
  [marginLeftKey]: gutterPixels,
4374
4459
  "--column-width-mobile": getMobileStyle({
@@ -4421,7 +4506,7 @@ function Columns(props) {
4421
4506
  `;
4422
4507
  }
4423
4508
  return (() => {
4424
- const _el$ = _tmpl$4();
4509
+ const _el$ = _tmpl$2();
4425
4510
  spread(_el$, mergeProps({
4426
4511
  get ["class"]() {
4427
4512
  return `builder-columns ${props.builderBlock.id}-breakpoints ` + css({
@@ -4449,52 +4534,56 @@ function Columns(props) {
4449
4534
  },
4450
4535
  children: (column, _index) => {
4451
4536
  const index = _index();
4452
- return (() => {
4453
- const _el$2 = _tmpl$4();
4454
- spread(_el$2, mergeProps({
4455
- get ["class"]() {
4456
- return "builder-column " + css({
4457
- display: "flex",
4458
- flexDirection: "column",
4459
- alignItems: "stretch"
4460
- });
4461
- },
4462
- get style() {
4463
- return columnCssVars(index);
4464
- }
4465
- }, {}, {
4466
- "key": index
4467
- }), false, true);
4468
- insert(_el$2, createComponent(blocks_default, {
4469
- path: `component.options.columns.${index}.blocks`,
4470
- get parent() {
4471
- return props.builderBlock.id;
4472
- },
4473
- styleProp: {
4474
- flexGrow: "1"
4475
- },
4476
- get context() {
4477
- return props.builderContext;
4478
- },
4479
- get registeredComponents() {
4480
- return props.builderComponents;
4481
- },
4482
- get blocks() {
4483
- return column.blocks;
4484
- }
4485
- }));
4486
- return _el$2;
4487
- })();
4537
+ return createComponent(dynamic_renderer_default, {
4538
+ key: index,
4539
+ get TagName() {
4540
+ return column.link ? props.builderLinkComponent || "a" : "div";
4541
+ },
4542
+ actionAttributes: {},
4543
+ get attributes() {
4544
+ return {
4545
+ ...{},
4546
+ ...column.link ? {
4547
+ href: column.link
4548
+ } : {},
4549
+ [getClassPropName()]: "builder-column",
4550
+ style: mapStyleObjToStrIfNeeded(columnCssVars(index))
4551
+ };
4552
+ },
4553
+ get children() {
4554
+ return createComponent(blocks_default, {
4555
+ path: `component.options.columns.${index}.blocks`,
4556
+ get parent() {
4557
+ return props.builderBlock.id;
4558
+ },
4559
+ styleProp: {
4560
+ flexGrow: "1"
4561
+ },
4562
+ get context() {
4563
+ return props.builderContext;
4564
+ },
4565
+ get registeredComponents() {
4566
+ return props.builderComponents;
4567
+ },
4568
+ get linkComponent() {
4569
+ return props.builderLinkComponent;
4570
+ },
4571
+ get blocks() {
4572
+ return column.blocks;
4573
+ }
4574
+ });
4575
+ }
4576
+ });
4488
4577
  }
4489
4578
  }), null);
4490
4579
  return _el$;
4491
4580
  })();
4492
4581
  }
4493
4582
  var columns_default = Columns;
4494
- var _tmpl$5 = /* @__PURE__ */ template(`<span>`);
4583
+ var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
4495
4584
  function FragmentComponent(props) {
4496
4585
  return (() => {
4497
- const _el$ = _tmpl$5();
4586
+ const _el$ = _tmpl$3();
4498
4587
  insert(_el$, () => props.children);
4499
4588
  return _el$;
4500
4589
  })();
@@ -4549,7 +4638,7 @@ function getSrcSet(url) {
4549
4638
  }
4550
4639
 
4551
4640
  // src/blocks/image/image.tsx
4552
- var _tmpl$6 = /* @__PURE__ */ template(`<source type=image/webp>`);
4641
+ var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
4553
4642
  var _tmpl$22 = /* @__PURE__ */ template(`<picture><img loading=lazy>`);
4554
4643
  var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
4555
4644
  function Image(props) {
@@ -4596,7 +4685,7 @@ function Image(props) {
4596
4685
  return webpSrcSet();
4597
4686
  },
4598
4687
  get children() {
4599
- const _el$2 = _tmpl$6();
4688
+ const _el$2 = _tmpl$4();
4600
4689
  effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
4601
4690
  return _el$2;
4602
4691
  }
@@ -4678,10 +4767,10 @@ function Image(props) {
4678
4767
  })];
4679
4768
  }
4680
4769
  var image_default = Image;
4681
- var _tmpl$7 = /* @__PURE__ */ template(`<section>`);
4770
+ var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
4682
4771
  function SectionComponent(props) {
4683
4772
  return (() => {
4684
- const _el$ = _tmpl$7();
4773
+ const _el$ = _tmpl$5();
4685
4774
  spread(_el$, mergeProps({}, () => props.attributes, {
4686
4775
  get style() {
4687
4776
  return {
@@ -5175,7 +5264,7 @@ var componentInfo3 = {
5175
5264
  advanced: true
5176
5265
  }]
5177
5266
  };
5178
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
5267
+ var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
5179
5268
  function CustomCode(props) {
5180
5269
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
5181
5270
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -5210,7 +5299,7 @@ function CustomCode(props) {
5210
5299
  }
5211
5300
  });
5212
5301
  return (() => {
5213
- const _el$ = _tmpl$8();
5302
+ const _el$ = _tmpl$6();
5214
5303
  const _ref$ = elementRef;
5215
5304
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
5216
5305
  effect((_p$) => {
@@ -5270,7 +5359,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
5270
5359
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
5271
5360
 
5272
5361
  // src/blocks/embed/embed.tsx
5273
- var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-embed>`);
5362
+ var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-embed>`);
5274
5363
  function Embed(props) {
5275
5364
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
5276
5365
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -5306,7 +5395,7 @@ function Embed(props) {
5306
5395
  }
5307
5396
  createEffect(on(() => [elem, ranInitFn()], onUpdateFn_0));
5308
5397
  return (() => {
5309
- const _el$ = _tmpl$9();
5398
+ const _el$ = _tmpl$7();
5310
5399
  const _ref$ = elem;
5311
5400
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
5312
5401
  effect(() => _el$.innerHTML = props.content);
@@ -5463,10 +5552,10 @@ var componentInfo7 = {
5463
5552
  noWrap: true,
5464
5553
  static: true
5465
5554
  };
5466
- var _tmpl$10 = /* @__PURE__ */ template(`<img>`);
5555
+ var _tmpl$8 = /* @__PURE__ */ template(`<img>`);
5467
5556
  function ImgComponent(props) {
5468
5557
  return (() => {
5469
- const _el$ = _tmpl$10();
5558
+ const _el$ = _tmpl$8();
5470
5559
  spread(_el$, mergeProps({
5471
5560
  get style() {
5472
5561
  return {
@@ -5546,10 +5635,10 @@ var componentInfo9 = {
5546
5635
  defaultValue: "children"
5547
5636
  }]
5548
5637
  };
5549
- var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
5638
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
5550
5639
  function Slot(props) {
5551
5640
  return (() => {
5552
- const _el$ = _tmpl$11();
5641
+ const _el$ = _tmpl$9();
5553
5642
  _el$.style.setProperty("pointer-events", "auto");
5554
5643
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
5555
5644
  "builder-slot": props.name
@@ -5629,10 +5718,10 @@ var componentInfo11 = {
5629
5718
  textAlign: "center"
5630
5719
  }
5631
5720
  };
5632
- var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
5721
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
5633
5722
  function Text(props) {
5634
5723
  return (() => {
5635
- const _el$ = _tmpl$12();
5724
+ const _el$ = _tmpl$10();
5636
5725
  _el$.style.setProperty("outline", "none");
5637
5726
  effect(() => _el$.innerHTML = props.text?.toString() || "");
5638
5727
  return _el$;
@@ -5723,7 +5812,7 @@ var componentInfo12 = {
5723
5812
  advanced: true
5724
5813
  }]
5725
5814
  };
5726
- var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
5815
+ var _tmpl$11 = /* @__PURE__ */ template(`<source type=video/mp4>`);
5727
5816
  var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
5728
5817
  var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
5729
5818
  function Video(props) {
@@ -5786,7 +5875,7 @@ function Video(props) {
5786
5875
  return !props.lazyLoad;
5787
5876
  },
5788
5877
  get children() {
5789
- const _el$3 = _tmpl$13();
5878
+ const _el$3 = _tmpl$11();
5790
5879
  effect(() => setAttribute(_el$3, "src", props.video));
5791
5880
  return _el$3;
5792
5881
  }
@@ -5948,10 +6037,10 @@ var getUpdateVariantVisibilityScript = ({
5948
6037
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
5949
6038
  "${variationId}", "${contentId}", ${isHydrationTarget}
5950
6039
  )`;
5951
- var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
6040
+ var _tmpl$12 = /* @__PURE__ */ template(`<script>`);
5952
6041
  function InlinedScript(props) {
5953
6042
  return (() => {
5954
- const _el$ = _tmpl$14();
6043
+ const _el$ = _tmpl$12();
5955
6044
  effect((_p$) => {
5956
6045
  const _v$ = props.scriptStr, _v$2 = props.id || "";
5957
6046
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -6458,7 +6547,7 @@ var getInteractionPropertiesForEvent = (event) => {
6458
6547
  };
6459
6548
 
6460
6549
  // src/constants/sdk-version.ts
6461
- var SDK_VERSION = "0.12.3";
6550
+ var SDK_VERSION = "0.12.5";
6462
6551
 
6463
6552
  // src/functions/register.ts
6464
6553
  var registry = {};
@@ -7147,6 +7236,9 @@ function ContentComponent(props) {
7147
7236
  get contentWrapperProps() {
7148
7237
  return props.contentWrapperProps;
7149
7238
  },
7239
+ get linkComponent() {
7240
+ return props.linkComponent;
7241
+ },
7150
7242
  get trustedHosts() {
7151
7243
  return props.trustedHosts;
7152
7244
  }
@@ -7189,6 +7281,9 @@ function ContentComponent(props) {
7189
7281
  },
7190
7282
  get registeredComponents() {
7191
7283
  return registeredComponents();
7284
+ },
7285
+ get linkComponent() {
7286
+ return props.linkComponent;
7192
7287
  }
7193
7288
  })];
7194
7289
  }
@@ -7282,6 +7377,9 @@ function ContentVariants(props) {
7282
7377
  get customComponents() {
7283
7378
  return props.customComponents;
7284
7379
  },
7380
+ get linkComponent() {
7381
+ return props.linkComponent;
7382
+ },
7285
7383
  get canTrack() {
7286
7384
  return props.canTrack;
7287
7385
  },
@@ -7339,6 +7437,9 @@ function ContentVariants(props) {
7339
7437
  get customComponents() {
7340
7438
  return props.customComponents;
7341
7439
  },
7440
+ get linkComponent() {
7441
+ return props.linkComponent;
7442
+ },
7342
7443
  get canTrack() {
7343
7444
  return props.canTrack;
7344
7445
  },
@@ -7398,11 +7499,11 @@ var fetchSymbolContent = async ({
7398
7499
  };
7399
7500
 
7400
7501
  // src/blocks/symbol/symbol.tsx
7401
- var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
7502
+ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
7402
7503
  function Symbol2(props) {
7403
7504
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
7404
7505
  function className() {
7405
- 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(" ");
7506
+ 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(" ");
7406
7507
  }
7407
7508
  function setContent() {
7408
7509
  if (contentToUse())
@@ -7424,7 +7525,7 @@ function Symbol2(props) {
7424
7525
  }
7425
7526
  createEffect(on(() => [props.symbol], onUpdateFn_0));
7426
7527
  return (() => {
7427
- const _el$ = _tmpl$15();
7528
+ const _el$ = _tmpl$13();
7428
7529
  spread(_el$, mergeProps({
7429
7530
  get ["class"]() {
7430
7531
  return className();
@@ -7459,6 +7560,9 @@ function Symbol2(props) {
7459
7560
  },
7460
7561
  get content() {
7461
7562
  return contentToUse();
7563
+ },
7564
+ get linkComponent() {
7565
+ return props.builderLinkComponent;
7462
7566
  }
7463
7567
  }));
7464
7568
  return _el$;