@builder.io/sdk-solid 2.0.9 → 2.0.13
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 +148 -75
- package/lib/browser/dev.jsx +137 -80
- package/lib/browser/index.js +148 -75
- package/lib/browser/index.jsx +137 -80
- package/lib/edge/dev.js +148 -75
- package/lib/edge/dev.jsx +137 -80
- package/lib/edge/index.js +148 -75
- package/lib/edge/index.jsx +137 -80
- package/lib/node/dev.js +150 -77
- package/lib/node/dev.jsx +139 -82
- package/lib/node/index.js +150 -77
- package/lib/node/index.jsx +139 -82
- package/package.json +3 -3
package/lib/node/dev.jsx
CHANGED
|
@@ -103,7 +103,13 @@ import { createContext as createContext2 } from "solid-js";
|
|
|
103
103
|
var components_context_default = createContext2({ registeredComponents: {} });
|
|
104
104
|
|
|
105
105
|
// src/components/block/block.tsx
|
|
106
|
-
import {
|
|
106
|
+
import {
|
|
107
|
+
Show as Show4,
|
|
108
|
+
For as For2,
|
|
109
|
+
onMount,
|
|
110
|
+
createMemo as createMemo5,
|
|
111
|
+
createSignal as createSignal5
|
|
112
|
+
} from "solid-js";
|
|
107
113
|
|
|
108
114
|
// src/functions/get-block-component-options.ts
|
|
109
115
|
function getBlockComponentOptions(block) {
|
|
@@ -113,6 +119,15 @@ function getBlockComponentOptions(block) {
|
|
|
113
119
|
};
|
|
114
120
|
}
|
|
115
121
|
|
|
122
|
+
// src/helpers/omit.ts
|
|
123
|
+
function omit(obj, ...values) {
|
|
124
|
+
const newObject = Object.assign({}, obj);
|
|
125
|
+
for (const key of values) {
|
|
126
|
+
delete newObject[key];
|
|
127
|
+
}
|
|
128
|
+
return newObject;
|
|
129
|
+
}
|
|
130
|
+
|
|
116
131
|
// src/helpers/logger.ts
|
|
117
132
|
var MSG_PREFIX = "[Builder.io]: ";
|
|
118
133
|
var logger = {
|
|
@@ -386,7 +401,7 @@ if (typeof output === 'object' && output !== null) {
|
|
|
386
401
|
};
|
|
387
402
|
var IVM_INSTANCE = null;
|
|
388
403
|
var IVM_CONTEXT = null;
|
|
389
|
-
var SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react";
|
|
404
|
+
var SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react" || SDK_NAME === "@builder.io/sdk-qwik";
|
|
390
405
|
var getIvm = () => {
|
|
391
406
|
try {
|
|
392
407
|
if (IVM_INSTANCE)
|
|
@@ -401,7 +416,7 @@ var getIvm = () => {
|
|
|
401
416
|
|
|
402
417
|
SOLUTION: In a server-only execution path within your application, do one of the following:
|
|
403
418
|
|
|
404
|
-
${SHOULD_MENTION_INITIALIZE_SCRIPT ?
|
|
419
|
+
${SHOULD_MENTION_INITIALIZE_SCRIPT ? `- import and call \`initializeNodeRuntime()\` from "${SDK_NAME}/node/init".` : ""}
|
|
405
420
|
- add the following import: \`await import('isolated-vm')\`.
|
|
406
421
|
|
|
407
422
|
For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
|
|
@@ -506,6 +521,7 @@ var shouldForceBrowserRuntimeInNode = () => {
|
|
|
506
521
|
var chooseBrowserOrServerEval = (args) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInNode(args);
|
|
507
522
|
|
|
508
523
|
// src/functions/evaluate/evaluate.ts
|
|
524
|
+
var DISABLE_CACHE = true;
|
|
509
525
|
var EvalCache = class _EvalCache {
|
|
510
526
|
static cacheLimit = 20;
|
|
511
527
|
static cache = /* @__PURE__ */ new Map();
|
|
@@ -554,7 +570,7 @@ function evaluate({
|
|
|
554
570
|
rootState,
|
|
555
571
|
localState
|
|
556
572
|
};
|
|
557
|
-
if (enableCache) {
|
|
573
|
+
if (enableCache && !DISABLE_CACHE) {
|
|
558
574
|
const cacheKey = EvalCache.getCacheKey(args);
|
|
559
575
|
const cachedValue = EvalCache.getCachedValue(cacheKey);
|
|
560
576
|
if (cachedValue) {
|
|
@@ -582,6 +598,53 @@ function transformBlock(block) {
|
|
|
582
598
|
}
|
|
583
599
|
|
|
584
600
|
// src/functions/get-processed-block.ts
|
|
601
|
+
function deepCloneWithConditions(obj) {
|
|
602
|
+
if (obj === null || typeof obj !== "object") {
|
|
603
|
+
return obj;
|
|
604
|
+
}
|
|
605
|
+
if (Array.isArray(obj)) {
|
|
606
|
+
return obj.map((item) => deepCloneWithConditions(item));
|
|
607
|
+
}
|
|
608
|
+
if (obj["@type"] === "@builder.io/sdk:Element") {
|
|
609
|
+
return obj;
|
|
610
|
+
}
|
|
611
|
+
const clonedObj = {};
|
|
612
|
+
for (const key in obj) {
|
|
613
|
+
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
614
|
+
clonedObj[key] = deepCloneWithConditions(obj[key]);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
return clonedObj;
|
|
618
|
+
}
|
|
619
|
+
var IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK = ["svelte", "vue", "angular", "qwik", "solid"].includes(TARGET);
|
|
620
|
+
var getCopy = (block) => {
|
|
621
|
+
if (IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK) {
|
|
622
|
+
const copy = fastClone(block);
|
|
623
|
+
const copied = {
|
|
624
|
+
...copy,
|
|
625
|
+
properties: {
|
|
626
|
+
...copy.properties
|
|
627
|
+
},
|
|
628
|
+
actions: {
|
|
629
|
+
...copy.actions
|
|
630
|
+
}
|
|
631
|
+
};
|
|
632
|
+
return copied;
|
|
633
|
+
} else {
|
|
634
|
+
const copy = deepCloneWithConditions(omit(block, "children", "meta"));
|
|
635
|
+
return {
|
|
636
|
+
...copy,
|
|
637
|
+
properties: {
|
|
638
|
+
...copy.properties
|
|
639
|
+
},
|
|
640
|
+
actions: {
|
|
641
|
+
...copy.actions
|
|
642
|
+
},
|
|
643
|
+
children: block.children,
|
|
644
|
+
meta: block.meta
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
};
|
|
585
648
|
var evaluateBindings = ({
|
|
586
649
|
block,
|
|
587
650
|
context,
|
|
@@ -592,16 +655,7 @@ var evaluateBindings = ({
|
|
|
592
655
|
if (!block.bindings) {
|
|
593
656
|
return block;
|
|
594
657
|
}
|
|
595
|
-
const
|
|
596
|
-
const copied = {
|
|
597
|
-
...copy,
|
|
598
|
-
properties: {
|
|
599
|
-
...copy.properties
|
|
600
|
-
},
|
|
601
|
-
actions: {
|
|
602
|
-
...copy.actions
|
|
603
|
-
}
|
|
604
|
-
};
|
|
658
|
+
const copied = getCopy(block);
|
|
605
659
|
for (const binding in block.bindings) {
|
|
606
660
|
const expression = block.bindings[binding];
|
|
607
661
|
const value = evaluate({
|
|
@@ -884,17 +938,9 @@ function mapStyleObjToStrIfNeeded(style) {
|
|
|
884
938
|
// src/components/block/block.helpers.ts
|
|
885
939
|
var getComponent = ({
|
|
886
940
|
block,
|
|
887
|
-
context,
|
|
888
941
|
registeredComponents
|
|
889
942
|
}) => {
|
|
890
|
-
const componentName =
|
|
891
|
-
block,
|
|
892
|
-
localState: context.localState,
|
|
893
|
-
rootState: context.rootState,
|
|
894
|
-
rootSetState: context.rootSetState,
|
|
895
|
-
context: context.context,
|
|
896
|
-
shouldEvaluateBindings: false
|
|
897
|
-
}).component?.name;
|
|
943
|
+
const componentName = block.component?.name;
|
|
898
944
|
if (!componentName) {
|
|
899
945
|
return null;
|
|
900
946
|
}
|
|
@@ -1041,14 +1087,7 @@ var Inlined_styles_default = InlinedStyles;
|
|
|
1041
1087
|
// src/components/block/components/block-styles.tsx
|
|
1042
1088
|
function BlockStyles(props) {
|
|
1043
1089
|
const canShowBlock = createMemo(() => {
|
|
1044
|
-
const processedBlock =
|
|
1045
|
-
block: props.block,
|
|
1046
|
-
localState: props.context.localState,
|
|
1047
|
-
rootState: props.context.rootState,
|
|
1048
|
-
rootSetState: props.context.rootSetState,
|
|
1049
|
-
context: props.context.context,
|
|
1050
|
-
shouldEvaluateBindings: true
|
|
1051
|
-
});
|
|
1090
|
+
const processedBlock = props.block;
|
|
1052
1091
|
if (checkIsDefined(processedBlock.hide)) {
|
|
1053
1092
|
return !processedBlock.hide;
|
|
1054
1093
|
}
|
|
@@ -1058,14 +1097,7 @@ function BlockStyles(props) {
|
|
|
1058
1097
|
return true;
|
|
1059
1098
|
});
|
|
1060
1099
|
const css = createMemo(() => {
|
|
1061
|
-
const processedBlock =
|
|
1062
|
-
block: props.block,
|
|
1063
|
-
localState: props.context.localState,
|
|
1064
|
-
rootState: props.context.rootState,
|
|
1065
|
-
rootSetState: props.context.rootSetState,
|
|
1066
|
-
context: props.context.context,
|
|
1067
|
-
shouldEvaluateBindings: true
|
|
1068
|
-
});
|
|
1100
|
+
const processedBlock = props.block;
|
|
1069
1101
|
const styles = processedBlock.responsiveStyles;
|
|
1070
1102
|
const content = props.context.content;
|
|
1071
1103
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(
|
|
@@ -1334,12 +1366,9 @@ var Repeated_block_default = RepeatedBlock;
|
|
|
1334
1366
|
|
|
1335
1367
|
// src/components/block/block.tsx
|
|
1336
1368
|
function Block(props) {
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
context: props.context,
|
|
1341
|
-
registeredComponents: props.registeredComponents
|
|
1342
|
-
});
|
|
1369
|
+
const [_processedBlock, set_processedBlock] = createSignal5({
|
|
1370
|
+
value: null,
|
|
1371
|
+
update: false
|
|
1343
1372
|
});
|
|
1344
1373
|
const repeatItem = createMemo5(() => {
|
|
1345
1374
|
return getRepeatItemData({
|
|
@@ -1348,7 +1377,7 @@ function Block(props) {
|
|
|
1348
1377
|
});
|
|
1349
1378
|
});
|
|
1350
1379
|
const processedBlock = createMemo5(() => {
|
|
1351
|
-
|
|
1380
|
+
const blockToUse = props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
1352
1381
|
block: props.block,
|
|
1353
1382
|
localState: props.context.localState,
|
|
1354
1383
|
rootState: props.context.rootState,
|
|
@@ -1356,6 +1385,13 @@ function Block(props) {
|
|
|
1356
1385
|
context: props.context.context,
|
|
1357
1386
|
shouldEvaluateBindings: true
|
|
1358
1387
|
});
|
|
1388
|
+
return blockToUse;
|
|
1389
|
+
});
|
|
1390
|
+
const blockComponent = createMemo5(() => {
|
|
1391
|
+
return getComponent({
|
|
1392
|
+
block: processedBlock(),
|
|
1393
|
+
registeredComponents: props.registeredComponents
|
|
1394
|
+
});
|
|
1359
1395
|
});
|
|
1360
1396
|
const Tag = createMemo5(() => {
|
|
1361
1397
|
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
@@ -1413,9 +1449,24 @@ function Block(props) {
|
|
|
1413
1449
|
}
|
|
1414
1450
|
});
|
|
1415
1451
|
return <><Show4 when={canShowBlock()}>
|
|
1416
|
-
<Block_styles_default
|
|
1452
|
+
<Block_styles_default
|
|
1453
|
+
block={processedBlock()}
|
|
1454
|
+
context={props.context}
|
|
1455
|
+
/>
|
|
1417
1456
|
<Show4
|
|
1418
|
-
fallback={<
|
|
1457
|
+
fallback={<Show4
|
|
1458
|
+
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
1459
|
+
const index = _index();
|
|
1460
|
+
return <Repeated_block_default
|
|
1461
|
+
key={index}
|
|
1462
|
+
repeatContext={data.context}
|
|
1463
|
+
block={data.block}
|
|
1464
|
+
registeredComponents={props.registeredComponents}
|
|
1465
|
+
linkComponent={props.linkComponent}
|
|
1466
|
+
/>;
|
|
1467
|
+
}}</For2>}
|
|
1468
|
+
when={!repeatItem()}
|
|
1469
|
+
><Component_ref_default
|
|
1419
1470
|
componentRef={componentRefProps().componentRef}
|
|
1420
1471
|
componentOptions={componentRefProps().componentOptions}
|
|
1421
1472
|
blockChildren={componentRefProps().blockChildren}
|
|
@@ -1425,7 +1476,7 @@ function Block(props) {
|
|
|
1425
1476
|
builderBlock={componentRefProps().builderBlock}
|
|
1426
1477
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
1427
1478
|
isInteractive={componentRefProps().isInteractive}
|
|
1428
|
-
|
|
1479
|
+
/></Show4>}
|
|
1429
1480
|
when={!blockComponent()?.noWrap}
|
|
1430
1481
|
><Show4
|
|
1431
1482
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
@@ -1471,7 +1522,7 @@ function Block(props) {
|
|
|
1471
1522
|
var Block_default = Block;
|
|
1472
1523
|
|
|
1473
1524
|
// src/components/blocks/blocks-wrapper.tsx
|
|
1474
|
-
import { createMemo as createMemo6 } from "solid-js";
|
|
1525
|
+
import { onMount as onMount2, createMemo as createMemo6 } from "solid-js";
|
|
1475
1526
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
1476
1527
|
function BlocksWrapper(props) {
|
|
1477
1528
|
const className = createMemo6(() => {
|
|
@@ -1505,9 +1556,13 @@ function BlocksWrapper(props) {
|
|
|
1505
1556
|
);
|
|
1506
1557
|
}
|
|
1507
1558
|
}
|
|
1559
|
+
let blocksWrapperRef;
|
|
1560
|
+
onMount2(() => {
|
|
1561
|
+
});
|
|
1508
1562
|
return <>
|
|
1509
1563
|
<Dynamic4
|
|
1510
|
-
class={className() + " dynamic-
|
|
1564
|
+
class={className() + " dynamic-4da8c6f4"}
|
|
1565
|
+
ref={blocksWrapperRef}
|
|
1511
1566
|
builder-path={props.path}
|
|
1512
1567
|
builder-parent-id={props.parent}
|
|
1513
1568
|
{...{}}
|
|
@@ -1518,7 +1573,7 @@ function BlocksWrapper(props) {
|
|
|
1518
1573
|
{...props.BlocksWrapperProps}
|
|
1519
1574
|
component={props.BlocksWrapper}
|
|
1520
1575
|
>{props.children}</Dynamic4>
|
|
1521
|
-
<style>{`.dynamic-
|
|
1576
|
+
<style>{`.dynamic-4da8c6f4 {
|
|
1522
1577
|
display: flex;
|
|
1523
1578
|
flex-direction: column;
|
|
1524
1579
|
align-items: stretch;
|
|
@@ -1722,7 +1777,7 @@ function FragmentComponent(props) {
|
|
|
1722
1777
|
var fragment_default = FragmentComponent;
|
|
1723
1778
|
|
|
1724
1779
|
// src/blocks/image/image.tsx
|
|
1725
|
-
import { Show as Show7, onMount as
|
|
1780
|
+
import { Show as Show7, onMount as onMount3, createMemo as createMemo8 } from "solid-js";
|
|
1726
1781
|
|
|
1727
1782
|
// src/blocks/image/image.helpers.ts
|
|
1728
1783
|
function removeProtocol(path) {
|
|
@@ -1812,7 +1867,7 @@ function Image(props) {
|
|
|
1812
1867
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
1813
1868
|
return out;
|
|
1814
1869
|
});
|
|
1815
|
-
|
|
1870
|
+
onMount3(() => {
|
|
1816
1871
|
});
|
|
1817
1872
|
return <>
|
|
1818
1873
|
<>
|
|
@@ -1888,10 +1943,10 @@ function SectionComponent(props) {
|
|
|
1888
1943
|
var section_default = SectionComponent;
|
|
1889
1944
|
|
|
1890
1945
|
// src/blocks/symbol/symbol.tsx
|
|
1891
|
-
import { onMount as
|
|
1946
|
+
import { onMount as onMount7, on as on4, createEffect as createEffect4, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
|
|
1892
1947
|
|
|
1893
1948
|
// src/components/content-variants/content-variants.tsx
|
|
1894
|
-
import { Show as Show14, For as For9, onMount as
|
|
1949
|
+
import { Show as Show14, For as For9, onMount as onMount6, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
|
|
1895
1950
|
|
|
1896
1951
|
// src/helpers/url.ts
|
|
1897
1952
|
var getTopLevelDomain = (host) => {
|
|
@@ -2831,7 +2886,8 @@ var componentInfo7 = {
|
|
|
2831
2886
|
defaultValue: "children"
|
|
2832
2887
|
}],
|
|
2833
2888
|
shouldReceiveBuilderProps: {
|
|
2834
|
-
builderContext: true
|
|
2889
|
+
builderContext: true,
|
|
2890
|
+
builderComponents: true
|
|
2835
2891
|
}
|
|
2836
2892
|
};
|
|
2837
2893
|
|
|
@@ -2848,6 +2904,7 @@ function Slot(props) {
|
|
|
2848
2904
|
parent={props.builderContext.context?.symbolId}
|
|
2849
2905
|
path={`symbol.data.${props.name}`}
|
|
2850
2906
|
context={props.builderContext}
|
|
2907
|
+
registeredComponents={props.builderComponents}
|
|
2851
2908
|
blocks={props.builderContext.rootState?.[props.name]}
|
|
2852
2909
|
/></div></>;
|
|
2853
2910
|
}
|
|
@@ -3180,12 +3237,12 @@ var componentInfo11 = {
|
|
|
3180
3237
|
};
|
|
3181
3238
|
|
|
3182
3239
|
// src/blocks/custom-code/custom-code.tsx
|
|
3183
|
-
import { onMount as
|
|
3240
|
+
import { onMount as onMount4, createSignal as createSignal12 } from "solid-js";
|
|
3184
3241
|
function CustomCode(props) {
|
|
3185
3242
|
const [scriptsInserted, setScriptsInserted] = createSignal12([]);
|
|
3186
3243
|
const [scriptsRun, setScriptsRun] = createSignal12([]);
|
|
3187
3244
|
let elementRef;
|
|
3188
|
-
|
|
3245
|
+
onMount4(() => {
|
|
3189
3246
|
if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
|
|
3190
3247
|
return;
|
|
3191
3248
|
}
|
|
@@ -3245,7 +3302,7 @@ var componentInfo12 = {
|
|
|
3245
3302
|
};
|
|
3246
3303
|
|
|
3247
3304
|
// src/blocks/embed/embed.tsx
|
|
3248
|
-
import { on, createEffect, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
3305
|
+
import { on as on2, createEffect as createEffect2, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
3249
3306
|
|
|
3250
3307
|
// src/blocks/embed/helpers.ts
|
|
3251
3308
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -3287,8 +3344,8 @@ function Embed(props) {
|
|
|
3287
3344
|
findAndRunScripts();
|
|
3288
3345
|
}
|
|
3289
3346
|
}
|
|
3290
|
-
|
|
3291
|
-
|
|
3347
|
+
createEffect2(
|
|
3348
|
+
on2(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
|
|
3292
3349
|
);
|
|
3293
3350
|
return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
|
|
3294
3351
|
}
|
|
@@ -4354,9 +4411,9 @@ var Inlined_script_default = InlinedScript;
|
|
|
4354
4411
|
// src/components/content/components/enable-editor.tsx
|
|
4355
4412
|
import {
|
|
4356
4413
|
Show as Show12,
|
|
4357
|
-
onMount as
|
|
4358
|
-
on as
|
|
4359
|
-
createEffect as
|
|
4414
|
+
onMount as onMount5,
|
|
4415
|
+
on as on3,
|
|
4416
|
+
createEffect as createEffect3,
|
|
4360
4417
|
createMemo as createMemo16,
|
|
4361
4418
|
createSignal as createSignal16
|
|
4362
4419
|
} from "solid-js";
|
|
@@ -4465,7 +4522,7 @@ var generateContentUrl = (options) => {
|
|
|
4465
4522
|
locale,
|
|
4466
4523
|
apiVersion = DEFAULT_API_VERSION,
|
|
4467
4524
|
fields,
|
|
4468
|
-
omit,
|
|
4525
|
+
omit: omit2,
|
|
4469
4526
|
offset,
|
|
4470
4527
|
cacheSeconds,
|
|
4471
4528
|
staleCacheSeconds,
|
|
@@ -4488,7 +4545,7 @@ var generateContentUrl = (options) => {
|
|
|
4488
4545
|
url.searchParams.set("locale", locale);
|
|
4489
4546
|
if (enrich)
|
|
4490
4547
|
url.searchParams.set("enrich", String(enrich));
|
|
4491
|
-
url.searchParams.set("omit",
|
|
4548
|
+
url.searchParams.set("omit", omit2 || "meta.componentsUsed");
|
|
4492
4549
|
if (fields) {
|
|
4493
4550
|
url.searchParams.set("fields", fields);
|
|
4494
4551
|
}
|
|
@@ -4861,7 +4918,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4861
4918
|
}
|
|
4862
4919
|
|
|
4863
4920
|
// src/constants/sdk-version.ts
|
|
4864
|
-
var SDK_VERSION = "2.0.
|
|
4921
|
+
var SDK_VERSION = "2.0.13";
|
|
4865
4922
|
|
|
4866
4923
|
// src/functions/register.ts
|
|
4867
4924
|
var registry = {};
|
|
@@ -5301,7 +5358,7 @@ function EnableEditor(props) {
|
|
|
5301
5358
|
}
|
|
5302
5359
|
}
|
|
5303
5360
|
let elementRef;
|
|
5304
|
-
|
|
5361
|
+
onMount5(() => {
|
|
5305
5362
|
if (isBrowser()) {
|
|
5306
5363
|
if (isEditing()) {
|
|
5307
5364
|
window.addEventListener("message", processMessage);
|
|
@@ -5362,7 +5419,7 @@ function EnableEditor(props) {
|
|
|
5362
5419
|
}
|
|
5363
5420
|
}
|
|
5364
5421
|
});
|
|
5365
|
-
|
|
5422
|
+
onMount5(() => {
|
|
5366
5423
|
if (!props.apiKey) {
|
|
5367
5424
|
logger.error(
|
|
5368
5425
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
@@ -5378,13 +5435,13 @@ function EnableEditor(props) {
|
|
|
5378
5435
|
mergeNewContent(props.content);
|
|
5379
5436
|
}
|
|
5380
5437
|
}
|
|
5381
|
-
|
|
5438
|
+
createEffect3(on3(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
5382
5439
|
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo16(() => props.builderContextSignal.content?.data?.jsCode);
|
|
5383
5440
|
function onUpdateFn_1() {
|
|
5384
5441
|
evaluateJsCode();
|
|
5385
5442
|
}
|
|
5386
|
-
|
|
5387
|
-
|
|
5443
|
+
createEffect3(
|
|
5444
|
+
on3(
|
|
5388
5445
|
() => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()],
|
|
5389
5446
|
onUpdateFn_1
|
|
5390
5447
|
)
|
|
@@ -5393,8 +5450,8 @@ function EnableEditor(props) {
|
|
|
5393
5450
|
function onUpdateFn_2() {
|
|
5394
5451
|
runHttpRequests();
|
|
5395
5452
|
}
|
|
5396
|
-
|
|
5397
|
-
|
|
5453
|
+
createEffect3(
|
|
5454
|
+
on3(
|
|
5398
5455
|
() => [
|
|
5399
5456
|
onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()
|
|
5400
5457
|
],
|
|
@@ -5407,8 +5464,8 @@ function EnableEditor(props) {
|
|
|
5407
5464
|
function onUpdateFn_3() {
|
|
5408
5465
|
emitStateUpdate();
|
|
5409
5466
|
}
|
|
5410
|
-
|
|
5411
|
-
|
|
5467
|
+
createEffect3(
|
|
5468
|
+
on3(
|
|
5412
5469
|
() => [onUpdateFn_3_props_builderContextSignal_rootState()],
|
|
5413
5470
|
onUpdateFn_3
|
|
5414
5471
|
)
|
|
@@ -5419,7 +5476,7 @@ function EnableEditor(props) {
|
|
|
5419
5476
|
mergeNewRootState(props.data);
|
|
5420
5477
|
}
|
|
5421
5478
|
}
|
|
5422
|
-
|
|
5479
|
+
createEffect3(on3(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
|
|
5423
5480
|
const onUpdateFn_5_props_locale = createMemo16(() => props.locale);
|
|
5424
5481
|
function onUpdateFn_5() {
|
|
5425
5482
|
if (props.locale) {
|
|
@@ -5428,7 +5485,7 @@ function EnableEditor(props) {
|
|
|
5428
5485
|
});
|
|
5429
5486
|
}
|
|
5430
5487
|
}
|
|
5431
|
-
|
|
5488
|
+
createEffect3(on3(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
5432
5489
|
return <><builder_context_default.Provider value={props.builderContextSignal}><Show12 when={props.builderContextSignal.content}><Dynamic5
|
|
5433
5490
|
class={getWrapperClassName(
|
|
5434
5491
|
props.content?.testVariationId || props.content?.id
|
|
@@ -5653,7 +5710,7 @@ function ContentVariants(props) {
|
|
|
5653
5710
|
canTrack: getDefaultCanTrack(props.canTrack)
|
|
5654
5711
|
});
|
|
5655
5712
|
});
|
|
5656
|
-
|
|
5713
|
+
onMount6(() => {
|
|
5657
5714
|
setShouldRenderVariants(false);
|
|
5658
5715
|
});
|
|
5659
5716
|
return <><>
|
|
@@ -5781,13 +5838,13 @@ function Symbol(props) {
|
|
|
5781
5838
|
}
|
|
5782
5839
|
});
|
|
5783
5840
|
}
|
|
5784
|
-
|
|
5841
|
+
onMount7(() => {
|
|
5785
5842
|
});
|
|
5786
5843
|
const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
|
|
5787
5844
|
function onUpdateFn_0() {
|
|
5788
5845
|
setContent();
|
|
5789
5846
|
}
|
|
5790
|
-
|
|
5847
|
+
createEffect4(on4(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
5791
5848
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
5792
5849
|
nonce={props.builderContext.nonce}
|
|
5793
5850
|
isNestedRender={true}
|