@portabletext/editor 2.1.2 → 2.1.3
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 +5 -4
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +5 -4
- package/lib/index.js.map +1 -1
- package/lib/plugins/index.d.ts +3 -3
- package/lib/utils/index.d.cts +2 -2
- package/package.json +7 -7
- package/src/behaviors/behavior.abstract.list-item.ts +10 -2
package/lib/index.cjs
CHANGED
|
@@ -6757,10 +6757,11 @@ const MAX_LIST_LEVEL = 10, clearListOnBackspace = behaviors_index.defineBehavior
|
|
|
6757
6757
|
], abstractListItemBehaviors = [behaviors_index.defineBehavior({
|
|
6758
6758
|
on: "list item.add",
|
|
6759
6759
|
guard: ({
|
|
6760
|
-
snapshot
|
|
6761
|
-
|
|
6760
|
+
snapshot,
|
|
6761
|
+
event
|
|
6762
|
+
}) => snapshot.context.schema.lists.some((list) => list.name === event.listItem) ? {
|
|
6762
6763
|
selectedTextBlocks: selector_isSelectingEntireBlocks.getSelectedTextBlocks(snapshot)
|
|
6763
|
-
}
|
|
6764
|
+
} : !1,
|
|
6764
6765
|
actions: [({
|
|
6765
6766
|
event
|
|
6766
6767
|
}, {
|
|
@@ -6769,7 +6770,7 @@ const MAX_LIST_LEVEL = 10, clearListOnBackspace = behaviors_index.defineBehavior
|
|
|
6769
6770
|
type: "block.set",
|
|
6770
6771
|
at: block.path,
|
|
6771
6772
|
props: {
|
|
6772
|
-
level: 1,
|
|
6773
|
+
level: block.node.level ?? 1,
|
|
6773
6774
|
listItem: event.listItem
|
|
6774
6775
|
}
|
|
6775
6776
|
}))]
|