@atlaskit/editor-plugin-selection-extension 3.1.1 → 3.2.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,17 @@
1
1
  # @atlaskit/editor-plugin-selection-extension
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#189314](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/189314)
8
+ [`22c6251496010`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/22c6251496010) -
9
+ Exported missing types that were already being inferred from existing exports
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 3.1.1
4
16
 
5
17
  ### Patch Changes
@@ -21,9 +21,6 @@ var insertSmartLinks = exports.insertSmartLinks = function insertSmartLinks(link
21
21
  var _selectionExtensionPl;
22
22
  var tr = state.tr,
23
23
  schema = state.schema;
24
- if (!Array.isArray(linkInsertionOption)) {
25
- linkInsertionOption = [linkInsertionOption];
26
- }
27
24
  if (linkInsertionOption.length === 0) {
28
25
  return {
29
26
  status: 'error',
@@ -16,9 +16,6 @@ export const insertSmartLinks = (linkInsertionOption, selectedNodeAdf) => (state
16
16
  tr,
17
17
  schema
18
18
  } = state;
19
- if (!Array.isArray(linkInsertionOption)) {
20
- linkInsertionOption = [linkInsertionOption];
21
- }
22
19
  if (linkInsertionOption.length === 0) {
23
20
  return {
24
21
  status: 'error',
@@ -15,9 +15,6 @@ export var insertSmartLinks = function insertSmartLinks(linkInsertionOption, sel
15
15
  var _selectionExtensionPl;
16
16
  var tr = state.tr,
17
17
  schema = state.schema;
18
- if (!Array.isArray(linkInsertionOption)) {
19
- linkInsertionOption = [linkInsertionOption];
20
- }
21
18
  if (linkInsertionOption.length === 0) {
22
19
  return {
23
20
  status: 'error',
@@ -1,3 +1,3 @@
1
1
  export { selectionExtensionPlugin } from './selectionExtensionPlugin';
2
2
  export type { SelectionExtensionPlugin } from './selectionExtensionPluginType';
3
- export type { SelectionExtensionComponentProps, SelectionExtensionPluginOptions, SelectionExtension, } from './types';
3
+ export type { SelectionExtensionComponentProps, SelectionExtensionPluginOptions, SelectionExtension, LinkInsertionOption, SelectionExtensionPluginState, SelectionExtensionSelectionInfo, } from './types';
@@ -2,7 +2,7 @@ import { type ADFEntity } from '@atlaskit/adf-utils/types';
2
2
  import type { CommandDispatch } from '@atlaskit/editor-common/types';
3
3
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
4
  import { type LinkInsertionOption } from '../types';
5
- export declare const insertSmartLinks: (linkInsertionOption: LinkInsertionOption | LinkInsertionOption[], selectedNodeAdf: ADFEntity) => (state: EditorState, dispatch: CommandDispatch) => {
5
+ export declare const insertSmartLinks: (linkInsertionOption: LinkInsertionOption[], selectedNodeAdf: ADFEntity) => (state: EditorState, dispatch: CommandDispatch) => {
6
6
  status: 'success' | 'error';
7
7
  message?: string;
8
8
  };
@@ -20,7 +20,7 @@ export type SelectionExtensionPlugin = NextEditorPlugin<'selectionExtension', {
20
20
  clearActiveExtension: () => EditorCommand;
21
21
  };
22
22
  actions: {
23
- insertSmartLinks: (linkInsertionOption: LinkInsertionOption | LinkInsertionOption[], selectedNodeAdf: ADFEntity) => {
23
+ insertSmartLinks: (linkInsertionOption: LinkInsertionOption[], selectedNodeAdf: ADFEntity) => {
24
24
  status: 'success' | 'error';
25
25
  message?: string;
26
26
  };
@@ -1,3 +1,3 @@
1
1
  export { selectionExtensionPlugin } from './selectionExtensionPlugin';
2
2
  export type { SelectionExtensionPlugin } from './selectionExtensionPluginType';
3
- export type { SelectionExtensionComponentProps, SelectionExtensionPluginOptions, SelectionExtension, } from './types';
3
+ export type { SelectionExtensionComponentProps, SelectionExtensionPluginOptions, SelectionExtension, LinkInsertionOption, SelectionExtensionPluginState, SelectionExtensionSelectionInfo, } from './types';
@@ -2,7 +2,7 @@ import { type ADFEntity } from '@atlaskit/adf-utils/types';
2
2
  import type { CommandDispatch } from '@atlaskit/editor-common/types';
3
3
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
4
  import { type LinkInsertionOption } from '../types';
5
- export declare const insertSmartLinks: (linkInsertionOption: LinkInsertionOption | LinkInsertionOption[], selectedNodeAdf: ADFEntity) => (state: EditorState, dispatch: CommandDispatch) => {
5
+ export declare const insertSmartLinks: (linkInsertionOption: LinkInsertionOption[], selectedNodeAdf: ADFEntity) => (state: EditorState, dispatch: CommandDispatch) => {
6
6
  status: 'success' | 'error';
7
7
  message?: string;
8
8
  };
@@ -20,7 +20,7 @@ export type SelectionExtensionPlugin = NextEditorPlugin<'selectionExtension', {
20
20
  clearActiveExtension: () => EditorCommand;
21
21
  };
22
22
  actions: {
23
- insertSmartLinks: (linkInsertionOption: LinkInsertionOption | LinkInsertionOption[], selectedNodeAdf: ADFEntity) => {
23
+ insertSmartLinks: (linkInsertionOption: LinkInsertionOption[], selectedNodeAdf: ADFEntity) => {
24
24
  status: 'success' | 'error';
25
25
  message?: string;
26
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-extension",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "editor-plugin-selection-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,20 +39,20 @@
39
39
  "@atlaskit/editor-json-transformer": "^8.24.0",
40
40
  "@atlaskit/editor-plugin-analytics": "^3.0.0",
41
41
  "@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
42
- "@atlaskit/editor-plugin-selection-toolbar": "^4.0.0",
42
+ "@atlaskit/editor-plugin-selection-toolbar": "^4.2.0",
43
43
  "@atlaskit/editor-prosemirror": "7.0.0",
44
44
  "@atlaskit/editor-tables": "^2.9.0",
45
- "@atlaskit/icon": "^27.3.0",
45
+ "@atlaskit/icon": "^27.5.0",
46
46
  "@atlaskit/platform-feature-flags": "^1.1.0",
47
47
  "@atlaskit/primitives": "^14.10.0",
48
- "@atlaskit/tmp-editor-statsig": "^9.1.0",
48
+ "@atlaskit/tmp-editor-statsig": "^9.9.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "lodash": "^4.17.21",
51
51
  "react-intl-next": "npm:react-intl@^5.18.1",
52
52
  "uuid": "^3.1.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@atlaskit/editor-common": "^107.7.0",
55
+ "@atlaskit/editor-common": "^107.9.0",
56
56
  "react": "^18.2.0"
57
57
  },
58
58
  "devDependencies": {