@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/index.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 = {
|
|
@@ -385,7 +400,7 @@ if (typeof output === 'object' && output !== null) {
|
|
|
385
400
|
};
|
|
386
401
|
var IVM_INSTANCE = null;
|
|
387
402
|
var IVM_CONTEXT = null;
|
|
388
|
-
var SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react";
|
|
403
|
+
var SHOULD_MENTION_INITIALIZE_SCRIPT = SDK_NAME === "@builder.io/sdk-react-nextjs" || SDK_NAME === "@builder.io/sdk-react" || SDK_NAME === "@builder.io/sdk-qwik";
|
|
389
404
|
var getIvm = () => {
|
|
390
405
|
try {
|
|
391
406
|
if (IVM_INSTANCE)
|
|
@@ -400,7 +415,7 @@ var getIvm = () => {
|
|
|
400
415
|
|
|
401
416
|
SOLUTION: In a server-only execution path within your application, do one of the following:
|
|
402
417
|
|
|
403
|
-
${SHOULD_MENTION_INITIALIZE_SCRIPT ?
|
|
418
|
+
${SHOULD_MENTION_INITIALIZE_SCRIPT ? `- import and call \`initializeNodeRuntime()\` from "${SDK_NAME}/node/init".` : ""}
|
|
404
419
|
- add the following import: \`await import('isolated-vm')\`.
|
|
405
420
|
|
|
406
421
|
For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
|
|
@@ -504,6 +519,7 @@ var shouldForceBrowserRuntimeInNode = () => {
|
|
|
504
519
|
var chooseBrowserOrServerEval = (args) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(args) : runInNode(args);
|
|
505
520
|
|
|
506
521
|
// src/functions/evaluate/evaluate.ts
|
|
522
|
+
var DISABLE_CACHE = true;
|
|
507
523
|
var EvalCache = class _EvalCache {
|
|
508
524
|
static cacheLimit = 20;
|
|
509
525
|
static cache = /* @__PURE__ */ new Map();
|
|
@@ -552,7 +568,7 @@ function evaluate({
|
|
|
552
568
|
rootState,
|
|
553
569
|
localState
|
|
554
570
|
};
|
|
555
|
-
if (enableCache) {
|
|
571
|
+
if (enableCache && !DISABLE_CACHE) {
|
|
556
572
|
const cacheKey = EvalCache.getCacheKey(args);
|
|
557
573
|
const cachedValue = EvalCache.getCachedValue(cacheKey);
|
|
558
574
|
if (cachedValue) {
|
|
@@ -580,6 +596,53 @@ function transformBlock(block) {
|
|
|
580
596
|
}
|
|
581
597
|
|
|
582
598
|
// src/functions/get-processed-block.ts
|
|
599
|
+
function deepCloneWithConditions(obj) {
|
|
600
|
+
if (obj === null || typeof obj !== "object") {
|
|
601
|
+
return obj;
|
|
602
|
+
}
|
|
603
|
+
if (Array.isArray(obj)) {
|
|
604
|
+
return obj.map((item) => deepCloneWithConditions(item));
|
|
605
|
+
}
|
|
606
|
+
if (obj["@type"] === "@builder.io/sdk:Element") {
|
|
607
|
+
return obj;
|
|
608
|
+
}
|
|
609
|
+
const clonedObj = {};
|
|
610
|
+
for (const key in obj) {
|
|
611
|
+
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
612
|
+
clonedObj[key] = deepCloneWithConditions(obj[key]);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
return clonedObj;
|
|
616
|
+
}
|
|
617
|
+
var IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK = ["svelte", "vue", "angular", "qwik", "solid"].includes(TARGET);
|
|
618
|
+
var getCopy = (block) => {
|
|
619
|
+
if (IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK) {
|
|
620
|
+
const copy = fastClone(block);
|
|
621
|
+
const copied = {
|
|
622
|
+
...copy,
|
|
623
|
+
properties: {
|
|
624
|
+
...copy.properties
|
|
625
|
+
},
|
|
626
|
+
actions: {
|
|
627
|
+
...copy.actions
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
return copied;
|
|
631
|
+
} else {
|
|
632
|
+
const copy = deepCloneWithConditions(omit(block, "children", "meta"));
|
|
633
|
+
return {
|
|
634
|
+
...copy,
|
|
635
|
+
properties: {
|
|
636
|
+
...copy.properties
|
|
637
|
+
},
|
|
638
|
+
actions: {
|
|
639
|
+
...copy.actions
|
|
640
|
+
},
|
|
641
|
+
children: block.children,
|
|
642
|
+
meta: block.meta
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
};
|
|
583
646
|
var evaluateBindings = ({
|
|
584
647
|
block,
|
|
585
648
|
context,
|
|
@@ -590,16 +653,7 @@ var evaluateBindings = ({
|
|
|
590
653
|
if (!block.bindings) {
|
|
591
654
|
return block;
|
|
592
655
|
}
|
|
593
|
-
const
|
|
594
|
-
const copied = {
|
|
595
|
-
...copy,
|
|
596
|
-
properties: {
|
|
597
|
-
...copy.properties
|
|
598
|
-
},
|
|
599
|
-
actions: {
|
|
600
|
-
...copy.actions
|
|
601
|
-
}
|
|
602
|
-
};
|
|
656
|
+
const copied = getCopy(block);
|
|
603
657
|
for (const binding in block.bindings) {
|
|
604
658
|
const expression = block.bindings[binding];
|
|
605
659
|
const value = evaluate({
|
|
@@ -881,17 +935,9 @@ function mapStyleObjToStrIfNeeded(style) {
|
|
|
881
935
|
// src/components/block/block.helpers.ts
|
|
882
936
|
var getComponent = ({
|
|
883
937
|
block,
|
|
884
|
-
context,
|
|
885
938
|
registeredComponents
|
|
886
939
|
}) => {
|
|
887
|
-
const componentName =
|
|
888
|
-
block,
|
|
889
|
-
localState: context.localState,
|
|
890
|
-
rootState: context.rootState,
|
|
891
|
-
rootSetState: context.rootSetState,
|
|
892
|
-
context: context.context,
|
|
893
|
-
shouldEvaluateBindings: false
|
|
894
|
-
}).component?.name;
|
|
940
|
+
const componentName = block.component?.name;
|
|
895
941
|
if (!componentName) {
|
|
896
942
|
return null;
|
|
897
943
|
}
|
|
@@ -1035,14 +1081,7 @@ var Inlined_styles_default = InlinedStyles;
|
|
|
1035
1081
|
// src/components/block/components/block-styles.tsx
|
|
1036
1082
|
function BlockStyles(props) {
|
|
1037
1083
|
const canShowBlock = createMemo(() => {
|
|
1038
|
-
const processedBlock =
|
|
1039
|
-
block: props.block,
|
|
1040
|
-
localState: props.context.localState,
|
|
1041
|
-
rootState: props.context.rootState,
|
|
1042
|
-
rootSetState: props.context.rootSetState,
|
|
1043
|
-
context: props.context.context,
|
|
1044
|
-
shouldEvaluateBindings: true
|
|
1045
|
-
});
|
|
1084
|
+
const processedBlock = props.block;
|
|
1046
1085
|
if (checkIsDefined(processedBlock.hide)) {
|
|
1047
1086
|
return !processedBlock.hide;
|
|
1048
1087
|
}
|
|
@@ -1052,14 +1091,7 @@ function BlockStyles(props) {
|
|
|
1052
1091
|
return true;
|
|
1053
1092
|
});
|
|
1054
1093
|
const css = createMemo(() => {
|
|
1055
|
-
const processedBlock =
|
|
1056
|
-
block: props.block,
|
|
1057
|
-
localState: props.context.localState,
|
|
1058
|
-
rootState: props.context.rootState,
|
|
1059
|
-
rootSetState: props.context.rootSetState,
|
|
1060
|
-
context: props.context.context,
|
|
1061
|
-
shouldEvaluateBindings: true
|
|
1062
|
-
});
|
|
1094
|
+
const processedBlock = props.block;
|
|
1063
1095
|
const styles = processedBlock.responsiveStyles;
|
|
1064
1096
|
const content = props.context.content;
|
|
1065
1097
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(
|
|
@@ -1328,12 +1360,9 @@ var Repeated_block_default = RepeatedBlock;
|
|
|
1328
1360
|
|
|
1329
1361
|
// src/components/block/block.tsx
|
|
1330
1362
|
function Block(props) {
|
|
1331
|
-
const
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
context: props.context,
|
|
1335
|
-
registeredComponents: props.registeredComponents
|
|
1336
|
-
});
|
|
1363
|
+
const [_processedBlock, set_processedBlock] = createSignal5({
|
|
1364
|
+
value: null,
|
|
1365
|
+
update: false
|
|
1337
1366
|
});
|
|
1338
1367
|
const repeatItem = createMemo5(() => {
|
|
1339
1368
|
return getRepeatItemData({
|
|
@@ -1342,7 +1371,7 @@ function Block(props) {
|
|
|
1342
1371
|
});
|
|
1343
1372
|
});
|
|
1344
1373
|
const processedBlock = createMemo5(() => {
|
|
1345
|
-
|
|
1374
|
+
const blockToUse = props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
1346
1375
|
block: props.block,
|
|
1347
1376
|
localState: props.context.localState,
|
|
1348
1377
|
rootState: props.context.rootState,
|
|
@@ -1350,6 +1379,13 @@ function Block(props) {
|
|
|
1350
1379
|
context: props.context.context,
|
|
1351
1380
|
shouldEvaluateBindings: true
|
|
1352
1381
|
});
|
|
1382
|
+
return blockToUse;
|
|
1383
|
+
});
|
|
1384
|
+
const blockComponent = createMemo5(() => {
|
|
1385
|
+
return getComponent({
|
|
1386
|
+
block: processedBlock(),
|
|
1387
|
+
registeredComponents: props.registeredComponents
|
|
1388
|
+
});
|
|
1353
1389
|
});
|
|
1354
1390
|
const Tag = createMemo5(() => {
|
|
1355
1391
|
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
@@ -1407,9 +1443,24 @@ function Block(props) {
|
|
|
1407
1443
|
}
|
|
1408
1444
|
});
|
|
1409
1445
|
return <><Show4 when={canShowBlock()}>
|
|
1410
|
-
<Block_styles_default
|
|
1446
|
+
<Block_styles_default
|
|
1447
|
+
block={processedBlock()}
|
|
1448
|
+
context={props.context}
|
|
1449
|
+
/>
|
|
1411
1450
|
<Show4
|
|
1412
|
-
fallback={<
|
|
1451
|
+
fallback={<Show4
|
|
1452
|
+
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
1453
|
+
const index = _index();
|
|
1454
|
+
return <Repeated_block_default
|
|
1455
|
+
key={index}
|
|
1456
|
+
repeatContext={data.context}
|
|
1457
|
+
block={data.block}
|
|
1458
|
+
registeredComponents={props.registeredComponents}
|
|
1459
|
+
linkComponent={props.linkComponent}
|
|
1460
|
+
/>;
|
|
1461
|
+
}}</For2>}
|
|
1462
|
+
when={!repeatItem()}
|
|
1463
|
+
><Component_ref_default
|
|
1413
1464
|
componentRef={componentRefProps().componentRef}
|
|
1414
1465
|
componentOptions={componentRefProps().componentOptions}
|
|
1415
1466
|
blockChildren={componentRefProps().blockChildren}
|
|
@@ -1419,7 +1470,7 @@ function Block(props) {
|
|
|
1419
1470
|
builderBlock={componentRefProps().builderBlock}
|
|
1420
1471
|
includeBlockProps={componentRefProps().includeBlockProps}
|
|
1421
1472
|
isInteractive={componentRefProps().isInteractive}
|
|
1422
|
-
|
|
1473
|
+
/></Show4>}
|
|
1423
1474
|
when={!blockComponent()?.noWrap}
|
|
1424
1475
|
><Show4
|
|
1425
1476
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
@@ -1465,7 +1516,7 @@ function Block(props) {
|
|
|
1465
1516
|
var Block_default = Block;
|
|
1466
1517
|
|
|
1467
1518
|
// src/components/blocks/blocks-wrapper.tsx
|
|
1468
|
-
import { createMemo as createMemo6 } from "solid-js";
|
|
1519
|
+
import { onMount as onMount2, createMemo as createMemo6 } from "solid-js";
|
|
1469
1520
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
1470
1521
|
function BlocksWrapper(props) {
|
|
1471
1522
|
const className = createMemo6(() => {
|
|
@@ -1499,9 +1550,13 @@ function BlocksWrapper(props) {
|
|
|
1499
1550
|
);
|
|
1500
1551
|
}
|
|
1501
1552
|
}
|
|
1553
|
+
let blocksWrapperRef;
|
|
1554
|
+
onMount2(() => {
|
|
1555
|
+
});
|
|
1502
1556
|
return <>
|
|
1503
1557
|
<Dynamic4
|
|
1504
|
-
class={className() + " dynamic-
|
|
1558
|
+
class={className() + " dynamic-4da8c6f4"}
|
|
1559
|
+
ref={blocksWrapperRef}
|
|
1505
1560
|
builder-path={props.path}
|
|
1506
1561
|
builder-parent-id={props.parent}
|
|
1507
1562
|
{...{}}
|
|
@@ -1512,7 +1567,7 @@ function BlocksWrapper(props) {
|
|
|
1512
1567
|
{...props.BlocksWrapperProps}
|
|
1513
1568
|
component={props.BlocksWrapper}
|
|
1514
1569
|
>{props.children}</Dynamic4>
|
|
1515
|
-
<style>{`.dynamic-
|
|
1570
|
+
<style>{`.dynamic-4da8c6f4 {
|
|
1516
1571
|
display: flex;
|
|
1517
1572
|
flex-direction: column;
|
|
1518
1573
|
align-items: stretch;
|
|
@@ -1716,7 +1771,7 @@ function FragmentComponent(props) {
|
|
|
1716
1771
|
var fragment_default = FragmentComponent;
|
|
1717
1772
|
|
|
1718
1773
|
// src/blocks/image/image.tsx
|
|
1719
|
-
import { Show as Show7, onMount as
|
|
1774
|
+
import { Show as Show7, onMount as onMount3, createMemo as createMemo8 } from "solid-js";
|
|
1720
1775
|
|
|
1721
1776
|
// src/blocks/image/image.helpers.ts
|
|
1722
1777
|
function removeProtocol(path) {
|
|
@@ -1805,7 +1860,7 @@ function Image(props) {
|
|
|
1805
1860
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
1806
1861
|
return out;
|
|
1807
1862
|
});
|
|
1808
|
-
|
|
1863
|
+
onMount3(() => {
|
|
1809
1864
|
});
|
|
1810
1865
|
return <>
|
|
1811
1866
|
<>
|
|
@@ -1881,10 +1936,10 @@ function SectionComponent(props) {
|
|
|
1881
1936
|
var section_default = SectionComponent;
|
|
1882
1937
|
|
|
1883
1938
|
// src/blocks/symbol/symbol.tsx
|
|
1884
|
-
import { onMount as
|
|
1939
|
+
import { onMount as onMount7, on as on4, createEffect as createEffect4, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
|
|
1885
1940
|
|
|
1886
1941
|
// src/components/content-variants/content-variants.tsx
|
|
1887
|
-
import { Show as Show14, For as For9, onMount as
|
|
1942
|
+
import { Show as Show14, For as For9, onMount as onMount6, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
|
|
1888
1943
|
|
|
1889
1944
|
// src/helpers/url.ts
|
|
1890
1945
|
var getTopLevelDomain = (host) => {
|
|
@@ -2823,7 +2878,8 @@ var componentInfo7 = {
|
|
|
2823
2878
|
defaultValue: "children"
|
|
2824
2879
|
}],
|
|
2825
2880
|
shouldReceiveBuilderProps: {
|
|
2826
|
-
builderContext: true
|
|
2881
|
+
builderContext: true,
|
|
2882
|
+
builderComponents: true
|
|
2827
2883
|
}
|
|
2828
2884
|
};
|
|
2829
2885
|
|
|
@@ -2840,6 +2896,7 @@ function Slot(props) {
|
|
|
2840
2896
|
parent={props.builderContext.context?.symbolId}
|
|
2841
2897
|
path={`symbol.data.${props.name}`}
|
|
2842
2898
|
context={props.builderContext}
|
|
2899
|
+
registeredComponents={props.builderComponents}
|
|
2843
2900
|
blocks={props.builderContext.rootState?.[props.name]}
|
|
2844
2901
|
/></div></>;
|
|
2845
2902
|
}
|
|
@@ -3172,12 +3229,12 @@ var componentInfo11 = {
|
|
|
3172
3229
|
};
|
|
3173
3230
|
|
|
3174
3231
|
// src/blocks/custom-code/custom-code.tsx
|
|
3175
|
-
import { onMount as
|
|
3232
|
+
import { onMount as onMount4, createSignal as createSignal12 } from "solid-js";
|
|
3176
3233
|
function CustomCode(props) {
|
|
3177
3234
|
const [scriptsInserted, setScriptsInserted] = createSignal12([]);
|
|
3178
3235
|
const [scriptsRun, setScriptsRun] = createSignal12([]);
|
|
3179
3236
|
let elementRef;
|
|
3180
|
-
|
|
3237
|
+
onMount4(() => {
|
|
3181
3238
|
if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
|
|
3182
3239
|
return;
|
|
3183
3240
|
}
|
|
@@ -3236,7 +3293,7 @@ var componentInfo12 = {
|
|
|
3236
3293
|
};
|
|
3237
3294
|
|
|
3238
3295
|
// src/blocks/embed/embed.tsx
|
|
3239
|
-
import { on, createEffect, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
3296
|
+
import { on as on2, createEffect as createEffect2, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
3240
3297
|
|
|
3241
3298
|
// src/blocks/embed/helpers.ts
|
|
3242
3299
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -3277,8 +3334,8 @@ function Embed(props) {
|
|
|
3277
3334
|
findAndRunScripts();
|
|
3278
3335
|
}
|
|
3279
3336
|
}
|
|
3280
|
-
|
|
3281
|
-
|
|
3337
|
+
createEffect2(
|
|
3338
|
+
on2(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
|
|
3282
3339
|
);
|
|
3283
3340
|
return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
|
|
3284
3341
|
}
|
|
@@ -4344,9 +4401,9 @@ var Inlined_script_default = InlinedScript;
|
|
|
4344
4401
|
// src/components/content/components/enable-editor.tsx
|
|
4345
4402
|
import {
|
|
4346
4403
|
Show as Show12,
|
|
4347
|
-
onMount as
|
|
4348
|
-
on as
|
|
4349
|
-
createEffect as
|
|
4404
|
+
onMount as onMount5,
|
|
4405
|
+
on as on3,
|
|
4406
|
+
createEffect as createEffect3,
|
|
4350
4407
|
createMemo as createMemo16,
|
|
4351
4408
|
createSignal as createSignal16
|
|
4352
4409
|
} from "solid-js";
|
|
@@ -4453,7 +4510,7 @@ var generateContentUrl = (options) => {
|
|
|
4453
4510
|
locale,
|
|
4454
4511
|
apiVersion = DEFAULT_API_VERSION,
|
|
4455
4512
|
fields,
|
|
4456
|
-
omit,
|
|
4513
|
+
omit: omit2,
|
|
4457
4514
|
offset,
|
|
4458
4515
|
cacheSeconds,
|
|
4459
4516
|
staleCacheSeconds,
|
|
@@ -4476,7 +4533,7 @@ var generateContentUrl = (options) => {
|
|
|
4476
4533
|
url.searchParams.set("locale", locale);
|
|
4477
4534
|
if (enrich)
|
|
4478
4535
|
url.searchParams.set("enrich", String(enrich));
|
|
4479
|
-
url.searchParams.set("omit",
|
|
4536
|
+
url.searchParams.set("omit", omit2 || "meta.componentsUsed");
|
|
4480
4537
|
if (fields) {
|
|
4481
4538
|
url.searchParams.set("fields", fields);
|
|
4482
4539
|
}
|
|
@@ -4846,7 +4903,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4846
4903
|
}
|
|
4847
4904
|
|
|
4848
4905
|
// src/constants/sdk-version.ts
|
|
4849
|
-
var SDK_VERSION = "2.0.
|
|
4906
|
+
var SDK_VERSION = "2.0.13";
|
|
4850
4907
|
|
|
4851
4908
|
// src/functions/register.ts
|
|
4852
4909
|
var registry = {};
|
|
@@ -5284,7 +5341,7 @@ function EnableEditor(props) {
|
|
|
5284
5341
|
}
|
|
5285
5342
|
}
|
|
5286
5343
|
let elementRef;
|
|
5287
|
-
|
|
5344
|
+
onMount5(() => {
|
|
5288
5345
|
if (isBrowser()) {
|
|
5289
5346
|
if (isEditing()) {
|
|
5290
5347
|
window.addEventListener("message", processMessage);
|
|
@@ -5345,7 +5402,7 @@ function EnableEditor(props) {
|
|
|
5345
5402
|
}
|
|
5346
5403
|
}
|
|
5347
5404
|
});
|
|
5348
|
-
|
|
5405
|
+
onMount5(() => {
|
|
5349
5406
|
if (!props.apiKey) {
|
|
5350
5407
|
logger.error(
|
|
5351
5408
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
@@ -5361,13 +5418,13 @@ function EnableEditor(props) {
|
|
|
5361
5418
|
mergeNewContent(props.content);
|
|
5362
5419
|
}
|
|
5363
5420
|
}
|
|
5364
|
-
|
|
5421
|
+
createEffect3(on3(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
5365
5422
|
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo16(() => props.builderContextSignal.content?.data?.jsCode);
|
|
5366
5423
|
function onUpdateFn_1() {
|
|
5367
5424
|
evaluateJsCode();
|
|
5368
5425
|
}
|
|
5369
|
-
|
|
5370
|
-
|
|
5426
|
+
createEffect3(
|
|
5427
|
+
on3(
|
|
5371
5428
|
() => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()],
|
|
5372
5429
|
onUpdateFn_1
|
|
5373
5430
|
)
|
|
@@ -5376,8 +5433,8 @@ function EnableEditor(props) {
|
|
|
5376
5433
|
function onUpdateFn_2() {
|
|
5377
5434
|
runHttpRequests();
|
|
5378
5435
|
}
|
|
5379
|
-
|
|
5380
|
-
|
|
5436
|
+
createEffect3(
|
|
5437
|
+
on3(
|
|
5381
5438
|
() => [
|
|
5382
5439
|
onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()
|
|
5383
5440
|
],
|
|
@@ -5390,8 +5447,8 @@ function EnableEditor(props) {
|
|
|
5390
5447
|
function onUpdateFn_3() {
|
|
5391
5448
|
emitStateUpdate();
|
|
5392
5449
|
}
|
|
5393
|
-
|
|
5394
|
-
|
|
5450
|
+
createEffect3(
|
|
5451
|
+
on3(
|
|
5395
5452
|
() => [onUpdateFn_3_props_builderContextSignal_rootState()],
|
|
5396
5453
|
onUpdateFn_3
|
|
5397
5454
|
)
|
|
@@ -5402,7 +5459,7 @@ function EnableEditor(props) {
|
|
|
5402
5459
|
mergeNewRootState(props.data);
|
|
5403
5460
|
}
|
|
5404
5461
|
}
|
|
5405
|
-
|
|
5462
|
+
createEffect3(on3(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
|
|
5406
5463
|
const onUpdateFn_5_props_locale = createMemo16(() => props.locale);
|
|
5407
5464
|
function onUpdateFn_5() {
|
|
5408
5465
|
if (props.locale) {
|
|
@@ -5411,7 +5468,7 @@ function EnableEditor(props) {
|
|
|
5411
5468
|
});
|
|
5412
5469
|
}
|
|
5413
5470
|
}
|
|
5414
|
-
|
|
5471
|
+
createEffect3(on3(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
5415
5472
|
return <><builder_context_default.Provider value={props.builderContextSignal}><Show12 when={props.builderContextSignal.content}><Dynamic5
|
|
5416
5473
|
class={getWrapperClassName(
|
|
5417
5474
|
props.content?.testVariationId || props.content?.id
|
|
@@ -5636,7 +5693,7 @@ function ContentVariants(props) {
|
|
|
5636
5693
|
canTrack: getDefaultCanTrack(props.canTrack)
|
|
5637
5694
|
});
|
|
5638
5695
|
});
|
|
5639
|
-
|
|
5696
|
+
onMount6(() => {
|
|
5640
5697
|
setShouldRenderVariants(false);
|
|
5641
5698
|
});
|
|
5642
5699
|
return <><>
|
|
@@ -5764,13 +5821,13 @@ function Symbol(props) {
|
|
|
5764
5821
|
}
|
|
5765
5822
|
});
|
|
5766
5823
|
}
|
|
5767
|
-
|
|
5824
|
+
onMount7(() => {
|
|
5768
5825
|
});
|
|
5769
5826
|
const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
|
|
5770
5827
|
function onUpdateFn_0() {
|
|
5771
5828
|
setContent();
|
|
5772
5829
|
}
|
|
5773
|
-
|
|
5830
|
+
createEffect4(on4(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
5774
5831
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
5775
5832
|
nonce={props.builderContext.nonce}
|
|
5776
5833
|
isNestedRender={true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-solid",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"@builder.io/sdks": "workspace:*",
|
|
98
98
|
"esbuild": "^0.18.15",
|
|
99
99
|
"esbuild-plugin-solid": "^0.5.0",
|
|
100
|
-
"nx": "
|
|
101
|
-
"nx-cloud": "
|
|
100
|
+
"nx": "^19.6.5",
|
|
101
|
+
"nx-cloud": "^19.0.0",
|
|
102
102
|
"solid-js": "^1.7.8",
|
|
103
103
|
"tsup": "^7.1.0",
|
|
104
104
|
"tsup-preset-solid": "^2.0.1",
|