@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/node/dev.js
CHANGED
|
@@ -1,45 +1,100 @@
|
|
|
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
|
import { createRequire } from 'node:module';
|
|
5
5
|
|
|
6
6
|
// src/blocks/button/button.tsx
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
|
|
8
|
+
// src/components/dynamic-renderer/dynamic-renderer.helpers.ts
|
|
9
|
+
var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
10
|
+
var isEmptyElement = (tagName) => {
|
|
11
|
+
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
15
|
+
function DynamicRenderer(props) {
|
|
10
16
|
return createComponent(Show, {
|
|
11
17
|
get fallback() {
|
|
12
|
-
return (() => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}, {}, () => props.attributes, {
|
|
19
|
-
get style() {
|
|
20
|
-
return props.attributes.style;
|
|
21
|
-
}
|
|
22
|
-
}), false, true);
|
|
23
|
-
insert(_el$2, () => props.text);
|
|
24
|
-
return _el$2;
|
|
25
|
-
})();
|
|
18
|
+
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
19
|
+
get component() {
|
|
20
|
+
return props.TagName;
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
26
23
|
},
|
|
27
24
|
get when() {
|
|
28
|
-
return props.
|
|
25
|
+
return !isEmptyElement(props.TagName);
|
|
29
26
|
},
|
|
30
27
|
get children() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
return createComponent(Show, {
|
|
29
|
+
get fallback() {
|
|
30
|
+
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
31
|
+
get component() {
|
|
32
|
+
return props.TagName;
|
|
33
|
+
},
|
|
34
|
+
get children() {
|
|
35
|
+
return props.children;
|
|
36
|
+
}
|
|
37
|
+
}));
|
|
35
38
|
},
|
|
36
|
-
get
|
|
37
|
-
return props.
|
|
39
|
+
get when() {
|
|
40
|
+
return typeof props.TagName === "string";
|
|
38
41
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
get children() {
|
|
43
|
+
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
44
|
+
get component() {
|
|
45
|
+
return props.TagName;
|
|
46
|
+
},
|
|
47
|
+
get children() {
|
|
48
|
+
return props.children;
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
var dynamic_renderer_default = DynamicRenderer;
|
|
57
|
+
|
|
58
|
+
// src/constants/target.ts
|
|
59
|
+
var TARGET = "solid";
|
|
60
|
+
|
|
61
|
+
// src/functions/get-class-prop-name.ts
|
|
62
|
+
var getClassPropName = () => {
|
|
63
|
+
switch (TARGET) {
|
|
64
|
+
case "react":
|
|
65
|
+
case "reactNative":
|
|
66
|
+
case "rsc":
|
|
67
|
+
return "className";
|
|
68
|
+
case "svelte":
|
|
69
|
+
case "vue":
|
|
70
|
+
case "solid":
|
|
71
|
+
case "qwik":
|
|
72
|
+
return "class";
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// src/blocks/button/button.tsx
|
|
77
|
+
function Button(props) {
|
|
78
|
+
return createComponent(dynamic_renderer_default, {
|
|
79
|
+
get TagName() {
|
|
80
|
+
return props.link ? props.builderLinkComponent || "a" : "button";
|
|
81
|
+
},
|
|
82
|
+
get attributes() {
|
|
83
|
+
return {
|
|
84
|
+
...props.attributes,
|
|
85
|
+
[getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
|
|
86
|
+
...props.link ? {
|
|
87
|
+
href: props.link,
|
|
88
|
+
target: props.openLinkInNewTab ? "_blank" : void 0,
|
|
89
|
+
role: "link"
|
|
90
|
+
} : {
|
|
91
|
+
role: "button"
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
actionAttributes: {},
|
|
96
|
+
get children() {
|
|
97
|
+
return props.text;
|
|
43
98
|
}
|
|
44
99
|
});
|
|
45
100
|
}
|
|
@@ -86,9 +141,6 @@ function isBrowser() {
|
|
|
86
141
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
87
142
|
}
|
|
88
143
|
|
|
89
|
-
// src/constants/target.ts
|
|
90
|
-
var TARGET = "solid";
|
|
91
|
-
|
|
92
144
|
// src/functions/is-iframe.ts
|
|
93
145
|
function isIframe() {
|
|
94
146
|
return isBrowser() && window.self !== window.top;
|
|
@@ -603,10 +655,10 @@ var createCssClass = ({
|
|
|
603
655
|
return cssClass;
|
|
604
656
|
}
|
|
605
657
|
};
|
|
606
|
-
var _tmpl$
|
|
658
|
+
var _tmpl$ = /* @__PURE__ */ template(`<style>`);
|
|
607
659
|
function InlinedStyles(props) {
|
|
608
660
|
return (() => {
|
|
609
|
-
const _el$ = _tmpl$
|
|
661
|
+
const _el$ = _tmpl$();
|
|
610
662
|
effect((_p$) => {
|
|
611
663
|
const _v$ = props.styles, _v$2 = props.id;
|
|
612
664
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -732,6 +784,38 @@ function getBlockActions(options) {
|
|
|
732
784
|
return obj;
|
|
733
785
|
}
|
|
734
786
|
|
|
787
|
+
// src/functions/transform-style-property.ts
|
|
788
|
+
function transformStyleProperty({
|
|
789
|
+
style
|
|
790
|
+
}) {
|
|
791
|
+
return style;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
// src/functions/get-style.ts
|
|
795
|
+
var getStyle = ({
|
|
796
|
+
block,
|
|
797
|
+
context
|
|
798
|
+
}) => {
|
|
799
|
+
return mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
800
|
+
style: block.style || {},
|
|
801
|
+
context,
|
|
802
|
+
block
|
|
803
|
+
}));
|
|
804
|
+
};
|
|
805
|
+
function mapStyleObjToStrIfNeeded(style) {
|
|
806
|
+
switch (TARGET) {
|
|
807
|
+
case "svelte":
|
|
808
|
+
case "vue":
|
|
809
|
+
case "solid":
|
|
810
|
+
return convertStyleMapToCSSArray(style).join(" ");
|
|
811
|
+
case "qwik":
|
|
812
|
+
case "reactNative":
|
|
813
|
+
case "react":
|
|
814
|
+
case "rsc":
|
|
815
|
+
return style;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
|
|
735
819
|
// src/functions/transform-block-properties.ts
|
|
736
820
|
function transformBlockProperties({
|
|
737
821
|
properties
|
|
@@ -753,8 +837,11 @@ function getBlockProperties({
|
|
|
753
837
|
...extractRelevantRootBlockProperties(block),
|
|
754
838
|
...block.properties,
|
|
755
839
|
"builder-id": block.id,
|
|
756
|
-
style:
|
|
757
|
-
|
|
840
|
+
style: getStyle({
|
|
841
|
+
block,
|
|
842
|
+
context
|
|
843
|
+
}),
|
|
844
|
+
[getClassPropName()]: [block.id, "builder-block", block.class, block.properties?.class].filter(Boolean).join(" ")
|
|
758
845
|
};
|
|
759
846
|
return transformBlockProperties({
|
|
760
847
|
properties,
|
|
@@ -762,69 +849,6 @@ function getBlockProperties({
|
|
|
762
849
|
block
|
|
763
850
|
});
|
|
764
851
|
}
|
|
765
|
-
function getStyleAttribute(style) {
|
|
766
|
-
switch (TARGET) {
|
|
767
|
-
case "svelte":
|
|
768
|
-
case "vue":
|
|
769
|
-
case "solid":
|
|
770
|
-
return convertStyleMapToCSSArray(style).join(" ");
|
|
771
|
-
case "qwik":
|
|
772
|
-
case "reactNative":
|
|
773
|
-
case "react":
|
|
774
|
-
case "rsc":
|
|
775
|
-
return style;
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
// src/components/dynamic-renderer/dynamic-renderer.helpers.ts
|
|
780
|
-
var EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
781
|
-
var isEmptyElement = (tagName) => {
|
|
782
|
-
return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.has(tagName.toLowerCase());
|
|
783
|
-
};
|
|
784
|
-
|
|
785
|
-
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
786
|
-
function DynamicRenderer(props) {
|
|
787
|
-
return createComponent(Show, {
|
|
788
|
-
get fallback() {
|
|
789
|
-
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
790
|
-
get component() {
|
|
791
|
-
return props.TagName;
|
|
792
|
-
}
|
|
793
|
-
}));
|
|
794
|
-
},
|
|
795
|
-
get when() {
|
|
796
|
-
return !isEmptyElement(props.TagName);
|
|
797
|
-
},
|
|
798
|
-
get children() {
|
|
799
|
-
return createComponent(Show, {
|
|
800
|
-
get fallback() {
|
|
801
|
-
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
802
|
-
get component() {
|
|
803
|
-
return props.TagName;
|
|
804
|
-
},
|
|
805
|
-
get children() {
|
|
806
|
-
return props.children;
|
|
807
|
-
}
|
|
808
|
-
}));
|
|
809
|
-
},
|
|
810
|
-
get when() {
|
|
811
|
-
return typeof props.TagName === "string";
|
|
812
|
-
},
|
|
813
|
-
get children() {
|
|
814
|
-
return createComponent(Dynamic, mergeProps(() => props.attributes, () => props.actionAttributes, {
|
|
815
|
-
get component() {
|
|
816
|
-
return props.TagName;
|
|
817
|
-
},
|
|
818
|
-
get children() {
|
|
819
|
-
return props.children;
|
|
820
|
-
}
|
|
821
|
-
}));
|
|
822
|
-
}
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
});
|
|
826
|
-
}
|
|
827
|
-
var dynamic_renderer_default = DynamicRenderer;
|
|
828
852
|
|
|
829
853
|
// src/components/block/components/block-wrapper.tsx
|
|
830
854
|
function BlockWrapper(props) {
|
|
@@ -927,6 +951,7 @@ function ComponentRef(props) {
|
|
|
927
951
|
builderBlock: props.builderBlock,
|
|
928
952
|
context: props.context,
|
|
929
953
|
componentRef: props.componentRef,
|
|
954
|
+
linkComponent: props.linkComponent,
|
|
930
955
|
includeBlockProps: props.includeBlockProps,
|
|
931
956
|
isInteractive: props.isInteractive,
|
|
932
957
|
contextValue: props.context
|
|
@@ -951,6 +976,9 @@ function ComponentRef(props) {
|
|
|
951
976
|
},
|
|
952
977
|
get registeredComponents() {
|
|
953
978
|
return props.registeredComponents;
|
|
979
|
+
},
|
|
980
|
+
get linkComponent() {
|
|
981
|
+
return props.linkComponent;
|
|
954
982
|
}
|
|
955
983
|
});
|
|
956
984
|
}
|
|
@@ -977,6 +1005,9 @@ function RepeatedBlock(props) {
|
|
|
977
1005
|
},
|
|
978
1006
|
get registeredComponents() {
|
|
979
1007
|
return props.registeredComponents;
|
|
1008
|
+
},
|
|
1009
|
+
get linkComponent() {
|
|
1010
|
+
return props.linkComponent;
|
|
980
1011
|
}
|
|
981
1012
|
});
|
|
982
1013
|
}
|
|
@@ -1011,6 +1042,10 @@ function Block(props) {
|
|
|
1011
1042
|
});
|
|
1012
1043
|
}
|
|
1013
1044
|
function Tag() {
|
|
1045
|
+
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
1046
|
+
if (shouldUseLink) {
|
|
1047
|
+
return props.linkComponent || "a";
|
|
1048
|
+
}
|
|
1014
1049
|
return props.block.tagName || "div";
|
|
1015
1050
|
}
|
|
1016
1051
|
function canShowBlock() {
|
|
@@ -1034,11 +1069,15 @@ function Block(props) {
|
|
|
1034
1069
|
componentOptions: {
|
|
1035
1070
|
...getBlockComponentOptions(processedBlock()),
|
|
1036
1071
|
builderContext: props.context,
|
|
1072
|
+
...blockComponent()?.name === "Core:Button" || blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
1073
|
+
builderLinkComponent: props.linkComponent
|
|
1074
|
+
} : {},
|
|
1037
1075
|
...blockComponent()?.name === "Symbol" || blockComponent()?.name === "Columns" ? {
|
|
1038
1076
|
builderComponents: props.registeredComponents
|
|
1039
1077
|
} : {}
|
|
1040
1078
|
},
|
|
1041
1079
|
context: childrenContext(),
|
|
1080
|
+
linkComponent: props.linkComponent,
|
|
1042
1081
|
registeredComponents: props.registeredComponents,
|
|
1043
1082
|
builderBlock: processedBlock(),
|
|
1044
1083
|
includeBlockProps: blockComponent()?.noWrap === true,
|
|
@@ -1075,6 +1114,9 @@ function Block(props) {
|
|
|
1075
1114
|
get registeredComponents() {
|
|
1076
1115
|
return componentRefProps().registeredComponents;
|
|
1077
1116
|
},
|
|
1117
|
+
get linkComponent() {
|
|
1118
|
+
return componentRefProps().linkComponent;
|
|
1119
|
+
},
|
|
1078
1120
|
get builderBlock() {
|
|
1079
1121
|
return componentRefProps().builderBlock;
|
|
1080
1122
|
},
|
|
@@ -1108,6 +1150,9 @@ function Block(props) {
|
|
|
1108
1150
|
},
|
|
1109
1151
|
get registeredComponents() {
|
|
1110
1152
|
return props.registeredComponents;
|
|
1153
|
+
},
|
|
1154
|
+
get linkComponent() {
|
|
1155
|
+
return props.linkComponent;
|
|
1111
1156
|
}
|
|
1112
1157
|
});
|
|
1113
1158
|
}
|
|
@@ -1127,6 +1172,9 @@ function Block(props) {
|
|
|
1127
1172
|
get context() {
|
|
1128
1173
|
return props.context;
|
|
1129
1174
|
},
|
|
1175
|
+
get linkComponent() {
|
|
1176
|
+
return props.linkComponent;
|
|
1177
|
+
},
|
|
1130
1178
|
get children() {
|
|
1131
1179
|
return [createComponent(component_ref_default, {
|
|
1132
1180
|
get componentRef() {
|
|
@@ -1144,6 +1192,9 @@ function Block(props) {
|
|
|
1144
1192
|
get registeredComponents() {
|
|
1145
1193
|
return componentRefProps().registeredComponents;
|
|
1146
1194
|
},
|
|
1195
|
+
get linkComponent() {
|
|
1196
|
+
return componentRefProps().linkComponent;
|
|
1197
|
+
},
|
|
1147
1198
|
get builderBlock() {
|
|
1148
1199
|
return componentRefProps().builderBlock;
|
|
1149
1200
|
},
|
|
@@ -1169,6 +1220,9 @@ function Block(props) {
|
|
|
1169
1220
|
},
|
|
1170
1221
|
get registeredComponents() {
|
|
1171
1222
|
return props.registeredComponents;
|
|
1223
|
+
},
|
|
1224
|
+
get linkComponent() {
|
|
1225
|
+
return props.linkComponent;
|
|
1172
1226
|
}
|
|
1173
1227
|
});
|
|
1174
1228
|
}
|
|
@@ -1281,6 +1335,9 @@ function Blocks(props) {
|
|
|
1281
1335
|
return block.id;
|
|
1282
1336
|
},
|
|
1283
1337
|
block,
|
|
1338
|
+
get linkComponent() {
|
|
1339
|
+
return props.linkComponent;
|
|
1340
|
+
},
|
|
1284
1341
|
get context() {
|
|
1285
1342
|
return props.context || builderContext;
|
|
1286
1343
|
},
|
|
@@ -1298,7 +1355,7 @@ function Blocks(props) {
|
|
|
1298
1355
|
var blocks_default = Blocks;
|
|
1299
1356
|
|
|
1300
1357
|
// src/blocks/columns/columns.tsx
|
|
1301
|
-
var _tmpl$
|
|
1358
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
1302
1359
|
function Columns(props) {
|
|
1303
1360
|
const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
|
|
1304
1361
|
const [cols, setCols] = createSignal(props.columns || []);
|
|
@@ -1339,7 +1396,13 @@ function Columns(props) {
|
|
|
1339
1396
|
const mobileWidth = "100%";
|
|
1340
1397
|
const mobileMarginLeft = 0;
|
|
1341
1398
|
const marginLeftKey = "margin-left";
|
|
1399
|
+
const sharedStyles = {
|
|
1400
|
+
display: "flex",
|
|
1401
|
+
flexDirection: "column",
|
|
1402
|
+
alignItems: "stretch"
|
|
1403
|
+
};
|
|
1342
1404
|
return {
|
|
1405
|
+
...sharedStyles,
|
|
1343
1406
|
width,
|
|
1344
1407
|
[marginLeftKey]: gutterPixels,
|
|
1345
1408
|
"--column-width-mobile": getMobileStyle({
|
|
@@ -1392,7 +1455,7 @@ function Columns(props) {
|
|
|
1392
1455
|
`;
|
|
1393
1456
|
}
|
|
1394
1457
|
return (() => {
|
|
1395
|
-
const _el$ = _tmpl$
|
|
1458
|
+
const _el$ = _tmpl$2();
|
|
1396
1459
|
spread(_el$, mergeProps({
|
|
1397
1460
|
get ["class"]() {
|
|
1398
1461
|
return `builder-columns ${props.builderBlock.id}-breakpoints ` + css({
|
|
@@ -1420,52 +1483,56 @@ function Columns(props) {
|
|
|
1420
1483
|
},
|
|
1421
1484
|
children: (column, _index) => {
|
|
1422
1485
|
const index = _index();
|
|
1423
|
-
return (
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1486
|
+
return createComponent(dynamic_renderer_default, {
|
|
1487
|
+
key: index,
|
|
1488
|
+
get TagName() {
|
|
1489
|
+
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
1490
|
+
},
|
|
1491
|
+
actionAttributes: {},
|
|
1492
|
+
get attributes() {
|
|
1493
|
+
return {
|
|
1494
|
+
...{},
|
|
1495
|
+
...column.link ? {
|
|
1496
|
+
href: column.link
|
|
1497
|
+
} : {},
|
|
1498
|
+
[getClassPropName()]: "builder-column",
|
|
1499
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
1500
|
+
};
|
|
1501
|
+
},
|
|
1502
|
+
get children() {
|
|
1503
|
+
return createComponent(blocks_default, {
|
|
1504
|
+
path: `component.options.columns.${index}.blocks`,
|
|
1505
|
+
get parent() {
|
|
1506
|
+
return props.builderBlock.id;
|
|
1507
|
+
},
|
|
1508
|
+
styleProp: {
|
|
1509
|
+
flexGrow: "1"
|
|
1510
|
+
},
|
|
1511
|
+
get context() {
|
|
1512
|
+
return props.builderContext;
|
|
1513
|
+
},
|
|
1514
|
+
get registeredComponents() {
|
|
1515
|
+
return props.builderComponents;
|
|
1516
|
+
},
|
|
1517
|
+
get linkComponent() {
|
|
1518
|
+
return props.builderLinkComponent;
|
|
1519
|
+
},
|
|
1520
|
+
get blocks() {
|
|
1521
|
+
return column.blocks;
|
|
1522
|
+
}
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
});
|
|
1459
1526
|
}
|
|
1460
1527
|
}), null);
|
|
1461
1528
|
return _el$;
|
|
1462
1529
|
})();
|
|
1463
1530
|
}
|
|
1464
1531
|
var columns_default = Columns;
|
|
1465
|
-
var _tmpl$
|
|
1532
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
|
|
1466
1533
|
function FragmentComponent(props) {
|
|
1467
1534
|
return (() => {
|
|
1468
|
-
const _el$ = _tmpl$
|
|
1535
|
+
const _el$ = _tmpl$3();
|
|
1469
1536
|
insert(_el$, () => props.children);
|
|
1470
1537
|
return _el$;
|
|
1471
1538
|
})();
|
|
@@ -1520,7 +1587,7 @@ function getSrcSet(url) {
|
|
|
1520
1587
|
}
|
|
1521
1588
|
|
|
1522
1589
|
// src/blocks/image/image.tsx
|
|
1523
|
-
var _tmpl$
|
|
1590
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<source type=image/webp>`);
|
|
1524
1591
|
var _tmpl$22 = /* @__PURE__ */ template(`<picture><img loading=lazy>`);
|
|
1525
1592
|
var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
|
|
1526
1593
|
function Image(props) {
|
|
@@ -1567,7 +1634,7 @@ function Image(props) {
|
|
|
1567
1634
|
return webpSrcSet();
|
|
1568
1635
|
},
|
|
1569
1636
|
get children() {
|
|
1570
|
-
const _el$2 = _tmpl$
|
|
1637
|
+
const _el$2 = _tmpl$4();
|
|
1571
1638
|
effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
|
|
1572
1639
|
return _el$2;
|
|
1573
1640
|
}
|
|
@@ -1649,10 +1716,10 @@ function Image(props) {
|
|
|
1649
1716
|
})];
|
|
1650
1717
|
}
|
|
1651
1718
|
var image_default = Image;
|
|
1652
|
-
var _tmpl$
|
|
1719
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<section>`);
|
|
1653
1720
|
function SectionComponent(props) {
|
|
1654
1721
|
return (() => {
|
|
1655
|
-
const _el$ = _tmpl$
|
|
1722
|
+
const _el$ = _tmpl$5();
|
|
1656
1723
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
1657
1724
|
get style() {
|
|
1658
1725
|
return {
|
|
@@ -2146,7 +2213,7 @@ var componentInfo3 = {
|
|
|
2146
2213
|
advanced: true
|
|
2147
2214
|
}]
|
|
2148
2215
|
};
|
|
2149
|
-
var _tmpl$
|
|
2216
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div>`);
|
|
2150
2217
|
function CustomCode(props) {
|
|
2151
2218
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
2152
2219
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -2181,7 +2248,7 @@ function CustomCode(props) {
|
|
|
2181
2248
|
}
|
|
2182
2249
|
});
|
|
2183
2250
|
return (() => {
|
|
2184
|
-
const _el$ = _tmpl$
|
|
2251
|
+
const _el$ = _tmpl$6();
|
|
2185
2252
|
const _ref$ = elementRef;
|
|
2186
2253
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
|
|
2187
2254
|
effect((_p$) => {
|
|
@@ -2241,7 +2308,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
|
|
|
2241
2308
|
var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
2242
2309
|
|
|
2243
2310
|
// src/blocks/embed/embed.tsx
|
|
2244
|
-
var _tmpl$
|
|
2311
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-embed>`);
|
|
2245
2312
|
function Embed(props) {
|
|
2246
2313
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
2247
2314
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -2277,7 +2344,7 @@ function Embed(props) {
|
|
|
2277
2344
|
}
|
|
2278
2345
|
createEffect(on(() => [elem, ranInitFn()], onUpdateFn_0));
|
|
2279
2346
|
return (() => {
|
|
2280
|
-
const _el$ = _tmpl$
|
|
2347
|
+
const _el$ = _tmpl$7();
|
|
2281
2348
|
const _ref$ = elem;
|
|
2282
2349
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
|
|
2283
2350
|
effect(() => _el$.innerHTML = props.content);
|
|
@@ -2434,10 +2501,10 @@ var componentInfo7 = {
|
|
|
2434
2501
|
noWrap: true,
|
|
2435
2502
|
static: true
|
|
2436
2503
|
};
|
|
2437
|
-
var _tmpl$
|
|
2504
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<img>`);
|
|
2438
2505
|
function ImgComponent(props) {
|
|
2439
2506
|
return (() => {
|
|
2440
|
-
const _el$ = _tmpl$
|
|
2507
|
+
const _el$ = _tmpl$8();
|
|
2441
2508
|
spread(_el$, mergeProps({
|
|
2442
2509
|
get style() {
|
|
2443
2510
|
return {
|
|
@@ -2517,10 +2584,10 @@ var componentInfo9 = {
|
|
|
2517
2584
|
defaultValue: "children"
|
|
2518
2585
|
}]
|
|
2519
2586
|
};
|
|
2520
|
-
var _tmpl$
|
|
2587
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
|
|
2521
2588
|
function Slot(props) {
|
|
2522
2589
|
return (() => {
|
|
2523
|
-
const _el$ = _tmpl$
|
|
2590
|
+
const _el$ = _tmpl$9();
|
|
2524
2591
|
_el$.style.setProperty("pointer-events", "auto");
|
|
2525
2592
|
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
2526
2593
|
"builder-slot": props.name
|
|
@@ -2600,10 +2667,10 @@ var componentInfo11 = {
|
|
|
2600
2667
|
textAlign: "center"
|
|
2601
2668
|
}
|
|
2602
2669
|
};
|
|
2603
|
-
var _tmpl$
|
|
2670
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
2604
2671
|
function Text(props) {
|
|
2605
2672
|
return (() => {
|
|
2606
|
-
const _el$ = _tmpl$
|
|
2673
|
+
const _el$ = _tmpl$10();
|
|
2607
2674
|
_el$.style.setProperty("outline", "none");
|
|
2608
2675
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
2609
2676
|
return _el$;
|
|
@@ -2694,7 +2761,7 @@ var componentInfo12 = {
|
|
|
2694
2761
|
advanced: true
|
|
2695
2762
|
}]
|
|
2696
2763
|
};
|
|
2697
|
-
var _tmpl$
|
|
2764
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
2698
2765
|
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
2699
2766
|
var _tmpl$33 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
2700
2767
|
function Video(props) {
|
|
@@ -2757,7 +2824,7 @@ function Video(props) {
|
|
|
2757
2824
|
return !props.lazyLoad;
|
|
2758
2825
|
},
|
|
2759
2826
|
get children() {
|
|
2760
|
-
const _el$3 = _tmpl$
|
|
2827
|
+
const _el$3 = _tmpl$11();
|
|
2761
2828
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
2762
2829
|
return _el$3;
|
|
2763
2830
|
}
|
|
@@ -2919,10 +2986,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
2919
2986
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
2920
2987
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
2921
2988
|
)`;
|
|
2922
|
-
var _tmpl$
|
|
2989
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<script>`);
|
|
2923
2990
|
function InlinedScript(props) {
|
|
2924
2991
|
return (() => {
|
|
2925
|
-
const _el$ = _tmpl$
|
|
2992
|
+
const _el$ = _tmpl$12();
|
|
2926
2993
|
effect((_p$) => {
|
|
2927
2994
|
const _v$ = props.scriptStr, _v$2 = props.id || "";
|
|
2928
2995
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -3429,7 +3496,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3429
3496
|
};
|
|
3430
3497
|
|
|
3431
3498
|
// src/constants/sdk-version.ts
|
|
3432
|
-
var SDK_VERSION = "0.12.
|
|
3499
|
+
var SDK_VERSION = "0.12.4";
|
|
3433
3500
|
|
|
3434
3501
|
// src/functions/register.ts
|
|
3435
3502
|
var registry = {};
|
|
@@ -4118,6 +4185,9 @@ function ContentComponent(props) {
|
|
|
4118
4185
|
get contentWrapperProps() {
|
|
4119
4186
|
return props.contentWrapperProps;
|
|
4120
4187
|
},
|
|
4188
|
+
get linkComponent() {
|
|
4189
|
+
return props.linkComponent;
|
|
4190
|
+
},
|
|
4121
4191
|
get trustedHosts() {
|
|
4122
4192
|
return props.trustedHosts;
|
|
4123
4193
|
}
|
|
@@ -4160,6 +4230,9 @@ function ContentComponent(props) {
|
|
|
4160
4230
|
},
|
|
4161
4231
|
get registeredComponents() {
|
|
4162
4232
|
return registeredComponents();
|
|
4233
|
+
},
|
|
4234
|
+
get linkComponent() {
|
|
4235
|
+
return props.linkComponent;
|
|
4163
4236
|
}
|
|
4164
4237
|
})];
|
|
4165
4238
|
}
|
|
@@ -4253,6 +4326,9 @@ function ContentVariants(props) {
|
|
|
4253
4326
|
get customComponents() {
|
|
4254
4327
|
return props.customComponents;
|
|
4255
4328
|
},
|
|
4329
|
+
get linkComponent() {
|
|
4330
|
+
return props.linkComponent;
|
|
4331
|
+
},
|
|
4256
4332
|
get canTrack() {
|
|
4257
4333
|
return props.canTrack;
|
|
4258
4334
|
},
|
|
@@ -4310,6 +4386,9 @@ function ContentVariants(props) {
|
|
|
4310
4386
|
get customComponents() {
|
|
4311
4387
|
return props.customComponents;
|
|
4312
4388
|
},
|
|
4389
|
+
get linkComponent() {
|
|
4390
|
+
return props.linkComponent;
|
|
4391
|
+
},
|
|
4313
4392
|
get canTrack() {
|
|
4314
4393
|
return props.canTrack;
|
|
4315
4394
|
},
|
|
@@ -4369,11 +4448,11 @@ var fetchSymbolContent = async ({
|
|
|
4369
4448
|
};
|
|
4370
4449
|
|
|
4371
4450
|
// src/blocks/symbol/symbol.tsx
|
|
4372
|
-
var _tmpl$
|
|
4451
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
|
|
4373
4452
|
function Symbol(props) {
|
|
4374
4453
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
4375
4454
|
function className() {
|
|
4376
|
-
return [...[props.attributes
|
|
4455
|
+
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(" ");
|
|
4377
4456
|
}
|
|
4378
4457
|
function setContent() {
|
|
4379
4458
|
if (contentToUse())
|
|
@@ -4395,7 +4474,7 @@ function Symbol(props) {
|
|
|
4395
4474
|
}
|
|
4396
4475
|
createEffect(on(() => [props.symbol], onUpdateFn_0));
|
|
4397
4476
|
return (() => {
|
|
4398
|
-
const _el$ = _tmpl$
|
|
4477
|
+
const _el$ = _tmpl$13();
|
|
4399
4478
|
spread(_el$, mergeProps({
|
|
4400
4479
|
get ["class"]() {
|
|
4401
4480
|
return className();
|
|
@@ -4430,6 +4509,9 @@ function Symbol(props) {
|
|
|
4430
4509
|
},
|
|
4431
4510
|
get content() {
|
|
4432
4511
|
return contentToUse();
|
|
4512
|
+
},
|
|
4513
|
+
get linkComponent() {
|
|
4514
|
+
return props.builderLinkComponent;
|
|
4433
4515
|
}
|
|
4434
4516
|
}));
|
|
4435
4517
|
return _el$;
|