@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.jsx
CHANGED
|
@@ -10,7 +10,7 @@ var isEmptyElement = (tagName) => {
|
|
|
10
10
|
|
|
11
11
|
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
12
12
|
function DynamicRenderer(props) {
|
|
13
|
-
return
|
|
13
|
+
return <><Show
|
|
14
14
|
fallback={<Dynamic
|
|
15
15
|
{...props.attributes}
|
|
16
16
|
{...props.actionAttributes}
|
|
@@ -28,7 +28,7 @@ function DynamicRenderer(props) {
|
|
|
28
28
|
{...props.attributes}
|
|
29
29
|
{...props.actionAttributes}
|
|
30
30
|
component={props.TagName}
|
|
31
|
-
>{props.children}</Dynamic></Show></Show
|
|
31
|
+
>{props.children}</Dynamic></Show></Show></>;
|
|
32
32
|
}
|
|
33
33
|
var Dynamic_renderer_default = DynamicRenderer;
|
|
34
34
|
|
|
@@ -66,17 +66,16 @@ function Button(props) {
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return <><Dynamic_renderer_default
|
|
70
70
|
attributes={attrs()}
|
|
71
71
|
TagName={props.link ? props.builderLinkComponent || "a" : "button"}
|
|
72
72
|
actionAttributes={{}}
|
|
73
|
-
>{props.text}</Dynamic_renderer_default
|
|
73
|
+
>{props.text}</Dynamic_renderer_default></>;
|
|
74
74
|
}
|
|
75
75
|
var button_default = Button;
|
|
76
76
|
|
|
77
77
|
// src/blocks/columns/columns.tsx
|
|
78
78
|
import { Show as Show6, For as For4, createSignal as createSignal7 } from "solid-js";
|
|
79
|
-
import { css as css2 } from "solid-styled-components";
|
|
80
79
|
|
|
81
80
|
// src/components/blocks/blocks.tsx
|
|
82
81
|
import { useContext, Show as Show5, For as For3 } from "solid-js";
|
|
@@ -1004,7 +1003,7 @@ var getSizesForBreakpoints = ({
|
|
|
1004
1003
|
|
|
1005
1004
|
// src/components/inlined-styles.tsx
|
|
1006
1005
|
function InlinedStyles(props) {
|
|
1007
|
-
return
|
|
1006
|
+
return <><style innerHTML={props.styles} data-id={props.id} /></>;
|
|
1008
1007
|
}
|
|
1009
1008
|
var Inlined_styles_default = InlinedStyles;
|
|
1010
1009
|
|
|
@@ -1027,7 +1026,7 @@ function BlockStyles(props) {
|
|
|
1027
1026
|
}
|
|
1028
1027
|
return true;
|
|
1029
1028
|
});
|
|
1030
|
-
const
|
|
1029
|
+
const css = createMemo(() => {
|
|
1031
1030
|
const processedBlock = getProcessedBlock({
|
|
1032
1031
|
block: props.block,
|
|
1033
1032
|
localState: props.context.localState,
|
|
@@ -1090,7 +1089,7 @@ function BlockStyles(props) {
|
|
|
1090
1089
|
hoverStylesClass
|
|
1091
1090
|
].join(" ");
|
|
1092
1091
|
});
|
|
1093
|
-
return
|
|
1092
|
+
return <><Show2 when={TARGET !== "reactNative" && css() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css()} /></Show2></>;
|
|
1094
1093
|
}
|
|
1095
1094
|
var Block_styles_default = BlockStyles;
|
|
1096
1095
|
|
|
@@ -1173,7 +1172,7 @@ function getBlockProperties({
|
|
|
1173
1172
|
|
|
1174
1173
|
// src/components/block/components/block-wrapper.tsx
|
|
1175
1174
|
function BlockWrapper(props) {
|
|
1176
|
-
return
|
|
1175
|
+
return <><Dynamic_renderer_default
|
|
1177
1176
|
TagName={props.Wrapper}
|
|
1178
1177
|
attributes={getBlockProperties({
|
|
1179
1178
|
block: props.block,
|
|
@@ -1187,7 +1186,7 @@ function BlockWrapper(props) {
|
|
|
1187
1186
|
context: props.context.context,
|
|
1188
1187
|
stripPrefix: true
|
|
1189
1188
|
})}
|
|
1190
|
-
>{props.children}</Dynamic_renderer_default
|
|
1189
|
+
>{props.children}</Dynamic_renderer_default></>;
|
|
1191
1190
|
}
|
|
1192
1191
|
var Block_wrapper_default = BlockWrapper;
|
|
1193
1192
|
|
|
@@ -1214,11 +1213,11 @@ function InteractiveElement(props) {
|
|
|
1214
1213
|
})
|
|
1215
1214
|
} : {};
|
|
1216
1215
|
});
|
|
1217
|
-
return
|
|
1216
|
+
return <><Dynamic2
|
|
1218
1217
|
{...props.wrapperProps}
|
|
1219
1218
|
attributes={attributes()}
|
|
1220
1219
|
component={props.Wrapper}
|
|
1221
|
-
>{props.children}</Dynamic2
|
|
1220
|
+
>{props.children}</Dynamic2></>;
|
|
1222
1221
|
}
|
|
1223
1222
|
var interactive_element_default = InteractiveElement;
|
|
1224
1223
|
|
|
@@ -1260,7 +1259,7 @@ function ComponentRef(props) {
|
|
|
1260
1259
|
const [Wrapper, setWrapper] = createSignal3(
|
|
1261
1260
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
1262
1261
|
);
|
|
1263
|
-
return
|
|
1262
|
+
return <><Show3 when={props.componentRef}><Dynamic3
|
|
1264
1263
|
{...getWrapperProps({
|
|
1265
1264
|
componentOptions: props.componentOptions,
|
|
1266
1265
|
builderBlock: props.builderBlock,
|
|
@@ -1281,7 +1280,7 @@ function ComponentRef(props) {
|
|
|
1281
1280
|
registeredComponents={props.registeredComponents}
|
|
1282
1281
|
linkComponent={props.linkComponent}
|
|
1283
1282
|
/>;
|
|
1284
|
-
}}</For></Dynamic3></Show3
|
|
1283
|
+
}}</For></Dynamic3></Show3></>;
|
|
1285
1284
|
}
|
|
1286
1285
|
var Component_ref_default = ComponentRef;
|
|
1287
1286
|
|
|
@@ -1289,12 +1288,12 @@ var Component_ref_default = ComponentRef;
|
|
|
1289
1288
|
import { createSignal as createSignal4 } from "solid-js";
|
|
1290
1289
|
function RepeatedBlock(props) {
|
|
1291
1290
|
const [store, setStore] = createSignal4(props.repeatContext);
|
|
1292
|
-
return
|
|
1291
|
+
return <><builder_context_default.Provider value={store()}><Block_default
|
|
1293
1292
|
block={props.block}
|
|
1294
1293
|
context={store()}
|
|
1295
1294
|
registeredComponents={props.registeredComponents}
|
|
1296
1295
|
linkComponent={props.linkComponent}
|
|
1297
|
-
/></builder_context_default.Provider
|
|
1296
|
+
/></builder_context_default.Provider></>;
|
|
1298
1297
|
}
|
|
1299
1298
|
var Repeated_block_default = RepeatedBlock;
|
|
1300
1299
|
|
|
@@ -1378,7 +1377,7 @@ function Block(props) {
|
|
|
1378
1377
|
);
|
|
1379
1378
|
}
|
|
1380
1379
|
});
|
|
1381
|
-
return
|
|
1380
|
+
return <><Show4 when={canShowBlock()}>
|
|
1382
1381
|
<Block_styles_default block={props.block} context={props.context} />
|
|
1383
1382
|
<Show4
|
|
1384
1383
|
fallback={<Component_ref_default
|
|
@@ -1432,14 +1431,13 @@ function Block(props) {
|
|
|
1432
1431
|
/>;
|
|
1433
1432
|
}}</For2>
|
|
1434
1433
|
</Block_wrapper_default></Show4></Show4>
|
|
1435
|
-
</Show4
|
|
1434
|
+
</Show4></>;
|
|
1436
1435
|
}
|
|
1437
1436
|
var Block_default = Block;
|
|
1438
1437
|
|
|
1439
1438
|
// src/components/blocks/blocks-wrapper.tsx
|
|
1440
1439
|
import { createMemo as createMemo6 } from "solid-js";
|
|
1441
1440
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
1442
|
-
import { css } from "solid-styled-components";
|
|
1443
1441
|
function BlocksWrapper(props) {
|
|
1444
1442
|
const className = createMemo6(() => {
|
|
1445
1443
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
@@ -1472,22 +1470,25 @@ function BlocksWrapper(props) {
|
|
|
1472
1470
|
);
|
|
1473
1471
|
}
|
|
1474
1472
|
}
|
|
1475
|
-
return
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
{
|
|
1489
|
-
|
|
1490
|
-
|
|
1473
|
+
return <>
|
|
1474
|
+
<Dynamic4
|
|
1475
|
+
class={className() + " dynamic-1bb6a3a2"}
|
|
1476
|
+
builder-path={props.path}
|
|
1477
|
+
builder-parent-id={props.parent}
|
|
1478
|
+
{...{}}
|
|
1479
|
+
style={props.styleProp}
|
|
1480
|
+
onClick={(event) => onClick()}
|
|
1481
|
+
onMouseEnter={(event) => onMouseEnter()}
|
|
1482
|
+
onKeyPress={(event) => onClick()}
|
|
1483
|
+
{...props.BlocksWrapperProps}
|
|
1484
|
+
component={props.BlocksWrapper}
|
|
1485
|
+
>{props.children}</Dynamic4>
|
|
1486
|
+
<style>{`.dynamic-1bb6a3a2 {
|
|
1487
|
+
display: flex;
|
|
1488
|
+
flex-direction: column;
|
|
1489
|
+
align-items: stretch;
|
|
1490
|
+
}`}</style>
|
|
1491
|
+
</>;
|
|
1491
1492
|
}
|
|
1492
1493
|
var Blocks_wrapper_default = BlocksWrapper;
|
|
1493
1494
|
|
|
@@ -1495,7 +1496,7 @@ var Blocks_wrapper_default = BlocksWrapper;
|
|
|
1495
1496
|
function Blocks(props) {
|
|
1496
1497
|
const builderContext = useContext(builder_context_default);
|
|
1497
1498
|
const componentsContext = useContext(components_context_default);
|
|
1498
|
-
return
|
|
1499
|
+
return <><Blocks_wrapper_default
|
|
1499
1500
|
blocks={props.blocks}
|
|
1500
1501
|
parent={props.parent}
|
|
1501
1502
|
path={props.path}
|
|
@@ -1511,7 +1512,7 @@ function Blocks(props) {
|
|
|
1511
1512
|
context={props.context || builderContext}
|
|
1512
1513
|
registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
|
|
1513
1514
|
/>;
|
|
1514
|
-
}}</For3></Show5></Blocks_wrapper_default
|
|
1515
|
+
}}</For3></Show5></Blocks_wrapper_default></>;
|
|
1515
1516
|
}
|
|
1516
1517
|
var Blocks_default = Blocks;
|
|
1517
1518
|
|
|
@@ -1638,50 +1639,52 @@ function Columns(props) {
|
|
|
1638
1639
|
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
1639
1640
|
};
|
|
1640
1641
|
}
|
|
1641
|
-
return
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1642
|
+
return <>
|
|
1643
|
+
<div
|
|
1644
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-f2f53158"}
|
|
1645
|
+
style={columnsCssVars()}
|
|
1646
|
+
{...{}}
|
|
1647
|
+
>
|
|
1648
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1649
|
+
id="builderio-columns"
|
|
1650
|
+
styles={columnsStyles()}
|
|
1651
|
+
/></Show6>
|
|
1652
|
+
<For4 each={props.columns}>{(column, _index) => {
|
|
1653
|
+
const index = _index();
|
|
1654
|
+
return <Dynamic_renderer_default
|
|
1655
|
+
key={index}
|
|
1656
|
+
TagName={getTagName(column)}
|
|
1657
|
+
actionAttributes={{}}
|
|
1658
|
+
attributes={getAttributes(column, index)}
|
|
1659
|
+
><Blocks_default
|
|
1660
|
+
path={`component.options.columns.${index}.blocks`}
|
|
1661
|
+
parent={props.builderBlock.id}
|
|
1662
|
+
styleProp={{
|
|
1663
|
+
flexGrow: "1"
|
|
1664
|
+
}}
|
|
1665
|
+
context={props.builderContext}
|
|
1666
|
+
registeredComponents={props.builderComponents}
|
|
1667
|
+
linkComponent={props.builderLinkComponent}
|
|
1668
|
+
blocks={column.blocks}
|
|
1669
|
+
/></Dynamic_renderer_default>;
|
|
1670
|
+
}}</For4>
|
|
1671
|
+
</div>
|
|
1672
|
+
<style>{`.div-f2f53158 {
|
|
1673
|
+
display: flex;
|
|
1674
|
+
line-height: normal;
|
|
1675
|
+
}`}</style>
|
|
1676
|
+
</>;
|
|
1673
1677
|
}
|
|
1674
1678
|
var columns_default = Columns;
|
|
1675
1679
|
|
|
1676
1680
|
// src/blocks/fragment/fragment.tsx
|
|
1677
1681
|
function FragmentComponent(props) {
|
|
1678
|
-
return
|
|
1682
|
+
return <><span>{props.children}</span></>;
|
|
1679
1683
|
}
|
|
1680
1684
|
var fragment_default = FragmentComponent;
|
|
1681
1685
|
|
|
1682
1686
|
// src/blocks/image/image.tsx
|
|
1683
1687
|
import { Show as Show7, createMemo as createMemo8 } from "solid-js";
|
|
1684
|
-
import { css as css3 } from "solid-styled-components";
|
|
1685
1688
|
|
|
1686
1689
|
// src/blocks/image/image.helpers.ts
|
|
1687
1690
|
function removeProtocol(path) {
|
|
@@ -1769,59 +1772,60 @@ function Image(props) {
|
|
|
1769
1772
|
return out;
|
|
1770
1773
|
});
|
|
1771
1774
|
return <>
|
|
1772
|
-
|
|
1773
|
-
<
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1775
|
+
<>
|
|
1776
|
+
<picture>
|
|
1777
|
+
<Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
|
|
1778
|
+
<img
|
|
1779
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " img-54b38751"}
|
|
1780
|
+
loading={props.highPriority ? "eager" : "lazy"}
|
|
1781
|
+
fetchpriority={props.highPriority ? "high" : "auto"}
|
|
1782
|
+
alt={props.altText}
|
|
1783
|
+
role={props.altText ? void 0 : "presentation"}
|
|
1784
|
+
style={{
|
|
1785
|
+
"object-position": props.backgroundPosition || "center",
|
|
1786
|
+
"object-fit": props.backgroundSize || "cover",
|
|
1787
|
+
...aspectRatioCss()
|
|
1788
|
+
}}
|
|
1789
|
+
src={props.image}
|
|
1790
|
+
srcset={srcSetToUse()}
|
|
1791
|
+
sizes={props.sizes}
|
|
1792
|
+
/>
|
|
1793
|
+
</picture>
|
|
1794
|
+
<Show7
|
|
1795
|
+
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
1796
|
+
><div
|
|
1797
|
+
class="builder-image-sizer div-54b38751"
|
|
1783
1798
|
style={{
|
|
1784
|
-
"
|
|
1785
|
-
"object-fit": props.backgroundSize || "cover",
|
|
1786
|
-
...aspectRatioCss()
|
|
1799
|
+
"padding-top": props.aspectRatio * 100 + "%"
|
|
1787
1800
|
}}
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
flexDirection: "column",
|
|
1810
|
-
alignItems: "stretch",
|
|
1811
|
-
position: "absolute",
|
|
1812
|
-
top: "0",
|
|
1813
|
-
left: "0",
|
|
1814
|
-
width: "100%",
|
|
1815
|
-
height: "100%"
|
|
1816
|
-
})}
|
|
1817
|
-
>{props.children}</div></Show7>
|
|
1801
|
+
/></Show7>
|
|
1802
|
+
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
1803
|
+
<Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-54b38751-2">{props.children}</div></Show7>
|
|
1804
|
+
</>
|
|
1805
|
+
<style>{`.img-54b38751 {
|
|
1806
|
+
opacity: 1;
|
|
1807
|
+
transition: opacity 0.2s ease-in-out;
|
|
1808
|
+
}.div-54b38751 {
|
|
1809
|
+
width: 100%;
|
|
1810
|
+
pointer-events: none;
|
|
1811
|
+
font-size: 0;
|
|
1812
|
+
}.div-54b38751-2 {
|
|
1813
|
+
display: flex;
|
|
1814
|
+
flex-direction: column;
|
|
1815
|
+
align-items: stretch;
|
|
1816
|
+
position: absolute;
|
|
1817
|
+
top: 0;
|
|
1818
|
+
left: 0;
|
|
1819
|
+
width: 100%;
|
|
1820
|
+
height: 100%;
|
|
1821
|
+
}`}</style>
|
|
1818
1822
|
</>;
|
|
1819
1823
|
}
|
|
1820
1824
|
var image_default = Image;
|
|
1821
1825
|
|
|
1822
1826
|
// src/blocks/section/section.tsx
|
|
1823
1827
|
function SectionComponent(props) {
|
|
1824
|
-
return
|
|
1828
|
+
return <><section
|
|
1825
1829
|
{...{}}
|
|
1826
1830
|
{...props.attributes}
|
|
1827
1831
|
style={{
|
|
@@ -1836,7 +1840,7 @@ function SectionComponent(props) {
|
|
|
1836
1840
|
"margin-left": "auto",
|
|
1837
1841
|
"margin-right": "auto"
|
|
1838
1842
|
}}
|
|
1839
|
-
>{props.children}</section
|
|
1843
|
+
>{props.children}</section></>;
|
|
1840
1844
|
}
|
|
1841
1845
|
var section_default = SectionComponent;
|
|
1842
1846
|
|
|
@@ -2278,7 +2282,7 @@ function Accordion(props) {
|
|
|
2278
2282
|
setOpen(onlyOneAtATime() ? [index] : open().concat(index));
|
|
2279
2283
|
}
|
|
2280
2284
|
}
|
|
2281
|
-
return
|
|
2285
|
+
return <><div class="builder-accordion" style={accordionStyles()}><For5 each={props.items}>{(item, _index) => {
|
|
2282
2286
|
const index = _index();
|
|
2283
2287
|
return <>
|
|
2284
2288
|
<div
|
|
@@ -2312,7 +2316,7 @@ function Accordion(props) {
|
|
|
2312
2316
|
linkComponent={props.builderLinkComponent}
|
|
2313
2317
|
/></div></Show8>
|
|
2314
2318
|
</>;
|
|
2315
|
-
}}</For5></div
|
|
2319
|
+
}}</For5></div></>;
|
|
2316
2320
|
}
|
|
2317
2321
|
var accordion_default = Accordion;
|
|
2318
2322
|
|
|
@@ -2597,7 +2601,7 @@ var componentInfo5 = {
|
|
|
2597
2601
|
name: "image",
|
|
2598
2602
|
type: "file",
|
|
2599
2603
|
bubble: true,
|
|
2600
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
2604
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
|
|
2601
2605
|
required: true,
|
|
2602
2606
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
2603
2607
|
onChange: (options) => {
|
|
@@ -2769,7 +2773,7 @@ var componentInfo7 = {
|
|
|
2769
2773
|
|
|
2770
2774
|
// src/blocks/slot/slot.tsx
|
|
2771
2775
|
function Slot(props) {
|
|
2772
|
-
return
|
|
2776
|
+
return <><div
|
|
2773
2777
|
style={{
|
|
2774
2778
|
"pointer-events": "auto"
|
|
2775
2779
|
}}
|
|
@@ -2781,7 +2785,7 @@ function Slot(props) {
|
|
|
2781
2785
|
path={`symbol.data.${props.name}`}
|
|
2782
2786
|
context={props.builderContext}
|
|
2783
2787
|
blocks={props.builderContext.rootState?.[props.name]}
|
|
2784
|
-
/></div
|
|
2788
|
+
/></div></>;
|
|
2785
2789
|
}
|
|
2786
2790
|
var slot_default = Slot;
|
|
2787
2791
|
|
|
@@ -2977,7 +2981,7 @@ function Tabs(props) {
|
|
|
2977
2981
|
setActiveTab(index);
|
|
2978
2982
|
}
|
|
2979
2983
|
}
|
|
2980
|
-
return
|
|
2984
|
+
return <><div>
|
|
2981
2985
|
<div
|
|
2982
2986
|
class="builder-tabs-wrap"
|
|
2983
2987
|
style={{
|
|
@@ -3012,7 +3016,7 @@ function Tabs(props) {
|
|
|
3012
3016
|
registeredComponents={props.builderComponents}
|
|
3013
3017
|
linkComponent={props.builderLinkComponent}
|
|
3014
3018
|
/></div></Show9>
|
|
3015
|
-
</div
|
|
3019
|
+
</div></>;
|
|
3016
3020
|
}
|
|
3017
3021
|
var tabs_default = Tabs;
|
|
3018
3022
|
|
|
@@ -3039,13 +3043,13 @@ var componentInfo10 = {
|
|
|
3039
3043
|
|
|
3040
3044
|
// src/blocks/text/text.tsx
|
|
3041
3045
|
function Text(props) {
|
|
3042
|
-
return
|
|
3046
|
+
return <><div
|
|
3043
3047
|
class="builder-text"
|
|
3044
3048
|
innerHTML={props.text?.toString() || ""}
|
|
3045
3049
|
style={{
|
|
3046
3050
|
outline: "none"
|
|
3047
3051
|
}}
|
|
3048
|
-
|
|
3052
|
+
/></>;
|
|
3049
3053
|
}
|
|
3050
3054
|
var text_default = Text;
|
|
3051
3055
|
|
|
@@ -3113,11 +3117,11 @@ function CustomCode(props) {
|
|
|
3113
3117
|
}
|
|
3114
3118
|
}
|
|
3115
3119
|
});
|
|
3116
|
-
return
|
|
3120
|
+
return <><div
|
|
3117
3121
|
class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
|
|
3118
3122
|
ref={elementRef}
|
|
3119
3123
|
innerHTML={props.code}
|
|
3120
|
-
|
|
3124
|
+
/></>;
|
|
3121
3125
|
}
|
|
3122
3126
|
var custom_code_default = CustomCode;
|
|
3123
3127
|
|
|
@@ -3135,7 +3139,7 @@ var componentInfo12 = {
|
|
|
3135
3139
|
const url = options.get("url");
|
|
3136
3140
|
if (url) {
|
|
3137
3141
|
options.set("content", "Loading...");
|
|
3138
|
-
const apiKey =
|
|
3142
|
+
const apiKey = _iframelyApiKey;
|
|
3139
3143
|
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
|
|
3140
3144
|
if (options.get("url") === url) {
|
|
3141
3145
|
if (data.html) {
|
|
@@ -3205,7 +3209,7 @@ function Embed(props) {
|
|
|
3205
3209
|
createEffect(
|
|
3206
3210
|
on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
|
|
3207
3211
|
);
|
|
3208
|
-
return
|
|
3212
|
+
return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
|
|
3209
3213
|
}
|
|
3210
3214
|
var embed_default = Embed;
|
|
3211
3215
|
|
|
@@ -3445,7 +3449,6 @@ var componentInfo13 = {
|
|
|
3445
3449
|
|
|
3446
3450
|
// src/blocks/form/form/form.tsx
|
|
3447
3451
|
import { Show as Show10, For as For7, createSignal as createSignal13 } from "solid-js";
|
|
3448
|
-
import { css as css4 } from "solid-styled-components";
|
|
3449
3452
|
|
|
3450
3453
|
// src/functions/get-env.ts
|
|
3451
3454
|
var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
|
|
@@ -3648,50 +3651,51 @@ function FormComponent(props) {
|
|
|
3648
3651
|
}
|
|
3649
3652
|
}
|
|
3650
3653
|
let formRef;
|
|
3651
|
-
return
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3654
|
+
return <>
|
|
3655
|
+
<form
|
|
3656
|
+
validate={props.validate}
|
|
3657
|
+
ref={formRef}
|
|
3658
|
+
action={!props.sendWithJs && props.action}
|
|
3659
|
+
method={props.method}
|
|
3660
|
+
name={props.name}
|
|
3661
|
+
onSubmit={(event) => onSubmit(event)}
|
|
3662
|
+
{...{}}
|
|
3663
|
+
{...{}}
|
|
3664
|
+
{...props.attributes}
|
|
3665
|
+
>
|
|
3666
|
+
<Show10 when={props.builderBlock && props.builderBlock.children}><For7 each={props.builderBlock?.children}>{(block, _index) => {
|
|
3667
|
+
const idx = _index();
|
|
3668
|
+
return <Block_default
|
|
3669
|
+
key={`form-block-${idx}`}
|
|
3670
|
+
block={block}
|
|
3671
|
+
context={props.builderContext}
|
|
3672
|
+
registeredComponents={props.builderComponents}
|
|
3673
|
+
linkComponent={props.builderLinkComponent}
|
|
3674
|
+
/>;
|
|
3675
|
+
}}</For7></Show10>
|
|
3676
|
+
<Show10 when={submissionState() === "error"}><Blocks_default
|
|
3677
|
+
path="errorMessage"
|
|
3678
|
+
blocks={props.errorMessage}
|
|
3667
3679
|
context={props.builderContext}
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
})}
|
|
3688
|
-
>{JSON.stringify(responseData(), null, 2)}</pre></Show10>
|
|
3689
|
-
<Show10 when={submissionState() === "success"}><Blocks_default
|
|
3690
|
-
path="successMessage"
|
|
3691
|
-
blocks={props.successMessage}
|
|
3692
|
-
context={props.builderContext}
|
|
3693
|
-
/></Show10>
|
|
3694
|
-
</form>;
|
|
3680
|
+
/></Show10>
|
|
3681
|
+
<Show10 when={submissionState() === "sending"}><Blocks_default
|
|
3682
|
+
path="sendingMessage"
|
|
3683
|
+
blocks={props.sendingMessage}
|
|
3684
|
+
context={props.builderContext}
|
|
3685
|
+
/></Show10>
|
|
3686
|
+
<Show10 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-2e825338">{JSON.stringify(responseData(), null, 2)}</pre></Show10>
|
|
3687
|
+
<Show10 when={submissionState() === "success"}><Blocks_default
|
|
3688
|
+
path="successMessage"
|
|
3689
|
+
blocks={props.successMessage}
|
|
3690
|
+
context={props.builderContext}
|
|
3691
|
+
/></Show10>
|
|
3692
|
+
</form>
|
|
3693
|
+
<style>{`.pre-2e825338 {
|
|
3694
|
+
padding: 10px;
|
|
3695
|
+
color: red;
|
|
3696
|
+
text-align: center;
|
|
3697
|
+
}`}</style>
|
|
3698
|
+
</>;
|
|
3695
3699
|
}
|
|
3696
3700
|
var form_default = FormComponent;
|
|
3697
3701
|
|
|
@@ -3751,7 +3755,7 @@ var componentInfo14 = {
|
|
|
3751
3755
|
|
|
3752
3756
|
// src/blocks/form/input/input.tsx
|
|
3753
3757
|
function FormInputComponent(props) {
|
|
3754
|
-
return
|
|
3758
|
+
return <><input
|
|
3755
3759
|
{...{}}
|
|
3756
3760
|
{...props.attributes}
|
|
3757
3761
|
key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
|
|
@@ -3761,7 +3765,7 @@ function FormInputComponent(props) {
|
|
|
3761
3765
|
value={props.value}
|
|
3762
3766
|
defaultValue={props.defaultValue}
|
|
3763
3767
|
required={props.required}
|
|
3764
|
-
|
|
3768
|
+
/></>;
|
|
3765
3769
|
}
|
|
3766
3770
|
var input_default = FormInputComponent;
|
|
3767
3771
|
|
|
@@ -3813,7 +3817,7 @@ var componentInfo15 = {
|
|
|
3813
3817
|
// src/blocks/form/select/select.tsx
|
|
3814
3818
|
import { For as For8 } from "solid-js";
|
|
3815
3819
|
function SelectComponent(props) {
|
|
3816
|
-
return
|
|
3820
|
+
return <><select
|
|
3817
3821
|
{...{}}
|
|
3818
3822
|
{...props.attributes}
|
|
3819
3823
|
value={props.value}
|
|
@@ -3823,7 +3827,7 @@ function SelectComponent(props) {
|
|
|
3823
3827
|
><For8 each={props.options}>{(option, _index) => {
|
|
3824
3828
|
const index = _index();
|
|
3825
3829
|
return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
|
|
3826
|
-
}}</For8></select
|
|
3830
|
+
}}</For8></select></>;
|
|
3827
3831
|
}
|
|
3828
3832
|
var select_default = SelectComponent;
|
|
3829
3833
|
|
|
@@ -3857,7 +3861,7 @@ var componentInfo16 = {
|
|
|
3857
3861
|
|
|
3858
3862
|
// src/blocks/form/submit-button/submit-button.tsx
|
|
3859
3863
|
function SubmitButton(props) {
|
|
3860
|
-
return
|
|
3864
|
+
return <><button type="submit" {...{}} {...props.attributes}>{props.text}</button></>;
|
|
3861
3865
|
}
|
|
3862
3866
|
var submit_button_default = SubmitButton;
|
|
3863
3867
|
|
|
@@ -3880,7 +3884,7 @@ var componentInfo17 = {
|
|
|
3880
3884
|
|
|
3881
3885
|
// src/blocks/img/img.tsx
|
|
3882
3886
|
function ImgComponent(props) {
|
|
3883
|
-
return
|
|
3887
|
+
return <><img
|
|
3884
3888
|
style={{
|
|
3885
3889
|
"object-fit": props.backgroundSize || "cover",
|
|
3886
3890
|
"object-position": props.backgroundPosition || "center"
|
|
@@ -3890,7 +3894,7 @@ function ImgComponent(props) {
|
|
|
3890
3894
|
src={props.imgSrc || props.image}
|
|
3891
3895
|
{...{}}
|
|
3892
3896
|
{...props.attributes}
|
|
3893
|
-
|
|
3897
|
+
/></>;
|
|
3894
3898
|
}
|
|
3895
3899
|
var img_default = ImgComponent;
|
|
3896
3900
|
|
|
@@ -4005,7 +4009,7 @@ function Video(props) {
|
|
|
4005
4009
|
...videoProps()
|
|
4006
4010
|
};
|
|
4007
4011
|
});
|
|
4008
|
-
return
|
|
4012
|
+
return <><div
|
|
4009
4013
|
style={{
|
|
4010
4014
|
position: "relative"
|
|
4011
4015
|
}}
|
|
@@ -4061,7 +4065,7 @@ function Video(props) {
|
|
|
4061
4065
|
height: "100%"
|
|
4062
4066
|
}}
|
|
4063
4067
|
>{props.children}</div></Show11>
|
|
4064
|
-
</div
|
|
4068
|
+
</div></>;
|
|
4065
4069
|
}
|
|
4066
4070
|
var video_default = Video;
|
|
4067
4071
|
|
|
@@ -4195,7 +4199,7 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4195
4199
|
|
|
4196
4200
|
// src/components/inlined-script.tsx
|
|
4197
4201
|
function InlinedScript(props) {
|
|
4198
|
-
return
|
|
4202
|
+
return <><script innerHTML={props.scriptStr} data-id={props.id} /></>;
|
|
4199
4203
|
}
|
|
4200
4204
|
var Inlined_script_default = InlinedScript;
|
|
4201
4205
|
|
|
@@ -4701,12 +4705,15 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
4701
4705
|
// src/functions/is-from-trusted-host.ts
|
|
4702
4706
|
var DEFAULT_TRUSTED_HOSTS = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
4703
4707
|
function isFromTrustedHost(trustedHosts, e) {
|
|
4708
|
+
if (!e.origin.startsWith("http") && !e.origin.startsWith("https")) {
|
|
4709
|
+
return false;
|
|
4710
|
+
}
|
|
4704
4711
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
4705
4712
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
4706
4713
|
}
|
|
4707
4714
|
|
|
4708
4715
|
// src/constants/sdk-version.ts
|
|
4709
|
-
var SDK_VERSION = "1.0.
|
|
4716
|
+
var SDK_VERSION = "1.0.35";
|
|
4710
4717
|
|
|
4711
4718
|
// src/functions/register.ts
|
|
4712
4719
|
var registry = {};
|
|
@@ -5271,7 +5278,7 @@ function EnableEditor(props) {
|
|
|
5271
5278
|
}
|
|
5272
5279
|
}
|
|
5273
5280
|
createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
5274
|
-
return
|
|
5281
|
+
return <><builder_context_default.Provider value={props.builderContextSignal}><Show12 when={props.builderContextSignal.content}><Dynamic5
|
|
5275
5282
|
class={getWrapperClassName(
|
|
5276
5283
|
props.content?.testVariationId || props.content?.id
|
|
5277
5284
|
)}
|
|
@@ -5284,7 +5291,7 @@ function EnableEditor(props) {
|
|
|
5284
5291
|
{...showContentProps()}
|
|
5285
5292
|
{...props.contentWrapperProps}
|
|
5286
5293
|
component={ContentWrapper()}
|
|
5287
|
-
>{props.children}</Dynamic5></Show12></builder_context_default.Provider
|
|
5294
|
+
>{props.children}</Dynamic5></Show12></builder_context_default.Provider></>;
|
|
5288
5295
|
}
|
|
5289
5296
|
var Enable_editor_default = EnableEditor;
|
|
5290
5297
|
|
|
@@ -5303,10 +5310,10 @@ ${getFontCss({
|
|
|
5303
5310
|
${getDefaultStyles(props.isNestedRender)}
|
|
5304
5311
|
`.trim()
|
|
5305
5312
|
);
|
|
5306
|
-
return
|
|
5313
|
+
return <><Inlined_styles_default
|
|
5307
5314
|
id="builderio-content"
|
|
5308
5315
|
styles={injectedStyles()}
|
|
5309
|
-
|
|
5316
|
+
/></>;
|
|
5310
5317
|
}
|
|
5311
5318
|
var Styles_default = ContentStyles;
|
|
5312
5319
|
|
|
@@ -5407,7 +5414,7 @@ function ContentComponent(props) {
|
|
|
5407
5414
|
rootState: newRootState
|
|
5408
5415
|
}));
|
|
5409
5416
|
}
|
|
5410
|
-
return
|
|
5417
|
+
return <><components_context_default.Provider
|
|
5411
5418
|
value={{
|
|
5412
5419
|
registeredComponents: registeredComponents()
|
|
5413
5420
|
}}
|
|
@@ -5445,7 +5452,7 @@ function ContentComponent(props) {
|
|
|
5445
5452
|
registeredComponents={registeredComponents()}
|
|
5446
5453
|
linkComponent={props.linkComponent}
|
|
5447
5454
|
/>
|
|
5448
|
-
</Enable_editor_default></components_context_default.Provider
|
|
5455
|
+
</Enable_editor_default></components_context_default.Provider></>;
|
|
5449
5456
|
}
|
|
5450
5457
|
var Content_default = ContentComponent;
|
|
5451
5458
|
|
|
@@ -5481,7 +5488,7 @@ function ContentVariants(props) {
|
|
|
5481
5488
|
onMount4(() => {
|
|
5482
5489
|
setShouldRenderVariants(false);
|
|
5483
5490
|
});
|
|
5484
|
-
return
|
|
5491
|
+
return <><>
|
|
5485
5492
|
<Show14 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
5486
5493
|
id="builderio-init-variants-fns"
|
|
5487
5494
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
@@ -5543,7 +5550,7 @@ function ContentVariants(props) {
|
|
|
5543
5550
|
contentWrapperProps={props.contentWrapperProps}
|
|
5544
5551
|
trustedHosts={props.trustedHosts}
|
|
5545
5552
|
/>
|
|
5546
|
-
|
|
5553
|
+
</></>;
|
|
5547
5554
|
}
|
|
5548
5555
|
var Content_variants_default = ContentVariants;
|
|
5549
5556
|
|
|
@@ -5607,7 +5614,7 @@ function Symbol(props) {
|
|
|
5607
5614
|
setContent();
|
|
5608
5615
|
}
|
|
5609
5616
|
createEffect3(on3(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
5610
|
-
return
|
|
5617
|
+
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
5611
5618
|
isNestedRender={true}
|
|
5612
5619
|
apiVersion={props.builderContext.apiVersion}
|
|
5613
5620
|
apiKey={props.builderContext.apiKey}
|
|
@@ -5627,7 +5634,7 @@ function Symbol(props) {
|
|
|
5627
5634
|
linkComponent={props.builderLinkComponent}
|
|
5628
5635
|
blocksWrapper={blocksWrapper()}
|
|
5629
5636
|
contentWrapper={contentWrapper()}
|
|
5630
|
-
/></div
|
|
5637
|
+
/></div></>;
|
|
5631
5638
|
}
|
|
5632
5639
|
var symbol_default = Symbol;
|
|
5633
5640
|
|