@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/index.jsx
CHANGED
|
@@ -6,34 +6,84 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
6
6
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
// src/
|
|
9
|
+
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
10
10
|
import { Show } from "solid-js";
|
|
11
|
-
|
|
11
|
+
import { Dynamic } from "solid-js/web";
|
|
12
|
+
|
|
13
|
+
// src/components/dynamic-renderer/dynamic-renderer.helpers.ts
|
|
14
|
+
var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
15
|
+
var isEmptyElement = (tagName) => {
|
|
16
|
+
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
20
|
+
function DynamicRenderer(props) {
|
|
12
21
|
return <Show
|
|
13
|
-
fallback={<
|
|
14
|
-
class={`builder-button ${props.attributes.class}`}
|
|
15
|
-
role="button"
|
|
16
|
-
{...{}}
|
|
22
|
+
fallback={<Dynamic
|
|
17
23
|
{...props.attributes}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
{...props.actionAttributes}
|
|
25
|
+
component={props.TagName}
|
|
26
|
+
/>}
|
|
27
|
+
when={!isEmptyElement(props.TagName)}
|
|
28
|
+
><Show
|
|
29
|
+
fallback={<Dynamic
|
|
30
|
+
{...props.attributes}
|
|
31
|
+
{...props.actionAttributes}
|
|
32
|
+
component={props.TagName}
|
|
33
|
+
>{props.children}</Dynamic>}
|
|
34
|
+
when={typeof props.TagName === "string"}
|
|
35
|
+
><Dynamic
|
|
23
36
|
{...props.attributes}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
{...props.actionAttributes}
|
|
38
|
+
component={props.TagName}
|
|
39
|
+
>{props.children}</Dynamic></Show></Show>;
|
|
40
|
+
}
|
|
41
|
+
var Dynamic_renderer_default = DynamicRenderer;
|
|
42
|
+
|
|
43
|
+
// src/constants/target.ts
|
|
44
|
+
var TARGET = "solid";
|
|
45
|
+
|
|
46
|
+
// src/functions/get-class-prop-name.ts
|
|
47
|
+
var getClassPropName = () => {
|
|
48
|
+
switch (TARGET) {
|
|
49
|
+
case "react":
|
|
50
|
+
case "reactNative":
|
|
51
|
+
case "rsc":
|
|
52
|
+
return "className";
|
|
53
|
+
case "svelte":
|
|
54
|
+
case "vue":
|
|
55
|
+
case "solid":
|
|
56
|
+
case "qwik":
|
|
57
|
+
return "class";
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// src/blocks/button/button.tsx
|
|
62
|
+
function Button(props) {
|
|
63
|
+
return <Dynamic_renderer_default
|
|
64
|
+
TagName={props.link ? props.builderLinkComponent || "a" : "button"}
|
|
65
|
+
attributes={{
|
|
66
|
+
...props.attributes,
|
|
67
|
+
[getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
|
|
68
|
+
...props.link ? {
|
|
69
|
+
href: props.link,
|
|
70
|
+
target: props.openLinkInNewTab ? "_blank" : void 0,
|
|
71
|
+
role: "link"
|
|
72
|
+
} : {
|
|
73
|
+
role: "button"
|
|
74
|
+
}
|
|
75
|
+
}}
|
|
76
|
+
actionAttributes={{}}
|
|
77
|
+
>{props.text}</Dynamic_renderer_default>;
|
|
28
78
|
}
|
|
29
79
|
var button_default = Button;
|
|
30
80
|
|
|
31
81
|
// src/blocks/columns/columns.tsx
|
|
32
|
-
import { Show as
|
|
82
|
+
import { Show as Show6, For as For4, createSignal as createSignal5 } from "solid-js";
|
|
33
83
|
import { css as css2 } from "solid-styled-components";
|
|
34
84
|
|
|
35
85
|
// src/components/blocks/blocks.tsx
|
|
36
|
-
import { useContext, Show as
|
|
86
|
+
import { useContext, Show as Show5, For as For3 } from "solid-js";
|
|
37
87
|
|
|
38
88
|
// src/context/builder.context.ts
|
|
39
89
|
import { createContext } from "solid-js";
|
|
@@ -57,7 +107,7 @@ import { createContext as createContext2 } from "solid-js";
|
|
|
57
107
|
var components_context_default = createContext2({ registeredComponents: {} });
|
|
58
108
|
|
|
59
109
|
// src/components/block/block.tsx
|
|
60
|
-
import { Show as
|
|
110
|
+
import { Show as Show4, For as For2, createSignal as createSignal4 } from "solid-js";
|
|
61
111
|
|
|
62
112
|
// src/functions/get-block-component-options.ts
|
|
63
113
|
function getBlockComponentOptions(block) {
|
|
@@ -84,9 +134,6 @@ function isBrowser() {
|
|
|
84
134
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
85
135
|
}
|
|
86
136
|
|
|
87
|
-
// src/constants/target.ts
|
|
88
|
-
var TARGET = "solid";
|
|
89
|
-
|
|
90
137
|
// src/functions/is-iframe.ts
|
|
91
138
|
function isIframe() {
|
|
92
139
|
return isBrowser() && window.self !== window.top;
|
|
@@ -3739,6 +3786,38 @@ function getBlockActions(options) {
|
|
|
3739
3786
|
return obj;
|
|
3740
3787
|
}
|
|
3741
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
|
+
|
|
3742
3821
|
// src/functions/transform-block-properties.ts
|
|
3743
3822
|
function transformBlockProperties({
|
|
3744
3823
|
properties
|
|
@@ -3760,8 +3839,11 @@ function getBlockProperties({
|
|
|
3760
3839
|
...extractRelevantRootBlockProperties(block),
|
|
3761
3840
|
...block.properties,
|
|
3762
3841
|
"builder-id": block.id,
|
|
3763
|
-
style:
|
|
3764
|
-
|
|
3842
|
+
style: getStyle({
|
|
3843
|
+
block,
|
|
3844
|
+
context
|
|
3845
|
+
}),
|
|
3846
|
+
[getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
|
|
3765
3847
|
};
|
|
3766
3848
|
return transformBlockProperties({
|
|
3767
3849
|
properties,
|
|
@@ -3769,53 +3851,6 @@ function getBlockProperties({
|
|
|
3769
3851
|
block
|
|
3770
3852
|
});
|
|
3771
3853
|
}
|
|
3772
|
-
function getStyleAttribute(style) {
|
|
3773
|
-
switch (TARGET) {
|
|
3774
|
-
case "svelte":
|
|
3775
|
-
case "vue":
|
|
3776
|
-
case "solid":
|
|
3777
|
-
return convertStyleMapToCSSArray(style).join(" ");
|
|
3778
|
-
case "qwik":
|
|
3779
|
-
case "reactNative":
|
|
3780
|
-
case "react":
|
|
3781
|
-
case "rsc":
|
|
3782
|
-
return style;
|
|
3783
|
-
}
|
|
3784
|
-
}
|
|
3785
|
-
|
|
3786
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3787
|
-
import { Show as Show3 } from "solid-js";
|
|
3788
|
-
import { Dynamic } from "solid-js/web";
|
|
3789
|
-
|
|
3790
|
-
// src/components/dynamic-renderer/dynamic-renderer.helpers.ts
|
|
3791
|
-
var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
3792
|
-
var isEmptyElement = (tagName) => {
|
|
3793
|
-
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
3794
|
-
};
|
|
3795
|
-
|
|
3796
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3797
|
-
function DynamicRenderer(props) {
|
|
3798
|
-
return <Show3
|
|
3799
|
-
fallback={<Dynamic
|
|
3800
|
-
{...props.attributes}
|
|
3801
|
-
{...props.actionAttributes}
|
|
3802
|
-
component={props.TagName}
|
|
3803
|
-
/>}
|
|
3804
|
-
when={!isEmptyElement(props.TagName)}
|
|
3805
|
-
><Show3
|
|
3806
|
-
fallback={<Dynamic
|
|
3807
|
-
{...props.attributes}
|
|
3808
|
-
{...props.actionAttributes}
|
|
3809
|
-
component={props.TagName}
|
|
3810
|
-
>{props.children}</Dynamic>}
|
|
3811
|
-
when={typeof props.TagName === "string"}
|
|
3812
|
-
><Dynamic
|
|
3813
|
-
{...props.attributes}
|
|
3814
|
-
{...props.actionAttributes}
|
|
3815
|
-
component={props.TagName}
|
|
3816
|
-
>{props.children}</Dynamic></Show3></Show3>;
|
|
3817
|
-
}
|
|
3818
|
-
var Dynamic_renderer_default = DynamicRenderer;
|
|
3819
3854
|
|
|
3820
3855
|
// src/components/block/components/block-wrapper.tsx
|
|
3821
3856
|
function BlockWrapper(props) {
|
|
@@ -3838,7 +3873,7 @@ function BlockWrapper(props) {
|
|
|
3838
3873
|
var Block_wrapper_default = BlockWrapper;
|
|
3839
3874
|
|
|
3840
3875
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
3841
|
-
import { Show as
|
|
3876
|
+
import { Show as Show3, For, createSignal as createSignal2 } from "solid-js";
|
|
3842
3877
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
3843
3878
|
|
|
3844
3879
|
// src/components/block/components/interactive-element.tsx
|
|
@@ -3902,12 +3937,13 @@ function ComponentRef(props) {
|
|
|
3902
3937
|
const [Wrapper, setWrapper] = createSignal2(
|
|
3903
3938
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
3904
3939
|
);
|
|
3905
|
-
return <
|
|
3940
|
+
return <Show3 when={props.componentRef}><Dynamic3
|
|
3906
3941
|
{...getWrapperProps({
|
|
3907
3942
|
componentOptions: props.componentOptions,
|
|
3908
3943
|
builderBlock: props.builderBlock,
|
|
3909
3944
|
context: props.context,
|
|
3910
3945
|
componentRef: props.componentRef,
|
|
3946
|
+
linkComponent: props.linkComponent,
|
|
3911
3947
|
includeBlockProps: props.includeBlockProps,
|
|
3912
3948
|
isInteractive: props.isInteractive,
|
|
3913
3949
|
contextValue: props.context
|
|
@@ -3920,8 +3956,9 @@ function ComponentRef(props) {
|
|
|
3920
3956
|
block={child}
|
|
3921
3957
|
context={props.context}
|
|
3922
3958
|
registeredComponents={props.registeredComponents}
|
|
3959
|
+
linkComponent={props.linkComponent}
|
|
3923
3960
|
/>;
|
|
3924
|
-
}}</For></Dynamic3></
|
|
3961
|
+
}}</For></Dynamic3></Show3>;
|
|
3925
3962
|
}
|
|
3926
3963
|
var Component_ref_default = ComponentRef;
|
|
3927
3964
|
|
|
@@ -3933,6 +3970,7 @@ function RepeatedBlock(props) {
|
|
|
3933
3970
|
block={props.block}
|
|
3934
3971
|
context={store()}
|
|
3935
3972
|
registeredComponents={props.registeredComponents}
|
|
3973
|
+
linkComponent={props.linkComponent}
|
|
3936
3974
|
/></builder_context_default.Provider>;
|
|
3937
3975
|
}
|
|
3938
3976
|
var Repeated_block_default = RepeatedBlock;
|
|
@@ -3964,6 +4002,10 @@ function Block(props) {
|
|
|
3964
4002
|
});
|
|
3965
4003
|
}
|
|
3966
4004
|
function Tag() {
|
|
4005
|
+
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
4006
|
+
if (shouldUseLink) {
|
|
4007
|
+
return props.linkComponent || "a";
|
|
4008
|
+
}
|
|
3967
4009
|
return props.block.tagName || "div";
|
|
3968
4010
|
}
|
|
3969
4011
|
function canShowBlock() {
|
|
@@ -3987,32 +4029,37 @@ function Block(props) {
|
|
|
3987
4029
|
componentOptions: {
|
|
3988
4030
|
...getBlockComponentOptions(processedBlock()),
|
|
3989
4031
|
builderContext: props.context,
|
|
4032
|
+
...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
4033
|
+
builderLinkComponent: props.linkComponent
|
|
4034
|
+
} : {},
|
|
3990
4035
|
...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
3991
4036
|
builderComponents: props.registeredComponents
|
|
3992
4037
|
} : {}
|
|
3993
4038
|
},
|
|
3994
4039
|
context: childrenContext(),
|
|
4040
|
+
linkComponent: props.linkComponent,
|
|
3995
4041
|
registeredComponents: props.registeredComponents,
|
|
3996
4042
|
builderBlock: processedBlock(),
|
|
3997
4043
|
includeBlockProps: blockComponent()?.noWrap === true,
|
|
3998
4044
|
isInteractive: !blockComponent()?.isRSC
|
|
3999
4045
|
};
|
|
4000
4046
|
}
|
|
4001
|
-
return <
|
|
4047
|
+
return <Show4 when={canShowBlock()}>
|
|
4002
4048
|
<Block_styles_default block={props.block} context={props.context} />
|
|
4003
|
-
<
|
|
4049
|
+
<Show4
|
|
4004
4050
|
fallback={<Component_ref_default
|
|
4005
4051
|
componentRef={componentRefProps().componentRef}
|
|
4006
4052
|
componentOptions={componentRefProps().componentOptions}
|
|
4007
4053
|
blockChildren={componentRefProps().blockChildren}
|
|
4008
4054
|
context={componentRefProps().context}
|
|
4009
4055
|
registeredComponents={componentRefProps().registeredComponents}
|
|
4056
|
+
linkComponent={componentRefProps().linkComponent}
|
|
4010
4057
|
builderBlock={componentRefProps().builderBlock}
|
|
4011
4058
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
4012
4059
|
isInteractive={componentRefProps().isInteractive}
|
|
4013
4060
|
/>}
|
|
4014
4061
|
when={!blockComponent()?.noWrap}
|
|
4015
|
-
><
|
|
4062
|
+
><Show4
|
|
4016
4063
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
4017
4064
|
const index = _index();
|
|
4018
4065
|
return <Repeated_block_default
|
|
@@ -4020,6 +4067,7 @@ function Block(props) {
|
|
|
4020
4067
|
repeatContext={data.context}
|
|
4021
4068
|
block={data.block}
|
|
4022
4069
|
registeredComponents={props.registeredComponents}
|
|
4070
|
+
linkComponent={props.linkComponent}
|
|
4023
4071
|
/>;
|
|
4024
4072
|
}}</For2>}
|
|
4025
4073
|
when={!repeatItem()}
|
|
@@ -4027,6 +4075,7 @@ function Block(props) {
|
|
|
4027
4075
|
Wrapper={Tag()}
|
|
4028
4076
|
block={processedBlock()}
|
|
4029
4077
|
context={props.context}
|
|
4078
|
+
linkComponent={props.linkComponent}
|
|
4030
4079
|
>
|
|
4031
4080
|
<Component_ref_default
|
|
4032
4081
|
componentRef={componentRefProps().componentRef}
|
|
@@ -4034,6 +4083,7 @@ function Block(props) {
|
|
|
4034
4083
|
blockChildren={componentRefProps().blockChildren}
|
|
4035
4084
|
context={componentRefProps().context}
|
|
4036
4085
|
registeredComponents={componentRefProps().registeredComponents}
|
|
4086
|
+
linkComponent={componentRefProps().linkComponent}
|
|
4037
4087
|
builderBlock={componentRefProps().builderBlock}
|
|
4038
4088
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
4039
4089
|
isInteractive={componentRefProps().isInteractive}
|
|
@@ -4045,10 +4095,11 @@ function Block(props) {
|
|
|
4045
4095
|
block={child}
|
|
4046
4096
|
context={childrenContext()}
|
|
4047
4097
|
registeredComponents={props.registeredComponents}
|
|
4098
|
+
linkComponent={props.linkComponent}
|
|
4048
4099
|
/>;
|
|
4049
4100
|
}}</For2>
|
|
4050
|
-
</Block_wrapper_default></
|
|
4051
|
-
</
|
|
4101
|
+
</Block_wrapper_default></Show4></Show4>
|
|
4102
|
+
</Show4>;
|
|
4052
4103
|
}
|
|
4053
4104
|
var Block_default = Block;
|
|
4054
4105
|
|
|
@@ -4117,15 +4168,16 @@ function Blocks(props) {
|
|
|
4117
4168
|
styleProp={props.styleProp}
|
|
4118
4169
|
BlocksWrapper={props.context?.BlocksWrapper}
|
|
4119
4170
|
BlocksWrapperProps={props.context?.BlocksWrapperProps}
|
|
4120
|
-
><
|
|
4171
|
+
><Show5 when={props.blocks}><For3 each={props.blocks}>{(block, _index) => {
|
|
4121
4172
|
const index = _index();
|
|
4122
4173
|
return <Block_default
|
|
4123
4174
|
key={block.id}
|
|
4124
4175
|
block={block}
|
|
4176
|
+
linkComponent={props.linkComponent}
|
|
4125
4177
|
context={props.context || builderContext}
|
|
4126
4178
|
registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
|
|
4127
4179
|
/>;
|
|
4128
|
-
}}</For3></
|
|
4180
|
+
}}</For3></Show5></Blocks_wrapper_default>;
|
|
4129
4181
|
}
|
|
4130
4182
|
var Blocks_default = Blocks;
|
|
4131
4183
|
|
|
@@ -4174,7 +4226,13 @@ function Columns(props) {
|
|
|
4174
4226
|
const mobileWidth = "100%";
|
|
4175
4227
|
const mobileMarginLeft = 0;
|
|
4176
4228
|
const marginLeftKey = "margin-left";
|
|
4229
|
+
const sharedStyles = {
|
|
4230
|
+
display: "flex",
|
|
4231
|
+
flexDirection: "column",
|
|
4232
|
+
alignItems: "stretch"
|
|
4233
|
+
};
|
|
4177
4234
|
return {
|
|
4235
|
+
...sharedStyles,
|
|
4178
4236
|
width,
|
|
4179
4237
|
[marginLeftKey]: gutterPixels,
|
|
4180
4238
|
"--column-width-mobile": getMobileStyle({
|
|
@@ -4236,18 +4294,21 @@ function Columns(props) {
|
|
|
4236
4294
|
style={columnsCssVars()}
|
|
4237
4295
|
{...{}}
|
|
4238
4296
|
>
|
|
4239
|
-
<
|
|
4297
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default styles={columnsStyles()} /></Show6>
|
|
4240
4298
|
<For4 each={props.columns}>{(column, _index) => {
|
|
4241
4299
|
const index = _index();
|
|
4242
|
-
return <
|
|
4243
|
-
class={"builder-column " + css2({
|
|
4244
|
-
display: "flex",
|
|
4245
|
-
flexDirection: "column",
|
|
4246
|
-
alignItems: "stretch"
|
|
4247
|
-
})}
|
|
4248
|
-
style={columnCssVars(index)}
|
|
4249
|
-
{...{}}
|
|
4300
|
+
return <Dynamic_renderer_default
|
|
4250
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
|
+
}}
|
|
4251
4312
|
><Blocks_default
|
|
4252
4313
|
path={`component.options.columns.${index}.blocks`}
|
|
4253
4314
|
parent={props.builderBlock.id}
|
|
@@ -4256,8 +4317,9 @@ function Columns(props) {
|
|
|
4256
4317
|
}}
|
|
4257
4318
|
context={props.builderContext}
|
|
4258
4319
|
registeredComponents={props.builderComponents}
|
|
4320
|
+
linkComponent={props.builderLinkComponent}
|
|
4259
4321
|
blocks={column.blocks}
|
|
4260
|
-
/></
|
|
4322
|
+
/></Dynamic_renderer_default>;
|
|
4261
4323
|
}}</For4>
|
|
4262
4324
|
</div>;
|
|
4263
4325
|
}
|
|
@@ -4270,7 +4332,7 @@ function FragmentComponent(props) {
|
|
|
4270
4332
|
var fragment_default = FragmentComponent;
|
|
4271
4333
|
|
|
4272
4334
|
// src/blocks/image/image.tsx
|
|
4273
|
-
import { Show as
|
|
4335
|
+
import { Show as Show7 } from "solid-js";
|
|
4274
4336
|
import { css as css3 } from "solid-styled-components";
|
|
4275
4337
|
|
|
4276
4338
|
// src/blocks/image/image.helpers.ts
|
|
@@ -4359,7 +4421,7 @@ function Image(props) {
|
|
|
4359
4421
|
}
|
|
4360
4422
|
return <>
|
|
4361
4423
|
<picture>
|
|
4362
|
-
<
|
|
4424
|
+
<Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
|
|
4363
4425
|
<img
|
|
4364
4426
|
class={"builder-image" + (props.className ? " " + props.className : "") + " " + css3({
|
|
4365
4427
|
opacity: "1",
|
|
@@ -4378,7 +4440,7 @@ function Image(props) {
|
|
|
4378
4440
|
sizes={props.sizes}
|
|
4379
4441
|
/>
|
|
4380
4442
|
</picture>
|
|
4381
|
-
<
|
|
4443
|
+
<Show7
|
|
4382
4444
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
4383
4445
|
><div
|
|
4384
4446
|
class={"builder-image-sizer " + css3({
|
|
@@ -4389,9 +4451,9 @@ function Image(props) {
|
|
|
4389
4451
|
style={{
|
|
4390
4452
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
4391
4453
|
}}
|
|
4392
|
-
/></
|
|
4393
|
-
<
|
|
4394
|
-
<
|
|
4454
|
+
/></Show7>
|
|
4455
|
+
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
4456
|
+
<Show7 when={!props.fitContent && props.children}><div
|
|
4395
4457
|
class={css3({
|
|
4396
4458
|
display: "flex",
|
|
4397
4459
|
flexDirection: "column",
|
|
@@ -4402,7 +4464,7 @@ function Image(props) {
|
|
|
4402
4464
|
width: "100%",
|
|
4403
4465
|
height: "100%"
|
|
4404
4466
|
})}
|
|
4405
|
-
>{props.children}</div></
|
|
4467
|
+
>{props.children}</div></Show7>
|
|
4406
4468
|
</>;
|
|
4407
4469
|
}
|
|
4408
4470
|
var image_default = Image;
|
|
@@ -4432,7 +4494,7 @@ var section_default = SectionComponent;
|
|
|
4432
4494
|
import { onMount as onMount4, on as on3, createEffect as createEffect3, createSignal as createSignal14 } from "solid-js";
|
|
4433
4495
|
|
|
4434
4496
|
// src/components/content-variants/content-variants.tsx
|
|
4435
|
-
import { Show as
|
|
4497
|
+
import { Show as Show11, For as For5, onMount as onMount3, createSignal as createSignal13 } from "solid-js";
|
|
4436
4498
|
|
|
4437
4499
|
// src/helpers/url.ts
|
|
4438
4500
|
var getTopLevelDomain = (host) => {
|
|
@@ -4626,7 +4688,7 @@ var handleABTesting = async ({
|
|
|
4626
4688
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
4627
4689
|
|
|
4628
4690
|
// src/components/content/content.tsx
|
|
4629
|
-
import { Show as
|
|
4691
|
+
import { Show as Show10, createSignal as createSignal12 } from "solid-js";
|
|
4630
4692
|
|
|
4631
4693
|
// src/blocks/button/component-info.ts
|
|
4632
4694
|
var componentInfo = {
|
|
@@ -5432,7 +5494,7 @@ var componentInfo12 = {
|
|
|
5432
5494
|
};
|
|
5433
5495
|
|
|
5434
5496
|
// src/blocks/video/video.tsx
|
|
5435
|
-
import { Show as
|
|
5497
|
+
import { Show as Show8 } from "solid-js";
|
|
5436
5498
|
function Video(props) {
|
|
5437
5499
|
function videoProps() {
|
|
5438
5500
|
return {
|
|
@@ -5483,8 +5545,8 @@ function Video(props) {
|
|
|
5483
5545
|
}}
|
|
5484
5546
|
src={props.video || "no-src"}
|
|
5485
5547
|
poster={props.posterImage}
|
|
5486
|
-
><
|
|
5487
|
-
<
|
|
5548
|
+
><Show8 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show8></video>
|
|
5549
|
+
<Show8
|
|
5488
5550
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
5489
5551
|
><div
|
|
5490
5552
|
style={{
|
|
@@ -5493,15 +5555,15 @@ function Video(props) {
|
|
|
5493
5555
|
"pointer-events": "none",
|
|
5494
5556
|
"font-size": "0px"
|
|
5495
5557
|
}}
|
|
5496
|
-
/></
|
|
5497
|
-
<
|
|
5558
|
+
/></Show8>
|
|
5559
|
+
<Show8 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
5498
5560
|
style={{
|
|
5499
5561
|
display: "flex",
|
|
5500
5562
|
"flex-direction": "column",
|
|
5501
5563
|
"align-items": "stretch"
|
|
5502
5564
|
}}
|
|
5503
|
-
>{props.children}</div></
|
|
5504
|
-
<
|
|
5565
|
+
>{props.children}</div></Show8>
|
|
5566
|
+
<Show8 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
5505
5567
|
style={{
|
|
5506
5568
|
"pointer-events": "none",
|
|
5507
5569
|
display: "flex",
|
|
@@ -5513,7 +5575,7 @@ function Video(props) {
|
|
|
5513
5575
|
width: "100%",
|
|
5514
5576
|
height: "100%"
|
|
5515
5577
|
}}
|
|
5516
|
-
>{props.children}</div></
|
|
5578
|
+
>{props.children}</div></Show8>
|
|
5517
5579
|
</div>;
|
|
5518
5580
|
}
|
|
5519
5581
|
var video_default = Video;
|
|
@@ -5633,7 +5695,7 @@ function InlinedScript(props) {
|
|
|
5633
5695
|
var Inlined_script_default = InlinedScript;
|
|
5634
5696
|
|
|
5635
5697
|
// src/components/content/components/enable-editor.tsx
|
|
5636
|
-
import { Show as
|
|
5698
|
+
import { Show as Show9, onMount as onMount2, on as on2, createEffect as createEffect2, createSignal as createSignal10 } from "solid-js";
|
|
5637
5699
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
5638
5700
|
|
|
5639
5701
|
// src/helpers/preview-lru-cache/get.ts
|
|
@@ -6123,7 +6185,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6123
6185
|
};
|
|
6124
6186
|
|
|
6125
6187
|
// src/constants/sdk-version.ts
|
|
6126
|
-
var SDK_VERSION = "0.12.
|
|
6188
|
+
var SDK_VERSION = "0.12.4";
|
|
6127
6189
|
|
|
6128
6190
|
// src/functions/register.ts
|
|
6129
6191
|
var registry = {};
|
|
@@ -6545,7 +6607,7 @@ function EnableEditor(props) {
|
|
|
6545
6607
|
}
|
|
6546
6608
|
}
|
|
6547
6609
|
createEffect2(on2(() => [props.locale], onUpdateFn_6));
|
|
6548
|
-
return <builder_context_default.Provider value={props.builderContextSignal}><
|
|
6610
|
+
return <builder_context_default.Provider value={props.builderContextSignal}><Show9 when={props.builderContextSignal.content}><Dynamic5
|
|
6549
6611
|
class={`variant-${props.content?.testVariationId || props.content?.id}`}
|
|
6550
6612
|
{...{}}
|
|
6551
6613
|
key={forceReRenderCount()}
|
|
@@ -6560,7 +6622,7 @@ function EnableEditor(props) {
|
|
|
6560
6622
|
}}
|
|
6561
6623
|
{...props.contentWrapperProps}
|
|
6562
6624
|
component={ContentWrapper()}
|
|
6563
|
-
>{props.children}</Dynamic5></
|
|
6625
|
+
>{props.children}</Dynamic5></Show9></builder_context_default.Provider>;
|
|
6564
6626
|
}
|
|
6565
6627
|
var Enable_editor_default = EnableEditor;
|
|
6566
6628
|
|
|
@@ -6782,21 +6844,23 @@ function ContentComponent(props) {
|
|
|
6782
6844
|
builderContextSignal={builderContextSignal()}
|
|
6783
6845
|
contentWrapper={props.contentWrapper}
|
|
6784
6846
|
contentWrapperProps={props.contentWrapperProps}
|
|
6847
|
+
linkComponent={props.linkComponent}
|
|
6785
6848
|
trustedHosts={props.trustedHosts}
|
|
6786
6849
|
{...{
|
|
6787
6850
|
setBuilderContextSignal
|
|
6788
6851
|
}}
|
|
6789
6852
|
>
|
|
6790
|
-
<
|
|
6791
|
-
<
|
|
6853
|
+
<Show10 when={props.isSsrAbTest}><Inlined_script_default scriptStr={scriptStr()} /></Show10>
|
|
6854
|
+
<Show10 when={TARGET !== "reactNative"}><Styles_default
|
|
6792
6855
|
contentId={builderContextSignal().content?.id}
|
|
6793
6856
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
6794
6857
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
6795
|
-
/></
|
|
6858
|
+
/></Show10>
|
|
6796
6859
|
<Blocks_default
|
|
6797
6860
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
6798
6861
|
context={builderContextSignal()}
|
|
6799
6862
|
registeredComponents={registeredComponents()}
|
|
6863
|
+
linkComponent={props.linkComponent}
|
|
6800
6864
|
/>
|
|
6801
6865
|
</Enable_editor_default></components_context_default.Provider>;
|
|
6802
6866
|
}
|
|
@@ -6835,8 +6899,8 @@ function ContentVariants(props) {
|
|
|
6835
6899
|
setShouldRenderVariants(false);
|
|
6836
6900
|
});
|
|
6837
6901
|
return <>
|
|
6838
|
-
<
|
|
6839
|
-
<
|
|
6902
|
+
<Show11 when={!props.__isNestedRender && TARGET !== "reactNative"}><Inlined_script_default scriptStr={getScriptString()} /></Show11>
|
|
6903
|
+
<Show11 when={shouldRenderVariants()}>
|
|
6840
6904
|
<Inlined_styles_default
|
|
6841
6905
|
id={`variants-styles-${props.content?.id}`}
|
|
6842
6906
|
styles={hideVariantsStyleString()}
|
|
@@ -6856,6 +6920,7 @@ function ContentVariants(props) {
|
|
|
6856
6920
|
apiKey={props.apiKey}
|
|
6857
6921
|
apiVersion={props.apiVersion}
|
|
6858
6922
|
customComponents={props.customComponents}
|
|
6923
|
+
linkComponent={props.linkComponent}
|
|
6859
6924
|
canTrack={props.canTrack}
|
|
6860
6925
|
locale={props.locale}
|
|
6861
6926
|
includeRefs={props.includeRefs}
|
|
@@ -6868,7 +6933,7 @@ function ContentVariants(props) {
|
|
|
6868
6933
|
trustedHosts={props.trustedHosts}
|
|
6869
6934
|
/>;
|
|
6870
6935
|
}}</For5>
|
|
6871
|
-
</
|
|
6936
|
+
</Show11>
|
|
6872
6937
|
<Content_default
|
|
6873
6938
|
{...{}}
|
|
6874
6939
|
content={defaultContent()}
|
|
@@ -6879,6 +6944,7 @@ function ContentVariants(props) {
|
|
|
6879
6944
|
apiKey={props.apiKey}
|
|
6880
6945
|
apiVersion={props.apiVersion}
|
|
6881
6946
|
customComponents={props.customComponents}
|
|
6947
|
+
linkComponent={props.linkComponent}
|
|
6882
6948
|
canTrack={props.canTrack}
|
|
6883
6949
|
locale={props.locale}
|
|
6884
6950
|
includeRefs={props.includeRefs}
|
|
@@ -6923,7 +6989,7 @@ function Symbol2(props) {
|
|
|
6923
6989
|
const [contentToUse, setContentToUse] = createSignal14(props.symbol?.content);
|
|
6924
6990
|
function className() {
|
|
6925
6991
|
return [
|
|
6926
|
-
...[props.attributes
|
|
6992
|
+
...[props.attributes[getClassPropName()]],
|
|
6927
6993
|
"builder-symbol",
|
|
6928
6994
|
props.symbol?.inline ? "builder-inline-symbol" : void 0,
|
|
6929
6995
|
props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -6964,6 +7030,7 @@ function Symbol2(props) {
|
|
|
6964
7030
|
}}
|
|
6965
7031
|
model={props.symbol?.model}
|
|
6966
7032
|
content={contentToUse()}
|
|
7033
|
+
linkComponent={props.builderLinkComponent}
|
|
6967
7034
|
/></div>;
|
|
6968
7035
|
}
|
|
6969
7036
|
var symbol_default = Symbol2;
|