@builder.io/sdk-solid 0.12.2 → 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.
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,44 +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>`);
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 props.attributes.class + " " + css({
22
- all: "unset"
23
- });
24
- }
25
- }, {}, () => props.attributes, {
26
- get style() {
27
- return props.attributes.style;
28
- }
29
- }), false, true);
30
- insert(_el$2, () => props.text);
31
- return _el$2;
32
- })();
23
+ return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
24
+ get component() {
25
+ return props.TagName;
26
+ }
27
+ }));
33
28
  },
34
29
  get when() {
35
- return props.link;
30
+ return !isEmptyElement(props.TagName);
36
31
  },
37
32
  get children() {
38
- const _el$ = _tmpl$();
39
- spread(_el$, mergeProps({}, () => props.attributes, {
40
- get href() {
41
- 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
+ }));
42
43
  },
43
- get target() {
44
- return props.openLinkInNewTab ? "_blank" : void 0;
44
+ get when() {
45
+ return typeof props.TagName === "string";
45
46
  },
46
- "role": "button"
47
- }), false, true);
48
- insert(_el$, () => props.text);
49
- 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;
50
103
  }
51
104
  });
52
105
  }
@@ -92,9 +145,6 @@ function isBrowser() {
92
145
  return typeof window !== "undefined" && typeof document !== "undefined";
93
146
  }
94
147
 
95
- // src/constants/target.ts
96
- var TARGET = "solid";
97
-
98
148
  // src/functions/is-iframe.ts
99
149
  function isIframe() {
100
150
  return isBrowser() && window.self !== window.top;
@@ -3629,10 +3679,10 @@ var createCssClass = ({
3629
3679
  return cssClass;
3630
3680
  }
3631
3681
  };
3632
- var _tmpl$3 = /* @__PURE__ */ template(`<style>`);
3682
+ var _tmpl$ = /* @__PURE__ */ template(`<style>`);
3633
3683
  function InlinedStyles(props) {
3634
3684
  return (() => {
3635
- const _el$ = _tmpl$3();
3685
+ const _el$ = _tmpl$();
3636
3686
  effect((_p$) => {
3637
3687
  const _v$ = props.styles, _v$2 = props.id;
3638
3688
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -3666,7 +3716,7 @@ function BlockStyles(props) {
3666
3716
  }
3667
3717
  return true;
3668
3718
  }
3669
- function css5() {
3719
+ function css4() {
3670
3720
  const processedBlock = getProcessedBlock({
3671
3721
  block: props.block,
3672
3722
  localState: props.context.localState,
@@ -3703,12 +3753,12 @@ function BlockStyles(props) {
3703
3753
  }
3704
3754
  return createComponent(Show, {
3705
3755
  get when() {
3706
- return memo(() => !!(TARGET !== "reactNative" && css5()))() && canShowBlock();
3756
+ return memo(() => !!(TARGET !== "reactNative" && css4()))() && canShowBlock();
3707
3757
  },
3708
3758
  get children() {
3709
3759
  return createComponent(inlined_styles_default, {
3710
3760
  get styles() {
3711
- return css5();
3761
+ return css4();
3712
3762
  }
3713
3763
  });
3714
3764
  }
@@ -3758,6 +3808,38 @@ function getBlockActions(options) {
3758
3808
  return obj;
3759
3809
  }
3760
3810
 
3811
+ // src/functions/transform-style-property.ts
3812
+ function transformStyleProperty({
3813
+ style
3814
+ }) {
3815
+ return style;
3816
+ }
3817
+
3818
+ // src/functions/get-style.ts
3819
+ var getStyle = ({
3820
+ block,
3821
+ context
3822
+ }) => {
3823
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
3824
+ style: block.style || {},
3825
+ context,
3826
+ block
3827
+ }));
3828
+ };
3829
+ function mapStyleObjToStrIfNeeded(style) {
3830
+ switch (TARGET) {
3831
+ case "svelte":
3832
+ case "vue":
3833
+ case "solid":
3834
+ return convertStyleMapToCSSArray(style).join(" ");
3835
+ case "qwik":
3836
+ case "reactNative":
3837
+ case "react":
3838
+ case "rsc":
3839
+ return style;
3840
+ }
3841
+ }
3842
+
3761
3843
  // src/functions/transform-block-properties.ts
3762
3844
  function transformBlockProperties({
3763
3845
  properties
@@ -3779,8 +3861,11 @@ function getBlockProperties({
3779
3861
  ...extractRelevantRootBlockProperties(block),
3780
3862
  ...block.properties,
3781
3863
  "builder-id": block.id,
3782
- style: block.style ? getStyleAttribute(block.style) : void 0,
3783
- class: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
3864
+ style: getStyle({
3865
+ block,
3866
+ context
3867
+ }),
3868
+ [getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
3784
3869
  };
3785
3870
  return transformBlockProperties({
3786
3871
  properties,
@@ -3788,69 +3873,6 @@ function getBlockProperties({
3788
3873
  block
3789
3874
  });
3790
3875
  }
3791
- function getStyleAttribute(style) {
3792
- switch (TARGET) {
3793
- case "svelte":
3794
- case "vue":
3795
- case "solid":
3796
- return convertStyleMapToCSSArray(style).join(" ");
3797
- case "qwik":
3798
- case "reactNative":
3799
- case "react":
3800
- case "rsc":
3801
- return style;
3802
- }
3803
- }
3804
-
3805
- // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
3806
- var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
3807
- var isEmptyElement = (tagName) => {
3808
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
3809
- };
3810
-
3811
- // src/components/dynamic-renderer/dynamic-renderer.tsx
3812
- function DynamicRenderer(props) {
3813
- return createComponent(Show, {
3814
- get fallback() {
3815
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
3816
- get component() {
3817
- return props.TagName;
3818
- }
3819
- }));
3820
- },
3821
- get when() {
3822
- return !isEmptyElement(props.TagName);
3823
- },
3824
- get children() {
3825
- return createComponent(Show, {
3826
- get fallback() {
3827
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
3828
- get component() {
3829
- return props.TagName;
3830
- },
3831
- get children() {
3832
- return props.children;
3833
- }
3834
- }));
3835
- },
3836
- get when() {
3837
- return typeof props.TagName === "string";
3838
- },
3839
- get children() {
3840
- return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
3841
- get component() {
3842
- return props.TagName;
3843
- },
3844
- get children() {
3845
- return props.children;
3846
- }
3847
- }));
3848
- }
3849
- });
3850
- }
3851
- });
3852
- }
3853
- var dynamic_renderer_default = DynamicRenderer;
3854
3876
 
3855
3877
  // src/components/block/components/block-wrapper.tsx
3856
3878
  function BlockWrapper(props) {
@@ -3953,6 +3975,7 @@ function ComponentRef(props) {
3953
3975
  builderBlock: props.builderBlock,
3954
3976
  context: props.context,
3955
3977
  componentRef: props.componentRef,
3978
+ linkComponent: props.linkComponent,
3956
3979
  includeBlockProps: props.includeBlockProps,
3957
3980
  isInteractive: props.isInteractive,
3958
3981
  contextValue: props.context
@@ -3977,6 +4000,9 @@ function ComponentRef(props) {
3977
4000
  },
3978
4001
  get registeredComponents() {
3979
4002
  return props.registeredComponents;
4003
+ },
4004
+ get linkComponent() {
4005
+ return props.linkComponent;
3980
4006
  }
3981
4007
  });
3982
4008
  }
@@ -4003,6 +4029,9 @@ function RepeatedBlock(props) {
4003
4029
  },
4004
4030
  get registeredComponents() {
4005
4031
  return props.registeredComponents;
4032
+ },
4033
+ get linkComponent() {
4034
+ return props.linkComponent;
4006
4035
  }
4007
4036
  });
4008
4037
  }
@@ -4037,6 +4066,10 @@ function Block(props) {
4037
4066
  });
4038
4067
  }
4039
4068
  function Tag() {
4069
+ const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
4070
+ if (shouldUseLink) {
4071
+ return props.linkComponent || "a";
4072
+ }
4040
4073
  return props.block.tagName || "div";
4041
4074
  }
4042
4075
  function canShowBlock() {
@@ -4060,11 +4093,15 @@ function Block(props) {
4060
4093
  componentOptions: {
4061
4094
  ...getBlockComponentOptions(processedBlock()),
4062
4095
  builderContext: props.context,
4096
+ ...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
4097
+ builderLinkComponent: props.linkComponent
4098
+ } : {},
4063
4099
  ...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
4064
4100
  builderComponents: props.registeredComponents
4065
4101
  } : {}
4066
4102
  },
4067
4103
  context: childrenContext(),
4104
+ linkComponent: props.linkComponent,
4068
4105
  registeredComponents: props.registeredComponents,
4069
4106
  builderBlock: processedBlock(),
4070
4107
  includeBlockProps: blockComponent()?.noWrap === true,
@@ -4101,6 +4138,9 @@ function Block(props) {
4101
4138
  get registeredComponents() {
4102
4139
  return componentRefProps().registeredComponents;
4103
4140
  },
4141
+ get linkComponent() {
4142
+ return componentRefProps().linkComponent;
4143
+ },
4104
4144
  get builderBlock() {
4105
4145
  return componentRefProps().builderBlock;
4106
4146
  },
@@ -4134,6 +4174,9 @@ function Block(props) {
4134
4174
  },
4135
4175
  get registeredComponents() {
4136
4176
  return props.registeredComponents;
4177
+ },
4178
+ get linkComponent() {
4179
+ return props.linkComponent;
4137
4180
  }
4138
4181
  });
4139
4182
  }
@@ -4153,6 +4196,9 @@ function Block(props) {
4153
4196
  get context() {
4154
4197
  return props.context;
4155
4198
  },
4199
+ get linkComponent() {
4200
+ return props.linkComponent;
4201
+ },
4156
4202
  get children() {
4157
4203
  return [createComponent(component_ref_default, {
4158
4204
  get componentRef() {
@@ -4170,6 +4216,9 @@ function Block(props) {
4170
4216
  get registeredComponents() {
4171
4217
  return componentRefProps().registeredComponents;
4172
4218
  },
4219
+ get linkComponent() {
4220
+ return componentRefProps().linkComponent;
4221
+ },
4173
4222
  get builderBlock() {
4174
4223
  return componentRefProps().builderBlock;
4175
4224
  },
@@ -4195,6 +4244,9 @@ function Block(props) {
4195
4244
  },
4196
4245
  get registeredComponents() {
4197
4246
  return props.registeredComponents;
4247
+ },
4248
+ get linkComponent() {
4249
+ return props.linkComponent;
4198
4250
  }
4199
4251
  });
4200
4252
  }
@@ -4307,6 +4359,9 @@ function Blocks(props) {
4307
4359
  return block.id;
4308
4360
  },
4309
4361
  block,
4362
+ get linkComponent() {
4363
+ return props.linkComponent;
4364
+ },
4310
4365
  get context() {
4311
4366
  return props.context || builderContext;
4312
4367
  },
@@ -4324,7 +4379,7 @@ function Blocks(props) {
4324
4379
  var blocks_default = Blocks;
4325
4380
 
4326
4381
  // src/blocks/columns/columns.tsx
4327
- var _tmpl$4 = /* @__PURE__ */ template(`<div>`);
4382
+ var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
4328
4383
  function Columns(props) {
4329
4384
  const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
4330
4385
  const [cols, setCols] = createSignal(props.columns || []);
@@ -4365,7 +4420,13 @@ function Columns(props) {
4365
4420
  const mobileWidth = "100%";
4366
4421
  const mobileMarginLeft = 0;
4367
4422
  const marginLeftKey = "margin-left";
4423
+ const sharedStyles = {
4424
+ display: "flex",
4425
+ flexDirection: "column",
4426
+ alignItems: "stretch"
4427
+ };
4368
4428
  return {
4429
+ ...sharedStyles,
4369
4430
  width,
4370
4431
  [marginLeftKey]: gutterPixels,
4371
4432
  "--column-width-mobile": getMobileStyle({
@@ -4418,7 +4479,7 @@ function Columns(props) {
4418
4479
  `;
