@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/dev.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) {
|
|
@@ -87,9 +135,6 @@ function isBrowser() {
|
|
|
87
135
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
88
136
|
}
|
|
89
137
|
|
|
90
|
-
// src/constants/target.ts
|
|
91
|
-
var TARGET = "solid";
|
|
92
|
-
|
|
93
138
|
// src/functions/is-iframe.ts
|
|
94
139
|
function isIframe() {
|
|
95
140
|
return isBrowser() && window.self !== window.top;
|
|
@@ -3657,7 +3702,7 @@ function BlockStyles(props) {
|
|
|
3657
3702
|
}
|
|
3658
3703
|
return true;
|
|
3659
3704
|
}
|
|
3660
|
-
function
|
|
3705
|
+
function css4() {
|
|
3661
3706
|
const processedBlock = getProcessedBlock({
|
|
3662
3707
|
block: props.block,
|
|
3663
3708
|
localState: props.context.localState,
|
|
@@ -3700,7 +3745,7 @@ function BlockStyles(props) {
|
|
|
3700
3745
|
}) : "";
|
|
3701
3746
|
return [largeStylesClass, mediumStylesClass, smallStylesClass].join(" ");
|
|
3702
3747
|
}
|
|
3703
|
-
return <Show2 when={TARGET !== "reactNative" &&
|
|
3748
|
+
return <Show2 when={TARGET !== "reactNative" && css4() && canShowBlock()}><Inlined_styles_default styles={css4()} /></Show2>;
|
|
3704
3749
|
}
|
|
3705
3750
|
var Block_styles_default = BlockStyles;
|
|
3706
3751
|
|
|
@@ -3746,6 +3791,38 @@ function getBlockActions(options) {
|
|
|
3746
3791
|
return obj;
|
|
3747
3792
|
}
|
|
3748
3793
|
|
|
3794
|
+
// src/functions/transform-style-property.ts
|
|
3795
|
+
function transformStyleProperty({
|
|
3796
|
+
style
|
|
3797
|
+
}) {
|
|
3798
|
+
return style;
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
// src/functions/get-style.ts
|
|
3802
|
+
var getStyle = ({
|
|
3803
|
+
block,
|
|
3804
|
+
context
|
|
3805
|
+
}) => {
|
|
3806
|
+
return mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
3807
|
+
style: block.style || {},
|
|
3808
|
+
context,
|
|
3809
|
+
block
|
|
3810
|
+
}));
|
|
3811
|
+
};
|
|
3812
|
+
function mapStyleObjToStrIfNeeded(style) {
|
|
3813
|
+
switch (TARGET) {
|
|
3814
|
+
case "svelte":
|
|
3815
|
+
case "vue":
|
|
3816
|
+
case "solid":
|
|
3817
|
+
return convertStyleMapToCSSArray(style).join(" ");
|
|
3818
|
+
case "qwik":
|
|
3819
|
+
case "reactNative":
|
|
3820
|
+
case "react":
|
|
3821
|
+
case "rsc":
|
|
3822
|
+
return style;
|
|
3823
|
+
}
|
|
3824
|
+
}
|
|
3825
|
+
|
|
3749
3826
|
// src/functions/transform-block-properties.ts
|
|
3750
3827
|
function transformBlockProperties({
|
|
3751
3828
|
properties
|
|
@@ -3767,8 +3844,11 @@ function getBlockProperties({
|
|
|
3767
3844
|
...extractRelevantRootBlockProperties(block),
|
|
3768
3845
|
...block.properties,
|
|
3769
3846
|
"builder-id": block.id,
|
|
3770
|
-
style:
|
|
3771
|
-
|
|
3847
|
+
style: getStyle({
|
|
3848
|
+
block,
|
|
3849
|
+
context
|
|
3850
|
+
}),
|
|
3851
|
+
[getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
|
|
3772
3852
|
};
|
|
3773
3853
|
return transformBlockProperties({
|
|
3774
3854
|
properties,
|
|
@@ -3776,53 +3856,6 @@ function getBlockProperties({
|
|
|
3776
3856
|
block
|
|
3777
3857
|
});
|
|
3778
3858
|
}
|
|
3779
|
-
function getStyleAttribute(style) {
|
|
3780
|
-
switch (TARGET) {
|
|
3781
|
-
case "svelte":
|
|
3782
|
-
case "vue":
|
|
3783
|
-
case "solid":
|
|
3784
|
-
return convertStyleMapToCSSArray(style).join(" ");
|
|
3785
|
-
case "qwik":
|
|
3786
|
-
case "reactNative":
|
|
3787
|
-
case "react":
|
|
3788
|
-
case "rsc":
|
|
3789
|
-
return style;
|
|
3790
|
-
}
|
|
3791
|
-
}
|
|
3792
|
-
|
|
3793
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3794
|
-
import { Show as Show3 } from "solid-js";
|
|
3795
|
-
import { Dynamic } from "solid-js/web";
|
|
3796
|
-
|
|
3797
|
-
// src/components/dynamic-renderer/dynamic-renderer.helpers.ts
|
|
3798
|
-
var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
3799
|
-
var isEmptyElement = (tagName) => {
|
|
3800
|
-
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
3801
|
-
};
|
|
3802
|
-
|
|
3803
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3804
|
-
function DynamicRenderer(props) {
|
|
3805
|
-
return <Show3
|
|
3806
|
-
fallback={<Dynamic
|
|
3807
|
-
{...props.attributes}
|
|
3808
|
-
{...props.actionAttributes}
|
|
3809
|
-
component={props.TagName}
|
|
3810
|
-
/>}
|
|
3811
|
-
when={!isEmptyElement(props.TagName)}
|
|
3812
|
-
><Show3
|
|
3813
|
-
fallback={<Dynamic
|
|
3814
|
-
{...props.attributes}
|
|
3815
|
-
{...props.actionAttributes}
|
|
3816
|
-
component={props.TagName}
|
|
3817
|
-
>{props.children}</Dynamic>}
|
|
3818
|
-
when={typeof props.TagName === "string"}
|
|
3819
|
-
><Dynamic
|
|
3820
|
-
{...props.attributes}
|
|
3821
|
-
{...props.actionAttributes}
|
|
3822
|
-
component={props.TagName}
|
|
3823
|
-
>{props.children}</Dynamic></Show3></Show3>;
|
|
3824
|
-
}
|
|
3825
|
-
var Dynamic_renderer_default = DynamicRenderer;
|
|
3826
3859
|
|
|
3827
3860
|
// src/components/block/components/block-wrapper.tsx
|
|
3828
3861
|
function BlockWrapper(props) {
|
|
@@ -3845,7 +3878,7 @@ function BlockWrapper(props) {
|
|
|
3845
3878
|
var Block_wrapper_default = BlockWrapper;
|
|
3846
3879
|
|
|
3847
3880
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
3848
|
-
import { Show as
|
|
3881
|
+
import { Show as Show3, For, createSignal as createSignal2 } from "solid-js";
|
|
3849
3882
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
3850
3883
|
|
|
3851
3884
|
// src/components/block/components/interactive-element.tsx
|
|
@@ -3909,12 +3942,13 @@ function ComponentRef(props) {
|
|
|
3909
3942
|
const [Wrapper, setWrapper] = createSignal2(
|
|
3910
3943
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
3911
3944
|
);
|
|
3912
|
-
return <
|
|
3945
|
+
return <Show3 when={props.componentRef}><Dynamic3
|
|
3913
3946
|
{...getWrapperProps({
|
|
3914
3947
|
componentOptions: props.componentOptions,
|
|
3915
3948
|
builderBlock: props.builderBlock,
|
|
3916
3949
|
context: props.context,
|
|
3917
3950
|
componentRef: props.componentRef,
|
|
3951
|
+
linkComponent: props.linkComponent,
|
|
3918
3952
|
includeBlockProps: props.includeBlockProps,
|
|
3919
3953
|
isInteractive: props.isInteractive,
|
|
3920
3954
|
contextValue: props.context
|
|
@@ -3927,8 +3961,9 @@ function ComponentRef(props) {
|
|
|
3927
3961
|
block={child}
|
|
3928
3962
|
context={props.context}
|
|
3929
3963
|
registeredComponents={props.registeredComponents}
|
|
3964
|
+
linkComponent={props.linkComponent}
|
|
3930
3965
|
/>;
|
|
3931
|
-
}}</For></Dynamic3></
|
|
3966
|
+
}}</For></Dynamic3></Show3>;
|
|
3932
3967
|
}
|
|
3933
3968
|
var Component_ref_default = ComponentRef;
|
|
3934
3969
|
|
|
@@ -3940,6 +3975,7 @@ function RepeatedBlock(props) {
|
|
|
3940
3975
|
block={props.block}
|
|
3941
3976
|
context={store()}
|
|
3942
3977
|
registeredComponents={props.registeredComponents}
|
|
3978
|
+
linkComponent={props.linkComponent}
|
|
3943
3979
|
/></builder_context_default.Provider>;
|
|
3944
3980
|
}
|
|
3945
3981
|
var Repeated_block_default = RepeatedBlock;
|
|
@@ -3971,6 +4007,10 @@ function Block(props) {
|
|
|
3971
4007
|
});
|
|
3972
4008
|
}
|
|
3973
4009
|
function Tag() {
|
|
4010
|
+
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
4011
|
+
if (shouldUseLink) {
|
|
4012
|
+
return props.linkComponent || "a";
|
|
4013
|
+
}
|
|
3974
4014
|
return props.block.tagName || "div";
|
|
3975
4015
|
}
|
|
3976
4016
|
function canShowBlock() {
|
|
@@ -3994,32 +4034,37 @@ function Block(props) {
|
|
|
3994
4034
|
componentOptions: {
|
|
3995
4035
|
...getBlockComponentOptions(processedBlock()),
|
|
3996
4036
|
builderContext: props.context,
|
|
4037
|
+
...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
4038
|
+
builderLinkComponent: props.linkComponent
|
|
4039
|
+
} : {},
|
|
3997
4040
|
...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
3998
4041
|
builderComponents: props.registeredComponents
|
|
3999
4042
|
} : {}
|
|
4000
4043
|
},
|
|
4001
4044
|
context: childrenContext(),
|
|
4045
|
+
linkComponent: props.linkComponent,
|
|
4002
4046
|
registeredComponents: props.registeredComponents,
|
|
4003
4047
|
builderBlock: processedBlock(),
|
|
4004
4048
|
includeBlockProps: blockComponent()?.noWrap === true,
|
|
4005
4049
|
isInteractive: !blockComponent()?.isRSC
|
|
4006
4050
|
};
|
|
4007
4051
|
}
|
|
4008
|
-
return <
|
|
4052
|
+
return <Show4 when={canShowBlock()}>
|
|
4009
4053
|
<Block_styles_default block={props.block} context={props.context} />
|
|
4010
|
-
<
|
|
4054
|
+
<Show4
|
|
4011
4055
|
fallback={<Component_ref_default
|
|
4012
4056
|
componentRef={componentRefProps().componentRef}
|
|
4013
4057
|
componentOptions={componentRefProps().componentOptions}
|
|
4014
4058
|
blockChildren={componentRefProps().blockChildren}
|
|
4015
4059
|
context={componentRefProps().context}
|
|
4016
4060
|
registeredComponents={componentRefProps().registeredComponents}
|
|
4061
|
+
linkComponent={componentRefProps().linkComponent}
|
|
4017
4062
|
builderBlock={componentRefProps().builderBlock}
|
|
4018
4063
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
4019
4064
|
isInteractive={componentRefProps().isInteractive}
|
|
4020
4065
|
/>}
|
|
4021
4066
|
when={!blockComponent()?.noWrap}
|
|
4022
|
-
><
|
|
4067
|
+
><Show4
|
|
4023
4068
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
4024
4069
|
const index = _index();
|
|
4025
4070
|
return <Repeated_block_default
|
|
@@ -4027,6 +4072,7 @@ function Block(props) {
|
|
|
4027
4072
|
repeatContext={data.context}
|
|
4028
4073
|
block={data.block}
|
|
4029
4074
|
registeredComponents={props.registeredComponents}
|
|
4075
|
+
linkComponent={props.linkComponent}
|
|
4030
4076
|
/>;
|
|
4031
4077
|
}}</For2>}
|
|
4032
4078
|
when={!repeatItem()}
|
|
@@ -4034,6 +4080,7 @@ function Block(props) {
|
|
|
4034
4080
|
Wrapper={Tag()}
|
|
4035
4081
|
block={processedBlock()}
|
|
4036
4082
|
context={props.context}
|
|
4083
|
+
linkComponent={props.linkComponent}
|
|
4037
4084
|
>
|
|
4038
4085
|
<Component_ref_default
|
|
4039
4086
|
componentRef={componentRefProps().componentRef}
|
|
@@ -4041,6 +4088,7 @@ function Block(props) {
|
|
|
4041
4088
|
blockChildren={componentRefProps().blockChildren}
|
|
4042
4089
|
context={componentRefProps().context}
|
|
4043
4090
|
registeredComponents={componentRefProps().registeredComponents}
|
|
4091
|
+
linkComponent={componentRefProps().linkComponent}
|
|
4044
4092
|
builderBlock={componentRefProps().builderBlock}
|
|
4045
4093
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
4046
4094
|
isInteractive={componentRefProps().isInteractive}
|
|
@@ -4052,16 +4100,17 @@ function Block(props) {
|
|
|
4052
4100
|
block={child}
|
|
4053
4101
|
context={childrenContext()}
|
|
4054
4102
|
registeredComponents={props.registeredComponents}
|
|
4103
|
+
linkComponent={props.linkComponent}
|
|
4055
4104
|
/>;
|
|
4056
4105
|
}}</For2>
|
|
4057
|
-
</Block_wrapper_default></
|
|
4058
|
-
</
|
|
4106
|
+
</Block_wrapper_default></Show4></Show4>
|
|
4107
|
+
</Show4>;
|
|
4059
4108
|
}
|
|
4060
4109
|
var Block_default = Block;
|
|
4061
4110
|
|
|
4062
4111
|
// src/components/blocks/blocks-wrapper.tsx
|
|
4063
4112
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
4064
|
-
import { css
|
|
4113
|
+
import { css } from "solid-styled-components";
|
|
4065
4114
|
function BlocksWrapper(props) {
|
|
4066
4115
|
function className() {
|
|
4067
4116
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
@@ -4095,7 +4144,7 @@ function BlocksWrapper(props) {
|
|
|
4095
4144
|
}
|
|
4096
4145
|
}
|
|
4097
4146
|
return <Dynamic4
|
|
4098
|
-
class={className() + " " +
|
|
4147
|
+
class={className() + " " + css({
|
|
4099
4148
|
display: "flex",
|
|
4100
4149
|
flexDirection: "column",
|
|
4101
4150
|
alignItems: "stretch"
|
|
@@ -4124,15 +4173,16 @@ function Blocks(props) {
|
|
|
4124
4173
|
styleProp={props.styleProp}
|
|
4125
4174
|
BlocksWrapper={props.context?.BlocksWrapper}
|
|
4126
4175
|
BlocksWrapperProps={props.context?.BlocksWrapperProps}
|
|
4127
|
-
><
|
|
4176
|
+
><Show5 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
|
|
4128
4177
|
const index = _index();
|
|
4129
4178
|
return <Block_default
|
|
4130
4179
|
key={block.id}
|
|
4131
4180
|
block={block}
|
|
4181
|
+
linkComponent={props.linkComponent}
|
|
4132
4182
|
context={props.context || builderContext}
|
|
4133
4183
|
registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
|
|
4134
4184
|
/>;
|
|
4135
|
-
}}</For3></
|
|
4185
|
+
}}</For3></Show5></Blocks_wrapper_default>;
|
|
4136
4186
|
}
|
|
4137
4187
|
var Blocks_default = Blocks;
|
|
4138
4188
|
|
|
@@ -4181,7 +4231,13 @@ function Columns(props) {
|
|
|
4181
4231
|
const mobileWidth = "100%";
|
|
4182
4232
|
const mobileMarginLeft = 0;
|
|
4183
4233
|
const marginLeftKey = "margin-left";
|
|
4234
|
+
const sharedStyles = {
|
|
4235
|
+
display: "flex",
|
|
4236
|
+
flexDirection: "column",
|
|
4237
|
+
alignItems: "stretch"
|
|
4238
|
+
};
|
|
4184
4239
|
return {
|
|
4240
|
+
...sharedStyles,
|
|
4185
4241
|
width,
|
|
4186
4242
|
[marginLeftKey]: gutterPixels,
|
|
4187
4243
|
"--column-width-mobile": getMobileStyle({
|
|
@@ -4236,25 +4292,28 @@ function Columns(props) {
|
|
|
4236
4292
|
`;
|
|
4237
4293
|
}
|
|
4238
4294
|
return <div
|
|
4239
|
-
class={`builder-columns ${props.builderBlock.id}-breakpoints ` +
|
|
4295
|
+
class={`builder-columns ${props.builderBlock.id}-breakpoints ` + css2({
|
|
4240
4296
|
display: "flex",
|
|
4241
4297
|
lineHeight: "normal"
|
|
4242
4298
|
})}
|
|
4243
4299
|
style={columnsCssVars()}
|
|
4244
4300
|
{...{}}
|
|
4245
4301
|
>
|
|
4246
|
-
<
|
|
4302
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show6>
|
|
4247
4303
|
<For4 each={props.columns}>{(column, _index) => {
|
|
4248
4304
|
const index = _index();
|
|
4249
|
-
return <
|
|
4250
|
-
class={"builder-column " + css3({
|
|
4251
|
-
display: "flex",
|
|
4252
|
-
flexDirection: "column",
|
|
4253
|
-
alignItems: "stretch"
|
|
4254
|
-
})}
|
|
4255
|
-
style={columnCssVars(index)}
|
|
4256
|
-
{...{}}
|
|
4305
|
+
return <Dynamic_renderer_default
|
|
4257
4306
|
key={index}
|
|
4307
|
+
TagName={column.link ? props.builderLinkComponent || "a" : "div"}
|
|
4308
|
+
actionAttributes={{}}
|
|
4309
|
+
attributes={{
|
|
4310
|
+
...{},
|
|
4311
|
+
...column.link ? {
|
|
4312
|
+
href: column.link
|
|
4313
|
+
} : {},
|
|
4314
|
+
[getClassPropName()]: "builder-column",
|
|
4315
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
4316
|
+
}}
|
|
4258
4317
|
><Blocks_default
|
|
4259
4318
|
path={`component.options.columns.${index}.blocks`}
|
|
4260
4319
|
parent={props.builderBlock.id}
|
|
@@ -4263,8 +4322,9 @@ function Columns(props) {
|
|
|
4263
4322
|
}}
|
|
4264
4323
|
context={props.builderContext}
|
|
4265
4324
|
registeredComponents={props.builderComponents}
|
|
4325
|
+
linkComponent={props.builderLinkComponent}
|
|
4266
4326
|
blocks={column.blocks}
|
|
4267
|
-
/></
|
|
4327
|
+
/></Dynamic_renderer_default>;
|
|
4268
4328
|
}}</For4>
|
|
4269
4329
|
</div>;
|
|
4270
4330
|
}
|
|
@@ -4277,8 +4337,8 @@ function FragmentComponent(props) {
|
|
|
4277
4337
|
var fragment_default = FragmentComponent;
|
|
4278
4338
|
|
|
4279
4339
|
// src/blocks/image/image.tsx
|
|
4280
|
-
import { Show as
|
|
4281
|
-
import { css as
|
|
4340
|
+
import { Show as Show7 } from "solid-js";
|
|
4341
|
+
import { css as css3 } from "solid-styled-components";
|
|
4282
4342
|
|
|
4283
4343
|
// src/blocks/image/image.helpers.ts
|
|
4284
4344
|
function removeProtocol(path) {
|
|
@@ -4367,9 +4427,9 @@ function Image(props) {
|
|
|
4367
4427
|
}
|
|
4368
4428
|
return <>
|
|
4369
4429
|
<picture>
|
|
4370
|
-
<
|
|
4430
|
+
<Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
|
|
4371
4431
|
<img
|
|
4372
|
-
class={"builder-image" + (props.className ? " " + props.className : "") + " " +
|
|
4432
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " " + css3({
|
|
4373
4433
|
opacity: "1",
|
|
4374
4434
|
transition: "opacity 0.2s ease-in-out"
|
|
4375
4435
|
})}
|
|
@@ -4386,10 +4446,10 @@ function Image(props) {
|
|
|
4386
4446
|
sizes={props.sizes}
|
|
4387
4447
|
/>
|
|
4388
4448
|
</picture>
|
|
4389
|
-
<
|
|
4449
|
+
<Show7
|
|
4390
4450
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
4391
4451
|
><div
|
|
4392
|
-
class={"builder-image-sizer " +
|
|
4452
|
+
class={"builder-image-sizer " + css3({
|
|
4393
4453
|
width: "100%",
|
|
4394
4454
|
pointerEvents: "none",
|
|
4395
4455
|
fontSize: "0"
|
|
@@ -4397,10 +4457,10 @@ function Image(props) {
|
|
|
4397
4457
|
style={{
|
|
4398
4458
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
4399
4459
|
}}
|
|
4400
|
-
/></
|
|
4401
|
-
<
|
|
4402
|
-
<
|
|
4403
|
-
class={
|
|
4460
|
+
/></Show7>
|
|
4461
|
+
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
4462
|
+
<Show7 when={!props.fitContent && props.children}><div
|
|
4463
|
+
class={css3({
|
|
4404
4464
|
display: "flex",
|
|
4405
4465
|
flexDirection: "column",
|
|
4406
4466
|
alignItems: "stretch",
|
|
@@ -4410,7 +4470,7 @@ function Image(props) {
|
|
|
4410
4470
|
width: "100%",
|
|
4411
4471
|
height: "100%"
|
|
4412
4472
|
})}
|
|
4413
|
-
>{props.children}</div></
|
|
4473
|
+
>{props.children}</div></Show7>
|
|
4414
4474
|
</>;
|
|
4415
4475
|
}
|
|
4416
4476
|
var image_default = Image;
|
|
@@ -4440,7 +4500,7 @@ var section_default = SectionComponent;
|
|
|
4440
4500
|
import { onMount as onMount4, on as on3, createEffect as createEffect3, createSignal as createSignal14 } from "solid-js";
|
|
4441
4501
|
|
|
4442
4502
|
// src/components/content-variants/content-variants.tsx
|
|
4443
|
-
import { Show as
|
|
4503
|
+
import { Show as Show11, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
|
|
4444
4504
|
|
|
4445
4505
|
// src/helpers/url.ts
|
|
4446
4506
|
var getTopLevelDomain = (host) => {
|
|
@@ -4634,7 +4694,7 @@ var handleABTesting = async ({
|
|
|
4634
4694
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
4635
4695
|
|
|
4636
4696
|
// src/components/content/content.tsx
|
|
4637
|
-
import { Show as
|
|
4697
|
+
import { Show as Show10, createSignal as createSignal12 } from "solid-js";
|
|
4638
4698
|
|
|
4639
4699
|
// src/blocks/button/component-info.ts
|
|
4640
4700
|
var componentInfo = {
|
|
@@ -5443,7 +5503,7 @@ var componentInfo12 = {
|
|
|
5443
5503
|
};
|
|
5444
5504
|
|
|
5445
5505
|
// src/blocks/video/video.tsx
|
|
5446
|
-
import { Show as
|
|
5506
|
+
import { Show as Show8 } from "solid-js";
|
|
5447
5507
|
function Video(props) {
|
|
5448
5508
|
function videoProps() {
|
|
5449
5509
|
return {
|
|
@@ -5494,8 +5554,8 @@ function Video(props) {
|
|
|
5494
5554
|
}}
|
|
5495
5555
|
src={props.video || "no-src"}
|
|
5496
5556
|
poster={props.posterImage}
|
|
5497
|
-
><
|
|
5498
|
-
<
|
|
5557
|
+
><Show8 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show8></video>
|
|
5558
|
+
<Show8
|
|
5499
5559
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
5500
5560
|
><div
|
|
5501
5561
|
style={{
|
|
@@ -5504,15 +5564,15 @@ function Video(props) {
|
|
|
5504
5564
|
"pointer-events": "none",
|
|
5505
5565
|
"font-size": "0px"
|
|
5506
5566
|
}}
|
|
5507
|
-
/></
|
|
5508
|
-
<
|
|
5567
|
+
/></Show8>
|
|
5568
|
+
<Show8 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
5509
5569
|
style={{
|
|
5510
5570
|
display: "flex",
|
|
5511
5571
|
"flex-direction": "column",
|
|
5512
5572
|
"align-items": "stretch"
|
|
5513
5573
|
}}
|
|
5514
|
-
>{props.children}</div></
|
|
5515
|
-
<
|
|
5574
|
+
>{props.children}</div></Show8>
|
|
5575
|
+
<Show8 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
5516
5576
|
style={{
|
|
5517
5577
|
"pointer-events": "none",
|
|
5518
5578
|
display: "flex",
|
|
@@ -5524,7 +5584,7 @@ function Video(props) {
|
|
|
5524
5584
|
width: "100%",
|
|
5525
5585
|
height: "100%"
|
|
5526
5586
|
}}
|
|
5527
|
-
>{props.children}</div></
|
|
5587
|
+
>{props.children}</div></Show8>
|
|
5528
5588
|
</div>;
|
|
5529
5589
|
}
|
|
5530
5590
|
var video_default = Video;
|
|
@@ -5644,7 +5704,7 @@ function InlinedScript(props) {
|
|
|
5644
5704
|
var Inlined_script_default = InlinedScript;
|
|
5645
5705
|
|
|
5646
5706
|
// src/components/content/components/enable-editor.tsx
|
|
5647
|
-
import { Show as
|
|
5707
|
+
import { Show as Show9, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
|
|
5648
5708
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
5649
5709
|
|
|
5650
5710
|
// src/helpers/preview-lru-cache/get.ts
|
|
@@ -6139,7 +6199,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6139
6199
|
};
|
|
6140
6200
|
|
|
6141
6201
|
// src/constants/sdk-version.ts
|
|
6142
|
-
var SDK_VERSION = "0.12.
|
|
6202
|
+
var SDK_VERSION = "0.12.4";
|
|
6143
6203
|
|
|
6144
6204
|
// src/functions/register.ts
|
|
6145
6205
|
var registry = {};
|
|
@@ -6563,7 +6623,7 @@ function EnableEditor(props) {
|
|
|
6563
6623
|
}
|
|
6564
6624
|
}
|
|
6565
6625
|
createEffect2(on2(() => [props.locale], onUpdateFn_6));
|
|
6566
|
-
return <builder_context_default.Provider value={props.builderContextSignal}><
|
|
6626
|
+
return <builder_context_default.Provider value={props.builderContextSignal}><Show9 when={props.builderContextSignal.content}><Dynamic5
|
|
6567
6627
|
class={`variant-${props.content?.testVariationId || props.content?.id}`}
|
|
6568
6628
|
{...{}}
|
|
6569
6629
|
key={forceReRenderCount()}
|
|
@@ -6578,7 +6638,7 @@ function EnableEditor(props) {
|
|
|
6578
6638
|
}}
|
|
6579
6639
|
{...props.contentWrapperProps}
|
|
6580
6640
|
component={ContentWrapper()}
|
|
6581
|
-
>{props.children}</Dynamic5></
|
|
6641
|
+
>{props.children}</Dynamic5></Show9></builder_context_default.Provider>;
|
|
6582
6642
|
}
|
|
6583
6643
|
var Enable_editor_default = EnableEditor;
|
|
6584
6644
|
|
|
@@ -6652,6 +6712,10 @@ ${getFontCss({
|
|
|
6652
6712
|
customFonts: props.customFonts
|
|
6653
6713
|
})}
|
|
6654
6714
|
|
|
6715
|
+
.builder-button {
|
|
6716
|
+
all: unset;
|
|
6717
|
+
}
|
|
6718
|
+
|
|
6655
6719
|
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
6656
6720
|
margin: 0;
|
|
6657
6721
|
}
|
|
@@ -6796,21 +6860,23 @@ function ContentComponent(props) {
|
|
|
6796
6860
|
builderContextSignal={builderContextSignal()}
|
|
6797
6861
|
contentWrapper={props.contentWrapper}
|
|
6798
6862
|
contentWrapperProps={props.contentWrapperProps}
|
|
6863
|
+
linkComponent={props.linkComponent}
|
|
6799
6864
|
trustedHosts={props.trustedHosts}
|
|
6800
6865
|
{...{
|
|
6801
6866
|
setBuilderContextSignal
|
|
6802
6867
|
}}
|
|
6803
6868
|
>
|
|
6804
|
-
<
|
|
6805
|
-
<
|
|
6869
|
+
<Show10 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show10>
|
|
6870
|
+
<Show10 when={TARGET !== "reactNative"}><Styles_default
|
|
6806
6871
|
contentId={builderContextSignal().content?.id}
|
|
6807
6872
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
6808
6873
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
6809
|
-
/></
|
|
6874
|
+
/></Show10>
|
|
6810
6875
|
<Blocks_default
|
|
6811
6876
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
6812
6877
|
context={builderContextSignal()}
|
|
6813
6878
|
registeredComponents={registeredComponents()}
|
|
6879
|
+
linkComponent={props.linkComponent}
|
|
6814
6880
|
/>
|
|
6815
6881
|
</Enable_editor_default></components_context_default.Provider>;
|
|
6816
6882
|
}
|
|
@@ -6849,8 +6915,8 @@ function ContentVariants(props) {
|
|
|
6849
6915
|
setShouldRenderVariants(false);
|
|
6850
6916
|
});
|
|
6851
6917
|
return <>
|
|
6852
|
-
<
|
|
6853
|
-
<
|
|
6918
|
+
<Show11 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show11>
|
|
6919
|
+
<Show11 when={shouldRenderVariants()}>
|
|
6854
6920
|
<Inlined_styles_default
|
|
6855
6921
|
id={`variants-styles-${props.content?.id}`}
|
|
6856
6922
|
styles={hideVariantsStyleString()}
|
|
@@ -6870,6 +6936,7 @@ function ContentVariants(props) {
|
|
|
6870
6936
|
apiKey={props.apiKey}
|
|
6871
6937
|
apiVersion={props.apiVersion}
|
|
6872
6938
|
customComponents={props.customComponents}
|
|
6939
|
+
linkComponent={props.linkComponent}
|
|
6873
6940
|
canTrack={props.canTrack}
|
|
6874
6941
|
locale={props.locale}
|
|
6875
6942
|
includeRefs={props.includeRefs}
|
|
@@ -6882,7 +6949,7 @@ function ContentVariants(props) {
|
|
|
6882
6949
|
trustedHosts={props.trustedHosts}
|
|
6883
6950
|
/>;
|
|
6884
6951
|
}}</For5>
|
|
6885
|
-
</
|
|
6952
|
+
</Show11>
|
|
6886
6953
|
<Content_default
|
|
6887
6954
|
{...{}}
|
|
6888
6955
|
content={defaultContent()}
|
|
@@ -6893,6 +6960,7 @@ function ContentVariants(props) {
|
|
|
6893
6960
|
apiKey={props.apiKey}
|
|
6894
6961
|
apiVersion={props.apiVersion}
|
|
6895
6962
|
customComponents={props.customComponents}
|
|
6963
|
+
linkComponent={props.linkComponent}
|
|
6896
6964
|
canTrack={props.canTrack}
|
|
6897
6965
|
locale={props.locale}
|
|
6898
6966
|
includeRefs={props.includeRefs}
|
|
@@ -6937,7 +7005,7 @@ function Symbol2(props) {
|
|
|
6937
7005
|
const [contentToUse, setContentToUse] = createSignal14(props.symbol?.content);
|
|
6938
7006
|
function className() {
|
|
6939
7007
|
return [
|
|
6940
|
-
...[props.attributes
|
|
7008
|
+
...[props.attributes[getClassPropName()]],
|
|
6941
7009
|
"builder-symbol",
|
|
6942
7010
|
props.symbol?.inline ? "builder-inline-symbol" : void 0,
|
|
6943
7011
|
props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -6978,6 +7046,7 @@ function Symbol2(props) {
|
|
|
6978
7046
|
}}
|
|
6979
7047
|
model={props.symbol?.model}
|
|
6980
7048
|
content={contentToUse()}
|
|
7049
|
+
linkComponent={props.builderLinkComponent}
|
|
6981
7050
|
/></div>;
|
|
6982
7051
|
}
|
|
6983
7052
|
var symbol_default = Symbol2;
|