@builder.io/sdk-solid 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/lib/browser/dev.js +458 -179
- package/lib/browser/dev.jsx +463 -228
- package/lib/browser/index.js +458 -179
- package/lib/browser/index.jsx +463 -228
- package/lib/edge/dev.js +458 -179
- package/lib/edge/dev.jsx +463 -228
- package/lib/edge/index.js +458 -179
- package/lib/edge/index.jsx +463 -228
- package/lib/node/dev.js +458 -179
- package/lib/node/dev.jsx +463 -228
- package/lib/node/index.js +458 -179
- package/lib/node/index.jsx +463 -228
- package/package.json +1 -1
package/lib/node/dev.jsx
CHANGED
|
@@ -46,14 +46,15 @@ var getClassPropName = () => {
|
|
|
46
46
|
case "vue":
|
|
47
47
|
case "solid":
|
|
48
48
|
case "qwik":
|
|
49
|
+
case "angular":
|
|
49
50
|
return "class";
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
// src/blocks/button/button.tsx
|
|
54
55
|
function Button(props) {
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
function attrs() {
|
|
57
|
+
return {
|
|
57
58
|
...props.attributes,
|
|
58
59
|
[getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
|
|
59
60
|
...props.link ? {
|
|
@@ -63,7 +64,10 @@ function Button(props) {
|
|
|
63
64
|
} : {
|
|
64
65
|
role: "button"
|
|
65
66
|
}
|
|
66
|
-
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return <Dynamic_renderer_default
|
|
70
|
+
attributes={attrs()}
|
|
67
71
|
TagName={props.link ? props.builderLinkComponent || "a" : "button"}
|
|
68
72
|
actionAttributes={{}}
|
|
69
73
|
>{props.text}</Dynamic_renderer_default>;
|
|
@@ -71,7 +75,7 @@ function Button(props) {
|
|
|
71
75
|
var button_default = Button;
|
|
72
76
|
|
|
73
77
|
// src/blocks/columns/columns.tsx
|
|
74
|
-
import { Show as Show6, For as For4, createSignal as
|
|
78
|
+
import { Show as Show6, For as For4, createSignal as createSignal7 } from "solid-js";
|
|
75
79
|
import { css as css2 } from "solid-styled-components";
|
|
76
80
|
|
|
77
81
|
// src/components/blocks/blocks.tsx
|
|
@@ -99,7 +103,7 @@ import { createContext as createContext2 } from "solid-js";
|
|
|
99
103
|
var components_context_default = createContext2({ registeredComponents: {} });
|
|
100
104
|
|
|
101
105
|
// src/components/block/block.tsx
|
|
102
|
-
import { Show as Show4, For as For2, onMount, createMemo as
|
|
106
|
+
import { Show as Show4, For as For2, onMount, createMemo as createMemo5 } from "solid-js";
|
|
103
107
|
|
|
104
108
|
// src/functions/get-block-component-options.ts
|
|
105
109
|
function getBlockComponentOptions(block) {
|
|
@@ -516,7 +520,6 @@ function evaluate({
|
|
|
516
520
|
enableCache
|
|
517
521
|
}) {
|
|
518
522
|
if (code === "") {
|
|
519
|
-
logger.warn("Skipping evaluation of empty code block.");
|
|
520
523
|
return void 0;
|
|
521
524
|
}
|
|
522
525
|
const args = {
|
|
@@ -845,6 +848,7 @@ function mapStyleObjToStrIfNeeded(style) {
|
|
|
845
848
|
case "svelte":
|
|
846
849
|
case "vue":
|
|
847
850
|
case "solid":
|
|
851
|
+
case "angular":
|
|
848
852
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
849
853
|
case "qwik":
|
|
850
854
|
case "reactNative":
|
|
@@ -920,6 +924,12 @@ var getRepeatItemData = ({
|
|
|
920
924
|
}));
|
|
921
925
|
return repeatArray;
|
|
922
926
|
};
|
|
927
|
+
var shouldPassLinkComponent = (blockName) => {
|
|
928
|
+
return blockName && ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(blockName);
|
|
929
|
+
};
|
|
930
|
+
var shouldPassRegisteredComponents = (blockName) => {
|
|
931
|
+
return blockName && ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(blockName);
|
|
932
|
+
};
|
|
923
933
|
|
|
924
934
|
// src/components/block/components/block-styles.tsx
|
|
925
935
|
import { Show as Show2, createMemo } from "solid-js";
|
|
@@ -1163,15 +1173,15 @@ function BlockWrapper(props) {
|
|
|
1163
1173
|
var Block_wrapper_default = BlockWrapper;
|
|
1164
1174
|
|
|
1165
1175
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
1166
|
-
import { Show as Show3, For, createSignal as
|
|
1176
|
+
import { Show as Show3, For, createSignal as createSignal3 } from "solid-js";
|
|
1167
1177
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
1168
1178
|
|
|
1169
1179
|
// src/components/block/components/interactive-element.tsx
|
|
1180
|
+
import { createMemo as createMemo2 } from "solid-js";
|
|
1170
1181
|
import { Dynamic as Dynamic2 } from "solid-js/web";
|
|
1171
1182
|
function InteractiveElement(props) {
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
attributes={props.includeBlockProps ? {
|
|
1183
|
+
const attributes = createMemo2(() => {
|
|
1184
|
+
return props.includeBlockProps ? {
|
|
1175
1185
|
...getBlockProperties({
|
|
1176
1186
|
block: props.block,
|
|
1177
1187
|
context: props.context
|
|
@@ -1183,7 +1193,11 @@ function InteractiveElement(props) {
|
|
|
1183
1193
|
localState: props.context.localState,
|
|
1184
1194
|
context: props.context.context
|
|
1185
1195
|
})
|
|
1186
|
-
} : {}
|
|
1196
|
+
} : {};
|
|
1197
|
+
});
|
|
1198
|
+
return <Dynamic2
|
|
1199
|
+
{...props.wrapperProps}
|
|
1200
|
+
attributes={attributes()}
|
|
1187
1201
|
component={props.Wrapper}
|
|
1188
1202
|
>{props.children}</Dynamic2>;
|
|
1189
1203
|
}
|
|
@@ -1224,7 +1238,7 @@ var getWrapperProps = ({
|
|
|
1224
1238
|
|
|
1225
1239
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
1226
1240
|
function ComponentRef(props) {
|
|
1227
|
-
const [Wrapper, setWrapper] =
|
|
1241
|
+
const [Wrapper, setWrapper] = createSignal3(
|
|
1228
1242
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
1229
1243
|
);
|
|
1230
1244
|
return <Show3 when={props.componentRef}><Dynamic3
|
|
@@ -1253,9 +1267,9 @@ function ComponentRef(props) {
|
|
|
1253
1267
|
var Component_ref_default = ComponentRef;
|
|
1254
1268
|
|
|
1255
1269
|
// src/components/block/components/repeated-block.tsx
|
|
1256
|
-
import { createSignal as
|
|
1270
|
+
import { createSignal as createSignal4 } from "solid-js";
|
|
1257
1271
|
function RepeatedBlock(props) {
|
|
1258
|
-
const [store, setStore] =
|
|
1272
|
+
const [store, setStore] = createSignal4(props.repeatContext);
|
|
1259
1273
|
return <builder_context_default.Provider value={store()}><Block_default
|
|
1260
1274
|
block={props.block}
|
|
1261
1275
|
context={store()}
|
|
@@ -1267,20 +1281,20 @@ var Repeated_block_default = RepeatedBlock;
|
|
|
1267
1281
|
|
|
1268
1282
|
// src/components/block/block.tsx
|
|
1269
1283
|
function Block(props) {
|
|
1270
|
-
const blockComponent =
|
|
1284
|
+
const blockComponent = createMemo5(() => {
|
|
1271
1285
|
return getComponent({
|
|
1272
1286
|
block: props.block,
|
|
1273
1287
|
context: props.context,
|
|
1274
1288
|
registeredComponents: props.registeredComponents
|
|
1275
1289
|
});
|
|
1276
1290
|
});
|
|
1277
|
-
const repeatItem =
|
|
1291
|
+
const repeatItem = createMemo5(() => {
|
|
1278
1292
|
return getRepeatItemData({
|
|
1279
1293
|
block: props.block,
|
|
1280
1294
|
context: props.context
|
|
1281
1295
|
});
|
|
1282
1296
|
});
|
|
1283
|
-
const processedBlock =
|
|
1297
|
+
const processedBlock = createMemo5(() => {
|
|
1284
1298
|
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
1285
1299
|
block: props.block,
|
|
1286
1300
|
localState: props.context.localState,
|
|
@@ -1290,14 +1304,14 @@ function Block(props) {
|
|
|
1290
1304
|
shouldEvaluateBindings: true
|
|
1291
1305
|
});
|
|
1292
1306
|
});
|
|
1293
|
-
const Tag =
|
|
1307
|
+
const Tag = createMemo5(() => {
|
|
1294
1308
|
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
1295
1309
|
if (shouldUseLink) {
|
|
1296
1310
|
return props.linkComponent || "a";
|
|
1297
1311
|
}
|
|
1298
1312
|
return props.block.tagName || "div";
|
|
1299
1313
|
});
|
|
1300
|
-
const canShowBlock =
|
|
1314
|
+
const canShowBlock = createMemo5(() => {
|
|
1301
1315
|
if (props.block.repeat?.collection) {
|
|
1302
1316
|
if (repeatItem()?.length)
|
|
1303
1317
|
return true;
|
|
@@ -1307,21 +1321,21 @@ function Block(props) {
|
|
|
1307
1321
|
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
1308
1322
|
return shouldShow && !shouldHide;
|
|
1309
1323
|
});
|
|
1310
|
-
const childrenWithoutParentComponent =
|
|
1324
|
+
const childrenWithoutParentComponent = createMemo5(() => {
|
|
1311
1325
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
1312
1326
|
return shouldRenderChildrenOutsideRef ? processedBlock().children ?? [] : [];
|
|
1313
1327
|
});
|
|
1314
|
-
const componentRefProps =
|
|
1328
|
+
const componentRefProps = createMemo5(() => {
|
|
1315
1329
|
return {
|
|
1316
1330
|
blockChildren: processedBlock().children ?? [],
|
|
1317
1331
|
componentRef: blockComponent()?.component,
|
|
1318
1332
|
componentOptions: {
|
|
1319
1333
|
...getBlockComponentOptions(processedBlock()),
|
|
1320
1334
|
builderContext: props.context,
|
|
1321
|
-
...
|
|
1335
|
+
...shouldPassLinkComponent(blockComponent()?.name) ? {
|
|
1322
1336
|
builderLinkComponent: props.linkComponent
|
|
1323
1337
|
} : {},
|
|
1324
|
-
...
|
|
1338
|
+
...shouldPassRegisteredComponents(blockComponent()?.name) ? {
|
|
1325
1339
|
builderComponents: props.registeredComponents
|
|
1326
1340
|
} : {}
|
|
1327
1341
|
},
|
|
@@ -1405,11 +1419,11 @@ function Block(props) {
|
|
|
1405
1419
|
var Block_default = Block;
|
|
1406
1420
|
|
|
1407
1421
|
// src/components/blocks/blocks-wrapper.tsx
|
|
1408
|
-
import { createMemo as
|
|
1422
|
+
import { createMemo as createMemo6 } from "solid-js";
|
|
1409
1423
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
1410
1424
|
import { css } from "solid-styled-components";
|
|
1411
1425
|
function BlocksWrapper(props) {
|
|
1412
|
-
const className =
|
|
1426
|
+
const className = createMemo6(() => {
|
|
1413
1427
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
1414
1428
|
});
|
|
1415
1429
|
function onClick() {
|
|
@@ -1483,16 +1497,24 @@ function Blocks(props) {
|
|
|
1483
1497
|
}
|
|
1484
1498
|
var Blocks_default = Blocks;
|
|
1485
1499
|
|
|
1500
|
+
// src/blocks/columns/helpers.ts
|
|
1501
|
+
var getColumnsClass = (id) => {
|
|
1502
|
+
return `builder-columns ${id}-breakpoints`;
|
|
1503
|
+
};
|
|
1504
|
+
|
|
1486
1505
|
// src/blocks/columns/columns.tsx
|
|
1487
1506
|
function Columns(props) {
|
|
1488
|
-
const [gutterSize, setGutterSize] =
|
|
1507
|
+
const [gutterSize, setGutterSize] = createSignal7(
|
|
1489
1508
|
typeof props.space === "number" ? props.space || 0 : 20
|
|
1490
1509
|
);
|
|
1491
|
-
const [cols, setCols] =
|
|
1492
|
-
const [stackAt, setStackAt] =
|
|
1493
|
-
const [flexDir, setFlexDir] =
|
|
1510
|
+
const [cols, setCols] = createSignal7(props.columns || []);
|
|
1511
|
+
const [stackAt, setStackAt] = createSignal7(props.stackColumnsAt || "tablet");
|
|
1512
|
+
const [flexDir, setFlexDir] = createSignal7(
|
|
1494
1513
|
props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
1495
1514
|
);
|
|
1515
|
+
function getTagName(column) {
|
|
1516
|
+
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
1517
|
+
}
|
|
1496
1518
|
function getWidth(index) {
|
|
1497
1519
|
return cols()[index]?.width || 100 / cols().length;
|
|
1498
1520
|
}
|
|
@@ -1512,7 +1534,7 @@ function Columns(props) {
|
|
|
1512
1534
|
}) {
|
|
1513
1535
|
return stackAt() === "never" ? desktopStyle : stackedStyle;
|
|
1514
1536
|
}
|
|
1515
|
-
|
|
1537
|
+
function columnsCssVars() {
|
|
1516
1538
|
return {
|
|
1517
1539
|
"--flex-dir": flexDir(),
|
|
1518
1540
|
"--flex-dir-tablet": getTabletStyle({
|
|
@@ -1520,7 +1542,7 @@ function Columns(props) {
|
|
|
1520
1542
|
desktopStyle: "row"
|
|
1521
1543
|
})
|
|
1522
1544
|
};
|
|
1523
|
-
}
|
|
1545
|
+
}
|
|
1524
1546
|
function columnCssVars(index) {
|
|
1525
1547
|
const gutter = index === 0 ? 0 : gutterSize();
|
|
1526
1548
|
const width = getColumnCssWidth(index);
|
|
@@ -1561,7 +1583,7 @@ function Columns(props) {
|
|
|
1561
1583
|
);
|
|
1562
1584
|
return breakpointSizes[size].max;
|
|
1563
1585
|
}
|
|
1564
|
-
|
|
1586
|
+
function columnsStyles() {
|
|
1565
1587
|
return `
|
|
1566
1588
|
@media (max-width: ${getWidthForBreakpointSize("medium")}px) {
|
|
1567
1589
|
.${props.builderBlock.id}-breakpoints {
|
|
@@ -1587,9 +1609,19 @@ function Columns(props) {
|
|
|
1587
1609
|
}
|
|
1588
1610
|
},
|
|
1589
1611
|
`;
|
|
1590
|
-
}
|
|
1612
|
+
}
|
|
1613
|
+
function getAttributes(column, index) {
|
|
1614
|
+
return {
|
|
1615
|
+
...{},
|
|
1616
|
+
...column.link ? {
|
|
1617
|
+
href: column.link
|
|
1618
|
+
} : {},
|
|
1619
|
+
[getClassPropName()]: "builder-column",
|
|
1620
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
1621
|
+
};
|
|
1622
|
+
}
|
|
1591
1623
|
return <div
|
|
1592
|
-
class={
|
|
1624
|
+
class={getColumnsClass(props.builderBlock?.id) + " " + css2({
|
|
1593
1625
|
display: "flex",
|
|
1594
1626
|
lineHeight: "normal"
|
|
1595
1627
|
})}
|
|
@@ -1604,16 +1636,9 @@ function Columns(props) {
|
|
|
1604
1636
|
const index = _index();
|
|
1605
1637
|
return <Dynamic_renderer_default
|
|
1606
1638
|
key={index}
|
|
1607
|
-
TagName={column
|
|
1639
|
+
TagName={getTagName(column)}
|
|
1608
1640
|
actionAttributes={{}}
|
|
1609
|
-
attributes={
|
|
1610
|
-
...{},
|
|
1611
|
-
...column.link ? {
|
|
1612
|
-
href: column.link
|
|
1613
|
-
} : {},
|
|
1614
|
-
[getClassPropName()]: "builder-column",
|
|
1615
|
-
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
1616
|
-
}}
|
|
1641
|
+
attributes={getAttributes(column, index)}
|
|
1617
1642
|
><Blocks_default
|
|
1618
1643
|
path={`component.options.columns.${index}.blocks`}
|
|
1619
1644
|
parent={props.builderBlock.id}
|
|
@@ -1637,7 +1662,7 @@ function FragmentComponent(props) {
|
|
|
1637
1662
|
var fragment_default = FragmentComponent;
|
|
1638
1663
|
|
|
1639
1664
|
// src/blocks/image/image.tsx
|
|
1640
|
-
import { Show as Show7, createMemo as
|
|
1665
|
+
import { Show as Show7, createMemo as createMemo8 } from "solid-js";
|
|
1641
1666
|
import { css as css3 } from "solid-styled-components";
|
|
1642
1667
|
|
|
1643
1668
|
// src/blocks/image/image.helpers.ts
|
|
@@ -1689,7 +1714,7 @@ function getSrcSet(url) {
|
|
|
1689
1714
|
|
|
1690
1715
|
// src/blocks/image/image.tsx
|
|
1691
1716
|
function Image(props) {
|
|
1692
|
-
const srcSetToUse =
|
|
1717
|
+
const srcSetToUse = createMemo8(() => {
|
|
1693
1718
|
const imageToUse = props.image || props.src;
|
|
1694
1719
|
const url = imageToUse;
|
|
1695
1720
|
if (!url || // We can auto add srcset for cdn.builder.io and shopify
|
|
@@ -1707,14 +1732,14 @@ function Image(props) {
|
|
|
1707
1732
|
}
|
|
1708
1733
|
return getSrcSet(url);
|
|
1709
1734
|
});
|
|
1710
|
-
const webpSrcSet =
|
|
1735
|
+
const webpSrcSet = createMemo8(() => {
|
|
1711
1736
|
if (srcSetToUse()?.match(/builder\.io/) && !props.noWebp) {
|
|
1712
1737
|
return srcSetToUse().replace(/\?/g, "?format=webp&");
|
|
1713
1738
|
} else {
|
|
1714
1739
|
return "";
|
|
1715
1740
|
}
|
|
1716
1741
|
});
|
|
1717
|
-
const aspectRatioCss =
|
|
1742
|
+
const aspectRatioCss = createMemo8(() => {
|
|
1718
1743
|
const aspectRatioStyles = {
|
|
1719
1744
|
position: "absolute",
|
|
1720
1745
|
height: "100%",
|
|
@@ -1759,7 +1784,7 @@ function Image(props) {
|
|
|
1759
1784
|
}}
|
|
1760
1785
|
/></Show7>
|
|
1761
1786
|
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
1762
|
-
<Show7 when={!props.fitContent && props.children}><div
|
|
1787
|
+
<Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div
|
|
1763
1788
|
class={css3({
|
|
1764
1789
|
display: "flex",
|
|
1765
1790
|
flexDirection: "column",
|
|
@@ -1797,10 +1822,10 @@ function SectionComponent(props) {
|
|
|
1797
1822
|
var section_default = SectionComponent;
|
|
1798
1823
|
|
|
1799
1824
|
// src/blocks/symbol/symbol.tsx
|
|
1800
|
-
import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as
|
|
1825
|
+
import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as createMemo18, createSignal as createSignal18 } from "solid-js";
|
|
1801
1826
|
|
|
1802
1827
|
// src/components/content-variants/content-variants.tsx
|
|
1803
|
-
import { Show as
|
|
1828
|
+
import { Show as Show13, For as For8, onMount as onMount4, createSignal as createSignal17, createMemo as createMemo17 } from "solid-js";
|
|
1804
1829
|
|
|
1805
1830
|
// src/helpers/url.ts
|
|
1806
1831
|
var getTopLevelDomain = (host) => {
|
|
@@ -1994,7 +2019,7 @@ var handleABTesting = async ({
|
|
|
1994
2019
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
1995
2020
|
|
|
1996
2021
|
// src/components/content/content.tsx
|
|
1997
|
-
import { Show as
|
|
2022
|
+
import { Show as Show12, createSignal as createSignal16 } from "solid-js";
|
|
1998
2023
|
|
|
1999
2024
|
// src/blocks/button/component-info.ts
|
|
2000
2025
|
var componentInfo = {
|
|
@@ -2496,8 +2521,203 @@ var componentInfo7 = {
|
|
|
2496
2521
|
}]
|
|
2497
2522
|
};
|
|
2498
2523
|
|
|
2499
|
-
// src/blocks/
|
|
2524
|
+
// src/blocks/tabs/component-info.ts
|
|
2525
|
+
var defaultTab = {
|
|
2526
|
+
"@type": "@builder.io/sdk:Element",
|
|
2527
|
+
responsiveStyles: {
|
|
2528
|
+
large: {
|
|
2529
|
+
paddingLeft: "20px",
|
|
2530
|
+
paddingRight: "20px",
|
|
2531
|
+
paddingTop: "10px",
|
|
2532
|
+
paddingBottom: "10px",
|
|
2533
|
+
minWidth: "100px",
|
|
2534
|
+
textAlign: "center",
|
|
2535
|
+
display: "flex",
|
|
2536
|
+
flexDirection: "column",
|
|
2537
|
+
cursor: "pointer",
|
|
2538
|
+
userSelect: "none"
|
|
2539
|
+
}
|
|
2540
|
+
},
|
|
2541
|
+
component: {
|
|
2542
|
+
name: "Text",
|
|
2543
|
+
options: {
|
|
2544
|
+
text: "New tab"
|
|
2545
|
+
}
|
|
2546
|
+
}
|
|
2547
|
+
};
|
|
2548
|
+
var defaultElement = {
|
|
2549
|
+
"@type": "@builder.io/sdk:Element",
|
|
2550
|
+
responsiveStyles: {
|
|
2551
|
+
large: {
|
|
2552
|
+
height: "200px",
|
|
2553
|
+
display: "flex",
|
|
2554
|
+
marginTop: "20px",
|
|
2555
|
+
flexDirection: "column"
|
|
2556
|
+
}
|
|
2557
|
+
},
|
|
2558
|
+
component: {
|
|
2559
|
+
name: "Text",
|
|
2560
|
+
options: {
|
|
2561
|
+
text: "New tab content "
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
};
|
|
2500
2565
|
var componentInfo8 = {
|
|
2566
|
+
name: "Builder: Tabs",
|
|
2567
|
+
inputs: [{
|
|
2568
|
+
name: "tabs",
|
|
2569
|
+
type: "list",
|
|
2570
|
+
broadcast: true,
|
|
2571
|
+
subFields: [{
|
|
2572
|
+
name: "label",
|
|
2573
|
+
type: "uiBlocks",
|
|
2574
|
+
hideFromUI: true,
|
|
2575
|
+
defaultValue: [defaultTab]
|
|
2576
|
+
}, {
|
|
2577
|
+
name: "content",
|
|
2578
|
+
type: "uiBlocks",
|
|
2579
|
+
hideFromUI: true,
|
|
2580
|
+
defaultValue: [defaultElement]
|
|
2581
|
+
}],
|
|
2582
|
+
defaultValue: [{
|
|
2583
|
+
label: [{
|
|
2584
|
+
...defaultTab,
|
|
2585
|
+
component: {
|
|
2586
|
+
name: "Text",
|
|
2587
|
+
options: {
|
|
2588
|
+
text: "Tab 1"
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
}],
|
|
2592
|
+
content: [{
|
|
2593
|
+
...defaultElement,
|
|
2594
|
+
component: {
|
|
2595
|
+
name: "Text",
|
|
2596
|
+
options: {
|
|
2597
|
+
text: "Tab 1 content"
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
}]
|
|
2601
|
+
}, {
|
|
2602
|
+
label: [{
|
|
2603
|
+
...defaultTab,
|
|
2604
|
+
component: {
|
|
2605
|
+
name: "Text",
|
|
2606
|
+
options: {
|
|
2607
|
+
text: "Tab 2"
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
}],
|
|
2611
|
+
content: [{
|
|
2612
|
+
...defaultElement,
|
|
2613
|
+
component: {
|
|
2614
|
+
name: "Text",
|
|
2615
|
+
options: {
|
|
2616
|
+
text: "Tab 2 content"
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
}]
|
|
2620
|
+
}]
|
|
2621
|
+
}, {
|
|
2622
|
+
name: "activeTabStyle",
|
|
2623
|
+
type: "uiStyle",
|
|
2624
|
+
helperText: "CSS styles for the active tab",
|
|
2625
|
+
defaultValue: {
|
|
2626
|
+
backgroundColor: "rgba(0, 0, 0, 0.1)"
|
|
2627
|
+
}
|
|
2628
|
+
}, {
|
|
2629
|
+
name: "defaultActiveTab",
|
|
2630
|
+
type: "number",
|
|
2631
|
+
helperText: 'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',
|
|
2632
|
+
defaultValue: 1,
|
|
2633
|
+
advanced: true
|
|
2634
|
+
}, {
|
|
2635
|
+
name: "collapsible",
|
|
2636
|
+
type: "boolean",
|
|
2637
|
+
helperText: "If on, clicking an open tab closes it so no tabs are active",
|
|
2638
|
+
defaultValue: false,
|
|
2639
|
+
advanced: true
|
|
2640
|
+
}, {
|
|
2641
|
+
name: "tabHeaderLayout",
|
|
2642
|
+
type: "enum",
|
|
2643
|
+
helperText: "Change the layout of the tab headers (uses justify-content)",
|
|
2644
|
+
defaultValue: "flex-start",
|
|
2645
|
+
enum: [{
|
|
2646
|
+
label: "Center",
|
|
2647
|
+
value: "center"
|
|
2648
|
+
}, {
|
|
2649
|
+
label: "Space between",
|
|
2650
|
+
value: "space-between"
|
|
2651
|
+
}, {
|
|
2652
|
+
label: "Space around",
|
|
2653
|
+
value: "space-around"
|
|
2654
|
+
}, {
|
|
2655
|
+
label: "Left",
|
|
2656
|
+
value: "flex-start"
|
|
2657
|
+
}, {
|
|
2658
|
+
label: "Right",
|
|
2659
|
+
value: "flex-end"
|
|
2660
|
+
}]
|
|
2661
|
+
}]
|
|
2662
|
+
};
|
|
2663
|
+
|
|
2664
|
+
// src/blocks/tabs/tabs.tsx
|
|
2665
|
+
import { Show as Show8, For as For5, createSignal as createSignal9 } from "solid-js";
|
|
2666
|
+
function Tabs(props) {
|
|
2667
|
+
const [activeTab, setActiveTab] = createSignal9(
|
|
2668
|
+
props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
|
|
2669
|
+
);
|
|
2670
|
+
function activeTabContent(active) {
|
|
2671
|
+
return props.tabs && props.tabs[active].content;
|
|
2672
|
+
}
|
|
2673
|
+
function getActiveTabStyle(index) {
|
|
2674
|
+
return activeTab() === index ? props.activeTabStyle : {};
|
|
2675
|
+
}
|
|
2676
|
+
return <div>
|
|
2677
|
+
<div
|
|
2678
|
+
class="builder-tabs-wrap"
|
|
2679
|
+
style={{
|
|
2680
|
+
display: "flex",
|
|
2681
|
+
"flex-direction": "row",
|
|
2682
|
+
"justify-content": props.tabHeaderLayout || "flex-start",
|
|
2683
|
+
overflow: "auto"
|
|
2684
|
+
}}
|
|
2685
|
+
><For5 each={props.tabs}>{(tab, _index) => {
|
|
2686
|
+
const index = _index();
|
|
2687
|
+
return <span
|
|
2688
|
+
class={`builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`}
|
|
2689
|
+
key={index}
|
|
2690
|
+
style={getActiveTabStyle(index)}
|
|
2691
|
+
onClick={(event) => {
|
|
2692
|
+
if (index === activeTab() && props.collapsible) {
|
|
2693
|
+
setActiveTab(-1);
|
|
2694
|
+
} else {
|
|
2695
|
+
setActiveTab(index);
|
|
2696
|
+
}
|
|
2697
|
+
}}
|
|
2698
|
+
><Blocks_default
|
|
2699
|
+
parent={props.builderBlock.id}
|
|
2700
|
+
path={`component.options.tabs.${index}.label`}
|
|
2701
|
+
blocks={tab.label}
|
|
2702
|
+
context={props.builderContext}
|
|
2703
|
+
registeredComponents={props.builderComponents}
|
|
2704
|
+
linkComponent={props.builderLinkComponent}
|
|
2705
|
+
/></span>;
|
|
2706
|
+
}}</For5></div>
|
|
2707
|
+
<Show8 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
2708
|
+
parent={props.builderBlock.id}
|
|
2709
|
+
path={`component.options.tabs.${activeTab()}.content`}
|
|
2710
|
+
blocks={activeTabContent(activeTab())}
|
|
2711
|
+
context={props.builderContext}
|
|
2712
|
+
registeredComponents={props.builderComponents}
|
|
2713
|
+
linkComponent={props.builderLinkComponent}
|
|
2714
|
+
/></div></Show8>
|
|
2715
|
+
</div>;
|
|
2716
|
+
}
|
|
2717
|
+
var tabs_default = Tabs;
|
|
2718
|
+
|
|
2719
|
+
// src/blocks/text/component-info.ts
|
|
2720
|
+
var componentInfo9 = {
|
|
2501
2721
|
name: "Text",
|
|
2502
2722
|
static: true,
|
|
2503
2723
|
isRSC: true,
|
|
@@ -2530,7 +2750,7 @@ function Text(props) {
|
|
|
2530
2750
|
var text_default = Text;
|
|
2531
2751
|
|
|
2532
2752
|
// src/blocks/custom-code/component-info.ts
|
|
2533
|
-
var
|
|
2753
|
+
var componentInfo10 = {
|
|
2534
2754
|
name: "Custom Code",
|
|
2535
2755
|
static: true,
|
|
2536
2756
|
requiredPermissions: ["editCode"],
|
|
@@ -2555,10 +2775,10 @@ var componentInfo9 = {
|
|
|
2555
2775
|
};
|
|
2556
2776
|
|
|
2557
2777
|
// src/blocks/custom-code/custom-code.tsx
|
|
2558
|
-
import { onMount as onMount2, createSignal as
|
|
2778
|
+
import { onMount as onMount2, createSignal as createSignal10 } from "solid-js";
|
|
2559
2779
|
function CustomCode(props) {
|
|
2560
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
2561
|
-
const [scriptsRun, setScriptsRun] =
|
|
2780
|
+
const [scriptsInserted, setScriptsInserted] = createSignal10([]);
|
|
2781
|
+
const [scriptsRun, setScriptsRun] = createSignal10([]);
|
|
2562
2782
|
let elementRef;
|
|
2563
2783
|
onMount2(() => {
|
|
2564
2784
|
if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
|
|
@@ -2602,7 +2822,7 @@ function CustomCode(props) {
|
|
|
2602
2822
|
var custom_code_default = CustomCode;
|
|
2603
2823
|
|
|
2604
2824
|
// src/blocks/embed/component-info.ts
|
|
2605
|
-
var
|
|
2825
|
+
var componentInfo11 = {
|
|
2606
2826
|
name: "Embed",
|
|
2607
2827
|
static: true,
|
|
2608
2828
|
inputs: [{
|
|
@@ -2640,7 +2860,7 @@ var componentInfo10 = {
|
|
|
2640
2860
|
};
|
|
2641
2861
|
|
|
2642
2862
|
// src/blocks/embed/embed.tsx
|
|
2643
|
-
import { on, createEffect, createMemo as
|
|
2863
|
+
import { on, createEffect, createMemo as createMemo11, createSignal as createSignal11 } from "solid-js";
|
|
2644
2864
|
|
|
2645
2865
|
// src/blocks/embed/helpers.ts
|
|
2646
2866
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -2648,9 +2868,9 @@ var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
|
2648
2868
|
|
|
2649
2869
|
// src/blocks/embed/embed.tsx
|
|
2650
2870
|
function Embed(props) {
|
|
2651
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
2652
|
-
const [scriptsRun, setScriptsRun] =
|
|
2653
|
-
const [ranInitFn, setRanInitFn] =
|
|
2871
|
+
const [scriptsInserted, setScriptsInserted] = createSignal11([]);
|
|
2872
|
+
const [scriptsRun, setScriptsRun] = createSignal11([]);
|
|
2873
|
+
const [ranInitFn, setRanInitFn] = createSignal11(false);
|
|
2654
2874
|
function findAndRunScripts() {
|
|
2655
2875
|
if (!elem || !elem.getElementsByTagName)
|
|
2656
2876
|
return;
|
|
@@ -2674,8 +2894,8 @@ function Embed(props) {
|
|
|
2674
2894
|
}
|
|
2675
2895
|
}
|
|
2676
2896
|
let elem;
|
|
2677
|
-
const onUpdateFn_0_elem =
|
|
2678
|
-
const onUpdateFn_0_ranInitFn__ =
|
|
2897
|
+
const onUpdateFn_0_elem = createMemo11(() => elem);
|
|
2898
|
+
const onUpdateFn_0_ranInitFn__ = createMemo11(() => ranInitFn());
|
|
2679
2899
|
function onUpdateFn_0() {
|
|
2680
2900
|
if (elem && !ranInitFn()) {
|
|
2681
2901
|
setRanInitFn(true);
|
|
@@ -2690,7 +2910,7 @@ function Embed(props) {
|
|
|
2690
2910
|
var embed_default = Embed;
|
|
2691
2911
|
|
|
2692
2912
|
// src/blocks/form/form/component-info.ts
|
|
2693
|
-
var
|
|
2913
|
+
var componentInfo12 = {
|
|
2694
2914
|
name: "Form:Form",
|
|
2695
2915
|
// editableTags: ['builder-form-error']
|
|
2696
2916
|
defaults: {
|
|
@@ -2924,7 +3144,7 @@ var componentInfo11 = {
|
|
|
2924
3144
|
};
|
|
2925
3145
|
|
|
2926
3146
|
// src/blocks/form/form/form.tsx
|
|
2927
|
-
import { Show as
|
|
3147
|
+
import { Show as Show9, For as For6, createSignal as createSignal12 } from "solid-js";
|
|
2928
3148
|
import { css as css4 } from "solid-styled-components";
|
|
2929
3149
|
|
|
2930
3150
|
// src/functions/get-env.ts
|
|
@@ -2942,9 +3162,9 @@ var get = (obj, path, defaultValue) => {
|
|
|
2942
3162
|
|
|
2943
3163
|
// src/blocks/form/form/form.tsx
|
|
2944
3164
|
function FormComponent(props) {
|
|
2945
|
-
const [formState, setFormState] =
|
|
2946
|
-
const [responseData, setResponseData] =
|
|
2947
|
-
const [formErrorMessage, setFormErrorMessage] =
|
|
3165
|
+
const [formState, setFormState] = createSignal12("unsubmitted");
|
|
3166
|
+
const [responseData, setResponseData] = createSignal12(null);
|
|
3167
|
+
const [formErrorMessage, setFormErrorMessage] = createSignal12("");
|
|
2948
3168
|
function mergeNewRootState(newData) {
|
|
2949
3169
|
const combinedState = {
|
|
2950
3170
|
...props.builderContext.rootState,
|
|
@@ -3140,7 +3360,7 @@ function FormComponent(props) {
|
|
|
3140
3360
|
{...{}}
|
|
3141
3361
|
{...props.attributes}
|
|
3142
3362
|
>
|
|
3143
|
-
<
|
|
3363
|
+
<Show9 when={props.builderBlock && props.builderBlock.children}><For6 each={props.builderBlock?.children}>{(block, _index) => {
|
|
3144
3364
|
const idx = _index();
|
|
3145
3365
|
return <Block_default
|
|
3146
3366
|
key={`form-block-${idx}`}
|
|
@@ -3149,35 +3369,35 @@ function FormComponent(props) {
|
|
|
3149
3369
|
registeredComponents={props.builderComponents}
|
|
3150
3370
|
linkComponent={props.builderLinkComponent}
|
|
3151
3371
|
/>;
|
|
3152
|
-
}}</
|
|
3153
|
-
<
|
|
3372
|
+
}}</For6></Show9>
|
|
3373
|
+
<Show9 when={submissionState() === "error"}><Blocks_default
|
|
3154
3374
|
path="errorMessage"
|
|
3155
3375
|
blocks={props.errorMessage}
|
|
3156
3376
|
context={props.builderContext}
|
|
3157
|
-
/></
|
|
3158
|
-
<
|
|
3377
|
+
/></Show9>
|
|
3378
|
+
<Show9 when={submissionState() === "sending"}><Blocks_default
|
|
3159
3379
|
path="sendingMessage"
|
|
3160
3380
|
blocks={props.sendingMessage}
|
|
3161
3381
|
context={props.builderContext}
|
|
3162
|
-
/></
|
|
3163
|
-
<
|
|
3382
|
+
/></Show9>
|
|
3383
|
+
<Show9 when={submissionState() === "error" && responseData()}><pre
|
|
3164
3384
|
class={"builder-form-error-text " + css4({
|
|
3165
3385
|
padding: "10px",
|
|
3166
3386
|
color: "red",
|
|
3167
3387
|
textAlign: "center"
|
|
3168
3388
|
})}
|
|
3169
|
-
>{JSON.stringify(responseData(), null, 2)}</pre></
|
|
3170
|
-
<
|
|
3389
|
+
>{JSON.stringify(responseData(), null, 2)}</pre></Show9>
|
|
3390
|
+
<Show9 when={submissionState() === "success"}><Blocks_default
|
|
3171
3391
|
path="successMessage"
|
|
3172
3392
|
blocks={props.successMessage}
|
|
3173
3393
|
context={props.builderContext}
|
|
3174
|
-
/></
|
|
3394
|
+
/></Show9>
|
|
3175
3395
|
</form>;
|
|
3176
3396
|
}
|
|
3177
3397
|
var form_default = FormComponent;
|
|
3178
3398
|
|
|
3179
3399
|
// src/blocks/form/input/component-info.ts
|
|
3180
|
-
var
|
|
3400
|
+
var componentInfo13 = {
|
|
3181
3401
|
name: "Form:Input",
|
|
3182
3402
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3183
3403
|
inputs: [
|
|
@@ -3247,7 +3467,7 @@ function FormInputComponent(props) {
|
|
|
3247
3467
|
var input_default = FormInputComponent;
|
|
3248
3468
|
|
|
3249
3469
|
// src/blocks/form/select/component-info.ts
|
|
3250
|
-
var
|
|
3470
|
+
var componentInfo14 = {
|
|
3251
3471
|
name: "Form:Select",
|
|
3252
3472
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3253
3473
|
defaultStyles: {
|
|
@@ -3292,7 +3512,7 @@ var componentInfo13 = {
|
|
|
3292
3512
|
};
|
|
3293
3513
|
|
|
3294
3514
|
// src/blocks/form/select/select.tsx
|
|
3295
|
-
import { For as
|
|
3515
|
+
import { For as For7 } from "solid-js";
|
|
3296
3516
|
function SelectComponent(props) {
|
|
3297
3517
|
return <select
|
|
3298
3518
|
{...{}}
|
|
@@ -3301,15 +3521,15 @@ function SelectComponent(props) {
|
|
|
3301
3521
|
key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
|
|
3302
3522
|
defaultValue={props.defaultValue}
|
|
3303
3523
|
name={props.name}
|
|
3304
|
-
><
|
|
3524
|
+
><For7 each={props.options}>{(option, _index) => {
|
|
3305
3525
|
const index = _index();
|
|
3306
3526
|
return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
|
|
3307
|
-
}}</
|
|
3527
|
+
}}</For7></select>;
|
|
3308
3528
|
}
|
|
3309
3529
|
var select_default = SelectComponent;
|
|
3310
3530
|
|
|
3311
3531
|
// src/blocks/form/submit-button/component-info.ts
|
|
3312
|
-
var
|
|
3532
|
+
var componentInfo15 = {
|
|
3313
3533
|
name: "Form:SubmitButton",
|
|
3314
3534
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3315
3535
|
defaultStyles: {
|
|
@@ -3343,7 +3563,7 @@ function SubmitButton(props) {
|
|
|
3343
3563
|
var submit_button_default = SubmitButton;
|
|
3344
3564
|
|
|
3345
3565
|
// src/blocks/img/component-info.ts
|
|
3346
|
-
var
|
|
3566
|
+
var componentInfo16 = {
|
|
3347
3567
|
// friendlyName?
|
|
3348
3568
|
name: "Raw:Img",
|
|
3349
3569
|
hideFromInsertMenu: true,
|
|
@@ -3376,7 +3596,7 @@ function ImgComponent(props) {
|
|
|
3376
3596
|
var img_default = ImgComponent;
|
|
3377
3597
|
|
|
3378
3598
|
// src/blocks/video/component-info.ts
|
|
3379
|
-
var
|
|
3599
|
+
var componentInfo17 = {
|
|
3380
3600
|
name: "Video",
|
|
3381
3601
|
canHaveChildren: true,
|
|
3382
3602
|
defaultStyles: {
|
|
@@ -3460,9 +3680,9 @@ var componentInfo16 = {
|
|
|
3460
3680
|
};
|
|
3461
3681
|
|
|
3462
3682
|
// src/blocks/video/video.tsx
|
|
3463
|
-
import { Show as
|
|
3683
|
+
import { Show as Show10, createMemo as createMemo13 } from "solid-js";
|
|
3464
3684
|
function Video(props) {
|
|
3465
|
-
const videoProps =
|
|
3685
|
+
const videoProps = createMemo13(() => {
|
|
3466
3686
|
return {
|
|
3467
3687
|
...props.autoPlay === true ? {
|
|
3468
3688
|
autoPlay: true
|
|
@@ -3481,7 +3701,7 @@ function Video(props) {
|
|
|
3481
3701
|
} : {}
|
|
3482
3702
|
};
|
|
3483
3703
|
});
|
|
3484
|
-
const spreadProps =
|
|
3704
|
+
const spreadProps = createMemo13(() => {
|
|
3485
3705
|
return {
|
|
3486
3706
|
...videoProps()
|
|
3487
3707
|
};
|
|
@@ -3511,8 +3731,8 @@ function Video(props) {
|
|
|
3511
3731
|
}}
|
|
3512
3732
|
src={props.video || "no-src"}
|
|
3513
3733
|
poster={props.posterImage}
|
|
3514
|
-
><
|
|
3515
|
-
<
|
|
3734
|
+
><Show10 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show10></video>
|
|
3735
|
+
<Show10
|
|
3516
3736
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
3517
3737
|
><div
|
|
3518
3738
|
style={{
|
|
@@ -3521,15 +3741,15 @@ function Video(props) {
|
|
|
3521
3741
|
"pointer-events": "none",
|
|
3522
3742
|
"font-size": "0px"
|
|
3523
3743
|
}}
|
|
3524
|
-
/></
|
|
3525
|
-
<
|
|
3744
|
+
/></Show10>
|
|
3745
|
+
<Show10 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
3526
3746
|
style={{
|
|
3527
3747
|
display: "flex",
|
|
3528
3748
|
"flex-direction": "column",
|
|
3529
3749
|
"align-items": "stretch"
|
|
3530
3750
|
}}
|
|
3531
|
-
>{props.children}</div></
|
|
3532
|
-
<
|
|
3751
|
+
>{props.children}</div></Show10>
|
|
3752
|
+
<Show10 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
3533
3753
|
style={{
|
|
3534
3754
|
"pointer-events": "none",
|
|
3535
3755
|
display: "flex",
|
|
@@ -3541,7 +3761,7 @@ function Video(props) {
|
|
|
3541
3761
|
width: "100%",
|
|
3542
3762
|
height: "100%"
|
|
3543
3763
|
}}
|
|
3544
|
-
>{props.children}</div></
|
|
3764
|
+
>{props.children}</div></Show10>
|
|
3545
3765
|
</div>;
|
|
3546
3766
|
}
|
|
3547
3767
|
var video_default = Video;
|
|
@@ -3549,28 +3769,28 @@ var video_default = Video;
|
|
|
3549
3769
|
// src/constants/extra-components.ts
|
|
3550
3770
|
var getExtraComponents = () => [{
|
|
3551
3771
|
component: custom_code_default,
|
|
3552
|
-
...
|
|
3772
|
+
...componentInfo10
|
|
3553
3773
|
}, {
|
|
3554
3774
|
component: embed_default,
|
|
3555
|
-
...
|
|
3775
|
+
...componentInfo11
|
|
3556
3776
|
}, ...TARGET === "rsc" ? [] : [{
|
|
3557
3777
|
component: form_default,
|
|
3558
|
-
...
|
|
3778
|
+
...componentInfo12
|
|
3559
3779
|
}, {
|
|
3560
3780
|
component: input_default,
|
|
3561
|
-
...
|
|
3781
|
+
...componentInfo13
|
|
3562
3782
|
}, {
|
|
3563
3783
|
component: submit_button_default,
|
|
3564
|
-
...
|
|
3784
|
+
...componentInfo15
|
|
3565
3785
|
}, {
|
|
3566
3786
|
component: select_default,
|
|
3567
|
-
...
|
|
3787
|
+
...componentInfo14
|
|
3568
3788
|
}], {
|
|
3569
3789
|
component: img_default,
|
|
3570
|
-
...
|
|
3790
|
+
...componentInfo16
|
|
3571
3791
|
}, {
|
|
3572
3792
|
component: video_default,
|
|
3573
|
-
...
|
|
3793
|
+
...componentInfo17
|
|
3574
3794
|
}];
|
|
3575
3795
|
|
|
3576
3796
|
// src/constants/builder-registered-components.ts
|
|
@@ -3597,8 +3817,11 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
3597
3817
|
...componentInfo7
|
|
3598
3818
|
}, {
|
|
3599
3819
|
component: text_default,
|
|
3820
|
+
...componentInfo9
|
|
3821
|
+
}, ...TARGET === "rsc" ? [] : [{
|
|
3822
|
+
component: tabs_default,
|
|
3600
3823
|
...componentInfo8
|
|
3601
|
-
}, ...getExtraComponents()];
|
|
3824
|
+
}], ...getExtraComponents()];
|
|
3602
3825
|
|
|
3603
3826
|
// src/functions/register-component.ts
|
|
3604
3827
|
var createRegisterComponentMessage = (info) => ({
|
|
@@ -3676,12 +3899,12 @@ var Inlined_script_default = InlinedScript;
|
|
|
3676
3899
|
|
|
3677
3900
|
// src/components/content/components/enable-editor.tsx
|
|
3678
3901
|
import {
|
|
3679
|
-
Show as
|
|
3902
|
+
Show as Show11,
|
|
3680
3903
|
onMount as onMount3,
|
|
3681
3904
|
on as on2,
|
|
3682
3905
|
createEffect as createEffect2,
|
|
3683
|
-
createMemo as
|
|
3684
|
-
createSignal as
|
|
3906
|
+
createMemo as createMemo14,
|
|
3907
|
+
createSignal as createSignal14
|
|
3685
3908
|
} from "solid-js";
|
|
3686
3909
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
3687
3910
|
|
|
@@ -4169,7 +4392,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4169
4392
|
}
|
|
4170
4393
|
|
|
4171
4394
|
// src/constants/sdk-version.ts
|
|
4172
|
-
var SDK_VERSION = "1.0.
|
|
4395
|
+
var SDK_VERSION = "1.0.24";
|
|
4173
4396
|
|
|
4174
4397
|
// src/functions/register.ts
|
|
4175
4398
|
var registry = {};
|
|
@@ -4366,14 +4589,93 @@ var subscribeToEditor = (model, callback, options) => {
|
|
|
4366
4589
|
};
|
|
4367
4590
|
};
|
|
4368
4591
|
|
|
4592
|
+
// src/components/content/components/styles.helpers.ts
|
|
4593
|
+
var getCssFromFont = (font) => {
|
|
4594
|
+
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
4595
|
+
const name = family.split(",")[0];
|
|
4596
|
+
const url = font.fileUrl ?? font?.files?.regular;
|
|
4597
|
+
let str = "";
|
|
4598
|
+
if (url && family && name) {
|
|
4599
|
+
str += `
|
|
4600
|
+
@font-face {
|
|
4601
|
+
font-family: "${family}";
|
|
4602
|
+
src: local("${name}"), url('${url}') format('woff2');
|
|
4603
|
+
font-display: fallback;
|
|
4604
|
+
font-weight: 400;
|
|
4605
|
+
}
|
|
4606
|
+
`.trim();
|
|
4607
|
+
}
|
|
4608
|
+
if (font.files) {
|
|
4609
|
+
for (const weight in font.files) {
|
|
4610
|
+
const isNumber = String(Number(weight)) === weight;
|
|
4611
|
+
if (!isNumber) {
|
|
4612
|
+
continue;
|
|
4613
|
+
}
|
|
4614
|
+
const weightUrl = font.files[weight];
|
|
4615
|
+
if (weightUrl && weightUrl !== url) {
|
|
4616
|
+
str += `
|
|
4617
|
+
@font-face {
|
|
4618
|
+
font-family: "${family}";
|
|
4619
|
+
src: url('${weightUrl}') format('woff2');
|
|
4620
|
+
font-display: fallback;
|
|
4621
|
+
font-weight: ${weight};
|
|
4622
|
+
}
|
|
4623
|
+
`.trim();
|
|
4624
|
+
}
|
|
4625
|
+
}
|
|
4626
|
+
}
|
|
4627
|
+
return str;
|
|
4628
|
+
};
|
|
4629
|
+
var getFontCss = ({
|
|
4630
|
+
customFonts
|
|
4631
|
+
}) => {
|
|
4632
|
+
return customFonts?.map((font) => getCssFromFont(font))?.join(" ") || "";
|
|
4633
|
+
};
|
|
4634
|
+
var getCss = ({
|
|
4635
|
+
cssCode,
|
|
4636
|
+
contentId
|
|
4637
|
+
}) => {
|
|
4638
|
+
if (!cssCode) {
|
|
4639
|
+
return "";
|
|
4640
|
+
}
|
|
4641
|
+
if (!contentId) {
|
|
4642
|
+
return cssCode;
|
|
4643
|
+
}
|
|
4644
|
+
return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
|
|
4645
|
+
};
|
|
4646
|
+
var DEFAULT_STYLES = `
|
|
4647
|
+
.builder-button {
|
|
4648
|
+
all: unset;
|
|
4649
|
+
}
|
|
4650
|
+
|
|
4651
|
+
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
4652
|
+
margin: 0;
|
|
4653
|
+
}
|
|
4654
|
+
.builder-text > p, .builder-text > .builder-paragraph {
|
|
4655
|
+
color: inherit;
|
|
4656
|
+
line-height: inherit;
|
|
4657
|
+
letter-spacing: inherit;
|
|
4658
|
+
font-weight: inherit;
|
|
4659
|
+
font-size: inherit;
|
|
4660
|
+
text-align: inherit;
|
|
4661
|
+
font-family: inherit;
|
|
4662
|
+
}
|
|
4663
|
+
`;
|
|
4664
|
+
var getDefaultStyles = (isNested) => {
|
|
4665
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
4666
|
+
};
|
|
4667
|
+
var getWrapperClassName = (variationId) => {
|
|
4668
|
+
return `variant-${variationId}`;
|
|
4669
|
+
};
|
|
4670
|
+
|
|
4369
4671
|
// src/components/content/components/enable-editor.tsx
|
|
4370
4672
|
function EnableEditor(props) {
|
|
4371
|
-
const [ContentWrapper, setContentWrapper] =
|
|
4673
|
+
const [ContentWrapper, setContentWrapper] = createSignal14(
|
|
4372
4674
|
props.contentWrapper || "div"
|
|
4373
4675
|
);
|
|
4374
|
-
const [httpReqsData, setHttpReqsData] =
|
|
4375
|
-
const [httpReqsPending, setHttpReqsPending] =
|
|
4376
|
-
const [clicked, setClicked] =
|
|
4676
|
+
const [httpReqsData, setHttpReqsData] = createSignal14({});
|
|
4677
|
+
const [httpReqsPending, setHttpReqsPending] = createSignal14({});
|
|
4678
|
+
const [clicked, setClicked] = createSignal14(false);
|
|
4377
4679
|
function mergeNewRootState(newData) {
|
|
4378
4680
|
const combinedState = {
|
|
4379
4681
|
...props.builderContextSignal.rootState,
|
|
@@ -4407,6 +4709,12 @@ function EnableEditor(props) {
|
|
|
4407
4709
|
content: newContentValue
|
|
4408
4710
|
}));
|
|
4409
4711
|
}
|
|
4712
|
+
const showContentProps = createMemo14(() => {
|
|
4713
|
+
return props.showContent ? {} : {
|
|
4714
|
+
hidden: true,
|
|
4715
|
+
"aria-hidden": true
|
|
4716
|
+
};
|
|
4717
|
+
});
|
|
4410
4718
|
function processMessage(event) {
|
|
4411
4719
|
return createEditorListener({
|
|
4412
4720
|
model: props.model,
|
|
@@ -4592,14 +4900,14 @@ function EnableEditor(props) {
|
|
|
4592
4900
|
runHttpRequests();
|
|
4593
4901
|
emitStateUpdate();
|
|
4594
4902
|
});
|
|
4595
|
-
const onUpdateFn_0_props_content =
|
|
4903
|
+
const onUpdateFn_0_props_content = createMemo14(() => props.content);
|
|
4596
4904
|
function onUpdateFn_0() {
|
|
4597
4905
|
if (props.content) {
|
|
4598
4906
|
mergeNewContent(props.content);
|
|
4599
4907
|
}
|
|
4600
4908
|
}
|
|
4601
4909
|
createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
4602
|
-
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode =
|
|
4910
|
+
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo14(() => props.builderContextSignal.content?.data?.jsCode);
|
|
4603
4911
|
function onUpdateFn_1() {
|
|
4604
4912
|
evaluateJsCode();
|
|
4605
4913
|
}
|
|
@@ -4609,7 +4917,7 @@ function EnableEditor(props) {
|
|
|
4609
4917
|
onUpdateFn_1
|
|
4610
4918
|
)
|
|
4611
4919
|
);
|
|
4612
|
-
const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests =
|
|
4920
|
+
const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo14(() => props.builderContextSignal.content?.data?.httpRequests);
|
|
4613
4921
|
function onUpdateFn_2() {
|
|
4614
4922
|
runHttpRequests();
|
|
4615
4923
|
}
|
|
@@ -4621,7 +4929,7 @@ function EnableEditor(props) {
|
|
|
4621
4929
|
onUpdateFn_2
|
|
4622
4930
|
)
|
|
4623
4931
|
);
|
|
4624
|
-
const onUpdateFn_3_props_builderContextSignal_rootState =
|
|
4932
|
+
const onUpdateFn_3_props_builderContextSignal_rootState = createMemo14(
|
|
4625
4933
|
() => props.builderContextSignal.rootState
|
|
4626
4934
|
);
|
|
4627
4935
|
function onUpdateFn_3() {
|
|
@@ -4633,14 +4941,14 @@ function EnableEditor(props) {
|
|
|
4633
4941
|
onUpdateFn_3
|
|
4634
4942
|
)
|
|
4635
4943
|
);
|
|
4636
|
-
const onUpdateFn_4_props_data =
|
|
4944
|
+
const onUpdateFn_4_props_data = createMemo14(() => props.data);
|
|
4637
4945
|
function onUpdateFn_4() {
|
|
4638
4946
|
if (props.data) {
|
|
4639
4947
|
mergeNewRootState(props.data);
|
|
4640
4948
|
}
|
|
4641
4949
|
}
|
|
4642
4950
|
createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
|
|
4643
|
-
const onUpdateFn_5_props_locale =
|
|
4951
|
+
const onUpdateFn_5_props_locale = createMemo14(() => props.locale);
|
|
4644
4952
|
function onUpdateFn_5() {
|
|
4645
4953
|
if (props.locale) {
|
|
4646
4954
|
mergeNewRootState({
|
|
@@ -4649,106 +4957,27 @@ function EnableEditor(props) {
|
|
|
4649
4957
|
}
|
|
4650
4958
|
}
|
|
4651
4959
|
createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
4652
|
-
return <builder_context_default.Provider value={props.builderContextSignal}><
|
|
4653
|
-
class={
|
|
4960
|
+
return <builder_context_default.Provider value={props.builderContextSignal}><Show11 when={props.builderContextSignal.content}><Dynamic5
|
|
4961
|
+
class={getWrapperClassName(
|
|
4962
|
+
props.content?.testVariationId || props.content?.id
|
|
4963
|
+
)}
|
|
4654
4964
|
{...{}}
|
|
4655
4965
|
ref={elementRef}
|
|
4656
4966
|
onClick={(event) => onClick(event)}
|
|
4657
4967
|
builder-content-id={props.builderContextSignal.content?.id}
|
|
4658
4968
|
builder-model={props.model}
|
|
4659
4969
|
{...{}}
|
|
4660
|
-
{...
|
|
4661
|
-
hidden: true,
|
|
4662
|
-
"aria-hidden": true
|
|
4663
|
-
}}
|
|
4970
|
+
{...showContentProps()}
|
|
4664
4971
|
{...props.contentWrapperProps}
|
|
4665
4972
|
component={ContentWrapper()}
|
|
4666
|
-
>{props.children}</Dynamic5></
|
|
4973
|
+
>{props.children}</Dynamic5></Show11></builder_context_default.Provider>;
|
|
4667
4974
|
}
|
|
4668
4975
|
var Enable_editor_default = EnableEditor;
|
|
4669
4976
|
|
|
4670
4977
|
// src/components/content/components/styles.tsx
|
|
4671
|
-
import { createSignal as
|
|
4672
|
-
|
|
4673
|
-
// src/components/content/components/styles.helpers.ts
|
|
4674
|
-
var getCssFromFont = (font) => {
|
|
4675
|
-
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
4676
|
-
const name = family.split(",")[0];
|
|
4677
|
-
const url = font.fileUrl ?? font?.files?.regular;
|
|
4678
|
-
let str = "";
|
|
4679
|
-
if (url && family && name) {
|
|
4680
|
-
str += `
|
|
4681
|
-
@font-face {
|
|
4682
|
-
font-family: "${family}";
|
|
4683
|
-
src: local("${name}"), url('${url}') format('woff2');
|
|
4684
|
-
font-display: fallback;
|
|
4685
|
-
font-weight: 400;
|
|
4686
|
-
}
|
|
4687
|
-
`.trim();
|
|
4688
|
-
}
|
|
4689
|
-
if (font.files) {
|
|
4690
|
-
for (const weight in font.files) {
|
|
4691
|
-
const isNumber = String(Number(weight)) === weight;
|
|
4692
|
-
if (!isNumber) {
|
|
4693
|
-
continue;
|
|
4694
|
-
}
|
|
4695
|
-
const weightUrl = font.files[weight];
|
|
4696
|
-
if (weightUrl && weightUrl !== url) {
|
|
4697
|
-
str += `
|
|
4698
|
-
@font-face {
|
|
4699
|
-
font-family: "${family}";
|
|
4700
|
-
src: url('${weightUrl}') format('woff2');
|
|
4701
|
-
font-display: fallback;
|
|
4702
|
-
font-weight: ${weight};
|
|
4703
|
-
}
|
|
4704
|
-
`.trim();
|
|
4705
|
-
}
|
|
4706
|
-
}
|
|
4707
|
-
}
|
|
4708
|
-
return str;
|
|
4709
|
-
};
|
|
4710
|
-
var getFontCss = ({
|
|
4711
|
-
customFonts
|
|
4712
|
-
}) => {
|
|
4713
|
-
return customFonts?.map((font) => getCssFromFont(font))?.join(" ") || "";
|
|
4714
|
-
};
|
|
4715
|
-
var getCss = ({
|
|
4716
|
-
cssCode,
|
|
4717
|
-
contentId
|
|
4718
|
-
}) => {
|
|
4719
|
-
if (!cssCode) {
|
|
4720
|
-
return "";
|
|
4721
|
-
}
|
|
4722
|
-
if (!contentId) {
|
|
4723
|
-
return cssCode;
|
|
4724
|
-
}
|
|
4725
|
-
return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
|
|
4726
|
-
};
|
|
4727
|
-
var DEFAULT_STYLES = `
|
|
4728
|
-
.builder-button {
|
|
4729
|
-
all: unset;
|
|
4730
|
-
}
|
|
4731
|
-
|
|
4732
|
-
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
4733
|
-
margin: 0;
|
|
4734
|
-
}
|
|
4735
|
-
.builder-text > p, .builder-text > .builder-paragraph {
|
|
4736
|
-
color: inherit;
|
|
4737
|
-
line-height: inherit;
|
|
4738
|
-
letter-spacing: inherit;
|
|
4739
|
-
font-weight: inherit;
|
|
4740
|
-
font-size: inherit;
|
|
4741
|
-
text-align: inherit;
|
|
4742
|
-
font-family: inherit;
|
|
4743
|
-
}
|
|
4744
|
-
`;
|
|
4745
|
-
var getDefaultStyles = (isNested) => {
|
|
4746
|
-
return !isNested ? DEFAULT_STYLES : "";
|
|
4747
|
-
};
|
|
4748
|
-
|
|
4749
|
-
// src/components/content/components/styles.tsx
|
|
4978
|
+
import { createSignal as createSignal15 } from "solid-js";
|
|
4750
4979
|
function ContentStyles(props) {
|
|
4751
|
-
const [injectedStyles, setInjectedStyles] =
|
|
4980
|
+
const [injectedStyles, setInjectedStyles] = createSignal15(
|
|
4752
4981
|
`
|
|
4753
4982
|
${getCss({
|
|
4754
4983
|
cssCode: props.cssCode,
|
|
@@ -4805,7 +5034,7 @@ var getContentInitialValue = ({
|
|
|
4805
5034
|
|
|
4806
5035
|
// src/components/content/content.tsx
|
|
4807
5036
|
function ContentComponent(props) {
|
|
4808
|
-
const [scriptStr, setScriptStr] =
|
|
5037
|
+
const [scriptStr, setScriptStr] = createSignal16(
|
|
4809
5038
|
getUpdateVariantVisibilityScript({
|
|
4810
5039
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4811
5040
|
variationId: props.content?.testVariationId,
|
|
@@ -4813,7 +5042,7 @@ function ContentComponent(props) {
|
|
|
4813
5042
|
contentId: props.content?.id
|
|
4814
5043
|
})
|
|
4815
5044
|
);
|
|
4816
|
-
const [registeredComponents, setRegisteredComponents] =
|
|
5045
|
+
const [registeredComponents, setRegisteredComponents] = createSignal16(
|
|
4817
5046
|
[
|
|
4818
5047
|
...getDefaultRegisteredComponents(),
|
|
4819
5048
|
...props.customComponents || []
|
|
@@ -4828,7 +5057,7 @@ function ContentComponent(props) {
|
|
|
4828
5057
|
{}
|
|
4829
5058
|
)
|
|
4830
5059
|
);
|
|
4831
|
-
const [builderContextSignal, setBuilderContextSignal] =
|
|
5060
|
+
const [builderContextSignal, setBuilderContextSignal] = createSignal16({
|
|
4832
5061
|
content: getContentInitialValue({
|
|
4833
5062
|
content: props.content,
|
|
4834
5063
|
data: props.data
|
|
@@ -4886,16 +5115,16 @@ function ContentComponent(props) {
|
|
|
4886
5115
|
setBuilderContextSignal
|
|
4887
5116
|
}}
|
|
4888
5117
|
>
|
|
4889
|
-
<
|
|
5118
|
+
<Show12 when={props.isSsrAbTest}><Inlined_script_default
|
|
4890
5119
|
id="builderio-variant-visibility"
|
|
4891
5120
|
scriptStr={scriptStr()}
|
|
4892
|
-
/></
|
|
4893
|
-
<
|
|
5121
|
+
/></Show12>
|
|
5122
|
+
<Show12 when={TARGET !== "reactNative"}><Styles_default
|
|
4894
5123
|
isNestedRender={props.isNestedRender}
|
|
4895
5124
|
contentId={builderContextSignal().content?.id}
|
|
4896
5125
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
4897
5126
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
4898
|
-
/></
|
|
5127
|
+
/></Show12>
|
|
4899
5128
|
<Blocks_default
|
|
4900
5129
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
4901
5130
|
context={builderContextSignal()}
|
|
@@ -4908,13 +5137,13 @@ var Content_default = ContentComponent;
|
|
|
4908
5137
|
|
|
4909
5138
|
// src/components/content-variants/content-variants.tsx
|
|
4910
5139
|
function ContentVariants(props) {
|
|
4911
|
-
const [shouldRenderVariants, setShouldRenderVariants] =
|
|
5140
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal17(
|
|
4912
5141
|
checkShouldRenderVariants({
|
|
4913
5142
|
canTrack: getDefaultCanTrack(props.canTrack),
|
|
4914
5143
|
content: props.content
|
|
4915
5144
|
})
|
|
4916
5145
|
);
|
|
4917
|
-
const updateCookieAndStylesScriptStr =
|
|
5146
|
+
const updateCookieAndStylesScriptStr = createMemo17(() => {
|
|
4918
5147
|
return getUpdateCookieAndStylesScript(
|
|
4919
5148
|
getVariants(props.content).map((value) => ({
|
|
4920
5149
|
id: value.testVariationId,
|
|
@@ -4923,10 +5152,10 @@ function ContentVariants(props) {
|
|
|
4923
5152
|
props.content?.id || ""
|
|
4924
5153
|
);
|
|
4925
5154
|
});
|
|
4926
|
-
const hideVariantsStyleString =
|
|
5155
|
+
const hideVariantsStyleString = createMemo17(() => {
|
|
4927
5156
|
return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
|
|
4928
5157
|
});
|
|
4929
|
-
const defaultContent =
|
|
5158
|
+
const defaultContent = createMemo17(() => {
|
|
4930
5159
|
return shouldRenderVariants() ? {
|
|
4931
5160
|
...props.content,
|
|
4932
5161
|
testVariationId: props.content?.id
|
|
@@ -4939,11 +5168,11 @@ function ContentVariants(props) {
|
|
|
4939
5168
|
setShouldRenderVariants(false);
|
|
4940
5169
|
});
|
|
4941
5170
|
return <>
|
|
4942
|
-
<
|
|
5171
|
+
<Show13 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
4943
5172
|
id="builderio-init-variants-fns"
|
|
4944
5173
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
4945
|
-
/></
|
|
4946
|
-
<
|
|
5174
|
+
/></Show13>
|
|
5175
|
+
<Show13 when={shouldRenderVariants()}>
|
|
4947
5176
|
<Inlined_styles_default
|
|
4948
5177
|
id="builderio-variants"
|
|
4949
5178
|
styles={hideVariantsStyleString()}
|
|
@@ -4952,7 +5181,7 @@ function ContentVariants(props) {
|
|
|
4952
5181
|
id="builderio-variants-visibility"
|
|
4953
5182
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
4954
5183
|
/>
|
|
4955
|
-
<
|
|
5184
|
+
<For8 each={getVariants(props.content)}>{(variant, _index) => {
|
|
4956
5185
|
const index = _index();
|
|
4957
5186
|
return <Content_default
|
|
4958
5187
|
isNestedRender={props.isNestedRender}
|
|
@@ -4976,8 +5205,8 @@ function ContentVariants(props) {
|
|
|
4976
5205
|
contentWrapperProps={props.contentWrapperProps}
|
|
4977
5206
|
trustedHosts={props.trustedHosts}
|
|
4978
5207
|
/>;
|
|
4979
|
-
}}</
|
|
4980
|
-
</
|
|
5208
|
+
}}</For8>
|
|
5209
|
+
</Show13>
|
|
4981
5210
|
<Content_default
|
|
4982
5211
|
isNestedRender={props.isNestedRender}
|
|
4983
5212
|
{...{}}
|
|
@@ -5030,8 +5259,14 @@ var fetchSymbolContent = async ({
|
|
|
5030
5259
|
|
|
5031
5260
|
// src/blocks/symbol/symbol.tsx
|
|
5032
5261
|
function Symbol(props) {
|
|
5033
|
-
const [contentToUse, setContentToUse] =
|
|
5034
|
-
const
|
|
5262
|
+
const [contentToUse, setContentToUse] = createSignal18(props.symbol?.content);
|
|
5263
|
+
const blocksWrapper = createMemo18(() => {
|
|
5264
|
+
return "div";
|
|
5265
|
+
});
|
|
5266
|
+
const contentWrapper = createMemo18(() => {
|
|
5267
|
+
return "div";
|
|
5268
|
+
});
|
|
5269
|
+
const className = createMemo18(() => {
|
|
5035
5270
|
return [
|
|
5036
5271
|
...[props.attributes[getClassPropName()]],
|
|
5037
5272
|
"builder-symbol",
|
|
@@ -5053,7 +5288,7 @@ function Symbol(props) {
|
|
|
5053
5288
|
}
|
|
5054
5289
|
onMount5(() => {
|
|
5055
5290
|
});
|
|
5056
|
-
const onUpdateFn_0_props_symbol =
|
|
5291
|
+
const onUpdateFn_0_props_symbol = createMemo18(() => props.symbol);
|
|
5057
5292
|
function onUpdateFn_0() {
|
|
5058
5293
|
setContent();
|
|
5059
5294
|
}
|
|
@@ -5075,8 +5310,8 @@ function Symbol(props) {
|
|
|
5075
5310
|
model={props.symbol?.model}
|
|
5076
5311
|
content={contentToUse()}
|
|
5077
5312
|
linkComponent={props.builderLinkComponent}
|
|
5078
|
-
blocksWrapper=
|
|
5079
|
-
contentWrapper=
|
|
5313
|
+
blocksWrapper={blocksWrapper()}
|
|
5314
|
+
contentWrapper={contentWrapper()}
|
|
5080
5315
|
/></div>;
|
|
5081
5316
|
}
|
|
5082
5317
|
var symbol_default = Symbol;
|