@blocknote/core 0.19.0 → 0.19.1
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/README.md +2 -0
- package/dist/blocknote.js +2549 -2497
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +6 -6
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/src/api/blockManipulation/commands/moveBlock/moveBlock.test.js +5 -1
- package/dist/src/api/blockManipulation/commands/moveBlock/moveBlock.test.js.map +1 -1
- package/dist/src/api/blockManipulation/commands/removeBlocks/removeBlocks.js +2 -40
- package/dist/src/api/blockManipulation/commands/removeBlocks/removeBlocks.js.map +1 -1
- package/dist/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.js +4 -0
- package/dist/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.js.map +1 -1
- package/dist/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.js +51 -9
- package/dist/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.js.map +1 -1
- package/dist/src/api/blockManipulation/commands/splitBlock/splitBlock.js +2 -2
- package/dist/src/api/blockManipulation/commands/splitBlock/splitBlock.js.map +1 -1
- package/dist/src/api/clipboard/fromClipboard/acceptedMIMETypes.js +1 -1
- package/dist/src/api/clipboard/fromClipboard/acceptedMIMETypes.js.map +1 -1
- package/dist/src/api/clipboard/fromClipboard/handleFileInsertion.js +4 -2
- package/dist/src/api/clipboard/fromClipboard/handleFileInsertion.js.map +1 -1
- package/dist/src/api/getBlockInfoFromPos.js +19 -25
- package/dist/src/api/getBlockInfoFromPos.js.map +1 -1
- package/dist/src/blocks/HeadingBlockContent/HeadingBlockContent.js +8 -4
- package/dist/src/blocks/HeadingBlockContent/HeadingBlockContent.js.map +1 -1
- package/dist/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.js +5 -3
- package/dist/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.js.map +1 -1
- package/dist/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.js +12 -6
- package/dist/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.js.map +1 -1
- package/dist/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.js +5 -1
- package/dist/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.js.map +1 -1
- package/dist/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.js +4 -2
- package/dist/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.js.map +1 -1
- package/dist/src/blocks/ParagraphBlockContent/ParagraphBlockContent.js +2 -1
- package/dist/src/blocks/ParagraphBlockContent/ParagraphBlockContent.js.map +1 -1
- package/dist/src/blocks/TableBlockContent/TableBlockContent.js +0 -1
- package/dist/src/blocks/TableBlockContent/TableBlockContent.js.map +1 -1
- package/dist/src/editor/BlockNoteEditor.js +39 -43
- package/dist/src/editor/BlockNoteEditor.js.map +1 -1
- package/dist/src/editor/BlockNoteEditor.test.js +2 -2
- package/dist/src/editor/BlockNoteEditor.test.js.map +1 -1
- package/dist/src/editor/BlockNoteExtensions.js +52 -6
- package/dist/src/editor/BlockNoteExtensions.js.map +1 -1
- package/dist/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.js +36 -6
- package/dist/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.js.map +1 -1
- package/dist/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.js +35 -32
- package/dist/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.js.map +1 -1
- package/dist/src/extensions/Placeholder/PlaceholderPlugin.js +74 -71
- package/dist/src/extensions/Placeholder/PlaceholderPlugin.js.map +1 -1
- package/dist/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.js +153 -149
- package/dist/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +2 -2
- package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +0 -6
- package/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap +0 -5
- package/src/api/blockManipulation/commands/moveBlock/__snapshots__/moveBlock.test.ts.snap +0 -8
- package/src/api/blockManipulation/commands/moveBlock/moveBlock.test.ts +7 -3
- package/src/api/blockManipulation/commands/removeBlocks/__snapshots__/removeBlocks.test.ts.snap +439 -2
- package/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.ts +6 -0
- package/src/api/blockManipulation/commands/removeBlocks/removeBlocks.ts +2 -82
- package/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap +0 -8
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +96 -20
- package/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap +0 -6
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.ts +2 -5
- package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +0 -490
- package/src/api/clipboard/fromClipboard/acceptedMIMETypes.ts +1 -1
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +6 -5
- package/src/api/getBlockInfoFromPos.ts +20 -30
- package/src/api/parsers/html/__snapshots__/parse-notion-html.json +1 -2
- package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +16 -4
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +9 -3
- package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +22 -6
- package/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts +5 -3
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +8 -2
- package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +4 -1
- package/src/blocks/TableBlockContent/TableBlockContent.ts +0 -1
- package/src/editor/BlockNoteEditor.test.ts +2 -5
- package/src/editor/BlockNoteEditor.ts +71 -42
- package/src/editor/BlockNoteExtensions.ts +90 -14
- package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +36 -9
- package/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts +45 -42
- package/src/extensions/Placeholder/PlaceholderPlugin.ts +94 -90
- package/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +173 -169
- package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.d.ts +0 -3
- package/types/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.d.ts +4 -0
- package/types/src/api/blockManipulation/setupTestEnv.d.ts +0 -6
- package/types/src/api/clipboard/fromClipboard/acceptedMIMETypes.d.ts +1 -1
- package/types/src/api/getBlockInfoFromPos.d.ts +9 -34
- package/types/src/api/testUtil/cases/customBlocks.d.ts +0 -6
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +0 -6
- package/types/src/api/testUtil/cases/customStyles.d.ts +0 -6
- package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +0 -9
- package/types/src/blocks/defaultBlocks.d.ts +0 -12
- package/types/src/editor/BlockNoteEditor.d.ts +19 -2
- package/types/src/editor/BlockNoteExtensions.d.ts +14 -7
- package/types/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.d.ts +4 -1
- package/types/src/extensions/Placeholder/PlaceholderPlugin.d.ts +4 -1
- package/types/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.d.ts +4 -5
|
@@ -20,164 +20,168 @@ const nodeAttributes = {
|
|
|
20
20
|
*
|
|
21
21
|
* Solution: When attributes change on a node, this plugin sets a data-* attribute with the "previous" value. This way we can still use CSS transitions. (See block.module.css)
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (this.key?.getState(view.state).updatedBlocks.size > 0) {
|
|
31
|
-
// use setTimeout 0 to clear the decorations so that at least
|
|
32
|
-
// for one DOM-render the decorations have been applied
|
|
33
|
-
timeout = setTimeout(() => {
|
|
34
|
-
view.dispatch(view.state.tr.setMeta(PLUGIN_KEY, { clearUpdate: true }));
|
|
35
|
-
}, 0);
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
destroy: () => {
|
|
39
|
-
if (timeout) {
|
|
40
|
-
clearTimeout(timeout);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
state: {
|
|
46
|
-
init() {
|
|
23
|
+
export class PreviousBlockTypePlugin {
|
|
24
|
+
plugin;
|
|
25
|
+
constructor() {
|
|
26
|
+
let timeout;
|
|
27
|
+
this.plugin = new Plugin({
|
|
28
|
+
key: PLUGIN_KEY,
|
|
29
|
+
view(_editorView) {
|
|
47
30
|
return {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
31
|
+
update: async (view, _prevState) => {
|
|
32
|
+
if (this.key?.getState(view.state).updatedBlocks.size > 0) {
|
|
33
|
+
// use setTimeout 0 to clear the decorations so that at least
|
|
34
|
+
// for one DOM-render the decorations have been applied
|
|
35
|
+
timeout = setTimeout(() => {
|
|
36
|
+
view.dispatch(view.state.tr.setMeta(PLUGIN_KEY, { clearUpdate: true }));
|
|
37
|
+
}, 0);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
destroy: () => {
|
|
41
|
+
if (timeout) {
|
|
42
|
+
clearTimeout(timeout);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
54
45
|
};
|
|
55
46
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
47
|
+
state: {
|
|
48
|
+
init() {
|
|
49
|
+
return {
|
|
50
|
+
// Block attributes, by block ID, from just before the previous transaction.
|
|
51
|
+
prevTransactionOldBlockAttrs: {},
|
|
52
|
+
// Block attributes, by block ID, from just before the current transaction.
|
|
53
|
+
currentTransactionOldBlockAttrs: {},
|
|
54
|
+
// Set of IDs of blocks whose attributes changed from the current transaction.
|
|
55
|
+
updatedBlocks: new Set(),
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
apply(transaction, prev, oldState, newState) {
|
|
59
|
+
prev.currentTransactionOldBlockAttrs = {};
|
|
60
|
+
prev.updatedBlocks.clear();
|
|
61
|
+
if (!transaction.docChanged || oldState.doc.eq(newState.doc)) {
|
|
62
|
+
return prev;
|
|
63
|
+
}
|
|
64
|
+
// TODO: Instead of iterating through the entire document, only check nodes affected by the transactions. Will
|
|
65
|
+
// also probably require checking nodes affected by the previous transaction too.
|
|
66
|
+
// We didn't get this to work yet:
|
|
67
|
+
// const transform = combineTransactionSteps(oldState.doc, [transaction]);
|
|
68
|
+
// // const { mapping } = transform;
|
|
69
|
+
// const changes = getChangedRanges(transform);
|
|
70
|
+
//
|
|
71
|
+
// changes.forEach(({ oldRange, newRange }) => {
|
|
72
|
+
// const oldNodes = findChildrenInRange(
|
|
73
|
+
// oldState.doc,
|
|
74
|
+
// oldRange,
|
|
75
|
+
// (node) => node.attrs.id
|
|
76
|
+
// );
|
|
77
|
+
//
|
|
78
|
+
// const newNodes = findChildrenInRange(
|
|
79
|
+
// newState.doc,
|
|
80
|
+
// newRange,
|
|
81
|
+
// (node) => node.attrs.id
|
|
82
|
+
// );
|
|
83
|
+
const currentTransactionOriginalOldBlockAttrs = {};
|
|
84
|
+
const oldNodes = findChildren(oldState.doc, (node) => node.attrs.id);
|
|
85
|
+
const oldNodesById = new Map(oldNodes.map((node) => [node.node.attrs.id, node]));
|
|
86
|
+
const newNodes = findChildren(newState.doc, (node) => node.attrs.id);
|
|
87
|
+
// Traverses all block containers in the new editor state.
|
|
88
|
+
for (const node of newNodes) {
|
|
89
|
+
const oldNode = oldNodesById.get(node.node.attrs.id);
|
|
90
|
+
const oldContentNode = oldNode?.node.firstChild;
|
|
91
|
+
const newContentNode = node.node.firstChild;
|
|
92
|
+
if (oldNode && oldContentNode && newContentNode) {
|
|
93
|
+
const newAttrs = {
|
|
94
|
+
index: newContentNode.attrs.index,
|
|
95
|
+
level: newContentNode.attrs.level,
|
|
96
|
+
type: newContentNode.type.name,
|
|
97
|
+
depth: newState.doc.resolve(node.pos).depth,
|
|
98
|
+
};
|
|
99
|
+
let oldAttrs = {
|
|
100
|
+
index: oldContentNode.attrs.index,
|
|
101
|
+
level: oldContentNode.attrs.level,
|
|
102
|
+
type: oldContentNode.type.name,
|
|
103
|
+
depth: oldState.doc.resolve(oldNode.pos).depth,
|
|
104
|
+
};
|
|
105
|
+
currentTransactionOriginalOldBlockAttrs[node.node.attrs.id] =
|
|
106
|
+
oldAttrs;
|
|
107
|
+
// Whenever a transaction is appended by the OrderedListItemIndexPlugin, it's given the metadata:
|
|
108
|
+
// { "orderedListIndexing": true }
|
|
109
|
+
// These appended transactions happen immediately after any transaction which causes ordered list item
|
|
110
|
+
// indices to require updating, including those which trigger animations. Therefore, these animations are
|
|
111
|
+
// immediately overridden when the PreviousBlockTypePlugin processes the appended transaction, despite only
|
|
112
|
+
// the listItemIndex attribute changing. To solve this, oldAttrs must be edited for transactions with the
|
|
113
|
+
// "orderedListIndexing" metadata, so the correct animation can be re-triggered.
|
|
114
|
+
if (transaction.getMeta("numberedListIndexing")) {
|
|
115
|
+
// If the block existed before the transaction, gets the attributes from before the previous transaction
|
|
116
|
+
// (i.e. the transaction that caused list item indices to need updating).
|
|
117
|
+
if (node.node.attrs.id in prev.prevTransactionOldBlockAttrs) {
|
|
118
|
+
oldAttrs =
|
|
119
|
+
prev.prevTransactionOldBlockAttrs[node.node.attrs.id];
|
|
120
|
+
}
|
|
121
|
+
// Stops list item indices themselves being animated (looks smoother), unless the block's content type is
|
|
122
|
+
// changing from a numbered list item to something else.
|
|
123
|
+
if (newAttrs.type === "numberedListItem") {
|
|
124
|
+
oldAttrs.index = newAttrs.index;
|
|
125
|
+
}
|
|
118
126
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
127
|
+
prev.currentTransactionOldBlockAttrs[node.node.attrs.id] =
|
|
128
|
+
oldAttrs;
|
|
129
|
+
// TODO: faster deep equal?
|
|
130
|
+
if (JSON.stringify(oldAttrs) !== JSON.stringify(newAttrs)) {
|
|
131
|
+
oldAttrs["depth-change"] =
|
|
132
|
+
oldAttrs.depth - newAttrs.depth;
|
|
133
|
+
// for debugging:
|
|
134
|
+
// console.log(
|
|
135
|
+
// "id:",
|
|
136
|
+
// node.node.attrs.id,
|
|
137
|
+
// "previousBlockTypePlugin changes detected, oldAttrs",
|
|
138
|
+
// oldAttrs,
|
|
139
|
+
// "new",
|
|
140
|
+
// newAttrs
|
|
141
|
+
// );
|
|
142
|
+
prev.updatedBlocks.add(node.node.attrs.id);
|
|
123
143
|
}
|
|
124
144
|
}
|
|
125
|
-
prev.currentTransactionOldBlockAttrs[node.node.attrs.id] = oldAttrs;
|
|
126
|
-
// TODO: faster deep equal?
|
|
127
|
-
if (JSON.stringify(oldAttrs) !== JSON.stringify(newAttrs)) {
|
|
128
|
-
oldAttrs["depth-change"] =
|
|
129
|
-
oldAttrs.depth - newAttrs.depth;
|
|
130
|
-
// for debugging:
|
|
131
|
-
// console.log(
|
|
132
|
-
// "id:",
|
|
133
|
-
// node.node.attrs.id,
|
|
134
|
-
// "previousBlockTypePlugin changes detected, oldAttrs",
|
|
135
|
-
// oldAttrs,
|
|
136
|
-
// "new",
|
|
137
|
-
// newAttrs
|
|
138
|
-
// );
|
|
139
|
-
prev.updatedBlocks.add(node.node.attrs.id);
|
|
140
|
-
}
|
|
141
145
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
+
prev.prevTransactionOldBlockAttrs =
|
|
147
|
+
currentTransactionOriginalOldBlockAttrs;
|
|
148
|
+
return prev;
|
|
149
|
+
},
|
|
146
150
|
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
return undefined;
|
|
153
|
-
}
|
|
154
|
-
const decorations = [];
|
|
155
|
-
state.doc.descendants((node, pos) => {
|
|
156
|
-
if (!node.attrs.id) {
|
|
157
|
-
return;
|
|
151
|
+
props: {
|
|
152
|
+
decorations(state) {
|
|
153
|
+
const pluginState = this.getState(state);
|
|
154
|
+
if (pluginState.updatedBlocks.size === 0) {
|
|
155
|
+
return undefined;
|
|
158
156
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
157
|
+
const decorations = [];
|
|
158
|
+
state.doc.descendants((node, pos) => {
|
|
159
|
+
if (!node.attrs.id) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (!pluginState.updatedBlocks.has(node.attrs.id)) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
const prevAttrs = pluginState.currentTransactionOldBlockAttrs[node.attrs.id];
|
|
166
|
+
const decorationAttrs = {};
|
|
167
|
+
for (const [nodeAttr, val] of Object.entries(prevAttrs)) {
|
|
168
|
+
decorationAttrs["data-prev-" + nodeAttributes[nodeAttr]] =
|
|
169
|
+
val || "none";
|
|
170
|
+
}
|
|
171
|
+
// for debugging:
|
|
172
|
+
// console.log(
|
|
173
|
+
// "previousBlockTypePlugin committing decorations",
|
|
174
|
+
// decorationAttrs
|
|
175
|
+
// );
|
|
176
|
+
const decoration = Decoration.node(pos, pos + node.nodeSize, {
|
|
177
|
+
...decorationAttrs,
|
|
178
|
+
});
|
|
179
|
+
decorations.push(decoration);
|
|
175
180
|
});
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
return DecorationSet.create(state.doc, decorations);
|
|
181
|
+
return DecorationSet.create(state.doc, decorations);
|
|
182
|
+
},
|
|
179
183
|
},
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
183
187
|
//# sourceMappingURL=PreviousBlockTypePlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviousBlockTypePlugin.js","sourceRoot":"","sources":["../../../../src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE7D,MAAM,UAAU,GAAG,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAEpD,MAAM,cAAc,GAA2B;IAC7C,sBAAsB;IACtB,KAAK,EAAE,OAAO;IACd,WAAW;IACX,KAAK,EAAE,OAAO;IACd,aAAa;IACb,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,cAAc;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"PreviousBlockTypePlugin.js","sourceRoot":"","sources":["../../../../src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE7D,MAAM,UAAU,GAAG,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAEpD,MAAM,cAAc,GAA2B;IAC7C,sBAAsB;IACtB,KAAK,EAAE,OAAO;IACd,WAAW;IACX,KAAK,EAAE,OAAO;IACd,aAAa;IACb,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,cAAc;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,OAAO,uBAAuB;IAClB,MAAM,CAAS;IAC/B;QACE,IAAI,OAAsC,CAAC;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC;YACvB,GAAG,EAAE,UAAU;YACf,IAAI,CAAC,WAAW;gBACd,OAAO;oBACL,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;wBACjC,IAAI,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;4BAC1D,6DAA6D;4BAC7D,uDAAuD;4BACvD,OAAO,GAAG,UAAU,CAA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