@builder.io/sdk-solid 4.0.7 → 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 +10 -2
- package/lib/browser/dev.jsx +43 -25
- package/lib/browser/index.js +10 -2
- package/lib/browser/index.jsx +43 -25
- package/lib/edge/dev.js +10 -2
- package/lib/edge/dev.jsx +43 -25
- package/lib/edge/index.js +10 -2
- package/lib/edge/index.jsx +43 -25
- package/lib/node/dev.js +10 -2
- package/lib/node/dev.jsx +43 -25
- package/lib/node/index.js +10 -2
- package/lib/node/index.jsx +43 -25
- package/package.json +1 -1
package/lib/browser/dev.js
CHANGED
|
@@ -1218,6 +1218,7 @@ var awaiter_default = Awaiter;
|
|
|
1218
1218
|
|
|
1219
1219
|
// src/components/block/components/interactive-element.tsx
|
|
1220
1220
|
function InteractiveElement(props) {
|
|
1221
|
+
createSignal(0);
|
|
1221
1222
|
const attributes = createMemo(() => {
|
|
1222
1223
|
return props.includeBlockProps ? {
|
|
1223
1224
|
...getBlockProperties({
|
|
@@ -1236,6 +1237,11 @@ function InteractiveElement(props) {
|
|
|
1236
1237
|
const targetWrapperProps = createMemo(() => {
|
|
1237
1238
|
return props.wrapperProps;
|
|
1238
1239
|
});
|
|
1240
|
+
const onUpdateFn_0_props_wrapperProps = createMemo(() => props.wrapperProps);
|
|
1241
|
+
const onUpdateFn_0_props_block__component__options = createMemo(() => props.block?.component?.options);
|
|
1242
|
+
function onUpdateFn_0() {
|
|
1243
|
+
}
|
|
1244
|
+
createEffect(on(() => [onUpdateFn_0_props_wrapperProps(), onUpdateFn_0_props_block__component__options()], onUpdateFn_0));
|
|
1239
1245
|
return createComponent(Show, {
|
|
1240
1246
|
get fallback() {
|
|
1241
1247
|
return createComponent(Dynamic, mergeProps(targetWrapperProps, {
|
|
@@ -5376,7 +5382,7 @@ function getPreviewContent(_searchParams) {
|
|
|
5376
5382
|
}
|
|
5377
5383
|
|
|
5378
5384
|
// src/constants/sdk-version.ts
|
|
5379
|
-
var SDK_VERSION = "4.0.
|
|
5385
|
+
var SDK_VERSION = "4.0.8";
|
|
5380
5386
|
|
|
5381
5387
|
// src/helpers/sdk-headers.ts
|
|
5382
5388
|
var getSdkHeaders = () => ({
|
|
@@ -6998,6 +7004,7 @@ var fetchSymbolContent = async ({
|
|
|
6998
7004
|
var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
|
|
6999
7005
|
function Symbol(props) {
|
|
7000
7006
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
7007
|
+
const [symbolEntry, setSymbolEntry] = createSignal(props.symbol?.entry);
|
|
7001
7008
|
const blocksWrapper = createMemo(() => {
|
|
7002
7009
|
return "div";
|
|
7003
7010
|
});
|
|
@@ -7008,7 +7015,7 @@ function Symbol(props) {
|
|
|
7008
7015
|
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(" ");
|
|
7009
7016
|
});
|
|
7010
7017
|
function setContent() {
|
|
7011
|
-
if (contentToUse())
|
|
7018
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
7012
7019
|
return;
|
|
7013
7020
|
fetchSymbolContent({
|
|
7014
7021
|
symbol: props.symbol,
|
|
@@ -7016,6 +7023,7 @@ function Symbol(props) {
|
|
|
7016
7023
|
}).then((newContent) => {
|
|
7017
7024
|
if (newContent) {
|
|
7018
7025
|
setContentToUse(newContent);
|
|
7026
|
+
setSymbolEntry(props.symbol?.entry);
|
|
7019
7027
|
}
|
|
7020
7028
|
});
|
|
7021
7029
|
}
|
package/lib/browser/dev.jsx
CHANGED
|
@@ -1202,15 +1202,15 @@ var Block_wrapper_default = BlockWrapper;
|
|
|
1202
1202
|
import {
|
|
1203
1203
|
Show as Show4,
|
|
1204
1204
|
For,
|
|
1205
|
-
on,
|
|
1206
|
-
createEffect,
|
|
1205
|
+
on as on2,
|
|
1206
|
+
createEffect as createEffect2,
|
|
1207
1207
|
createMemo as createMemo3,
|
|
1208
1208
|
createSignal as createSignal3
|
|
1209
1209
|
} from "solid-js";
|
|
1210
1210
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
1211
1211
|
|
|
1212
1212
|
// src/components/block/components/interactive-element.tsx
|
|
1213
|
-
import { Show as Show3, createMemo as createMemo2 } from "solid-js";
|
|
1213
|
+
import { Show as Show3, on, createEffect, createMemo as createMemo2, createSignal as createSignal2 } from "solid-js";
|
|
1214
1214
|
import { Dynamic as Dynamic2 } from "solid-js/web";
|
|
1215
1215
|
|
|
1216
1216
|
// src/components/awaiter.tsx
|
|
@@ -1224,6 +1224,7 @@ var Awaiter_default = Awaiter;
|
|
|
1224
1224
|
|
|
1225
1225
|
// src/components/block/components/interactive-element.tsx
|
|
1226
1226
|
function InteractiveElement(props) {
|
|
1227
|
+
const [forceRenderCount, setForceRenderCount] = createSignal2(0);
|
|
1227
1228
|
const attributes = createMemo2(() => {
|
|
1228
1229
|
return props.includeBlockProps ? {
|
|
1229
1230
|
...getBlockProperties({
|
|
@@ -1242,6 +1243,21 @@ function InteractiveElement(props) {
|
|
|
1242
1243
|
const targetWrapperProps = createMemo2(() => {
|
|
1243
1244
|
return props.wrapperProps;
|
|
1244
1245
|
});
|
|
1246
|
+
const onUpdateFn_0_props_wrapperProps = createMemo2(() => props.wrapperProps);
|
|
1247
|
+
const onUpdateFn_0_props_block__component__options = createMemo2(
|
|
1248
|
+
() => props.block?.component?.options
|
|
1249
|
+
);
|
|
1250
|
+
function onUpdateFn_0() {
|
|
1251
|
+
}
|
|
1252
|
+
createEffect(
|
|
1253
|
+
on(
|
|
1254
|
+
() => [
|
|
1255
|
+
onUpdateFn_0_props_wrapperProps(),
|
|
1256
|
+
onUpdateFn_0_props_block__component__options()
|
|
1257
|
+
],
|
|
1258
|
+
onUpdateFn_0
|
|
1259
|
+
)
|
|
1260
|
+
);
|
|
1245
1261
|
return <><Show3
|
|
1246
1262
|
fallback={<Dynamic2
|
|
1247
1263
|
{...targetWrapperProps()}
|
|
@@ -1305,8 +1321,8 @@ function ComponentRef(props) {
|
|
|
1305
1321
|
);
|
|
1306
1322
|
function onUpdateFn_0() {
|
|
1307
1323
|
}
|
|
1308
|
-
|
|
1309
|
-
|
|
1324
|
+
createEffect2(
|
|
1325
|
+
on2(
|
|
1310
1326
|
() => [
|
|
1311
1327
|
onUpdateFn_0_props_componentOptions(),
|
|
1312
1328
|
onUpdateFn_0_props_blockChildren()
|
|
@@ -1340,7 +1356,7 @@ function ComponentRef(props) {
|
|
|
1340
1356
|
var Component_ref_default = ComponentRef;
|
|
1341
1357
|
|
|
1342
1358
|
// src/components/block/components/repeated-block.tsx
|
|
1343
|
-
import { on as
|
|
1359
|
+
import { on as on3, createEffect as createEffect3, createMemo as createMemo4, createSignal as createSignal4 } from "solid-js";
|
|
1344
1360
|
function RepeatedBlock(props) {
|
|
1345
1361
|
const [store, setStore] = createSignal4(props.repeatContext);
|
|
1346
1362
|
const onUpdateFn_0_props_repeatContext = createMemo4(
|
|
@@ -1349,7 +1365,7 @@ function RepeatedBlock(props) {
|
|
|
1349
1365
|
function onUpdateFn_0() {
|
|
1350
1366
|
setStore(props.repeatContext);
|
|
1351
1367
|
}
|
|
1352
|
-
|
|
1368
|
+
createEffect3(on3(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
|
|
1353
1369
|
return <><builder_context_default.Provider value={store()}><Block_default
|
|
1354
1370
|
block={props.block}
|
|
1355
1371
|
context={store()}
|
|
@@ -1518,7 +1534,7 @@ function Block(props) {
|
|
|
1518
1534
|
var Block_default = Block;
|
|
1519
1535
|
|
|
1520
1536
|
// src/components/blocks/blocks-wrapper.tsx
|
|
1521
|
-
import { onMount as onMount3, on as
|
|
1537
|
+
import { onMount as onMount3, on as on5, createEffect as createEffect5, createMemo as createMemo6, createSignal as createSignal6 } from "solid-js";
|
|
1522
1538
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
1523
1539
|
function BlocksWrapper(props) {
|
|
1524
1540
|
const [shouldUpdate, setShouldUpdate] = createSignal6(false);
|
|
@@ -1571,7 +1587,7 @@ function BlocksWrapper(props) {
|
|
|
1571
1587
|
const onUpdateFn_0_props_blocks = createMemo6(() => props.blocks);
|
|
1572
1588
|
function onUpdateFn_0() {
|
|
1573
1589
|
}
|
|
1574
|
-
|
|
1590
|
+
createEffect5(on5(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
|
|
1575
1591
|
return <>
|
|
1576
1592
|
<Dynamic4
|
|
1577
1593
|
class={className() + " dynamic-023c60f2"}
|
|
@@ -1963,7 +1979,7 @@ function SectionComponent(props) {
|
|
|
1963
1979
|
var section_default = SectionComponent;
|
|
1964
1980
|
|
|
1965
1981
|
// src/blocks/symbol/symbol.tsx
|
|
1966
|
-
import { onMount as onMount10, on as
|
|
1982
|
+
import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
|
|
1967
1983
|
|
|
1968
1984
|
// src/components/content-variants/content-variants.tsx
|
|
1969
1985
|
import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
|
|
@@ -3676,7 +3692,7 @@ var componentInfo12 = {
|
|
|
3676
3692
|
};
|
|
3677
3693
|
|
|
3678
3694
|
// src/blocks/custom-code/custom-code.tsx
|
|
3679
|
-
import { onMount as onMount6, on as
|
|
3695
|
+
import { onMount as onMount6, on as on6, createEffect as createEffect6, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
|
|
3680
3696
|
function CustomCode(props) {
|
|
3681
3697
|
const [scriptsInserted, setScriptsInserted] = createSignal12([]);
|
|
3682
3698
|
const [scriptsRun, setScriptsRun] = createSignal12([]);
|
|
@@ -3726,7 +3742,7 @@ function CustomCode(props) {
|
|
|
3726
3742
|
runScripts();
|
|
3727
3743
|
}
|
|
3728
3744
|
}
|
|
3729
|
-
|
|
3745
|
+
createEffect6(on6(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
|
|
3730
3746
|
return <><div
|
|
3731
3747
|
class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
|
|
3732
3748
|
ref={elementRef}
|
|
@@ -3754,7 +3770,7 @@ var componentInfo13 = {
|
|
|
3754
3770
|
};
|
|
3755
3771
|
|
|
3756
3772
|
// src/blocks/embed/embed.tsx
|
|
3757
|
-
import { on as
|
|
3773
|
+
import { on as on7, createEffect as createEffect7, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
3758
3774
|
|
|
3759
3775
|
// src/blocks/embed/helpers.ts
|
|
3760
3776
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -3796,8 +3812,8 @@ function Embed(props) {
|
|
|
3796
3812
|
findAndRunScripts();
|
|
3797
3813
|
}
|
|
3798
3814
|
}
|
|
3799
|
-
|
|
3800
|
-
|
|
3815
|
+
createEffect7(
|
|
3816
|
+
on7(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
|
|
3801
3817
|
);
|
|
3802
3818
|
return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
|
|
3803
3819
|
}
|
|
@@ -4889,8 +4905,8 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4889
4905
|
import {
|
|
4890
4906
|
Show as Show14,
|
|
4891
4907
|
onMount as onMount8,
|
|
4892
|
-
on as
|
|
4893
|
-
createEffect as
|
|
4908
|
+
on as on8,
|
|
4909
|
+
createEffect as createEffect8,
|
|
4894
4910
|
createMemo as createMemo16,
|
|
4895
4911
|
createSignal as createSignal16
|
|
4896
4912
|
} from "solid-js";
|
|
@@ -4902,7 +4918,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4902
4918
|
}
|
|
4903
4919
|
|
|
4904
4920
|
// src/constants/sdk-version.ts
|
|
4905
|
-
var SDK_VERSION = "4.0.
|
|
4921
|
+
var SDK_VERSION = "4.0.8";
|
|
4906
4922
|
|
|
4907
4923
|
// src/helpers/sdk-headers.ts
|
|
4908
4924
|
var getSdkHeaders = () => ({
|
|
@@ -5994,15 +6010,15 @@ function EnableEditor(props) {
|
|
|
5994
6010
|
mergeNewContent(props.content);
|
|
5995
6011
|
}
|
|
5996
6012
|
}
|
|
5997
|
-
|
|
6013
|
+
createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
5998
6014
|
const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
|
|
5999
6015
|
() => props.builderContextSignal.rootState
|
|
6000
6016
|
);
|
|
6001
6017
|
function onUpdateFn_1() {
|
|
6002
6018
|
emitStateUpdate();
|
|
6003
6019
|
}
|
|
6004
|
-
|
|
6005
|
-
|
|
6020
|
+
createEffect8(
|
|
6021
|
+
on8(
|
|
6006
6022
|
() => [onUpdateFn_1_props_builderContextSignal_rootState()],
|
|
6007
6023
|
onUpdateFn_1
|
|
6008
6024
|
)
|
|
@@ -6013,7 +6029,7 @@ function EnableEditor(props) {
|
|
|
6013
6029
|
mergeNewRootState(props.data);
|
|
6014
6030
|
}
|
|
6015
6031
|
}
|
|
6016
|
-
|
|
6032
|
+
createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
|
|
6017
6033
|
const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
|
|
6018
6034
|
function onUpdateFn_3() {
|
|
6019
6035
|
if (props.locale) {
|
|
@@ -6022,7 +6038,7 @@ function EnableEditor(props) {
|
|
|
6022
6038
|
});
|
|
6023
6039
|
}
|
|
6024
6040
|
}
|
|
6025
|
-
|
|
6041
|
+
createEffect8(on8(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
|
|
6026
6042
|
return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
|
|
6027
6043
|
when={props.builderContextSignal.content || needsElementRefDivForEditing()}
|
|
6028
6044
|
><Dynamic5
|
|
@@ -6368,6 +6384,7 @@ var fetchSymbolContent = async ({
|
|
|
6368
6384
|
// src/blocks/symbol/symbol.tsx
|
|
6369
6385
|
function Symbol(props) {
|
|
6370
6386
|
const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
|
|
6387
|
+
const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
|
|
6371
6388
|
const blocksWrapper = createMemo20(() => {
|
|
6372
6389
|
return "div";
|
|
6373
6390
|
});
|
|
@@ -6383,7 +6400,7 @@ function Symbol(props) {
|
|
|
6383
6400
|
].filter(Boolean).join(" ");
|
|
6384
6401
|
});
|
|
6385
6402
|
function setContent() {
|
|
6386
|
-
if (contentToUse())
|
|
6403
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
6387
6404
|
return;
|
|
6388
6405
|
fetchSymbolContent({
|
|
6389
6406
|
symbol: props.symbol,
|
|
@@ -6391,6 +6408,7 @@ function Symbol(props) {
|
|
|
6391
6408
|
}).then((newContent) => {
|
|
6392
6409
|
if (newContent) {
|
|
6393
6410
|
setContentToUse(newContent);
|
|
6411
|
+
setSymbolEntry(props.symbol?.entry);
|
|
6394
6412
|
}
|
|
6395
6413
|
});
|
|
6396
6414
|
}
|
|
@@ -6400,7 +6418,7 @@ function Symbol(props) {
|
|
|
6400
6418
|
function onUpdateFn_0() {
|
|
6401
6419
|
setContent();
|
|
6402
6420
|
}
|
|
6403
|
-
|
|
6421
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
6404
6422
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
6405
6423
|
nonce={props.builderContext.nonce}
|
|
6406
6424
|
isNestedRender={true}
|
package/lib/browser/index.js
CHANGED
|
@@ -1209,6 +1209,7 @@ var awaiter_default = Awaiter;
|
|
|
1209
1209
|
|
|
1210
1210
|
// src/components/block/components/interactive-element.tsx
|
|
1211
1211
|
function InteractiveElement(props) {
|
|
1212
|
+
createSignal(0);
|
|
1212
1213
|
const attributes = createMemo(() => {
|
|
1213
1214
|
return props.includeBlockProps ? {
|
|
1214
1215
|
...getBlockProperties({
|
|
@@ -1227,6 +1228,11 @@ function InteractiveElement(props) {
|
|
|
1227
1228
|
const targetWrapperProps = createMemo(() => {
|
|
1228
1229
|
return props.wrapperProps;
|
|
1229
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));
|
|
1230
1236
|
return createComponent(Show, {
|
|
1231
1237
|
get fallback() {
|
|
1232
1238
|
return createComponent(Dynamic, mergeProps(targetWrapperProps, {
|
|
@@ -5364,7 +5370,7 @@ function getPreviewContent(_searchParams) {
|
|
|
5364
5370
|
}
|
|
5365
5371
|
|
|
5366
5372
|
// src/constants/sdk-version.ts
|
|
5367
|
-
var SDK_VERSION = "4.0.
|
|
5373
|
+
var SDK_VERSION = "4.0.8";
|
|
5368
5374
|
|
|
5369
5375
|
// src/helpers/sdk-headers.ts
|
|
5370
5376
|
var getSdkHeaders = () => ({
|
|
@@ -6979,6 +6985,7 @@ var fetchSymbolContent = async ({
|
|
|
6979
6985
|
var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
|
|
6980
6986
|
function Symbol(props) {
|
|
6981
6987
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
6988
|
+
const [symbolEntry, setSymbolEntry] = createSignal(props.symbol?.entry);
|
|
6982
6989
|
const blocksWrapper = createMemo(() => {
|
|
6983
6990
|
return "div";
|
|
6984
6991
|
});
|
|
@@ -6989,7 +6996,7 @@ function Symbol(props) {
|
|
|
6989
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(" ");
|
|
6990
6997
|
});
|
|
6991
6998
|
function setContent() {
|
|
6992
|
-
if (contentToUse())
|
|
6999
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
6993
7000
|
return;
|
|
6994
7001
|
fetchSymbolContent({
|
|
6995
7002
|
symbol: props.symbol,
|
|
@@ -6997,6 +7004,7 @@ function Symbol(props) {
|
|
|
6997
7004
|
}).then((newContent) => {
|
|
6998
7005
|
if (newContent) {
|
|
6999
7006
|
setContentToUse(newContent);
|
|
7007
|
+
setSymbolEntry(props.symbol?.entry);
|
|
7000
7008
|
}
|
|
7001
7009
|
});
|
|
7002
7010
|
}
|
package/lib/browser/index.jsx
CHANGED
|
@@ -1195,15 +1195,15 @@ var Block_wrapper_default = BlockWrapper;
|
|
|
1195
1195
|
import {
|
|
1196
1196
|
Show as Show4,
|
|
1197
1197
|
For,
|
|
1198
|
-
on,
|
|
1199
|
-
createEffect,
|
|
1198
|
+
on as on2,
|
|
1199
|
+
createEffect as createEffect2,
|
|
1200
1200
|
createMemo as createMemo3,
|
|
1201
1201
|
createSignal as createSignal3
|
|
1202
1202
|
} from "solid-js";
|
|
1203
1203
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
1204
1204
|
|
|
1205
1205
|
// src/components/block/components/interactive-element.tsx
|
|
1206
|
-
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";
|
|
1207
1207
|
import { Dynamic as Dynamic2 } from "solid-js/web";
|
|
1208
1208
|
|
|
1209
1209
|
// src/components/awaiter.tsx
|
|
@@ -1217,6 +1217,7 @@ var Awaiter_default = Awaiter;
|
|
|
1217
1217
|
|
|
1218
1218
|
// src/components/block/components/interactive-element.tsx
|
|
1219
1219
|
function InteractiveElement(props) {
|
|
1220
|
+
const [forceRenderCount, setForceRenderCount] = createSignal2(0);
|
|
1220
1221
|
const attributes = createMemo2(() => {
|
|
1221
1222
|
return props.includeBlockProps ? {
|
|
1222
1223
|
...getBlockProperties({
|
|
@@ -1235,6 +1236,21 @@ function InteractiveElement(props) {
|
|
|
1235
1236
|
const targetWrapperProps = createMemo2(() => {
|
|
1236
1237
|
return props.wrapperProps;
|
|
1237
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
|
+
);
|
|
1238
1254
|
return <><Show3
|
|
1239
1255
|
fallback={<Dynamic2
|
|
1240
1256
|
{...targetWrapperProps()}
|
|
@@ -1298,8 +1314,8 @@ function ComponentRef(props) {
|
|
|
1298
1314
|
);
|
|
1299
1315
|
function onUpdateFn_0() {
|
|
1300
1316
|
}
|
|
1301
|
-
|
|
1302
|
-
|
|
1317
|
+
createEffect2(
|
|
1318
|
+
on2(
|
|
1303
1319
|
() => [
|
|
1304
1320
|
onUpdateFn_0_props_componentOptions(),
|
|
1305
1321
|
onUpdateFn_0_props_blockChildren()
|
|
@@ -1333,7 +1349,7 @@ function ComponentRef(props) {
|
|
|
1333
1349
|
var Component_ref_default = ComponentRef;
|
|
1334
1350
|
|
|
1335
1351
|
// src/components/block/components/repeated-block.tsx
|
|
1336
|
-
import { on as
|
|
1352
|
+
import { on as on3, createEffect as createEffect3, createMemo as createMemo4, createSignal as createSignal4 } from "solid-js";
|
|
1337
1353
|
function RepeatedBlock(props) {
|
|
1338
1354
|
const [store, setStore] = createSignal4(props.repeatContext);
|
|
1339
1355
|
const onUpdateFn_0_props_repeatContext = createMemo4(
|
|
@@ -1342,7 +1358,7 @@ function RepeatedBlock(props) {
|
|
|
1342
1358
|
function onUpdateFn_0() {
|
|
1343
1359
|
setStore(props.repeatContext);
|
|
1344
1360
|
}
|
|
1345
|
-
|
|
1361
|
+
createEffect3(on3(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
|
|
1346
1362
|
return <><builder_context_default.Provider value={store()}><Block_default
|
|
1347
1363
|
block={props.block}
|
|
1348
1364
|
context={store()}
|
|
@@ -1511,7 +1527,7 @@ function Block(props) {
|
|
|
1511
1527
|
var Block_default = Block;
|
|
1512
1528
|
|
|
1513
1529
|
// src/components/blocks/blocks-wrapper.tsx
|
|
1514
|
-
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";
|
|
1515
1531
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
1516
1532
|
function BlocksWrapper(props) {
|
|
1517
1533
|
const [shouldUpdate, setShouldUpdate] = createSignal6(false);
|
|
@@ -1564,7 +1580,7 @@ function BlocksWrapper(props) {
|
|
|
1564
1580
|
const onUpdateFn_0_props_blocks = createMemo6(() => props.blocks);
|
|
1565
1581
|
function onUpdateFn_0() {
|
|
1566
1582
|
}
|
|
1567
|
-
|
|
1583
|
+
createEffect5(on5(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
|
|
1568
1584
|
return <>
|
|
1569
1585
|
<Dynamic4
|
|
1570
1586
|
class={className() + " dynamic-023c60f2"}
|
|
@@ -1955,7 +1971,7 @@ function SectionComponent(props) {
|
|
|
1955
1971
|
var section_default = SectionComponent;
|
|
1956
1972
|
|
|
1957
1973
|
// src/blocks/symbol/symbol.tsx
|
|
1958
|
-
import { onMount as onMount10, on as
|
|
1974
|
+
import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
|
|
1959
1975
|
|
|
1960
1976
|
// src/components/content-variants/content-variants.tsx
|
|
1961
1977
|
import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
|
|
@@ -3667,7 +3683,7 @@ var componentInfo12 = {
|
|
|
3667
3683
|
};
|
|
3668
3684
|
|
|
3669
3685
|
// src/blocks/custom-code/custom-code.tsx
|
|
3670
|
-
import { onMount as onMount6, on as
|
|
3686
|
+
import { onMount as onMount6, on as on6, createEffect as createEffect6, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
|
|
3671
3687
|
function CustomCode(props) {
|
|
3672
3688
|
const [scriptsInserted, setScriptsInserted] = createSignal12([]);
|
|
3673
3689
|
const [scriptsRun, setScriptsRun] = createSignal12([]);
|
|
@@ -3717,7 +3733,7 @@ function CustomCode(props) {
|
|
|
3717
3733
|
runScripts();
|
|
3718
3734
|
}
|
|
3719
3735
|
}
|
|
3720
|
-
|
|
3736
|
+
createEffect6(on6(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
|
|
3721
3737
|
return <><div
|
|
3722
3738
|
class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
|
|
3723
3739
|
ref={elementRef}
|
|
@@ -3745,7 +3761,7 @@ var componentInfo13 = {
|
|
|
3745
3761
|
};
|
|
3746
3762
|
|
|
3747
3763
|
// src/blocks/embed/embed.tsx
|
|
3748
|
-
import { on as
|
|
3764
|
+
import { on as on7, createEffect as createEffect7, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
3749
3765
|
|
|
3750
3766
|
// src/blocks/embed/helpers.ts
|
|
3751
3767
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -3787,8 +3803,8 @@ function Embed(props) {
|
|
|
3787
3803
|
findAndRunScripts();
|
|
3788
3804
|
}
|
|
3789
3805
|
}
|
|
3790
|
-
|
|
3791
|
-
|
|
3806
|
+
createEffect7(
|
|
3807
|
+
on7(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
|
|
3792
3808
|
);
|
|
3793
3809
|
return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
|
|
3794
3810
|
}
|
|
@@ -4879,8 +4895,8 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4879
4895
|
import {
|
|
4880
4896
|
Show as Show14,
|
|
4881
4897
|
onMount as onMount8,
|
|
4882
|
-
on as
|
|
4883
|
-
createEffect as
|
|
4898
|
+
on as on8,
|
|
4899
|
+
createEffect as createEffect8,
|
|
4884
4900
|
createMemo as createMemo16,
|
|
4885
4901
|
createSignal as createSignal16
|
|
4886
4902
|
} from "solid-js";
|
|
@@ -4892,7 +4908,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4892
4908
|
}
|
|
4893
4909
|
|
|
4894
4910
|
// src/constants/sdk-version.ts
|
|
4895
|
-
var SDK_VERSION = "4.0.
|
|
4911
|
+
var SDK_VERSION = "4.0.8";
|
|
4896
4912
|
|
|
4897
4913
|
// src/helpers/sdk-headers.ts
|
|
4898
4914
|
var getSdkHeaders = () => ({
|
|
@@ -5977,15 +5993,15 @@ function EnableEditor(props) {
|
|
|
5977
5993
|
mergeNewContent(props.content);
|
|
5978
5994
|
}
|
|
5979
5995
|
}
|
|
5980
|
-
|
|
5996
|
+
createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
5981
5997
|
const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
|
|
5982
5998
|
() => props.builderContextSignal.rootState
|
|
5983
5999
|
);
|
|
5984
6000
|
function onUpdateFn_1() {
|
|
5985
6001
|
emitStateUpdate();
|
|
5986
6002
|
}
|
|
5987
|
-
|
|
5988
|
-
|
|
6003
|
+
createEffect8(
|
|
6004
|
+
on8(
|
|
5989
6005
|
() => [onUpdateFn_1_props_builderContextSignal_rootState()],
|
|
5990
6006
|
onUpdateFn_1
|
|
5991
6007
|
)
|
|
@@ -5996,7 +6012,7 @@ function EnableEditor(props) {
|
|
|
5996
6012
|
mergeNewRootState(props.data);
|
|
5997
6013
|
}
|
|
5998
6014
|
}
|
|
5999
|
-
|
|
6015
|
+
createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
|
|
6000
6016
|
const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
|
|
6001
6017
|
function onUpdateFn_3() {
|
|
6002
6018
|
if (props.locale) {
|
|
@@ -6005,7 +6021,7 @@ function EnableEditor(props) {
|
|
|
6005
6021
|
});
|
|
6006
6022
|
}
|
|
6007
6023
|
}
|
|
6008
|
-
|
|
6024
|
+
createEffect8(on8(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
|
|
6009
6025
|
return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
|
|
6010
6026
|
when={props.builderContextSignal.content || needsElementRefDivForEditing()}
|
|
6011
6027
|
><Dynamic5
|
|
@@ -6351,6 +6367,7 @@ var fetchSymbolContent = async ({
|
|
|
6351
6367
|
// src/blocks/symbol/symbol.tsx
|
|
6352
6368
|
function Symbol(props) {
|
|
6353
6369
|
const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
|
|
6370
|
+
const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
|
|
6354
6371
|
const blocksWrapper = createMemo20(() => {
|
|
6355
6372
|
return "div";
|
|
6356
6373
|
});
|
|
@@ -6366,7 +6383,7 @@ function Symbol(props) {
|
|
|
6366
6383
|
].filter(Boolean).join(" ");
|
|
6367
6384
|
});
|
|
6368
6385
|
function setContent() {
|
|
6369
|
-
if (contentToUse())
|
|
6386
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
6370
6387
|
return;
|
|
6371
6388
|
fetchSymbolContent({
|
|
6372
6389
|
symbol: props.symbol,
|
|
@@ -6374,6 +6391,7 @@ function Symbol(props) {
|
|
|
6374
6391
|
}).then((newContent) => {
|
|
6375
6392
|
if (newContent) {
|
|
6376
6393
|
setContentToUse(newContent);
|
|
6394
|
+
setSymbolEntry(props.symbol?.entry);
|
|
6377
6395
|
}
|
|
6378
6396
|
});
|
|
6379
6397
|
}
|
|
@@ -6383,7 +6401,7 @@ function Symbol(props) {
|
|
|
6383
6401
|
function onUpdateFn_0() {
|
|
6384
6402
|
setContent();
|
|
6385
6403
|
}
|
|
6386
|
-
|
|
6404
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
6387
6405
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
6388
6406
|
nonce={props.builderContext.nonce}
|
|
6389
6407
|
isNestedRender={true}
|
package/lib/edge/dev.js
CHANGED
|
@@ -4399,6 +4399,7 @@ var awaiter_default = Awaiter;
|
|
|
4399
4399
|
|
|
4400
4400
|
// src/components/block/components/interactive-element.tsx
|
|
4401
4401
|
function InteractiveElement(props) {
|
|
4402
|
+
createSignal(0);
|
|
4402
4403
|
const attributes = createMemo(() => {
|
|
4403
4404
|
return props.includeBlockProps ? {
|
|
4404
4405
|
...getBlockProperties({
|
|
@@ -4417,6 +4418,11 @@ function InteractiveElement(props) {
|
|
|
4417
4418
|
const targetWrapperProps = createMemo(() => {
|
|
4418
4419
|
return props.wrapperProps;
|
|
4419
4420
|
});
|
|
4421
|
+
const onUpdateFn_0_props_wrapperProps = createMemo(() => props.wrapperProps);
|
|
4422
|
+
const onUpdateFn_0_props_block__component__options = createMemo(() => props.block?.component?.options);
|
|
4423
|
+
function onUpdateFn_0() {
|
|
4424
|
+
}
|
|
4425
|
+
createEffect(on(() => [onUpdateFn_0_props_wrapperProps(), onUpdateFn_0_props_block__component__options()], onUpdateFn_0));
|
|
4420
4426
|
return createComponent(Show, {
|
|
4421
4427
|
get fallback() {
|
|
4422
4428
|
return createComponent(Dynamic, mergeProps(targetWrapperProps, {
|
|
@@ -8557,7 +8563,7 @@ function getPreviewContent(_searchParams) {
|
|
|
8557
8563
|
}
|
|
8558
8564
|
|
|
8559
8565
|
// src/constants/sdk-version.ts
|
|
8560
|
-
var SDK_VERSION = "4.0.
|
|
8566
|
+
var SDK_VERSION = "4.0.8";
|
|
8561
8567
|
|
|
8562
8568
|
// src/helpers/sdk-headers.ts
|
|
8563
8569
|
var getSdkHeaders = () => ({
|
|
@@ -10179,6 +10185,7 @@ var fetchSymbolContent = async ({
|
|
|
10179
10185
|
var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
|
|
10180
10186
|
function Symbol2(props) {
|
|
10181
10187
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
10188
|
+
const [symbolEntry, setSymbolEntry] = createSignal(props.symbol?.entry);
|
|
10182
10189
|
const blocksWrapper = createMemo(() => {
|
|
10183
10190
|
return "div";
|
|
10184
10191
|
});
|
|
@@ -10189,7 +10196,7 @@ function Symbol2(props) {
|
|
|
10189
10196
|
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(" ");
|
|
10190
10197
|
});
|
|
10191
10198
|
function setContent() {
|
|
10192
|
-
if (contentToUse())
|
|
10199
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
10193
10200
|
return;
|
|
10194
10201
|
fetchSymbolContent({
|
|
10195
10202
|
symbol: props.symbol,
|
|
@@ -10197,6 +10204,7 @@ function Symbol2(props) {
|
|
|
10197
10204
|
}).then((newContent) => {
|
|
10198
10205
|
if (newContent) {
|
|
10199
10206
|
setContentToUse(newContent);
|
|
10207
|
+
setSymbolEntry(props.symbol?.entry);
|
|
10200
10208
|
}
|
|
10201
10209
|
});
|
|
10202
10210
|
}
|