@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/dist/index.d.ts +23 -14
- package/lib/browser/dev.js +250 -166
- package/lib/browser/dev.jsx +199 -130
- package/lib/browser/index.js +250 -166
- package/lib/browser/index.jsx +199 -130
- package/lib/edge/dev.js +250 -166
- package/lib/edge/dev.jsx +199 -130
- package/lib/edge/index.js +250 -166
- package/lib/edge/index.jsx +199 -130
- package/lib/node/dev.js +250 -166
- package/lib/node/dev.jsx +199 -130
- package/lib/node/index.js +250 -166
- package/lib/node/index.jsx +199 -130
- package/package.json +1 -1
package/lib/edge/index.jsx
CHANGED
|
@@ -6,36 +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
|
-
import {
|
|
12
|
-
|
|
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) {
|
|
13
21
|
return <Show
|
|
14
|
-
fallback={<
|
|
15
|
-
class={props.attributes.class + " " + css({
|
|
16
|
-
all: "unset"
|
|
17
|
-
})}
|
|
18
|
-
{...{}}
|
|
22
|
+
fallback={<Dynamic
|
|
19
23
|
{...props.attributes}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
25
36
|
{...props.attributes}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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>;
|
|
30
78
|
}
|
|
31
79
|
var button_default = Button;
|
|
32
80
|
|
|
33
81
|
// src/blocks/columns/columns.tsx
|
|
34
|
-
import { Show as
|
|
35
|
-
import { css as
|
|
82
|
+
import { Show as Show6, For as For4, createSignal as createSignal5 } from "solid-js";
|
|
83
|
+
import { css as css2 } from "solid-styled-components";
|
|
36
84
|
|
|
37
85
|
// src/components/blocks/blocks.tsx
|
|
38
|
-
import { useContext, Show as
|
|
86
|
+
import { useContext, Show as Show5, For as For3 } from "solid-js";
|
|
39
87
|
|
|
40
88
|
// src/context/builder.context.ts
|
|
41
89
|
import { createContext } from "solid-js";
|
|
@@ -59,7 +107,7 @@ import { createContext as createContext2 } from "solid-js";
|
|
|
59
107
|
var components_context_default = createContext2({ registeredComponents: {} });
|
|
60
108
|
|
|
61
109
|
// src/components/block/block.tsx
|
|
62
|
-
import { Show as
|
|
110
|
+
import { Show as Show4, For as For2, createSignal as createSignal4 } from "solid-js";
|
|
63
111
|
|
|
64
112
|
// src/functions/get-block-component-options.ts
|
|
65
113
|
function getBlockComponentOptions(block) {
|
|
@@ -86,9 +134,6 @@ function isBrowser() {
|
|
|
86
134
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
87
135
|
}
|
|
88
136
|
|
|
89
|
-
// src/constants/target.ts
|
|
90
|
-
var TARGET = "solid";
|
|
91
|
-
|
|
92
137
|
// src/functions/is-iframe.ts
|
|
93
138
|
function isIframe() {
|
|
94
139
|
return isBrowser() && window.self !== window.top;
|
|
@@ -3652,7 +3697,7 @@ function BlockStyles(props) {
|
|
|
3652
3697
|
}
|
|
3653
3698
|
return true;
|
|
3654
3699
|
}
|
|
3655
|
-
function
|
|
3700
|
+
function css4() {
|
|
3656
3701
|
const processedBlock = getProcessedBlock({
|
|
3657
3702
|
block: props.block,
|
|
3658
3703
|
localState: props.context.localState,
|
|
@@ -3695,7 +3740,7 @@ function BlockStyles(props) {
|
|
|
3695
3740
|
}) : "";
|
|
3696
3741
|
return [largeStylesClass, mediumStylesClass, smallStylesClass].join(" ");
|
|
3697
3742
|
}
|
|
3698
|
-
return <Show2 when={TARGET !== "reactNative" &&
|
|
3743
|
+
return <Show2 when={TARGET !== "reactNative" && css4() && canShowBlock()}><Inlined_styles_default styles={css4()} /></Show2>;
|
|
3699
3744
|
}
|
|
3700
3745
|
var Block_styles_default = BlockStyles;
|
|
3701
3746
|
|
|
@@ -3741,6 +3786,38 @@ function getBlockActions(options) {
|
|
|
3741
3786
|
return obj;
|
|
3742
3787
|
}
|
|
3743
3788
|
|
|
3789
|
+
// src/functions/transform-style-property.ts
|
|
3790
|
+
function transformStyleProperty({
|
|
3791
|
+
style
|
|
3792
|
+
}) {
|
|
3793
|
+
return style;
|
|
3794
|
+
}
|
|
3795
|
+
|
|
3796
|
+
// src/functions/get-style.ts
|
|
3797
|
+
var getStyle = ({
|
|
3798
|
+
block,
|
|
3799
|
+
context
|
|
3800
|
+
}) => {
|
|
3801
|
+
return mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
3802
|
+
style: block.style || {},
|
|
3803
|
+
context,
|
|
3804
|
+
block
|
|
3805
|
+
}));
|
|
3806
|
+
};
|
|
3807
|
+
function mapStyleObjToStrIfNeeded(style) {
|
|
3808
|
+
switch (TARGET) {
|
|
3809
|
+
case "svelte":
|
|
3810
|
+
case "vue":
|
|
3811
|
+
case "solid":
|
|
3812
|
+
return convertStyleMapToCSSArray(style).join(" ");
|
|
3813
|
+
case "qwik":
|
|
3814
|
+
case "reactNative":
|
|
3815
|
+
case "react":
|
|
3816
|
+
case "rsc":
|
|
3817
|
+
return style;
|
|
3818
|
+
}
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3744
3821
|
// src/functions/transform-block-properties.ts
|
|
3745
3822
|
function transformBlockProperties({
|
|
3746
3823
|
properties
|
|
@@ -3762,8 +3839,11 @@ function getBlockProperties({
|
|
|
3762
3839
|
...extractRelevantRootBlockProperties(block),
|
|
3763
3840
|
...block.properties,
|
|
3764
3841
|
"builder-id": block.id,
|
|
3765
|
-
style:
|
|
3766
|
-
|
|
3842
|
+
style: getStyle({
|
|
3843
|
+
block,
|
|
3844
|
+
context
|
|
3845
|
+
}),
|
|
3846
|
+
[getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
|
|
3767
3847
|
};
|
|
3768
3848
|
return transformBlockProperties({
|
|
3769
3849
|
properties,
|
|
@@ -3771,53 +3851,6 @@ function getBlockProperties({
|
|
|
3771
3851
|
block
|
|
3772
3852
|
});
|
|
3773
3853
|
}
|
|
3774
|
-
function getStyleAttribute(style) {
|
|
3775
|
-
switch (TARGET) {
|
|
3776
|
-
case "svelte":
|
|
3777
|
-
case "vue":
|
|
3778
|
-
case "solid":
|
|
3779
|
-
return convertStyleMapToCSSArray(style).join(" ");
|
|
3780
|
-
case "qwik":
|
|
3781
|
-
case "reactNative":
|
|
3782
|
-
case "react":
|
|
3783
|
-
case "rsc":
|
|
3784
|
-
return style;
|
|
3785
|
-
}
|
|
3786
|
-
}
|
|
3787
|
-
|
|
3788
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3789
|
-
import { Show as Show3 } from "solid-js";
|
|
3790
|
-
import { Dynamic } from "solid-js/web";
|
|
3791
|
-
|
|
3792
|
-
// src/components/dynamic-renderer/dynamic-renderer.helpers.ts
|
|
3793
|
-
var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
3794
|
-
var isEmptyElement = (tagName) => {
|
|
3795
|
-
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
3796
|
-
};
|
|
3797
|
-
|
|
3798
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3799
|
-
function DynamicRenderer(props) {
|
|
3800
|
-
return <Show3
|
|
3801
|
-
fallback={<Dynamic
|
|
3802
|
-
{...props.attributes}
|
|
3803
|
-
{...props.actionAttributes}
|
|
3804
|
-
component={props.TagName}
|
|
3805
|
-
/>}
|
|
3806
|
-
when={!isEmptyElement(props.TagName)}
|
|
3807
|
-
><Show3
|
|
3808
|
-
fallback={<Dynamic
|
|
3809
|
-
{...props.attributes}
|
|
3810
|
-
{...props.actionAttributes}
|
|
3811
|
-
component={props.TagName}
|
|
3812
|
-
>{props.children}</Dynamic>}
|
|
3813
|
-
when={typeof props.TagName === "string"}
|
|
3814
|
-
><Dynamic
|
|
3815
|
-
{...props.attributes}
|
|
3816
|
-
{...props.actionAttributes}
|
|
3817
|
-
component={props.TagName}
|
|
3818
|
-
>{props.children}</Dynamic></Show3></Show3>;
|
|
3819
|
-
}
|
|
3820
|
-
var Dynamic_renderer_default = DynamicRenderer;
|
|
3821
3854
|
|
|
3822
3855
|
// src/components/block/components/block-wrapper.tsx
|
|
3823
3856
|
function BlockWrapper(props) {
|
|
@@ -3840,7 +3873,7 @@ function BlockWrapper(props) {
|
|
|
3840
3873
|
var Block_wrapper_default = BlockWrapper;
|
|
3841
3874
|
|
|
3842
3875
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
3843
|
-
import { Show as
|
|
3876
|
+
import { Show as Show3, For, createSignal as createSignal2 } from "solid-js";
|
|
3844
3877
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
3845
3878
|
|
|
3846
3879
|
// src/components/block/components/interactive-element.tsx
|
|
@@ -3904,12 +3937,13 @@ function ComponentRef(props) {
|
|
|
3904
3937
|
const [Wrapper, setWrapper] = createSignal2(
|
|
3905
3938
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
3906
3939
|
);
|
|
3907
|
-
return <
|
|
3940
|
+
return <Show3 when={props.componentRef}><Dynamic3
|
|
3908
3941
|
{...getWrapperProps({
|
|
3909
3942
|
componentOptions: props.componentOptions,
|
|
3910
3943
|
builderBlock: props.builderBlock,
|
|
3911
3944
|
context: props.context,
|
|
3912
3945
|
componentRef: props.componentRef,
|
|
3946
|
+
linkComponent: props.linkComponent,
|
|
3913
3947
|
includeBlockProps: props.includeBlockProps,
|
|
3914
3948
|
isInteractive: props.isInteractive,
|
|
3915
3949
|
contextValue: props.context
|
|
@@ -3922,8 +3956,9 @@ function ComponentRef(props) {
|
|
|
3922
3956
|
block={child}
|
|
3923
3957
|
context={props.context}
|
|
3924
3958
|
registeredComponents={props.registeredComponents}
|
|
3959
|
+
linkComponent={props.linkComponent}
|
|
3925
3960
|
/>;
|
|
3926
|
-
}}</For></Dynamic3></
|
|
3961
|
+
}}</For></Dynamic3></Show3>;
|
|
3927
3962
|
}
|
|
3928
3963
|
var Component_ref_default = ComponentRef;
|
|
3929
3964
|
|
|
@@ -3935,6 +3970,7 @@ function RepeatedBlock(props) {
|
|
|
3935
3970
|
block={props.block}
|
|
3936
3971
|
context={store()}
|
|
3937
3972
|
registeredComponents={props.registeredComponents}
|
|
3973
|
+
linkComponent={props.linkComponent}
|
|
3938
3974
|
/></builder_context_default.Provider>;
|
|
3939
3975
|
}
|
|
3940
3976
|
var Repeated_block_default = RepeatedBlock;
|
|
@@ -3966,6 +4002,10 @@ function Block(props) {
|
|
|
3966
4002
|
});
|
|
3967
4003
|
}
|
|
3968
4004
|
function Tag() {
|
|
4005
|
+
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
4006
|
+
if (shouldUseLink) {
|
|
4007
|
+
return props.linkComponent || "a";
|
|
4008
|
+
}
|
|
3969
4009
|
return props.block.tagName || "div";
|
|
3970
4010
|
}
|
|
3971
4011
|
function canShowBlock() {
|
|
@@ -3989,32 +4029,37 @@ function Block(props) {
|
|
|
3989
4029
|
componentOptions: {
|
|
3990
4030
|
...getBlockComponentOptions(processedBlock()),
|
|
3991
4031
|
builderContext: props.context,
|
|
4032
|
+
...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
4033
|
+
builderLinkComponent: props.linkComponent
|
|
4034
|
+
} : {},
|
|
3992
4035
|
...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
3993
4036
|
builderComponents: props.registeredComponents
|
|
3994
4037
|
} : {}
|
|
3995
4038
|
},
|
|
3996
4039
|
context: childrenContext(),
|
|
4040
|
+
linkComponent: props.linkComponent,
|
|
3997
4041
|
registeredComponents: props.registeredComponents,
|
|
3998
4042
|
builderBlock: processedBlock(),
|
|
3999
4043
|
includeBlockProps: blockComponent()?.noWrap === true,
|
|
4000
4044
|
isInteractive: !blockComponent()?.isRSC
|
|
4001
4045
|
};
|
|
4002
4046
|
}
|
|
4003
|
-
return <
|
|
4047
|
+
return <Show4 when={canShowBlock()}>
|
|
4004
4048
|
<Block_styles_default block={props.block} context={props.context} />
|
|
4005
|
-
<
|
|
4049
|
+
<Show4
|
|
4006
4050
|
fallback={<Component_ref_default
|
|
4007
4051
|
componentRef={componentRefProps().componentRef}
|
|
4008
4052
|
componentOptions={componentRefProps().componentOptions}
|
|
4009
4053
|
blockChildren={componentRefProps().blockChildren}
|
|
4010
4054
|
context={componentRefProps().context}
|
|
4011
4055
|
registeredComponents={componentRefProps().registeredComponents}
|
|
4056
|
+
linkComponent={componentRefProps().linkComponent}
|
|
4012
4057
|
builderBlock={componentRefProps().builderBlock}
|
|
4013
4058
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
4014
4059
|
isInteractive={componentRefProps().isInteractive}
|
|
4015
4060
|
/>}
|
|
4016
4061
|
when={!blockComponent()?.noWrap}
|
|
4017
|
-
><
|
|
4062
|
+
><Show4
|
|
4018
4063
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
4019
4064
|
const index = _index();
|
|
4020
4065
|
return <Repeated_block_default
|
|
@@ -4022,6 +4067,7 @@ function Block(props) {
|
|
|
4022
4067
|
repeatContext={data.context}
|
|
4023
4068
|
block={data.block}
|
|
4024
4069
|
registeredComponents={props.registeredComponents}
|
|
4070
|
+
linkComponent={props.linkComponent}
|
|
4025
4071
|
/>;
|
|
4026
4072
|
}}</For2>}
|
|
4027
4073
|
when={!repeatItem()}
|
|
@@ -4029,6 +4075,7 @@ function Block(props) {
|
|
|
4029
4075
|
Wrapper={Tag()}
|
|
4030
4076
|
block={processedBlock()}
|
|
4031
4077
|
context={props.context}
|
|
4078
|
+
linkComponent={props.linkComponent}
|
|
4032
4079
|
>
|
|
4033
4080
|
<Component_ref_default
|
|
4034
4081
|
componentRef={componentRefProps().componentRef}
|
|
@@ -4036,6 +4083,7 @@ function Block(props) {
|
|
|
4036
4083
|
blockChildren={componentRefProps().blockChildren}
|
|
4037
4084
|
context={componentRefProps().context}
|
|
4038
4085
|
registeredComponents={componentRefProps().registeredComponents}
|
|
4086
|
+
linkComponent={componentRefProps().linkComponent}
|
|
4039
4087
|
builderBlock={componentRefProps().builderBlock}
|
|
4040
4088
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
4041
4089
|
isInteractive={componentRefProps().isInteractive}
|
|
@@ -4047,16 +4095,17 @@ function Block(props) {
|
|
|
4047
4095
|
block={child}
|
|
4048
4096
|
context={childrenContext()}
|
|
4049
4097
|
registeredComponents={props.registeredComponents}
|
|
4098
|
+
linkComponent={props.linkComponent}
|
|
4050
4099
|
/>;
|
|
4051
4100
|
}}</For2>
|
|
4052
|
-
</Block_wrapper_default></
|
|
4053
|
-
</
|
|
4101
|
+
</Block_wrapper_default></Show4></Show4>
|
|
4102
|
+
</Show4>;
|
|
4054
4103
|
}
|
|
4055
4104
|
var Block_default = Block;
|
|
4056
4105
|
|
|
4057
4106
|
// src/components/blocks/blocks-wrapper.tsx
|
|
4058
4107
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
4059
|
-
import { css
|
|
4108
|
+
import { css } from "solid-styled-components";
|
|
4060
4109
|
function BlocksWrapper(props) {
|
|
4061
4110
|
function className() {
|
|
4062
4111
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
@@ -4090,7 +4139,7 @@ function BlocksWrapper(props) {
|
|
|
4090
4139
|
}
|
|
4091
4140
|
}
|
|
4092
4141
|
return <Dynamic4
|
|
4093
|
-
class={className() + " " +
|
|
4142
|
+
class={className() + " " + css({
|
|
4094
4143
|
display: "flex",
|
|
4095
4144
|
flexDirection: "column",
|
|
4096
4145
|
alignItems: "stretch"
|
|
@@ -4119,15 +4168,16 @@ function Blocks(props) {
|
|
|
4119
4168
|
styleProp={props.styleProp}
|
|
4120
4169
|
BlocksWrapper={props.context?.BlocksWrapper}
|
|
4121
4170
|
BlocksWrapperProps={props.context?.BlocksWrapperProps}
|
|
4122
|
-
><
|
|
4171
|
+
><Show5 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
|
|
4123
4172
|
const index = _index();
|
|
4124
4173
|
return <Block_default
|
|
4125
4174
|
key={block.id}
|
|
4126
4175
|
block={block}
|
|
4176
|
+
linkComponent={props.linkComponent}
|
|
4127
4177
|
context={props.context || builderContext}
|
|
4128
4178
|
registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
|
|
4129
4179
|
/>;
|
|
4130
|
-
}}</For3></
|
|
4180
|
+
}}</For3></Show5></Blocks_wrapper_default>;
|
|
4131
4181
|
}
|
|
4132
4182
|
var Blocks_default = Blocks;
|
|
4133
4183
|
|
|
@@ -4176,7 +4226,13 @@ function Columns(props) {
|
|
|
4176
4226
|
const mobileWidth = "100%";
|
|
4177
4227
|
const mobileMarginLeft = 0;
|
|
4178
4228
|
const marginLeftKey = "margin-left";
|
|
4229
|
+
const sharedStyles = {
|
|
4230
|
+
display: "flex",
|
|
4231
|
+
flexDirection: "column",
|
|
4232
|
+
alignItems: "stretch"
|
|
4233
|
+
};
|
|
4179
4234
|
return {
|
|
4235
|
+
...sharedStyles,
|
|
4180
4236
|
width,
|
|
4181
4237
|
[marginLeftKey]: gutterPixels,
|
|
4182
4238
|
"--column-width-mobile": getMobileStyle({
|
|
@@ -4231,25 +4287,28 @@ function Columns(props) {
|
|
|
4231
4287
|
`;
|
|
4232
4288
|
}
|
|
4233
4289
|
return <div
|
|
4234
|
-
class={`builder-columns ${props.builderBlock.id}-breakpoints ` +
|
|
4290
|
+
class={`builder-columns ${props.builderBlock.id}-breakpoints ` + css2({
|
|
4235
4291
|
display: "flex",
|
|
4236
4292
|
lineHeight: "normal"
|
|
4237
4293
|
})}
|
|
4238
4294
|
style={columnsCssVars()}
|
|
4239
4295
|
{...{}}
|
|
4240
4296
|
>
|
|
4241
|
-
<
|
|
4297
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show6>
|
|
4242
4298
|
<For4 each={props.columns}>{(column, _index) => {
|
|
4243
4299
|
const index = _index();
|
|
4244
|
-
return <
|
|
4245
|
-
class={"builder-column " + css3({
|
|
4246
|
-
display: "flex",
|
|
4247
|
-
flexDirection: "column",
|
|
4248
|
-
alignItems: "stretch"
|
|
4249
|
-
})}
|
|
4250
|
-
style={columnCssVars(index)}
|
|
4251
|
-
{...{}}
|
|
4300
|
+
return <Dynamic_renderer_default
|
|
4252
4301
|
key={index}
|
|
4302
|
+
TagName={column.link ? props.builderLinkComponent || "a" : "div"}
|
|
4303
|
+
actionAttributes={{}}
|
|
4304
|
+
attributes={{
|
|
4305
|
+
...{},
|
|
4306
|
+
...column.link ? {
|
|
4307
|
+
href: column.link
|
|
4308
|
+
} : {},
|
|
4309
|
+
[getClassPropName()]: "builder-column",
|
|
4310
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
4311
|
+
}}
|
|
4253
4312
|
><Blocks_default
|
|
4254
4313
|
path={`component.options.columns.${index}.blocks`}
|
|
4255
4314
|
parent={props.builderBlock.id}
|
|
@@ -4258,8 +4317,9 @@ function Columns(props) {
|
|
|
4258
4317
|
}}
|
|
4259
4318
|
context={props.builderContext}
|
|
4260
4319
|
registeredComponents={props.builderComponents}
|
|
4320
|
+
linkComponent={props.builderLinkComponent}
|
|
4261
4321
|
blocks={column.blocks}
|
|
4262
|
-
/></
|
|
4322
|
+
/></Dynamic_renderer_default>;
|
|
4263
4323
|
}}</For4>
|
|
4264
4324
|
</div>;
|
|
4265
4325
|
}
|
|
@@ -4272,8 +4332,8 @@ function FragmentComponent(props) {
|
|
|
4272
4332
|
var fragment_default = FragmentComponent;
|
|
4273
4333
|
|
|
4274
4334
|
// src/blocks/image/image.tsx
|
|
4275
|
-
import { Show as
|
|
4276
|
-
import { css as
|
|
4335
|
+
import { Show as Show7 } from "solid-js";
|
|
4336
|
+
import { css as css3 } from "solid-styled-components";
|
|
4277
4337
|
|
|
4278
4338
|
// src/blocks/image/image.helpers.ts
|
|
4279
4339
|
function removeProtocol(path) {
|
|
@@ -4361,9 +4421,9 @@ function Image(props) {
|
|
|
4361
4421
|
}
|
|
4362
4422
|
return <>
|
|
4363
4423
|
<picture>
|
|
4364
|
-
<
|
|
4424
|
+
<Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
|
|
4365
4425
|
<img
|
|
4366
|
-
class={"builder-image" + (props.className ? " " + props.className : "") + " " +
|
|
4426
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " " + css3({
|
|
4367
4427
|
opacity: "1",
|
|
4368
4428
|
transition: "opacity 0.2s ease-in-out"
|
|
4369
4429
|
})}
|
|
@@ -4380,10 +4440,10 @@ function Image(props) {
|
|
|
4380
4440
|
sizes={props.sizes}
|
|
4381
4441
|
/>
|
|
4382
4442
|
</picture>
|
|
4383
|
-
<
|
|
4443
|
+
<Show7
|
|
4384
4444
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
4385
4445
|
><div
|
|
4386
|
-
class={"builder-image-sizer " +
|
|
4446
|
+
class={"builder-image-sizer " + css3({
|
|
4387
4447
|
width: "100%",
|
|
4388
4448
|
pointerEvents: "none",
|
|
4389
4449
|
fontSize: "0"
|
|
@@ -4391,10 +4451,10 @@ function Image(props) {
|
|
|
4391
4451
|
style={{
|
|
4392
4452
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
4393
4453
|
}}
|
|
4394
|
-
/></
|
|
4395
|
-
<
|
|
4396
|
-
<
|
|
4397
|
-
class={
|
|
4454
|
+
/></Show7>
|
|
4455
|
+
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
4456
|
+
<Show7 when={!props.fitContent && props.children}><div
|
|
4457
|
+
class={css3({
|
|
4398
4458
|
display: "flex",
|
|
4399
4459
|
flexDirection: "column",
|
|
4400
4460
|
alignItems: "stretch",
|
|
@@ -4404,7 +4464,7 @@ function Image(props) {
|
|
|
4404
4464
|
width: "100%",
|
|
4405
4465
|
height: "100%"
|
|
4406
4466
|
})}
|
|
4407
|
-
>{props.children}</div></
|
|
4467
|
+
>{props.children}</div></Show7>
|
|
4408
4468
|
</>;
|
|
4409
4469
|
}
|
|
4410
4470
|
var image_default = Image;
|
|
@@ -4434,7 +4494,7 @@ var section_default = SectionComponent;
|
|
|
4434
4494
|
import { onMount as onMount4, on as on3, createEffect as createEffect3, createSignal as createSignal14 } from "solid-js";
|
|
4435
4495
|
|
|
4436
4496
|
// src/components/content-variants/content-variants.tsx
|
|
4437
|
-
import { Show as
|
|
4497
|
+
import { Show as Show11, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
|
|
4438
4498
|
|
|
4439
4499
|
// src/helpers/url.ts
|
|
4440
4500
|
var getTopLevelDomain = (host) => {
|
|
@@ -4628,7 +4688,7 @@ var handleABTesting = async ({
|
|
|
4628
4688
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
4629
4689
|
|
|
4630
4690
|
// src/components/content/content.tsx
|
|
4631
|
-
import { Show as
|
|
4691
|
+
import { Show as Show10, createSignal as createSignal12 } from "solid-js";
|
|
4632
4692
|
|
|
4633
4693
|
// src/blocks/button/component-info.ts
|
|
4634
4694
|
var componentInfo = {
|
|
@@ -5434,7 +5494,7 @@ var componentInfo12 = {
|
|
|
5434
5494
|
};
|
|
5435
5495
|
|
|
5436
5496
|
// src/blocks/video/video.tsx
|
|
5437
|
-
import { Show as
|
|
5497
|
+
import { Show as Show8 } from "solid-js";
|
|
5438
5498
|
function Video(props) {
|
|
5439
5499
|
function videoProps() {
|
|
5440
5500
|
return {
|
|
@@ -5485,8 +5545,8 @@ function Video(props) {
|
|
|
5485
5545
|
}}
|
|
5486
5546
|
src={props.video || "no-src"}
|
|
5487
5547
|
poster={props.posterImage}
|
|
5488
|
-
><
|
|
5489
|
-
<
|
|
5548
|
+
><Show8 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show8></video>
|
|
5549
|
+
<Show8
|
|
5490
5550
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
5491
5551
|
><div
|
|
5492
5552
|
style={{
|
|
@@ -5495,15 +5555,15 @@ function Video(props) {
|
|
|
5495
5555
|
"pointer-events": "none",
|
|
5496
5556
|
"font-size": "0px"
|
|
5497
5557
|
}}
|
|
5498
|
-
/></
|
|
5499
|
-
<
|
|
5558
|
+
/></Show8>
|
|
5559
|
+
<Show8 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
5500
5560
|
style={{
|
|
5501
5561
|
display: "flex",
|
|
5502
5562
|
"flex-direction": "column",
|
|
5503
5563
|
"align-items": "stretch"
|
|
5504
5564
|
}}
|
|
5505
|
-
>{props.children}</div></
|
|
5506
|
-
<
|
|
5565
|
+
>{props.children}</div></Show8>
|
|
5566
|
+
<Show8 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
5507
5567
|
style={{
|
|
5508
5568
|
"pointer-events": "none",
|
|
5509
5569
|
display: "flex",
|
|
@@ -5515,7 +5575,7 @@ function Video(props) {
|
|
|
5515
5575
|
width: "100%",
|
|
5516
5576
|
height: "100%"
|
|
5517
5577
|
}}
|
|
5518
|
-
>{props.children}</div></
|
|
5578
|
+
>{props.children}</div></Show8>
|
|
5519
5579
|
</div>;
|
|
5520
5580
|
}
|
|
5521
5581
|
var video_default = Video;
|
|
@@ -5635,7 +5695,7 @@ function InlinedScript(props) {
|
|
|
5635
5695
|
var Inlined_script_default = InlinedScript;
|
|
5636
5696
|
|
|
5637
5697
|
// src/components/content/components/enable-editor.tsx
|
|
5638
|
-
import { Show as
|
|
5698
|
+
import { Show as Show9, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
|
|
5639
5699
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
5640
5700
|
|
|
5641
5701
|
// src/helpers/preview-lru-cache/get.ts
|
|
@@ -6125,7 +6185,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6125
6185
|
};
|
|
6126
6186
|
|
|
6127
6187
|
// src/constants/sdk-version.ts
|
|
6128
|
-
var SDK_VERSION = "0.12.
|
|
6188
|
+
var SDK_VERSION = "0.12.4";
|
|
6129
6189
|
|
|
6130
6190
|
// src/functions/register.ts
|
|
6131
6191
|
var registry = {};
|
|
@@ -6547,7 +6607,7 @@ function EnableEditor(props) {
|
|
|
6547
6607
|
}
|
|
6548
6608
|
}
|
|
6549
6609
|
createEffect2(on2(() => [props.locale], onUpdateFn_6));
|
|
6550
|
-
return <builder_context_default.Provider value={props.builderContextSignal}><
|
|
6610
|
+
return <builder_context_default.Provider value={props.builderContextSignal}><Show9 when={props.builderContextSignal.content}><Dynamic5
|
|
6551
6611
|
class={`variant-${props.content?.testVariationId || props.content?.id}`}
|
|
6552
6612
|
{...{}}
|
|
6553
6613
|
key={forceReRenderCount()}
|
|
@@ -6562,7 +6622,7 @@ function EnableEditor(props) {
|
|
|
6562
6622
|
}}
|
|
6563
6623
|
{...props.contentWrapperProps}
|
|
6564
6624
|
component={ContentWrapper()}
|
|
6565
|
-
>{props.children}</Dynamic5></
|
|
6625
|
+
>{props.children}</Dynamic5></Show9></builder_context_default.Provider>;
|
|
6566
6626
|
}
|
|
6567
6627
|
var Enable_editor_default = EnableEditor;
|
|
6568
6628
|
|
|
@@ -6636,6 +6696,10 @@ ${getFontCss({
|
|
|
6636
6696
|
customFonts: props.customFonts
|
|
6637
6697
|
})}
|
|
6638
6698
|
|
|
6699
|
+
.builder-button {
|
|
6700
|
+
all: unset;
|
|
6701
|
+
}
|
|
6702
|
+
|
|
6639
6703
|
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
6640
6704
|
margin: 0;
|
|
6641
6705
|
}
|
|
@@ -6780,21 +6844,23 @@ function ContentComponent(props) {
|
|
|
6780
6844
|
builderContextSignal={builderContextSignal()}
|
|
6781
6845
|
contentWrapper={props.contentWrapper}
|
|
6782
6846
|
contentWrapperProps={props.contentWrapperProps}
|
|
6847
|
+
linkComponent={props.linkComponent}
|
|
6783
6848
|
trustedHosts={props.trustedHosts}
|
|
6784
6849
|
{...{
|
|
6785
6850
|
setBuilderContextSignal
|
|
6786
6851
|
}}
|
|
6787
6852
|
>
|
|
6788
|
-
<
|
|
6789
|
-
<
|
|
6853
|
+
<Show10 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show10>
|
|
6854
|
+
<Show10 when={TARGET !== "reactNative"}><Styles_default
|
|
6790
6855
|
contentId={builderContextSignal().content?.id}
|
|
6791
6856
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
6792
6857
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
6793
|
-
/></
|
|
6858
|
+
/></Show10>
|
|
6794
6859
|
<Blocks_default
|
|
6795
6860
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
6796
6861
|
context={builderContextSignal()}
|
|
6797
6862
|
registeredComponents={registeredComponents()}
|
|
6863
|
+
linkComponent={props.linkComponent}
|
|
6798
6864
|
/>
|
|
6799
6865
|
</Enable_editor_default></components_context_default.Provider>;
|
|
6800
6866
|
}
|
|
@@ -6833,8 +6899,8 @@ function ContentVariants(props) {
|
|
|
6833
6899
|
setShouldRenderVariants(false);
|
|
6834
6900
|
});
|
|
6835
6901
|
return <>
|
|
6836
|
-
<
|
|
6837
|
-
<
|
|
6902
|
+
<Show11 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show11>
|
|
6903
|
+
<Show11 when={shouldRenderVariants()}>
|
|
6838
6904
|
<Inlined_styles_default
|
|
6839
6905
|
id={`variants-styles-${props.content?.id}`}
|
|
6840
6906
|
styles={hideVariantsStyleString()}
|
|
@@ -6854,6 +6920,7 @@ function ContentVariants(props) {
|
|
|
6854
6920
|
apiKey={props.apiKey}
|
|
6855
6921
|
apiVersion={props.apiVersion}
|
|
6856
6922
|
customComponents={props.customComponents}
|
|
6923
|
+
linkComponent={props.linkComponent}
|
|
6857
6924
|
canTrack={props.canTrack}
|
|
6858
6925
|
locale={props.locale}
|
|
6859
6926
|
includeRefs={props.includeRefs}
|
|
@@ -6866,7 +6933,7 @@ function ContentVariants(props) {
|
|
|
6866
6933
|
trustedHosts={props.trustedHosts}
|
|
6867
6934
|
/>;
|
|
6868
6935
|
}}</For5>
|
|
6869
|
-
</
|
|
6936
|
+
</Show11>
|
|
6870
6937
|
<Content_default
|
|
6871
6938
|
{...{}}
|
|
6872
6939
|
content={defaultContent()}
|
|
@@ -6877,6 +6944,7 @@ function ContentVariants(props) {
|
|
|
6877
6944
|
apiKey={props.apiKey}
|
|
6878
6945
|
apiVersion={props.apiVersion}
|
|
6879
6946
|
customComponents={props.customComponents}
|
|
6947
|
+
linkComponent={props.linkComponent}
|
|
6880
6948
|
canTrack={props.canTrack}
|
|
6881
6949
|
locale={props.locale}
|
|
6882
6950
|
includeRefs={props.includeRefs}
|
|
@@ -6921,7 +6989,7 @@ function Symbol2(props) {
|
|
|
6921
6989
|
const [contentToUse, setContentToUse] = createSignal14(props.symbol?.content);
|
|
6922
6990
|
function className() {
|
|
6923
6991
|
return [
|
|
6924
|
-
...[props.attributes
|
|
6992
|
+
...[props.attributes[getClassPropName()]],
|
|
6925
6993
|
"builder-symbol",
|
|
6926
6994
|
props.symbol?.inline ? "builder-inline-symbol" : void 0,
|
|
6927
6995
|
props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -6962,6 +7030,7 @@ function Symbol2(props) {
|
|
|
6962
7030
|
}}
|
|
6963
7031
|
model={props.symbol?.model}
|
|
6964
7032
|
content={contentToUse()}
|
|
7033
|
+
linkComponent={props.builderLinkComponent}
|
|
6965
7034
|
/></div>;
|
|
6966
7035
|
}
|
|
6967
7036
|
var symbol_default = Symbol2;
|