@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/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
|
import { createRequire } from 'node:module';
|
|
5
4
|
|
|
6
5
|
// src/blocks/button/button.tsx
|
|
@@ -1040,7 +1039,7 @@ function BlockStyles(props) {
|
|
|
1040
1039
|
}
|
|
1041
1040
|
return true;
|
|
1042
1041
|
});
|
|
1043
|
-
const
|
|
1042
|
+
const css = createMemo(() => {
|
|
1044
1043
|
const processedBlock = getProcessedBlock({
|
|
1045
1044
|
block: props.block,
|
|
1046
1045
|
localState: props.context.localState,
|
|
@@ -1090,13 +1089,13 @@ function BlockStyles(props) {
|
|
|
1090
1089
|
});
|
|
1091
1090
|
return createComponent(Show, {
|
|
1092
1091
|
get when() {
|
|
1093
|
-
return memo(() => !!(TARGET !== "reactNative" &&
|
|
1092
|
+
return memo(() => !!(TARGET !== "reactNative" && css()))() && canShowBlock();
|
|
1094
1093
|
},
|
|
1095
1094
|
get children() {
|
|
1096
1095
|
return createComponent(inlined_styles_default, {
|
|
1097
1096
|
id: "builderio-block",
|
|
1098
1097
|
get styles() {
|
|
1099
|
-
return
|
|
1098
|
+
return css();
|
|
1100
1099
|
}
|
|
1101
1100
|
});
|
|
1102
1101
|
}
|
|
@@ -1574,6 +1573,11 @@ function Block(props) {
|
|
|
1574
1573
|
});
|
|
1575
1574
|
}
|
|
1576
1575
|
var block_default = Block;
|
|
1576
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-1bb6a3a2 {
|
|
1577
|
+
display: flex;
|
|
1578
|
+
flex-direction: column;
|
|
1579
|
+
align-items: stretch;
|
|
1580
|
+
}`);
|
|
1577
1581
|
function BlocksWrapper(props) {
|
|
1578
1582
|
const className = createMemo(() => {
|
|
1579
1583
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
@@ -1600,13 +1604,9 @@ function BlocksWrapper(props) {
|
|
|
1600
1604
|
}, "*");
|
|
1601
1605
|
}
|
|
1602
1606
|
}
|
|
1603
|
-
return createComponent(Dynamic, mergeProps({
|
|
1607
|
+
return [createComponent(Dynamic, mergeProps({
|
|
1604
1608
|
get ["class"]() {
|
|
1605
|
-
return className() + " "
|
|
1606
|
-
display: "flex",
|
|
1607
|
-
flexDirection: "column",
|
|
1608
|
-
alignItems: "stretch"
|
|
1609
|
-
});
|
|
1609
|
+
return className() + " dynamic-1bb6a3a2";
|
|
1610
1610
|
},
|
|
1611
1611
|
get ["builder-path"]() {
|
|
1612
1612
|
return props.path;
|
|
@@ -1628,7 +1628,7 @@ function BlocksWrapper(props) {
|
|
|
1628
1628
|
get children() {
|
|
1629
1629
|
return props.children;
|
|
1630
1630
|
}
|
|
1631
|
-
}));
|
|
1631
|
+
})), _tmpl$2()];
|
|
1632
1632
|
}
|
|
1633
1633
|
var blocks_wrapper_default = BlocksWrapper;
|
|
1634
1634
|
|
|
@@ -1697,7 +1697,11 @@ var getColumnsClass = (id) => {
|
|
|
1697
1697
|
};
|
|
1698
1698
|
|
|
1699
1699
|
// src/blocks/columns/columns.tsx
|
|
1700
|
-
var _tmpl$
|
|
1700
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
|
|
1701
|
+
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-f2f53158 {
|
|
1702
|
+
display: flex;
|
|
1703
|
+
line-height: normal;
|
|
1704
|
+
}`);
|
|
1701
1705
|
function Columns(props) {
|
|
1702
1706
|
const [gutterSize, setGutterSize] = createSignal(typeof props.space === "number" ? props.space || 0 : 20);
|
|
1703
1707
|
const [cols, setCols] = createSignal(props.columns || []);
|
|
@@ -1809,14 +1813,11 @@ function Columns(props) {
|
|
|
1809
1813
|
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
1810
1814
|
};
|
|
1811
1815
|
}
|
|
1812
|
-
return (() => {
|
|
1813
|
-
const _el$ = _tmpl$
|
|
1816
|
+
return [(() => {
|
|
1817
|
+
const _el$ = _tmpl$3();
|
|
1814
1818
|
spread(_el$, mergeProps({
|
|
1815
1819
|
get ["class"]() {
|
|
1816
|
-
return getColumnsClass(props.builderBlock?.id) + " "
|
|
1817
|
-
display: "flex",
|
|
1818
|
-
lineHeight: "normal"
|
|
1819
|
-
});
|
|
1820
|
+
return getColumnsClass(props.builderBlock?.id) + " div-f2f53158";
|
|
1820
1821
|
},
|
|
1821
1822
|
get style() {
|
|
1822
1823
|
return columnsCssVars();
|
|
@@ -1875,13 +1876,13 @@ function Columns(props) {
|
|
|
1875
1876
|
}
|
|
1876
1877
|
}), null);
|
|
1877
1878
|
return _el$;
|
|
1878
|
-
})();
|
|
1879
|
+
})(), _tmpl$22()];
|
|
1879
1880
|
}
|
|
1880
1881
|
var columns_default = Columns;
|
|
1881
|
-
var _tmpl$
|
|
1882
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<span>`);
|
|
1882
1883
|
function FragmentComponent(props) {
|
|
1883
1884
|
return (() => {
|
|
1884
|
-
const _el$ = _tmpl$
|
|
1885
|
+
const _el$ = _tmpl$4();
|
|
1885
1886
|
insert(_el$, () => props.children);
|
|
1886
1887
|
return _el$;
|
|
1887
1888
|
})();
|
|
@@ -1936,9 +1937,27 @@ function getSrcSet(url) {
|
|
|
1936
1937
|
}
|
|
1937
1938
|
|
|
1938
1939
|
// src/blocks/image/image.tsx
|
|
1939
|
-
var _tmpl$
|
|
1940
|
-
var _tmpl$
|
|
1941
|
-
var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
|
|
1940
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
|
|
1941
|
+
var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
|
|
1942
|
+
var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-54b38751">`);
|
|
1943
|
+
var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-54b38751-2>`);
|
|
1944
|
+
var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-54b38751 {
|
|
1945
|
+
opacity: 1;
|
|
1946
|
+
transition: opacity 0.2s ease-in-out;
|
|
1947
|
+
}.div-54b38751 {
|
|
1948
|
+
width: 100%;
|
|
1949
|
+
pointer-events: none;
|
|
1950
|
+
font-size: 0;
|
|
1951
|
+
}.div-54b38751-2 {
|
|
1952
|
+
display: flex;
|
|
1953
|
+
flex-direction: column;
|
|
1954
|
+
align-items: stretch;
|
|
1955
|
+
position: absolute;
|
|
1956
|
+
top: 0;
|
|
1957
|
+
left: 0;
|
|
1958
|
+
width: 100%;
|
|
1959
|
+
height: 100%;
|
|
1960
|
+
}`);
|
|
1942
1961
|
function Image(props) {
|
|
1943
1962
|
const srcSetToUse = createMemo(() => {
|
|
1944
1963
|
const imageToUse = props.image || props.src;
|
|
@@ -1975,23 +1994,20 @@ function Image(props) {
|
|
|
1975
1994
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
1976
1995
|
return out;
|
|
1977
1996
|
});
|
|
1978
|
-
return [(() => {
|
|
1979
|
-
const _el$ = _tmpl$
|
|
1997
|
+
return [[(() => {
|
|
1998
|
+
const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
|
|
1980
1999
|
insert(_el$, createComponent(Show, {
|
|
1981
2000
|
get when() {
|
|
1982
2001
|
return webpSrcSet();
|
|
1983
2002
|
},
|
|
1984
2003
|
get children() {
|
|
1985
|
-
const _el$2 = _tmpl$
|
|
2004
|
+
const _el$2 = _tmpl$5();
|
|
1986
2005
|
effect(() => setAttribute(_el$2, "srcset", webpSrcSet()));
|
|
1987
2006
|
return _el$2;
|
|
1988
2007
|
}
|
|
1989
2008
|
}), _el$3);
|
|
1990
2009
|
effect((_p$) => {
|
|
1991
|
-
const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " "
|
|
1992
|
-
opacity: "1",
|
|
1993
|
-
transition: "opacity 0.2s ease-in-out"
|
|
1994
|
-
}), _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 = {
|
|
2010
|
+
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 = {
|
|
1995
2011
|
"object-position": props.backgroundPosition || "center",
|
|
1996
2012
|
"object-fit": props.backgroundSize || "cover",
|
|
1997
2013
|
...aspectRatioCss()
|
|
@@ -2024,19 +2040,7 @@ function Image(props) {
|
|
|
2024
2040
|
},
|
|
2025
2041
|
get children() {
|
|
2026
2042
|
const _el$4 = _tmpl$32();
|
|
2027
|
-
effect((
|
|
2028
|
-
const _v$10 = "builder-image-sizer " + css({
|
|
2029
|
-
width: "100%",
|
|
2030
|
-
pointerEvents: "none",
|
|
2031
|
-
fontSize: "0"
|
|
2032
|
-
}), _v$11 = props.aspectRatio * 100 + "%";
|
|
2033
|
-
_v$10 !== _p$._v$10 && className(_el$4, _p$._v$10 = _v$10);
|
|
2034
|
-
_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"));
|
|
2035
|
-
return _p$;
|
|
2036
|
-
}, {
|
|
2037
|
-
_v$10: void 0,
|
|
2038
|
-
_v$11: void 0
|
|
2039
|
-
});
|
|
2043
|
+
effect(() => props.aspectRatio * 100 + "%" != null ? _el$4.style.setProperty("padding-top", props.aspectRatio * 100 + "%") : _el$4.style.removeProperty("padding-top"));
|
|
2040
2044
|
return _el$4;
|
|
2041
2045
|
}
|
|
2042
2046
|
}), createComponent(Show, {
|
|
@@ -2051,27 +2055,17 @@ function Image(props) {
|
|
|
2051
2055
|
return !props.fitContent && props.builderBlock?.children?.length;
|
|
2052
2056
|
},
|
|
2053
2057
|
get children() {
|
|
2054
|
-
const _el$5 = _tmpl$
|
|
2058
|
+
const _el$5 = _tmpl$42();
|
|
2055
2059
|
insert(_el$5, () => props.children);
|
|
2056
|
-
effect(() => className(_el$5, css({
|
|
2057
|
-
display: "flex",
|
|
2058
|
-
flexDirection: "column",
|
|
2059
|
-
alignItems: "stretch",
|
|
2060
|
-
position: "absolute",
|
|
2061
|
-
top: "0",
|
|
2062
|
-
left: "0",
|
|
2063
|
-
width: "100%",
|
|
2064
|
-
height: "100%"
|
|
2065
|
-
})));
|
|
2066
2060
|
return _el$5;
|
|
2067
2061
|
}
|
|
2068
|
-
})];
|
|
2062
|
+
})], _tmpl$52()];
|
|
2069
2063
|
}
|
|
2070
2064
|
var image_default = Image;
|
|
2071
|
-
var _tmpl$
|
|
2065
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<section>`);
|
|
2072
2066
|
function SectionComponent(props) {
|
|
2073
2067
|
return (() => {
|
|
2074
|
-
const _el$ = _tmpl$
|
|
2068
|
+
const _el$ = _tmpl$6();
|
|
2075
2069
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
2076
2070
|
get style() {
|
|
2077
2071
|
return {
|
|
@@ -2416,8 +2410,8 @@ var convertOrderNumberToString = (order) => {
|
|
|
2416
2410
|
};
|
|
2417
2411
|
|
|
2418
2412
|
// src/blocks/accordion/accordion.tsx
|
|
2419
|
-
var _tmpl$
|
|
2420
|
-
var _tmpl$
|
|
2413
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
|
|
2414
|
+
var _tmpl$24 = /* @__PURE__ */ template(`<div>`);
|
|
2421
2415
|
function Accordion(props) {
|
|
2422
2416
|
const [open, setOpen] = createSignal([]);
|
|
2423
2417
|
const onlyOneAtATime = createMemo(() => {
|
|
@@ -2507,7 +2501,7 @@ function Accordion(props) {
|
|
|
2507
2501
|
}
|
|
2508
2502
|
}
|
|
2509
2503
|
return (() => {
|
|
2510
|
-
const _el$ = _tmpl$
|
|
2504
|
+
const _el$ = _tmpl$7();
|
|
2511
2505
|
insert(_el$, createComponent(For, {
|
|
2512
2506
|
get each() {
|
|
2513
2507
|
return props.items;
|
|
@@ -2515,7 +2509,7 @@ function Accordion(props) {
|
|
|
2515
2509
|
children: (item, _index) => {
|
|
2516
2510
|
const index = _index();
|
|
2517
2511
|
return [(() => {
|
|
2518
|
-
const _el$2 = _tmpl$
|
|
2512
|
+
const _el$2 = _tmpl$24();
|
|
2519
2513
|
_el$2.$$click = (event) => onClick(index);
|
|
2520
2514
|
setAttribute(_el$2, "data-index", index);
|
|
2521
2515
|
insert(_el$2, createComponent(blocks_default, {
|
|
@@ -2557,7 +2551,7 @@ function Accordion(props) {
|
|
|
2557
2551
|
return open().includes(index);
|
|
2558
2552
|
},
|
|
2559
2553
|
get children() {
|
|
2560
|
-
const _el$3 = _tmpl$
|
|
2554
|
+
const _el$3 = _tmpl$24();
|
|
2561
2555
|
insert(_el$3, createComponent(blocks_default, {
|
|
2562
2556
|
get blocks() {
|
|
2563
2557
|
return item.detail;
|
|
@@ -2878,7 +2872,7 @@ var componentInfo5 = {
|
|
|
2878
2872
|
name: "image",
|
|
2879
2873
|
type: "file",
|
|
2880
2874
|
bubble: true,
|
|
2881
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
2875
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
|
|
2882
2876
|
required: true,
|
|
2883
2877
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
2884
2878
|
onChange: (options) => {
|
|
@@ -3046,10 +3040,10 @@ var componentInfo7 = {
|
|
|
3046
3040
|
defaultValue: "children"
|
|
3047
3041
|
}]
|
|
3048
3042
|
};
|
|
3049
|
-
var _tmpl$
|
|
3043
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
|
|
3050
3044
|
function Slot(props) {
|
|
3051
3045
|
return (() => {
|
|
3052
|
-
const _el$ = _tmpl$
|
|
3046
|
+
const _el$ = _tmpl$8();
|
|
3053
3047
|
_el$.style.setProperty("pointer-events", "auto");
|
|
3054
3048
|
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
3055
3049
|
"builder-slot": props.name
|
|
@@ -3248,8 +3242,8 @@ var componentInfo9 = {
|
|
|
3248
3242
|
}]
|
|
3249
3243
|
}]
|
|
3250
3244
|
};
|
|
3251
|
-
var _tmpl$
|
|
3252
|
-
var _tmpl$
|
|
3245
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
|
|
3246
|
+
var _tmpl$25 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
|
|
3253
3247
|
var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
|
|
3254
3248
|
function Tabs(props) {
|
|
3255
3249
|
const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
|
|
@@ -3264,7 +3258,7 @@ function Tabs(props) {
|
|
|
3264
3258
|
}
|
|
3265
3259
|
}
|
|
3266
3260
|
return (() => {
|
|
3267
|
-
const _el$ = _tmpl$
|
|
3261
|
+
const _el$ = _tmpl$25(), _el$2 = _el$.firstChild;
|
|
3268
3262
|
_el$2.style.setProperty("display", "flex");
|
|
3269
3263
|
_el$2.style.setProperty("flex-direction", "row");
|
|
3270
3264
|
_el$2.style.setProperty("overflow", "auto");
|
|
@@ -3316,7 +3310,7 @@ function Tabs(props) {
|
|
|
3316
3310
|
return activeTabContent(activeTab());
|
|
3317
3311
|
},
|
|
3318
3312
|
get children() {
|
|
3319
|
-
const _el$3 = _tmpl$
|
|
3313
|
+
const _el$3 = _tmpl$9();
|
|
3320
3314
|
insert(_el$3, createComponent(blocks_default, {
|
|
3321
3315
|
get parent() {
|
|
3322
3316
|
return props.builderBlock.id;
|
|
@@ -3367,10 +3361,10 @@ var componentInfo10 = {
|
|
|
3367
3361
|
textAlign: "center"
|
|
3368
3362
|
}
|
|
3369
3363
|
};
|
|
3370
|
-
var _tmpl$
|
|
3364
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
3371
3365
|
function Text(props) {
|
|
3372
3366
|
return (() => {
|
|
3373
|
-
const _el$ = _tmpl$
|
|
3367
|
+
const _el$ = _tmpl$10();
|
|
3374
3368
|
_el$.style.setProperty("outline", "none");
|
|
3375
3369
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
3376
3370
|
return _el$;
|
|
@@ -3402,7 +3396,7 @@ var componentInfo11 = {
|
|
|
3402
3396
|
advanced: true
|
|
3403
3397
|
}]
|
|
3404
3398
|
};
|
|
3405
|
-
var _tmpl$
|
|
3399
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
|
|
3406
3400
|
function CustomCode(props) {
|
|
3407
3401
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
3408
3402
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -3436,7 +3430,7 @@ function CustomCode(props) {
|
|
|
3436
3430
|
}
|
|
3437
3431
|
});
|
|
3438
3432
|
return (() => {
|
|
3439
|
-
const _el$ = _tmpl$
|
|
3433
|
+
const _el$ = _tmpl$11();
|
|
3440
3434
|
const _ref$ = elementRef;
|
|
3441
3435
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
|
|
3442
3436
|
effect((_p$) => {
|
|
@@ -3467,7 +3461,7 @@ var componentInfo12 = {
|
|
|
3467
3461
|
const url = options.get("url");
|
|
3468
3462
|
if (url) {
|
|
3469
3463
|
options.set("content", "Loading...");
|
|
3470
|
-
const apiKey =
|
|
3464
|
+
const apiKey = _iframelyApiKey;
|
|
3471
3465
|
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
|
|
3472
3466
|
if (options.get("url") === url) {
|
|
3473
3467
|
if (data.html) {
|
|
@@ -3496,7 +3490,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
|
|
|
3496
3490
|
var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
3497
3491
|
|
|
3498
3492
|
// src/blocks/embed/embed.tsx
|
|
3499
|
-
var _tmpl$
|
|
3493
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-embed>`);
|
|
3500
3494
|
function Embed(props) {
|
|
3501
3495
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
3502
3496
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -3533,7 +3527,7 @@ function Embed(props) {
|
|
|
3533
3527
|
}
|
|
3534
3528
|
createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
|
|
3535
3529
|
return (() => {
|
|
3536
|
-
const _el$ = _tmpl$
|
|
3530
|
+
const _el$ = _tmpl$12();
|
|
3537
3531
|
const _ref$ = elem;
|
|
3538
3532
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
|
|
3539
3533
|
effect(() => _el$.innerHTML = props.content);
|
|
@@ -3790,8 +3784,13 @@ var get = (obj, path, defaultValue) => {
|
|
|
3790
3784
|
};
|
|
3791
3785
|
|
|
3792
3786
|
// src/blocks/form/form/form.tsx
|
|
3793
|
-
var _tmpl$
|
|
3794
|
-
var _tmpl$
|
|
3787
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-2e825338">`);
|
|
3788
|
+
var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
|
|
3789
|
+
var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-2e825338 {
|
|
3790
|
+
padding: 10px;
|
|
3791
|
+
color: red;
|
|
3792
|
+
text-align: center;
|
|
3793
|
+
}`);
|
|
3795
3794
|
function FormComponent(props) {
|
|
3796
3795
|
const [formState, setFormState] = createSignal("unsubmitted");
|
|
3797
3796
|
const [responseData, setResponseData] = createSignal(null);
|
|
@@ -3976,8 +3975,8 @@ function FormComponent(props) {
|
|
|
3976
3975
|
}
|
|
3977
3976
|
}
|
|
3978
3977
|
let formRef;
|
|
3979
|
-
return (() => {
|
|
3980
|
-
const _el$ = _tmpl$
|
|
3978
|
+
return [(() => {
|
|
3979
|
+
const _el$ = _tmpl$26();
|
|
3981
3980
|
_el$.addEventListener("submit", (event) => onSubmit(event));
|
|
3982
3981
|
const _ref$ = formRef;
|
|
3983
3982
|
typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
|
|
@@ -4060,13 +4059,8 @@ function FormComponent(props) {
|
|
|
4060
4059
|
return memo(() => submissionState() === "error")() && responseData();
|
|
4061
4060
|
},
|
|
4062
4061
|
get children() {
|
|
4063
|
-
const _el$2 = _tmpl$
|
|
4062
|
+
const _el$2 = _tmpl$13();
|
|
4064
4063
|
insert(_el$2, () => JSON.stringify(responseData(), null, 2));
|
|
4065
|
-
effect(() => className(_el$2, "builder-form-error-text " + css({
|
|
4066
|
-
padding: "10px",
|
|
4067
|
-
color: "red",
|
|
4068
|
-
textAlign: "center"
|
|
4069
|
-
})));
|
|
4070
4064
|
return _el$2;
|
|
4071
4065
|
}
|
|
4072
4066
|
}), null);
|
|
@@ -4087,7 +4081,7 @@ function FormComponent(props) {
|
|
|
4087
4081
|
}
|
|
4088
4082
|
}), null);
|
|
4089
4083
|
return _el$;
|
|
4090
|
-
})();
|
|
4084
|
+
})(), _tmpl$34()];
|
|
4091
4085
|
}
|
|
4092
4086
|
var form_default = FormComponent;
|
|
4093
4087
|
|
|
@@ -4144,10 +4138,10 @@ var componentInfo14 = {
|
|
|
4144
4138
|
borderColor: "#ccc"
|
|
4145
4139
|
}
|
|
4146
4140
|
};
|
|
4147
|
-
var _tmpl$
|
|
4141
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<input>`);
|
|
4148
4142
|
function FormInputComponent(props) {
|
|
4149
4143
|
return (() => {
|
|
4150
|
-
const _el$ = _tmpl$
|
|
4144
|
+
const _el$ = _tmpl$14();
|
|
4151
4145
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
4152
4146
|
get key() {
|
|
4153
4147
|
return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
|
|
@@ -4220,11 +4214,11 @@ var componentInfo15 = {
|
|
|
4220
4214
|
static: true,
|
|
4221
4215
|
noWrap: true
|
|
4222
4216
|
};
|
|
4223
|
-
var _tmpl$
|
|
4224
|
-
var _tmpl$
|
|
4217
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<select>`);
|
|
4218
|
+
var _tmpl$27 = /* @__PURE__ */ template(`<option>`);
|
|
4225
4219
|
function SelectComponent(props) {
|
|
4226
4220
|
return (() => {
|
|
4227
|
-
const _el$ = _tmpl$
|
|
4221
|
+
const _el$ = _tmpl$15();
|
|
4228
4222
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
4229
4223
|
get value() {
|
|
4230
4224
|
return props.value;
|
|
@@ -4246,7 +4240,7 @@ function SelectComponent(props) {
|
|
|
4246
4240
|
children: (option, _index) => {
|
|
4247
4241
|
const index = _index();
|
|
4248
4242
|
return (() => {
|
|
4249
|
-
const _el$2 = _tmpl$
|
|
4243
|
+
const _el$2 = _tmpl$27();
|
|
4250
4244
|
insert(_el$2, () => option.name || option.value);
|
|
4251
4245
|
effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
|
|
4252
4246
|
effect(() => _el$2.value = option.value);
|
|
@@ -4286,10 +4280,10 @@ var componentInfo16 = {
|
|
|
4286
4280
|
// TODO: defaultChildren
|
|
4287
4281
|
// canHaveChildren: true,
|
|
4288
4282
|
};
|
|
4289
|
-
var _tmpl$
|
|
4283
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<button type=submit>`);
|
|
4290
4284
|
function SubmitButton(props) {
|
|
4291
4285
|
return (() => {
|
|
4292
|
-
const _el$ = _tmpl$
|
|
4286
|
+
const _el$ = _tmpl$16();
|
|
4293
4287
|
spread(_el$, mergeProps({}, () => props.attributes), false, true);
|
|
4294
4288
|
insert(_el$, () => props.text);
|
|
4295
4289
|
return _el$;
|
|
@@ -4313,10 +4307,10 @@ var componentInfo17 = {
|
|
|
4313
4307
|
noWrap: true,
|
|
4314
4308
|
static: true
|
|
4315
4309
|
};
|
|
4316
|
-
var _tmpl$
|
|
4310
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<img>`);
|
|
4317
4311
|
function ImgComponent(props) {
|
|
4318
4312
|
return (() => {
|
|
4319
|
-
const _el$ = _tmpl$
|
|
4313
|
+
const _el$ = _tmpl$17();
|
|
4320
4314
|
spread(_el$, mergeProps({
|
|
4321
4315
|
get style() {
|
|
4322
4316
|
return {
|
|
@@ -4422,9 +4416,9 @@ var componentInfo18 = {
|
|
|
4422
4416
|
advanced: true
|
|
4423
4417
|
}]
|
|
4424
4418
|
};
|
|
4425
|
-
var _tmpl$
|
|
4426
|
-
var _tmpl$
|
|
4427
|
-
var _tmpl$
|
|
4419
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
4420
|
+
var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
|
|
4421
|
+
var _tmpl$35 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
4428
4422
|
function Video(props) {
|
|
4429
4423
|
const videoProps = createMemo(() => {
|
|
4430
4424
|
return {
|
|
@@ -4451,7 +4445,7 @@ function Video(props) {
|
|
|
4451
4445
|
};
|
|
4452
4446
|
});
|
|
4453
4447
|
return (() => {
|
|
4454
|
-
const _el$ = _tmpl$
|
|
4448
|
+
const _el$ = _tmpl$35(), _el$2 = _el$.firstChild;
|
|
4455
4449
|
_el$.style.setProperty("position", "relative");
|
|
4456
4450
|
spread(_el$2, mergeProps(spreadProps, {
|
|
4457
4451
|
get preload() {
|
|
@@ -4485,7 +4479,7 @@ function Video(props) {
|
|
|
4485
4479
|
return !props.lazyLoad;
|
|
4486
4480
|
},
|
|
4487
4481
|
get children() {
|
|
4488
|
-
const _el$3 = _tmpl$
|
|
4482
|
+
const _el$3 = _tmpl$18();
|
|
4489
4483
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
4490
4484
|
return _el$3;
|
|
4491
4485
|
}
|
|
@@ -4495,7 +4489,7 @@ function Video(props) {
|
|
|
4495
4489
|
return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
|
|
4496
4490
|
},
|
|
4497
4491
|
get children() {
|
|
4498
|
-
const _el$4 = _tmpl$
|
|
4492
|
+
const _el$4 = _tmpl$28();
|
|
4499
4493
|
_el$4.style.setProperty("width", "100%");
|
|
4500
4494
|
_el$4.style.setProperty("pointer-events", "none");
|
|
4501
4495
|
_el$4.style.setProperty("font-size", "0px");
|
|
@@ -4508,7 +4502,7 @@ function Video(props) {
|
|
|
4508
4502
|
return props.builderBlock?.children?.length && props.fitContent;
|
|
4509
4503
|
},
|
|
4510
4504
|
get children() {
|
|
4511
|
-
const _el$5 = _tmpl$
|
|
4505
|
+
const _el$5 = _tmpl$28();
|
|
4512
4506
|
_el$5.style.setProperty("display", "flex");
|
|
4513
4507
|
_el$5.style.setProperty("flex-direction", "column");
|
|
4514
4508
|
_el$5.style.setProperty("align-items", "stretch");
|
|
@@ -4521,7 +4515,7 @@ function Video(props) {
|
|
|
4521
4515
|
return props.builderBlock?.children?.length && !props.fitContent;
|
|
4522
4516
|
},
|
|
4523
4517
|
get children() {
|
|
4524
|
-
const _el$6 = _tmpl$
|
|
4518
|
+
const _el$6 = _tmpl$28();
|
|
4525
4519
|
_el$6.style.setProperty("pointer-events", "none");
|
|
4526
4520
|
_el$6.style.setProperty("display", "flex");
|
|
4527
4521
|
_el$6.style.setProperty("flex-direction", "column");
|
|
@@ -4667,10 +4661,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4667
4661
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
4668
4662
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
4669
4663
|
)`;
|
|
4670
|
-
var _tmpl$
|
|
4664
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<script>`);
|
|
4671
4665
|
function InlinedScript(props) {
|
|
4672
4666
|
return (() => {
|
|
4673
|
-
const _el$ = _tmpl$
|
|
4667
|
+
const _el$ = _tmpl$19();
|
|
4674
4668
|
effect((_p$) => {
|
|
4675
4669
|
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
4676
4670
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -5171,12 +5165,15 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
5171
5165
|
// src/functions/is-from-trusted-host.ts
|
|
5172
5166
|
var DEFAULT_TRUSTED_HOSTS = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
5173
5167
|
function isFromTrustedHost(trustedHosts, e) {
|
|
5168
|
+
if (!e.origin.startsWith("http") && !e.origin.startsWith("https")) {
|
|
5169
|
+
return false;
|
|
5170
|
+
}
|
|
5174
5171
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
5175
5172
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
5176
5173
|
}
|
|
5177
5174
|
|
|
5178
5175
|
// src/constants/sdk-version.ts
|
|
5179
|
-
var SDK_VERSION = "1.0.
|
|
5176
|
+
var SDK_VERSION = "1.0.35";
|
|
5180
5177
|
|
|
5181
5178
|
// src/functions/register.ts
|
|
5182
5179
|
var registry = {};
|
|
@@ -6158,7 +6155,7 @@ var fetchSymbolContent = async ({
|
|
|
6158
6155
|
};
|
|
6159
6156
|
|
|
6160
6157
|
// src/blocks/symbol/symbol.tsx
|
|
6161
|
-
var _tmpl$
|
|
6158
|
+
var _tmpl$20 = /* @__PURE__ */ template(`<div>`);
|
|
6162
6159
|
function Symbol(props) {
|
|
6163
6160
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
6164
6161
|
const blocksWrapper = createMemo(() => {
|
|
@@ -6190,7 +6187,7 @@ function Symbol(props) {
|
|
|
6190
6187
|
}
|
|
6191
6188
|
createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
6192
6189
|
return (() => {
|
|
6193
|
-
const _el$ = _tmpl$
|
|
6190
|
+
const _el$ = _tmpl$20();
|
|
6194
6191
|
spread(_el$, mergeProps({
|
|
6195
6192
|
get ["class"]() {
|
|
6196
6193
|
return className();
|