@builder.io/sdk-solid 1.0.23 → 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 -178
- package/lib/browser/dev.jsx +463 -227
- package/lib/browser/index.js +458 -178
- package/lib/browser/index.jsx +463 -227
- package/lib/edge/dev.js +458 -178
- package/lib/edge/dev.jsx +463 -227
- package/lib/edge/index.js +458 -178
- package/lib/edge/index.jsx +463 -227
- package/lib/node/dev.js +458 -178
- package/lib/node/dev.jsx +463 -227
- package/lib/node/index.js +458 -178
- package/lib/node/index.jsx +463 -227
- package/package.json +1 -1
package/lib/node/index.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) {
|
|
@@ -841,6 +845,7 @@ function mapStyleObjToStrIfNeeded(style) {
|
|
|
841
845
|
case "svelte":
|
|
842
846
|
case "vue":
|
|
843
847
|
case "solid":
|
|
848
|
+
case "angular":
|
|
844
849
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
845
850
|
case "qwik":
|
|
846
851
|
case "reactNative":
|
|
@@ -913,6 +918,12 @@ var getRepeatItemData = ({
|
|
|
913
918
|
}));
|
|
914
919
|
return repeatArray;
|
|
915
920
|
};
|
|
921
|
+
var shouldPassLinkComponent = (blockName) => {
|
|
922
|
+
return blockName && ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(blockName);
|
|
923
|
+
};
|
|
924
|
+
var shouldPassRegisteredComponents = (blockName) => {
|
|
925
|
+
return blockName && ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(blockName);
|
|
926
|
+
};
|
|
916
927
|
|
|
917
928
|
// src/components/block/components/block-styles.tsx
|
|
918
929
|
import { Show as Show2, createMemo } from "solid-js";
|
|
@@ -1156,15 +1167,15 @@ function BlockWrapper(props) {
|
|
|
1156
1167
|
var Block_wrapper_default = BlockWrapper;
|
|
1157
1168
|
|
|
1158
1169
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
1159
|
-
import { Show as Show3, For, createSignal as
|
|
1170
|
+
import { Show as Show3, For, createSignal as createSignal3 } from "solid-js";
|
|
1160
1171
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
1161
1172
|
|
|
1162
1173
|
// src/components/block/components/interactive-element.tsx
|
|
1174
|
+
import { createMemo as createMemo2 } from "solid-js";
|
|
1163
1175
|
import { Dynamic as Dynamic2 } from "solid-js/web";
|
|
1164
1176
|
function InteractiveElement(props) {
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
attributes={props.includeBlockProps ? {
|
|
1177
|
+
const attributes = createMemo2(() => {
|
|
1178
|
+
return props.includeBlockProps ? {
|
|
1168
1179
|
...getBlockProperties({
|
|
1169
1180
|
block: props.block,
|
|
1170
1181
|
context: props.context
|
|
@@ -1176,7 +1187,11 @@ function InteractiveElement(props) {
|
|
|
1176
1187
|
localState: props.context.localState,
|
|
1177
1188
|
context: props.context.context
|
|
1178
1189
|
})
|
|
1179
|
-
} : {}
|
|
1190
|
+
} : {};
|
|
1191
|
+
});
|
|
1192
|
+
return <Dynamic2
|
|
1193
|
+
{...props.wrapperProps}
|
|
1194
|
+
attributes={attributes()}
|
|
1180
1195
|
component={props.Wrapper}
|
|
1181
1196
|
>{props.children}</Dynamic2>;
|
|
1182
1197
|
}
|
|
@@ -1217,7 +1232,7 @@ var getWrapperProps = ({
|
|
|
1217
1232
|
|
|
1218
1233
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
1219
1234
|
function ComponentRef(props) {
|
|
1220
|
-
const [Wrapper, setWrapper] =
|
|
1235
|
+
const [Wrapper, setWrapper] = createSignal3(
|
|
1221
1236
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
1222
1237
|
);
|
|
1223
1238
|
return <Show3 when={props.componentRef}><Dynamic3
|
|
@@ -1246,9 +1261,9 @@ function ComponentRef(props) {
|
|
|
1246
1261
|
var Component_ref_default = ComponentRef;
|
|
1247
1262
|
|
|
1248
1263
|
// src/components/block/components/repeated-block.tsx
|
|
1249
|
-
import { createSignal as
|
|
1264
|
+
import { createSignal as createSignal4 } from "solid-js";
|
|
1250
1265
|
function RepeatedBlock(props) {
|
|
1251
|
-
const [store, setStore] =
|
|
1266
|
+
const [store, setStore] = createSignal4(props.repeatContext);
|
|
1252
1267
|
return <builder_context_default.Provider value={store()}><Block_default
|
|
1253
1268
|
block={props.block}
|
|
1254
1269
|
context={store()}
|
|
@@ -1260,20 +1275,20 @@ var Repeated_block_default = RepeatedBlock;
|
|
|
1260
1275
|
|
|
1261
1276
|
// src/components/block/block.tsx
|
|
1262
1277
|
function Block(props) {
|
|
1263
|
-
const blockComponent =
|
|
1278
|
+
const blockComponent = createMemo5(() => {
|
|
1264
1279
|
return getComponent({
|
|
1265
1280
|
block: props.block,
|
|
1266
1281
|
context: props.context,
|
|
1267
1282
|
registeredComponents: props.registeredComponents
|
|
1268
1283
|
});
|
|
1269
1284
|
});
|
|
1270
|
-
const repeatItem =
|
|
1285
|
+
const repeatItem = createMemo5(() => {
|
|
1271
1286
|
return getRepeatItemData({
|
|
1272
1287
|
block: props.block,
|
|
1273
1288
|
context: props.context
|
|
1274
1289
|
});
|
|
1275
1290
|
});
|
|
1276
|
-
const processedBlock =
|
|
1291
|
+
const processedBlock = createMemo5(() => {
|
|
1277
1292
|
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
1278
1293
|
block: props.block,
|
|
1279
1294
|
localState: props.context.localState,
|
|
@@ -1283,14 +1298,14 @@ function Block(props) {
|
|
|
1283
1298
|
shouldEvaluateBindings: true
|
|
1284
1299
|
});
|
|
1285
1300
|
});
|
|
1286
|
-
const Tag =
|
|
1301
|
+
const Tag = createMemo5(() => {
|
|
1287
1302
|
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
1288
1303
|
if (shouldUseLink) {
|
|
1289
1304
|
return props.linkComponent || "a";
|
|
1290
1305
|
}
|
|
1291
1306
|
return props.block.tagName || "div";
|
|
1292
1307
|
});
|
|
1293
|
-
const canShowBlock =
|
|
1308
|
+
const canShowBlock = createMemo5(() => {
|
|
1294
1309
|
if (props.block.repeat?.collection) {
|
|
1295
1310
|
if (repeatItem()?.length)
|
|
1296
1311
|
return true;
|
|
@@ -1300,21 +1315,21 @@ function Block(props) {
|
|
|
1300
1315
|
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
1301
1316
|
return shouldShow && !shouldHide;
|
|
1302
1317
|
});
|
|
1303
|
-
const childrenWithoutParentComponent =
|
|
1318
|
+
const childrenWithoutParentComponent = createMemo5(() => {
|
|
1304
1319
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
1305
1320
|
return shouldRenderChildrenOutsideRef ? processedBlock().children ?? [] : [];
|
|
1306
1321
|
});
|
|
1307
|
-
const componentRefProps =
|
|
1322
|
+
const componentRefProps = createMemo5(() => {
|
|
1308
1323
|
return {
|
|
1309
1324
|
blockChildren: processedBlock().children ?? [],
|
|
1310
1325
|
componentRef: blockComponent()?.component,
|
|
1311
1326
|
componentOptions: {
|
|
1312
1327
|
...getBlockComponentOptions(processedBlock()),
|
|
1313
1328
|
builderContext: props.context,
|
|
1314
|
-
...
|
|
1329
|
+
...shouldPassLinkComponent(blockComponent()?.name) ? {
|
|
1315
1330
|
builderLinkComponent: props.linkComponent
|
|
1316
1331
|
} : {},
|
|
1317
|
-
...
|
|
1332
|
+
...shouldPassRegisteredComponents(blockComponent()?.name) ? {
|
|
1318
1333
|
builderComponents: props.registeredComponents
|
|
1319
1334
|
} : {}
|
|
1320
1335
|
},
|
|
@@ -1398,11 +1413,11 @@ function Block(props) {
|
|
|
1398
1413
|
var Block_default = Block;
|
|
1399
1414
|
|
|
1400
1415
|
// src/components/blocks/blocks-wrapper.tsx
|
|
1401
|
-
import { createMemo as
|
|
1416
|
+
import { createMemo as createMemo6 } from "solid-js";
|
|
1402
1417
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
1403
1418
|
import { css } from "solid-styled-components";
|
|
1404
1419
|
function BlocksWrapper(props) {
|
|
1405
|
-
const className =
|
|
1420
|
+
const className = createMemo6(() => {
|
|
1406
1421
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
1407
1422
|
});
|
|
1408
1423
|
function onClick() {
|
|
@@ -1476,16 +1491,24 @@ function Blocks(props) {
|
|
|
1476
1491
|
}
|
|
1477
1492
|
var Blocks_default = Blocks;
|
|
1478
1493
|
|
|
1494
|
+
// src/blocks/columns/helpers.ts
|
|
1495
|
+
var getColumnsClass = (id) => {
|
|
1496
|
+
return `builder-columns ${id}-breakpoints`;
|
|
1497
|
+
};
|
|
1498
|
+
|
|
1479
1499
|
// src/blocks/columns/columns.tsx
|
|
1480
1500
|
function Columns(props) {
|
|
1481
|
-
const [gutterSize, setGutterSize] =
|
|
1501
|
+
const [gutterSize, setGutterSize] = createSignal7(
|
|
1482
1502
|
typeof props.space === "number" ? props.space || 0 : 20
|
|
1483
1503
|
);
|
|
1484
|
-
const [cols, setCols] =
|
|
1485
|
-
const [stackAt, setStackAt] =
|
|
1486
|
-
const [flexDir, setFlexDir] =
|
|
1504
|
+
const [cols, setCols] = createSignal7(props.columns || []);
|
|
1505
|
+
const [stackAt, setStackAt] = createSignal7(props.stackColumnsAt || "tablet");
|
|
1506
|
+
const [flexDir, setFlexDir] = createSignal7(
|
|
1487
1507
|
props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
1488
1508
|
);
|
|
1509
|
+
function getTagName(column) {
|
|
1510
|
+
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
1511
|
+
}
|
|
1489
1512
|
function getWidth(index) {
|
|
1490
1513
|
return cols()[index]?.width || 100 / cols().length;
|
|
1491
1514
|
}
|
|
@@ -1505,7 +1528,7 @@ function Columns(props) {
|
|
|
1505
1528
|
}) {
|
|
1506
1529
|
return stackAt() === "never" ? desktopStyle : stackedStyle;
|
|
1507
1530
|
}
|
|
1508
|
-
|
|
1531
|
+
function columnsCssVars() {
|
|
1509
1532
|
return {
|
|
1510
1533
|
"--flex-dir": flexDir(),
|
|
1511
1534
|
"--flex-dir-tablet": getTabletStyle({
|
|
@@ -1513,7 +1536,7 @@ function Columns(props) {
|
|
|
1513
1536
|
desktopStyle: "row"
|
|
1514
1537
|
})
|
|
1515
1538
|
};
|
|
1516
|
-
}
|
|
1539
|
+
}
|
|
1517
1540
|
function columnCssVars(index) {
|
|
1518
1541
|
const gutter = index === 0 ? 0 : gutterSize();
|
|
1519
1542
|
const width = getColumnCssWidth(index);
|
|
@@ -1554,7 +1577,7 @@ function Columns(props) {
|
|
|
1554
1577
|
);
|
|
1555
1578
|
return breakpointSizes[size].max;
|
|
1556
1579
|
}
|
|
1557
|
-
|
|
1580
|
+
function columnsStyles() {
|
|
1558
1581
|
return `
|
|
1559
1582
|
@media (max-width: ${getWidthForBreakpointSize("medium")}px) {
|
|
1560
1583
|
.${props.builderBlock.id}-breakpoints {
|
|
@@ -1580,9 +1603,19 @@ function Columns(props) {
|
|
|
1580
1603
|
}
|
|
1581
1604
|
},
|
|
1582
1605
|
`;
|
|
1583
|
-
}
|
|
1606
|
+
}
|
|
1607
|
+
function getAttributes(column, index) {
|
|
1608
|
+
return {
|
|
1609
|
+
...{},
|
|
1610
|
+
...column.link ? {
|
|
1611
|
+
href: column.link
|
|
1612
|
+
} : {},
|
|
1613
|
+
[getClassPropName()]: "builder-column",
|
|
1614
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
1615
|
+
};
|
|
1616
|
+
}
|
|
1584
1617
|
return <div
|
|
1585
|
-
class={
|
|
1618
|
+
class={getColumnsClass(props.builderBlock?.id) + " " + css2({
|
|
1586
1619
|
display: "flex",
|
|
1587
1620
|
lineHeight: "normal"
|
|
1588
1621
|
})}
|
|
@@ -1597,16 +1630,9 @@ function Columns(props) {
|
|
|
1597
1630
|
const index = _index();
|
|
1598
1631
|
return <Dynamic_renderer_default
|
|
1599
1632
|
key={index}
|
|
1600
|
-
TagName={column
|
|
1633
|
+
TagName={getTagName(column)}
|
|
1601
1634
|
actionAttributes={{}}
|
|
1602
|
-
attributes={
|
|
1603
|
-
...{},
|
|
1604
|
-
...column.link ? {
|
|
1605
|
-
href: column.link
|
|
1606
|
-
} : {},
|
|
1607
|
-
[getClassPropName()]: "builder-column",
|
|
1608
|
-
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
1609
|
-
}}
|
|
1635
|
+
attributes={getAttributes(column, index)}
|
|
1610
1636
|
><Blocks_default
|
|
1611
1637
|
path={`component.options.columns.${index}.blocks`}
|
|
1612
1638
|
parent={props.builderBlock.id}
|
|
@@ -1630,7 +1656,7 @@ function FragmentComponent(props) {
|
|
|
1630
1656
|
var fragment_default = FragmentComponent;
|
|
1631
1657
|
|
|
1632
1658
|
// src/blocks/image/image.tsx
|
|
1633
|
-
import { Show as Show7, createMemo as
|
|
1659
|
+
import { Show as Show7, createMemo as createMemo8 } from "solid-js";
|
|
1634
1660
|
import { css as css3 } from "solid-styled-components";
|
|
1635
1661
|
|
|
1636
1662
|
// src/blocks/image/image.helpers.ts
|
|
@@ -1682,7 +1708,7 @@ function getSrcSet(url) {
|
|
|
1682
1708
|
|
|
1683
1709
|
// src/blocks/image/image.tsx
|
|
1684
1710
|
function Image(props) {
|
|
1685
|
-
const srcSetToUse =
|
|
1711
|
+
const srcSetToUse = createMemo8(() => {
|
|
1686
1712
|
const imageToUse = props.image || props.src;
|
|
1687
1713
|
const url = imageToUse;
|
|
1688
1714
|
if (!url || // We can auto add srcset for cdn.builder.io and shopify
|
|
@@ -1699,14 +1725,14 @@ function Image(props) {
|
|
|
1699
1725
|
}
|
|
1700
1726
|
return getSrcSet(url);
|
|
1701
1727
|
});
|
|
1702
|
-
const webpSrcSet =
|
|
1728
|
+
const webpSrcSet = createMemo8(() => {
|
|
1703
1729
|
if (srcSetToUse()?.match(/builder\.io/) && !props.noWebp) {
|
|
1704
1730
|
return srcSetToUse().replace(/\?/g, "?format=webp&");
|
|
1705
1731
|
} else {
|
|
1706
1732
|
return "";
|
|
1707
1733
|
}
|
|
1708
1734
|
});
|
|
1709
|
-
const aspectRatioCss =
|
|
1735
|
+
const aspectRatioCss = createMemo8(() => {
|
|
1710
1736
|
const aspectRatioStyles = {
|
|
1711
1737
|
position: "absolute",
|
|
1712
1738
|
height: "100%",
|
|
@@ -1751,7 +1777,7 @@ function Image(props) {
|
|
|
1751
1777
|
}}
|
|
1752
1778
|
/></Show7>
|
|
1753
1779
|
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
1754
|
-
<Show7 when={!props.fitContent && props.children}><div
|
|
1780
|
+
<Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div
|
|
1755
1781
|
class={css3({
|
|
1756
1782
|
display: "flex",
|
|
1757
1783
|
flexDirection: "column",
|
|
@@ -1789,10 +1815,10 @@ function SectionComponent(props) {
|
|
|
1789
1815
|
var section_default = SectionComponent;
|
|
1790
1816
|
|
|
1791
1817
|
// src/blocks/symbol/symbol.tsx
|
|
1792
|
-
import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as
|
|
1818
|
+
import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as createMemo18, createSignal as createSignal18 } from "solid-js";
|
|
1793
1819
|
|
|
1794
1820
|
// src/components/content-variants/content-variants.tsx
|
|
1795
|
-
import { Show as
|
|
1821
|
+
import { Show as Show13, For as For8, onMount as onMount4, createSignal as createSignal17, createMemo as createMemo17 } from "solid-js";
|
|
1796
1822
|
|
|
1797
1823
|
// src/helpers/url.ts
|
|
1798
1824
|
var getTopLevelDomain = (host) => {
|
|
@@ -1986,7 +2012,7 @@ var handleABTesting = async ({
|
|
|
1986
2012
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
1987
2013
|
|
|
1988
2014
|
// src/components/content/content.tsx
|
|
1989
|
-
import { Show as
|
|
2015
|
+
import { Show as Show12, createSignal as createSignal16 } from "solid-js";
|
|
1990
2016
|
|
|
1991
2017
|
// src/blocks/button/component-info.ts
|
|
1992
2018
|
var componentInfo = {
|
|
@@ -2487,8 +2513,203 @@ var componentInfo7 = {
|
|
|
2487
2513
|
}]
|
|
2488
2514
|
};
|
|
2489
2515
|
|
|
2490
|
-
// src/blocks/
|
|
2516
|
+
// src/blocks/tabs/component-info.ts
|
|
2517
|
+
var defaultTab = {
|
|
2518
|
+
"@type": "@builder.io/sdk:Element",
|
|
2519
|
+
responsiveStyles: {
|
|
2520
|
+
large: {
|
|
2521
|
+
paddingLeft: "20px",
|
|
2522
|
+
paddingRight: "20px",
|
|
2523
|
+
paddingTop: "10px",
|
|
2524
|
+
paddingBottom: "10px",
|
|
2525
|
+
minWidth: "100px",
|
|
2526
|
+
textAlign: "center",
|
|
2527
|
+
display: "flex",
|
|
2528
|
+
flexDirection: "column",
|
|
2529
|
+
cursor: "pointer",
|
|
2530
|
+
userSelect: "none"
|
|
2531
|
+
}
|
|
2532
|
+
},
|
|
2533
|
+
component: {
|
|
2534
|
+
name: "Text",
|
|
2535
|
+
options: {
|
|
2536
|
+
text: "New tab"
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
};
|
|
2540
|
+
var defaultElement = {
|
|
2541
|
+
"@type": "@builder.io/sdk:Element",
|
|
2542
|
+
responsiveStyles: {
|
|
2543
|
+
large: {
|
|
2544
|
+
height: "200px",
|
|
2545
|
+
display: "flex",
|
|
2546
|
+
marginTop: "20px",
|
|
2547
|
+
flexDirection: "column"
|
|
2548
|
+
}
|
|
2549
|
+
},
|
|
2550
|
+
component: {
|
|
2551
|
+
name: "Text",
|
|
2552
|
+
options: {
|
|
2553
|
+
text: "New tab content "
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
};
|
|
2491
2557
|
var componentInfo8 = {
|
|
2558
|
+
name: "Builder: Tabs",
|
|
2559
|
+
inputs: [{
|
|
2560
|
+
name: "tabs",
|
|
2561
|
+
type: "list",
|
|
2562
|
+
broadcast: true,
|
|
2563
|
+
subFields: [{
|
|
2564
|
+
name: "label",
|
|
2565
|
+
type: "uiBlocks",
|
|
2566
|
+
hideFromUI: true,
|
|
2567
|
+
defaultValue: [defaultTab]
|
|
2568
|
+
}, {
|
|
2569
|
+
name: "content",
|
|
2570
|
+
type: "uiBlocks",
|
|
2571
|
+
hideFromUI: true,
|
|
2572
|
+
defaultValue: [defaultElement]
|
|
2573
|
+
}],
|
|
2574
|
+
defaultValue: [{
|
|
2575
|
+
label: [{
|
|
2576
|
+
...defaultTab,
|
|
2577
|
+
component: {
|
|
2578
|
+
name: "Text",
|
|
2579
|
+
options: {
|
|
2580
|
+
text: "Tab 1"
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2583
|
+
}],
|
|
2584
|
+
content: [{
|
|
2585
|
+
...defaultElement,
|
|
2586
|
+
component: {
|
|
2587
|
+
name: "Text",
|
|
2588
|
+
options: {
|
|
2589
|
+
text: "Tab 1 content"
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
}]
|
|
2593
|
+
}, {
|
|
2594
|
+
label: [{
|
|
2595
|
+
...defaultTab,
|
|
2596
|
+
component: {
|
|
2597
|
+
name: "Text",
|
|
2598
|
+
options: {
|
|
2599
|
+
text: "Tab 2"
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2602
|
+
}],
|
|
2603
|
+
content: [{
|
|
2604
|
+
...defaultElement,
|
|
2605
|
+
component: {
|
|
2606
|
+
name: "Text",
|
|
2607
|
+
options: {
|
|
2608
|
+
text: "Tab 2 content"
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
}]
|
|
2612
|
+
}]
|
|
2613
|
+
}, {
|
|
2614
|
+
name: "activeTabStyle",
|
|
2615
|
+
type: "uiStyle",
|
|
2616
|
+
helperText: "CSS styles for the active tab",
|
|
2617
|
+
defaultValue: {
|
|
2618
|
+
backgroundColor: "rgba(0, 0, 0, 0.1)"
|
|
2619
|
+
}
|
|
2620
|
+
}, {
|
|
2621
|
+
name: "defaultActiveTab",
|
|
2622
|
+
type: "number",
|
|
2623
|
+
helperText: 'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',
|
|
2624
|
+
defaultValue: 1,
|
|
2625
|
+
advanced: true
|
|
2626
|
+
}, {
|
|
2627
|
+
name: "collapsible",
|
|
2628
|
+
type: "boolean",
|
|
2629
|
+
helperText: "If on, clicking an open tab closes it so no tabs are active",
|
|
2630
|
+
defaultValue: false,
|
|
2631
|
+
advanced: true
|
|
2632
|
+
}, {
|
|
2633
|
+
name: "tabHeaderLayout",
|
|
2634
|
+
type: "enum",
|
|
2635
|
+
helperText: "Change the layout of the tab headers (uses justify-content)",
|
|
2636
|
+
defaultValue: "flex-start",
|
|
2637
|
+
enum: [{
|
|
2638
|
+
label: "Center",
|
|
2639
|
+
value: "center"
|
|
2640
|
+
}, {
|
|
2641
|
+
label: "Space between",
|
|
2642
|
+
value: "space-between"
|
|
2643
|
+
}, {
|
|
2644
|
+
label: "Space around",
|
|
2645
|
+
value: "space-around"
|
|
2646
|
+
}, {
|
|
2647
|
+
label: "Left",
|
|
2648
|
+
value: "flex-start"
|
|
2649
|
+
}, {
|
|
2650
|
+
label: "Right",
|
|
2651
|
+
value: "flex-end"
|
|
2652
|
+
}]
|
|
2653
|
+
}]
|
|
2654
|
+
};
|
|
2655
|
+
|
|
2656
|
+
// src/blocks/tabs/tabs.tsx
|
|
2657
|
+
import { Show as Show8, For as For5, createSignal as createSignal9 } from "solid-js";
|
|
2658
|
+
function Tabs(props) {
|
|
2659
|
+
const [activeTab, setActiveTab] = createSignal9(
|
|
2660
|
+
props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
|
|
2661
|
+
);
|
|
2662
|
+
function activeTabContent(active) {
|
|
2663
|
+
return props.tabs && props.tabs[active].content;
|
|
2664
|
+
}
|
|
2665
|
+
function getActiveTabStyle(index) {
|
|
2666
|
+
return activeTab() === index ? props.activeTabStyle : {};
|
|
2667
|
+
}
|
|
2668
|
+
return <div>
|
|
2669
|
+
<div
|
|
2670
|
+
class="builder-tabs-wrap"
|
|
2671
|
+
style={{
|
|
2672
|
+
display: "flex",
|
|
2673
|
+
"flex-direction": "row",
|
|
2674
|
+
"justify-content": props.tabHeaderLayout || "flex-start",
|
|
2675
|
+
overflow: "auto"
|
|
2676
|
+
}}
|
|
2677
|
+
><For5 each={props.tabs}>{(tab, _index) => {
|
|
2678
|
+
const index = _index();
|
|
2679
|
+
return <span
|
|
2680
|
+
class={`builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`}
|
|
2681
|
+
key={index}
|
|
2682
|
+
style={getActiveTabStyle(index)}
|
|
2683
|
+
onClick={(event) => {
|
|
2684
|
+
if (index === activeTab() && props.collapsible) {
|
|
2685
|
+
setActiveTab(-1);
|
|
2686
|
+
} else {
|
|
2687
|
+
setActiveTab(index);
|
|
2688
|
+
}
|
|
2689
|
+
}}
|
|
2690
|
+
><Blocks_default
|
|
2691
|
+
parent={props.builderBlock.id}
|
|
2692
|
+
path={`component.options.tabs.${index}.label`}
|
|
2693
|
+
blocks={tab.label}
|
|
2694
|
+
context={props.builderContext}
|
|
2695
|
+
registeredComponents={props.builderComponents}
|
|
2696
|
+
linkComponent={props.builderLinkComponent}
|
|
2697
|
+
/></span>;
|
|
2698
|
+
}}</For5></div>
|
|
2699
|
+
<Show8 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
2700
|
+
parent={props.builderBlock.id}
|
|
2701
|
+
path={`component.options.tabs.${activeTab()}.content`}
|
|
2702
|
+
blocks={activeTabContent(activeTab())}
|
|
2703
|
+
context={props.builderContext}
|
|
2704
|
+
registeredComponents={props.builderComponents}
|
|
2705
|
+
linkComponent={props.builderLinkComponent}
|
|
2706
|
+
/></div></Show8>
|
|
2707
|
+
</div>;
|
|
2708
|
+
}
|
|
2709
|
+
var tabs_default = Tabs;
|
|
2710
|
+
|
|
2711
|
+
// src/blocks/text/component-info.ts
|
|
2712
|
+
var componentInfo9 = {
|
|
2492
2713
|
name: "Text",
|
|
2493
2714
|
static: true,
|
|
2494
2715
|
isRSC: true,
|
|
@@ -2521,7 +2742,7 @@ function Text(props) {
|
|
|
2521
2742
|
var text_default = Text;
|
|
2522
2743
|
|
|
2523
2744
|
// src/blocks/custom-code/component-info.ts
|
|
2524
|
-
var
|
|
2745
|
+
var componentInfo10 = {
|
|
2525
2746
|
name: "Custom Code",
|
|
2526
2747
|
static: true,
|
|
2527
2748
|
requiredPermissions: ["editCode"],
|
|
@@ -2546,10 +2767,10 @@ var componentInfo9 = {
|
|
|
2546
2767
|
};
|
|
2547
2768
|
|
|
2548
2769
|
// src/blocks/custom-code/custom-code.tsx
|
|
2549
|
-
import { onMount as onMount2, createSignal as
|
|
2770
|
+
import { onMount as onMount2, createSignal as createSignal10 } from "solid-js";
|
|
2550
2771
|
function CustomCode(props) {
|
|
2551
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
2552
|
-
const [scriptsRun, setScriptsRun] =
|
|
2772
|
+
const [scriptsInserted, setScriptsInserted] = createSignal10([]);
|
|
2773
|
+
const [scriptsRun, setScriptsRun] = createSignal10([]);
|
|
2553
2774
|
let elementRef;
|
|
2554
2775
|
onMount2(() => {
|
|
2555
2776
|
if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
|
|
@@ -2592,7 +2813,7 @@ function CustomCode(props) {
|
|
|
2592
2813
|
var custom_code_default = CustomCode;
|
|
2593
2814
|
|
|
2594
2815
|
// src/blocks/embed/component-info.ts
|
|
2595
|
-
var
|
|
2816
|
+
var componentInfo11 = {
|
|
2596
2817
|
name: "Embed",
|
|
2597
2818
|
static: true,
|
|
2598
2819
|
inputs: [{
|
|
@@ -2630,7 +2851,7 @@ var componentInfo10 = {
|
|
|
2630
2851
|
};
|
|
2631
2852
|
|
|
2632
2853
|
// src/blocks/embed/embed.tsx
|
|
2633
|
-
import { on, createEffect, createMemo as
|
|
2854
|
+
import { on, createEffect, createMemo as createMemo11, createSignal as createSignal11 } from "solid-js";
|
|
2634
2855
|
|
|
2635
2856
|
// src/blocks/embed/helpers.ts
|
|
2636
2857
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -2638,9 +2859,9 @@ var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
|
2638
2859
|
|
|
2639
2860
|
// src/blocks/embed/embed.tsx
|
|
2640
2861
|
function Embed(props) {
|
|
2641
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
2642
|
-
const [scriptsRun, setScriptsRun] =
|
|
2643
|
-
const [ranInitFn, setRanInitFn] =
|
|
2862
|
+
const [scriptsInserted, setScriptsInserted] = createSignal11([]);
|
|
2863
|
+
const [scriptsRun, setScriptsRun] = createSignal11([]);
|
|
2864
|
+
const [ranInitFn, setRanInitFn] = createSignal11(false);
|
|
2644
2865
|
function findAndRunScripts() {
|
|
2645
2866
|
if (!elem || !elem.getElementsByTagName)
|
|
2646
2867
|
return;
|
|
@@ -2663,8 +2884,8 @@ function Embed(props) {
|
|
|
2663
2884
|
}
|
|
2664
2885
|
}
|
|
2665
2886
|
let elem;
|
|
2666
|
-
const onUpdateFn_0_elem =
|
|
2667
|
-
const onUpdateFn_0_ranInitFn__ =
|
|
2887
|
+
const onUpdateFn_0_elem = createMemo11(() => elem);
|
|
2888
|
+
const onUpdateFn_0_ranInitFn__ = createMemo11(() => ranInitFn());
|
|
2668
2889
|
function onUpdateFn_0() {
|
|
2669
2890
|
if (elem && !ranInitFn()) {
|
|
2670
2891
|
setRanInitFn(true);
|
|
@@ -2679,7 +2900,7 @@ function Embed(props) {
|
|
|
2679
2900
|
var embed_default = Embed;
|
|
2680
2901
|
|
|
2681
2902
|
// src/blocks/form/form/component-info.ts
|
|
2682
|
-
var
|
|
2903
|
+
var componentInfo12 = {
|
|
2683
2904
|
name: "Form:Form",
|
|
2684
2905
|
// editableTags: ['builder-form-error']
|
|
2685
2906
|
defaults: {
|
|
@@ -2913,7 +3134,7 @@ var componentInfo11 = {
|
|
|
2913
3134
|
};
|
|
2914
3135
|
|
|
2915
3136
|
// src/blocks/form/form/form.tsx
|
|
2916
|
-
import { Show as
|
|
3137
|
+
import { Show as Show9, For as For6, createSignal as createSignal12 } from "solid-js";
|
|
2917
3138
|
import { css as css4 } from "solid-styled-components";
|
|
2918
3139
|
|
|
2919
3140
|
// src/functions/get-env.ts
|
|
@@ -2931,9 +3152,9 @@ var get = (obj, path, defaultValue) => {
|
|
|
2931
3152
|
|
|
2932
3153
|
// src/blocks/form/form/form.tsx
|
|
2933
3154
|
function FormComponent(props) {
|
|
2934
|
-
const [formState, setFormState] =
|
|
2935
|
-
const [responseData, setResponseData] =
|
|
2936
|
-
const [formErrorMessage, setFormErrorMessage] =
|
|
3155
|
+
const [formState, setFormState] = createSignal12("unsubmitted");
|
|
3156
|
+
const [responseData, setResponseData] = createSignal12(null);
|
|
3157
|
+
const [formErrorMessage, setFormErrorMessage] = createSignal12("");
|
|
2937
3158
|
function mergeNewRootState(newData) {
|
|
2938
3159
|
const combinedState = {
|
|
2939
3160
|
...props.builderContext.rootState,
|
|
@@ -3129,7 +3350,7 @@ function FormComponent(props) {
|
|
|
3129
3350
|
{...{}}
|
|
3130
3351
|
{...props.attributes}
|
|
3131
3352
|
>
|
|
3132
|
-
<
|
|
3353
|
+
<Show9 when={props.builderBlock && props.builderBlock.children}><For6 each={props.builderBlock?.children}>{(block, _index) => {
|
|
3133
3354
|
const idx = _index();
|
|
3134
3355
|
return <Block_default
|
|
3135
3356
|
key={`form-block-${idx}`}
|
|
@@ -3138,35 +3359,35 @@ function FormComponent(props) {
|
|
|
3138
3359
|
registeredComponents={props.builderComponents}
|
|
3139
3360
|
linkComponent={props.builderLinkComponent}
|
|
3140
3361
|
/>;
|
|
3141
|
-
}}</
|
|
3142
|
-
<
|
|
3362
|
+
}}</For6></Show9>
|
|
3363
|
+
<Show9 when={submissionState() === "error"}><Blocks_default
|
|
3143
3364
|
path="errorMessage"
|
|
3144
3365
|
blocks={props.errorMessage}
|
|
3145
3366
|
context={props.builderContext}
|
|
3146
|
-
/></
|
|
3147
|
-
<
|
|
3367
|
+
/></Show9>
|
|
3368
|
+
<Show9 when={submissionState() === "sending"}><Blocks_default
|
|
3148
3369
|
path="sendingMessage"
|
|
3149
3370
|
blocks={props.sendingMessage}
|
|
3150
3371
|
context={props.builderContext}
|
|
3151
|
-
/></
|
|
3152
|
-
<
|
|
3372
|
+
/></Show9>
|
|
3373
|
+
<Show9 when={submissionState() === "error" && responseData()}><pre
|
|
3153
3374
|
class={"builder-form-error-text " + css4({
|
|
3154
3375
|
padding: "10px",
|
|
3155
3376
|
color: "red",
|
|
3156
3377
|
textAlign: "center"
|
|
3157
3378
|
})}
|
|
3158
|
-
>{JSON.stringify(responseData(), null, 2)}</pre></
|
|
3159
|
-
<
|
|
3379
|
+
>{JSON.stringify(responseData(), null, 2)}</pre></Show9>
|
|
3380
|
+
<Show9 when={submissionState() === "success"}><Blocks_default
|
|
3160
3381
|
path="successMessage"
|
|
3161
3382
|
blocks={props.successMessage}
|
|
3162
3383
|
context={props.builderContext}
|
|
3163
|
-
/></
|
|
3384
|
+
/></Show9>
|
|
3164
3385
|
</form>;
|
|
3165
3386
|
}
|
|
3166
3387
|
var form_default = FormComponent;
|
|
3167
3388
|
|
|
3168
3389
|
// src/blocks/form/input/component-info.ts
|
|
3169
|
-
var
|
|
3390
|
+
var componentInfo13 = {
|
|
3170
3391
|
name: "Form:Input",
|
|
3171
3392
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3172
3393
|
inputs: [
|
|
@@ -3236,7 +3457,7 @@ function FormInputComponent(props) {
|
|
|
3236
3457
|
var input_default = FormInputComponent;
|
|
3237
3458
|
|
|
3238
3459
|
// src/blocks/form/select/component-info.ts
|
|
3239
|
-
var
|
|
3460
|
+
var componentInfo14 = {
|
|
3240
3461
|
name: "Form:Select",
|
|
3241
3462
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3242
3463
|
defaultStyles: {
|
|
@@ -3281,7 +3502,7 @@ var componentInfo13 = {
|
|
|
3281
3502
|
};
|
|
3282
3503
|
|
|
3283
3504
|
// src/blocks/form/select/select.tsx
|
|
3284
|
-
import { For as
|
|
3505
|
+
import { For as For7 } from "solid-js";
|
|
3285
3506
|
function SelectComponent(props) {
|
|
3286
3507
|
return <select
|
|
3287
3508
|
{...{}}
|
|
@@ -3290,15 +3511,15 @@ function SelectComponent(props) {
|
|
|
3290
3511
|
key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
|
|
3291
3512
|
defaultValue={props.defaultValue}
|
|
3292
3513
|
name={props.name}
|
|
3293
|
-
><
|
|
3514
|
+
><For7 each={props.options}>{(option, _index) => {
|
|
3294
3515
|
const index = _index();
|
|
3295
3516
|
return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
|
|
3296
|
-
}}</
|
|
3517
|
+
}}</For7></select>;
|
|
3297
3518
|
}
|
|
3298
3519
|
var select_default = SelectComponent;
|
|
3299
3520
|
|
|
3300
3521
|
// src/blocks/form/submit-button/component-info.ts
|
|
3301
|
-
var
|
|
3522
|
+
var componentInfo15 = {
|
|
3302
3523
|
name: "Form:SubmitButton",
|
|
3303
3524
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3304
3525
|
defaultStyles: {
|
|
@@ -3332,7 +3553,7 @@ function SubmitButton(props) {
|
|
|
3332
3553
|
var submit_button_default = SubmitButton;
|
|
3333
3554
|
|
|
3334
3555
|
// src/blocks/img/component-info.ts
|
|
3335
|
-
var
|
|
3556
|
+
var componentInfo16 = {
|
|
3336
3557
|
// friendlyName?
|
|
3337
3558
|
name: "Raw:Img",
|
|
3338
3559
|
hideFromInsertMenu: true,
|
|
@@ -3365,7 +3586,7 @@ function ImgComponent(props) {
|
|
|
3365
3586
|
var img_default = ImgComponent;
|
|
3366
3587
|
|
|
3367
3588
|
// src/blocks/video/component-info.ts
|
|
3368
|
-
var
|
|
3589
|
+
var componentInfo17 = {
|
|
3369
3590
|
name: "Video",
|
|
3370
3591
|
canHaveChildren: true,
|
|
3371
3592
|
defaultStyles: {
|
|
@@ -3449,9 +3670,9 @@ var componentInfo16 = {
|
|
|
3449
3670
|
};
|
|
3450
3671
|
|
|
3451
3672
|
// src/blocks/video/video.tsx
|
|
3452
|
-
import { Show as
|
|
3673
|
+
import { Show as Show10, createMemo as createMemo13 } from "solid-js";
|
|
3453
3674
|
function Video(props) {
|
|
3454
|
-
const videoProps =
|
|
3675
|
+
const videoProps = createMemo13(() => {
|
|
3455
3676
|
return {
|
|
3456
3677
|
...props.autoPlay === true ? {
|
|
3457
3678
|
autoPlay: true
|
|
@@ -3470,7 +3691,7 @@ function Video(props) {
|
|
|
3470
3691
|
} : {}
|
|
3471
3692
|
};
|
|
3472
3693
|
});
|
|
3473
|
-
const spreadProps =
|
|
3694
|
+
const spreadProps = createMemo13(() => {
|
|
3474
3695
|
return {
|
|
3475
3696
|
...videoProps()
|
|
3476
3697
|
};
|
|
@@ -3500,8 +3721,8 @@ function Video(props) {
|
|
|
3500
3721
|
}}
|
|
3501
3722
|
src={props.video || "no-src"}
|
|
3502
3723
|
poster={props.posterImage}
|
|
3503
|
-
><
|
|
3504
|
-
<
|
|
3724
|
+
><Show10 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show10></video>
|
|
3725
|
+
<Show10
|
|
3505
3726
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
3506
3727
|
><div
|
|
3507
3728
|
style={{
|
|
@@ -3510,15 +3731,15 @@ function Video(props) {
|
|
|
3510
3731
|
"pointer-events": "none",
|
|
3511
3732
|
"font-size": "0px"
|
|
3512
3733
|
}}
|
|
3513
|
-
/></
|
|
3514
|
-
<
|
|
3734
|
+
/></Show10>
|
|
3735
|
+
<Show10 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
3515
3736
|
style={{
|
|
3516
3737
|
display: "flex",
|
|
3517
3738
|
"flex-direction": "column",
|
|
3518
3739
|
"align-items": "stretch"
|
|
3519
3740
|
}}
|
|
3520
|
-
>{props.children}</div></
|
|
3521
|
-
<
|
|
3741
|
+
>{props.children}</div></Show10>
|
|
3742
|
+
<Show10 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
3522
3743
|
style={{
|
|
3523
3744
|
"pointer-events": "none",
|
|
3524
3745
|
display: "flex",
|
|
@@ -3530,7 +3751,7 @@ function Video(props) {
|
|
|
3530
3751
|
width: "100%",
|
|
3531
3752
|
height: "100%"
|
|
3532
3753
|
}}
|
|
3533
|
-
>{props.children}</div></
|
|
3754
|
+
>{props.children}</div></Show10>
|
|
3534
3755
|
</div>;
|
|
3535
3756
|
}
|
|
3536
3757
|
var video_default = Video;
|
|
@@ -3538,28 +3759,28 @@ var video_default = Video;
|
|
|
3538
3759
|
// src/constants/extra-components.ts
|
|
3539
3760
|
var getExtraComponents = () => [{
|
|
3540
3761
|
component: custom_code_default,
|
|
3541
|
-
...
|
|
3762
|
+
...componentInfo10
|
|
3542
3763
|
}, {
|
|
3543
3764
|
component: embed_default,
|
|
3544
|
-
...
|
|
3765
|
+
...componentInfo11
|
|
3545
3766
|
}, ...TARGET === "rsc" ? [] : [{
|
|
3546
3767
|
component: form_default,
|
|
3547
|
-
...
|
|
3768
|
+
...componentInfo12
|
|
3548
3769
|
}, {
|
|
3549
3770
|
component: input_default,
|
|
3550
|
-
...
|
|
3771
|
+
...componentInfo13
|
|
3551
3772
|
}, {
|
|
3552
3773
|
component: submit_button_default,
|
|
3553
|
-
...
|
|
3774
|
+
...componentInfo15
|
|
3554
3775
|
}, {
|
|
3555
3776
|
component: select_default,
|
|
3556
|
-
...
|
|
3777
|
+
...componentInfo14
|
|
3557
3778
|
}], {
|
|
3558
3779
|
component: img_default,
|
|
3559
|
-
...
|
|
3780
|
+
...componentInfo16
|
|
3560
3781
|
}, {
|
|
3561
3782
|
component: video_default,
|
|
3562
|
-
...
|
|
3783
|
+
...componentInfo17
|
|
3563
3784
|
}];
|
|
3564
3785
|
|
|
3565
3786
|
// src/constants/builder-registered-components.ts
|
|
@@ -3586,8 +3807,11 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
3586
3807
|
...componentInfo7
|
|
3587
3808
|
}, {
|
|
3588
3809
|
component: text_default,
|
|
3810
|
+
...componentInfo9
|
|
3811
|
+
}, ...TARGET === "rsc" ? [] : [{
|
|
3812
|
+
component: tabs_default,
|
|
3589
3813
|
...componentInfo8
|
|
3590
|
-
}, ...getExtraComponents()];
|
|
3814
|
+
}], ...getExtraComponents()];
|
|
3591
3815
|
|
|
3592
3816
|
// src/functions/register-component.ts
|
|
3593
3817
|
var createRegisterComponentMessage = (info) => ({
|
|
@@ -3665,12 +3889,12 @@ var Inlined_script_default = InlinedScript;
|
|
|
3665
3889
|
|
|
3666
3890
|
// src/components/content/components/enable-editor.tsx
|
|
3667
3891
|
import {
|
|
3668
|
-
Show as
|
|
3892
|
+
Show as Show11,
|
|
3669
3893
|
onMount as onMount3,
|
|
3670
3894
|
on as on2,
|
|
3671
3895
|
createEffect as createEffect2,
|
|
3672
|
-
createMemo as
|
|
3673
|
-
createSignal as
|
|
3896
|
+
createMemo as createMemo14,
|
|
3897
|
+
createSignal as createSignal14
|
|
3674
3898
|
} from "solid-js";
|
|
3675
3899
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
3676
3900
|
|
|
@@ -4153,7 +4377,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4153
4377
|
}
|
|
4154
4378
|
|
|
4155
4379
|
// src/constants/sdk-version.ts
|
|
4156
|
-
var SDK_VERSION = "1.0.
|
|
4380
|
+
var SDK_VERSION = "1.0.24";
|
|
4157
4381
|
|
|
4158
4382
|
// src/functions/register.ts
|
|
4159
4383
|
var registry = {};
|
|
@@ -4349,14 +4573,93 @@ var subscribeToEditor = (model, callback, options) => {
|
|
|
4349
4573
|
};
|
|
4350
4574
|
};
|
|
4351
4575
|
|
|
4576
|
+
// src/components/content/components/styles.helpers.ts
|
|
4577
|
+
var getCssFromFont = (font) => {
|
|
4578
|
+
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
4579
|
+
const name = family.split(",")[0];
|
|
4580
|
+
const url = font.fileUrl ?? font?.files?.regular;
|
|
4581
|
+
let str = "";
|
|
4582
|
+
if (url && family && name) {
|
|
4583
|
+
str += `
|
|
4584
|
+
@font-face {
|
|
4585
|
+
font-family: "${family}";
|
|
4586
|
+
src: local("${name}"), url('${url}') format('woff2');
|
|
4587
|
+
font-display: fallback;
|
|
4588
|
+
font-weight: 400;
|
|
4589
|
+
}
|
|
4590
|
+
`.trim();
|
|
4591
|
+
}
|
|
4592
|
+
if (font.files) {
|
|
4593
|
+
for (const weight in font.files) {
|
|
4594
|
+
const isNumber = String(Number(weight)) === weight;
|
|
4595
|
+
if (!isNumber) {
|
|
4596
|
+
continue;
|
|
4597
|
+
}
|
|
4598
|
+
const weightUrl = font.files[weight];
|
|
4599
|
+
if (weightUrl && weightUrl !== url) {
|
|
4600
|
+
str += `
|
|
4601
|
+
@font-face {
|
|
4602
|
+
font-family: "${family}";
|
|
4603
|
+
src: url('${weightUrl}') format('woff2');
|
|
4604
|
+
font-display: fallback;
|
|
4605
|
+
font-weight: ${weight};
|
|
4606
|
+
}
|
|
4607
|
+
`.trim();
|
|
4608
|
+
}
|
|
4609
|
+
}
|
|
4610
|
+
}
|
|
4611
|
+
return str;
|
|
4612
|
+
};
|
|
4613
|
+
var getFontCss = ({
|
|
4614
|
+
customFonts
|
|
4615
|
+
}) => {
|
|
4616
|
+
return customFonts?.map((font) => getCssFromFont(font))?.join(" ") || "";
|
|
4617
|
+
};
|
|
4618
|
+
var getCss = ({
|
|
4619
|
+
cssCode,
|
|
4620
|
+
contentId
|
|
4621
|
+
}) => {
|
|
4622
|
+
if (!cssCode) {
|
|
4623
|
+
return "";
|
|
4624
|
+
}
|
|
4625
|
+
if (!contentId) {
|
|
4626
|
+
return cssCode;
|
|
4627
|
+
}
|
|
4628
|
+
return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
|
|
4629
|
+
};
|
|
4630
|
+
var DEFAULT_STYLES = `
|
|
4631
|
+
.builder-button {
|
|
4632
|
+
all: unset;
|
|
4633
|
+
}
|
|
4634
|
+
|
|
4635
|
+
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
4636
|
+
margin: 0;
|
|
4637
|
+
}
|
|
4638
|
+
.builder-text > p, .builder-text > .builder-paragraph {
|
|
4639
|
+
color: inherit;
|
|
4640
|
+
line-height: inherit;
|
|
4641
|
+
letter-spacing: inherit;
|
|
4642
|
+
font-weight: inherit;
|
|
4643
|
+
font-size: inherit;
|
|
4644
|
+
text-align: inherit;
|
|
4645
|
+
font-family: inherit;
|
|
4646
|
+
}
|
|
4647
|
+
`;
|
|
4648
|
+
var getDefaultStyles = (isNested) => {
|
|
4649
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
4650
|
+
};
|
|
4651
|
+
var getWrapperClassName = (variationId) => {
|
|
4652
|
+
return `variant-${variationId}`;
|
|
4653
|
+
};
|
|
4654
|
+
|
|
4352
4655
|
// src/components/content/components/enable-editor.tsx
|
|
4353
4656
|
function EnableEditor(props) {
|
|
4354
|
-
const [ContentWrapper, setContentWrapper] =
|
|
4657
|
+
const [ContentWrapper, setContentWrapper] = createSignal14(
|
|
4355
4658
|
props.contentWrapper || "div"
|
|
4356
4659
|
);
|
|
4357
|
-
const [httpReqsData, setHttpReqsData] =
|
|
4358
|
-
const [httpReqsPending, setHttpReqsPending] =
|
|
4359
|
-
const [clicked, setClicked] =
|
|
4660
|
+
const [httpReqsData, setHttpReqsData] = createSignal14({});
|
|
4661
|
+
const [httpReqsPending, setHttpReqsPending] = createSignal14({});
|
|
4662
|
+
const [clicked, setClicked] = createSignal14(false);
|
|
4360
4663
|
function mergeNewRootState(newData) {
|
|
4361
4664
|
const combinedState = {
|
|
4362
4665
|
...props.builderContextSignal.rootState,
|
|
@@ -4390,6 +4693,12 @@ function EnableEditor(props) {
|
|
|
4390
4693
|
content: newContentValue
|
|
4391
4694
|
}));
|
|
4392
4695
|
}
|
|
4696
|
+
const showContentProps = createMemo14(() => {
|
|
4697
|
+
return props.showContent ? {} : {
|
|
4698
|
+
hidden: true,
|
|
4699
|
+
"aria-hidden": true
|
|
4700
|
+
};
|
|
4701
|
+
});
|
|
4393
4702
|
function processMessage(event) {
|
|
4394
4703
|
return createEditorListener({
|
|
4395
4704
|
model: props.model,
|
|
@@ -4574,14 +4883,14 @@ function EnableEditor(props) {
|
|
|
4574
4883
|
runHttpRequests();
|
|
4575
4884
|
emitStateUpdate();
|
|
4576
4885
|
});
|
|
4577
|
-
const onUpdateFn_0_props_content =
|
|
4886
|
+
const onUpdateFn_0_props_content = createMemo14(() => props.content);
|
|
4578
4887
|
function onUpdateFn_0() {
|
|
4579
4888
|
if (props.content) {
|
|
4580
4889
|
mergeNewContent(props.content);
|
|
4581
4890
|
}
|
|
4582
4891
|
}
|
|
4583
4892
|
createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
4584
|
-
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode =
|
|
4893
|
+
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo14(() => props.builderContextSignal.content?.data?.jsCode);
|
|
4585
4894
|
function onUpdateFn_1() {
|
|
4586
4895
|
evaluateJsCode();
|
|
4587
4896
|
}
|
|
@@ -4591,7 +4900,7 @@ function EnableEditor(props) {
|
|
|
4591
4900
|
onUpdateFn_1
|
|
4592
4901
|
)
|
|
4593
4902
|
);
|
|
4594
|
-
const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests =
|
|
4903
|
+
const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo14(() => props.builderContextSignal.content?.data?.httpRequests);
|
|
4595
4904
|
function onUpdateFn_2() {
|
|
4596
4905
|
runHttpRequests();
|
|
4597
4906
|
}
|
|
@@ -4603,7 +4912,7 @@ function EnableEditor(props) {
|
|
|
4603
4912
|
onUpdateFn_2
|
|
4604
4913
|
)
|
|
4605
4914
|
);
|
|
4606
|
-
const onUpdateFn_3_props_builderContextSignal_rootState =
|
|
4915
|
+
const onUpdateFn_3_props_builderContextSignal_rootState = createMemo14(
|
|
4607
4916
|
() => props.builderContextSignal.rootState
|
|
4608
4917
|
);
|
|
4609
4918
|
function onUpdateFn_3() {
|
|
@@ -4615,14 +4924,14 @@ function EnableEditor(props) {
|
|
|
4615
4924
|
onUpdateFn_3
|
|
4616
4925
|
)
|
|
4617
4926
|
);
|
|
4618
|
-
const onUpdateFn_4_props_data =
|
|
4927
|
+
const onUpdateFn_4_props_data = createMemo14(() => props.data);
|
|
4619
4928
|
function onUpdateFn_4() {
|
|
4620
4929
|
if (props.data) {
|
|
4621
4930
|
mergeNewRootState(props.data);
|
|
4622
4931
|
}
|
|
4623
4932
|
}
|
|
4624
4933
|
createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
|
|
4625
|
-
const onUpdateFn_5_props_locale =
|
|
4934
|
+
const onUpdateFn_5_props_locale = createMemo14(() => props.locale);
|
|
4626
4935
|
function onUpdateFn_5() {
|
|
4627
4936
|
if (props.locale) {
|
|
4628
4937
|
mergeNewRootState({
|
|
@@ -4631,106 +4940,27 @@ function EnableEditor(props) {
|
|
|
4631
4940
|
}
|
|
4632
4941
|
}
|
|
4633
4942
|
createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
4634
|
-
return <builder_context_default.Provider value={props.builderContextSignal}><
|
|
4635
|
-
class={
|
|
4943
|
+
return <builder_context_default.Provider value={props.builderContextSignal}><Show11 when={props.builderContextSignal.content}><Dynamic5
|
|
4944
|
+
class={getWrapperClassName(
|
|
4945
|
+
props.content?.testVariationId || props.content?.id
|
|
4946
|
+
)}
|
|
4636
4947
|
{...{}}
|
|
4637
4948
|
ref={elementRef}
|
|
4638
4949
|
onClick={(event) => onClick(event)}
|
|
4639
4950
|
builder-content-id={props.builderContextSignal.content?.id}
|
|
4640
4951
|
builder-model={props.model}
|
|
4641
4952
|
{...{}}
|
|
4642
|
-
{...
|
|
4643
|
-
hidden: true,
|
|
4644
|
-
"aria-hidden": true
|
|
4645
|
-
}}
|
|
4953
|
+
{...showContentProps()}
|
|
4646
4954
|
{...props.contentWrapperProps}
|
|
4647
4955
|
component={ContentWrapper()}
|
|
4648
|
-
>{props.children}</Dynamic5></
|
|
4956
|
+
>{props.children}</Dynamic5></Show11></builder_context_default.Provider>;
|
|
4649
4957
|
}
|
|
4650
4958
|
var Enable_editor_default = EnableEditor;
|
|
4651
4959
|
|
|
4652
4960
|
// src/components/content/components/styles.tsx
|
|
4653
|
-
import { createSignal as
|
|
4654
|
-
|
|
4655
|
-
// src/components/content/components/styles.helpers.ts
|
|
4656
|
-
var getCssFromFont = (font) => {
|
|
4657
|
-
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
4658
|
-
const name = family.split(",")[0];
|
|
4659
|
-
const url = font.fileUrl ?? font?.files?.regular;
|
|
4660
|
-
let str = "";
|
|
4661
|
-
if (url && family && name) {
|
|
4662
|
-
str += `
|
|
4663
|
-
@font-face {
|
|
4664
|
-
font-family: "${family}";
|
|
4665
|
-
src: local("${name}"), url('${url}') format('woff2');
|
|
4666
|
-
font-display: fallback;
|
|
4667
|
-
font-weight: 400;
|
|
4668
|
-
}
|
|
4669
|
-
`.trim();
|
|
4670
|
-
}
|
|
4671
|
-
if (font.files) {
|
|
4672
|
-
for (const weight in font.files) {
|
|
4673
|
-
const isNumber = String(Number(weight)) === weight;
|
|
4674
|
-
if (!isNumber) {
|
|
4675
|
-
continue;
|
|
4676
|
-
}
|
|
4677
|
-
const weightUrl = font.files[weight];
|
|
4678
|
-
if (weightUrl && weightUrl !== url) {
|
|
4679
|
-
str += `
|
|
4680
|
-
@font-face {
|
|
4681
|
-
font-family: "${family}";
|
|
4682
|
-
src: url('${weightUrl}') format('woff2');
|
|
4683
|
-
font-display: fallback;
|
|
4684
|
-
font-weight: ${weight};
|
|
4685
|
-
}
|
|
4686
|
-
`.trim();
|
|
4687
|
-
}
|
|
4688
|
-
}
|
|
4689
|
-
}
|
|
4690
|
-
return str;
|
|
4691
|
-
};
|
|
4692
|
-
var getFontCss = ({
|
|
4693
|
-
customFonts
|
|
4694
|
-
}) => {
|
|
4695
|
-
return customFonts?.map((font) => getCssFromFont(font))?.join(" ") || "";
|
|
4696
|
-
};
|
|
4697
|
-
var getCss = ({
|
|
4698
|
-
cssCode,
|
|
4699
|
-
contentId
|
|
4700
|
-
}) => {
|
|
4701
|
-
if (!cssCode) {
|
|
4702
|
-
return "";
|
|
4703
|
-
}
|
|
4704
|
-
if (!contentId) {
|
|
4705
|
-
return cssCode;
|
|
4706
|
-
}
|
|
4707
|
-
return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
|
|
4708
|
-
};
|
|
4709
|
-
var DEFAULT_STYLES = `
|
|
4710
|
-
.builder-button {
|
|
4711
|
-
all: unset;
|
|
4712
|
-
}
|
|
4713
|
-
|
|
4714
|
-
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
4715
|
-
margin: 0;
|
|
4716
|
-
}
|
|
4717
|
-
.builder-text > p, .builder-text > .builder-paragraph {
|
|
4718
|
-
color: inherit;
|
|
4719
|
-
line-height: inherit;
|
|
4720
|
-
letter-spacing: inherit;
|
|
4721
|
-
font-weight: inherit;
|
|
4722
|
-
font-size: inherit;
|
|
4723
|
-
text-align: inherit;
|
|
4724
|
-
font-family: inherit;
|
|
4725
|
-
}
|
|
4726
|
-
`;
|
|
4727
|
-
var getDefaultStyles = (isNested) => {
|
|
4728
|
-
return !isNested ? DEFAULT_STYLES : "";
|
|
4729
|
-
};
|
|
4730
|
-
|
|
4731
|
-
// src/components/content/components/styles.tsx
|
|
4961
|
+
import { createSignal as createSignal15 } from "solid-js";
|
|
4732
4962
|
function ContentStyles(props) {
|
|
4733
|
-
const [injectedStyles, setInjectedStyles] =
|
|
4963
|
+
const [injectedStyles, setInjectedStyles] = createSignal15(
|
|
4734
4964
|
`
|
|
4735
4965
|
${getCss({
|
|
4736
4966
|
cssCode: props.cssCode,
|
|
@@ -4787,7 +5017,7 @@ var getContentInitialValue = ({
|
|
|
4787
5017
|
|
|
4788
5018
|
// src/components/content/content.tsx
|
|
4789
5019
|
function ContentComponent(props) {
|
|
4790
|
-
const [scriptStr, setScriptStr] =
|
|
5020
|
+
const [scriptStr, setScriptStr] = createSignal16(
|
|
4791
5021
|
getUpdateVariantVisibilityScript({
|
|
4792
5022
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
4793
5023
|
variationId: props.content?.testVariationId,
|
|
@@ -4795,7 +5025,7 @@ function ContentComponent(props) {
|
|
|
4795
5025
|
contentId: props.content?.id
|
|
4796
5026
|
})
|
|
4797
5027
|
);
|
|
4798
|
-
const [registeredComponents, setRegisteredComponents] =
|
|
5028
|
+
const [registeredComponents, setRegisteredComponents] = createSignal16(
|
|
4799
5029
|
[
|
|
4800
5030
|
...getDefaultRegisteredComponents(),
|
|
4801
5031
|
...props.customComponents || []
|
|
@@ -4810,7 +5040,7 @@ function ContentComponent(props) {
|
|
|
4810
5040
|
{}
|
|
4811
5041
|
)
|
|
4812
5042
|
);
|
|
4813
|
-
const [builderContextSignal, setBuilderContextSignal] =
|
|
5043
|
+
const [builderContextSignal, setBuilderContextSignal] = createSignal16({
|
|
4814
5044
|
content: getContentInitialValue({
|
|
4815
5045
|
content: props.content,
|
|
4816
5046
|
data: props.data
|
|
@@ -4868,16 +5098,16 @@ function ContentComponent(props) {
|
|
|
4868
5098
|
setBuilderContextSignal
|
|
4869
5099
|
}}
|
|
4870
5100
|
>
|
|
4871
|
-
<
|
|
5101
|
+
<Show12 when={props.isSsrAbTest}><Inlined_script_default
|
|
4872
5102
|
id="builderio-variant-visibility"
|
|
4873
5103
|
scriptStr={scriptStr()}
|
|
4874
|
-
/></
|
|
4875
|
-
<
|
|
5104
|
+
/></Show12>
|
|
5105
|
+
<Show12 when={TARGET !== "reactNative"}><Styles_default
|
|
4876
5106
|
isNestedRender={props.isNestedRender}
|
|
4877
5107
|
contentId={builderContextSignal().content?.id}
|
|
4878
5108
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
4879
5109
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
4880
|
-
/></
|
|
5110
|
+
/></Show12>
|
|
4881
5111
|
<Blocks_default
|
|
4882
5112
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
4883
5113
|
context={builderContextSignal()}
|
|
@@ -4890,13 +5120,13 @@ var Content_default = ContentComponent;
|
|
|
4890
5120
|
|
|
4891
5121
|
// src/components/content-variants/content-variants.tsx
|
|
4892
5122
|
function ContentVariants(props) {
|
|
4893
|
-
const [shouldRenderVariants, setShouldRenderVariants] =
|
|
5123
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal17(
|
|
4894
5124
|
checkShouldRenderVariants({
|
|
4895
5125
|
canTrack: getDefaultCanTrack(props.canTrack),
|
|
4896
5126
|
content: props.content
|
|
4897
5127
|
})
|
|
4898
5128
|
);
|
|
4899
|
-
const updateCookieAndStylesScriptStr =
|
|
5129
|
+
const updateCookieAndStylesScriptStr = createMemo17(() => {
|
|
4900
5130
|
return getUpdateCookieAndStylesScript(
|
|
4901
5131
|
getVariants(props.content).map((value) => ({
|
|
4902
5132
|
id: value.testVariationId,
|
|
@@ -4905,10 +5135,10 @@ function ContentVariants(props) {
|
|
|
4905
5135
|
props.content?.id || ""
|
|
4906
5136
|
);
|
|
4907
5137
|
});
|
|
4908
|
-
const hideVariantsStyleString =
|
|
5138
|
+
const hideVariantsStyleString = createMemo17(() => {
|
|
4909
5139
|
return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
|
|
4910
5140
|
});
|
|
4911
|
-
const defaultContent =
|
|
5141
|
+
const defaultContent = createMemo17(() => {
|
|
4912
5142
|
return shouldRenderVariants() ? {
|
|
4913
5143
|
...props.content,
|
|
4914
5144
|
testVariationId: props.content?.id
|
|
@@ -4921,11 +5151,11 @@ function ContentVariants(props) {
|
|
|
4921
5151
|
setShouldRenderVariants(false);
|
|
4922
5152
|
});
|
|
4923
5153
|
return <>
|
|
4924
|
-
<
|
|
5154
|
+
<Show13 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
4925
5155
|
id="builderio-init-variants-fns"
|
|
4926
5156
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
4927
|
-
/></
|
|
4928
|
-
<
|
|
5157
|
+
/></Show13>
|
|
5158
|
+
<Show13 when={shouldRenderVariants()}>
|
|
4929
5159
|
<Inlined_styles_default
|
|
4930
5160
|
id="builderio-variants"
|
|
4931
5161
|
styles={hideVariantsStyleString()}
|
|
@@ -4934,7 +5164,7 @@ function ContentVariants(props) {
|
|
|
4934
5164
|
id="builderio-variants-visibility"
|
|
4935
5165
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
4936
5166
|
/>
|
|
4937
|
-
<
|
|
5167
|
+
<For8 each={getVariants(props.content)}>{(variant, _index) => {
|
|
4938
5168
|
const index = _index();
|
|
4939
5169
|
return <Content_default
|
|
4940
5170
|
isNestedRender={props.isNestedRender}
|
|
@@ -4958,8 +5188,8 @@ function ContentVariants(props) {
|
|
|
4958
5188
|
contentWrapperProps={props.contentWrapperProps}
|
|
4959
5189
|
trustedHosts={props.trustedHosts}
|
|
4960
5190
|
/>;
|
|
4961
|
-
}}</
|
|
4962
|
-
</
|
|
5191
|
+
}}</For8>
|
|
5192
|
+
</Show13>
|
|
4963
5193
|
<Content_default
|
|
4964
5194
|
isNestedRender={props.isNestedRender}
|
|
4965
5195
|
{...{}}
|
|
@@ -5012,8 +5242,14 @@ var fetchSymbolContent = async ({
|
|
|
5012
5242
|
|
|
5013
5243
|
// src/blocks/symbol/symbol.tsx
|
|
5014
5244
|
function Symbol(props) {
|
|
5015
|
-
const [contentToUse, setContentToUse] =
|
|
5016
|
-
const
|
|
5245
|
+
const [contentToUse, setContentToUse] = createSignal18(props.symbol?.content);
|
|
5246
|
+
const blocksWrapper = createMemo18(() => {
|
|
5247
|
+
return "div";
|
|
5248
|
+
});
|
|
5249
|
+
const contentWrapper = createMemo18(() => {
|
|
5250
|
+
return "div";
|
|
5251
|
+
});
|
|
5252
|
+
const className = createMemo18(() => {
|
|
5017
5253
|
return [
|
|
5018
5254
|
...[props.attributes[getClassPropName()]],
|
|
5019
5255
|
"builder-symbol",
|
|
@@ -5035,7 +5271,7 @@ function Symbol(props) {
|
|
|
5035
5271
|
}
|
|
5036
5272
|
onMount5(() => {
|
|
5037
5273
|
});
|
|
5038
|
-
const onUpdateFn_0_props_symbol =
|
|
5274
|
+
const onUpdateFn_0_props_symbol = createMemo18(() => props.symbol);
|
|
5039
5275
|
function onUpdateFn_0() {
|
|
5040
5276
|
setContent();
|
|
5041
5277
|
}
|
|
@@ -5057,8 +5293,8 @@ function Symbol(props) {
|
|
|
5057
5293
|
model={props.symbol?.model}
|
|
5058
5294
|
content={contentToUse()}
|
|
5059
5295
|
linkComponent={props.builderLinkComponent}
|
|
5060
|
-
blocksWrapper=
|
|
5061
|
-
contentWrapper=
|
|
5296
|
+
blocksWrapper={blocksWrapper()}
|
|
5297
|
+
contentWrapper={contentWrapper()}
|
|
5062
5298
|
/></div>;
|
|
5063
5299
|
}
|
|
5064
5300
|
var symbol_default = Symbol;
|