4419
4480
  }
4420
4481
  return (() => {
4421
- const _el$ = _tmpl$4();
4482
+ const _el$ = _tmpl$2();
4422
4483
  spread(_el$, mergeProps({
4423
4484
  get ["class"]() {
4424
4485
  return `builder-columns ${props.builderBlock.id}-breakpoints ` + css({
@@ -4446,52 +4507,56 @@ function Columns(props) {
4446
4507
  },
4447
4508
  children: (column, _index) => {
4448
4509
  const index = _index();
4449
- return (() => {
4450
- const _el$2 = _tmpl$4();
4451
- spread(_el$2, mergeProps({
4452
- get ["class"]() {
4453
- return "builder-column " + css({
4454
- display: "flex",
4455
- flexDirection: "column",
4456
- alignItems: "stretch"
4457
- });
4458
- },
4459
- get style() {
4460
- return columnCssVars(index);
4461
- }
4462
- }, {}, {
4463
- "key": index
4464
- }), false, true);
4465
- insert(_el$2, createComponent(blocks_default, {
4466
- path: `component.options.columns.${index}.blocks`,
4467
- get parent() {
4468
- return props.builderBlock.id;
4469
- },
4470
- styleProp: {
4471
- flexGrow: "1"
4472
- },
4473
- get context() {
4474
- return props.builderContext;
4475
- },
4476
- get registeredComponents() {
4477
- return props.builderComponents;
4478
- },
4479
- get blocks() {
4480
- return column.blocks;
4481
- }
4482
- }));
4483
- return _el$2;
4484
- })();
4510
+ return createComponent(dynamic_renderer_default, {
4511
+ key: index,
4512
+ get TagName() {
4513
+ return column.link ? props.builderLinkComponent || "a" : "div";
4514
+ },
4515
+ actionAttributes: {},
4516
+ get attributes() {
4517
+ return {
4518
+ ...{},
4519
+ ...column.link ? {
4520
+ href: column.link
4521
+ } : {},
4522
+ [getClassPropName()]: "builder-column",
4523
+ style: mapStyleObjToStrIfNeeded(columnCssVars(index))
4524
+ };
4525
+ },
4526
+ get children() {
4527
+ return createComponent(blocks_default, {
4528
+ path: `component.options.columns.${index}.blocks`,
4529
+ get parent() {
4530
+ return props.builderBlock.id;
4531
+ },
4532
+ styleProp: {
4533
+ flexGrow: "1"
4534
+ },
4535
+ get context() {
4536
+ return props.builderContext;
4537
+ },
4538
+ get registeredComponents() {
4539
+ return props.builderComponents;
4540
+ },
4541
+ get linkComponent() {
4542
+ return props.builderLinkComponent;
4543
+ },
4544
+ get blocks() {
4545
+ return column.blocks;
4546
+ }
4547
+ });
4548
+ }
4549
+ });
4485
4550
  }
4486
4551
  }), null);
4487
4552
  return _el$;
4488
4553
  })();
4489
4554
  }
4490
4555
  var columns_default = Columns;
4491
- var _tmpl$5 = /* @__PURE__ */ template(`<span>`);
4556
+ var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
4492
4557
  function FragmentComponent(props) {
4493
4558
  return (() => {
4494
- const _el$ = _tmpl$5();
4559
+ const _el$ = _tmpl$3();
4495
4560
  insert(_el$, () => props.children);
4496
4561
  return _el$;
4497
4562
  })();
@@ -4546,7 +4611,7 @@ function getSrcSet(url) {
4546
4611
  }
4547
4612
 
4548
4613
  // src/blocks/image/image.tsx
4549
- var _tmpl$6 = /* @__PURE__ */ template(`<source type=image/webp>`);
4614
+ var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
4550
4615
  var _tmpl$22 = /* @__PURE__ */ template(`<picture><img loading=lazy>`);
4551
4616
  var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
4552
4617
  function Image(props) {
@@ -4592,7 +4657,7 @@ function Image(props) {
4592
4657
  return webpSrcSet();
4593
4658
  },
4594
4659
  get children() {
4595
- const _el$2 = _tmpl$6();
4660
+ const _el$2 = _tmpl$4();
4596
4661
  effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
4597
4662
  return _el$2;
4598
4663
  }
@@ -4674,10 +4739,10 @@ function Image(props) {
4674
4739
  })];
4675
4740
  }
4676
4741
  var image_default = Image;
4677
- var _tmpl$7 = /* @__PURE__ */ template(`<section>`);
4742
+ var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
4678
4743
  function SectionComponent(props) {
4679
4744
  return (() => {
4680
- const _el$ = _tmpl$7();
4745
+ const _el$ = _tmpl$5();
4681
4746
  spread(_el$, mergeProps({}, () => props.attributes, {
4682
4747
  get style() {
4683
4748
  return {
@@ -5171,7 +5236,7 @@ var componentInfo3 = {
5171
5236
  advanced: true
5172
5237
  }]
5173
5238
  };
5174
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
5239
+ var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
5175
5240
  function CustomCode(props) {
5176
5241
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
5177
5242
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -5205,7 +5270,7 @@ function CustomCode(props) {
5205
5270
  }
5206
5271
  });
5207
5272
  return (() => {
5208
- const _el$ = _tmpl$8();
5273
+ const _el$ = _tmpl$6();
5209
5274
  const _ref$ = elementRef;
5210
5275
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
5211
5276
  effect((_p$) => {
@@ -5265,7 +5330,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
5265
5330
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
5266
5331
 
5267
5332
  // src/blocks/embed/embed.tsx
5268
- var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-embed>`);
5333
+ var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-embed>`);
5269
5334
  function Embed(props) {
5270
5335
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
5271
5336
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -5300,7 +5365,7 @@ function Embed(props) {
5300
5365
  }
5301
5366
  createEffect(on(() => [elem, ranInitFn()], onUpdateFn_0));
5302
5367
  return (() => {
5303
- const _el$ = _tmpl$9();
5368
+ const _el$ = _tmpl$7();
5304
5369
  const _ref$ = elem;
5305
5370
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
5306
5371
  effect(() => _el$.innerHTML = props.content);
@@ -5456,10 +5521,10 @@ var componentInfo7 = {
5456
5521
  noWrap: true,
5457
5522
  static: true
5458
5523
  };
5459
- var _tmpl$10 = /* @__PURE__ */ template(`<img>`);
5524
+ var _tmpl$8 = /* @__PURE__ */ template(`<img>`);
5460
5525
  function ImgComponent(props) {
5461
5526
  return (() => {
5462
- const _el$ = _tmpl$10();
5527
+ const _el$ = _tmpl$8();
5463
5528
  spread(_el$, mergeProps({
5464
5529
  get style() {
5465
5530
  return {
@@ -5539,10 +5604,10 @@ var componentInfo9 = {
5539
5604
  defaultValue: "children"
5540
5605
  }]
5541
5606
  };
5542
- var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
5607
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
5543
5608
  function Slot(props) {
5544
5609
  return (() => {
5545
- const _el$ = _tmpl$11();
5610
+ const _el$ = _tmpl$9();
5546
5611
  _el$.style.setProperty("pointer-events", "auto");
5547
5612
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
5548
5613
  "builder-slot": props.name
@@ -5622,10 +5687,10 @@ var componentInfo11 = {
5622
5687
  textAlign: "center"
5623
5688
  }
5624
5689
  };
5625
- var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
5690
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
5626
5691
  function Text(props) {
5627
5692
  return (() => {
5628
- const _el$ = _tmpl$12();
5693
+ const _el$ = _tmpl$10();
5629
5694
  _el$.style.setProperty("outline", "none");
5630
5695
  effect(() => _el$.innerHTML = props.text?.toString() || "");
5631
5696
  return _el$;
@@ -5716,7 +5781,7 @@ var componentInfo12 = {
5716
5781
  advanced: true
5717
5782
  }]
5718
5783
  };
5719
- var _tmpl$13 = /* @__PURE__ */ template(`<source type=video/mp4>`);
5784
+ var _tmpl$11 = /* @__PURE__ */ template(`<source type=video/mp4>`);
5720
5785
  var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
5721
5786
  var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
5722
5787
  function Video(props) {
@@ -5779,7 +5844,7 @@ function Video(props) {
5779
5844
  return !props.lazyLoad;
5780
5845
  },
5781
5846
  get children() {
5782
- const _el$3 = _tmpl$13();
5847
+ const _el$3 = _tmpl$11();
5783
5848
  effect(() => setAttribute(_el$3, "src", props.video));
5784
5849
  return _el$3;
5785
5850
  }
@@ -5941,10 +6006,10 @@ var getUpdateVariantVisibilityScript = ({
5941
6006
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
5942
6007
  "${variationId}", "${contentId}", ${isHydrationTarget}
5943
6008
  )`;
5944
- var _tmpl$14 = /* @__PURE__ */ template(`<script>`);
6009
+ var _tmpl$12 = /* @__PURE__ */ template(`<script>`);
5945
6010
  function InlinedScript(props) {
5946
6011
  return (() => {
5947
- const _el$ = _tmpl$14();
6012
+ const _el$ = _tmpl$12();
5948
6013
  effect((_p$) => {
5949
6014
  const _v$ = props.scriptStr, _v$2 = props.id || "";
5950
6015
  _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
@@ -6446,7 +6511,7 @@ var getInteractionPropertiesForEvent = (event) => {
6446
6511
  };
6447
6512
 
6448
6513
  // src/constants/sdk-version.ts
6449
- var SDK_VERSION = "0.12.2";
6514
+ var SDK_VERSION = "0.12.4";
6450
6515
 
6451
6516
  // src/functions/register.ts
6452
6517
  var registry = {};
@@ -6957,6 +7022,10 @@ ${getFontCss({
6957
7022
  customFonts: props.customFonts
6958
7023
  })}
6959
7024
 
7025
+ .builder-button {
7026
+ all: unset;
7027
+ }
7028
+
6960
7029
  .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
6961
7030
  margin: 0;
6962
7031
  }
@@ -7129,6 +7198,9 @@ function ContentComponent(props) {
7129
7198
  get contentWrapperProps() {
7130
7199
  return props.contentWrapperProps;
7131
7200
  },
7201
+ get linkComponent() {
7202
+ return props.linkComponent;
7203
+ },
7132
7204
  get trustedHosts() {
7133
7205
  return props.trustedHosts;
7134
7206
  }
@@ -7171,6 +7243,9 @@ function ContentComponent(props) {
7171
7243
  },
7172
7244
  get registeredComponents() {
7173
7245
  return registeredComponents();
7246
+ },
7247
+ get linkComponent() {
7248
+ return props.linkComponent;
7174
7249
  }
7175
7250
  })];
7176
7251
  }
@@ -7264,6 +7339,9 @@ function ContentVariants(props) {
7264
7339
  get customComponents() {
7265
7340
  return props.customComponents;
7266
7341
  },
7342
+ get linkComponent() {
7343
+ return props.linkComponent;
7344
+ },
7267
7345
  get canTrack() {
7268
7346
  return props.canTrack;
7269
7347
  },
@@ -7321,6 +7399,9 @@ function ContentVariants(props) {
7321
7399
  get customComponents() {
7322
7400
  return props.customComponents;
7323
7401
  },
7402
+ get linkComponent() {
7403
+ return props.linkComponent;
7404
+ },
7324
7405
  get canTrack() {
7325
7406
  return props.canTrack;
7326
7407
  },
@@ -7380,11 +7461,11 @@ var fetchSymbolContent = async ({
7380
7461
  };
7381
7462
 
7382
7463
  // src/blocks/symbol/symbol.tsx
7383
- var _tmpl$15 = /* @__PURE__ */ template(`<div>`);
7464
+ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
7384
7465
  function Symbol2(props) {
7385
7466
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
7386
7467
  function className() {
7387
- 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(" ");
7468
+ 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(" ");
7388
7469
  }
7389
7470
  function setContent() {
7390
7471
  if (contentToUse())
@@ -7406,7 +7487,7 @@ function Symbol2(props) {
7406
7487
  }
7407
7488
  createEffect(on(() => [props.symbol], onUpdateFn_0));
7408
7489
  return (() => {
7409
- const _el$ = _tmpl$15();
7490
+ const _el$ = _tmpl$13();
7410
7491
  spread(_el$, mergeProps({
7411
7492
  get ["class"]() {
7412
7493
  return className();
@@ -7441,6 +7522,9 @@ function Symbol2(props) {
7441
7522
  },
7442
7523
  get content() {
7443
7524
  return contentToUse();
7525
+ },
7526
+ get linkComponent() {
7527
+ return props.builderLinkComponent;
7444
7528
  }
7445
7529
  }));
7446
7530
  return _el$;