@builder.io/sdk-solid 1.0.32 → 1.0.35
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 +108 -111
- package/lib/browser/dev.jsx +202 -195
- package/lib/browser/index.js +108 -111
- package/lib/browser/index.jsx +202 -195
- package/lib/edge/dev.js +108 -111
- package/lib/edge/dev.jsx +202 -195
- package/lib/edge/index.js +108 -111
- package/lib/edge/index.jsx +202 -195
- package/lib/node/dev.js +108 -111
- package/lib/node/dev.jsx +202 -195
- package/lib/node/index.js +108 -111
- package/lib/node/index.jsx +202 -195
- package/package.json +1 -1
package/lib/node/dev.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
|
import { createRequire } from 'node:module';
|
|
5
4
|
|
|
6
5
|
// src/blocks/button/button.tsx
|
|
@@ -1046,7 +1045,7 @@ function BlockStyles(props) {
|
|
|
1046
1045
|
}
|
|
1047
1046
|
return true;
|
|
1048
1047
|
});
|
|
1049
|
-
const
|
|
1048
|
+
const css = createMemo(() => {
|
|
1050
1049
|
const processedBlock = getProcessedBlock({
|
|
1051
1050
|
block: props.block,
|
|
1052
1051
|
localState: props.context.localState,
|
|
@@ -1096,13 +1095,13 @@ function BlockStyles(props) {
|
|
|
1096
1095
|
});
|
|
1097
1096
|
return createComponent(Show, {
|
|
1098
1097
|
get when() {
|
|
1099
|
-
return memo(() => !!(TARGET !== "reactNative" &&
|
|
1098
|
+
return memo(() => !!(TARGET !== "reactNative" && css()))() && canShowBlock();
|
|
1100
1099
|
},
|
|
1101
1100
|
get children() {
|
|
1102
1101
|
return createComponent(inlined_styles_default, {
|
|
1103
1102
|
id: "builderio-block",
|
|
1104
1103
|
get styles() {
|
|
1105
|
-
return
|
|
1104
|
+
return css();
|
|
1106
1105
|
}
|
|
1107
1106
|
});
|
|
1108
1107
|
}
|
|
@@ -1580,6 +1579,11 @@ function Block(props) {
|
|
|
1580
1579
|
});
|
|
1581
1580
|
}
|
|
1582
1581
|
var block_default = Block;
|
|
1582
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-1bb6a3a2 {
|
|
1583
|
+
display: flex;
|
|
1584
|
+
flex-direction: column;
|
|
1585
|
+
align-items: stretch;
|
|
1586
|
+
}`);
|
|
1583
1587
|
function BlocksWrapper(props) {
|
|
1584
1588
|
const className = createMemo(() => {
|
|
1585
1589
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
@@ -1606,13 +1610,9 @@ function BlocksWrapper(props) {
|
|
|
1606
1610
|
}, "*");
|
|
1607
1611
|
}
|
|
1608
1612
|
}
|
|
1609
|
-
return createComponent(Dynamic, mergeProps({
|
|
1613
|
+
return [createComponent(Dynamic, mergeProps({
|
|
1610
1614
|
get ["class"]() {
|
|
1611
|
-
return className() + " "
|
|
1612
|
-
display: "flex",
|
|
1613
|
-
flexDirection: "column",
|
|
1614
|
-
alignItems: "stretch"
|
|
1615
|
-
});
|
|
1615
|
+
return className() + " dynamic-1bb6a3a2";
|
|
1616
1616
|
},
|
|
1617
1617
|
get ["builder-path"]() {
|
|
1618
1618
|
return props.path;
|
|
@@ -1634,7 +1634,7 @@ function BlocksWrapper(props) {
|
|
|
1634
1634
|
get children() {
|
|
1635
1635
|
return props.children;
|
|
1636
1636
|
}
|
|
1637
|
-
}));
|
|
1637
|
+
})), _tmpl$2()];
|
|
1638
1638
|
}
|
|
1639
1639
|
var blocks_wrapper_default = BlocksWrapper;
|
|
1640
1640
|
|
|
@@ -1703,7 +1703,11 @@ var getColumnsClass = (id) => {
|
|
|
1703
1703
|
};
|
|
1704
1704
|
|
|
1705
1705
|
// src/blocks/columns/columns.tsx
|
|
1706
|
-
var _tmpl$
|
|
1706
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
|
|
1707
|
+
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-f2f53158 {
|
|
1708
|
+
display: flex;
|
|
1709
|
+
line-height: normal;
|
|
1710
|
+
}`);
|
|
1707
1711
|
function Columns(props) {
|
|
1708
1712
|
const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
|
|
1709
1713
|
const [cols, setCols] = createSignal(props.columns || []);
|
|
@@ -1815,14 +1819,11 @@ function Columns(props) {
|
|
|
1815
1819
|
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
1816
1820
|
};
|
|
1817
1821
|
}
|
|
1818
|
-
return (() => {
|
|
1819
|
-
const _el$ = _tmpl$
|
|
1822
|
+
return [(() => {
|
|
1823
|
+
const _el$ = _tmpl$3();
|
|
1820
1824
|
spread(_el$, mergeProps({
|
|
1821
1825
|
get ["class"]() {
|
|
1822
|
-
return getColumnsClass(props.builderBlock?.id) + " "
|
|
1823
|
-
display: "flex",
|
|
1824
|
-
lineHeight: "normal"
|
|
1825
|
-
});
|
|
1826
|
+
return getColumnsClass(props.builderBlock?.id) + " div-f2f53158";
|
|
1826
1827
|
},
|
|
1827
1828
|
get style() {
|
|
1828
1829
|
return columnsCssVars();
|
|
@@ -1881,13 +1882,13 @@ function Columns(props) {
|
|
|
1881
1882
|
}
|
|
1882
1883
|
}), null);
|
|
1883
1884
|
return _el$;
|
|
1884
|
-
})();
|
|
1885
|
+
})(), _tmpl$22()];
|
|
1885
1886
|
}
|
|
1886
1887
|
var columns_default = Columns;
|
|
1887
|
-
var _tmpl$
|
|
1888
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<span>`);
|
|
1888
1889
|
function FragmentComponent(props) {
|
|
1889
1890
|
return (() => {
|
|
1890
|
-
const _el$ = _tmpl$
|
|
1891
|
+
const _el$ = _tmpl$4();
|
|
1891
1892
|
insert(_el$, () => props.children);
|
|
1892
1893
|
return _el$;
|
|
1893
1894
|
})();
|
|
@@ -1942,9 +1943,27 @@ function getSrcSet(url) {
|
|
|
1942
1943
|
}
|
|
1943
1944
|
|
|
1944
1945
|
// src/blocks/image/image.tsx
|
|
1945
|
-
var _tmpl$
|
|
1946
|
-
var _tmpl$
|
|
1947
|
-
var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
|
|
1946
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
|
|
1947
|
+
var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
|
|
1948
|
+
var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-54b38751">`);
|
|
1949
|
+
var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-54b38751-2>`);
|
|
1950
|
+
var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-54b38751 {
|
|
1951
|
+
opacity: 1;
|
|
1952
|
+
transition: opacity 0.2s ease-in-out;
|
|
1953
|
+
}.div-54b38751 {
|
|
1954
|
+
width: 100%;
|
|
1955
|
+
pointer-events: none;
|
|
1956
|
+
font-size: 0;
|
|
1957
|
+
}.div-54b38751-2 {
|
|
1958
|
+
display: flex;
|
|
1959
|
+
flex-direction: column;
|
|
1960
|
+
align-items: stretch;
|
|
1961
|
+
position: absolute;
|
|
1962
|
+
top: 0;
|
|
1963
|
+
left: 0;
|
|
1964
|
+
width: 100%;
|
|
1965
|
+
height: 100%;
|
|
1966
|
+
}`);
|
|
1948
1967
|
function Image(props) {
|
|
1949
1968
|
const srcSetToUse = createMemo(() => {
|
|
1950
1969
|
const imageToUse = props.image || props.src;
|
|
@@ -1982,23 +2001,20 @@ function Image(props) {
|
|
|
1982
2001
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
1983
2002
|
return out;
|
|
1984
2003
|
});
|
|
1985
|
-
return [(() => {
|
|
1986
|
-
const _el$ = _tmpl$
|
|
2004
|
+
return [[(() => {
|
|
2005
|
+
const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
|
|
1987
2006
|
insert(_el$, createComponent(Show, {
|
|
1988
2007
|
get when() {
|
|
1989
2008
|
return webpSrcSet();
|
|
1990
2009
|
},
|
|
1991
2010
|
get children() {
|
|
1992
|
-
const _el$2 = _tmpl$
|
|
2011
|
+
const _el$2 = _tmpl$5();
|
|
1993
2012
|
effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
|
|
1994
2013
|
return _el$2;
|
|
1995
2014
|
}
|
|
1996
2015
|
}), _el$3);
|
|
1997
2016
|
effect((_p$) => {
|
|
1998
|
-
const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " "
|
|
1999
|
-
opacity: "1",
|
|
2000
|
-
transition: "opacity 0.2s ease-in-out"
|
|
2001
|
-
}), _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 = {
|
|
2017
|
+
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 = {
|
|
2002
2018
|
"object-position": props.backgroundPosition || "center",
|
|
2003
2019
|
"object-fit": props.backgroundSize || "cover",
|
|
2004
2020
|
...aspectRatioCss()
|
|
@@ -2031,19 +2047,7 @@ function Image(props) {
|
|
|
2031
2047
|
},
|
|
2032
2048
|
get children() {
|
|
2033
2049
|
const _el$4 = _tmpl$32();
|
|
2034
|
-
effect((
|
|
2035
|
-
const _v$10 = "builder-image-sizer " + css({
|
|
2036
|
-
width: "100%",
|
|
2037
|
-
pointerEvents: "none",
|
|
2038
|
-
fontSize: "0"
|
|
2039
|
-
}), _v$11 = props.aspectRatio * 100 + "%";
|
|
2040
|
-
_v$10 !== _p$._v$10 && className(_el$4, _p$._v$10 = _v$10);
|
|
2041
|
-
_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"));
|
|
2042
|
-
return _p$;
|
|
2043
|
-
}, {
|
|
2044
|
-
_v$10: void 0,
|
|
2045
|
-
_v$11: void 0
|
|
2046
|
-
});
|
|
2050
|
+
effect(() => props.aspectRatio * 100 + "%" != null ? _el$4.style.setProperty("padding-top", props.aspectRatio * 100 + "%") : _el$4.style.removeProperty("padding-top"));
|
|
2047
2051
|
return _el$4;
|
|
2048
2052
|
}
|
|
2049
2053
|
}), createComponent(Show, {
|
|
@@ -2058,27 +2062,17 @@ function Image(props) {
|
|
|
2058
2062
|
return !props.fitContent && props.builderBlock?.children?.length;
|
|
2059
2063
|
},
|
|
2060
2064
|
get children() {
|
|
2061
|
-
const _el$5 = _tmpl$
|
|
2065
|
+
const _el$5 = _tmpl$42();
|
|
2062
2066
|
insert(_el$5, () => props.children);
|
|
2063
|
-
effect(() => className(_el$5, css({
|
|
2064
|
-
display: "flex",
|
|
2065
|
-
flexDirection: "column",
|
|
2066
|
-
alignItems: "stretch",
|
|
2067
|
-
position: "absolute",
|
|
2068
|
-
top: "0",
|
|
2069
|
-
left: "0",
|
|
2070
|
-
width: "100%",
|
|
2071
|
-
height: "100%"
|
|
2072
|
-
})));
|
|
2073
2067
|
return _el$5;
|
|
2074
2068
|
}
|
|
2075
|
-
})];
|
|
2069
|
+
})], _tmpl$52()];
|
|
2076
2070
|
}
|
|
2077
2071
|
var image_default = Image;
|
|
2078
|
-
var _tmpl$
|
|
2072
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<section>`);
|
|
2079
2073
|
function SectionComponent(props) {
|
|
2080
2074
|
return (() => {
|
|
2081
|
-
const _el$ = _tmpl$
|
|
2075
|
+
const _el$ = _tmpl$6();
|
|
2082
2076
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
2083
2077
|
get style() {
|
|
2084
2078
|
return {
|
|
@@ -2423,8 +2417,8 @@ var convertOrderNumberToString = (order) => {
|
|
|
2423
2417
|
};
|
|
2424
2418
|
|
|
2425
2419
|
// src/blocks/accordion/accordion.tsx
|
|
2426
|
-
var _tmpl$
|
|
2427
|
-
var _tmpl$
|
|
2420
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
|
|
2421
|
+
var _tmpl$24 = /* @__PURE__ */ template(`<div>`);
|
|
2428
2422
|
function Accordion(props) {
|
|
2429
2423
|
const [open, setOpen] = createSignal([]);
|
|
2430
2424
|
const onlyOneAtATime = createMemo(() => {
|
|
@@ -2514,7 +2508,7 @@ function Accordion(props) {
|
|
|
2514
2508
|
}
|
|
2515
2509
|
}
|
|
2516
2510
|
return (() => {
|
|
2517
|
-
const _el$ = _tmpl$
|
|
2511
|
+
const _el$ = _tmpl$7();
|
|
2518
2512
|
insert(_el$, createComponent(For, {
|
|
2519
2513
|
get each() {
|
|
2520
2514
|
return props.items;
|
|
@@ -2522,7 +2516,7 @@ function Accordion(props) {
|
|
|
2522
2516
|
children: (item, _index) => {
|
|
2523
2517
|
const index = _index();
|
|
2524
2518
|
return [(() => {
|
|
2525
|
-
const _el$2 = _tmpl$
|
|
2519
|
+
const _el$2 = _tmpl$24();
|
|
2526
2520
|
_el$2.$$click = (event) => onClick(index);
|
|
2527
2521
|
setAttribute(_el$2, "data-index", index);
|
|
2528
2522
|
insert(_el$2, createComponent(blocks_default, {
|
|
@@ -2564,7 +2558,7 @@ function Accordion(props) {
|
|
|
2564
2558
|
return open().includes(index);
|
|
2565
2559
|
},
|
|
2566
2560
|
get children() {
|
|
2567
|
-
const _el$3 = _tmpl$
|
|
2561
|
+
const _el$3 = _tmpl$24();
|
|
2568
2562
|
insert(_el$3, createComponent(blocks_default, {
|
|
2569
2563
|
get blocks() {
|
|
2570
2564
|
return item.detail;
|
|
@@ -2885,7 +2879,7 @@ var componentInfo5 = {
|
|
|
2885
2879
|
name: "image",
|
|
2886
2880
|
type: "file",
|
|
2887
2881
|
bubble: true,
|
|
2888
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
2882
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
|
|
2889
2883
|
required: true,
|
|
2890
2884
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
2891
2885
|
onChange: (options) => {
|
|
@@ -3054,10 +3048,10 @@ var componentInfo7 = {
|
|
|
3054
3048
|
defaultValue: "children"
|
|
3055
3049
|
}]
|
|
3056
3050
|
};
|
|
3057
|
-
var _tmpl$
|
|
3051
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
|
|
3058
3052
|
function Slot(props) {
|
|
3059
3053
|
return (() => {
|
|
3060
|
-
const _el$ = _tmpl$
|
|
3054
|
+
const _el$ = _tmpl$8();
|
|
3061
3055
|
_el$.style.setProperty("pointer-events", "auto");
|
|
3062
3056
|
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
3063
3057
|
"builder-slot": props.name
|
|
@@ -3256,8 +3250,8 @@ var componentInfo9 = {
|
|
|
3256
3250
|
}]
|
|
3257
3251
|
}]
|
|
3258
3252
|
};
|
|
3259
|
-
var _tmpl$
|
|
3260
|
-
var _tmpl$
|
|
3253
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
|
|
3254
|
+
var _tmpl$25 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
|
|
3261
3255
|
var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
|
|
3262
3256
|
function Tabs(props) {
|
|
3263
3257
|
const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
|
|
@@ -3272,7 +3266,7 @@ function Tabs(props) {
|
|
|
3272
3266
|
}
|
|
3273
3267
|
}
|
|
3274
3268
|
return (() => {
|
|
3275
|
-
const _el$ = _tmpl$
|
|
3269
|
+
const _el$ = _tmpl$25(), _el$2 = _el$.firstChild;
|
|
3276
3270
|
_el$2.style.setProperty("display", "flex");
|
|
3277
3271
|
_el$2.style.setProperty("flex-direction", "row");
|
|
3278
3272
|
_el$2.style.setProperty("overflow", "auto");
|
|
@@ -3324,7 +3318,7 @@ function Tabs(props) {
|
|
|
3324
3318
|
return activeTabContent(activeTab());
|
|
3325
3319
|
},
|
|
3326
3320
|
get children() {
|
|
3327
|
-
const _el$3 = _tmpl$
|
|
3321
|
+
const _el$3 = _tmpl$9();
|
|
3328
3322
|
insert(_el$3, createComponent(blocks_default, {
|
|
3329
3323
|
get parent() {
|
|
3330
3324
|
return props.builderBlock.id;
|
|
@@ -3375,10 +3369,10 @@ var componentInfo10 = {
|
|
|
3375
3369
|
textAlign: "center"
|
|
3376
3370
|
}
|
|
3377
3371
|
};
|
|
3378
|
-
var _tmpl$
|
|
3372
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
3379
3373
|
function Text(props) {
|
|
3380
3374
|
return (() => {
|
|
3381
|
-
const _el$ = _tmpl$
|
|
3375
|
+
const _el$ = _tmpl$10();
|
|
3382
3376
|
_el$.style.setProperty("outline", "none");
|
|
3383
3377
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
3384
3378
|
return _el$;
|
|
@@ -3410,7 +3404,7 @@ var componentInfo11 = {
|
|
|
3410
3404
|
advanced: true
|
|
3411
3405
|
}]
|
|
3412
3406
|
};
|
|
3413
|
-
var _tmpl$
|
|
3407
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
|
|
3414
3408
|
function CustomCode(props) {
|
|
3415
3409
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
3416
3410
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -3445,7 +3439,7 @@ function CustomCode(props) {
|
|
|
3445
3439
|
}
|
|
3446
3440
|
});
|
|
3447
3441
|
return (() => {
|
|
3448
|
-
const _el$ = _tmpl$
|
|
3442
|
+
const _el$ = _tmpl$11();
|
|
3449
3443
|
const _ref$ = elementRef;
|
|
3450
3444
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
|
|
3451
3445
|
effect((_p$) => {
|
|
@@ -3476,7 +3470,7 @@ var componentInfo12 = {
|
|
|
3476
3470
|
const url = options.get("url");
|
|
3477
3471
|
if (url) {
|
|
3478
3472
|
options.set("content", "Loading...");
|
|
3479
|
-
const apiKey =
|
|
3473
|
+
const apiKey = _iframelyApiKey;
|
|
3480
3474
|
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
|
|
3481
3475
|
if (options.get("url") === url) {
|
|
3482
3476
|
if (data.html) {
|
|
@@ -3505,7 +3499,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
|
|
|
3505
3499
|
var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
3506
3500
|
|
|
3507
3501
|
// src/blocks/embed/embed.tsx
|
|
3508
|
-
var _tmpl$
|
|
3502
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-embed>`);
|
|
3509
3503
|
function Embed(props) {
|
|
3510
3504
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
3511
3505
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -3543,7 +3537,7 @@ function Embed(props) {
|
|
|
3543
3537
|
}
|
|
3544
3538
|
createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
|
|
3545
3539
|
return (() => {
|
|
3546
|
-
const _el$ = _tmpl$
|
|
3540
|
+
const _el$ = _tmpl$12();
|
|
3547
3541
|
const _ref$ = elem;
|
|
3548
3542
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
|
|
3549
3543
|
effect(() => _el$.innerHTML = props.content);
|
|
@@ -3800,8 +3794,13 @@ var get = (obj, path, defaultValue) => {
|
|
|
3800
3794
|
};
|
|
3801
3795
|
|
|
3802
3796
|
// src/blocks/form/form/form.tsx
|
|
3803
|
-
var _tmpl$
|
|
3804
|
-
var _tmpl$
|
|
3797
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-2e825338">`);
|
|
3798
|
+
var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
|
|
3799
|
+
var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-2e825338 {
|
|
3800
|
+
padding: 10px;
|
|
3801
|
+
color: red;
|
|
3802
|
+
text-align: center;
|
|
3803
|
+
}`);
|
|
3805
3804
|
function FormComponent(props) {
|
|
3806
3805
|
const [formState, setFormState] = createSignal("unsubmitted");
|
|
3807
3806
|
const [responseData, setResponseData] = createSignal(null);
|
|
@@ -3986,8 +3985,8 @@ function FormComponent(props) {
|
|
|
3986
3985
|
}
|
|
3987
3986
|
}
|
|
3988
3987
|
let formRef;
|
|
3989
|
-
return (() => {
|
|
3990
|
-
const _el$ = _tmpl$
|
|
3988
|
+
return [(() => {
|
|
3989
|
+
const _el$ = _tmpl$26();
|
|
3991
3990
|
_el$.addEventListener("submit", (event) => onSubmit(event));
|
|
3992
3991
|
const _ref$ = formRef;
|
|
3993
3992
|
typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
|
|
@@ -4070,13 +4069,8 @@ function FormComponent(props) {
|
|
|
4070
4069
|
return memo(() => submissionState() === "error")() && responseData();
|
|
4071
4070
|
},
|
|
4072
4071
|
get children() {
|
|
4073
|
-
const _el$2 = _tmpl$
|
|
4072
|
+
const _el$2 = _tmpl$13();
|
|
4074
4073
|
insert(_el$2, () => JSON.stringify(responseData(), null, 2));
|
|
4075
|
-
effect(() => className(_el$2, "builder-form-error-text " + css({
|
|
4076
|
-
padding: "10px",
|
|
4077
|
-
color: "red",
|
|
4078
|
-
textAlign: "center"
|
|
4079
|
-
})));
|
|
4080
4074
|
return _el$2;
|
|
4081
4075
|
}
|
|
4082
4076
|
}), null);
|
|
@@ -4097,7 +4091,7 @@ function FormComponent(props) {
|
|
|
4097
4091
|
}
|
|
4098
4092
|
}), null);
|
|
4099
4093
|
return _el$;
|
|
4100
|
-
})();
|
|
4094
|
+
})(), _tmpl$34()];
|
|
4101
4095
|
}
|
|
4102
4096
|
var form_default = FormComponent;
|
|
4103
4097
|
|
|
@@ -4154,10 +4148,10 @@ var componentInfo14 = {
|
|
|
4154
4148
|
borderColor: "#ccc"
|
|
4155
4149
|
}
|
|
4156
4150
|
};
|
|
4157
|
-
var _tmpl$
|
|
4151
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<input>`);
|
|
4158
4152
|
function FormInputComponent(props) {
|
|
4159
4153
|
return (() => {
|
|
4160
|
-
const _el$ = _tmpl$
|
|
4154
|
+
const _el$ = _tmpl$14();
|
|
4161
4155
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
4162
4156
|
get key() {
|
|
4163
4157
|
return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
|
|
@@ -4230,11 +4224,11 @@ var componentInfo15 = {
|
|
|
4230
4224
|
static: true,
|
|
4231
4225
|
noWrap: true
|
|
4232
4226
|
};
|
|
4233
|
-
var _tmpl$
|
|
4234
|
-
var _tmpl$
|
|
4227
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<select>`);
|
|
4228
|
+
var _tmpl$27 = /* @__PURE__ */ template(`<option>`);
|
|
4235
4229
|
function SelectComponent(props) {
|
|
4236
4230
|
return (() => {
|
|
4237
|
-
const _el$ = _tmpl$
|
|
4231
|
+
const _el$ = _tmpl$15();
|
|
4238
4232
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
4239
4233
|
get value() {
|
|
4240
4234
|
return props.value;
|
|
@@ -4256,7 +4250,7 @@ function SelectComponent(props) {
|
|
|
4256
4250
|
children: (option, _index) => {
|
|
4257
4251
|
const index = _index();
|
|
4258
4252
|
return (() => {
|
|
4259
|
-
const _el$2 = _tmpl$
|
|
4253
|
+
const _el$2 = _tmpl$27();
|
|
4260
4254
|
insert(_el$2, () => option.name || option.value);
|
|
4261
4255
|
effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
|
|
4262
4256
|
effect(() => _el$2.value = option.value);
|
|
@@ -4296,10 +4290,10 @@ var componentInfo16 = {
|
|
|
4296
4290
|
// TODO: defaultChildren
|
|
4297
4291
|
// canHaveChildren: true,
|
|
4298
4292
|
};
|
|
4299
|
-
var _tmpl$
|
|
4293
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<button type=submit>`);
|
|
4300
4294
|
function SubmitButton(props) {
|
|
4301
4295
|
return (() => {
|
|
4302
|
-
const _el$ = _tmpl$
|
|
4296
|
+
const _el$ = _tmpl$16();
|
|
4303
4297
|
spread(_el$, mergeProps({}, () => props.attributes), false, true);
|
|
4304
4298
|
insert(_el$, () => props.text);
|
|
4305
4299
|
return _el$;
|
|
@@ -4323,10 +4317,10 @@ var componentInfo17 = {
|
|
|
4323
4317
|
noWrap: true,
|
|
4324
4318
|
static: true
|
|
4325
4319
|
};
|
|
4326
|
-
var _tmpl$
|
|
4320
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<img>`);
|
|
4327
4321
|
function ImgComponent(props) {
|
|
4328
4322
|
return (() => {
|
|
4329
|
-
const _el$ = _tmpl$
|
|
4323
|
+
const _el$ = _tmpl$17();
|
|
4330
4324
|
spread(_el$, mergeProps({
|
|
4331
4325
|
get style() {
|
|
4332
4326
|
return {
|
|
@@ -4432,9 +4426,9 @@ var componentInfo18 = {
|
|
|
4432
4426
|
advanced: true
|
|
4433
4427
|
}]
|
|
4434
4428
|
};
|
|
4435
|
-
var _tmpl$
|
|
4436
|
-
var _tmpl$
|
|
4437
|
-
var _tmpl$
|
|
4429
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
4430
|
+
var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
|
|
4431
|
+
var _tmpl$35 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
4438
4432
|
function Video(props) {
|
|
4439
4433
|
const videoProps = createMemo(() => {
|
|
4440
4434
|
return {
|
|
@@ -4461,7 +4455,7 @@ function Video(props) {
|
|
|
4461
4455
|
};
|
|
4462
4456
|
});
|
|
4463
4457
|
return (() => {
|
|
4464
|
-
const _el$ = _tmpl$
|
|
4458
|
+
const _el$ = _tmpl$35(), _el$2 = _el$.firstChild;
|
|
4465
4459
|
_el$.style.setProperty("position", "relative");
|
|
4466
4460
|
spread(_el$2, mergeProps(spreadProps, {
|
|
4467
4461
|
get preload() {
|
|
@@ -4495,7 +4489,7 @@ function Video(props) {
|
|
|
4495
4489
|
return !props.lazyLoad;
|
|
4496
4490
|
},
|
|
4497
4491
|
get children() {
|
|
4498
|
-
const _el$3 = _tmpl$
|
|
4492
|
+
const _el$3 = _tmpl$18();
|
|
4499
4493
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
4500
4494
|
return _el$3;
|
|
4501
4495
|
}
|
|
@@ -4505,7 +4499,7 @@ function Video(props) {
|
|
|
4505
4499
|
return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
|
|
4506
4500
|
},
|
|
4507
4501
|
get children() {
|
|
4508
|
-
const _el$4 = _tmpl$
|
|
4502
|
+
const _el$4 = _tmpl$28();
|
|
4509
4503
|
_el$4.style.setProperty("width", "100%");
|
|
4510
4504
|
_el$4.style.setProperty("pointer-events", "none");
|
|
4511
4505
|
_el$4.style.setProperty("font-size", "0px");
|
|
@@ -4518,7 +4512,7 @@ function Video(props) {
|
|
|
4518
4512
|
return props.builderBlock?.children?.length && props.fitContent;
|
|
4519
4513
|
},
|
|
4520
4514
|
get children() {
|
|
4521
|
-
const _el$5 = _tmpl$
|
|
4515
|
+
const _el$5 = _tmpl$28();
|
|
4522
4516
|
_el$5.style.setProperty("display", "flex");
|
|
4523
4517
|
_el$5.style.setProperty("flex-direction", "column");
|
|
4524
4518
|
_el$5.style.setProperty("align-items", "stretch");
|
|
@@ -4531,7 +4525,7 @@ function Video(props) {
|
|
|
4531
4525
|
return props.builderBlock?.children?.length && !props.fitContent;
|
|
4532
4526
|
},
|
|
4533
4527
|
get children() {
|
|
4534
|
-
const _el$6 = _tmpl$
|
|
4528
|
+
const _el$6 = _tmpl$28();
|
|
4535
4529
|
_el$6.style.setProperty("pointer-events", "none");
|
|
4536
4530
|
_el$6.style.setProperty("display", "flex");
|
|
4537
4531
|
_el$6.style.setProperty("flex-direction", "column");
|
|
@@ -4677,10 +4671,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4677
4671
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
4678
4672
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
4679
4673
|
)`;
|
|
4680
|
-
var _tmpl$
|
|
4674
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<script>`);
|
|
4681
4675
|
function InlinedScript(props) {
|
|
4682
4676
|
return (() => {
|
|
4683
|
-
const _el$ = _tmpl$
|
|
4677
|
+
const _el$ = _tmpl$19();
|
|
4684
4678
|
effect((_p$) => {
|
|
4685
4679
|
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
4686
4680
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -5186,12 +5180,15 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
5186
5180
|
// src/functions/is-from-trusted-host.ts
|
|
5187
5181
|
var DEFAULT_TRUSTED_HOSTS = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
5188
5182
|
function isFromTrustedHost(trustedHosts, e) {
|
|
5183
|
+
if (!e.origin.startsWith("http") && !e.origin.startsWith("https")) {
|
|
5184
|
+
return false;
|
|
5185
|
+
}
|
|
5189
5186
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
5190
5187
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
5191
5188
|
}
|
|
5192
5189
|
|
|
5193
5190
|
// src/constants/sdk-version.ts
|
|
5194
|
-
var SDK_VERSION = "1.0.
|
|
5191
|
+
var SDK_VERSION = "1.0.35";
|
|
5195
5192
|
|
|
5196
5193
|
// src/functions/register.ts
|
|
5197
5194
|
var registry = {};
|
|
@@ -6175,7 +6172,7 @@ var fetchSymbolContent = async ({
|
|
|
6175
6172
|
};
|
|
6176
6173
|
|
|
6177
6174
|
// src/blocks/symbol/symbol.tsx
|
|
6178
|
-
var _tmpl$
|
|
6175
|
+
var _tmpl$20 = /* @__PURE__ */ template(`<div>`);
|
|
6179
6176
|
function Symbol(props) {
|
|
6180
6177
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
6181
6178
|
const blocksWrapper = createMemo(() => {
|
|
@@ -6207,7 +6204,7 @@ function Symbol(props) {
|
|
|
6207
6204
|
}
|
|
6208
6205
|
createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
6209
6206
|
return (() => {
|
|
6210
|
-
const _el$ = _tmpl$
|
|
6207
|
+
const _el$ = _tmpl$20();
|
|
6211
6208
|
spread(_el$, mergeProps({
|
|
6212
6209
|
get ["class"]() {
|
|
6213
6210
|
return className();
|