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