@portabletext/editor 1.36.2 → 1.36.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.
@@ -19,23 +19,20 @@ export function isApplyingBehaviorActions(editor: Editor) {
19
19
 
20
20
  ////////
21
21
 
22
- const CURRENT_BEHAVIOR_ACTION_INTEND_SET: WeakMap<
22
+ const CURRENT_BEHAVIOR_ACTION_SET: WeakMap<
23
23
  Editor,
24
24
  {actionSetId: string} | undefined
25
25
  > = new WeakMap()
26
26
 
27
- export function withApplyingBehaviorActionIntendSet(
28
- editor: Editor,
29
- fn: () => void,
30
- ) {
31
- const current = CURRENT_BEHAVIOR_ACTION_INTEND_SET.get(editor)
32
- CURRENT_BEHAVIOR_ACTION_INTEND_SET.set(editor, {
27
+ export function withApplyingBehaviorActionSet(editor: Editor, fn: () => void) {
28
+ const current = CURRENT_BEHAVIOR_ACTION_SET.get(editor)
29
+ CURRENT_BEHAVIOR_ACTION_SET.set(editor, {
33
30
  actionSetId: defaultKeyGenerator(),
34
31
  })
35
32
  withApplyingBehaviorActions(editor, fn)
36
- CURRENT_BEHAVIOR_ACTION_INTEND_SET.set(editor, current)
33
+ CURRENT_BEHAVIOR_ACTION_SET.set(editor, current)
37
34
  }
38
35
 
39
36
  export function getCurrentBehaviorActionSetId(editor: Editor) {
40
- return CURRENT_BEHAVIOR_ACTION_INTEND_SET.get(editor)?.actionSetId
37
+ return CURRENT_BEHAVIOR_ACTION_SET.get(editor)?.actionSetId
41
38
  }