@atlaskit/editor-plugin-save-on-enter 1.3.15 → 2.0.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,35 @@
1
1
  # @atlaskit/editor-plugin-save-on-enter
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#117363](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117363)
8
+ [`10a0f7f6c2027`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10a0f7f6c2027) -
9
+ This package's `peerDependencies` have been adjusted for `react` and/or `react-dom` to reflect the
10
+ status of only supporting React 18 going forward. No explicit breaking change to React support has
11
+ been made in this release, but this is to signify going forward, breaking changes for React 16 or
12
+ React 17 may come via non-major semver releases.
13
+
14
+ Please refer this community post for more details:
15
+ https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
21
+ ## 1.4.0
22
+
23
+ ### Minor Changes
24
+
25
+ - [#105322](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105322)
26
+ [`8876083532adc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8876083532adc) -
27
+ Bumped editor-prosemirror version to 7.0.0
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies
32
+
3
33
  ## 1.3.15
4
34
 
5
35
  ### Patch Changes
@@ -3,12 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createPlugin = createPlugin;
7
- exports.saveOnEnterPlugin = void 0;
6
+ exports.saveOnEnterPlugin = exports.createPlugin = void 0;
8
7
  var _analytics = require("@atlaskit/editor-common/analytics");
9
8
  var _utils = require("@atlaskit/editor-common/utils");
10
9
  var _keymap = require("@atlaskit/editor-prosemirror/keymap");
11
- function createPlugin(eventDispatch, onSave) {
10
+ var createPlugin = exports.createPlugin = function createPlugin(eventDispatch, onSave) {
12
11
  if (!onSave) {
13
12
  return;
14
13
  }
@@ -22,7 +21,7 @@ function createPlugin(eventDispatch, onSave) {
22
21
  return false;
23
22
  }
24
23
  });
25
- }
24
+ };
26
25
  function canSaveOnEnter(editorView) {
27
26
  var _ref = editorView.state.selection,
28
27
  $cursor = _ref.$cursor;
@@ -1,7 +1,7 @@
1
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import { analyticsEventKey } from '@atlaskit/editor-common/utils';
3
3
  import { keymap } from '@atlaskit/editor-prosemirror/keymap';
4
- export function createPlugin(eventDispatch, onSave) {
4
+ export const createPlugin = (eventDispatch, onSave) => {
5
5
  if (!onSave) {
6
6
  return;
7
7
  }
@@ -15,7 +15,7 @@ export function createPlugin(eventDispatch, onSave) {
15
15
  return false;
16
16
  }
17
17
  });
18
- }
18
+ };
19
19
  function canSaveOnEnter(editorView) {
20
20
  const {
21
21
  $cursor
@@ -1,7 +1,7 @@
1
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import { analyticsEventKey } from '@atlaskit/editor-common/utils';
3
3
  import { keymap } from '@atlaskit/editor-prosemirror/keymap';
4
- export function createPlugin(eventDispatch, onSave) {
4
+ export var createPlugin = function createPlugin(eventDispatch, onSave) {
5
5
  if (!onSave) {
6
6
  return;
7
7
  }
@@ -15,7 +15,7 @@ export function createPlugin(eventDispatch, onSave) {
15
15
  return false;
16
16
  }
17
17
  });
18
- }
18
+ };
19
19
  function canSaveOnEnter(editorView) {
20
20
  var _ref = editorView.state.selection,
21
21
  $cursor = _ref.$cursor;
@@ -2,5 +2,6 @@ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
2
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { SaveOnEnterPlugin } from './saveOnEnterPluginType';
5
- export declare function createPlugin(eventDispatch: Dispatch, onSave?: (editorView: EditorView) => void): SafePlugin | undefined;
5
+ export type CreatePlugin = (eventDispatch: Dispatch, onSave?: (editorView: EditorView) => void) => SafePlugin | undefined;
6
+ export declare const createPlugin: CreatePlugin;
6
7
  export declare const saveOnEnterPlugin: SaveOnEnterPlugin;
@@ -1,7 +1,6 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- type Config = (editorView: EditorView) => void;
3
+ export type Config = (editorView: EditorView) => void;
4
4
  export type SaveOnEnterPlugin = NextEditorPlugin<'saveOnEnter', {
5
5
  pluginConfiguration: Config | undefined;
6
6
  }>;
7
- export {};
@@ -2,5 +2,6 @@ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
2
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { SaveOnEnterPlugin } from './saveOnEnterPluginType';
5
- export declare function createPlugin(eventDispatch: Dispatch, onSave?: (editorView: EditorView) => void): SafePlugin | undefined;
5
+ export type CreatePlugin = (eventDispatch: Dispatch, onSave?: (editorView: EditorView) => void) => SafePlugin | undefined;
6
+ export declare const createPlugin: CreatePlugin;
6
7
  export declare const saveOnEnterPlugin: SaveOnEnterPlugin;
@@ -1,7 +1,6 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- type Config = (editorView: EditorView) => void;
3
+ export type Config = (editorView: EditorView) => void;
4
4
  export type SaveOnEnterPlugin = NextEditorPlugin<'saveOnEnter', {
5
5
  pluginConfiguration: Config | undefined;
6
6
  }>;
7
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-save-on-enter",
3
- "version": "1.3.15",
3
+ "version": "2.0.0",
4
4
  "description": "Save-on-enter plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,12 +31,12 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/editor-common": "^99.0.0",
35
- "@atlaskit/editor-prosemirror": "6.2.1",
34
+ "@atlaskit/editor-common": "^100.0.0",
35
+ "@atlaskit/editor-prosemirror": "7.0.0",
36
36
  "@babel/runtime": "^7.0.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
39
+ "react": "^18.2.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "typescript": "~5.4.2"