@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/dist/index.d.ts +23 -14
- package/lib/browser/dev.js +269 -165
- package/lib/browser/dev.jsx +211 -122
- package/lib/browser/index.js +269 -165
- package/lib/browser/index.jsx +211 -122
- package/lib/edge/dev.js +269 -165
- package/lib/edge/dev.jsx +211 -122
- package/lib/edge/index.js +269 -165
- package/lib/edge/index.jsx +211 -122
- package/lib/node/dev.js +269 -165
- package/lib/node/dev.jsx +211 -122
- package/lib/node/index.js +269 -165
- package/lib/node/index.jsx +211 -122
- package/package.json +1 -1
package/lib/edge/index.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/
|
|
9
|
+
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
10
10
|
import { Show } from "solid-js";
|
|
11
|
-
|
|
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={<
|
|
14
|
-
class={`builder-button ${props.attributes.class}`}
|
|
15
|
-
role="button"
|
|
16
|
-
{...{}}
|
|
22
|
+
fallback={<Dynamic
|
|
17
23
|
{...props.attributes}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
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
|
|
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
|
|
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) {
|
|
@@ -84,9 +134,6 @@ function isBrowser() {
|
|
|
84
134
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
85
135
|
}
|
|
86
136
|
|
|
87
|
-
// src/constants/target.ts
|
|
88
|
-
var TARGET = "solid";
|
|
89
|
-
|
|
90
137
|
// src/functions/is-iframe.ts
|
|
91
138
|
function isIframe() {
|
|
92
139
|
return isBrowser() && window.self !== window.top;
|
|
@@ -3373,8 +3420,33 @@ theFunction();
|
|
|
3373
3420
|
}
|
|
3374
3421
|
};
|
|
3375
3422
|
|
|
3423
|
+
// src/helpers/nullable.ts
|
|
3424
|
+
var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
|
|
3425
|
+
|
|
3426
|
+
// src/functions/is-node-runtime.ts
|
|
3427
|
+
function isNodeRuntime() {
|
|
3428
|
+
return typeof process !== "undefined" && checkIsDefined(process?.versions?.node);
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3431
|
+
// src/functions/evaluate/should-force-browser-runtime-in-node.ts
|
|
3432
|
+
var shouldForceBrowserRuntimeInNode = () => {
|
|
3433
|
+
if (!isNodeRuntime())
|
|
3434
|
+
return false;
|
|
3435
|
+
const isArm64 = process.arch === "arm64";
|
|
3436
|
+
const isNode20 = process.version.startsWith("v20");
|
|
3437
|
+
const hasNoNodeSnapshotNodeOption = process.env.NODE_OPTIONS?.includes("--no-node-snapshot");
|
|
3438
|
+
if (isArm64 && isNode20 && !hasNoNodeSnapshotNodeOption) {
|
|
3439
|
+
logger.log(`Skipping usage of \`isolated-vm\` to avoid crashes in Node v20 on an arm64 machine.
|
|
3440
|
+
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.
|
|
3441
|
+
See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.
|
|
3442
|
+
`);
|
|
3443
|
+
return true;
|
|
3444
|
+
}
|
|
3445
|
+
return false;
|
|
3446
|
+
};
|
|
3447
|
+
|
|
3376
3448
|
// src/functions/evaluate/choose-eval.ts
|
|
3377
|
-
var chooseBrowserOrServerEval = (args) => isBrowser() ? runInBrowser(args) : runInEdge(args);
|
|
3449
|
+
var chooseBrowserOrServerEval = (args) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInEdge(args);
|
|
3378
3450
|
|
|
3379
3451
|
// src/functions/evaluate/evaluate.ts
|
|
3380
3452
|
function evaluate({
|
|
@@ -3593,9 +3665,6 @@ var getSizesForBreakpoints = ({
|
|
|
3593
3665
|
// src/functions/camel-to-kebab-case.ts
|
|
3594
3666
|
var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
3595
3667
|
|
|
3596
|
-
// src/helpers/nullable.ts
|
|
3597
|
-
var checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
|
|
3598
|
-
|
|
3599
3668
|
// src/helpers/css.ts
|
|
3600
3669
|
var convertStyleMapToCSSArray = (style) => {
|
|
3601
3670
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
@@ -3739,6 +3808,38 @@ function getBlockActions(options) {
|
|
|
3739
3808
|
return obj;
|
|
3740
3809
|
}
|
|
3741
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
|
+
|
|
3742
3843
|
// src/functions/transform-block-properties.ts
|
|
3743
3844
|
function transformBlockProperties({
|
|
3744
3845
|
properties
|
|
@@ -3760,8 +3861,11 @@ function getBlockProperties({
|
|
|
3760
3861
|
...extractRelevantRootBlockProperties(block),
|
|
3761
3862
|
...block.properties,
|
|
3762
3863
|
"builder-id": block.id,
|
|
3763
|
-
style:
|
|
3764
|
-
|
|
3864
|
+
style: getStyle({
|
|
3865
|
+
block,
|
|
3866
|
+
context
|
|
3867
|
+
}),
|
|
3868
|
+
[getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
|
|
3765
3869
|
};
|
|
3766
3870
|
return transformBlockProperties({
|
|
3767
3871
|
properties,
|
|
@@ -3769,53 +3873,6 @@ function getBlockProperties({
|
|
|
3769
3873
|
block
|
|
3770
3874
|
});
|
|
3771
3875
|
}
|
|
3772
|
-
function getStyleAttribute(style) {
|
|
3773
|
-
switch (TARGET) {
|
|
3774
|
-
case "svelte":
|
|
3775
|
-
case "vue":
|
|
3776
|
-
case "solid":
|
|
3777
|
-
return convertStyleMapToCSSArray(style).join(" ");
|
|
3778
|
-
case "qwik":
|
|
3779
|
-
case "reactNative":
|
|
3780
|
-
case "react":
|
|
3781
|
-
case "rsc":
|
|
3782
|
-
return style;
|
|
3783
|
-
}
|
|
3784
|
-
}
|
|
3785
|
-
|
|
3786
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3787
|
-
import { Show as Show3 } from "solid-js";
|
|
3788
|
-
import { Dynamic } from "solid-js/web";
|
|
3789
|
-
|
|
3790
|
-
// src/components/dynamic-renderer/dynamic-renderer.helpers.ts
|
|
3791
|
-
var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
3792
|
-
var isEmptyElement = (tagName) => {
|
|
3793
|
-
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
3794
|
-
};
|
|
3795
|
-
|
|
3796
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3797
|
-
function DynamicRenderer(props) {
|
|
3798
|
-
return <Show3
|
|
3799
|
-
fallback={<Dynamic
|
|
3800
|
-
{...props.attributes}
|
|
3801
|
-
{...props.actionAttributes}
|
|
3802
|
-
component={props.TagName}
|
|
3803
|
-
/>}
|
|
3804
|
-
when={!isEmptyElement(props.TagName)}
|
|
3805
|
-
><Show3
|
|
3806
|
-
fallback={<Dynamic
|
|
3807
|
-
{...props.attributes}
|
|
3808
|
-
{...props.actionAttributes}
|
|
3809
|
-
component={props.TagName}
|
|
3810
|
-
>{props.children}</Dynamic>}
|
|
3811
|
-
when={typeof props.TagName === "string"}
|
|
3812
|
-
><Dynamic
|
|
3813
|
-
{...props.attributes}
|
|
3814
|
-
{...props.actionAttributes}
|
|
3815
|
-
component={props.TagName}
|
|
3816
|
-
>{props.children}</Dynamic></Show3></Show3>;
|
|
3817
|
-
}
|
|
3818
|
-
var Dynamic_renderer_default = DynamicRenderer;
|
|
3819
3876
|
|
|
3820
3877
|
// src/components/block/components/block-wrapper.tsx
|
|
3821
3878
|
function BlockWrapper(props) {
|
|
@@ -3838,7 +3895,7 @@ function BlockWrapper(props) {
|
|
|
3838
3895
|
var Block_wrapper_default = BlockWrapper;
|
|
3839
3896
|
|
|
3840
3897
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
3841
|
-
import { Show as
|
|
3898
|
+
import { Show as Show3, For, createSignal as createSignal2 } from "solid-js";
|
|
3842
3899
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
3843
3900
|
|
|
3844
3901
|
// src/components/block/components/interactive-element.tsx
|
|
@@ -3902,12 +3959,13 @@ function ComponentRef(props) {
|
|
|
3902
3959
|
const [Wrapper, setWrapper] = createSignal2(
|
|
3903
3960
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
3904
3961
|
);
|
|
3905
|
-
return <
|
|
3962
|
+
return <Show3 when={props.componentRef}><Dynamic3
|
|
3906
3963
|
{...getWrapperProps({
|
|
3907
3964
|
componentOptions: props.componentOptions,
|
|
3908
3965
|
builderBlock: props.builderBlock,
|
|
3909
3966
|
context: props.context,
|
|
3910
3967
|
componentRef: props.componentRef,
|
|
3968
|
+
linkComponent: props.linkComponent,
|
|
3911
3969
|
includeBlockProps: props.includeBlockProps,
|
|
3912
3970
|
isInteractive: props.isInteractive,
|
|
3913
3971
|
contextValue: props.context
|
|
@@ -3920,8 +3978,9 @@ function ComponentRef(props) {
|
|
|
3920
3978
|
block={child}
|
|
3921
3979
|
context={props.context}
|
|
3922
3980
|
registeredComponents={props.registeredComponents}
|
|
3981
|
+
linkComponent={props.linkComponent}
|
|
3923
3982
|
/>;
|
|
3924
|
-
}}</For></Dynamic3></
|
|
3983
|
+
}}</For></Dynamic3></Show3>;
|
|
3925
3984
|
}
|
|
3926
3985
|
var Component_ref_default = ComponentRef;
|
|
3927
3986
|
|
|
@@ -3933,6 +3992,7 @@ function RepeatedBlock(props) {
|
|
|
3933
3992
|
block={props.block}
|
|
3934
3993
|
context={store()}
|
|
3935
3994
|
registeredComponents={props.registeredComponents}
|
|
3995
|
+
linkComponent={props.linkComponent}
|
|
3936
3996
|
/></builder_context_default.Provider>;
|
|
3937
3997
|
}
|
|
3938
3998
|
var Repeated_block_default = RepeatedBlock;
|
|
@@ -3964,6 +4024,10 @@ function Block(props) {
|
|
|
3964
4024
|
});
|
|
3965
4025
|
}
|
|
3966
4026
|
function Tag() {
|
|
4027
|
+
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
4028
|
+
if (shouldUseLink) {
|
|
4029
|
+
return props.linkComponent || "a";
|
|
4030
|
+
}
|
|
3967
4031
|
return props.block.tagName || "div";
|
|
3968
4032
|
}
|
|
3969
4033
|
function canShowBlock() {
|
|
@@ -3987,32 +4051,37 @@ function Block(props) {
|
|
|
3987
4051
|
componentOptions: {
|
|
3988
4052
|
...getBlockComponentOptions(processedBlock()),
|
|
3989
4053
|
builderContext: props.context,
|
|
4054
|
+
...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
4055
|
+
builderLinkComponent: props.linkComponent
|
|
4056
|
+
} : {},
|
|
3990
4057
|
...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
3991
4058
|
builderComponents: props.registeredComponents
|
|
3992
4059
|
} : {}
|
|
3993
4060
|
},
|
|
3994
4061
|
context: childrenContext(),
|
|
4062
|
+
linkComponent: props.linkComponent,
|
|
3995
4063
|
registeredComponents: props.registeredComponents,
|
|
3996
4064
|
builderBlock: processedBlock(),
|
|
3997
4065
|
includeBlockProps: blockComponent()?.noWrap === true,
|
|
3998
4066
|
isInteractive: !blockComponent()?.isRSC
|
|
3999
4067
|
};
|
|
4000
4068
|
}
|
|
4001
|
-
return <
|
|
4069
|
+
return <Show4 when={canShowBlock()}>
|
|
4002
4070
|
<Block_styles_default block={props.block} context={props.context} />
|
|
4003
|
-
<
|
|
4071
|
+
<Show4
|
|
4004
4072
|
fallback={<Component_ref_default
|
|
4005
4073
|
componentRef={componentRefProps().componentRef}
|
|
4006
4074
|
componentOptions={componentRefProps().componentOptions}
|
|
4007
4075
|
blockChildren={componentRefProps().blockChildren}
|
|
4008
4076
|
context={componentRefProps().context}
|
|
4009
4077
|
registeredComponents={componentRefProps().registeredComponents}
|
|
4078
|
+
linkComponent={componentRefProps().linkComponent}
|
|
4010
4079
|
builderBlock={componentRefProps().builderBlock}
|
|
4011
4080
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
4012
4081
|
isInteractive={componentRefProps().isInteractive}
|
|
4013
4082
|
/>}
|
|
4014
4083
|
when={!blockComponent()?.noWrap}
|
|
4015
|
-
><
|
|
4084
|
+
><Show4
|
|
4016
4085
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
4017
4086
|
const index = _index();
|
|
4018
4087
|
return <Repeated_block_default
|
|
@@ -4020,6 +4089,7 @@ function Block(props) {
|
|
|
4020
4089
|
repeatContext={data.context}
|
|
4021
4090
|
block={data.block}
|
|
4022
4091
|
registeredComponents={props.registeredComponents}
|
|
4092
|
+
linkComponent={props.linkComponent}
|
|
4023
4093
|
/>;
|
|
4024
4094
|
}}</For2>}
|
|
4025
4095
|
when={!repeatItem()}
|
|
@@ -4027,6 +4097,7 @@ function Block(props) {
|
|
|
4027
4097
|
Wrapper={Tag()}
|
|
4028
4098
|
block={processedBlock()}
|
|
4029
4099
|
context={props.context}
|
|
4100
|
+
linkComponent={props.linkComponent}
|
|
4030
4101
|
>
|
|
4031
4102
|
<Component_ref_default
|
|
4032
4103
|
componentRef={componentRefProps().componentRef}
|
|
@@ -4034,6 +4105,7 @@ function Block(props) {
|
|
|
4034
4105
|
blockChildren={componentRefProps().blockChildren}
|
|
4035
4106
|
context={componentRefProps().context}
|
|
4036
4107
|
registeredComponents={componentRefProps().registeredComponents}
|
|
4108
|
+
linkComponent={componentRefProps().linkComponent}
|
|
4037
4109
|
builderBlock={componentRefProps().builderBlock}
|
|
4038
4110
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
4039
4111
|
isInteractive={componentRefProps().isInteractive}
|
|
@@ -4045,10 +4117,11 @@ function Block(props) {
|
|
|
4045
4117
|
block={child}
|
|
4046
4118
|
context={childrenContext()}
|
|
4047
4119
|
registeredComponents={props.registeredComponents}
|
|
4120
|
+
linkComponent={props.linkComponent}
|
|
4048
4121
|
/>;
|
|
4049
4122
|
}}</For2>
|
|
4050
|
-
</Block_wrapper_default></
|
|
4051
|
-
</
|
|
4123
|
+
</Block_wrapper_default></Show4></Show4>
|
|
4124
|
+
</Show4>;
|
|
4052
4125
|
}
|
|
4053
4126
|
var Block_default = Block;
|
|
4054
4127
|
|
|
@@ -4117,15 +4190,16 @@ function Blocks(props) {
|
|
|
4117
4190
|
styleProp={props.styleProp}
|
|
4118
4191
|
BlocksWrapper={props.context?.BlocksWrapper}
|
|
4119
4192
|
BlocksWrapperProps={props.context?.BlocksWrapperProps}
|
|
4120
|
-
><
|
|
4193
|
+
><Show5 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
|
|
4121
4194
|
const index = _index();
|
|
4122
4195
|
return <Block_default
|
|
4123
4196
|
key={block.id}
|
|
4124
4197
|
block={block}
|
|
4198
|
+
linkComponent={props.linkComponent}
|
|
4125
4199
|
context={props.context || builderContext}
|
|
4126
4200
|
registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
|
|
4127
4201
|
/>;
|
|
4128
|
-
}}</For3></
|
|
4202
|
+
}}</For3></Show5></Blocks_wrapper_default>;
|
|
4129
4203
|
}
|
|
4130
4204
|
var Blocks_default = Blocks;
|
|
4131
4205
|
|
|
@@ -4174,7 +4248,13 @@ function Columns(props) {
|
|
|
4174
4248
|
const mobileWidth = "100%";
|
|
4175
4249
|
const mobileMarginLeft = 0;
|
|
4176
4250
|
const marginLeftKey = "margin-left";
|
|
4251
|
+
const sharedStyles = {
|
|
4252
|
+
display: "flex",
|
|
4253
|
+
flexDirection: "column",
|
|
4254
|
+
alignItems: "stretch"
|
|
4255
|
+
};
|
|
4177
4256
|
return {
|
|
4257
|
+
...sharedStyles,
|
|
4178
4258
|
width,
|
|
4179
4259
|
[marginLeftKey]: gutterPixels,
|
|
4180
4260
|
"--column-width-mobile": getMobileStyle({
|
|
@@ -4236,18 +4316,21 @@ function Columns(props) {
|
|
|
4236
4316
|
style={columnsCssVars()}
|
|
4237
4317
|
{...{}}
|
|
4238
4318
|
>
|
|
4239
|
-
<
|
|
4319
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show6>
|
|
4240
4320
|
<For4 each={props.columns}>{(column, _index) => {
|
|
4241
4321
|
const index = _index();
|
|
4242
|
-
return <
|
|
4243
|
-
class={"builder-column " + css2({
|
|
4244
|
-
display: "flex",
|
|
4245
|
-
flexDirection: "column",
|
|
4246
|
-
alignItems: "stretch"
|
|
4247
|
-
})}
|
|
4248
|
-
style={columnCssVars(index)}
|
|
4249
|
-
{...{}}
|
|
4322
|
+
return <Dynamic_renderer_default
|
|
4250
4323
|
key={index}
|
|
4324
|
+
TagName={column.link ? props.builderLinkComponent || "a" : "div"}
|
|
4325
|
+
actionAttributes={{}}
|
|
4326
|
+
attributes={{
|
|
4327
|
+
...{},
|
|
4328
|
+
...column.link ? {
|
|
4329
|
+
href: column.link
|
|
4330
|
+
} : {},
|
|
4331
|
+
[getClassPropName()]: "builder-column",
|
|
4332
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
4333
|
+
}}
|
|
4251
4334
|
><Blocks_default
|
|
4252
4335
|
path={`component.options.columns.${index}.blocks`}
|
|
4253
4336
|
parent={props.builderBlock.id}
|
|
@@ -4256,8 +4339,9 @@ function Columns(props) {
|
|
|
4256
4339
|
}}
|
|
4257
4340
|
context={props.builderContext}
|
|
4258
4341
|
registeredComponents={props.builderComponents}
|
|
4342
|
+
linkComponent={props.builderLinkComponent}
|
|
4259
4343
|
blocks={column.blocks}
|
|
4260
|
-
/></
|
|
4344
|
+
/></Dynamic_renderer_default>;
|
|
4261
4345
|
}}</For4>
|
|
4262
4346
|
</div>;
|
|
4263
4347
|
}
|
|
@@ -4270,7 +4354,7 @@ function FragmentComponent(props) {
|
|
|
4270
4354
|
var fragment_default = FragmentComponent;
|
|
4271
4355
|
|
|
4272
4356
|
// src/blocks/image/image.tsx
|
|
4273
|
-
import { Show as
|
|
4357
|
+
import { Show as Show7 } from "solid-js";
|
|
4274
4358
|
import { css as css3 } from "solid-styled-components";
|
|
4275
4359
|
|
|
4276
4360
|
// src/blocks/image/image.helpers.ts
|
|
@@ -4359,7 +4443,7 @@ function Image(props) {
|
|
|
4359
4443
|
}
|
|
4360
4444
|
return <>
|
|
4361
4445
|
<picture>
|
|
4362
|
-
<
|
|
4446
|
+
<Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
|
|
4363
4447
|
<img
|
|
4364
4448
|
class={"builder-image" + (props.className ? " " + props.className : "") + " " + css3({
|
|
4365
4449
|
opacity: "1",
|
|
@@ -4378,7 +4462,7 @@ function Image(props) {
|
|
|
4378
4462
|
sizes={props.sizes}
|
|
4379
4463
|
/>
|
|
4380
4464
|
</picture>
|
|
4381
|
-
<
|
|
4465
|
+
<Show7
|
|
4382
4466
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
4383
4467
|
><div
|
|
4384
4468
|
class={"builder-image-sizer " + css3({
|
|
@@ -4389,9 +4473,9 @@ function Image(props) {
|
|
|
4389
4473
|
style={{
|
|
4390
4474
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
4391
4475
|
}}
|
|
4392
|
-
/></
|
|
4393
|
-
<
|
|
4394
|
-
<
|
|
4476
|
+
/></Show7>
|
|
4477
|
+
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
4478
|
+
<Show7 when={!props.fitContent && props.children}><div
|
|
4395
4479
|
class={css3({
|
|
4396
4480
|
display: "flex",
|
|
4397
4481
|
flexDirection: "column",
|
|
@@ -4402,7 +4486,7 @@ function Image(props) {
|
|
|
4402
4486
|
width: "100%",
|
|
4403
4487
|
height: "100%"
|
|
4404
4488
|
})}
|
|
4405
|
-
>{props.children}</div></
|
|
4489
|
+
>{props.children}</div></Show7>
|
|
4406
4490
|
</>;
|
|
4407
4491
|
}
|
|
4408
4492
|
var image_default = Image;
|
|
@@ -4432,7 +4516,7 @@ var section_default = SectionComponent;
|
|
|
4432
4516
|
import { onMount as onMount4, on as on3, createEffect as createEffect3, createSignal as createSignal14 } from "solid-js";
|
|
4433
4517
|
|
|
4434
4518
|
// src/components/content-variants/content-variants.tsx
|
|
4435
|
-
import { Show as
|
|
4519
|
+
import { Show as Show11, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
|
|
4436
4520
|
|
|
4437
4521
|
// src/helpers/url.ts
|
|
4438
4522
|
var getTopLevelDomain = (host) => {
|
|
@@ -4626,7 +4710,7 @@ var handleABTesting = async ({
|
|
|
4626
4710
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
4627
4711
|
|
|
4628
4712
|
// src/components/content/content.tsx
|
|
4629
|
-
import { Show as
|
|
4713
|
+
import { Show as Show10, createSignal as createSignal12 } from "solid-js";
|
|
4630
4714
|
|
|
4631
4715
|
// src/blocks/button/component-info.ts
|
|
4632
4716
|
var componentInfo = {
|
|
@@ -5432,7 +5516,7 @@ var componentInfo12 = {
|
|
|
5432
5516
|
};
|
|
5433
5517
|
|
|
5434
5518
|
// src/blocks/video/video.tsx
|
|
5435
|
-
import { Show as
|
|
5519
|
+
import { Show as Show8 } from "solid-js";
|
|
5436
5520
|
function Video(props) {
|
|
5437
5521
|
function videoProps() {
|
|
5438
5522
|
return {
|
|
@@ -5483,8 +5567,8 @@ function Video(props) {
|
|
|
5483
5567
|
}}
|
|
5484
5568
|
src={props.video || "no-src"}
|
|
5485
5569
|
poster={props.posterImage}
|
|
5486
|
-
><
|
|
5487
|
-
<
|
|
5570
|
+
><Show8 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show8></video>
|
|
5571
|
+
<Show8
|
|
5488
5572
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
5489
5573
|
><div
|
|
5490
5574
|
style={{
|
|
@@ -5493,15 +5577,15 @@ function Video(props) {
|
|
|
5493
5577
|
"pointer-events": "none",
|
|
5494
5578
|
"font-size": "0px"
|
|
5495
5579
|
}}
|
|
5496
|
-
/></
|
|
5497
|
-
<
|
|
5580
|
+
/></Show8>
|
|
5581
|
+
<Show8 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
5498
5582
|
style={{
|
|
5499
5583
|
display: "flex",
|
|
5500
5584
|
"flex-direction": "column",
|
|
5501
5585
|
"align-items": "stretch"
|
|
5502
5586
|
}}
|
|
5503
|
-
>{props.children}</div></
|
|
5504
|
-
<
|
|
5587
|
+
>{props.children}</div></Show8>
|
|
5588
|
+
<Show8 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
5505
5589
|
style={{
|
|
5506
5590
|
"pointer-events": "none",
|
|
5507
5591
|
display: "flex",
|
|
@@ -5513,7 +5597,7 @@ function Video(props) {
|
|
|
5513
5597
|
width: "100%",
|
|
5514
5598
|
height: "100%"
|
|
5515
5599
|
}}
|
|
5516
|
-
>{props.children}</div></
|
|
5600
|
+
>{props.children}</div></Show8>
|
|
5517
5601
|
</div>;
|
|
5518
5602
|
}
|
|
5519
5603
|
var video_default = Video;
|
|
@@ -5633,7 +5717,7 @@ function InlinedScript(props) {
|
|
|
5633
5717
|
var Inlined_script_default = InlinedScript;
|
|
5634
5718
|
|
|
5635
5719
|
// src/components/content/components/enable-editor.tsx
|
|
5636
|
-
import { Show as
|
|
5720
|
+
import { Show as Show9, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
|
|
5637
5721
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
5638
5722
|
|
|
5639
5723
|
// src/helpers/preview-lru-cache/get.ts
|
|
@@ -6123,7 +6207,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6123
6207
|
};
|
|
6124
6208
|
|
|
6125
6209
|
// src/constants/sdk-version.ts
|
|
6126
|
-
var SDK_VERSION = "0.12.
|
|
6210
|
+
var SDK_VERSION = "0.12.5";
|
|
6127
6211
|
|
|
6128
6212
|
// src/functions/register.ts
|
|
6129
6213
|
var registry = {};
|
|
@@ -6545,7 +6629,7 @@ function EnableEditor(props) {
|
|
|
6545
6629
|
}
|
|
6546
6630
|
}
|
|
6547
6631
|
createEffect2(on2(() => [props.locale], onUpdateFn_6));
|
|
6548
|
-
return <builder_context_default.Provider value={props.builderContextSignal}><
|
|
6632
|
+
return <builder_context_default.Provider value={props.builderContextSignal}><Show9 when={props.builderContextSignal.content}><Dynamic5
|
|
6549
6633
|
class={`variant-${props.content?.testVariationId || props.content?.id}`}
|
|
6550
6634
|
{...{}}
|
|
6551
6635
|
key={forceReRenderCount()}
|
|
@@ -6560,7 +6644,7 @@ function EnableEditor(props) {
|
|
|
6560
6644
|
}}
|
|
6561
6645
|
{...props.contentWrapperProps}
|
|
6562
6646
|
component={ContentWrapper()}
|
|
6563
|
-
>{props.children}</Dynamic5></
|
|
6647
|
+
>{props.children}</Dynamic5></Show9></builder_context_default.Provider>;
|
|
6564
6648
|
}
|
|
6565
6649
|
var Enable_editor_default = EnableEditor;
|
|
6566
6650
|
|
|
@@ -6782,21 +6866,23 @@ function ContentComponent(props) {
|
|
|
6782
6866
|
builderContextSignal={builderContextSignal()}
|
|
6783
6867
|
contentWrapper={props.contentWrapper}
|
|
6784
6868
|
contentWrapperProps={props.contentWrapperProps}
|
|
6869
|
+
linkComponent={props.linkComponent}
|
|
6785
6870
|
trustedHosts={props.trustedHosts}
|
|
6786
6871
|
{...{
|
|
6787
6872
|
setBuilderContextSignal
|
|
6788
6873
|
}}
|
|
6789
6874
|
>
|
|
6790
|
-
<
|
|
6791
|
-
<
|
|
6875
|
+
<Show10 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show10>
|
|
6876
|
+
<Show10 when={TARGET !== "reactNative"}><Styles_default
|
|
6792
6877
|
contentId={builderContextSignal().content?.id}
|
|
6793
6878
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
6794
6879
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
6795
|
-
/></
|
|
6880
|
+
/></Show10>
|
|
6796
6881
|
<Blocks_default
|
|
6797
6882
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
6798
6883
|
context={builderContextSignal()}
|
|
6799
6884
|
registeredComponents={registeredComponents()}
|
|
6885
|
+
linkComponent={props.linkComponent}
|
|
6800
6886
|
/>
|
|
6801
6887
|
</Enable_editor_default></components_context_default.Provider>;
|
|
6802
6888
|
}
|
|
@@ -6835,8 +6921,8 @@ function ContentVariants(props) {
|
|
|
6835
6921
|
setShouldRenderVariants(false);
|
|
6836
6922
|
});
|
|
6837
6923
|
return <>
|
|
6838
|
-
<
|
|
6839
|
-
<
|
|
6924
|
+
<Show11 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show11>
|
|
6925
|
+
<Show11 when={shouldRenderVariants()}>
|
|
6840
6926
|
<Inlined_styles_default
|
|
6841
6927
|
id={`variants-styles-${props.content?.id}`}
|
|
6842
6928
|
styles={hideVariantsStyleString()}
|
|
@@ -6856,6 +6942,7 @@ function ContentVariants(props) {
|
|
|
6856
6942
|
apiKey={props.apiKey}
|
|
6857
6943
|
apiVersion={props.apiVersion}
|
|
6858
6944
|
customComponents={props.customComponents}
|
|
6945
|
+
linkComponent={props.linkComponent}
|
|
6859
6946
|
canTrack={props.canTrack}
|
|
6860
6947
|
locale={props.locale}
|
|
6861
6948
|
includeRefs={props.includeRefs}
|
|
@@ -6868,7 +6955,7 @@ function ContentVariants(props) {
|
|
|
6868
6955
|
trustedHosts={props.trustedHosts}
|
|
6869
6956
|
/>;
|
|
6870
6957
|
}}</For5>
|
|
6871
|
-
</
|
|
6958
|
+
</Show11>
|
|
6872
6959
|
<Content_default
|
|
6873
6960
|
{...{}}
|
|
6874
6961
|
content={defaultContent()}
|
|
@@ -6879,6 +6966,7 @@ function ContentVariants(props) {
|
|
|
6879
6966
|
apiKey={props.apiKey}
|
|
6880
6967
|
apiVersion={props.apiVersion}
|
|
6881
6968
|
customComponents={props.customComponents}
|
|
6969
|
+
linkComponent={props.linkComponent}
|
|
6882
6970
|
canTrack={props.canTrack}
|
|
6883
6971
|
locale={props.locale}
|
|
6884
6972
|
includeRefs={props.includeRefs}
|
|
@@ -6923,7 +7011,7 @@ function Symbol2(props) {
|
|
|
6923
7011
|
const [contentToUse, setContentToUse] = createSignal14(props.symbol?.content);
|
|
6924
7012
|
function className() {
|
|
6925
7013
|
return [
|
|
6926
|
-
...[props.attributes
|
|
7014
|
+
...[props.attributes[getClassPropName()]],
|
|
6927
7015
|
"builder-symbol",
|
|
6928
7016
|
props.symbol?.inline ? "builder-inline-symbol" : void 0,
|
|
6929
7017
|
props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -6964,6 +7052,7 @@ function Symbol2(props) {
|
|
|
6964
7052
|
}}
|
|
6965
7053
|
model={props.symbol?.model}
|
|
6966
7054
|
content={contentToUse()}
|
|
7055
|
+
linkComponent={props.builderLinkComponent}
|
|
6967
7056
|
/></div>;
|
|
6968
7057
|
}
|
|
6969
7058
|
var symbol_default = Symbol2;
|