@chaibuilder/sdk 2.0.0-beta.82 → 2.0.0-beta.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs +4 -3
- package/dist/core.js +4 -3
- package/package.json +1 -1
package/dist/core.cjs
CHANGED
|
@@ -592,6 +592,7 @@ const memo2$1 = (create, dep1, dep2) => {
|
|
|
592
592
|
const cache2 = getCached$1(() => /* @__PURE__ */ new WeakMap(), cache1$2, dep1);
|
|
593
593
|
return getCached$1(create, cache2, dep2);
|
|
594
594
|
};
|
|
595
|
+
const cacheKeyForEmptyKeyExtractor = {};
|
|
595
596
|
const isWritable = (atom2) => !!atom2.write;
|
|
596
597
|
const isFunction = (x) => typeof x === "function";
|
|
597
598
|
function splitAtom(arrAtom, keyExtractor) {
|
|
@@ -607,7 +608,7 @@ function splitAtom(arrAtom, keyExtractor) {
|
|
|
607
608
|
const atomList = [];
|
|
608
609
|
const keyList = [];
|
|
609
610
|
arr.forEach((item, index) => {
|
|
610
|
-
const key =
|
|
611
|
+
const key = index;
|
|
611
612
|
keyList[index] = key;
|
|
612
613
|
const cachedAtom = prevMapping && prevMapping.atomList[prevMapping.keyList.indexOf(key)];
|
|
613
614
|
if (cachedAtom) {
|
|
@@ -718,7 +719,7 @@ function splitAtom(arrAtom, keyExtractor) {
|
|
|
718
719
|
return splittedAtom;
|
|
719
720
|
},
|
|
720
721
|
arrAtom,
|
|
721
|
-
|
|
722
|
+
cacheKeyForEmptyKeyExtractor
|
|
722
723
|
);
|
|
723
724
|
}
|
|
724
725
|
const isPromiseLike$1 = (x) => typeof (x == null ? void 0 : x.then) === "function";
|
|
@@ -1239,7 +1240,7 @@ const treeDSBlocks = jotai.atom((get) => {
|
|
|
1239
1240
|
return convertToBlocksTree([...presentBlocks]);
|
|
1240
1241
|
});
|
|
1241
1242
|
treeDSBlocks.debugLabel = "treeDSBlocks";
|
|
1242
|
-
const pageBlocksAtomsAtom = splitAtom(presentBlocksAtom
|
|
1243
|
+
const pageBlocksAtomsAtom = splitAtom(presentBlocksAtom);
|
|
1243
1244
|
pageBlocksAtomsAtom.debugLabel = "pageBlocksAtomsAtom";
|
|
1244
1245
|
const builderActivePageAtom = jotai.atom("");
|
|
1245
1246
|
builderActivePageAtom.debugLabel = "builderActivePageAtom";
|
package/dist/core.js
CHANGED
|
@@ -577,6 +577,7 @@ const memo2$1 = (create, dep1, dep2) => {
|
|
|
577
577
|
const cache2 = getCached$1(() => /* @__PURE__ */ new WeakMap(), cache1$2, dep1);
|
|
578
578
|
return getCached$1(create, cache2, dep2);
|
|
579
579
|
};
|
|
580
|
+
const cacheKeyForEmptyKeyExtractor = {};
|
|
580
581
|
const isWritable = (atom2) => !!atom2.write;
|
|
581
582
|
const isFunction = (x) => typeof x === "function";
|
|
582
583
|
function splitAtom(arrAtom, keyExtractor) {
|
|
@@ -592,7 +593,7 @@ function splitAtom(arrAtom, keyExtractor) {
|
|
|
592
593
|
const atomList = [];
|
|
593
594
|
const keyList = [];
|
|
594
595
|
arr.forEach((item, index) => {
|
|
595
|
-
const key =
|
|
596
|
+
const key = index;
|
|
596
597
|
keyList[index] = key;
|
|
597
598
|
const cachedAtom = prevMapping && prevMapping.atomList[prevMapping.keyList.indexOf(key)];
|
|
598
599
|
if (cachedAtom) {
|
|
@@ -703,7 +704,7 @@ function splitAtom(arrAtom, keyExtractor) {
|
|
|
703
704
|
return splittedAtom;
|
|
704
705
|
},
|
|
705
706
|
arrAtom,
|
|
706
|
-
|
|
707
|
+
cacheKeyForEmptyKeyExtractor
|
|
707
708
|
);
|
|
708
709
|
}
|
|
709
710
|
const isPromiseLike$1 = (x) => typeof (x == null ? void 0 : x.then) === "function";
|
|
@@ -1224,7 +1225,7 @@ const treeDSBlocks = atom$1((get2) => {
|
|
|
1224
1225
|
return convertToBlocksTree([...presentBlocks]);
|
|
1225
1226
|
});
|
|
1226
1227
|
treeDSBlocks.debugLabel = "treeDSBlocks";
|
|
1227
|
-
const pageBlocksAtomsAtom = splitAtom(presentBlocksAtom
|
|
1228
|
+
const pageBlocksAtomsAtom = splitAtom(presentBlocksAtom);
|
|
1228
1229
|
pageBlocksAtomsAtom.debugLabel = "pageBlocksAtomsAtom";
|
|
1229
1230
|
const builderActivePageAtom = atom$1("");
|
|
1230
1231
|
builderActivePageAtom.debugLabel = "builderActivePageAtom";
|