@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.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,42 +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
|
-
}
|
|
23
|
-
}, {}, () => props.attributes, {
|
|
24
|
-
get style() {
|
|
25
|
-
return props.attributes.style;
|
|
26
|
-
}
|
|
27
|
-
}), false, true);
|
|
28
|
-
insert(_el$2, () => props.text);
|
|
29
|
-
return _el$2;
|
|
30
|
-
})();
|
|
23
|
+
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
24
|
+
get component() {
|
|
25
|
+
return props.TagName;
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
31
28
|
},
|
|
32
29
|
get when() {
|
|
33
|
-
return props.
|
|
30
|
+
return !isEmptyElement(props.TagName);
|
|
34
31
|
},
|
|
35
32
|
get children() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
+
}));
|
|
40
43
|
},
|
|
41
|
-
get
|
|
42
|
-
return props.
|
|
44
|
+
get when() {
|
|
45
|
+
return typeof props.TagName === "string";
|
|
43
46
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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;
|
|
48
103
|
}
|
|
49
104
|
});
|
|
50
105
|
}
|
|
@@ -91,9 +146,6 @@ function isBrowser() {
|
|
|
91
146
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
92
147
|
}
|
|
93
148
|
|
|
94
|
-
// src/constants/target.ts
|
|
95
|
-
var TARGET = "solid";
|
|
96
|
-
|
|
97
149
|
// src/functions/is-iframe.ts
|
|
98
150
|
function isIframe() {
|
|
99
151
|
return isBrowser() && window.self !== window.top;
|
|
@@ -3632,10 +3684,10 @@ var createCssClass = ({
|
|
|
3632
3684
|
return cssClass;
|
|
3633
3685
|
}
|
|
3634
3686
|
};
|
|
3635
|
-
var _tmpl$
|
|
3687
|
+
var _tmpl$ = /* @__PURE__ */ template(`<style>`);
|
|
3636
3688
|
function InlinedStyles(props) {
|
|
3637
3689
|
return (() => {
|
|
3638
|
-
const _el$ = _tmpl$
|
|
3690
|
+
const _el$ = _tmpl$();
|
|
3639
3691
|
effect((_p$) => {
|
|
3640
3692
|
const _v$ = props.styles, _v$2 = props.id;
|
|
3641
3693
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -3761,6 +3813,38 @@ function getBlockActions(options) {
|
|
|
3761
3813
|
return obj;
|
|
3762
3814
|
}
|
|
3763
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
|
+
|
|
3764
3848
|
// src/functions/transform-block-properties.ts
|
|
3765
3849
|
function transformBlockProperties({
|
|
3766
3850
|
properties
|
|
@@ -3782,8 +3866,11 @@ function getBlockProperties({
|
|
|
3782
3866
|
...extractRelevantRootBlockProperties(block),
|
|
3783
3867
|
...block.properties,
|
|
3784
3868
|
"builder-id": block.id,
|
|
3785
|
-
style:
|
|
3786
|
-
|
|
3869
|
+
style: getStyle({
|
|
3870
|
+
block,
|
|
3871
|
+
context
|
|
3872
|
+
}),
|
|
3873
|
+
[getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
|
|
3787
3874
|
};
|
|
3788
3875
|
return transformBlockProperties({
|
|
3789
3876
|
properties,
|
|
@@ -3791,69 +3878,6 @@ function getBlockProperties({
|
|
|
3791
3878
|
block
|
|
3792
3879
|
});
|
|
3793
3880
|
}
|
|
3794
|
-
function getStyleAttribute(style) {
|
|
3795
|
-
switch (TARGET) {
|
|
3796
|
-
case "svelte":
|
|
3797
|
-
case "vue":
|
|
3798
|
-
case "solid":
|
|
3799
|
-
return convertStyleMapToCSSArray(style).join(" ");
|
|
3800
|
-
case "qwik":
|
|
3801
|
-
case "reactNative":
|
|
3802
|
-
case "react":
|
|
3803
|
-
case "rsc":
|
|
3804
|
-
return style;
|
|
3805
|
-
}
|
|
3806
|
-
}
|
|
3807
|
-
|
|
3808
|
-
// src/components/dynamic-renderer/dynamic-renderer.helpers.ts
|
|
3809
|
-
var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
3810
|
-
var isEmptyElement = (tagName) => {
|
|
3811
|
-
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
3812
|
-
};
|
|
3813
|
-
|
|
3814
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
3815
|
-
function DynamicRenderer(props) {
|
|
3816
|
-
return createComponent(Show, {
|
|
3817
|
-
get fallback() {
|
|
3818
|
-
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
3819
|
-
get component() {
|
|
3820
|
-
return props.TagName;
|
|
3821
|
-
}
|
|
3822
|
-
}));
|
|
3823
|
-
},
|
|
3824
|
-
get when() {
|
|
3825
|
-
return !isEmptyElement(props.TagName);
|
|
3826
|
-
},
|
|
3827
|
-
get children() {
|
|
3828
|
-
return createComponent(Show, {
|
|
3829
|
-
get fallback() {
|
|
3830
|
-
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
3831
|
-
get component() {
|
|
3832
|
-
return props.TagName;
|
|
3833
|
-
},
|
|
3834
|
-
get children() {
|
|
3835
|
-
return props.children;
|
|
3836
|
-
}
|
|
3837
|
-
}));
|
|
3838
|
-
},
|
|
3839
|
-
get when() {
|
|
3840
|
-
return typeof props.TagName === "string";
|
|
3841
|
-
},
|
|
3842
|
-
get children() {
|
|
3843
|
-
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
3844
|
-
get component() {
|
|
3845
|
-
return props.TagName;
|
|
3846
|
-
},
|
|
3847
|
-
get children() {
|
|
3848
|
-
return props.children;
|
|
3849
|
-
}
|
|
3850
|
-
}));
|
|
3851
|
-
}
|
|
3852
|
-
});
|
|
3853
|
-
}
|
|
3854
|
-
});
|
|
3855
|
-
}
|
|
3856
|
-
var dynamic_renderer_default = DynamicRenderer;
|
|
3857
3881
|
|
|
3858
3882
|
// src/components/block/components/block-wrapper.tsx
|
|
3859
3883
|
function BlockWrapper(props) {
|
|
@@ -3956,6 +3980,7 @@ function ComponentRef(props) {
|
|
|
3956
3980
|
builderBlock: props.builderBlock,
|
|
3957
3981
|
context: props.context,
|
|
3958
3982
|
componentRef: props.componentRef,
|
|
3983
|
+
linkComponent: props.linkComponent,
|
|
3959
3984
|
includeBlockProps: props.includeBlockProps,
|
|
3960
3985
|
isInteractive: props.isInteractive,
|
|
3961
3986
|
contextValue: props.context
|
|
@@ -3980,6 +4005,9 @@ function ComponentRef(props) {
|
|
|
3980
4005
|
},
|
|
3981
4006
|
get registeredComponents() {
|
|
3982
4007
|
return props.registeredComponents;
|
|
4008
|
+
},
|
|
4009
|
+
get linkComponent() {
|
|
4010
|
+
return props.linkComponent;
|
|
3983
4011
|
}
|
|
3984
4012
|
});
|
|
3985
4013
|
}
|
|
@@ -4006,6 +4034,9 @@ function RepeatedBlock(props) {
|
|
|
4006
4034
|
},
|
|
4007
4035
|
get registeredComponents() {
|
|
4008
4036
|
return props.registeredComponents;
|
|
4037
|
+
},
|
|
4038
|
+
get linkComponent() {
|
|
4039
|
+
return props.linkComponent;
|
|
4009
4040
|
}
|
|
4010
4041
|
});
|
|
4011
4042
|
}
|
|
@@ -4040,6 +4071,10 @@ function Block(props) {
|
|
|
4040
4071
|
});
|
|
4041
4072
|
}
|
|
4042
4073
|
function Tag() {
|
|
4074
|
+
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
4075
|
+
if (shouldUseLink) {
|
|
4076
|
+
return props.linkComponent || "a";
|
|
4077
|
+
}
|
|
4043
4078
|
return props.block.tagName || "div";
|
|
4044
4079
|
}
|
|
4045
4080
|
function canShowBlock() {
|
|
@@ -4063,11 +4098,15 @@ function Block(props) {
|
|
|
4063
4098
|
componentOptions: {
|
|
4064
4099
|
...getBlockComponentOptions(processedBlock()),
|
|
4065
4100
|
builderContext: props.context,
|
|
4101
|
+
...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
4102
|
+
builderLinkComponent: props.linkComponent
|
|
4103
|
+
} : {},
|
|
4066
4104
|
...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
4067
4105
|
builderComponents: props.registeredComponents
|
|
4068
4106
|
} : {}
|
|
4069
4107
|
},
|
|
4070
4108
|
context: childrenContext(),
|
|
4109
|
+
linkComponent: props.linkComponent,
|
|
4071
4110
|
registeredComponents: props.registeredComponents,
|
|
4072
4111
|
builderBlock: processedBlock(),
|
|
4073
4112
|
includeBlockProps: blockComponent()?.noWrap === true,
|
|
@@ -4104,6 +4143,9 @@ function Block(props) {
|
|
|
4104
4143
|
get registeredComponents() {
|
|
4105
4144
|
return componentRefProps().registeredComponents;
|
|
4106
4145
|
},
|
|
4146
|
+
get linkComponent() {
|
|
4147
|
+
return componentRefProps().linkComponent;
|
|
4148
|
+
},
|
|
4107
4149
|
get builderBlock() {
|
|
4108
4150
|
return componentRefProps().builderBlock;
|
|
4109
4151
|
},
|
|
@@ -4137,6 +4179,9 @@ function Block(props) {
|
|
|
4137
4179
|
},
|
|
4138
4180
|
get registeredComponents() {
|
|
4139
4181
|
return props.registeredComponents;
|
|
4182
|
+
},
|
|
4183
|
+
get linkComponent() {
|
|
4184
|
+
return props.linkComponent;
|
|
4140
4185
|
}
|
|
4141
4186
|
});
|
|
4142
4187
|
}
|
|
@@ -4156,6 +4201,9 @@ function Block(props) {
|
|
|
4156
4201
|
get context() {
|
|
4157
4202
|
return props.context;
|
|
4158
4203
|
},
|
|
4204
|
+
get linkComponent() {
|
|
4205
|
+
return props.linkComponent;
|
|
4206
|
+
},
|
|
4159
4207
|
get children() {
|
|
4160
4208
|
return [createComponent(component_ref_default, {
|
|
4161
4209
|
get componentRef() {
|
|
@@ -4173,6 +4221,9 @@ function Block(props) {
|
|
|
4173
4221
|
get registeredComponents() {
|
|
4174
4222
|
return componentRefProps().registeredComponents;
|
|
4175
4223
|
},
|
|
4224
|
+
get linkComponent() {
|
|
4225
|
+
return componentRefProps().linkComponent;
|
|
4226
|
+
},
|
|
4176
4227
|
get builderBlock() {
|
|
4177
4228
|
return componentRefProps().builderBlock;
|
|
4178
4229
|
},
|
|
@@ -4198,6 +4249,9 @@ function Block(props) {
|
|
|
4198
4249
|
},
|
|
4199
4250
|
get registeredComponents() {
|
|
4200
4251
|
return props.registeredComponents;
|
|
4252
|
+
},
|
|
4253
|
+
get linkComponent() {
|
|
4254
|
+
return props.linkComponent;
|
|
4201
4255
|
}
|
|
4202
4256
|
});
|
|
4203
4257
|
}
|
|
@@ -4310,6 +4364,9 @@ function Blocks(props) {
|
|
|
4310
4364
|
return block.id;
|
|
4311
4365
|
},
|
|
4312
4366
|
block,
|
|
4367
|
+
get linkComponent() {
|
|
4368
|
+
return props.linkComponent;
|
|
4369
|
+
},
|
|
4313
4370
|
get context() {
|
|
4314
4371
|
return props.context || builderContext;
|
|
4315
4372
|
},
|
|
@@ -4327,7 +4384,7 @@ function Blocks(props) {
|
|
|
4327
4384
|
var blocks_default = Blocks;
|
|
4328
4385
|
|
|
4329
4386
|
// src/blocks/columns/columns.tsx
|
|
4330
|
-
var _tmpl$
|
|
4387
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
4331
4388
|
function Columns(props) {
|
|
4332
4389
|
const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
|
|
4333
4390
|
const [cols, setCols] = createSignal(props.columns || []);
|
|
@@ -4368,7 +4425,13 @@ function Columns(props) {
|
|
|
4368
4425
|
const mobileWidth = "100%";
|
|
4369
4426
|
const mobileMarginLeft = 0;
|
|
4370
4427
|
const marginLeftKey = "margin-left";
|
|
4428
|
+
const sharedStyles = {
|
|
4429
|
+
display: "flex",
|
|
4430
|
+
flexDirection: "column",
|
|
4431
|
+
alignItems: "stretch"
|
|
4432
|
+
};
|
|
4371
4433
|
return {
|
|
4434
|
+
...sharedStyles,
|
|
4372
4435
|
width,
|
|
4373
4436
|
[marginLeftKey]: gutterPixels,
|
|
4374
4437
|
"--column-width-mobile": getMobileStyle({
|
|
@@ -4421,7 +4484,7 @@ function Columns(props) {
|
|
|
4421
4484
|
`;
|
|
4422
4485
|
}
|
|
4423
4486
|
return (() => {
|
|
4424
|
-
const _el$ = _tmpl$
|
|
4487
|
+
const _el$ = _tmpl$2();
|
|
4425
4488
|
spread(_el$, mergeProps({
|
|
4426
4489
|
get ["class"]() {
|
|
4427
4490
|
return `builder-columns ${props.builderBlock.id}-breakpoints ` + css({
|
|
@@ -4449,52 +4512,56 @@ function Columns(props) {
|
|
|
4449
4512
|
},
|
|
4450
4513
|
children: (column, _index) => {
|
|
4451
4514
|
const index = _index();
|
|
4452
|
-
return (
|
|
4453
|
-
|
|
4454
|
-
|
|
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
|
-
|
|
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
|
+
});
|
|
4488
4555
|
}
|
|
4489
4556
|
}), null);
|
|
4490
4557
|
return _el$;
|
|
4491
4558
|
})();
|
|
4492
4559
|
}
|
|
4493
4560
|
var columns_default = Columns;
|
|
4494
|
-
var _tmpl$
|
|
4561
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
|
|
4495
4562
|
function FragmentComponent(props) {
|
|
4496
4563
|
return (() => {
|
|
4497
|
-
const _el$ = _tmpl$
|
|
4564
|
+
const _el$ = _tmpl$3();
|
|
4498
4565
|
insert(_el$, () => props.children);
|
|
4499
4566
|
return _el$;
|
|
4500
4567
|
})();
|
|
@@ -4549,7 +4616,7 @@ function getSrcSet(url) {
|
|
|
4549
4616
|
}
|
|
4550
4617
|
|
|
4551
4618
|
// src/blocks/image/image.tsx
|
|
4552
|
-
var _tmpl$
|
|
4619
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
|
|
4553
4620
|
var _tmpl$22 = /* @__PURE__ */ template(`<picture><img loading=lazy>`);
|
|
4554
4621
|
var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
|
|
4555
4622
|
function Image(props) {
|
|
@@ -4596,7 +4663,7 @@ function Image(props) {
|
|
|
4596
4663
|
return webpSrcSet();
|
|
4597
4664
|
},
|
|
4598
4665
|
get children() {
|
|
4599
|
-
const _el$2 = _tmpl$
|
|
4666
|
+
const _el$2 = _tmpl$4();
|
|
4600
4667
|
effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
|
|
4601
4668
|
return _el$2;
|
|
4602
4669
|
}
|
|
@@ -4678,10 +4745,10 @@ function Image(props) {
|
|
|
4678
4745
|
})];
|
|
4679
4746
|
}
|
|
4680
4747
|
var image_default = Image;
|
|
4681
|
-
var _tmpl$
|
|
4748
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
|
|
4682
4749
|
function SectionComponent(props) {
|
|
4683
4750
|
return (() => {
|
|
4684
|
-
const _el$ = _tmpl$
|
|
4751
|
+
const _el$ = _tmpl$5();
|
|
4685
4752
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
4686
4753
|
get style() {
|
|
4687
4754
|
return {
|
|
@@ -5175,7 +5242,7 @@ var componentInfo3 = {
|
|
|
5175
5242
|
advanced: true
|
|
5176
5243
|
}]
|
|
5177
5244
|
};
|
|
5178
|
-
var _tmpl$
|
|
5245
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
|
|
5179
5246
|
function CustomCode(props) {
|
|
5180
5247
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
5181
5248
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -5210,7 +5277,7 @@ function CustomCode(props) {
|
|
|
5210
5277
|
}
|
|
5211
5278
|
});
|
|
5212
5279
|
return (() => {
|
|
5213
|
-
const _el$ = _tmpl$
|
|
5280
|
+
const _el$ = _tmpl$6();
|
|
5214
5281
|
const _ref$ = elementRef;
|
|
5215
5282
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
|
|
5216
5283
|
effect((_p$) => {
|
|
@@ -5270,7 +5337,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
|
|
|
5270
5337
|
var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
5271
5338
|
|
|
5272
5339
|
// src/blocks/embed/embed.tsx
|
|
5273
|
-
var _tmpl$
|
|
5340
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-embed>`);
|
|
5274
5341
|
function Embed(props) {
|
|
5275
5342
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
5276
5343
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -5306,7 +5373,7 @@ function Embed(props) {
|
|
|
5306
5373
|
}
|
|
5307
5374
|
createEffect(on(() => [elem, ranInitFn()], onUpdateFn_0));
|
|
5308
5375
|
return (() => {
|
|
5309
|
-
const _el$ = _tmpl$
|
|
5376
|
+
const _el$ = _tmpl$7();
|
|
5310
5377
|
const _ref$ = elem;
|
|
5311
5378
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
|
|
5312
5379
|
effect(() => _el$.innerHTML = props.content);
|
|
@@ -5463,10 +5530,10 @@ var componentInfo7 = {
|
|
|
5463
5530
|
noWrap: true,
|
|
5464
5531
|
static: true
|
|
5465
5532
|
};
|
|
5466
|
-
var _tmpl$
|
|
5533
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<img>`);
|
|
5467
5534
|
function ImgComponent(props) {
|
|
5468
5535
|
return (() => {
|
|
5469
|
-
const _el$ = _tmpl$
|
|
5536
|
+
const _el$ = _tmpl$8();
|
|
5470
5537
|
spread(_el$, mergeProps({
|
|
5471
5538
|
get style() {
|
|
5472
5539
|
return {
|
|
@@ -5546,10 +5613,10 @@ var componentInfo9 = {
|
|
|
5546
5613
|
defaultValue: "children"
|
|
5547
5614
|
}]
|
|
5548
5615
|
};
|
|
5549
|
-
var _tmpl$
|
|
5616
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
|
|
5550
5617
|
function Slot(props) {
|
|
5551
5618
|
return (() => {
|
|
5552
|
-
const _el$ = _tmpl$
|
|
5619
|
+
const _el$ = _tmpl$9();
|
|
5553
5620
|
_el$.style.setProperty("pointer-events", "auto");
|
|
5554
5621
|
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
5555
5622
|
"builder-slot": props.name
|
|
@@ -5629,10 +5696,10 @@ var componentInfo11 = {
|
|
|
5629
5696
|
textAlign: "center"
|
|
5630
5697
|
}
|
|
5631
5698
|
};
|
|
5632
|
-
var _tmpl$
|
|
5699
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
5633
5700
|
function Text(props) {
|
|
5634
5701
|
return (() => {
|
|
5635
|
-
const _el$ = _tmpl$
|
|
5702
|
+
const _el$ = _tmpl$10();
|
|
5636
5703
|
_el$.style.setProperty("outline", "none");
|
|
5637
5704
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
5638
5705
|
return _el$;
|
|
@@ -5723,7 +5790,7 @@ var componentInfo12 = {
|
|
|
5723
5790
|
advanced: true
|
|
5724
5791
|
}]
|
|
5725
5792
|
};
|
|
5726
|
-
var _tmpl$
|
|
5793
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
5727
5794
|
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
5728
5795
|
var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
5729
5796
|
function Video(props) {
|
|
@@ -5786,7 +5853,7 @@ function Video(props) {
|
|
|
5786
5853
|
return !props.lazyLoad;
|
|
5787
5854
|
},
|
|
5788
5855
|
get children() {
|
|
5789
|
-
const _el$3 = _tmpl$
|
|
5856
|
+
const _el$3 = _tmpl$11();
|
|
5790
5857
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
5791
5858
|
return _el$3;
|
|
5792
5859
|
}
|
|
@@ -5948,10 +6015,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
5948
6015
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
5949
6016
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
5950
6017
|
)`;
|
|
5951
|
-
var _tmpl$
|
|
6018
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<script>`);
|
|
5952
6019
|
function InlinedScript(props) {
|
|
5953
6020
|
return (() => {
|
|
5954
|
-
const _el$ = _tmpl$
|
|
6021
|
+
const _el$ = _tmpl$12();
|
|
5955
6022
|
effect((_p$) => {
|
|
5956
6023
|
const _v$ = props.scriptStr, _v$2 = props.id || "";
|
|
5957
6024
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -6458,7 +6525,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6458
6525
|
};
|
|
6459
6526
|
|
|
6460
6527
|
// src/constants/sdk-version.ts
|
|
6461
|
-
var SDK_VERSION = "0.12.
|
|
6528
|
+
var SDK_VERSION = "0.12.4";
|
|
6462
6529
|
|
|
6463
6530
|
// src/functions/register.ts
|
|
6464
6531
|
var registry = {};
|
|
@@ -7147,6 +7214,9 @@ function ContentComponent(props) {
|
|
|
7147
7214
|
get contentWrapperProps() {
|
|
7148
7215
|
return props.contentWrapperProps;
|
|
7149
7216
|
},
|
|
7217
|
+
get linkComponent() {
|
|
7218
|
+
return props.linkComponent;
|
|
7219
|
+
},
|
|
7150
7220
|
get trustedHosts() {
|
|
7151
7221
|
return props.trustedHosts;
|
|
7152
7222
|
}
|
|
@@ -7189,6 +7259,9 @@ function ContentComponent(props) {
|
|
|
7189
7259
|
},
|
|
7190
7260
|
get registeredComponents() {
|
|
7191
7261
|
return registeredComponents();
|
|
7262
|
+
},
|
|
7263
|
+
get linkComponent() {
|
|
7264
|
+
return props.linkComponent;
|
|
7192
7265
|
}
|
|
7193
7266
|
})];
|
|
7194
7267
|
}
|
|
@@ -7282,6 +7355,9 @@ function ContentVariants(props) {
|
|
|
7282
7355
|
get customComponents() {
|
|
7283
7356
|
return props.customComponents;
|
|
7284
7357
|
},
|
|
7358
|
+
get linkComponent() {
|
|
7359
|
+
return props.linkComponent;
|
|
7360
|
+
},
|
|
7285
7361
|
get canTrack() {
|
|
7286
7362
|
return props.canTrack;
|
|
7287
7363
|
},
|
|
@@ -7339,6 +7415,9 @@ function ContentVariants(props) {
|
|
|
7339
7415
|
get customComponents() {
|
|
7340
7416
|
return props.customComponents;
|
|
7341
7417
|
},
|
|
7418
|
+
get linkComponent() {
|
|
7419
|
+
return props.linkComponent;
|
|
7420
|
+
},
|
|
7342
7421
|
get canTrack() {
|
|
7343
7422
|
return props.canTrack;
|
|
7344
7423
|
},
|
|
@@ -7398,11 +7477,11 @@ var fetchSymbolContent = async ({
|
|
|
7398
7477
|
};
|
|
7399
7478
|
|
|
7400
7479
|
// src/blocks/symbol/symbol.tsx
|
|
7401
|
-
var _tmpl$
|
|
7480
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
|
|
7402
7481
|
function Symbol2(props) {
|
|
7403
7482
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
7404
7483
|
function className() {
|
|
7405
|
-
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(" ");
|
|
7406
7485
|
}
|
|
7407
7486
|
function setContent() {
|
|
7408
7487
|
if (contentToUse())
|
|
@@ -7424,7 +7503,7 @@ function Symbol2(props) {
|
|
|
7424
7503
|
}
|
|
7425
7504
|
createEffect(on(() => [props.symbol], onUpdateFn_0));
|
|
7426
7505
|
return (() => {
|
|
7427
|
-
const _el$ = _tmpl$
|
|
7506
|
+
const _el$ = _tmpl$13();
|
|
7428
7507
|
spread(_el$, mergeProps({
|
|
7429
7508
|
get ["class"]() {
|
|
7430
7509
|
return className();
|
|
@@ -7459,6 +7538,9 @@ function Symbol2(props) {
|
|
|
7459
7538
|
},
|
|
7460
7539
|
get content() {
|
|
7461
7540
|
return contentToUse();
|
|
7541
|
+
},
|
|
7542
|
+
get linkComponent() {
|
|
7543
|
+
return props.builderLinkComponent;
|
|
7462
7544
|
}
|
|
7463
7545
|
}));
|
|
7464
7546
|
return _el$;
|