@builder.io/sdk-solid 4.0.6 → 4.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/dev.js +40 -15
- package/lib/browser/dev.jsx +80 -47
- package/lib/browser/index.js +40 -15
- package/lib/browser/index.jsx +80 -47
- package/lib/edge/dev.js +40 -15
- package/lib/edge/dev.jsx +80 -47
- package/lib/edge/index.js +40 -15
- package/lib/edge/index.jsx +80 -47
- package/lib/node/dev.js +40 -15
- package/lib/node/dev.jsx +80 -47
- package/lib/node/index.js +40 -15
- package/lib/node/index.jsx +80 -47
- package/package.json +1 -1
package/lib/browser/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { delegateEvents, createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, use, Dynamic, memo } from 'solid-js/web';
|
|
2
|
-
import { createContext, useContext, Show, For, createMemo,
|
|
2
|
+
import { createContext, useContext, Show, For, createMemo, onMount, createSignal, createEffect, on } from 'solid-js';
|
|
3
3
|
|
|
4
4
|
// src/blocks/button/button.tsx
|
|
5
5
|
|
|
@@ -927,6 +927,9 @@ var provideBuilderContext = (block, context) => {
|
|
|
927
927
|
};
|
|
928
928
|
return {};
|
|
929
929
|
};
|
|
930
|
+
var generateKey = (index) => {
|
|
931
|
+
return index.toString();
|
|
932
|
+
};
|
|
930
933
|
|
|
931
934
|
// src/constants/device-sizes.ts
|
|
932
935
|
var SIZES = {
|
|
@@ -1206,6 +1209,7 @@ var awaiter_default = Awaiter;
|
|
|
1206
1209
|
|
|
1207
1210
|
// src/components/block/components/interactive-element.tsx
|
|
1208
1211
|
function InteractiveElement(props) {
|
|
1212
|
+
createSignal(0);
|
|
1209
1213
|
const attributes = createMemo(() => {
|
|
1210
1214
|
return props.includeBlockProps ? {
|
|
1211
1215
|
...getBlockProperties({
|
|
@@ -1221,9 +1225,17 @@ function InteractiveElement(props) {
|
|
|
1221
1225
|
})
|
|
1222
1226
|
} : {};
|
|
1223
1227
|
});
|
|
1228
|
+
const targetWrapperProps = createMemo(() => {
|
|
1229
|
+
return props.wrapperProps;
|
|
1230
|
+
});
|
|
1231
|
+
const onUpdateFn_0_props_wrapperProps = createMemo(() => props.wrapperProps);
|
|
1232
|
+
const onUpdateFn_0_props_block__component__options = createMemo(() => props.block?.component?.options);
|
|
1233
|
+
function onUpdateFn_0() {
|
|
1234
|
+
}
|
|
1235
|
+
createEffect(on(() => [onUpdateFn_0_props_wrapperProps(), onUpdateFn_0_props_block__component__options()], onUpdateFn_0));
|
|
1224
1236
|
return createComponent(Show, {
|
|
1225
1237
|
get fallback() {
|
|
1226
|
-
return createComponent(Dynamic, mergeProps(
|
|
1238
|
+
return createComponent(Dynamic, mergeProps(targetWrapperProps, {
|
|
1227
1239
|
get attributes() {
|
|
1228
1240
|
return attributes();
|
|
1229
1241
|
},
|
|
@@ -1353,6 +1365,11 @@ function ComponentRef(props) {
|
|
|
1353
1365
|
var component_ref_default = ComponentRef;
|
|
1354
1366
|
function RepeatedBlock(props) {
|
|
1355
1367
|
const [store, setStore] = createSignal(props.repeatContext);
|
|
1368
|
+
const onUpdateFn_0_props_repeatContext = createMemo(() => props.repeatContext);
|
|
1369
|
+
function onUpdateFn_0() {
|
|
1370
|
+
setStore(props.repeatContext);
|
|
1371
|
+
}
|
|
1372
|
+
createEffect(on(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
|
|
1356
1373
|
return createComponent(builder_context_default.Provider, {
|
|
1357
1374
|
get value() {
|
|
1358
1375
|
return store();
|
|
@@ -1479,7 +1496,9 @@ function Block(props) {
|
|
|
1479
1496
|
children: (data, _index) => {
|
|
1480
1497
|
const index = _index();
|
|
1481
1498
|
return createComponent(repeated_block_default, {
|
|
1482
|
-
key
|
|
1499
|
+
get key() {
|
|
1500
|
+
return generateKey(index);
|
|
1501
|
+
},
|
|
1483
1502
|
get repeatContext() {
|
|
1484
1503
|
return data.context;
|
|
1485
1504
|
},
|
|
@@ -1545,7 +1564,9 @@ function Block(props) {
|
|
|
1545
1564
|
children: (data, _index) => {
|
|
1546
1565
|
const index = _index();
|
|
1547
1566
|
return createComponent(repeated_block_default, {
|
|
1548
|
-
key
|
|
1567
|
+
get key() {
|
|
1568
|
+
return generateKey(index);
|
|
1569
|
+
},
|
|
1549
1570
|
get repeatContext() {
|
|
1550
1571
|
return data.context;
|
|
1551
1572
|
},
|
|
@@ -2041,16 +2062,16 @@ function getSrcSet(url) {
|
|
|
2041
2062
|
// src/blocks/image/image.tsx
|
|
2042
2063
|
var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
|
|
2043
2064
|
var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
|
|
2044
|
-
var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-
|
|
2045
|
-
var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-
|
|
2046
|
-
var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-
|
|
2065
|
+
var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-5f381e78">`);
|
|
2066
|
+
var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-5f381e78-2>`);
|
|
2067
|
+
var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-5f381e78 {
|
|
2047
2068
|
opacity: 1;
|
|
2048
2069
|
transition: opacity 0.2s ease-in-out;
|
|
2049
|
-
}.div-
|
|
2070
|
+
}.div-5f381e78 {
|
|
2050
2071
|
width: 100%;
|
|
2051
2072
|
pointer-events: none;
|
|
2052
2073
|
font-size: 0;
|
|
2053
|
-
}.div-
|
|
2074
|
+
}.div-5f381e78-2 {
|
|
2054
2075
|
display: flex;
|
|
2055
2076
|
flex-direction: column;
|
|
2056
2077
|
align-items: stretch;
|
|
@@ -2099,6 +2120,8 @@ function Image(props) {
|
|
|
2099
2120
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
2100
2121
|
return out;
|
|
2101
2122
|
});
|
|
2123
|
+
onMount(() => {
|
|
2124
|
+
});
|
|
2102
2125
|
return [[(() => {
|
|
2103
2126
|
const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
|
|
2104
2127
|
insert(_el$, createComponent(Show, {
|
|
@@ -2112,7 +2135,7 @@ function Image(props) {
|
|
|
2112
2135
|
}
|
|
2113
2136
|
}), _el$3);
|
|
2114
2137
|
effect((_p$) => {
|
|
2115
|
-
const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-
|
|
2138
|
+
const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-5f381e78", _v$2 = props.highPriority ? "eager" : "lazy", _v$3 = props.highPriority ? "high" : "auto", _v$4 = props.altText, _v$5 = props.title, _v$6 = props.altText ? void 0 : "presentation", _v$7 = {
|
|
2116
2139
|
"object-position": props.backgroundPosition || "center",
|
|
2117
2140
|
"object-fit": props.backgroundSize || "cover",
|
|
2118
2141
|
...aspectRatioCss()
|
|
@@ -3947,10 +3970,10 @@ delegateEvents(["click"]);
|
|
|
3947
3970
|
|
|
3948
3971
|
// src/blocks/text/component-info.ts
|
|
3949
3972
|
var componentInfo11 = {
|
|
3950
|
-
shouldReceiveBuilderProps: {
|
|
3951
|
-
builderBlock:
|
|
3973
|
+
shouldReceiveBuilderProps: TARGET === "reactNative" ? {
|
|
3974
|
+
builderBlock: true,
|
|
3952
3975
|
builderContext: true
|
|
3953
|
-
},
|
|
3976
|
+
} : {},
|
|
3954
3977
|
name: "Text",
|
|
3955
3978
|
static: true,
|
|
3956
3979
|
isRSC: true,
|
|
@@ -5347,7 +5370,7 @@ function getPreviewContent(_searchParams) {
|
|
|
5347
5370
|
}
|
|
5348
5371
|
|
|
5349
5372
|
// src/constants/sdk-version.ts
|
|
5350
|
-
var SDK_VERSION = "4.0.
|
|
5373
|
+
var SDK_VERSION = "4.0.8";
|
|
5351
5374
|
|
|
5352
5375
|
// src/helpers/sdk-headers.ts
|
|
5353
5376
|
var getSdkHeaders = () => ({
|
|
@@ -6962,6 +6985,7 @@ var fetchSymbolContent = async ({
|
|
|
6962
6985
|
var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
|
|
6963
6986
|
function Symbol(props) {
|
|
6964
6987
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
6988
|
+
const [symbolEntry, setSymbolEntry] = createSignal(props.symbol?.entry);
|
|
6965
6989
|
const blocksWrapper = createMemo(() => {
|
|
6966
6990
|
return "div";
|
|
6967
6991
|
});
|
|
@@ -6972,7 +6996,7 @@ function Symbol(props) {
|
|
|
6972
6996
|
return [...[props.attributes[getClassPropName()]], "builder-symbol", props.symbol?.inline ? "builder-inline-symbol" : void 0, props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0].filter(Boolean).join(" ");
|
|
6973
6997
|
});
|
|
6974
6998
|
function setContent() {
|
|
6975
|
-
if (contentToUse())
|
|
6999
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
6976
7000
|
return;
|
|
6977
7001
|
fetchSymbolContent({
|
|
6978
7002
|
symbol: props.symbol,
|
|
@@ -6980,6 +7004,7 @@ function Symbol(props) {
|
|
|
6980
7004
|
}).then((newContent) => {
|
|
6981
7005
|
if (newContent) {
|
|
6982
7006
|
setContentToUse(newContent);
|
|
7007
|
+
setSymbolEntry(props.symbol?.entry);
|
|
6983
7008
|
}
|
|
6984
7009
|
});
|
|
6985
7010
|
}
|
package/lib/browser/index.jsx
CHANGED
|
@@ -922,6 +922,9 @@ var provideBuilderContext = (block, context) => {
|
|
|
922
922
|
};
|
|
923
923
|
return {};
|
|
924
924
|
};
|
|
925
|
+
var generateKey = (index) => {
|
|
926
|
+
return index.toString();
|
|
927
|
+
};
|
|
925
928
|
|
|
926
929
|
// src/components/block/components/block-styles.tsx
|
|
927
930
|
import { Show as Show2, createMemo } from "solid-js";
|
|
@@ -1192,15 +1195,15 @@ var Block_wrapper_default = BlockWrapper;
|
|
|
1192
1195
|
import {
|
|
1193
1196
|
Show as Show4,
|
|
1194
1197
|
For,
|
|
1195
|
-
on,
|
|
1196
|
-
createEffect,
|
|
1198
|
+
on as on2,
|
|
1199
|
+
createEffect as createEffect2,
|
|
1197
1200
|
createMemo as createMemo3,
|
|
1198
1201
|
createSignal as createSignal3
|
|
1199
1202
|
} from "solid-js";
|
|
1200
1203
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
1201
1204
|
|
|
1202
1205
|
// src/components/block/components/interactive-element.tsx
|
|
1203
|
-
import { Show as Show3, createMemo as createMemo2 } from "solid-js";
|
|
1206
|
+
import { Show as Show3, on, createEffect, createMemo as createMemo2, createSignal as createSignal2 } from "solid-js";
|
|
1204
1207
|
import { Dynamic as Dynamic2 } from "solid-js/web";
|
|
1205
1208
|
|
|
1206
1209
|
// src/components/awaiter.tsx
|
|
@@ -1214,6 +1217,7 @@ var Awaiter_default = Awaiter;
|
|
|
1214
1217
|
|
|
1215
1218
|
// src/components/block/components/interactive-element.tsx
|
|
1216
1219
|
function InteractiveElement(props) {
|
|
1220
|
+
const [forceRenderCount, setForceRenderCount] = createSignal2(0);
|
|
1217
1221
|
const attributes = createMemo2(() => {
|
|
1218
1222
|
return props.includeBlockProps ? {
|
|
1219
1223
|
...getBlockProperties({
|
|
@@ -1229,9 +1233,27 @@ function InteractiveElement(props) {
|
|
|
1229
1233
|
})
|
|
1230
1234
|
} : {};
|
|
1231
1235
|
});
|
|
1236
|
+
const targetWrapperProps = createMemo2(() => {
|
|
1237
|
+
return props.wrapperProps;
|
|
1238
|
+
});
|
|
1239
|
+
const onUpdateFn_0_props_wrapperProps = createMemo2(() => props.wrapperProps);
|
|
1240
|
+
const onUpdateFn_0_props_block__component__options = createMemo2(
|
|
1241
|
+
() => props.block?.component?.options
|
|
1242
|
+
);
|
|
1243
|
+
function onUpdateFn_0() {
|
|
1244
|
+
}
|
|
1245
|
+
createEffect(
|
|
1246
|
+
on(
|
|
1247
|
+
() => [
|
|
1248
|
+
onUpdateFn_0_props_wrapperProps(),
|
|
1249
|
+
onUpdateFn_0_props_block__component__options()
|
|
1250
|
+
],
|
|
1251
|
+
onUpdateFn_0
|
|
1252
|
+
)
|
|
1253
|
+
);
|
|
1232
1254
|
return <><Show3
|
|
1233
1255
|
fallback={<Dynamic2
|
|
1234
|
-
{...
|
|
1256
|
+
{...targetWrapperProps()}
|
|
1235
1257
|
attributes={attributes()}
|
|
1236
1258
|
component={props.Wrapper}
|
|
1237
1259
|
>{props.children}</Dynamic2>}
|
|
@@ -1292,8 +1314,8 @@ function ComponentRef(props) {
|
|
|
1292
1314
|
);
|
|
1293
1315
|
function onUpdateFn_0() {
|
|
1294
1316
|
}
|
|
1295
|
-
|
|
1296
|
-
|
|
1317
|
+
createEffect2(
|
|
1318
|
+
on2(
|
|
1297
1319
|
() => [
|
|
1298
1320
|
onUpdateFn_0_props_componentOptions(),
|
|
1299
1321
|
onUpdateFn_0_props_blockChildren()
|
|
@@ -1327,9 +1349,16 @@ function ComponentRef(props) {
|
|
|
1327
1349
|
var Component_ref_default = ComponentRef;
|
|
1328
1350
|
|
|
1329
1351
|
// src/components/block/components/repeated-block.tsx
|
|
1330
|
-
import { createSignal as createSignal4 } from "solid-js";
|
|
1352
|
+
import { on as on3, createEffect as createEffect3, createMemo as createMemo4, createSignal as createSignal4 } from "solid-js";
|
|
1331
1353
|
function RepeatedBlock(props) {
|
|
1332
1354
|
const [store, setStore] = createSignal4(props.repeatContext);
|
|
1355
|
+
const onUpdateFn_0_props_repeatContext = createMemo4(
|
|
1356
|
+
() => props.repeatContext
|
|
1357
|
+
);
|
|
1358
|
+
function onUpdateFn_0() {
|
|
1359
|
+
setStore(props.repeatContext);
|
|
1360
|
+
}
|
|
1361
|
+
createEffect3(on3(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
|
|
1333
1362
|
return <><builder_context_default.Provider value={store()}><Block_default
|
|
1334
1363
|
block={props.block}
|
|
1335
1364
|
context={store()}
|
|
@@ -1434,7 +1463,7 @@ function Block(props) {
|
|
|
1434
1463
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
1435
1464
|
const index = _index();
|
|
1436
1465
|
return <Repeated_block_default
|
|
1437
|
-
key={index}
|
|
1466
|
+
key={generateKey(index)}
|
|
1438
1467
|
repeatContext={data.context}
|
|
1439
1468
|
block={data.block}
|
|
1440
1469
|
registeredComponents={props.registeredComponents}
|
|
@@ -1458,7 +1487,7 @@ function Block(props) {
|
|
|
1458
1487
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
1459
1488
|
const index = _index();
|
|
1460
1489
|
return <Repeated_block_default
|
|
1461
|
-
key={index}
|
|
1490
|
+
key={generateKey(index)}
|
|
1462
1491
|
repeatContext={data.context}
|
|
1463
1492
|
block={data.block}
|
|
1464
1493
|
registeredComponents={props.registeredComponents}
|
|
@@ -1498,7 +1527,7 @@ function Block(props) {
|
|
|
1498
1527
|
var Block_default = Block;
|
|
1499
1528
|
|
|
1500
1529
|
// src/components/blocks/blocks-wrapper.tsx
|
|
1501
|
-
import { onMount as onMount3, on as
|
|
1530
|
+
import { onMount as onMount3, on as on5, createEffect as createEffect5, createMemo as createMemo6, createSignal as createSignal6 } from "solid-js";
|
|
1502
1531
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
1503
1532
|
function BlocksWrapper(props) {
|
|
1504
1533
|
const [shouldUpdate, setShouldUpdate] = createSignal6(false);
|
|
@@ -1551,7 +1580,7 @@ function BlocksWrapper(props) {
|
|
|
1551
1580
|
const onUpdateFn_0_props_blocks = createMemo6(() => props.blocks);
|
|
1552
1581
|
function onUpdateFn_0() {
|
|
1553
1582
|
}
|
|
1554
|
-
|
|
1583
|
+
createEffect5(on5(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
|
|
1555
1584
|
return <>
|
|
1556
1585
|
<Dynamic4
|
|
1557
1586
|
class={className() + " dynamic-023c60f2"}
|
|
@@ -1776,7 +1805,7 @@ function FragmentComponent(props) {
|
|
|
1776
1805
|
var fragment_default = FragmentComponent;
|
|
1777
1806
|
|
|
1778
1807
|
// src/blocks/image/image.tsx
|
|
1779
|
-
import { Show as Show8, createMemo as createMemo8 } from "solid-js";
|
|
1808
|
+
import { Show as Show8, onMount as onMount4, createMemo as createMemo8 } from "solid-js";
|
|
1780
1809
|
|
|
1781
1810
|
// src/blocks/image/image.helpers.ts
|
|
1782
1811
|
function removeProtocol(path) {
|
|
@@ -1865,12 +1894,14 @@ function Image(props) {
|
|
|
1865
1894
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
1866
1895
|
return out;
|
|
1867
1896
|
});
|
|
1897
|
+
onMount4(() => {
|
|
1898
|
+
});
|
|
1868
1899
|
return <>
|
|
1869
1900
|
<>
|
|
1870
1901
|
<picture>
|
|
1871
1902
|
<Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
|
|
1872
1903
|
<img
|
|
1873
|
-
class={"builder-image" + (props.className ? " " + props.className : "") + " img-
|
|
1904
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " img-5f381e78"}
|
|
1874
1905
|
loading={props.highPriority ? "eager" : "lazy"}
|
|
1875
1906
|
fetchpriority={props.highPriority ? "high" : "auto"}
|
|
1876
1907
|
alt={props.altText}
|
|
@@ -1889,22 +1920,22 @@ function Image(props) {
|
|
|
1889
1920
|
<Show8
|
|
1890
1921
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
1891
1922
|
><div
|
|
1892
|
-
class="builder-image-sizer div-
|
|
1923
|
+
class="builder-image-sizer div-5f381e78"
|
|
1893
1924
|
style={{
|
|
1894
1925
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
1895
1926
|
}}
|
|
1896
1927
|
/></Show8>
|
|
1897
1928
|
<Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
|
|
1898
|
-
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-
|
|
1929
|
+
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-5f381e78-2">{props.children}</div></Show8>
|
|
1899
1930
|
</>
|
|
1900
|
-
<style>{`.img-
|
|
1931
|
+
<style>{`.img-5f381e78 {
|
|
1901
1932
|
opacity: 1;
|
|
1902
1933
|
transition: opacity 0.2s ease-in-out;
|
|
1903
|
-
}.div-
|
|
1934
|
+
}.div-5f381e78 {
|
|
1904
1935
|
width: 100%;
|
|
1905
1936
|
pointer-events: none;
|
|
1906
1937
|
font-size: 0;
|
|
1907
|
-
}.div-
|
|
1938
|
+
}.div-5f381e78-2 {
|
|
1908
1939
|
display: flex;
|
|
1909
1940
|
flex-direction: column;
|
|
1910
1941
|
align-items: stretch;
|
|
@@ -1940,10 +1971,10 @@ function SectionComponent(props) {
|
|
|
1940
1971
|
var section_default = SectionComponent;
|
|
1941
1972
|
|
|
1942
1973
|
// src/blocks/symbol/symbol.tsx
|
|
1943
|
-
import { onMount as
|
|
1974
|
+
import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
|
|
1944
1975
|
|
|
1945
1976
|
// src/components/content-variants/content-variants.tsx
|
|
1946
|
-
import { Show as Show16, For as For9, onMount as
|
|
1977
|
+
import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
|
|
1947
1978
|
|
|
1948
1979
|
// src/helpers/url.ts
|
|
1949
1980
|
var getTopLevelDomain = (host) => {
|
|
@@ -2924,7 +2955,7 @@ var componentInfo6 = {
|
|
|
2924
2955
|
};
|
|
2925
2956
|
|
|
2926
2957
|
// src/blocks/personalization-container/personalization-container.tsx
|
|
2927
|
-
import { Show as Show10, For as For6, onMount as
|
|
2958
|
+
import { Show as Show10, For as For6, onMount as onMount5, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
|
|
2928
2959
|
|
|
2929
2960
|
// src/components/inlined-script.tsx
|
|
2930
2961
|
function InlinedScript(props) {
|
|
@@ -3189,7 +3220,7 @@ function PersonalizationContainer(props) {
|
|
|
3189
3220
|
).join("");
|
|
3190
3221
|
});
|
|
3191
3222
|
let rootRef;
|
|
3192
|
-
|
|
3223
|
+
onMount5(() => {
|
|
3193
3224
|
setIsHydrated(true);
|
|
3194
3225
|
const unsub = userAttributesService.subscribeOnUserAttributesChange(
|
|
3195
3226
|
(attrs) => {
|
|
@@ -3591,10 +3622,10 @@ var tabs_default = Tabs;
|
|
|
3591
3622
|
|
|
3592
3623
|
// src/blocks/text/component-info.ts
|
|
3593
3624
|
var componentInfo11 = {
|
|
3594
|
-
shouldReceiveBuilderProps: {
|
|
3595
|
-
builderBlock:
|
|
3625
|
+
shouldReceiveBuilderProps: TARGET === "reactNative" ? {
|
|
3626
|
+
builderBlock: true,
|
|
3596
3627
|
builderContext: true
|
|
3597
|
-
},
|
|
3628
|
+
} : {},
|
|
3598
3629
|
name: "Text",
|
|
3599
3630
|
static: true,
|
|
3600
3631
|
isRSC: true,
|
|
@@ -3652,7 +3683,7 @@ var componentInfo12 = {
|
|
|
3652
3683
|
};
|
|
3653
3684
|
|
|
3654
3685
|
// src/blocks/custom-code/custom-code.tsx
|
|
3655
|
-
import { onMount as
|
|
3686
|
+
import { onMount as onMount6, on as on6, createEffect as createEffect6, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
|
|
3656
3687
|
function CustomCode(props) {
|
|
3657
3688
|
const [scriptsInserted, setScriptsInserted] = createSignal12([]);
|
|
3658
3689
|
const [scriptsRun, setScriptsRun] = createSignal12([]);
|
|
@@ -3693,7 +3724,7 @@ function CustomCode(props) {
|
|
|
3693
3724
|
}
|
|
3694
3725
|
}
|
|
3695
3726
|
let elementRef;
|
|
3696
|
-
|
|
3727
|
+
onMount6(() => {
|
|
3697
3728
|
runScripts();
|
|
3698
3729
|
});
|
|
3699
3730
|
const onUpdateFn_0_props_code = createMemo12(() => props.code);
|
|
@@ -3702,7 +3733,7 @@ function CustomCode(props) {
|
|
|
3702
3733
|
runScripts();
|
|
3703
3734
|
}
|
|
3704
3735
|
}
|
|
3705
|
-
|
|
3736
|
+
createEffect6(on6(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
|
|
3706
3737
|
return <><div
|
|
3707
3738
|
class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
|
|
3708
3739
|
ref={elementRef}
|
|
@@ -3730,7 +3761,7 @@ var componentInfo13 = {
|
|
|
3730
3761
|
};
|
|
3731
3762
|
|
|
3732
3763
|
// src/blocks/embed/embed.tsx
|
|
3733
|
-
import { on as
|
|
3764
|
+
import { on as on7, createEffect as createEffect7, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
3734
3765
|
|
|
3735
3766
|
// src/blocks/embed/helpers.ts
|
|
3736
3767
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -3772,8 +3803,8 @@ function Embed(props) {
|
|
|
3772
3803
|
findAndRunScripts();
|
|
3773
3804
|
}
|
|
3774
3805
|
}
|
|
3775
|
-
|
|
3776
|
-
|
|
3806
|
+
createEffect7(
|
|
3807
|
+
on7(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
|
|
3777
3808
|
);
|
|
3778
3809
|
return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
|
|
3779
3810
|
}
|
|
@@ -4605,7 +4636,7 @@ var componentInfo20 = {
|
|
|
4605
4636
|
};
|
|
4606
4637
|
|
|
4607
4638
|
// src/blocks/video/video.tsx
|
|
4608
|
-
import { Show as Show13, onMount as
|
|
4639
|
+
import { Show as Show13, onMount as onMount7, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
|
|
4609
4640
|
function Video(props) {
|
|
4610
4641
|
const [lazyVideoObserver, setLazyVideoObserver] = createSignal15(void 0);
|
|
4611
4642
|
const videoProps = createMemo15(() => {
|
|
@@ -4633,7 +4664,7 @@ function Video(props) {
|
|
|
4633
4664
|
};
|
|
4634
4665
|
});
|
|
4635
4666
|
let videoRef;
|
|
4636
|
-
|
|
4667
|
+
onMount7(() => {
|
|
4637
4668
|
if (props.lazyLoad) {
|
|
4638
4669
|
const oberver = new IntersectionObserver(function(entries) {
|
|
4639
4670
|
entries.forEach(function(entry) {
|
|
@@ -4863,9 +4894,9 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4863
4894
|
// src/components/content/components/enable-editor.tsx
|
|
4864
4895
|
import {
|
|
4865
4896
|
Show as Show14,
|
|
4866
|
-
onMount as
|
|
4867
|
-
on as
|
|
4868
|
-
createEffect as
|
|
4897
|
+
onMount as onMount8,
|
|
4898
|
+
on as on8,
|
|
4899
|
+
createEffect as createEffect8,
|
|
4869
4900
|
createMemo as createMemo16,
|
|
4870
4901
|
createSignal as createSignal16
|
|
4871
4902
|
} from "solid-js";
|
|
@@ -4877,7 +4908,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4877
4908
|
}
|
|
4878
4909
|
|
|
4879
4910
|
// src/constants/sdk-version.ts
|
|
4880
|
-
var SDK_VERSION = "4.0.
|
|
4911
|
+
var SDK_VERSION = "4.0.8";
|
|
4881
4912
|
|
|
4882
4913
|
// src/helpers/sdk-headers.ts
|
|
4883
4914
|
var getSdkHeaders = () => ({
|
|
@@ -5881,7 +5912,7 @@ function EnableEditor(props) {
|
|
|
5881
5912
|
let elementRef;
|
|
5882
5913
|
runHttpRequests();
|
|
5883
5914
|
emitStateUpdate();
|
|
5884
|
-
|
|
5915
|
+
onMount8(() => {
|
|
5885
5916
|
if (isBrowser()) {
|
|
5886
5917
|
if (isEditing() && !props.isNestedRender) {
|
|
5887
5918
|
window.addEventListener("message", processMessage);
|
|
@@ -5962,15 +5993,15 @@ function EnableEditor(props) {
|
|
|
5962
5993
|
mergeNewContent(props.content);
|
|
5963
5994
|
}
|
|
5964
5995
|
}
|
|
5965
|
-
|
|
5996
|
+
createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
5966
5997
|
const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
|
|
5967
5998
|
() => props.builderContextSignal.rootState
|
|
5968
5999
|
);
|
|
5969
6000
|
function onUpdateFn_1() {
|
|
5970
6001
|
emitStateUpdate();
|
|
5971
6002
|
}
|
|
5972
|
-
|
|
5973
|
-
|
|
6003
|
+
createEffect8(
|
|
6004
|
+
on8(
|
|
5974
6005
|
() => [onUpdateFn_1_props_builderContextSignal_rootState()],
|
|
5975
6006
|
onUpdateFn_1
|
|
5976
6007
|
)
|
|
@@ -5981,7 +6012,7 @@ function EnableEditor(props) {
|
|
|
5981
6012
|
mergeNewRootState(props.data);
|
|
5982
6013
|
}
|
|
5983
6014
|
}
|
|
5984
|
-
|
|
6015
|
+
createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
|
|
5985
6016
|
const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
|
|
5986
6017
|
function onUpdateFn_3() {
|
|
5987
6018
|
if (props.locale) {
|
|
@@ -5990,7 +6021,7 @@ function EnableEditor(props) {
|
|
|
5990
6021
|
});
|
|
5991
6022
|
}
|
|
5992
6023
|
}
|
|
5993
|
-
|
|
6024
|
+
createEffect8(on8(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
|
|
5994
6025
|
return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
|
|
5995
6026
|
when={props.builderContextSignal.content || needsElementRefDivForEditing()}
|
|
5996
6027
|
><Dynamic5
|
|
@@ -6232,7 +6263,7 @@ function ContentVariants(props) {
|
|
|
6232
6263
|
canTrack: getDefaultCanTrack(props.canTrack)
|
|
6233
6264
|
});
|
|
6234
6265
|
});
|
|
6235
|
-
|
|
6266
|
+
onMount9(() => {
|
|
6236
6267
|
setShouldRenderVariants(false);
|
|
6237
6268
|
});
|
|
6238
6269
|
return <><>
|
|
@@ -6336,6 +6367,7 @@ var fetchSymbolContent = async ({
|
|
|
6336
6367
|
// src/blocks/symbol/symbol.tsx
|
|
6337
6368
|
function Symbol(props) {
|
|
6338
6369
|
const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
|
|
6370
|
+
const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
|
|
6339
6371
|
const blocksWrapper = createMemo20(() => {
|
|
6340
6372
|
return "div";
|
|
6341
6373
|
});
|
|
@@ -6351,7 +6383,7 @@ function Symbol(props) {
|
|
|
6351
6383
|
].filter(Boolean).join(" ");
|
|
6352
6384
|
});
|
|
6353
6385
|
function setContent() {
|
|
6354
|
-
if (contentToUse())
|
|
6386
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
6355
6387
|
return;
|
|
6356
6388
|
fetchSymbolContent({
|
|
6357
6389
|
symbol: props.symbol,
|
|
@@ -6359,16 +6391,17 @@ function Symbol(props) {
|
|
|
6359
6391
|
}).then((newContent) => {
|
|
6360
6392
|
if (newContent) {
|
|
6361
6393
|
setContentToUse(newContent);
|
|
6394
|
+
setSymbolEntry(props.symbol?.entry);
|
|
6362
6395
|
}
|
|
6363
6396
|
});
|
|
6364
6397
|
}
|
|
6365
|
-
|
|
6398
|
+
onMount10(() => {
|
|
6366
6399
|
});
|
|
6367
6400
|
const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
|
|
6368
6401
|
function onUpdateFn_0() {
|
|
6369
6402
|
setContent();
|
|
6370
6403
|
}
|
|
6371
|
-
|
|
6404
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
6372
6405
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
6373
6406
|
nonce={props.builderContext.nonce}
|
|
6374
6407
|
isNestedRender={true}
|