@atlaskit/editor-plugin-code-block-advanced 6.0.9 → 6.1.0

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-plugin-code-block-advanced
2
2
 
3
+ ## 6.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0ac75e0d28c72`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0ac75e0d28c72) -
8
+ Migrate @atlaskit/editor-prosemirror/history to @atlaskit/prosemirror-history package
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 6.0.10
15
+
16
+ ### Patch Changes
17
+
18
+ - [`26917199e153a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/26917199e153a) -
19
+ ED-29473 Add inputMethod attribute for block menu opened and switch inputMethod and triggeredFrom
20
+ attributes for element converted event
21
+ - Updated dependencies
22
+
3
23
  ## 6.0.9
4
24
 
5
25
  ### Patch Changes
@@ -49,6 +49,9 @@
49
49
  {
50
50
  "path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
51
51
  },
52
+ {
53
+ "path": "../../prosemirror-history/afm-cc/tsconfig.json"
54
+ },
52
55
  {
53
56
  "path": "../../tmp-editor-statsig/afm-cc/tsconfig.json"
54
57
  },
@@ -49,6 +49,9 @@
49
49
  {
50
50
  "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
51
51
  },
52
+ {
53
+ "path": "../../prosemirror-history/afm-jira/tsconfig.json"
54
+ },
52
55
  {
53
56
  "path": "../../tmp-editor-statsig/afm-jira/tsconfig.json"
54
57
  },
@@ -49,6 +49,9 @@
49
49
  {
50
50
  "path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
51
51
  },
52
+ {
53
+ "path": "../../prosemirror-history/afm-post-office/tsconfig.json"
54
+ },
52
55
  {
53
56
  "path": "../../tmp-editor-statsig/afm-post-office/tsconfig.json"
54
57
  },
@@ -49,6 +49,9 @@
49
49
  {
50
50
  "path": "../../../platform/feature-flags/afm-townsquare/tsconfig.json"
51
51
  },
52
+ {
53
+ "path": "../../prosemirror-history/afm-townsquare/tsconfig.json"
54
+ },
52
55
  {
53
56
  "path": "../../tmp-editor-statsig/afm-townsquare/tsconfig.json"
54
57
  },
@@ -10,7 +10,7 @@ var _commands = require("@codemirror/commands");
10
10
  var _view = require("@codemirror/view");
11
11
  var _browser = require("@atlaskit/editor-common/browser");
12
12
  var _commands2 = require("@atlaskit/editor-prosemirror/commands");
13
- var _history = require("@atlaskit/editor-prosemirror/history");
13
+ var _prosemirrorHistory = require("@atlaskit/prosemirror-history");
14
14
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
15
  var _backspace = require("./backspace");
16
16
  var _maybeEscape = require("./maybeEscape");
@@ -139,19 +139,19 @@ var codeBlockKeymap = function codeBlockKeymap(_ref2) {
139
139
  key: 'Ctrl-z',
140
140
  mac: 'Cmd-z',
141
141
  run: function run() {
142
- return (0, _history.undo)(view.state, view.dispatch);
142
+ return (0, _prosemirrorHistory.undo)(view.state, view.dispatch);
143
143
  }
144
144
  }, {
145
145
  key: 'Shift-Ctrl-z',
146
146
  mac: 'Shift-Cmd-z',
147
147
  run: function run() {
148
- return (0, _history.redo)(view.state, view.dispatch);
148
+ return (0, _prosemirrorHistory.redo)(view.state, view.dispatch);
149
149
  }
150
150
  }, {
151
151
  key: 'Ctrl-y',
152
152
  mac: 'Cmd-y',
153
153
  run: function run() {
154
- return (0, _history.redo)(view.state, view.dispatch);
154
+ return (0, _prosemirrorHistory.redo)(view.state, view.dispatch);
155
155
  }
156
156
  }, {
157
157
  key: 'Backspace',
@@ -33,8 +33,8 @@ var CodeBlockMenuItem = function CodeBlockMenuItem(_ref) {
33
33
  }, [selection]);
34
34
  var handleClick = function handleClick(event) {
35
35
  var _api$blockMenu;
36
- var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
37
- var triggeredFrom = _analytics.INPUT_METHOD.BLOCK_MENU;
36
+ var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? _analytics.INPUT_METHOD.KEYBOARD : _analytics.INPUT_METHOD.MOUSE;
37
+ var inputMethod = _analytics.INPUT_METHOD.BLOCK_MENU;
38
38
  api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName, {
39
39
  inputMethod: inputMethod,
40
40
  triggeredFrom: triggeredFrom
@@ -2,7 +2,7 @@ import { defaultKeymap, indentWithTab } from '@codemirror/commands';
2
2
  import { keymap as cmKeymap } from '@codemirror/view';
3
3
  import { browser } from '@atlaskit/editor-common/browser';
4
4
  import { exitCode, selectAll } from '@atlaskit/editor-prosemirror/commands';
5
- import { undo, redo } from '@atlaskit/editor-prosemirror/history';
5
+ import { undo, redo } from '@atlaskit/prosemirror-history';
6
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
7
  import { backspaceKeymap } from './backspace';
8
8
  import { maybeEscapeKeymap } from './maybeEscape';
@@ -26,8 +26,8 @@ const CodeBlockMenuItem = ({
26
26
  }, [selection]);
27
27
  const handleClick = event => {
28
28
  var _api$blockMenu;
29
- const inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
30
- const triggeredFrom = INPUT_METHOD.BLOCK_MENU;
29
+ const triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
30
+ const inputMethod = INPUT_METHOD.BLOCK_MENU;
31
31
  api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName, {
32
32
  inputMethod,
33
33
  triggeredFrom
@@ -3,7 +3,7 @@ import { defaultKeymap, indentWithTab } from '@codemirror/commands';
3
3
  import { keymap as cmKeymap } from '@codemirror/view';
4
4
  import { browser } from '@atlaskit/editor-common/browser';
5
5
  import { exitCode, selectAll } from '@atlaskit/editor-prosemirror/commands';
6
- import { undo, redo } from '@atlaskit/editor-prosemirror/history';
6
+ import { undo, redo } from '@atlaskit/prosemirror-history';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  import { backspaceKeymap } from './backspace';
9
9
  import { maybeEscapeKeymap } from './maybeEscape';
@@ -24,8 +24,8 @@ var CodeBlockMenuItem = function CodeBlockMenuItem(_ref) {
24
24
  }, [selection]);
25
25
  var handleClick = function handleClick(event) {
26
26
  var _api$blockMenu;
27
- var inputMethod = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
28
- var triggeredFrom = INPUT_METHOD.BLOCK_MENU;
27
+ var triggeredFrom = event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0 ? INPUT_METHOD.KEYBOARD : INPUT_METHOD.MOUSE;
28
+ var inputMethod = INPUT_METHOD.BLOCK_MENU;
29
29
  api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.formatNode(nodeName, {
30
30
  inputMethod: inputMethod,
31
31
  triggeredFrom: triggeredFrom
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-code-block-advanced",
3
- "version": "6.0.9",
3
+ "version": "6.1.0",
4
4
  "description": "CodeBlockAdvanced plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,15 +31,16 @@
31
31
  "@atlaskit/adf-schema": "^51.2.0",
32
32
  "@atlaskit/editor-plugin-block-menu": "^4.0.0",
33
33
  "@atlaskit/editor-plugin-code-block": "^8.0.0",
34
- "@atlaskit/editor-plugin-editor-disabled": "^6.0.0",
34
+ "@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
35
35
  "@atlaskit/editor-plugin-find-replace": "^6.0.0",
36
- "@atlaskit/editor-plugin-selection": "^6.0.0",
36
+ "@atlaskit/editor-plugin-selection": "^6.1.0",
37
37
  "@atlaskit/editor-plugin-selection-marker": "^6.2.0",
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
39
39
  "@atlaskit/editor-toolbar": "^0.14.0",
40
- "@atlaskit/icon": "^28.4.0",
40
+ "@atlaskit/icon": "^28.5.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
- "@atlaskit/tmp-editor-statsig": "^13.2.0",
42
+ "@atlaskit/prosemirror-history": "^0.2.0",
43
+ "@atlaskit/tmp-editor-statsig": "^13.6.0",
43
44
  "@atlaskit/tokens": "^6.4.0",
44
45
  "@babel/runtime": "^7.0.0",
45
46
  "@codemirror/autocomplete": "6.18.4",
@@ -56,7 +57,7 @@
56
57
  "codemirror-lang-elixir": "4.0.0"
57
58
  },
58
59
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^110.4.0",
60
+ "@atlaskit/editor-common": "^110.10.0",
60
61
  "react": "^18.2.0",
61
62
  "react-intl-next": "npm:react-intl@^5.18.1"
62
63
  },
@@ -6,9 +6,9 @@ import { browser } from '@atlaskit/editor-common/browser';
6
6
  import { type RelativeSelectionPos } from '@atlaskit/editor-common/selection';
7
7
  import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
8
8
  import { exitCode, selectAll } from '@atlaskit/editor-prosemirror/commands';
9
- import { undo, redo } from '@atlaskit/editor-prosemirror/history';
10
9
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
11
10
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
11
+ import { undo, redo } from '@atlaskit/prosemirror-history';
12
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
13
 
14
14
  import { backspaceKeymap } from './backspace';
@@ -36,11 +36,11 @@ const CodeBlockMenuItem = ({ api }: Props) => {
36
36
  }, [selection]);
37
37
 
38
38
  const handleClick = (event: React.MouseEvent | React.KeyboardEvent) => {
39
- const inputMethod =
39
+ const triggeredFrom =
40
40
  event.nativeEvent instanceof KeyboardEvent || event.nativeEvent.detail === 0
41
41
  ? INPUT_METHOD.KEYBOARD
42
42
  : INPUT_METHOD.MOUSE;
43
- const triggeredFrom = INPUT_METHOD.BLOCK_MENU;
43
+ const inputMethod = INPUT_METHOD.BLOCK_MENU;
44
44
 
45
45
  api?.core.actions.execute(
46
46
  api?.blockMenu?.commands.formatNode(nodeName, { inputMethod, triggeredFrom }),
package/tsconfig.app.json CHANGED
@@ -64,6 +64,9 @@
64
64
  {
65
65
  "path": "../../platform/feature-flags/tsconfig.app.json"
66
66
  },
67
+ {
68
+ "path": "../prosemirror-history/tsconfig.app.json"
69
+ },
67
70
  {
68
71
  "path": "../tmp-editor-statsig/tsconfig.app.json"
69
72
  },