@atlaskit/editor-plugin-indentation 1.8.10 → 1.8.11
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/CHANGELOG.md +6 -0
- package/dist/cjs/editor-commands/getAttrsWithChangesRecorder.js +2 -0
- package/dist/cjs/pm-plugins/keymap.js +12 -3
- package/dist/es2019/editor-commands/getAttrsWithChangesRecorder.js +2 -0
- package/dist/es2019/editor-commands/utils.js +1 -1
- package/dist/es2019/pm-plugins/keymap.js +12 -3
- package/dist/esm/editor-commands/getAttrsWithChangesRecorder.js +2 -0
- package/dist/esm/pm-plugins/keymap.js +12 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -20,6 +20,8 @@ function getAttrsWithChangesRecorder(getAttrs, options) {
|
|
|
20
20
|
function getAttrsWithChangesRecorder(prevAttrs, node) {
|
|
21
21
|
var newAttrs = getAttrs(prevAttrs, node);
|
|
22
22
|
changes.push({
|
|
23
|
+
// Ignored via go/ees005
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
25
|
node: node,
|
|
24
26
|
prevAttrs: prevAttrs,
|
|
25
27
|
newAttrs: newAttrs,
|
|
@@ -12,9 +12,18 @@ var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
|
12
12
|
var _editorCommands = require("../editor-commands");
|
|
13
13
|
function keymapPlugin(editorAnalyticsAPI) {
|
|
14
14
|
var list = {};
|
|
15
|
-
(0, _keymaps.bindKeymapWithCommand)(
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
(0, _keymaps.bindKeymapWithCommand)(
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
18
|
+
(0, _keymaps.findShortcutByKeymap)(_keymaps.indent), (0, _editorCommands.getIndentCommand)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.KEYBOARD), list);
|
|
19
|
+
(0, _keymaps.bindKeymapWithCommand)(
|
|
20
|
+
// Ignored via go/ees005
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
22
|
+
(0, _keymaps.findShortcutByKeymap)(_keymaps.outdent), (0, _editorCommands.getOutdentCommand)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.KEYBOARD), list);
|
|
23
|
+
(0, _keymaps.bindKeymapWithCommand)(
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
26
|
+
(0, _keymaps.findShortcutByKeymap)(_keymaps.backspace), function (state, dispatch) {
|
|
18
27
|
var selection = state.selection;
|
|
19
28
|
if ((0, _utils.isTextSelection)(selection) && selection.$cursor && selection.$cursor.parentOffset === 0) {
|
|
20
29
|
return dispatch ? (0, _editorCommands.getOutdentCommand)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.KEYBOARD)(state, dispatch) : false;
|
|
@@ -14,6 +14,8 @@ export default function getAttrsWithChangesRecorder(getAttrs, options) {
|
|
|
14
14
|
function getAttrsWithChangesRecorder(prevAttrs, node) {
|
|
15
15
|
const newAttrs = getAttrs(prevAttrs, node);
|
|
16
16
|
changes.push({
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
17
19
|
node: node,
|
|
18
20
|
prevAttrs,
|
|
19
21
|
newAttrs,
|
|
@@ -5,9 +5,18 @@ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
|
5
5
|
import { getIndentCommand, getOutdentCommand } from '../editor-commands';
|
|
6
6
|
export function keymapPlugin(editorAnalyticsAPI) {
|
|
7
7
|
const list = {};
|
|
8
|
-
bindKeymapWithCommand(
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
bindKeymapWithCommand(
|
|
9
|
+
// Ignored via go/ees005
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
11
|
+
findShortcutByKeymap(indent), getIndentCommand(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD), list);
|
|
12
|
+
bindKeymapWithCommand(
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
15
|
+
findShortcutByKeymap(outdent), getOutdentCommand(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD), list);
|
|
16
|
+
bindKeymapWithCommand(
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
19
|
+
findShortcutByKeymap(backspace), (state, dispatch) => {
|
|
11
20
|
const {
|
|
12
21
|
selection
|
|
13
22
|
} = state;
|
|
@@ -14,6 +14,8 @@ export default function getAttrsWithChangesRecorder(getAttrs, options) {
|
|
|
14
14
|
function getAttrsWithChangesRecorder(prevAttrs, node) {
|
|
15
15
|
var newAttrs = getAttrs(prevAttrs, node);
|
|
16
16
|
changes.push({
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
17
19
|
node: node,
|
|
18
20
|
prevAttrs: prevAttrs,
|
|
19
21
|
newAttrs: newAttrs,
|
|
@@ -5,9 +5,18 @@ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
|
5
5
|
import { getIndentCommand, getOutdentCommand } from '../editor-commands';
|
|
6
6
|
export function keymapPlugin(editorAnalyticsAPI) {
|
|
7
7
|
var list = {};
|
|
8
|
-
bindKeymapWithCommand(
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
bindKeymapWithCommand(
|
|
9
|
+
// Ignored via go/ees005
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
11
|
+
findShortcutByKeymap(indent), getIndentCommand(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD), list);
|
|
12
|
+
bindKeymapWithCommand(
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
15
|
+
findShortcutByKeymap(outdent), getOutdentCommand(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD), list);
|
|
16
|
+
bindKeymapWithCommand(
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
19
|
+
findShortcutByKeymap(backspace), function (state, dispatch) {
|
|
11
20
|
var selection = state.selection;
|
|
12
21
|
if (isTextSelection(selection) && selection.$cursor && selection.$cursor.parentOffset === 0) {
|
|
13
22
|
return dispatch ? getOutdentCommand(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD)(state, dispatch) : false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-indentation",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.11",
|
|
4
4
|
"description": "Indentation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
|
-
"@atlaskit/editor-common": "^
|
|
35
|
+
"@atlaskit/editor-common": "^98.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
38
38
|
"@babel/runtime": "^7.0.0"
|