@portabletext/editor 1.49.5 → 1.49.6
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/index.cjs +20 -19
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +20 -19
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/editor/sync-machine.ts +22 -18
package/lib/index.js
CHANGED
|
@@ -3045,28 +3045,29 @@ async function updateValue({
|
|
|
3045
3045
|
streamBlocks ? await new Promise((resolve) => {
|
|
3046
3046
|
Editor.withoutNormalizing(slateEditor, () => {
|
|
3047
3047
|
withRemoteChanges(slateEditor, () => {
|
|
3048
|
-
withoutPatching(slateEditor,
|
|
3048
|
+
withoutPatching(slateEditor, () => {
|
|
3049
3049
|
isChanged = removeExtraBlocks({
|
|
3050
3050
|
slateEditor,
|
|
3051
3051
|
slateValueFromProps
|
|
3052
|
-
})
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3052
|
+
}), (async () => {
|
|
3053
|
+
for await (const [currentBlock, currentBlockIndex] of getStreamedBlocks({
|
|
3054
|
+
slateValue: slateValueFromProps
|
|
3055
|
+
})) {
|
|
3056
|
+
const {
|
|
3057
|
+
blockChanged,
|
|
3058
|
+
blockValid
|
|
3059
|
+
} = syncBlock({
|
|
3060
|
+
context,
|
|
3061
|
+
sendBack,
|
|
3062
|
+
block: currentBlock,
|
|
3063
|
+
index: currentBlockIndex,
|
|
3064
|
+
slateEditor,
|
|
3065
|
+
value
|
|
3066
|
+
});
|
|
3067
|
+
isChanged = blockChanged || isChanged, isValid = isValid && blockValid;
|
|
3068
|
+
}
|
|
3069
|
+
resolve();
|
|
3070
|
+
})();
|
|
3070
3071
|
});
|
|
3071
3072
|
});
|
|
3072
3073
|
});
|