@builder.io/sdk-solid 0.12.3 → 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 +243 -161
- package/lib/browser/dev.jsx +185 -118
- package/lib/browser/index.js +243 -161
- package/lib/browser/index.jsx +185 -118
- package/lib/edge/dev.js +243 -161
- package/lib/edge/dev.jsx +185 -118
- package/lib/edge/index.js +243 -161
- package/lib/edge/index.jsx +185 -118
- package/lib/node/dev.js +243 -161
- package/lib/node/dev.jsx +185 -118
- package/lib/node/index.js +243 -161
- package/lib/node/index.jsx +185 -118
- package/package.json +1 -1
package/lib/edge/dev.jsx
CHANGED
|
@@ -6,34 +6,84 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
6
6
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
// src/
|
|
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) {
|
|
@@ -85,9 +135,6 @@ function isBrowser() {
|
|
|
85
135
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
86
136
|
}
|
|
87
137
|
|
|
88
|
-
// src/constants/target.ts
|
|
89
|
-
var TARGET = "solid";
|
|
90
|
-
|
|
91
138
|
// src/functions/is-iframe.ts
|
|
92
139
|
function isIframe() {
|
|
93
140
|
return isBrowser() && window.self !== window.top;
|
|
@@ -3744,6 +3791,38 @@ function getBlockActions(options) {
|
|
|
3744
3791
|
return obj;
|
|
3745
3792
|
}
|
|
3746
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
|
+
|
|
3747
3826
|
// src/functions/transform-block-properties.ts
|
|
3748
3827
|
function transformBlockProperties({
|
|
3749
3828
|
properties
|
|
@@ -3765,8 +3844,11 @@ function getBlockProperties({
|
|
|
3765
3844
|
...extractRelevantRootBlockProperties(block),
|
|
3766
3845
|
...block.properties,
|
|
3767
3846
|
"builder-id": block.id,
|
|
3768
|
-
style:
|
|
3769
|
-
|
|
3847
|
+
style: getStyle({
|
|
3848
|
+
block,
|
|
3849
|
+
context
|
|
3850
|
+
}),
|
|
3851
|
+
[getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
|
|
3770
3852
|
};
|
|
3771
3853
|
return transformBlockProperties({
|
|
3772
3854
|
properties,
|
|
@@ -3774,53 +3856,6 @@ function getBlockProperties({
|
|
|
3774
3856
|
block
|
|
3775
3857
|
});
|
|
3776
3858
|
}
|
|
3777
|
-
function getStyleAttribute(style) {
|
|
3778
|
-
switch (TARGET) {
|
|
3779
|
-
case "svelte":
|
|
3780
|
-
case "vue":
|
|
3781
|
-
case "solid":
|
|
3782
|
-
return convertStyleMapToCSSArray(style).join(" ");
|
|
3783
|
-
case "qwik":
|
|
3784
|
-
case "reactNative":
|
|
3785
|
-
case "react":
|
|
3786
|
-
case "rsc":
|
|
3787
|
-
return style;
|
|
3788
|
-
}
|
|
3789
|
-
}
|
|
3790
|
-
|
|
3791
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3792
|
-
import { Show as Show3 } from "solid-js";
|
|
3793
|
-
import { Dynamic } from "solid-js/web";
|
|
3794
|
-
|
|
3795
|
-
// src/components/dynamic-renderer/dynamic-renderer.helpers.ts
|
|
3796
|
-
var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
3797
|
-
var isEmptyElement = (tagName) => {
|
|
3798
|
-
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
3799
|
-
};
|
|
3800
|
-
|
|
3801
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3802
|
-
function DynamicRenderer(props) {
|
|
3803
|
-
return <Show3
|
|
3804
|
-
fallback={<Dynamic
|
|
3805
|
-
{...props.attributes}
|
|
3806
|
-
{...props.actionAttributes}
|
|
3807
|
-
component={props.TagName}
|
|
3808
|
-
/>}
|
|
3809
|
-
when={!isEmptyElement(props.TagName)}
|
|
3810
|
-
><Show3
|
|
3811
|
-
fallback={<Dynamic
|
|
3812
|
-
{...props.attributes}
|
|
3813
|
-
{...props.actionAttributes}
|
|
3814
|
-
component={props.TagName}
|
|
3815
|
-
>{props.children}</Dynamic>}
|
|
3816
|
-
when={typeof props.TagName === "string"}
|
|
3817
|
-
><Dynamic
|
|
3818
|
-
{...props.attributes}
|
|
3819
|
-
{...props.actionAttributes}
|
|
3820
|
-
component={props.TagName}
|
|
3821
|
-
>{props.children}</Dynamic></Show3></Show3>;
|
|
3822
|
-
}
|
|
3823
|
-
var Dynamic_renderer_default = DynamicRenderer;
|
|
3824
3859
|
|
|
3825
3860
|
// src/components/block/components/block-wrapper.tsx
|
|
3826
3861
|
function BlockWrapper(props) {
|
|
@@ -3843,7 +3878,7 @@ function BlockWrapper(props) {
|
|
|
3843
3878
|
var Block_wrapper_default = BlockWrapper;
|
|
3844
3879
|
|
|
3845
3880
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
3846
|
-
import { Show as
|
|
3881
|
+
import { Show as Show3, For, createSignal as createSignal2 } from "solid-js";
|
|
3847
3882
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
3848
3883
|
|
|
3849
3884
|
// src/components/block/components/interactive-element.tsx
|
|
@@ -3907,12 +3942,13 @@ function ComponentRef(props) {
|
|
|
3907
3942
|
const [Wrapper, setWrapper] = createSignal2(
|
|
3908
3943
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
3909
3944
|
);
|
|
3910
|
-
return <
|
|
3945
|
+
return <Show3 when={props.componentRef}><Dynamic3
|
|
3911
3946
|
{...getWrapperProps({
|
|
3912
3947
|
componentOptions: props.componentOptions,
|
|
3913
3948
|
builderBlock: props.builderBlock,
|
|
3914
3949
|
context: props.context,
|
|
3915
3950
|
componentRef: props.componentRef,
|
|
3951
|
+
linkComponent: props.linkComponent,
|
|
3916
3952
|
includeBlockProps: props.includeBlockProps,
|
|
3917
3953
|
isInteractive: props.isInteractive,
|
|
3918
3954
|
contextValue: props.context
|
|
@@ -3925,8 +3961,9 @@ function ComponentRef(props) {
|
|
|
3925
3961
|
block={child}
|
|
3926
3962
|
context={props.context}
|
|
3927
3963
|
registeredComponents={props.registeredComponents}
|
|
3964
|
+
linkComponent={props.linkComponent}
|
|
3928
3965
|
/>;
|
|
3929
|
-
}}</For></Dynamic3></
|
|
3966
|
+
}}</For></Dynamic3></Show3>;
|
|
3930
3967
|
}
|
|
3931
3968
|
var Component_ref_default = ComponentRef;
|
|
3932
3969
|
|
|
@@ -3938,6 +3975,7 @@ function RepeatedBlock(props) {
|
|
|
3938
3975
|
block={props.block}
|
|
3939
3976
|
context={store()}
|
|
3940
3977
|
registeredComponents={props.registeredComponents}
|
|
3978
|
+
linkComponent={props.linkComponent}
|
|
3941
3979
|
/></builder_context_default.Provider>;
|
|
3942
3980
|
}
|
|
3943
3981
|
var Repeated_block_default = RepeatedBlock;
|
|
@@ -3969,6 +4007,10 @@ function Block(props) {
|
|
|
3969
4007
|
});
|
|
3970
4008
|
}
|
|
3971
4009
|
function Tag() {
|
|
4010
|
+
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
4011
|
+
if (shouldUseLink) {
|
|
4012
|
+
return props.linkComponent || "a";
|
|
4013
|
+
}
|
|
3972
4014
|
return props.block.tagName || "div";
|
|
3973
4015
|
}
|
|
3974
4016
|
function canShowBlock() {
|
|
@@ -3992,32 +4034,37 @@ function Block(props) {
|
|
|
3992
4034
|
componentOptions: {
|
|
3993
4035
|
...getBlockComponentOptions(processedBlock()),
|
|
3994
4036
|
builderContext: props.context,
|
|
4037
|
+
...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
4038
|
+
builderLinkComponent: props.linkComponent
|
|
4039
|
+
} : {},
|
|
3995
4040
|
...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
3996
4041
|
builderComponents: props.registeredComponents
|
|
3997
4042
|
} : {}
|
|
3998
4043
|
},
|
|
3999
4044
|
context: childrenContext(),
|
|
4045
|
+
linkComponent: props.linkComponent,
|
|
4000
4046
|
registeredComponents: props.registeredComponents,
|
|
4001
4047
|
builderBlock: processedBlock(),
|
|
4002
4048
|
includeBlockProps: blockComponent()?.noWrap === true,
|
|
4003
4049
|
isInteractive: !blockComponent()?.isRSC
|
|
4004
4050
|
};
|
|
4005
4051
|
}
|
|
4006
|
-
return <
|
|
4052
|
+
return <Show4 when={canShowBlock()}>
|
|
4007
4053
|
<Block_styles_default block={props.block} context={props.context} />
|
|
4008
|
-
<
|
|
4054
|
+
<Show4
|
|
4009
4055
|
fallback={<Component_ref_default
|
|
4010
4056
|
componentRef={componentRefProps().componentRef}
|
|
4011
4057
|
componentOptions={componentRefProps().componentOptions}
|
|
4012
4058
|
blockChildren={componentRefProps().blockChildren}
|
|
4013
4059
|
context={componentRefProps().context}
|
|
4014
4060
|
registeredComponents={componentRefProps().registeredComponents}
|
|
4061
|
+
linkComponent={componentRefProps().linkComponent}
|
|
4015
4062
|
builderBlock={componentRefProps().builderBlock}
|
|
4016
4063
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
4017
4064
|
isInteractive={componentRefProps().isInteractive}
|
|
4018
4065
|
/>}
|
|
4019
4066
|
when={!blockComponent()?.noWrap}
|
|
4020
|
-
><
|
|
4067
|
+
><Show4
|
|
4021
4068
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
4022
4069
|
const index = _index();
|
|
4023
4070
|
return <Repeated_block_default
|
|
@@ -4025,6 +4072,7 @@ function Block(props) {
|
|
|
4025
4072
|
repeatContext={data.context}
|
|
4026
4073
|
block={data.block}
|
|
4027
4074
|
registeredComponents={props.registeredComponents}
|
|
4075
|
+
linkComponent={props.linkComponent}
|
|
4028
4076
|
/>;
|
|
4029
4077
|
}}</For2>}
|
|
4030
4078
|
when={!repeatItem()}
|
|
@@ -4032,6 +4080,7 @@ function Block(props) {
|
|
|
4032
4080
|
Wrapper={Tag()}
|
|
4033
4081
|
block={processedBlock()}
|
|
4034
4082
|
context={props.context}
|
|
4083
|
+
linkComponent={props.linkComponent}
|
|
4035
4084
|
>
|
|
4036
4085
|
<Component_ref_default
|
|
4037
4086
|
componentRef={componentRefProps().componentRef}
|
|
@@ -4039,6 +4088,7 @@ function Block(props) {
|
|
|
4039
4088
|
blockChildren={componentRefProps().blockChildren}
|
|
4040
4089
|
context={componentRefProps().context}
|
|
4041
4090
|
registeredComponents={componentRefProps().registeredComponents}
|
|
4091
|
+
linkComponent={componentRefProps().linkComponent}
|
|
4042
4092
|
builderBlock={componentRefProps().builderBlock}
|
|
4043
4093
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
4044
4094
|
isInteractive={componentRefProps().isInteractive}
|
|
@@ -4050,10 +4100,11 @@ function Block(props) {
|
|
|
4050
4100
|
block={child}
|
|
4051
4101
|
context={childrenContext()}
|
|
4052
4102
|
registeredComponents={props.registeredComponents}
|
|
4103
|
+
linkComponent={props.linkComponent}
|
|
4053
4104
|
/>;
|
|
4054
4105
|
}}</For2>
|
|
4055
|
-
</Block_wrapper_default></
|
|
4056
|
-
</
|
|
4106
|
+
</Block_wrapper_default></Show4></Show4>
|
|
4107
|
+
</Show4>;
|
|
4057
4108
|
}
|
|
4058
4109
|
var Block_default = Block;
|
|
4059
4110
|
|
|
@@ -4122,15 +4173,16 @@ function Blocks(props) {
|
|
|
4122
4173
|
styleProp={props.styleProp}
|
|
4123
4174
|
BlocksWrapper={props.context?.BlocksWrapper}
|
|
4124
4175
|
BlocksWrapperProps={props.context?.BlocksWrapperProps}
|
|
4125
|
-
><
|
|
4176
|
+
><Show5 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
|
|
4126
4177
|
const index = _index();
|
|
4127
4178
|
return <Block_default
|
|
4128
4179
|
key={block.id}
|
|
4129
4180
|
block={block}
|
|
4181
|
+
linkComponent={props.linkComponent}
|
|
4130
4182
|
context={props.context || builderContext}
|
|
4131
4183
|
registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
|
|
4132
4184
|
/>;
|
|
4133
|
-
}}</For3></
|
|
4185
|
+
}}</For3></Show5></Blocks_wrapper_default>;
|
|
4134
4186
|
}
|
|
4135
4187
|
var Blocks_default = Blocks;
|
|
4136
4188
|
|
|
@@ -4179,7 +4231,13 @@ function Columns(props) {
|
|
|
4179
4231
|
const mobileWidth = "100%";
|
|
4180
4232
|
const mobileMarginLeft = 0;
|
|
4181
4233
|
const marginLeftKey = "margin-left";
|
|
4234
|
+
const sharedStyles = {
|
|
4235
|
+
display: "flex",
|
|
4236
|
+
flexDirection: "column",
|
|
4237
|
+
alignItems: "stretch"
|
|
4238
|
+
};
|
|
4182
4239
|
return {
|
|
4240
|
+
...sharedStyles,
|
|
4183
4241
|
width,
|
|
4184
4242
|
[marginLeftKey]: gutterPixels,
|
|
4185
4243
|
"--column-width-mobile": getMobileStyle({
|
|
@@ -4241,18 +4299,21 @@ function Columns(props) {
|
|
|
4241
4299
|
style={columnsCssVars()}
|
|
4242
4300
|
{...{}}
|
|
4243
4301
|
>
|
|
4244
|
-
<
|
|
4302
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show6>
|
|
4245
4303
|
<For4 each={props.columns}>{(column, _index) => {
|
|
4246
4304
|
const index = _index();
|
|
4247
|
-
return <
|
|
4248
|
-
class={"builder-column " + css2({
|
|
4249
|
-
display: "flex",
|
|
4250
|
-
flexDirection: "column",
|
|
4251
|
-
alignItems: "stretch"
|
|
4252
|
-
})}
|
|
4253
|
-
style={columnCssVars(index)}
|
|
4254
|
-
{...{}}
|
|
4305
|
+
return <Dynamic_renderer_default
|
|
4255
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
|
+
}}
|
|
4256
4317
|
><Blocks_default
|
|
4257
4318
|
path={`component.options.columns.${index}.blocks`}
|
|
4258
4319
|
parent={props.builderBlock.id}
|
|
@@ -4261,8 +4322,9 @@ function Columns(props) {
|
|
|
4261
4322
|
}}
|
|
4262
4323
|
context={props.builderContext}
|
|
4263
4324
|
registeredComponents={props.builderComponents}
|
|
4325
|
+
linkComponent={props.builderLinkComponent}
|
|
4264
4326
|
blocks={column.blocks}
|
|
4265
|
-
/></
|
|
4327
|
+
/></Dynamic_renderer_default>;
|
|
4266
4328
|
}}</For4>
|
|
4267
4329
|
</div>;
|
|
4268
4330
|
}
|
|
@@ -4275,7 +4337,7 @@ function FragmentComponent(props) {
|
|
|
4275
4337
|
var fragment_default = FragmentComponent;
|
|
4276
4338
|
|
|
4277
4339
|
// src/blocks/image/image.tsx
|
|
4278
|
-
import { Show as
|
|
4340
|
+
import { Show as Show7 } from "solid-js";
|
|
4279
4341
|
import { css as css3 } from "solid-styled-components";
|
|
4280
4342
|
|
|
4281
4343
|
// src/blocks/image/image.helpers.ts
|
|
@@ -4365,7 +4427,7 @@ function Image(props) {
|
|
|
4365
4427
|
}
|
|
4366
4428
|
return <>
|
|
4367
4429
|
<picture>
|
|
4368
|
-
<
|
|
4430
|
+
<Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
|
|
4369
4431
|
<img
|
|
4370
4432
|
class={"builder-image" + (props.className ? " " + props.className : "") + " " + css3({
|
|
4371
4433
|
opacity: "1",
|
|
@@ -4384,7 +4446,7 @@ function Image(props) {
|
|
|
4384
4446
|
sizes={props.sizes}
|
|
4385
4447
|
/>
|
|
4386
4448
|
</picture>
|
|
4387
|
-
<
|
|
4449
|
+
<Show7
|
|
4388
4450
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
4389
4451
|
><div
|
|
4390
4452
|
class={"builder-image-sizer " + css3({
|
|
@@ -4395,9 +4457,9 @@ function Image(props) {
|
|
|
4395
4457
|
style={{
|
|
4396
4458
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
4397
4459
|
}}
|
|
4398
|
-
/></
|
|
4399
|
-
<
|
|
4400
|
-
<
|
|
4460
|
+
/></Show7>
|
|
4461
|
+
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
4462
|
+
<Show7 when={!props.fitContent && props.children}><div
|
|
4401
4463
|
class={css3({
|
|
4402
4464
|
display: "flex",
|
|
4403
4465
|
flexDirection: "column",
|
|
@@ -4408,7 +4470,7 @@ function Image(props) {
|
|
|
4408
4470
|
width: "100%",
|
|
4409
4471
|
height: "100%"
|
|
4410
4472
|
})}
|
|
4411
|
-
>{props.children}</div></
|
|
4473
|
+
>{props.children}</div></Show7>
|
|
4412
4474
|
</>;
|
|
4413
4475
|
}
|
|
4414
4476
|
var image_default = Image;
|
|
@@ -4438,7 +4500,7 @@ var section_default = SectionComponent;
|
|
|
4438
4500
|
import { onMount as onMount4, on as on3, createEffect as createEffect3, createSignal as createSignal14 } from "solid-js";
|
|
4439
4501
|
|
|
4440
4502
|
// src/components/content-variants/content-variants.tsx
|
|
4441
|
-
import { Show as
|
|
4503
|
+
import { Show as Show11, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
|
|
4442
4504
|
|
|
4443
4505
|
// src/helpers/url.ts
|
|
4444
4506
|
var getTopLevelDomain = (host) => {
|
|
@@ -4632,7 +4694,7 @@ var handleABTesting = async ({
|
|
|
4632
4694
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
4633
4695
|
|
|
4634
4696
|
// src/components/content/content.tsx
|
|
4635
|
-
import { Show as
|
|
4697
|
+
import { Show as Show10, createSignal as createSignal12 } from "solid-js";
|
|
4636
4698
|
|
|
4637
4699
|
// src/blocks/button/component-info.ts
|
|
4638
4700
|
var componentInfo = {
|
|
@@ -5441,7 +5503,7 @@ var componentInfo12 = {
|
|
|
5441
5503
|
};
|
|
5442
5504
|
|
|
5443
5505
|
// src/blocks/video/video.tsx
|
|
5444
|
-
import { Show as
|
|
5506
|
+
import { Show as Show8 } from "solid-js";
|
|
5445
5507
|
function Video(props) {
|
|
5446
5508
|
function videoProps() {
|
|
5447
5509
|
return {
|
|
@@ -5492,8 +5554,8 @@ function Video(props) {
|
|
|
5492
5554
|
}}
|
|
5493
5555
|
src={props.video || "no-src"}
|
|
5494
5556
|
poster={props.posterImage}
|
|
5495
|
-
><
|
|
5496
|
-
<
|
|
5557
|
+
><Show8 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show8></video>
|
|
5558
|
+
<Show8
|
|
5497
5559
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
5498
5560
|
><div
|
|
5499
5561
|
style={{
|
|
@@ -5502,15 +5564,15 @@ function Video(props) {
|
|
|
5502
5564
|
"pointer-events": "none",
|
|
5503
5565
|
"font-size": "0px"
|
|
5504
5566
|
}}
|
|
5505
|
-
/></
|
|
5506
|
-
<
|
|
5567
|
+
/></Show8>
|
|
5568
|
+
<Show8 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
5507
5569
|
style={{
|
|
5508
5570
|
display: "flex",
|
|
5509
5571
|
"flex-direction": "column",
|
|
5510
5572
|
"align-items": "stretch"
|
|
5511
5573
|
}}
|
|
5512
|
-
>{props.children}</div></
|
|
5513
|
-
<
|
|
5574
|
+
>{props.children}</div></Show8>
|
|
5575
|
+
<Show8 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
5514
5576
|
style={{
|
|
5515
5577
|
"pointer-events": "none",
|
|
5516
5578
|
display: "flex",
|
|
@@ -5522,7 +5584,7 @@ function Video(props) {
|
|
|
5522
5584
|
width: "100%",
|
|
5523
5585
|
height: "100%"
|
|
5524
5586
|
}}
|
|
5525
|
-
>{props.children}</div></
|
|
5587
|
+
>{props.children}</div></Show8>
|
|
5526
5588
|
</div>;
|
|
5527
5589
|
}
|
|
5528
5590
|
var video_default = Video;
|
|
@@ -5642,7 +5704,7 @@ function InlinedScript(props) {
|
|
|
5642
5704
|
var Inlined_script_default = InlinedScript;
|
|
5643
5705
|
|
|
5644
5706
|
// src/components/content/components/enable-editor.tsx
|
|
5645
|
-
import { Show as
|
|
5707
|
+
import { Show as Show9, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
|
|
5646
5708
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
5647
5709
|
|
|
5648
5710
|
// src/helpers/preview-lru-cache/get.ts
|
|
@@ -6137,7 +6199,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6137
6199
|
};
|
|
6138
6200
|
|
|
6139
6201
|
// src/constants/sdk-version.ts
|
|
6140
|
-
var SDK_VERSION = "0.12.
|
|
6202
|
+
var SDK_VERSION = "0.12.4";
|
|
6141
6203
|
|
|
6142
6204
|
// src/functions/register.ts
|
|
6143
6205
|
var registry = {};
|
|
@@ -6561,7 +6623,7 @@ function EnableEditor(props) {
|
|
|
6561
6623
|
}
|
|
6562
6624
|
}
|
|
6563
6625
|
createEffect2(on2(() => [props.locale], onUpdateFn_6));
|
|
6564
|
-
return <builder_context_default.Provider value={props.builderContextSignal}><
|
|
6626
|
+
return <builder_context_default.Provider value={props.builderContextSignal}><Show9 when={props.builderContextSignal.content}><Dynamic5
|
|
6565
6627
|
class={`variant-${props.content?.testVariationId || props.content?.id}`}
|
|
6566
6628
|
{...{}}
|
|
6567
6629
|
key={forceReRenderCount()}
|
|
@@ -6576,7 +6638,7 @@ function EnableEditor(props) {
|
|
|
6576
6638
|
}}
|
|
6577
6639
|
{...props.contentWrapperProps}
|
|
6578
6640
|
component={ContentWrapper()}
|
|
6579
|
-
>{props.children}</Dynamic5></
|
|
6641
|
+
>{props.children}</Dynamic5></Show9></builder_context_default.Provider>;
|
|
6580
6642
|
}
|
|
6581
6643
|
var Enable_editor_default = EnableEditor;
|
|
6582
6644
|
|
|
@@ -6798,21 +6860,23 @@ function ContentComponent(props) {
|
|
|
6798
6860
|
builderContextSignal={builderContextSignal()}
|
|
6799
6861
|
contentWrapper={props.contentWrapper}
|
|
6800
6862
|
contentWrapperProps={props.contentWrapperProps}
|
|
6863
|
+
linkComponent={props.linkComponent}
|
|
6801
6864
|
trustedHosts={props.trustedHosts}
|
|
6802
6865
|
{...{
|
|
6803
6866
|
setBuilderContextSignal
|
|
6804
6867
|
}}
|
|
6805
6868
|
>
|
|
6806
|
-
<
|
|
6807
|
-
<
|
|
6869
|
+
<Show10 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show10>
|
|
6870
|
+
<Show10 when={TARGET !== "reactNative"}><Styles_default
|
|
6808
6871
|
contentId={builderContextSignal().content?.id}
|
|
6809
6872
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
6810
6873
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
6811
|
-
/></
|
|
6874
|
+
/></Show10>
|
|
6812
6875
|
<Blocks_default
|
|
6813
6876
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
6814
6877
|
context={builderContextSignal()}
|
|
6815
6878
|
registeredComponents={registeredComponents()}
|
|
6879
|
+
linkComponent={props.linkComponent}
|
|
6816
6880
|
/>
|
|
6817
6881
|
</Enable_editor_default></components_context_default.Provider>;
|
|
6818
6882
|
}
|
|
@@ -6851,8 +6915,8 @@ function ContentVariants(props) {
|
|
|
6851
6915
|
setShouldRenderVariants(false);
|
|
6852
6916
|
});
|
|
6853
6917
|
return <>
|
|
6854
|
-
<
|
|
6855
|
-
<
|
|
6918
|
+
<Show11 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show11>
|
|
6919
|
+
<Show11 when={shouldRenderVariants()}>
|
|
6856
6920
|
<Inlined_styles_default
|
|
6857
6921
|
id={`variants-styles-${props.content?.id}`}
|
|
6858
6922
|
styles={hideVariantsStyleString()}
|
|
@@ -6872,6 +6936,7 @@ function ContentVariants(props) {
|
|
|
6872
6936
|
apiKey={props.apiKey}
|
|
6873
6937
|
apiVersion={props.apiVersion}
|
|
6874
6938
|
customComponents={props.customComponents}
|
|
6939
|
+
linkComponent={props.linkComponent}
|
|
6875
6940
|
canTrack={props.canTrack}
|
|
6876
6941
|
locale={props.locale}
|
|
6877
6942
|
includeRefs={props.includeRefs}
|
|
@@ -6884,7 +6949,7 @@ function ContentVariants(props) {
|
|
|
6884
6949
|
trustedHosts={props.trustedHosts}
|
|
6885
6950
|
/>;
|
|
6886
6951
|
}}</For5>
|
|
6887
|
-
</
|
|
6952
|
+
</Show11>
|
|
6888
6953
|
<Content_default
|
|
6889
6954
|
{...{}}
|
|
6890
6955
|
content={defaultContent()}
|
|
@@ -6895,6 +6960,7 @@ function ContentVariants(props) {
|
|
|
6895
6960
|
apiKey={props.apiKey}
|
|
6896
6961
|
apiVersion={props.apiVersion}
|
|
6897
6962
|
customComponents={props.customComponents}
|
|
6963
|
+
linkComponent={props.linkComponent}
|
|
6898
6964
|
canTrack={props.canTrack}
|
|
6899
6965
|
locale={props.locale}
|
|
6900
6966
|
includeRefs={props.includeRefs}
|
|
@@ -6939,7 +7005,7 @@ function Symbol2(props) {
|
|
|
6939
7005
|
const [contentToUse, setContentToUse] = createSignal14(props.symbol?.content);
|
|
6940
7006
|
function className() {
|
|
6941
7007
|
return [
|
|
6942
|
-
...[props.attributes
|
|
7008
|
+
...[props.attributes[getClassPropName()]],
|
|
6943
7009
|
"builder-symbol",
|
|
6944
7010
|
props.symbol?.inline ? "builder-inline-symbol" : void 0,
|
|
6945
7011
|
props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -6980,6 +7046,7 @@ function Symbol2(props) {
|
|
|
6980
7046
|
}}
|
|
6981
7047
|
model={props.symbol?.model}
|
|
6982
7048
|
content={contentToUse()}
|
|
7049
|
+
linkComponent={props.builderLinkComponent}
|
|
6983
7050
|
/></div>;
|
|
6984
7051
|
}
|
|
6985
7052
|
var symbol_default = Symbol2;
|