@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.jsx CHANGED
@@ -6,34 +6,84 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
6
6
  throw Error('Dynamic require of "' + x + '" is not supported');
7
7
  });
8
8
 
9
- // src/blocks/button/button.tsx
9
+ // src/components/dynamic-renderer/dynamic-renderer.tsx
10
10
  import { Show } from "solid-js";
11
- function Button(props) {
11
+ import { Dynamic } from "solid-js/web";
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) {
12
21
  return <Show
13
- fallback={<button
14
- class={`builder-button ${props.attributes.class}`}
15
- role="button"
16
- {...{}}
22
+ fallback={<Dynamic
17
23
  {...props.attributes}
18
- style={props.attributes.style}
19
- >{props.text}</button>}
20
- when={props.link}
21
- ><a
22
- {...{}}
24
+ {...props.actionAttributes}
25
+ component={props.TagName}
26
+ />}
27
+ when={!isEmptyElement(props.TagName)}
28
+ ><Show
29
+ fallback={<Dynamic
30
+ {...props.attributes}
31
+ {...props.actionAttributes}
32
+ component={props.TagName}
33
+ >{props.children}</Dynamic>}
34
+ when={typeof props.TagName === "string"}
35
+ ><Dynamic
23
36
  {...props.attributes}
24
- href={props.link}
25
- target={props.openLinkInNewTab ? "_blank" : void 0}
26
- role="button"
27
- >{props.text}</a></Show>;
37
+ {...props.actionAttributes}
38
+ component={props.TagName}
39
+ >{props.children}</Dynamic></Show></Show>;
40
+ }
41
+ var Dynamic_renderer_default = DynamicRenderer;
42
+
43
+ // src/constants/target.ts
44
+ var TARGET = "solid";
45
+
46
+ // src/functions/get-class-prop-name.ts
47
+ var getClassPropName = () => {
48
+ switch (TARGET) {
49
+ case "react":
50
+ case "reactNative":
51
+ case "rsc":
52
+ return "className";
53
+ case "svelte":
54
+ case "vue":
55
+ case "solid":
56
+ case "qwik":
57
+ return "class";
58
+ }
59
+ };
60
+
61
+ // src/blocks/button/button.tsx
62
+ function Button(props) {
63
+ return <Dynamic_renderer_default
64
+ TagName={props.link ? props.builderLinkComponent || "a" : "button"}
65
+ attributes={{
66
+ ...props.attributes,
67
+ [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
68
+ ...props.link ? {
69
+ href: props.link,
70
+ target: props.openLinkInNewTab ? "_blank" : void 0,
71
+ role: "link"
72
+ } : {
73
+ role: "button"
74
+ }
75
+ }}
76
+ actionAttributes={{}}
77
+ >{props.text}</Dynamic_renderer_default>;
28
78
  }
29
79
  var button_default = Button;
30
80
 
31
81
  // src/blocks/columns/columns.tsx
32
- import { Show as Show7, For as For4, createSignal as createSignal5 } from "solid-js";
82
+ import { Show as Show6, For as For4, createSignal as createSignal5 } from "solid-js";
33
83
  import { css as css2 } from "solid-styled-components";
34
84
 
35
85
  // src/components/blocks/blocks.tsx
36
- import { useContext, Show as Show6, For as For3 } from "solid-js";
86
+ import { useContext, Show as Show5, For as For3 } from "solid-js";
37
87
 
38
88
  // src/context/builder.context.ts
39
89
  import { createContext } from "solid-js";
@@ -57,7 +107,7 @@ import { createContext as createContext2 } from "solid-js";
57
107
  var components_context_default = createContext2({ registeredComponents: {} });
58
108
 
59
109
  // src/components/block/block.tsx
60
- import { Show as Show5, For as For2, createSignal as createSignal4 } from "solid-js";
110
+ import { Show as Show4, For as For2, createSignal as createSignal4 } from "solid-js";
61
111
 
62
112
  // src/functions/get-block-component-options.ts
63
113
  function getBlockComponentOptions(block) {
@@ -85,9 +135,6 @@ function isBrowser() {
85
135
  return typeof window !== "undefined" && typeof document !== "undefined";
86
136
  }
87
137
 
88
- // src/constants/target.ts
89
- var TARGET = "solid";
90
-
91
138
  // src/functions/is-iframe.ts
92
139
  function isIframe() {
93
140
  return isBrowser() && window.self !== window.top;
@@ -3375,8 +3422,33 @@ theFunction();
3375
3422
  }
3376
3423
  };
3377
3424
 
3425
+ // src/helpers/nullable.ts
3426
+ var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
3427
+
3428
+ // src/functions/is-node-runtime.ts
3429
+ function isNodeRuntime() {
3430
+ return typeof process !== "undefined" && checkIsDefined(process?.versions?.node);
3431
+ }
3432
+
3433
+ // src/functions/evaluate/should-force-browser-runtime-in-node.ts
3434
+ var shouldForceBrowserRuntimeInNode = () => {
3435
+ if (!isNodeRuntime())
3436
+ return false;
3437
+ const isArm64 = process.arch === "arm64";
3438
+ const isNode20 = process.version.startsWith("v20");
3439
+ const hasNoNodeSnapshotNodeOption = process.env.NODE_OPTIONS?.includes("--no-node-snapshot");
3440
+ if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
3441
+ logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
3442
+ 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.
3443
+ See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
3444
+ `);
3445
+ return true;
3446
+ }
3447
+ return false;
3448
+ };
3449
+
3378
3450
  // src/functions/evaluate/choose-eval.ts
3379
- var chooseBrowserOrServerEval = (args) => isBrowser() ? runInBrowser(args) : runInEdge(args);
3451
+ var chooseBrowserOrServerEval = (args) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInEdge(args);
3380
3452
 
3381
3453
  // src/functions/evaluate/evaluate.ts
3382
3454
  function evaluate({
@@ -3598,9 +3670,6 @@ var getSizesForBreakpoints = ({
3598
3670
  // src/functions/camel-to-kebab-case.ts
3599
3671
  var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
3600
3672
 
3601
- // src/helpers/nullable.ts
3602
- var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
3603
-
3604
3673
  // src/helpers/css.ts
3605
3674
  var convertStyleMapToCSSArray = (style) => {
3606
3675
  const cssProps = Object.entries(style).map(([key, value]) => {
@@ -3744,6 +3813,38 @@ function getBlockActions(options) {
3744
3813
  return obj;
3745
3814
  }
3746
3815
 
3816
+ // src/functions/transform-style-property.ts
3817
+ function transformStyleProperty({
3818
+ style
3819
+ }) {
3820
+ return style;
3821
+ }
3822
+
3823
+ // src/functions/get-style.ts
3824
+ var getStyle = ({
3825
+ block,
3826
+ context
3827
+ }) => {
3828
+ return mapStyleObjToStrIfNeeded(transformStyleProperty({
3829
+ style: block.style || {},
3830
+ context,
3831
+ block
3832
+ }));
3833
+ };
3834
+ function mapStyleObjToStrIfNeeded(style) {
3835
+ switch (TARGET) {
3836
+ case "svelte":
3837
+ case "vue":
3838
+ case "solid":
3839
+ return convertStyleMapToCSSArray(style).join(" ");
3840
+ case "qwik":
3841
+ case "reactNative":
3842
+ case "react":
3843
+ case "rsc":
3844
+ return style;
3845
+ }
3846
+ }
3847
+
3747
3848
  // src/functions/transform-block-properties.ts
3748
3849
  function transformBlockProperties({
3749
3850
  properties
@@ -3765,8 +3866,11 @@ function getBlockProperties({
3765
3866
  ...extractRelevantRootBlockProperties(block),
3766
3867
  ...block.properties,
3767
3868
  "builder-id": block.id,
3768
- style: block.style ? getStyleAttribute(block.style) : void 0,
3769
- class: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
3869
+ style: getStyle({
3870
+ block,
3871
+ context
3872
+ }),
3873
+ [getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
3770
3874
  };
3771
3875
  return transformBlockProperties({
3772
3876
  properties,
@@ -3774,53 +3878,6 @@ function getBlockProperties({
3774
3878
  block
3775
3879
  });
3776
3880
  }
3777
- function getStyleAttribute(style) {
3778
- switch (TARGET) {
3779
- case "svelte":
3780
- case "vue":
3781
- case "solid":
3782
- return convertStyleMapToCSSArray(style).join(" ");
3783
- case "qwik":
3784
- case "reactNative":
3785
- case "react":
3786
- case "rsc":
3787
- return style;
3788
- }
3789
- }
3790
-
3791
- // src/components/dynamic-renderer/dynamic-renderer.tsx
3792
- import { Show as Show3 } from "solid-js";
3793
- import { Dynamic } from "solid-js/web";
3794
-
3795
- // src/components/dynamic-renderer/dynamic-renderer.helpers.ts
3796
- var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
3797
- var isEmptyElement = (tagName) => {
3798
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
3799
- };
3800
-
3801
- // src/components/dynamic-renderer/dynamic-renderer.tsx
3802
- function DynamicRenderer(props) {
3803
- return <Show3
3804
- fallback={<Dynamic
3805
- {...props.attributes}
3806
- {...props.actionAttributes}
3807
- component={props.TagName}
3808
- />}
3809
- when={!isEmptyElement(props.TagName)}
3810
- ><Show3
3811
- fallback={<Dynamic
3812
- {...props.attributes}
3813
- {...props.actionAttributes}
3814
- component={props.TagName}
3815
- >{props.children}</Dynamic>}
3816
- when={typeof props.TagName === "string"}
3817
- ><Dynamic
3818
- {...props.attributes}
3819
- {...props.actionAttributes}
3820
- component={props.TagName}
3821
- >{props.children}</Dynamic></Show3></Show3>;
3822
- }
3823
- var Dynamic_renderer_default = DynamicRenderer;
3824
3881
 
3825
3882
  // src/components/block/components/block-wrapper.tsx
3826
3883
  function BlockWrapper(props) {
@@ -3843,7 +3900,7 @@ function BlockWrapper(props) {
3843
3900
  var Block_wrapper_default = BlockWrapper;
3844
3901
 
3845
3902
  // src/components/block/components/component-ref/component-ref.tsx
3846
- import { Show as Show4, For, createSignal as createSignal2 } from "solid-js";
3903
+ import { Show as Show3, For, createSignal as createSignal2 } from "solid-js";
3847
3904
  import { Dynamic as Dynamic3 } from "solid-js/web";
3848
3905
 
3849
3906
  // src/components/block/components/interactive-element.tsx
@@ -3907,12 +3964,13 @@ function ComponentRef(props) {
3907
3964
  const [Wrapper, setWrapper] = createSignal2(
3908
3965
  props.isInteractive ? interactive_element_default : props.componentRef
3909
3966
  );
3910
- return <Show4 when={props.componentRef}><Dynamic3
3967
+ return <Show3 when={props.componentRef}><Dynamic3
3911
3968
  {...getWrapperProps({
3912
3969
  componentOptions: props.componentOptions,
3913
3970
  builderBlock: props.builderBlock,
3914
3971
  context: props.context,
3915
3972
  componentRef: props.componentRef,
3973
+ linkComponent: props.linkComponent,
3916
3974
  includeBlockProps: props.includeBlockProps,
3917
3975
  isInteractive: props.isInteractive,
3918
3976
  contextValue: props.context
@@ -3925,8 +3983,9 @@ function ComponentRef(props) {
3925
3983
  block={child}
3926
3984
  context={props.context}
3927
3985
  registeredComponents={props.registeredComponents}
3986
+ linkComponent={props.linkComponent}
3928
3987
  />;
3929
- }}</For></Dynamic3></Show4>;
3988
+ }}</For></Dynamic3></Show3>;
3930
3989
  }
3931
3990
  var Component_ref_default = ComponentRef;
3932
3991
 
@@ -3938,6 +3997,7 @@ function RepeatedBlock(props) {
3938
3997
  block={props.block}
3939
3998
  context={store()}
3940
3999
  registeredComponents={props.registeredComponents}
4000
+ linkComponent={props.linkComponent}
3941
4001
  /></builder_context_default.Provider>;
3942
4002
  }
3943
4003
  var Repeated_block_default = RepeatedBlock;
@@ -3969,6 +4029,10 @@ function Block(props) {
3969
4029
  });
3970
4030
  }
3971
4031
  function Tag() {
4032
+ const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
4033
+ if (shouldUseLink) {
4034
+ return props.linkComponent || "a";
4035
+ }
3972
4036
  return props.block.tagName || "div";
3973
4037
  }
3974
4038
  function canShowBlock() {
@@ -3992,32 +4056,37 @@ function Block(props) {
3992
4056
  componentOptions: {
3993
4057
  ...getBlockComponentOptions(processedBlock()),
3994
4058
  builderContext: props.context,
4059
+ ...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
4060
+ builderLinkComponent: props.linkComponent
4061
+ } : {},
3995
4062
  ...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
3996
4063
  builderComponents: props.registeredComponents
3997
4064
  } : {}
3998
4065
  },
3999
4066
  context: childrenContext(),
4067
+ linkComponent: props.linkComponent,
4000
4068
  registeredComponents: props.registeredComponents,
4001
4069
  builderBlock: processedBlock(),
4002
4070
  includeBlockProps: blockComponent()?.noWrap === true,
4003
4071
  isInteractive: !blockComponent()?.isRSC
4004
4072
  };
4005
4073
  }
4006
- return <Show5 when={canShowBlock()}>
4074
+ return <Show4 when={canShowBlock()}>
4007
4075
  <Block_styles_default block={props.block} context={props.context} />
4008
- <Show5
4076
+ <Show4
4009
4077
  fallback={<Component_ref_default
4010
4078
  componentRef={componentRefProps().componentRef}
4011
4079
  componentOptions={componentRefProps().componentOptions}
4012
4080
  blockChildren={componentRefProps().blockChildren}
4013
4081
  context={componentRefProps().context}
4014
4082
  registeredComponents={componentRefProps().registeredComponents}
4083
+ linkComponent={componentRefProps().linkComponent}
4015
4084
  builderBlock={componentRefProps().builderBlock}
4016
4085
  includeBlockProps={componentRefProps().includeBlockProps}
4017
4086
  isInteractive={componentRefProps().isInteractive}
4018
4087
  />}
4019
4088
  when={!blockComponent()?.noWrap}
4020
- ><Show5
4089
+ ><Show4
4021
4090
  fallback={<For2 each={repeatItem()}>{(data, _index) => {
4022
4091
  const index = _index();
4023
4092
  return <Repeated_block_default
@@ -4025,6 +4094,7 @@ function Block(props) {
4025
4094
  repeatContext={data.context}
4026
4095
  block={data.block}
4027
4096
  registeredComponents={props.registeredComponents}
4097
+ linkComponent={props.linkComponent}
4028
4098
  />;
4029
4099
  }}</For2>}
4030
4100
  when={!repeatItem()}
@@ -4032,6 +4102,7 @@ function Block(props) {
4032
4102
  Wrapper={Tag()}
4033
4103
  block={processedBlock()}
4034
4104
  context={props.context}
4105
+ linkComponent={props.linkComponent}
4035
4106
  >
4036
4107
  <Component_ref_default
4037
4108
  componentRef={componentRefProps().componentRef}
@@ -4039,6 +4110,7 @@ function Block(props) {
4039
4110
  blockChildren={componentRefProps().blockChildren}
4040
4111
  context={componentRefProps().context}
4041
4112
  registeredComponents={componentRefProps().registeredComponents}
4113
+ linkComponent={componentRefProps().linkComponent}
4042
4114
  builderBlock={componentRefProps().builderBlock}
4043
4115
  includeBlockProps={componentRefProps().includeBlockProps}
4044
4116
  isInteractive={componentRefProps().isInteractive}
@@ -4050,10 +4122,11 @@ function Block(props) {
4050
4122
  block={child}
4051
4123
  context={childrenContext()}
4052
4124
  registeredComponents={props.registeredComponents}
4125
+ linkComponent={props.linkComponent}
4053
4126
  />;
4054
4127
  }}</For2>
4055
- </Block_wrapper_default></Show5></Show5>
4056
- </Show5>;
4128
+ </Block_wrapper_default></Show4></Show4>
4129
+ </Show4>;
4057
4130
  }
4058
4131
  var Block_default = Block;
4059
4132
 
@@ -4122,15 +4195,16 @@ function Blocks(props) {
4122
4195
  styleProp={props.styleProp}
4123
4196
  BlocksWrapper={props.context?.BlocksWrapper}
4124
4197
  BlocksWrapperProps={props.context?.BlocksWrapperProps}
4125
- ><Show6 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
4198
+ ><Show5 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
4126
4199
  const index = _index();
4127
4200
  return <Block_default
4128
4201
  key={block.id}
4129
4202
  block={block}
4203
+ linkComponent={props.linkComponent}
4130
4204
  context={props.context || builderContext}
4131
4205
  registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
4132
4206
  />;
4133
- }}</For3></Show6></Blocks_wrapper_default>;
4207
+ }}</For3></Show5></Blocks_wrapper_default>;
4134
4208
  }
4135
4209
  var Blocks_default = Blocks;
4136
4210
 
@@ -4179,7 +4253,13 @@ function Columns(props) {
4179
4253
  const mobileWidth = "100%";
4180
4254
  const mobileMarginLeft = 0;
4181
4255
  const marginLeftKey = "margin-left";
4256
+ const sharedStyles = {
4257
+ display: "flex",
4258
+ flexDirection: "column",
4259
+ alignItems: "stretch"
4260
+ };
4182
4261
  return {
4262
+ ...sharedStyles,
4183
4263
  width,
4184
4264
  [marginLeftKey]: gutterPixels,
4185
4265
  "--column-width-mobile": getMobileStyle({
@@ -4241,18 +4321,21 @@ function Columns(props) {
4241
4321
  style={columnsCssVars()}
4242
4322
  {...{}}
4243
4323
  >
4244
- <Show7 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show7>
4324
+ <Show6 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show6>
4245
4325
  <For4 each={props.columns}>{(column, _index) => {
4246
4326
  const index = _index();
4247
- return <div
4248
- class={"builder-column " + css2({
4249
- display: "flex",
4250
- flexDirection: "column",
4251
- alignItems: "stretch"
4252
- })}
4253
- style={columnCssVars(index)}
4254
- {...{}}
4327
+ return <Dynamic_renderer_default
4255
4328
  key={index}
4329
+ TagName={column.link ? props.builderLinkComponent || "a" : "div"}
4330
+ actionAttributes={{}}
4331
+ attributes={{
4332
+ ...{},
4333
+ ...column.link ? {
4334
+ href: column.link
4335
+ } : {},
4336
+ [getClassPropName()]: "builder-column",
4337
+ style: mapStyleObjToStrIfNeeded(columnCssVars(index))
4338
+ }}
4256
4339
  ><Blocks_default
4257
4340
  path={`component.options.columns.${index}.blocks`}
4258
4341
  parent={props.builderBlock.id}
@@ -4261,8 +4344,9 @@ function Columns(props) {
4261
4344
  }}
4262
4345
  context={props.builderContext}
4263
4346
  registeredComponents={props.builderComponents}
4347
+ linkComponent={props.builderLinkComponent}
4264
4348
  blocks={column.blocks}
4265
- /></div>;
4349
+ /></Dynamic_renderer_default>;
4266
4350
  }}</For4>
4267
4351
  </div>;
4268
4352
  }
@@ -4275,7 +4359,7 @@ function FragmentComponent(props) {
4275
4359
  var fragment_default = FragmentComponent;
4276
4360
 
4277
4361
  // src/blocks/image/image.tsx
4278
- import { Show as Show8 } from "solid-js";
4362
+ import { Show as Show7 } from "solid-js";
4279
4363
  import { css as css3 } from "solid-styled-components";
4280
4364
 
4281
4365
  // src/blocks/image/image.helpers.ts
@@ -4365,7 +4449,7 @@ function Image(props) {
4365
4449
  }
4366
4450
  return <>
4367
4451
  <picture>
4368
- <Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
4452
+ <Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
4369
4453
  <img
4370
4454
  class={"builder-image" + (props.className ? " " + props.className : "") + " " + css3({
4371
4455
  opacity: "1",
@@ -4384,7 +4468,7 @@ function Image(props) {
4384
4468
  sizes={props.sizes}
4385
4469
  />
4386
4470
  </picture>
4387
- <Show8
4471
+ <Show7
4388
4472
  when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
4389
4473
  ><div
4390
4474
  class={"builder-image-sizer " + css3({
@@ -4395,9 +4479,9 @@ function Image(props) {
4395
4479
  style={{
4396
4480
  "padding-top": props.aspectRatio * 100 + "%"
4397
4481
  }}
4398
- /></Show8>
4399
- <Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
4400
- <Show8 when={!props.fitContent && props.children}><div
4482
+ /></Show7>
4483
+ <Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
4484
+ <Show7 when={!props.fitContent && props.children}><div
4401
4485
  class={css3({
4402
4486
  display: "flex",
4403
4487
  flexDirection: "column",
@@ -4408,7 +4492,7 @@ function Image(props) {
4408
4492
  width: "100%",
4409
4493
  height: "100%"
4410
4494
  })}
4411
- >{props.children}</div></Show8>
4495
+ >{props.children}</div></Show7>
4412
4496
  </>;
4413
4497
  }
4414
4498
  var image_default = Image;
@@ -4438,7 +4522,7 @@ var section_default = SectionComponent;
4438
4522
  import { onMount as onMount4, on as on3, createEffect as createEffect3, createSignal as createSignal14 } from "solid-js";
4439
4523
 
4440
4524
  // src/components/content-variants/content-variants.tsx
4441
- import { Show as Show12, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
4525
+ import { Show as Show11, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
4442
4526
 
4443
4527
  // src/helpers/url.ts
4444
4528
  var getTopLevelDomain = (host) => {
@@ -4632,7 +4716,7 @@ var handleABTesting = async ({
4632
4716
  var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
4633
4717
 
4634
4718
  // src/components/content/content.tsx
4635
- import { Show as Show11, createSignal as createSignal12 } from "solid-js";
4719
+ import { Show as Show10, createSignal as createSignal12 } from "solid-js";
4636
4720
 
4637
4721
  // src/blocks/button/component-info.ts
4638
4722
  var componentInfo = {
@@ -5441,7 +5525,7 @@ var componentInfo12 = {
5441
5525
  };
5442
5526
 
5443
5527
  // src/blocks/video/video.tsx
5444
- import { Show as Show9 } from "solid-js";
5528
+ import { Show as Show8 } from "solid-js";
5445
5529
  function Video(props) {
5446
5530
  function videoProps() {
5447
5531
  return {
@@ -5492,8 +5576,8 @@ function Video(props) {
5492
5576
  }}
5493
5577
  src={props.video || "no-src"}
5494
5578
  poster={props.posterImage}
5495
- ><Show9 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show9></video>
5496
- <Show9
5579
+ ><Show8 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show8></video>
5580
+ <Show8
5497
5581
  when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
5498
5582
  ><div
5499
5583
  style={{
@@ -5502,15 +5586,15 @@ function Video(props) {
5502
5586
  "pointer-events": "none",
5503
5587
  "font-size": "0px"
5504
5588
  }}
5505
- /></Show9>
5506
- <Show9 when={props.builderBlock?.children?.length && props.fitContent}><div
5589
+ /></Show8>
5590
+ <Show8 when={props.builderBlock?.children?.length && props.fitContent}><div
5507
5591
  style={{
5508
5592
  display: "flex",
5509
5593
  "flex-direction": "column",
5510
5594
  "align-items": "stretch"
5511
5595
  }}
5512
- >{props.children}</div></Show9>
5513
- <Show9 when={props.builderBlock?.children?.length && !props.fitContent}><div
5596
+ >{props.children}</div></Show8>
5597
+ <Show8 when={props.builderBlock?.children?.length && !props.fitContent}><div
5514
5598
  style={{
5515
5599
  "pointer-events": "none",
5516
5600
  display: "flex",
@@ -5522,7 +5606,7 @@ function Video(props) {
5522
5606
  width: "100%",
5523
5607
  height: "100%"
5524
5608
  }}
5525
- >{props.children}</div></Show9>
5609
+ >{props.children}</div></Show8>
5526
5610
  </div>;
5527
5611
  }
5528
5612
  var video_default = Video;
@@ -5642,7 +5726,7 @@ function InlinedScript(props) {
5642
5726
  var Inlined_script_default = InlinedScript;
5643
5727
 
5644
5728
  // src/components/content/components/enable-editor.tsx
5645
- import { Show as Show10, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
5729
+ import { Show as Show9, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
5646
5730
  import { Dynamic as Dynamic5 } from "solid-js/web";
5647
5731
 
5648
5732
  // src/helpers/preview-lru-cache/get.ts
@@ -6137,7 +6221,7 @@ var getInteractionPropertiesForEvent = (event) => {
6137
6221
  };
6138
6222
 
6139
6223
  // src/constants/sdk-version.ts
6140
- var SDK_VERSION = "0.12.3";
6224
+ var SDK_VERSION = "0.12.5";
6141
6225
 
6142
6226
  // src/functions/register.ts
6143
6227
  var registry = {};
@@ -6561,7 +6645,7 @@ function EnableEditor(props) {
6561
6645
  }
6562
6646
  }
6563
6647
  createEffect2(on2(() => [props.locale], onUpdateFn_6));
6564
- return <builder_context_default.Provider value={props.builderContextSignal}><Show10 when={props.builderContextSignal.content}><Dynamic5
6648
+ return <builder_context_default.Provider value={props.builderContextSignal}><Show9 when={props.builderContextSignal.content}><Dynamic5
6565
6649
  class={`variant-${props.content?.testVariationId || props.content?.id}`}
6566
6650
  {...{}}
6567
6651
  key={forceReRenderCount()}
@@ -6576,7 +6660,7 @@ function EnableEditor(props) {
6576
6660
  }}
6577
6661
  {...props.contentWrapperProps}
6578
6662
  component={ContentWrapper()}
6579
- >{props.children}</Dynamic5></Show10></builder_context_default.Provider>;
6663
+ >{props.children}</Dynamic5></Show9></builder_context_default.Provider>;
6580
6664
  }
6581
6665
  var Enable_editor_default = EnableEditor;
6582
6666
 
@@ -6798,21 +6882,23 @@ function ContentComponent(props) {
6798
6882
  builderContextSignal={builderContextSignal()}
6799
6883
  contentWrapper={props.contentWrapper}
6800
6884
  contentWrapperProps={props.contentWrapperProps}
6885
+ linkComponent={props.linkComponent}
6801
6886
  trustedHosts={props.trustedHosts}
6802
6887
  {...{
6803
6888
  setBuilderContextSignal
6804
6889
  }}
6805
6890
  >
6806
- <Show11 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show11>
6807
- <Show11 when={TARGET !== "reactNative"}><Styles_default
6891
+ <Show10 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show10>
6892
+ <Show10 when={TARGET !== "reactNative"}><Styles_default
6808
6893
  contentId={builderContextSignal().content?.id}
6809
6894
  cssCode={builderContextSignal().content?.data?.cssCode}
6810
6895
  customFonts={builderContextSignal().content?.data?.customFonts}
6811
- /></Show11>
6896
+ /></Show10>
6812
6897
  <Blocks_default
6813
6898
  blocks={builderContextSignal().content?.data?.blocks}
6814
6899
  context={builderContextSignal()}
6815
6900
  registeredComponents={registeredComponents()}
6901
+ linkComponent={props.linkComponent}
6816
6902
  />
6817
6903
  </Enable_editor_default></components_context_default.Provider>;
6818
6904
  }
@@ -6851,8 +6937,8 @@ function ContentVariants(props) {
6851
6937
  setShouldRenderVariants(false);
6852
6938
  });
6853
6939
  return <>
6854
- <Show12 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show12>
6855
- <Show12 when={shouldRenderVariants()}>
6940
+ <Show11 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show11>
6941
+ <Show11 when={shouldRenderVariants()}>
6856
6942
  <Inlined_styles_default
6857
6943
  id={`variants-styles-${props.content?.id}`}
6858
6944
  styles={hideVariantsStyleString()}
@@ -6872,6 +6958,7 @@ function ContentVariants(props) {
6872
6958
  apiKey={props.apiKey}
6873
6959
  apiVersion={props.apiVersion}
6874
6960
  customComponents={props.customComponents}
6961
+ linkComponent={props.linkComponent}
6875
6962
  canTrack={props.canTrack}
6876
6963
  locale={props.locale}
6877
6964
  includeRefs={props.includeRefs}
@@ -6884,7 +6971,7 @@ function ContentVariants(props) {
6884
6971
  trustedHosts={props.trustedHosts}
6885
6972
  />;
6886
6973
  }}</For5>
6887
- </Show12>
6974
+ </Show11>
6888
6975
  <Content_default
6889
6976
  {...{}}
6890
6977
  content={defaultContent()}
@@ -6895,6 +6982,7 @@ function ContentVariants(props) {
6895
6982
  apiKey={props.apiKey}
6896
6983
  apiVersion={props.apiVersion}
6897
6984
  customComponents={props.customComponents}
6985
+ linkComponent={props.linkComponent}
6898
6986
  canTrack={props.canTrack}
6899
6987
  locale={props.locale}
6900
6988
  includeRefs={props.includeRefs}
@@ -6939,7 +7027,7 @@ function Symbol2(props) {
6939
7027
  const [contentToUse, setContentToUse] = createSignal14(props.symbol?.content);
6940
7028
  function className() {
6941
7029
  return [
6942
- ...[props.attributes.class],
7030
+ ...[props.attributes[getClassPropName()]],
6943
7031
  "builder-symbol",
6944
7032
  props.symbol?.inline ? "builder-inline-symbol" : void 0,
6945
7033
  props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0
@@ -6980,6 +7068,7 @@ function Symbol2(props) {
6980
7068
  }}
6981
7069
  model={props.symbol?.model}
6982
7070
  content={contentToUse()}
7071
+ linkComponent={props.builderLinkComponent}
6983
7072
  /></div>;
6984
7073
  }
6985
7074
  var symbol_default = Symbol2;