@builder.io/sdk-solid 1.0.33 → 1.0.36
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/lib/browser/dev.js +179 -115
- package/lib/browser/dev.jsx +260 -199
- package/lib/browser/index.js +179 -115
- package/lib/browser/index.jsx +260 -199
- package/lib/edge/dev.js +179 -115
- package/lib/edge/dev.jsx +260 -199
- package/lib/edge/index.js +179 -115
- package/lib/edge/index.jsx +260 -199
- package/lib/node/dev.js +200 -121
- package/lib/node/dev.jsx +281 -205
- package/lib/node/index.js +200 -121
- package/lib/node/index.jsx +281 -205
- package/package.json +1 -1
package/lib/browser/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { delegateEvents, createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, Dynamic, memo, use } from 'solid-js/web';
|
|
2
2
|
import { createContext, useContext, Show, For, createSignal, createMemo, onMount, createEffect, on } from 'solid-js';
|
|
3
|
-
import { css } from 'solid-styled-components';
|
|
4
3
|
|
|
5
4
|
// src/blocks/button/button.tsx
|
|
6
5
|
|
|
@@ -885,7 +884,7 @@ function BlockStyles(props) {
|
|
|
885
884
|
}
|
|
886
885
|
return true;
|
|
887
886
|
});
|
|
888
|
-
const
|
|
887
|
+
const css = createMemo(() => {
|
|
889
888
|
const processedBlock = getProcessedBlock({
|
|
890
889
|
block: props.block,
|
|
891
890
|
localState: props.context.localState,
|
|
@@ -935,13 +934,13 @@ function BlockStyles(props) {
|
|
|
935
934
|
});
|
|
936
935
|
return createComponent(Show, {
|
|
937
936
|
get when() {
|
|
938
|
-
return memo(() => !!(TARGET !== "reactNative" &&
|
|
937
|
+
return memo(() => !!(TARGET !== "reactNative" && css()))() && canShowBlock();
|
|
939
938
|
},
|
|
940
939
|
get children() {
|
|
941
940
|
return createComponent(inlined_styles_default, {
|
|
942
941
|
id: "builderio-block",
|
|
943
942
|
get styles() {
|
|
944
|
-
return
|
|
943
|
+
return css();
|
|
945
944
|
}
|
|
946
945
|
});
|
|
947
946
|
}
|
|
@@ -1419,6 +1418,11 @@ function Block(props) {
|
|
|
1419
1418
|
});
|
|
1420
1419
|
}
|
|
1421
1420
|
var block_default = Block;
|
|
1421
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-1bb6a3a2 {
|
|
1422
|
+
display: flex;
|
|
1423
|
+
flex-direction: column;
|
|
1424
|
+
align-items: stretch;
|
|
1425
|
+
}`);
|
|
1422
1426
|
function BlocksWrapper(props) {
|
|
1423
1427
|
const className = createMemo(() => {
|
|
1424
1428
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
@@ -1445,13 +1449,9 @@ function BlocksWrapper(props) {
|
|
|
1445
1449
|
}, "*");
|
|
1446
1450
|
}
|
|
1447
1451
|
}
|
|
1448
|
-
return createComponent(Dynamic, mergeProps({
|
|
1452
|
+
return [createComponent(Dynamic, mergeProps({
|
|
1449
1453
|
get ["class"]() {
|
|
1450
|
-
return className() + " "
|
|
1451
|
-
display: "flex",
|
|
1452
|
-
flexDirection: "column",
|
|
1453
|
-
alignItems: "stretch"
|
|
1454
|
-
});
|
|
1454
|
+
return className() + " dynamic-1bb6a3a2";
|
|
1455
1455
|
},
|
|
1456
1456
|
get ["builder-path"]() {
|
|
1457
1457
|
return props.path;
|
|
@@ -1473,7 +1473,7 @@ function BlocksWrapper(props) {
|
|
|
1473
1473
|
get children() {
|
|
1474
1474
|
return props.children;
|
|
1475
1475
|
}
|
|
1476
|
-
}));
|
|
1476
|
+
})), _tmpl$2()];
|
|
1477
1477
|
}
|
|
1478
1478
|
var blocks_wrapper_default = BlocksWrapper;
|
|
1479
1479
|
|
|
@@ -1542,7 +1542,11 @@ var getColumnsClass = (id) => {
|
|
|
1542
1542
|
};
|
|
1543
1543
|
|
|
1544
1544
|
// src/blocks/columns/columns.tsx
|
|
1545
|
-
var _tmpl$
|
|
1545
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
|
|
1546
|
+
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-f2f53158 {
|
|
1547
|
+
display: flex;
|
|
1548
|
+
line-height: normal;
|
|
1549
|
+
}`);
|
|
1546
1550
|
function Columns(props) {
|
|
1547
1551
|
const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
|
|
1548
1552
|
const [cols, setCols] = createSignal(props.columns || []);
|
|
@@ -1654,14 +1658,11 @@ function Columns(props) {
|
|
|
1654
1658
|
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
1655
1659
|
};
|
|
1656
1660
|
}
|
|
1657
|
-
return (() => {
|
|
1658
|
-
const _el$ = _tmpl$
|
|
1661
|
+
return [(() => {
|
|
1662
|
+
const _el$ = _tmpl$3();
|
|
1659
1663
|
spread(_el$, mergeProps({
|
|
1660
1664
|
get ["class"]() {
|
|
1661
|
-
return getColumnsClass(props.builderBlock?.id) + " "
|
|
1662
|
-
display: "flex",
|
|
1663
|
-
lineHeight: "normal"
|
|
1664
|
-
});
|
|
1665
|
+
return getColumnsClass(props.builderBlock?.id) + " div-f2f53158";
|
|
1665
1666
|
},
|
|
1666
1667
|
get style() {
|
|
1667
1668
|
return columnsCssVars();
|
|
@@ -1720,13 +1721,13 @@ function Columns(props) {
|
|
|
1720
1721
|
}
|
|
1721
1722
|
}), null);
|
|
1722
1723
|
return _el$;
|
|
1723
|
-
})();
|
|
1724
|
+
})(), _tmpl$22()];
|
|
1724
1725
|
}
|
|
1725
1726
|
var columns_default = Columns;
|
|
1726
|
-
var _tmpl$
|
|
1727
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<span>`);
|
|
1727
1728
|
function FragmentComponent(props) {
|
|
1728
1729
|
return (() => {
|
|
1729
|
-
const _el$ = _tmpl$
|
|
1730
|
+
const _el$ = _tmpl$4();
|
|
1730
1731
|
insert(_el$, () => props.children);
|
|
1731
1732
|
return _el$;
|
|
1732
1733
|
})();
|
|
@@ -1781,9 +1782,27 @@ function getSrcSet(url) {
|
|
|
1781
1782
|
}
|
|
1782
1783
|
|
|
1783
1784
|
// src/blocks/image/image.tsx
|
|
1784
|
-
var _tmpl$
|
|
1785
|
-
var _tmpl$
|
|
1786
|
-
var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
|
|
1785
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
|
|
1786
|
+
var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
|
|
1787
|
+
var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-54b38751">`);
|
|
1788
|
+
var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-54b38751-2>`);
|
|
1789
|
+
var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-54b38751 {
|
|
1790
|
+
opacity: 1;
|
|
1791
|
+
transition: opacity 0.2s ease-in-out;
|
|
1792
|
+
}.div-54b38751 {
|
|
1793
|
+
width: 100%;
|
|
1794
|
+
pointer-events: none;
|
|
1795
|
+
font-size: 0;
|
|
1796
|
+
}.div-54b38751-2 {
|
|
1797
|
+
display: flex;
|
|
1798
|
+
flex-direction: column;
|
|
1799
|
+
align-items: stretch;
|
|
1800
|
+
position: absolute;
|
|
1801
|
+
top: 0;
|
|
1802
|
+
left: 0;
|
|
1803
|
+
width: 100%;
|
|
1804
|
+
height: 100%;
|
|
1805
|
+
}`);
|
|
1787
1806
|
function Image(props) {
|
|
1788
1807
|
const srcSetToUse = createMemo(() => {
|
|
1789
1808
|
const imageToUse = props.image || props.src;
|
|
@@ -1820,23 +1839,20 @@ function Image(props) {
|
|
|
1820
1839
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
1821
1840
|
return out;
|
|
1822
1841
|
});
|
|
1823
|
-
return [(() => {
|
|
1824
|
-
const _el$ = _tmpl$
|
|
1842
|
+
return [[(() => {
|
|
1843
|
+
const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
|
|
1825
1844
|
insert(_el$, createComponent(Show, {
|
|
1826
1845
|
get when() {
|
|
1827
1846
|
return webpSrcSet();
|
|
1828
1847
|
},
|
|
1829
1848
|
get children() {
|
|
1830
|
-
const _el$2 = _tmpl$
|
|
1849
|
+
const _el$2 = _tmpl$5();
|
|
1831
1850
|
effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
|
|
1832
1851
|
return _el$2;
|
|
1833
1852
|
}
|
|
1834
1853
|
}), _el$3);
|
|
1835
1854
|
effect((_p$) => {
|
|
1836
|
-
const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " "
|
|
1837
|
-
opacity: "1",
|
|
1838
|
-
transition: "opacity 0.2s ease-in-out"
|
|
1839
|
-
}), _v$2 = props.highPriority ? "eager" : "lazy", _v$3 = props.highPriority ? "high" : "auto", _v$4 = props.altText, _v$5 = props.altText ? void 0 : "presentation", _v$6 = {
|
|
1855
|
+
const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-54b38751", _v$2 = props.highPriority ? "eager" : "lazy", _v$3 = props.highPriority ? "high" : "auto", _v$4 = props.altText, _v$5 = props.altText ? void 0 : "presentation", _v$6 = {
|
|
1840
1856
|
"object-position": props.backgroundPosition || "center",
|
|
1841
1857
|
"object-fit": props.backgroundSize || "cover",
|
|
1842
1858
|
...aspectRatioCss()
|
|
@@ -1869,19 +1885,7 @@ function Image(props) {
|
|
|
1869
1885
|
},
|
|
1870
1886
|
get children() {
|
|
1871
1887
|
const _el$4 = _tmpl$32();
|
|
1872
|
-
effect((
|
|
1873
|
-
const _v$10 = "builder-image-sizer " + css({
|
|
1874
|
-
width: "100%",
|
|
1875
|
-
pointerEvents: "none",
|
|
1876
|
-
fontSize: "0"
|
|
1877
|
-
}), _v$11 = props.aspectRatio * 100 + "%";
|
|
1878
|
-
_v$10 !== _p$._v$10 && className(_el$4, _p$._v$10 = _v$10);
|
|
1879
|
-
_v$11 !== _p$._v$11 && ((_p$._v$11 = _v$11) != null ? _el$4.style.setProperty("padding-top", _v$11) : _el$4.style.removeProperty("padding-top"));
|
|
1880
|
-
return _p$;
|
|
1881
|
-
}, {
|
|
1882
|
-
_v$10: void 0,
|
|
1883
|
-
_v$11: void 0
|
|
1884
|
-
});
|
|
1888
|
+
effect(() => props.aspectRatio * 100 + "%" != null ? _el$4.style.setProperty("padding-top", props.aspectRatio * 100 + "%") : _el$4.style.removeProperty("padding-top"));
|
|
1885
1889
|
return _el$4;
|
|
1886
1890
|
}
|
|
1887
1891
|
}), createComponent(Show, {
|
|
@@ -1896,27 +1900,17 @@ function Image(props) {
|
|
|
1896
1900
|
return !props.fitContent && props.builderBlock?.children?.length;
|
|
1897
1901
|
},
|
|
1898
1902
|
get children() {
|
|
1899
|
-
const _el$5 = _tmpl$
|
|
1903
|
+
const _el$5 = _tmpl$42();
|
|
1900
1904
|
insert(_el$5, () => props.children);
|
|
1901
|
-
effect(() => className(_el$5, css({
|
|
1902
|
-
display: "flex",
|
|
1903
|
-
flexDirection: "column",
|
|
1904
|
-
alignItems: "stretch",
|
|
1905
|
-
position: "absolute",
|
|
1906
|
-
top: "0",
|
|
1907
|
-
left: "0",
|
|
1908
|
-
width: "100%",
|
|
1909
|
-
height: "100%"
|
|
1910
|
-
})));
|
|
1911
1905
|
return _el$5;
|
|
1912
1906
|
}
|
|
1913
|
-
})];
|
|
1907
|
+
})], _tmpl$52()];
|
|
1914
1908
|
}
|
|
1915
1909
|
var image_default = Image;
|
|
1916
|
-
var _tmpl$
|
|
1910
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<section>`);
|
|
1917
1911
|
function SectionComponent(props) {
|
|
1918
1912
|
return (() => {
|
|
1919
|
-
const _el$ = _tmpl$
|
|
1913
|
+
const _el$ = _tmpl$6();
|
|
1920
1914
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
1921
1915
|
get style() {
|
|
1922
1916
|
return {
|
|
@@ -2261,8 +2255,8 @@ var convertOrderNumberToString = (order) => {
|
|
|
2261
2255
|
};
|
|
2262
2256
|
|
|
2263
2257
|
// src/blocks/accordion/accordion.tsx
|
|
2264
|
-
var _tmpl$
|
|
2265
|
-
var _tmpl$
|
|
2258
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
|
|
2259
|
+
var _tmpl$24 = /* @__PURE__ */ template(`<div>`);
|
|
2266
2260
|
function Accordion(props) {
|
|
2267
2261
|
const [open, setOpen] = createSignal([]);
|
|
2268
2262
|
const onlyOneAtATime = createMemo(() => {
|
|
@@ -2352,7 +2346,7 @@ function Accordion(props) {
|
|
|
2352
2346
|
}
|
|
2353
2347
|
}
|
|
2354
2348
|
return (() => {
|
|
2355
|
-
const _el$ = _tmpl$
|
|
2349
|
+
const _el$ = _tmpl$7();
|
|
2356
2350
|
insert(_el$, createComponent(For, {
|
|
2357
2351
|
get each() {
|
|
2358
2352
|
return props.items;
|
|
@@ -2360,7 +2354,7 @@ function Accordion(props) {
|
|
|
2360
2354
|
children: (item, _index) => {
|
|
2361
2355
|
const index = _index();
|
|
2362
2356
|
return [(() => {
|
|
2363
|
-
const _el$2 = _tmpl$
|
|
2357
|
+
const _el$2 = _tmpl$24();
|
|
2364
2358
|
_el$2.$$click = (event) => onClick(index);
|
|
2365
2359
|
setAttribute(_el$2, "data-index", index);
|
|
2366
2360
|
insert(_el$2, createComponent(blocks_default, {
|
|
@@ -2402,7 +2396,7 @@ function Accordion(props) {
|
|
|
2402
2396
|
return open().includes(index);
|
|
2403
2397
|
},
|
|
2404
2398
|
get children() {
|
|
2405
|
-
const _el$3 = _tmpl$
|
|
2399
|
+
const _el$3 = _tmpl$24();
|
|
2406
2400
|
insert(_el$3, createComponent(blocks_default, {
|
|
2407
2401
|
get blocks() {
|
|
2408
2402
|
return item.detail;
|
|
@@ -2723,7 +2717,7 @@ var componentInfo5 = {
|
|
|
2723
2717
|
name: "image",
|
|
2724
2718
|
type: "file",
|
|
2725
2719
|
bubble: true,
|
|
2726
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
2720
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
|
|
2727
2721
|
required: true,
|
|
2728
2722
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
2729
2723
|
onChange: (options) => {
|
|
@@ -2891,10 +2885,10 @@ var componentInfo7 = {
|
|
|
2891
2885
|
defaultValue: "children"
|
|
2892
2886
|
}]
|
|
2893
2887
|
};
|
|
2894
|
-
var _tmpl$
|
|
2888
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
|
|
2895
2889
|
function Slot(props) {
|
|
2896
2890
|
return (() => {
|
|
2897
|
-
const _el$ = _tmpl$
|
|
2891
|
+
const _el$ = _tmpl$8();
|
|
2898
2892
|
_el$.style.setProperty("pointer-events", "auto");
|
|
2899
2893
|
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
2900
2894
|
"builder-slot": props.name
|
|
@@ -3093,8 +3087,8 @@ var componentInfo9 = {
|
|
|
3093
3087
|
}]
|
|
3094
3088
|
}]
|
|
3095
3089
|
};
|
|
3096
|
-
var _tmpl$
|
|
3097
|
-
var _tmpl$
|
|
3090
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
|
|
3091
|
+
var _tmpl$25 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
|
|
3098
3092
|
var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
|
|
3099
3093
|
function Tabs(props) {
|
|
3100
3094
|
const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
|
|
@@ -3109,7 +3103,7 @@ function Tabs(props) {
|
|
|
3109
3103
|
}
|
|
3110
3104
|
}
|
|
3111
3105
|
return (() => {
|
|
3112
|
-
const _el$ = _tmpl$
|
|
3106
|
+
const _el$ = _tmpl$25(), _el$2 = _el$.firstChild;
|
|
3113
3107
|
_el$2.style.setProperty("display", "flex");
|
|
3114
3108
|
_el$2.style.setProperty("flex-direction", "row");
|
|
3115
3109
|
_el$2.style.setProperty("overflow", "auto");
|
|
@@ -3161,7 +3155,7 @@ function Tabs(props) {
|
|
|
3161
3155
|
return activeTabContent(activeTab());
|
|
3162
3156
|
},
|
|
3163
3157
|
get children() {
|
|
3164
|
-
const _el$3 = _tmpl$
|
|
3158
|
+
const _el$3 = _tmpl$9();
|
|
3165
3159
|
insert(_el$3, createComponent(blocks_default, {
|
|
3166
3160
|
get parent() {
|
|
3167
3161
|
return props.builderBlock.id;
|
|
@@ -3212,10 +3206,10 @@ var componentInfo10 = {
|
|
|
3212
3206
|
textAlign: "center"
|
|
3213
3207
|
}
|
|
3214
3208
|
};
|
|
3215
|
-
var _tmpl$
|
|
3209
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
3216
3210
|
function Text(props) {
|
|
3217
3211
|
return (() => {
|
|
3218
|
-
const _el$ = _tmpl$
|
|
3212
|
+
const _el$ = _tmpl$10();
|
|
3219
3213
|
_el$.style.setProperty("outline", "none");
|
|
3220
3214
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
3221
3215
|
return _el$;
|
|
@@ -3247,7 +3241,7 @@ var componentInfo11 = {
|
|
|
3247
3241
|
advanced: true
|
|
3248
3242
|
}]
|
|
3249
3243
|
};
|
|
3250
|
-
var _tmpl$
|
|
3244
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
|
|
3251
3245
|
function CustomCode(props) {
|
|
3252
3246
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
3253
3247
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -3281,7 +3275,7 @@ function CustomCode(props) {
|
|
|
3281
3275
|
}
|
|
3282
3276
|
});
|
|
3283
3277
|
return (() => {
|
|
3284
|
-
const _el$ = _tmpl$
|
|
3278
|
+
const _el$ = _tmpl$11();
|
|
3285
3279
|
const _ref$ = elementRef;
|
|
3286
3280
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
|
|
3287
3281
|
effect((_p$) => {
|
|
@@ -3312,7 +3306,7 @@ var componentInfo12 = {
|
|
|
3312
3306
|
const url = options.get("url");
|
|
3313
3307
|
if (url) {
|
|
3314
3308
|
options.set("content", "Loading...");
|
|
3315
|
-
const apiKey =
|
|
3309
|
+
const apiKey = _iframelyApiKey;
|
|
3316
3310
|
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
|
|
3317
3311
|
if (options.get("url") === url) {
|
|
3318
3312
|
if (data.html) {
|
|
@@ -3341,7 +3335,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
|
|
|
3341
3335
|
var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
3342
3336
|
|
|
3343
3337
|
// src/blocks/embed/embed.tsx
|
|
3344
|
-
var _tmpl$
|
|
3338
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-embed>`);
|
|
3345
3339
|
function Embed(props) {
|
|
3346
3340
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
3347
3341
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -3378,7 +3372,7 @@ function Embed(props) {
|
|
|
3378
3372
|
}
|
|
3379
3373
|
createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
|
|
3380
3374
|
return (() => {
|
|
3381
|
-
const _el$ = _tmpl$
|
|
3375
|
+
const _el$ = _tmpl$12();
|
|
3382
3376
|
const _ref$ = elem;
|
|
3383
3377
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
|
|
3384
3378
|
effect(() => _el$.innerHTML = props.content);
|
|
@@ -3635,8 +3629,13 @@ var get = (obj, path, defaultValue) => {
|
|
|
3635
3629
|
};
|
|
3636
3630
|
|
|
3637
3631
|
// src/blocks/form/form/form.tsx
|
|
3638
|
-
var _tmpl$
|
|
3639
|
-
var _tmpl$
|
|
3632
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-2e825338">`);
|
|
3633
|
+
var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
|
|
3634
|
+
var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-2e825338 {
|
|
3635
|
+
padding: 10px;
|
|
3636
|
+
color: red;
|
|
3637
|
+
text-align: center;
|
|
3638
|
+
}`);
|
|
3640
3639
|
function FormComponent(props) {
|
|
3641
3640
|
const [formState, setFormState] = createSignal("unsubmitted");
|
|
3642
3641
|
const [responseData, setResponseData] = createSignal(null);
|
|
@@ -3821,8 +3820,8 @@ function FormComponent(props) {
|
|
|
3821
3820
|
}
|
|
3822
3821
|
}
|
|
3823
3822
|
let formRef;
|
|
3824
|
-
return (() => {
|
|
3825
|
-
const _el$ = _tmpl$
|
|
3823
|
+
return [(() => {
|
|
3824
|
+
const _el$ = _tmpl$26();
|
|
3826
3825
|
_el$.addEventListener("submit", (event) => onSubmit(event));
|
|
3827
3826
|
const _ref$ = formRef;
|
|
3828
3827
|
typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
|
|
@@ -3905,13 +3904,8 @@ function FormComponent(props) {
|
|
|
3905
3904
|
return memo(() => submissionState() === "error")() && responseData();
|
|
3906
3905
|
},
|
|
3907
3906
|
get children() {
|
|
3908
|
-
const _el$2 = _tmpl$
|
|
3907
|
+
const _el$2 = _tmpl$13();
|
|
3909
3908
|
insert(_el$2, () => JSON.stringify(responseData(), null, 2));
|
|
3910
|
-
effect(() => className(_el$2, "builder-form-error-text " + css({
|
|
3911
|
-
padding: "10px",
|
|
3912
|
-
color: "red",
|
|
3913
|
-
textAlign: "center"
|
|
3914
|
-
})));
|
|
3915
3909
|
return _el$2;
|
|
3916
3910
|
}
|
|
3917
3911
|
}), null);
|
|
@@ -3932,7 +3926,7 @@ function FormComponent(props) {
|
|
|
3932
3926
|
}
|
|
3933
3927
|
}), null);
|
|
3934
3928
|
return _el$;
|
|
3935
|
-
})();
|
|
3929
|
+
})(), _tmpl$34()];
|
|
3936
3930
|
}
|
|
3937
3931
|
var form_default = FormComponent;
|
|
3938
3932
|
|
|
@@ -3989,10 +3983,10 @@ var componentInfo14 = {
|
|
|
3989
3983
|
borderColor: "#ccc"
|
|
3990
3984
|
}
|
|
3991
3985
|
};
|
|
3992
|
-
var _tmpl$
|
|
3986
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<input>`);
|
|
3993
3987
|
function FormInputComponent(props) {
|
|
3994
3988
|
return (() => {
|
|
3995
|
-
const _el$ = _tmpl$
|
|
3989
|
+
const _el$ = _tmpl$14();
|
|
3996
3990
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
3997
3991
|
get key() {
|
|
3998
3992
|
return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
|
|
@@ -4065,11 +4059,11 @@ var componentInfo15 = {
|
|
|
4065
4059
|
static: true,
|
|
4066
4060
|
noWrap: true
|
|
4067
4061
|
};
|
|
4068
|
-
var _tmpl$
|
|
4069
|
-
var _tmpl$
|
|
4062
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<select>`);
|
|
4063
|
+
var _tmpl$27 = /* @__PURE__ */ template(`<option>`);
|
|
4070
4064
|
function SelectComponent(props) {
|
|
4071
4065
|
return (() => {
|
|
4072
|
-
const _el$ = _tmpl$
|
|
4066
|
+
const _el$ = _tmpl$15();
|
|
4073
4067
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
4074
4068
|
get value() {
|
|
4075
4069
|
return props.value;
|
|
@@ -4082,6 +4076,9 @@ function SelectComponent(props) {
|
|
|
4082
4076
|
},
|
|
4083
4077
|
get name() {
|
|
4084
4078
|
return props.name;
|
|
4079
|
+
},
|
|
4080
|
+
get required() {
|
|
4081
|
+
return props.required;
|
|
4085
4082
|
}
|
|
4086
4083
|
}), false, true);
|
|
4087
4084
|
insert(_el$, createComponent(For, {
|
|
@@ -4091,7 +4088,7 @@ function SelectComponent(props) {
|
|
|
4091
4088
|
children: (option, _index) => {
|
|
4092
4089
|
const index = _index();
|
|
4093
4090
|
return (() => {
|
|
4094
|
-
const _el$2 = _tmpl$
|
|
4091
|
+
const _el$2 = _tmpl$27();
|
|
4095
4092
|
insert(_el$2, () => option.name || option.value);
|
|
4096
4093
|
effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
|
|
4097
4094
|
effect(() => _el$2.value = option.value);
|
|
@@ -4131,10 +4128,10 @@ var componentInfo16 = {
|
|
|
4131
4128
|
// TODO: defaultChildren
|
|
4132
4129
|
// canHaveChildren: true,
|
|
4133
4130
|
};
|
|
4134
|
-
var _tmpl$
|
|
4131
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<button type=submit>`);
|
|
4135
4132
|
function SubmitButton(props) {
|
|
4136
4133
|
return (() => {
|
|
4137
|
-
const _el$ = _tmpl$
|
|
4134
|
+
const _el$ = _tmpl$16();
|
|
4138
4135
|
spread(_el$, mergeProps({}, () => props.attributes), false, true);
|
|
4139
4136
|
insert(_el$, () => props.text);
|
|
4140
4137
|
return _el$;
|
|
@@ -4142,8 +4139,72 @@ function SubmitButton(props) {
|
|
|
4142
4139
|
}
|
|
4143
4140
|
var submit_button_default = SubmitButton;
|
|
4144
4141
|
|
|
4145
|
-
// src/blocks/
|
|
4142
|
+
// src/blocks/form/textarea/component-info.ts
|
|
4146
4143
|
var componentInfo17 = {
|
|
4144
|
+
name: "Form:TextArea",
|
|
4145
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
4146
|
+
inputs: [{
|
|
4147
|
+
advanced: true,
|
|
4148
|
+
name: "value",
|
|
4149
|
+
type: "string"
|
|
4150
|
+
}, {
|
|
4151
|
+
name: "name",
|
|
4152
|
+
type: "string",
|
|
4153
|
+
required: true,
|
|
4154
|
+
helperText: 'Every input in a form needs a unique name describing what it gets, e.g. "email"'
|
|
4155
|
+
}, {
|
|
4156
|
+
name: "defaultValue",
|
|
4157
|
+
type: "string"
|
|
4158
|
+
}, {
|
|
4159
|
+
name: "placeholder",
|
|
4160
|
+
type: "string",
|
|
4161
|
+
defaultValue: "Hello there"
|
|
4162
|
+
}, {
|
|
4163
|
+
name: "required",
|
|
4164
|
+
type: "boolean",
|
|
4165
|
+
defaultValue: false
|
|
4166
|
+
}],
|
|
4167
|
+
defaultStyles: {
|
|
4168
|
+
paddingTop: "10px",
|
|
4169
|
+
paddingBottom: "10px",
|
|
4170
|
+
paddingLeft: "10px",
|
|
4171
|
+
paddingRight: "10px",
|
|
4172
|
+
borderRadius: "3px",
|
|
4173
|
+
borderWidth: "1px",
|
|
4174
|
+
borderStyle: "solid",
|
|
4175
|
+
borderColor: "#ccc"
|
|
4176
|
+
},
|
|
4177
|
+
static: true,
|
|
4178
|
+
noWrap: true
|
|
4179
|
+
};
|
|
4180
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<textarea>`);
|
|
4181
|
+
function Textarea(props) {
|
|
4182
|
+
return (() => {
|
|
4183
|
+
const _el$ = _tmpl$17();
|
|
4184
|
+
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
4185
|
+
get placeholder() {
|
|
4186
|
+
return props.placeholder;
|
|
4187
|
+
},
|
|
4188
|
+
get name() {
|
|
4189
|
+
return props.name;
|
|
4190
|
+
},
|
|
4191
|
+
get value() {
|
|
4192
|
+
return props.value;
|
|
4193
|
+
},
|
|
4194
|
+
get defaultValue() {
|
|
4195
|
+
return props.defaultValue;
|
|
4196
|
+
},
|
|
4197
|
+
get required() {
|
|
4198
|
+
return props.required;
|
|
4199
|
+
}
|
|
4200
|
+
}), false, false);
|
|
4201
|
+
return _el$;
|
|
4202
|
+
})();
|
|
4203
|
+
}
|
|
4204
|
+
var textarea_default = Textarea;
|
|
4205
|
+
|
|
4206
|
+
// src/blocks/img/component-info.ts
|
|
4207
|
+
var componentInfo18 = {
|
|
4147
4208
|
// friendlyName?
|
|
4148
4209
|
name: "Raw:Img",
|
|
4149
4210
|
hideFromInsertMenu: true,
|
|
@@ -4158,10 +4219,10 @@ var componentInfo17 = {
|
|
|
4158
4219
|
noWrap: true,
|
|
4159
4220
|
static: true
|
|
4160
4221
|
};
|
|
4161
|
-
var _tmpl$
|
|
4222
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<img>`);
|
|
4162
4223
|
function ImgComponent(props) {
|
|
4163
4224
|
return (() => {
|
|
4164
|
-
const _el$ = _tmpl$
|
|
4225
|
+
const _el$ = _tmpl$18();
|
|
4165
4226
|
spread(_el$, mergeProps({
|
|
4166
4227
|
get style() {
|
|
4167
4228
|
return {
|
|
@@ -4185,7 +4246,7 @@ function ImgComponent(props) {
|
|
|
4185
4246
|
var img_default = ImgComponent;
|
|
4186
4247
|
|
|
4187
4248
|
// src/blocks/video/component-info.ts
|
|
4188
|
-
var
|
|
4249
|
+
var componentInfo19 = {
|
|
4189
4250
|
name: "Video",
|
|
4190
4251
|
canHaveChildren: true,
|
|
4191
4252
|
defaultStyles: {
|
|
@@ -4267,9 +4328,9 @@ var componentInfo18 = {
|
|
|
4267
4328
|
advanced: true
|
|
4268
4329
|
}]
|
|
4269
4330
|
};
|
|
4270
|
-
var _tmpl$
|
|
4271
|
-
var _tmpl$
|
|
4272
|
-
var _tmpl$
|
|
4331
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
4332
|
+
var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
|
|
4333
|
+
var _tmpl$35 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
4273
4334
|
function Video(props) {
|
|
4274
4335
|
const videoProps = createMemo(() => {
|
|
4275
4336
|
return {
|
|
@@ -4296,7 +4357,7 @@ function Video(props) {
|
|
|
4296
4357
|
};
|
|
4297
4358
|
});
|
|
4298
4359
|
return (() => {
|
|
4299
|
-
const _el$ = _tmpl$
|
|
4360
|
+
const _el$ = _tmpl$35(), _el$2 = _el$.firstChild;
|
|
4300
4361
|
_el$.style.setProperty("position", "relative");
|
|
4301
4362
|
spread(_el$2, mergeProps(spreadProps, {
|
|
4302
4363
|
get preload() {
|
|
@@ -4330,7 +4391,7 @@ function Video(props) {
|
|
|
4330
4391
|
return !props.lazyLoad;
|
|
4331
4392
|
},
|
|
4332
4393
|
get children() {
|
|
4333
|
-
const _el$3 = _tmpl$
|
|
4394
|
+
const _el$3 = _tmpl$19();
|
|
4334
4395
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
4335
4396
|
return _el$3;
|
|
4336
4397
|
}
|
|
@@ -4340,7 +4401,7 @@ function Video(props) {
|
|
|
4340
4401
|
return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
|
|
4341
4402
|
},
|
|
4342
4403
|
get children() {
|
|
4343
|
-
const _el$4 = _tmpl$
|
|
4404
|
+
const _el$4 = _tmpl$28();
|
|
4344
4405
|
_el$4.style.setProperty("width", "100%");
|
|
4345
4406
|
_el$4.style.setProperty("pointer-events", "none");
|
|
4346
4407
|
_el$4.style.setProperty("font-size", "0px");
|
|
@@ -4353,7 +4414,7 @@ function Video(props) {
|
|
|
4353
4414
|
return props.builderBlock?.children?.length && props.fitContent;
|
|
4354
4415
|
},
|
|
4355
4416
|
get children() {
|
|
4356
|
-
const _el$5 = _tmpl$
|
|
4417
|
+
const _el$5 = _tmpl$28();
|
|
4357
4418
|
_el$5.style.setProperty("display", "flex");
|
|
4358
4419
|
_el$5.style.setProperty("flex-direction", "column");
|
|
4359
4420
|
_el$5.style.setProperty("align-items", "stretch");
|
|
@@ -4366,7 +4427,7 @@ function Video(props) {
|
|
|
4366
4427
|
return props.builderBlock?.children?.length && !props.fitContent;
|
|
4367
4428
|
},
|
|
4368
4429
|
get children() {
|
|
4369
|
-
const _el$6 = _tmpl$
|
|
4430
|
+
const _el$6 = _tmpl$28();
|
|
4370
4431
|
_el$6.style.setProperty("pointer-events", "none");
|
|
4371
4432
|
_el$6.style.setProperty("display", "flex");
|
|
4372
4433
|
_el$6.style.setProperty("flex-direction", "column");
|
|
@@ -4404,12 +4465,15 @@ var getExtraComponents = () => [{
|
|
|
4404
4465
|
}, {
|
|
4405
4466
|
component: select_default,
|
|
4406
4467
|
...componentInfo15
|
|
4468
|
+
}, {
|
|
4469
|
+
component: textarea_default,
|
|
4470
|
+
...componentInfo17
|
|
4407
4471
|
}], {
|
|
4408
4472
|
component: img_default,
|
|
4409
|
-
...
|
|
4473
|
+
...componentInfo18
|
|
4410
4474
|
}, {
|
|
4411
4475
|
component: video_default,
|
|
4412
|
-
...
|
|
4476
|
+
...componentInfo19
|
|
4413
4477
|
}];
|
|
4414
4478
|
|
|
4415
4479
|
// src/constants/builder-registered-components.ts
|
|
@@ -4512,10 +4576,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4512
4576
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
4513
4577
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
4514
4578
|
)`;
|
|
4515
|
-
var _tmpl$
|
|
4579
|
+
var _tmpl$20 = /* @__PURE__ */ template(`<script>`);
|
|
4516
4580
|
function InlinedScript(props) {
|
|
4517
4581
|
return (() => {
|
|
4518
|
-
const _el$ = _tmpl$
|
|
4582
|
+
const _el$ = _tmpl$20();
|
|
4519
4583
|
effect((_p$) => {
|
|
4520
4584
|
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
4521
4585
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -5024,7 +5088,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
5024
5088
|
}
|
|
5025
5089
|
|
|
5026
5090
|
// src/constants/sdk-version.ts
|
|
5027
|
-
var SDK_VERSION = "1.0.
|
|
5091
|
+
var SDK_VERSION = "1.0.36";
|
|
5028
5092
|
|
|
5029
5093
|
// src/functions/register.ts
|
|
5030
5094
|
var registry = {};
|
|
@@ -6006,7 +6070,7 @@ var fetchSymbolContent = async ({
|
|
|
6006
6070
|
};
|
|
6007
6071
|
|
|
6008
6072
|
// src/blocks/symbol/symbol.tsx
|
|
6009
|
-
var _tmpl$
|
|
6073
|
+
var _tmpl$21 = /* @__PURE__ */ template(`<div>`);
|
|
6010
6074
|
function Symbol(props) {
|
|
6011
6075
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
6012
6076
|
const blocksWrapper = createMemo(() => {
|
|
@@ -6038,7 +6102,7 @@ function Symbol(props) {
|
|
|
6038
6102
|
}
|
|
6039
6103
|
createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
6040
6104
|
return (() => {
|
|
6041
|
-
const _el$ = _tmpl$
|
|
6105
|
+
const _el$ = _tmpl$21();
|
|
6042
6106
|
spread(_el$, mergeProps({
|
|
6043
6107
|
get ["class"]() {
|
|
6044
6108
|
return className();
|