@portabletext/editor 1.35.3 → 1.35.4
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/_chunks-cjs/editor-provider.cjs +186 -71
- package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
- package/lib/_chunks-es/editor-provider.js +187 -72
- package/lib/_chunks-es/editor-provider.js.map +1 -1
- package/lib/behaviors/index.d.cts +117 -72
- package/lib/behaviors/index.d.ts +117 -72
- package/lib/index.d.cts +117 -72
- package/lib/index.d.ts +117 -72
- package/lib/plugins/index.d.cts +117 -72
- package/lib/plugins/index.d.ts +117 -72
- package/lib/selectors/index.d.cts +117 -72
- package/lib/selectors/index.d.ts +117 -72
- package/lib/utils/index.d.cts +117 -72
- package/lib/utils/index.d.ts +117 -72
- package/package.json +1 -1
- package/src/editor/__tests__/self-solving.test.tsx +33 -1
- package/src/editor/components/Synchronizer.tsx +17 -3
- package/src/editor/editor-machine.ts +27 -14
- package/src/editor/mutation-machine.ts +160 -46
- package/src/editor/plugins/create-with-event-listeners.ts +1 -0
- package/src/editor/plugins/createWithPatches.ts +10 -3
- package/src/editor/with-applying-behavior-actions.ts +8 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), React = require("react"), slateReact = require("slate-react"), react = require("@xstate/react"), debug$e = require("debug"),
|
|
2
|
+
var jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), React = require("react"), slateReact = require("slate-react"), react = require("@xstate/react"), debug$e = require("debug"), isEqual = require("lodash/isEqual.js"), slate = require("slate"), xstate = require("xstate"), patches = require("@portabletext/patches"), types = require("@sanity/types"), flatten = require("lodash/flatten.js"), isPlainObject = require("lodash/isPlainObject.js"), uniq = require("lodash/uniq.js"), getRandomValues = require("get-random-values-esm"), util_blockOffsetsToSelection = require("./util.block-offsets-to-selection.cjs"), util_sliceBlocks = require("./util.slice-blocks.cjs"), blockTools = require("@portabletext/block-tools"), toHtml = require("@portabletext/to-html"), schema = require("@sanity/schema"), get = require("lodash/get.js"), isUndefined = require("lodash/isUndefined.js"), omitBy = require("lodash/omitBy.js"), selector_isAtTheStartOfBlock = require("./selector.is-at-the-start-of-block.cjs"), selector_isActiveStyle = require("./selector.is-active-style.cjs"), omit = require("lodash/omit.js"), startCase = require("lodash.startcase"), behavior_core = require("./behavior.core.cjs"), rxjs = require("rxjs"), useEffectEvent = require("use-effect-event");
|
|
3
3
|
function _interopDefaultCompat(e) {
|
|
4
4
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
5
5
|
}
|
|
@@ -319,7 +319,7 @@ function compileType(rawType) {
|
|
|
319
319
|
types: [rawType]
|
|
320
320
|
}).get(rawType.name);
|
|
321
321
|
}
|
|
322
|
-
const
|
|
322
|
+
const mutationMachine = xstate.setup({
|
|
323
323
|
types: {
|
|
324
324
|
context: {},
|
|
325
325
|
events: {},
|
|
@@ -330,63 +330,152 @@ const FLUSH_PATCHES_THROTTLED_MS = process.env.NODE_ENV === "test" ? 500 : 1e3,
|
|
|
330
330
|
"emit has pending patches": xstate.emit({
|
|
331
331
|
type: "has pending patches"
|
|
332
332
|
}),
|
|
333
|
-
"emit
|
|
334
|
-
context
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
333
|
+
"emit mutations": xstate.enqueueActions(({
|
|
334
|
+
context,
|
|
335
|
+
enqueue
|
|
336
|
+
}) => {
|
|
337
|
+
for (const bulk of context.pendingMutations)
|
|
338
|
+
enqueue.emit({
|
|
339
|
+
type: "mutation",
|
|
340
|
+
patches: bulk.patches,
|
|
341
|
+
snapshot: bulk.value
|
|
342
|
+
});
|
|
343
|
+
}),
|
|
344
|
+
"clear pending mutations": xstate.assign({
|
|
345
|
+
pendingMutations: []
|
|
342
346
|
}),
|
|
343
347
|
"defer patch": xstate.assign({
|
|
344
|
-
|
|
348
|
+
pendingMutations: ({
|
|
345
349
|
context,
|
|
346
350
|
event
|
|
347
|
-
}) =>
|
|
351
|
+
}) => {
|
|
352
|
+
if (xstate.assertEvent(event, "patch"), context.pendingMutations.length === 0)
|
|
353
|
+
return [{
|
|
354
|
+
actionId: event.actionId,
|
|
355
|
+
value: event.value,
|
|
356
|
+
patches: [event.patch]
|
|
357
|
+
}];
|
|
358
|
+
const lastBulk = context.pendingMutations.at(-1);
|
|
359
|
+
return lastBulk && lastBulk.actionId === event.actionId ? context.pendingMutations.slice(0, -1).concat({
|
|
360
|
+
value: event.value,
|
|
361
|
+
actionId: lastBulk.actionId,
|
|
362
|
+
patches: [...lastBulk.patches, event.patch]
|
|
363
|
+
}) : context.pendingMutations.concat({
|
|
364
|
+
value: event.value,
|
|
365
|
+
actionId: event.actionId,
|
|
366
|
+
patches: [event.patch]
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
})
|
|
370
|
+
},
|
|
371
|
+
actors: {
|
|
372
|
+
"type listener": xstate.fromCallback(({
|
|
373
|
+
input,
|
|
374
|
+
sendBack
|
|
375
|
+
}) => {
|
|
376
|
+
const originalApply = input.slateEditor.apply;
|
|
377
|
+
return input.slateEditor.apply = (op) => {
|
|
378
|
+
op.type === "insert_text" || op.type === "remove_text" ? sendBack({
|
|
379
|
+
type: "typing"
|
|
380
|
+
}) : sendBack({
|
|
381
|
+
type: "not typing"
|
|
382
|
+
}), originalApply(op);
|
|
383
|
+
}, () => {
|
|
384
|
+
input.slateEditor.apply = originalApply;
|
|
385
|
+
};
|
|
348
386
|
})
|
|
349
387
|
},
|
|
350
388
|
guards: {
|
|
389
|
+
"is typing": xstate.stateIn({
|
|
390
|
+
typing: "typing"
|
|
391
|
+
}),
|
|
392
|
+
"no pending mutations": ({
|
|
393
|
+
context
|
|
394
|
+
}) => context.pendingMutations.length === 0,
|
|
351
395
|
"slate is normalizing": ({
|
|
352
396
|
context
|
|
353
397
|
}) => slate.Editor.isNormalizing(context.slateEditor)
|
|
398
|
+
},
|
|
399
|
+
delays: {
|
|
400
|
+
"mutation debounce": process.env.NODE_ENV === "test" ? 250 : 0,
|
|
401
|
+
"type debounce": process.env.NODE_ENV === "test" ? 0 : 250
|
|
354
402
|
}
|
|
355
403
|
}).createMachine({
|
|
356
404
|
id: "mutation",
|
|
357
405
|
context: ({
|
|
358
406
|
input
|
|
359
407
|
}) => ({
|
|
360
|
-
|
|
408
|
+
pendingMutations: [],
|
|
361
409
|
schema: input.schema,
|
|
362
410
|
slateEditor: input.slateEditor
|
|
363
411
|
}),
|
|
364
|
-
|
|
412
|
+
type: "parallel",
|
|
365
413
|
states: {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
414
|
+
typing: {
|
|
415
|
+
initial: "idle",
|
|
416
|
+
invoke: {
|
|
417
|
+
src: "type listener",
|
|
418
|
+
input: ({
|
|
419
|
+
context
|
|
420
|
+
}) => ({
|
|
421
|
+
slateEditor: context.slateEditor
|
|
422
|
+
})
|
|
423
|
+
},
|
|
424
|
+
states: {
|
|
425
|
+
idle: {
|
|
426
|
+
on: {
|
|
427
|
+
typing: {
|
|
428
|
+
target: "typing"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
typing: {
|
|
433
|
+
after: {
|
|
434
|
+
"type debounce": {
|
|
435
|
+
target: "idle"
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
on: {
|
|
439
|
+
"not typing": {
|
|
440
|
+
target: "idle"
|
|
441
|
+
},
|
|
442
|
+
typing: {
|
|
443
|
+
target: "typing",
|
|
444
|
+
reenter: !0
|
|
445
|
+
}
|
|
446
|
+
}
|
|
371
447
|
}
|
|
372
448
|
}
|
|
373
449
|
},
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
450
|
+
mutations: {
|
|
451
|
+
initial: "idle",
|
|
452
|
+
states: {
|
|
453
|
+
idle: {
|
|
454
|
+
on: {
|
|
455
|
+
patch: {
|
|
456
|
+
actions: ["defer patch", "emit has pending patches"],
|
|
457
|
+
target: "emitting mutations"
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"emitting mutations": {
|
|
462
|
+
after: {
|
|
463
|
+
"mutation debounce": [{
|
|
464
|
+
guard: xstate.and([xstate.not("is typing"), "slate is normalizing"]),
|
|
465
|
+
target: "idle",
|
|
466
|
+
actions: ["emit mutations", "clear pending mutations"]
|
|
467
|
+
}, {
|
|
468
|
+
target: "emitting mutations",
|
|
469
|
+
reenter: !0
|
|
470
|
+
}]
|
|
471
|
+
},
|
|
472
|
+
on: {
|
|
473
|
+
patch: {
|
|
474
|
+
target: "emitting mutations",
|
|
475
|
+
actions: ["defer patch"],
|
|
476
|
+
reenter: !0
|
|
477
|
+
}
|
|
478
|
+
}
|
|
390
479
|
}
|
|
391
480
|
}
|
|
392
481
|
}
|
|
@@ -1412,13 +1501,15 @@ function randomKey(length) {
|
|
|
1412
1501
|
const table = getByteHexTable();
|
|
1413
1502
|
return whatwgRNG(length).reduce((str, n) => str + table[n], "").slice(0, length);
|
|
1414
1503
|
}
|
|
1415
|
-
const
|
|
1504
|
+
const CURRENT_ACTION_ID = /* @__PURE__ */ new WeakMap();
|
|
1416
1505
|
function withApplyingBehaviorActions(editor, fn) {
|
|
1417
|
-
|
|
1418
|
-
|
|
1506
|
+
CURRENT_ACTION_ID.set(editor, defaultKeyGenerator()), slate.Editor.withoutNormalizing(editor, fn), CURRENT_ACTION_ID.set(editor, void 0);
|
|
1507
|
+
}
|
|
1508
|
+
function getCurrentActionId(editor) {
|
|
1509
|
+
return CURRENT_ACTION_ID.get(editor);
|
|
1419
1510
|
}
|
|
1420
1511
|
function isApplyingBehaviorActions(editor) {
|
|
1421
|
-
return
|
|
1512
|
+
return getCurrentActionId(editor) !== void 0;
|
|
1422
1513
|
}
|
|
1423
1514
|
const CURRENT_BEHAVIOR_ACTION_INTEND_SET = /* @__PURE__ */ new WeakMap();
|
|
1424
1515
|
function withApplyingBehaviorActionIntendSet(editor, fn) {
|
|
@@ -2141,7 +2232,7 @@ function _updateBlock(slateEditor, currentBlock, oldBlock, currentBlockIndex) {
|
|
|
2141
2232
|
}
|
|
2142
2233
|
const debug$b = debugWithName("component:PortableTextEditor:Synchronizer");
|
|
2143
2234
|
function Synchronizer(props) {
|
|
2144
|
-
const $ = reactCompilerRuntime.c(
|
|
2235
|
+
const $ = reactCompilerRuntime.c(41), {
|
|
2145
2236
|
editorActor,
|
|
2146
2237
|
slateEditor
|
|
2147
2238
|
} = props, value = react.useSelector(props.editorActor, _temp), readOnly = react.useSelector(props.editorActor, _temp2);
|
|
@@ -2193,7 +2284,7 @@ function Synchronizer(props) {
|
|
|
2193
2284
|
};
|
|
2194
2285
|
}, t8 = [mutationActorRef, syncActorRef, editorActor], $[16] = editorActor, $[17] = mutationActorRef, $[18] = syncActorRef, $[19] = t7, $[20] = t8) : (t7 = $[19], t8 = $[20]), React.useEffect(t7, t8);
|
|
2195
2286
|
let t10, t9;
|
|
2196
|
-
$[21] !== props.editorActor || $[22] !== syncActorRef ? (t9 = () => {
|
|
2287
|
+
$[21] !== props.editorActor || $[22] !== slateEditor || $[23] !== syncActorRef ? (t9 = () => {
|
|
2197
2288
|
const subscription_0 = syncActorRef.on("*", (event_0) => {
|
|
2198
2289
|
bb15: switch (event_0.type) {
|
|
2199
2290
|
case "invalid value": {
|
|
@@ -2210,6 +2301,14 @@ function Synchronizer(props) {
|
|
|
2210
2301
|
});
|
|
2211
2302
|
break bb15;
|
|
2212
2303
|
}
|
|
2304
|
+
case "patch": {
|
|
2305
|
+
props.editorActor.send({
|
|
2306
|
+
...event_0,
|
|
2307
|
+
type: "internal.patch",
|
|
2308
|
+
value: fromSlateValue(slateEditor.children, props.editorActor.getSnapshot().context.schema.block.name, KEY_TO_VALUE_ELEMENT.get(slateEditor))
|
|
2309
|
+
});
|
|
2310
|
+
break bb15;
|
|
2311
|
+
}
|
|
2213
2312
|
default:
|
|
2214
2313
|
props.editorActor.send(event_0);
|
|
2215
2314
|
}
|
|
@@ -2217,33 +2316,36 @@ function Synchronizer(props) {
|
|
|
2217
2316
|
return () => {
|
|
2218
2317
|
subscription_0.unsubscribe();
|
|
2219
2318
|
};
|
|
2220
|
-
}, t10 = [props.editorActor, syncActorRef], $[21] = props.editorActor, $[22] =
|
|
2319
|
+
}, t10 = [props.editorActor, slateEditor, syncActorRef], $[21] = props.editorActor, $[22] = slateEditor, $[23] = syncActorRef, $[24] = t10, $[25] = t9) : (t10 = $[24], t9 = $[25]), React.useEffect(t9, t10);
|
|
2221
2320
|
let t11, t12;
|
|
2222
|
-
$[
|
|
2321
|
+
$[26] !== readOnly || $[27] !== syncActorRef ? (t11 = () => {
|
|
2223
2322
|
syncActorRef.send({
|
|
2224
2323
|
type: "update readOnly",
|
|
2225
2324
|
readOnly
|
|
2226
2325
|
});
|
|
2227
|
-
}, t12 = [syncActorRef, readOnly], $[
|
|
2326
|
+
}, t12 = [syncActorRef, readOnly], $[26] = readOnly, $[27] = syncActorRef, $[28] = t11, $[29] = t12) : (t11 = $[28], t12 = $[29]), React.useEffect(t11, t12);
|
|
2228
2327
|
let t13, t14;
|
|
2229
|
-
$[
|
|
2328
|
+
$[30] !== syncActorRef || $[31] !== value ? (t13 = () => {
|
|
2230
2329
|
debug$b("Value from props changed, syncing new value"), syncActorRef.send({
|
|
2231
2330
|
type: "update value",
|
|
2232
2331
|
value
|
|
2233
2332
|
});
|
|
2234
|
-
}, t14 = [syncActorRef, value], $[
|
|
2333
|
+
}, t14 = [syncActorRef, value], $[30] = syncActorRef, $[31] = value, $[32] = t13, $[33] = t14) : (t13 = $[32], t14 = $[33]), React.useEffect(t13, t14);
|
|
2235
2334
|
let t15;
|
|
2236
|
-
$[
|
|
2335
|
+
$[34] !== editorActor || $[35] !== mutationActorRef ? (t15 = () => {
|
|
2237
2336
|
debug$b("Subscribing to patch events");
|
|
2238
|
-
const sub = editorActor.on("patch", (event_1) => {
|
|
2239
|
-
mutationActorRef.send(
|
|
2337
|
+
const sub = editorActor.on("internal.patch", (event_1) => {
|
|
2338
|
+
mutationActorRef.send({
|
|
2339
|
+
...event_1,
|
|
2340
|
+
type: "patch"
|
|
2341
|
+
});
|
|
2240
2342
|
});
|
|
2241
2343
|
return () => {
|
|
2242
2344
|
debug$b("Unsubscribing to patch events"), sub.unsubscribe();
|
|
2243
2345
|
};
|
|
2244
|
-
}, $[
|
|
2346
|
+
}, $[34] = editorActor, $[35] = mutationActorRef, $[36] = t15) : t15 = $[36];
|
|
2245
2347
|
let t16;
|
|
2246
|
-
return $[
|
|
2348
|
+
return $[37] !== editorActor || $[38] !== mutationActorRef || $[39] !== slateEditor ? (t16 = [editorActor, mutationActorRef, slateEditor], $[37] = editorActor, $[38] = mutationActorRef, $[39] = slateEditor, $[40] = t16) : t16 = $[40], React.useEffect(t15, t16), null;
|
|
2247
2349
|
}
|
|
2248
2350
|
function _temp2(s_0) {
|
|
2249
2351
|
return s_0.matches({
|
|
@@ -4844,6 +4946,7 @@ function createWithEventListeners(editorActor, subscriptions) {
|
|
|
4844
4946
|
case "loading":
|
|
4845
4947
|
case "mutation":
|
|
4846
4948
|
case "patch":
|
|
4949
|
+
case "internal.patch":
|
|
4847
4950
|
case "patches":
|
|
4848
4951
|
case "read only":
|
|
4849
4952
|
case "ready":
|
|
@@ -5486,18 +5589,21 @@ function createWithPatches({
|
|
|
5486
5589
|
patches$1 = [...patches$1, ...patchFunctions.moveNodePatch(editor, operation, previousChildren)];
|
|
5487
5590
|
break;
|
|
5488
5591
|
}
|
|
5489
|
-
|
|
5592
|
+
if (!editorWasEmpty && editorIsEmpty && ["merge_node", "set_node", "remove_text", "remove_node"].includes(operation.type) && (patches$1 = [...patches$1, patches.unset([])], editorActor.send({
|
|
5490
5593
|
type: "notify.unset",
|
|
5491
5594
|
previousValue: fromSlateValue(previousChildren, schemaTypes.block.name, KEY_TO_VALUE_ELEMENT.get(editor))
|
|
5492
|
-
})), editorWasEmpty && patches$1.length > 0 && (patches$1 = [patches.setIfMissing([], []), ...patches$1]), patches$1.length > 0
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5595
|
+
})), editorWasEmpty && patches$1.length > 0 && (patches$1 = [patches.setIfMissing([], []), ...patches$1]), patches$1.length > 0)
|
|
5596
|
+
for (const patch of patches$1)
|
|
5597
|
+
editorActor.send({
|
|
5598
|
+
type: "internal.patch",
|
|
5599
|
+
patch: {
|
|
5600
|
+
...patch,
|
|
5601
|
+
origin: "local"
|
|
5602
|
+
},
|
|
5603
|
+
actionId: getCurrentActionId(editor),
|
|
5604
|
+
value: fromSlateValue(editor.children, schemaTypes.block.name, KEY_TO_VALUE_ELEMENT.get(editor))
|
|
5605
|
+
});
|
|
5606
|
+
return editor;
|
|
5501
5607
|
}, editor;
|
|
5502
5608
|
};
|
|
5503
5609
|
}
|
|
@@ -5954,9 +6060,15 @@ const editorMachine = xstate.setup({
|
|
|
5954
6060
|
event
|
|
5955
6061
|
}) => (xstate.assertEvent(event, "update schema"), event.schema)
|
|
5956
6062
|
}),
|
|
5957
|
-
"emit patch event": xstate.
|
|
5958
|
-
event
|
|
5959
|
-
|
|
6063
|
+
"emit patch event": xstate.enqueueActions(({
|
|
6064
|
+
event,
|
|
6065
|
+
enqueue
|
|
6066
|
+
}) => {
|
|
6067
|
+
xstate.assertEvent(event, "internal.patch"), enqueue.emit(event), enqueue.emit({
|
|
6068
|
+
type: "patch",
|
|
6069
|
+
patch: event.patch
|
|
6070
|
+
});
|
|
6071
|
+
}),
|
|
5960
6072
|
"emit mutation event": xstate.emit(({
|
|
5961
6073
|
event
|
|
5962
6074
|
}) => (xstate.assertEvent(event, "mutation"), event)),
|
|
@@ -5970,14 +6082,17 @@ const editorMachine = xstate.setup({
|
|
|
5970
6082
|
pendingEvents: ({
|
|
5971
6083
|
context,
|
|
5972
6084
|
event
|
|
5973
|
-
}) => (xstate.assertEvent(event, ["patch", "mutation"]), [...context.pendingEvents, event])
|
|
6085
|
+
}) => (xstate.assertEvent(event, ["internal.patch", "mutation"]), [...context.pendingEvents, event])
|
|
5974
6086
|
}),
|
|
5975
6087
|
"emit pending events": xstate.enqueueActions(({
|
|
5976
6088
|
context,
|
|
5977
6089
|
enqueue
|
|
5978
6090
|
}) => {
|
|
5979
6091
|
for (const event of context.pendingEvents)
|
|
5980
|
-
enqueue
|
|
6092
|
+
event.type === "internal.patch" ? (enqueue.emit(event), enqueue.emit({
|
|
6093
|
+
type: "patch",
|
|
6094
|
+
patch: event.patch
|
|
6095
|
+
})) : enqueue.emit(event);
|
|
5981
6096
|
}),
|
|
5982
6097
|
"emit ready": xstate.emit({
|
|
5983
6098
|
type: "ready"
|
|
@@ -6393,7 +6508,7 @@ const editorMachine = xstate.setup({
|
|
|
6393
6508
|
"setting up": {
|
|
6394
6509
|
exit: ["emit ready"],
|
|
6395
6510
|
on: {
|
|
6396
|
-
patch: {
|
|
6511
|
+
"internal.patch": {
|
|
6397
6512
|
actions: "defer event"
|
|
6398
6513
|
},
|
|
6399
6514
|
mutation: {
|
|
@@ -6412,7 +6527,7 @@ const editorMachine = xstate.setup({
|
|
|
6412
6527
|
normalizing: {
|
|
6413
6528
|
target: "normalizing"
|
|
6414
6529
|
},
|
|
6415
|
-
patch: {
|
|
6530
|
+
"internal.patch": {
|
|
6416
6531
|
actions: "defer event",
|
|
6417
6532
|
target: "#editor.setup.dirty"
|
|
6418
6533
|
},
|
|
@@ -6427,7 +6542,7 @@ const editorMachine = xstate.setup({
|
|
|
6427
6542
|
"done normalizing": {
|
|
6428
6543
|
target: "idle"
|
|
6429
6544
|
},
|
|
6430
|
-
patch: {
|
|
6545
|
+
"internal.patch": {
|
|
6431
6546
|
actions: "defer event"
|
|
6432
6547
|
},
|
|
6433
6548
|
mutation: {
|
|
@@ -6440,7 +6555,7 @@ const editorMachine = xstate.setup({
|
|
|
6440
6555
|
dirty: {
|
|
6441
6556
|
entry: ["emit pending events", "clear pending events"],
|
|
6442
6557
|
on: {
|
|
6443
|
-
patch: {
|
|
6558
|
+
"internal.patch": {
|
|
6444
6559
|
actions: "emit patch event"
|
|
6445
6560
|
},
|
|
6446
6561
|
mutation: {
|