@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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, Dynamic, memo, use } from 'solid-js/web';
|
|
2
|
-
import { createContext,
|
|
2
|
+
import { createContext, useContext, Show, For, createSignal, onMount, createEffect, on } from 'solid-js';
|
|
3
3
|
import { css } from 'solid-styled-components';
|
|
4
4
|
|
|
5
5
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -9,44 +9,97 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
9
9
|
return require.apply(this, arguments);
|
|
10
10
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
11
11
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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) {
|
|
15
21
|
return createComponent(Show, {
|
|
16
22
|
get fallback() {
|
|
17
|
-
return (() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
all: "unset"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}, {}, () => props.attributes, {
|
|
26
|
-
get style() {
|
|
27
|
-
return props.attributes.style;
|
|
28
|
-
}
|
|
29
|
-
}), false, true);
|
|
30
|
-
insert(_el$2, () => props.text);
|
|
31
|
-
return _el$2;
|
|
32
|
-
})();
|
|
23
|
+
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
24
|
+
get component() {
|
|
25
|
+
return props.TagName;
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
33
28
|
},
|
|
34
29
|
get when() {
|
|
35
|
-
return props.
|
|
30
|
+
return !isEmptyElement(props.TagName);
|
|
36
31
|
},
|
|
37
32
|
get children() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
return createComponent(Show, {
|
|
34
|
+
get fallback() {
|
|
35
|
+
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
36
|
+
get component() {
|
|
37
|
+
return props.TagName;
|
|
38
|
+
},
|
|
39
|
+
get children() {
|
|
40
|
+
return props.children;
|
|
41
|
+
}
|
|
42
|
+
}));
|
|
42
43
|
},
|
|
43
|
-
get
|
|
44
|
-
return props.
|
|
44
|
+
get when() {
|
|
45
|
+
return typeof props.TagName === "string";
|
|
45
46
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
get children() {
|
|
48
|
+
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
49
|
+
get component() {
|
|
50
|
+
return props.TagName;
|
|
51
|
+
},
|
|
52
|
+
get children() {
|
|
53
|
+
return props.children;
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
var dynamic_renderer_default = DynamicRenderer;
|
|
62
|
+
|
|
63
|
+
// src/constants/target.ts
|
|
64
|
+
var TARGET = "solid";
|
|
65
|
+
|
|
66
|
+
// src/functions/get-class-prop-name.ts
|
|
67
|
+
var getClassPropName = () => {
|
|
68
|
+
switch (TARGET) {
|
|
69
|
+
case "react":
|
|
70
|
+
case "reactNative":
|
|
71
|
+
case "rsc":
|
|
72
|
+
return "className";
|
|
73
|
+
case "svelte":
|
|
74
|
+
case "vue":
|
|
75
|
+
case "solid":
|
|
76
|
+
case "qwik":
|
|
77
|
+
return "class";
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// src/blocks/button/button.tsx
|
|
82
|
+
function Button(props) {
|
|
83
|
+
return createComponent(dynamic_renderer_default, {
|
|
84
|
+
get TagName() {
|
|
85
|
+
return props.link ? props.builderLinkComponent || "a" : "button";
|
|
86
|
+
},
|
|
87
|
+
get attributes() {
|
|
88
|
+
return {
|
|
89
|
+
...props.attributes,
|
|
90
|
+
[getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
|
|
91
|
+
...props.link ? {
|
|
92
|
+
href: props.link,
|
|
93
|
+
target: props.openLinkInNewTab ? "_blank" : void 0,
|
|
94
|
+
role: "link"
|
|
95
|
+
} : {
|
|
96
|
+
role: "button"
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
actionAttributes: {},
|
|
101
|
+
get children() {
|
|
102
|
+
return props.text;
|
|
50
103
|
}
|
|
51
104
|
});
|
|
52
105
|
}
|
|
@@ -93,9 +146,6 @@ function isBrowser() {
|
|
|
93
146
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
94
147
|
}
|
|
95
148
|
|
|
96
|
-
// src/constants/target.ts
|
|
97
|
-
var TARGET = "solid";
|
|
98
|
-
|
|
99
149
|
// src/functions/is-iframe.ts
|
|
100
150
|
function isIframe() {
|
|
101
151
|
return isBrowser() && window.self !== window.top;
|
|
@@ -3634,10 +3684,10 @@ var createCssClass = ({
|
|
|
3634
3684
|
return cssClass;
|
|
3635
3685
|
}
|
|
3636
3686
|
};
|
|
3637
|
-
var _tmpl$
|
|
3687
|
+
var _tmpl$ = /* @__PURE__ */ template(`<style>`);
|
|
3638
3688
|
function InlinedStyles(props) {
|
|
3639
3689
|
return (() => {
|
|
3640
|
-
const _el$ = _tmpl$
|
|
3690
|
+
const _el$ = _tmpl$();
|
|
3641
3691
|
effect((_p$) => {
|
|
3642
3692
|
const _v$ = props.styles, _v$2 = props.id;
|
|
3643
3693
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -3671,7 +3721,7 @@ function BlockStyles(props) {
|
|
|
3671
3721
|
}
|
|
3672
3722
|
return true;
|
|
3673
3723
|
}
|
|
3674
|
-
function
|
|
3724
|
+
function css4() {
|
|
3675
3725
|
const processedBlock = getProcessedBlock({
|
|
3676
3726
|
block: props.block,
|
|
3677
3727
|
localState: props.context.localState,
|
|
@@ -3708,12 +3758,12 @@ function BlockStyles(props) {
|
|
|
3708
3758
|
}
|
|
3709
3759
|
return createComponent(Show, {
|
|
3710
3760
|
get when() {
|
|
3711
|
-
return memo(() => !!(TARGET !== "reactNative" &&
|
|
3761
|
+
return memo(() => !!(TARGET !== "reactNative" && css4()))() && canShowBlock();
|
|
3712
3762
|
},
|
|
3713
3763
|
get children() {
|
|
3714
3764
|
return createComponent(inlined_styles_default, {
|
|
3715
3765
|
get styles() {
|
|
3716
|
-
return
|
|
3766
|
+
return css4();
|
|
3717
3767
|
}
|
|
3718
3768
|
});
|
|
3719
3769
|
}
|
|
@@ -3763,6 +3813,38 @@ function getBlockActions(options) {
|
|
|
3763
3813
|
return obj;
|
|
3764
3814
|
}
|
|
3765
3815
|
|
|
3816
|
+
// src/functions/transform-style-property.ts
|
|
3817
|
+
function transformStyleProperty({
|
|
3818
|
+
style
|
|
3819
|
+
}) {
|
|
3820
|
+
return style;
|
|
3821
|
+
}
|
|
3822
|
+
|
|
3823
|
+
// src/functions/get-style.ts
|
|
3824
|
+
var getStyle = ({
|
|
3825
|
+
block,
|
|
3826
|
+
context
|
|
3827
|
+
}) => {
|
|
3828
|
+
return mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
3829
|
+
style: block.style || {},
|
|
3830
|
+
context,
|
|
3831
|
+
block
|
|
3832
|
+
}));
|
|
3833
|
+
};
|
|
3834
|
+
function mapStyleObjToStrIfNeeded(style) {
|
|
3835
|
+
switch (TARGET) {
|
|
3836
|
+
case "svelte":
|
|
3837
|
+
case "vue":
|
|
3838
|
+
case "solid":
|
|
3839
|
+
return convertStyleMapToCSSArray(style).join(" ");
|
|
3840
|
+
case "qwik":
|
|
3841
|
+
case "reactNative":
|
|
3842
|
+
case "react":
|
|
3843
|
+
case "rsc":
|
|
3844
|
+
return style;
|
|
3845
|
+
}
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3766
3848
|
// src/functions/transform-block-properties.ts
|
|
3767
3849
|
function transformBlockProperties({
|
|
3768
3850
|
properties
|
|
@@ -3784,8 +3866,11 @@ function getBlockProperties({
|
|
|
3784
3866
|
...extractRelevantRootBlockProperties(block),
|
|
3785
3867
|
...block.properties,
|
|
3786
3868
|
"builder-id": block.id,
|
|
3787
|
-
style:
|
|
3788
|
-
|
|
3869
|
+
style: getStyle({
|
|
3870
|
+
block,
|
|
3871
|
+
context
|
|
3872
|
+
}),
|
|
3873
|
+
[getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
|
|
3789
3874
|
};
|
|
3790
3875
|
return transformBlockProperties({
|
|
3791
3876
|
properties,
|
|
@@ -3793,69 +3878,6 @@ function getBlockProperties({
|
|
|
3793
3878
|
block
|
|
3794
3879
|
});
|
|
3795
3880
|
}
|
|
3796
|
-
function getStyleAttribute(style) {
|
|
3797
|
-
switch (TARGET) {
|
|
3798
|
-
case "svelte":
|
|
3799
|
-
case "vue":
|
|
3800
|
-
case "solid":
|
|
3801
|
-
return convertStyleMapToCSSArray(style).join(" ");
|
|
3802
|
-
case "qwik":
|
|
3803
|
-
case "reactNative":
|
|
3804
|
-
case "react":
|
|
3805
|
-
case "rsc":
|
|
3806
|
-
return style;
|
|
3807
|
-
}
|
|
3808
|
-
}
|
|
3809
|
-
|
|
3810
|
-
// src/components/dynamic-renderer/dynamic-renderer.helpers.ts
|
|
3811
|
-
var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
3812
|
-
var isEmptyElement = (tagName) => {
|
|
3813
|
-
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
3814
|
-
};
|
|
3815
|
-
|
|
3816
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3817
|
-
function DynamicRenderer(props) {
|
|
3818
|
-
return createComponent(Show, {
|
|
3819
|
-
get fallback() {
|
|
3820
|
-
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
3821
|
-
get component() {
|
|
3822
|
-
return props.TagName;
|
|
3823
|
-
}
|
|
3824
|
-
}));
|
|
3825
|
-
},
|
|
3826
|
-
get when() {
|
|
3827
|
-
return !isEmptyElement(props.TagName);
|
|
3828
|
-
},
|
|
3829
|
-
get children() {
|
|
3830
|
-
return createComponent(Show, {
|
|
3831
|
-
get fallback() {
|
|
3832
|
-
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
3833
|
-
get component() {
|
|
3834
|
-
return props.TagName;
|
|
3835
|
-
},
|
|
3836
|
-
get children() {
|
|
3837
|
-
return props.children;
|
|
3838
|
-
}
|
|
3839
|
-
}));
|
|
3840
|
-
},
|
|
3841
|
-
get when() {
|
|
3842
|
-
return typeof props.TagName === "string";
|
|
3843
|
-
},
|
|
3844
|
-
get children() {
|
|
3845
|
-
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
3846
|
-
get component() {
|
|
3847
|
-
return props.TagName;
|
|
3848
|
-
},
|
|
3849
|
-
get children() {
|
|
3850
|
-
return props.children;
|
|
3851
|
-
}
|
|
3852
|
-
}));
|
|
3853
|
-
}
|
|
3854
|
-
});
|
|
3855
|
-
}
|
|
3856
|
-
});
|
|
3857
|
-
}
|
|
3858
|
-
var dynamic_renderer_default = DynamicRenderer;
|
|
3859
3881
|
|
|
3860
3882
|
// src/components/block/components/block-wrapper.tsx
|
|
3861
3883
|
function BlockWrapper(props) {
|
|
@@ -3958,6 +3980,7 @@ function ComponentRef(props) {
|
|
|
3958
3980
|
builderBlock: props.builderBlock,
|
|
3959
3981
|
context: props.context,
|
|
3960
3982
|
componentRef: props.componentRef,
|
|
3983
|
+
linkComponent: props.linkComponent,
|
|
3961
3984
|
includeBlockProps: props.includeBlockProps,
|
|
3962
3985
|
isInteractive: props.isInteractive,
|
|
3963
3986
|
contextValue: props.context
|
|
@@ -3982,6 +4005,9 @@ function ComponentRef(props) {
|
|
|
3982
4005
|
},
|
|
3983
4006
|
get registeredComponents() {
|
|
3984
4007
|
return props.registeredComponents;
|
|
4008
|
+
},
|
|
4009
|
+
get linkComponent() {
|
|
4010
|
+
return props.linkComponent;
|
|
3985
4011
|
}
|
|
3986
4012
|
});
|
|
3987
4013
|
}
|
|
@@ -4008,6 +4034,9 @@ function RepeatedBlock(props) {
|
|
|
4008
4034
|
},
|
|
4009
4035
|
get registeredComponents() {
|
|
4010
4036
|
return props.registeredComponents;
|
|
4037
|
+
},
|
|
4038
|
+
get linkComponent() {
|
|
4039
|
+
return props.linkComponent;
|
|
4011
4040
|
}
|
|
4012
4041
|
});
|
|
4013
4042
|
}
|
|
@@ -4042,6 +4071,10 @@ function Block(props) {
|
|
|
4042
4071
|
});
|
|
4043
4072
|
}
|
|
4044
4073
|
function Tag() {
|
|
4074
|
+
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
4075
|
+
if (shouldUseLink) {
|
|
4076
|
+
return props.linkComponent || "a";
|
|
4077
|
+
}
|
|
4045
4078
|
return props.block.tagName || "div";
|
|
4046
4079
|
}
|
|
4047
4080
|
function canShowBlock() {
|
|
@@ -4065,11 +4098,15 @@ function Block(props) {
|
|
|
4065
4098
|
componentOptions: {
|
|
4066
4099
|
...getBlockComponentOptions(processedBlock()),
|
|
4067
4100
|
builderContext: props.context,
|
|
4101
|
+
...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
4102
|
+
builderLinkComponent: props.linkComponent
|
|
4103
|
+
} : {},
|
|
4068
4104
|
...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
4069
4105
|
builderComponents: props.registeredComponents
|
|
4070
4106
|
} : {}
|
|
4071
4107
|
},
|
|
4072
4108
|
context: childrenContext(),
|
|
4109
|
+
linkComponent: props.linkComponent,
|
|
4073
4110
|
registeredComponents: props.registeredComponents,
|
|
4074
4111
|
builderBlock: processedBlock(),
|
|
4075
4112
|
includeBlockProps: blockComponent()?.noWrap === true,
|
|
@@ -4106,6 +4143,9 @@ function Block(props) {
|
|
|
4106
4143
|
get registeredComponents() {
|
|
4107
4144
|
return componentRefProps().registeredComponents;
|
|
4108
4145
|
},
|
|
4146
|
+
get linkComponent() {
|
|
4147
|
+
return componentRefProps().linkComponent;
|
|
4148
|
+
},
|
|
4109
4149
|
get builderBlock() {
|
|
4110
4150
|
return componentRefProps().builderBlock;
|
|
4111
4151
|
},
|
|
@@ -4139,6 +4179,9 @@ function Block(props) {
|
|
|
4139
4179
|
},
|
|
4140
4180
|
get registeredComponents() {
|
|
4141
4181
|
return props.registeredComponents;
|
|
4182
|
+
},
|
|
4183
|
+
get linkComponent() {
|
|
4184
|
+
return props.linkComponent;
|
|
4142
4185
|
}
|
|
4143
4186
|
});
|
|
4144
4187
|
}
|
|
@@ -4158,6 +4201,9 @@ function Block(props) {
|
|
|
4158
4201
|
get context() {
|
|
4159
4202
|
return props.context;
|
|
4160
4203
|
},
|
|
4204
|
+
get linkComponent() {
|
|
4205
|
+
return props.linkComponent;
|
|
4206
|
+
},
|
|
4161
4207
|
get children() {
|
|
4162
4208
|
return [createComponent(component_ref_default, {
|
|
4163
4209
|
get componentRef() {
|
|
@@ -4175,6 +4221,9 @@ function Block(props) {
|
|
|
4175
4221
|
get registeredComponents() {
|
|
4176
4222
|
return componentRefProps().registeredComponents;
|
|
4177
4223
|
},
|
|
4224
|
+
get linkComponent() {
|
|
4225
|
+
return componentRefProps().linkComponent;
|
|
4226
|
+
},
|
|
4178
4227
|
get builderBlock() {
|
|
4179
4228
|
return componentRefProps().builderBlock;
|
|
4180
4229
|
},
|
|
@@ -4200,6 +4249,9 @@ function Block(props) {
|
|
|
4200
4249
|
},
|
|
4201
4250
|
get registeredComponents() {
|
|
4202
4251
|
return props.registeredComponents;
|
|
4252
|
+
},
|
|
4253
|
+
get linkComponent() {
|
|
4254
|
+
return props.linkComponent;
|
|
4203
4255
|
}
|
|
4204
4256
|
});
|
|
4205
4257
|
}
|
|
@@ -4312,6 +4364,9 @@ function Blocks(props) {
|
|
|
4312
4364
|
return block.id;
|
|
4313
4365
|
},
|
|
4314
4366
|
block,
|
|
4367
|
+
get linkComponent() {
|
|
4368
|
+
return props.linkComponent;
|
|
4369
|
+
},
|
|
4315
4370
|
get context() {
|
|
4316
4371
|
return props.context || builderContext;
|
|
4317
4372
|
},
|
|
@@ -4329,7 +4384,7 @@ function Blocks(props) {
|
|
|
4329
4384
|
var blocks_default = Blocks;
|
|
4330
4385
|
|
|
4331
4386
|
// src/blocks/columns/columns.tsx
|
|
4332
|
-
var _tmpl$
|
|
4387
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
4333
4388
|
function Columns(props) {
|
|
4334
4389
|
const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
|
|
4335
4390
|
const [cols, setCols] = createSignal(props.columns || []);
|
|
@@ -4370,7 +4425,13 @@ function Columns(props) {
|
|
|
4370
4425
|
const mobileWidth = "100%";
|
|
4371
4426
|
const mobileMarginLeft = 0;
|
|
4372
4427
|
const marginLeftKey = "margin-left";
|
|
4428
|
+
const sharedStyles = {
|
|
4429
|
+
display: "flex",
|
|
4430
|
+
flexDirection: "column",
|
|
4431
|
+
alignItems: "stretch"
|
|
4432
|
+
};
|
|
4373
4433
|
return {
|
|
4434
|
+
...sharedStyles,
|
|
4374
4435
|
width,
|
|
4375
4436
|
[marginLeftKey]: gutterPixels,
|
|
4376
4437
|
"--column-width-mobile": getMobileStyle({
|
|
@@ -4423,7 +4484,7 @@ function Columns(props) {
|
|
|
4423
4484
|
`;
|
|
4424
4485
|
}
|
|
4425
4486
|
return (() => {
|
|
4426
|
-
const _el$ = _tmpl$
|
|
4487
|
+
const _el$ = _tmpl$2();
|
|
4427
4488
|
spread(_el$, mergeProps({
|
|
4428
4489
|
get ["class"]() {
|
|
4429
4490
|
return `builder-columns ${props.builderBlock.id}-breakpoints ` + css({
|
|
@@ -4451,52 +4512,56 @@ function Columns(props) {
|
|
|
4451
4512
|
},
|
|
4452
4513
|
children: (column, _index) => {
|
|
4453
4514
|
const index = _index();
|
|
4454
|
-
return (
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
}
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
}
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4515
|
+
return createComponent(dynamic_renderer_default, {
|
|
4516
|
+
key: index,
|
|
4517
|
+
get TagName() {
|
|
4518
|
+
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
4519
|
+
},
|
|
4520
|
+
actionAttributes: {},
|
|
4521
|
+
get attributes() {
|
|
4522
|
+
return {
|
|
4523
|
+
...{},
|
|
4524
|
+
...column.link ? {
|
|
4525
|
+
href: column.link
|
|
4526
|
+
} : {},
|
|
4527
|
+
[getClassPropName()]: "builder-column",
|
|
4528
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
4529
|
+
};
|
|
4530
|
+
},
|
|
4531
|
+
get children() {
|
|
4532
|
+
return createComponent(blocks_default, {
|
|
4533
|
+
path: `component.options.columns.${index}.blocks`,
|
|
4534
|
+
get parent() {
|
|
4535
|
+
return props.builderBlock.id;
|
|
4536
|
+
},
|
|
4537
|
+
styleProp: {
|
|
4538
|
+
flexGrow: "1"
|
|
4539
|
+
},
|
|
4540
|
+
get context() {
|
|
4541
|
+
return props.builderContext;
|
|
4542
|
+
},
|
|
4543
|
+
get registeredComponents() {
|
|
4544
|
+
return props.builderComponents;
|
|
4545
|
+
},
|
|
4546
|
+
get linkComponent() {
|
|
4547
|
+
return props.builderLinkComponent;
|
|
4548
|
+
},
|
|
4549
|
+
get blocks() {
|
|
4550
|
+
return column.blocks;
|
|
4551
|
+
}
|
|
4552
|
+
});
|
|
4553
|
+
}
|
|
4554
|
+
});
|
|
4490
4555
|
}
|
|
4491
4556
|
}), null);
|
|
4492
4557
|
return _el$;
|
|
4493
4558
|
})();
|
|
4494
4559
|
}
|
|
4495
4560
|
var columns_default = Columns;
|
|
4496
|
-
var _tmpl$
|
|
4561
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
|
|
4497
4562
|
function FragmentComponent(props) {
|
|
4498
4563
|
return (() => {
|
|
4499
|
-
const _el$ = _tmpl$
|
|
4564
|
+
const _el$ = _tmpl$3();
|
|
4500
4565
|
insert(_el$, () => props.children);
|
|
4501
4566
|
return _el$;
|
|
4502
4567
|
})();
|
|
@@ -4551,7 +4616,7 @@ function getSrcSet(url) {
|
|
|
4551
4616
|
}
|
|
4552
4617
|
|
|
4553
4618
|
// src/blocks/image/image.tsx
|
|
4554
|
-
var _tmpl$
|
|
4619
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
|
|
4555
4620
|
var _tmpl$22 = /* @__PURE__ */ template(`<picture><img loading=lazy>`);
|
|
4556
4621
|
var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
|
|
4557
4622
|
function Image(props) {
|
|
@@ -4598,7 +4663,7 @@ function Image(props) {
|
|
|
4598
4663
|
return webpSrcSet();
|
|
4599
4664
|
},
|
|
4600
4665
|
get children() {
|
|
4601
|
-
const _el$2 = _tmpl$
|
|
4666
|
+
const _el$2 = _tmpl$4();
|
|
4602
4667
|
effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
|
|
4603
4668
|
return _el$2;
|
|
4604
4669
|
}
|
|
@@ -4680,10 +4745,10 @@ function Image(props) {
|
|
|
4680
4745
|
})];
|
|
4681
4746
|
}
|
|
4682
4747
|
var image_default = Image;
|
|
4683
|
-
var _tmpl$
|
|
4748
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
|
|
4684
4749
|
function SectionComponent(props) {
|
|
4685
4750
|
return (() => {
|
|
4686
|
-
const _el$ = _tmpl$
|
|
4751
|
+
const _el$ = _tmpl$5();
|
|
4687
4752
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
4688
4753
|
get style() {
|
|
4689
4754
|
return {
|
|
@@ -5177,7 +5242,7 @@ var componentInfo3 = {
|
|
|
5177
5242
|
advanced: true
|
|
5178
5243
|
}]
|
|
5179
5244
|
};
|
|
5180
|
-
var _tmpl$
|
|
5245
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
|
|
5181
5246
|
function CustomCode(props) {
|
|
5182
5247
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
5183
5248
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -5212,7 +5277,7 @@ function CustomCode(props) {
|
|
|
5212
5277
|
}
|
|
5213
5278
|
});
|
|
5214
5279
|
return (() => {
|
|
5215
|
-
const _el$ = _tmpl$
|
|
5280
|
+
const _el$ = _tmpl$6();
|
|
5216
5281
|
const _ref$ = elementRef;
|
|
5217
5282
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
|
|
5218
5283
|
effect((_p$) => {
|
|
@@ -5272,7 +5337,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
|
|
|
5272
5337
|
var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
5273
5338
|
|
|
5274
5339
|
// src/blocks/embed/embed.tsx
|
|
5275
|
-
var _tmpl$
|
|
5340
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-embed>`);
|
|
5276
5341
|
function Embed(props) {
|
|
5277
5342
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
5278
5343
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -5308,7 +5373,7 @@ function Embed(props) {
|
|
|
5308
5373
|
}
|
|
5309
5374
|
createEffect(on(() => [elem, ranInitFn()], onUpdateFn_0));
|
|
5310
5375
|
return (() => {
|
|
5311
|
-
const _el$ = _tmpl$
|
|
5376
|
+
const _el$ = _tmpl$7();
|
|
5312
5377
|
const _ref$ = elem;
|
|
5313
5378
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
|
|
5314
5379
|
effect(() => _el$.innerHTML = props.content);
|
|
@@ -5465,10 +5530,10 @@ var componentInfo7 = {
|
|
|
5465
5530
|
noWrap: true,
|
|
5466
5531
|
static: true
|
|
5467
5532
|
};
|
|
5468
|
-
var _tmpl$
|
|
5533
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<img>`);
|
|
5469
5534
|
function ImgComponent(props) {
|
|
5470
5535
|
return (() => {
|
|
5471
|
-
const _el$ = _tmpl$
|
|
5536
|
+
const _el$ = _tmpl$8();
|
|
5472
5537
|
spread(_el$, mergeProps({
|
|
5473
5538
|
get style() {
|
|
5474
5539
|
return {
|
|
@@ -5548,10 +5613,10 @@ var componentInfo9 = {
|
|
|
5548
5613
|
defaultValue: "children"
|
|
5549
5614
|
}]
|
|
5550
5615
|
};
|
|
5551
|
-
var _tmpl$
|
|
5616
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
|
|
5552
5617
|
function Slot(props) {
|
|
5553
5618
|
return (() => {
|
|
5554
|
-
const _el$ = _tmpl$
|
|
5619
|
+
const _el$ = _tmpl$9();
|
|
5555
5620
|
_el$.style.setProperty("pointer-events", "auto");
|
|
5556
5621
|
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
5557
5622
|
"builder-slot": props.name
|
|
@@ -5631,10 +5696,10 @@ var componentInfo11 = {
|
|
|
5631
5696
|
textAlign: "center"
|
|
5632
5697
|
}
|
|
5633
5698
|
};
|
|
5634
|
-
var _tmpl$
|
|
5699
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
5635
5700
|
function Text(props) {
|
|
5636
5701
|
return (() => {
|
|
5637
|
-
const _el$ = _tmpl$
|
|
5702
|
+
const _el$ = _tmpl$10();
|
|
5638
5703
|
_el$.style.setProperty("outline", "none");
|
|
5639
5704
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
5640
5705
|
return _el$;
|
|
@@ -5725,7 +5790,7 @@ var componentInfo12 = {
|
|
|
5725
5790
|
advanced: true
|
|
5726
5791
|
}]
|
|
5727
5792
|
};
|
|
5728
|
-
var _tmpl$
|
|
5793
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
5729
5794
|
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
5730
5795
|
var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
5731
5796
|
function Video(props) {
|
|
@@ -5788,7 +5853,7 @@ function Video(props) {
|
|
|
5788
5853
|
return !props.lazyLoad;
|
|
5789
5854
|
},
|
|
5790
5855
|
get children() {
|
|
5791
|
-
const _el$3 = _tmpl$
|
|
5856
|
+
const _el$3 = _tmpl$11();
|
|
5792
5857
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
5793
5858
|
return _el$3;
|
|
5794
5859
|
}
|
|
@@ -5950,10 +6015,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
5950
6015
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
5951
6016
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
5952
6017
|
)`;
|
|
5953
|
-
var _tmpl$
|
|
6018
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<script>`);
|
|
5954
6019
|
function InlinedScript(props) {
|
|
5955
6020
|
return (() => {
|
|
5956
|
-
const _el$ = _tmpl$
|
|
6021
|
+
const _el$ = _tmpl$12();
|
|
5957
6022
|
effect((_p$) => {
|
|
5958
6023
|
const _v$ = props.scriptStr, _v$2 = props.id || "";
|
|
5959
6024
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -6460,7 +6525,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6460
6525
|
};
|
|
6461
6526
|
|
|
6462
6527
|
// src/constants/sdk-version.ts
|
|
6463
|
-
var SDK_VERSION = "0.12.
|
|
6528
|
+
var SDK_VERSION = "0.12.4";
|
|
6464
6529
|
|
|
6465
6530
|
// src/functions/register.ts
|
|
6466
6531
|
var registry = {};
|
|
@@ -6973,6 +7038,10 @@ ${getFontCss({
|
|
|
6973
7038
|
customFonts: props.customFonts
|
|
6974
7039
|
})}
|
|
6975
7040
|
|
|
7041
|
+
.builder-button {
|
|
7042
|
+
all: unset;
|
|
7043
|
+
}
|
|
7044
|
+
|
|
6976
7045
|
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
6977
7046
|
margin: 0;
|
|
6978
7047
|
}
|
|
@@ -7145,6 +7214,9 @@ function ContentComponent(props) {
|
|
|
7145
7214
|
get contentWrapperProps() {
|
|
7146
7215
|
return props.contentWrapperProps;
|
|
7147
7216
|
},
|
|
7217
|
+
get linkComponent() {
|
|
7218
|
+
return props.linkComponent;
|
|
7219
|
+
},
|
|
7148
7220
|
get trustedHosts() {
|
|
7149
7221
|
return props.trustedHosts;
|
|
7150
7222
|
}
|
|
@@ -7187,6 +7259,9 @@ function ContentComponent(props) {
|
|
|
7187
7259
|
},
|
|
7188
7260
|
get registeredComponents() {
|
|
7189
7261
|
return registeredComponents();
|
|
7262
|
+
},
|
|
7263
|
+
get linkComponent() {
|
|
7264
|
+
return props.linkComponent;
|
|
7190
7265
|
}
|
|
7191
7266
|
})];
|
|
7192
7267
|
}
|
|
@@ -7280,6 +7355,9 @@ function ContentVariants(props) {
|
|
|
7280
7355
|
get customComponents() {
|
|
7281
7356
|
return props.customComponents;
|
|
7282
7357
|
},
|
|
7358
|
+
get linkComponent() {
|
|
7359
|
+
return props.linkComponent;
|
|
7360
|
+
},
|
|
7283
7361
|
get canTrack() {
|
|
7284
7362
|
return props.canTrack;
|
|
7285
7363
|
},
|
|
@@ -7337,6 +7415,9 @@ function ContentVariants(props) {
|
|
|
7337
7415
|
get customComponents() {
|
|
7338
7416
|
return props.customComponents;
|
|
7339
7417
|
},
|
|
7418
|
+
get linkComponent() {
|
|
7419
|
+
return props.linkComponent;
|
|
7420
|
+
},
|
|
7340
7421
|
get canTrack() {
|
|
7341
7422
|
return props.canTrack;
|
|
7342
7423
|
},
|
|
@@ -7396,11 +7477,11 @@ var fetchSymbolContent = async ({
|
|
|
7396
7477
|
};
|
|
7397
7478
|
|
|
7398
7479
|
// src/blocks/symbol/symbol.tsx
|
|
7399
|
-
var _tmpl$
|
|
7480
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
|
|
7400
7481
|
function Symbol2(props) {
|
|
7401
7482
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
7402
7483
|
function className() {
|
|
7403
|
-
return [...[props.attributes
|
|
7484
|
+
return [...[props.attributes[getClassPropName()]], "builder-symbol", props.symbol?.inline ? "builder-inline-symbol" : void 0, props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0].filter(Boolean).join(" ");
|
|
7404
7485
|
}
|
|
7405
7486
|
function setContent() {
|
|
7406
7487
|
if (contentToUse())
|
|
@@ -7422,7 +7503,7 @@ function Symbol2(props) {
|
|
|
7422
7503
|
}
|
|
7423
7504
|
createEffect(on(() => [props.symbol], onUpdateFn_0));
|
|
7424
7505
|
return (() => {
|
|
7425
|
-
const _el$ = _tmpl$
|
|
7506
|
+
const _el$ = _tmpl$13();
|
|
7426
7507
|
spread(_el$, mergeProps({
|
|
7427
7508
|
get ["class"]() {
|
|
7428
7509
|
return className();
|
|
@@ -7457,6 +7538,9 @@ function Symbol2(props) {
|
|
|
7457
7538
|
},
|
|
7458
7539
|
get content() {
|
|
7459
7540
|
return contentToUse();
|
|
7541
|
+
},
|
|
7542
|
+
get linkComponent() {
|
|
7543
|
+
return props.builderLinkComponent;
|
|
7460
7544
|
}
|
|
7461
7545
|
}));
|
|
7462
7546
|
return _el$;
|