@atlaskit/editor-plugin-floating-toolbar 0.2.3 → 0.3.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,15 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`31405891e32`](https://bitbucket.org/atlassian/atlassian-frontend/commits/31405891e32) - Extract editor disabled plugin as separate package.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 0.2.3
4
14
 
5
15
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1 +1 @@
1
- export type { FloatingToolbarPlugin, ForceFocusSelector } from './types';
1
+ export type { FloatingToolbarPlugin, ForceFocusSelector, ConfigWithNodeInfo, FloatingToolbarPluginData, } from './types';
@@ -1,16 +1,31 @@
1
- import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
1
+ import type { FloatingToolbarConfig, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
3
3
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
+ import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
4
5
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
5
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- export type ForceFocusSelector = (selector: string | null, view?: EditorView) => void;
6
+ import type { Node } from '@atlaskit/editor-prosemirror/model';
7
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
8
+ export type ConfigWithNodeInfo = {
9
+ config: FloatingToolbarConfig | undefined;
10
+ pos: number;
11
+ node: Node;
12
+ };
13
+ export type FloatingToolbarPluginData = {
14
+ confirmDialogForItem?: number;
15
+ };
16
+ export type ForceFocusSelector = (selector: string | null) => (tr: Transaction) => Transaction;
7
17
  export type FloatingToolbarPlugin = NextEditorPlugin<'floatingToolbar', {
8
18
  dependencies: [
9
19
  typeof featureFlagsPlugin,
10
20
  typeof decorationsPlugin,
11
- OptionalPlugin<typeof contextPanelPlugin>
21
+ OptionalPlugin<typeof contextPanelPlugin>,
22
+ EditorDisabledPlugin
12
23
  ];
13
24
  actions: {
14
25
  forceFocusSelector: ForceFocusSelector;
15
26
  };
27
+ sharedState: {
28
+ configWithNodeInfo: ConfigWithNodeInfo | undefined;
29
+ floatingToolbarData: FloatingToolbarPluginData | undefined;
30
+ } | undefined;
16
31
  }>;
@@ -1 +1 @@
1
- export type { FloatingToolbarPlugin, ForceFocusSelector } from './types';
1
+ export type { FloatingToolbarPlugin, ForceFocusSelector, ConfigWithNodeInfo, FloatingToolbarPluginData, } from './types';
@@ -1,16 +1,31 @@
1
- import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
1
+ import type { FloatingToolbarConfig, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
3
3
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
+ import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
4
5
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
5
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- export type ForceFocusSelector = (selector: string | null, view?: EditorView) => void;
6
+ import type { Node } from '@atlaskit/editor-prosemirror/model';
7
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
8
+ export type ConfigWithNodeInfo = {
9
+ config: FloatingToolbarConfig | undefined;
10
+ pos: number;
11
+ node: Node;
12
+ };
13
+ export type FloatingToolbarPluginData = {
14
+ confirmDialogForItem?: number;
15
+ };
16
+ export type ForceFocusSelector = (selector: string | null) => (tr: Transaction) => Transaction;
7
17
  export type FloatingToolbarPlugin = NextEditorPlugin<'floatingToolbar', {
8
18
  dependencies: [
9
19
  typeof featureFlagsPlugin,
10
20
  typeof decorationsPlugin,
11
- OptionalPlugin<typeof contextPanelPlugin>
21
+ OptionalPlugin<typeof contextPanelPlugin>,
22
+ EditorDisabledPlugin
12
23
  ];
13
24
  actions: {
14
25
  forceFocusSelector: ForceFocusSelector;
15
26
  };
27
+ sharedState: {
28
+ configWithNodeInfo: ConfigWithNodeInfo | undefined;
29
+ floatingToolbarData: FloatingToolbarPluginData | undefined;
30
+ } | undefined;
16
31
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -23,9 +23,10 @@
23
23
  ".": "./src/index.ts"
24
24
  },
25
25
  "dependencies": {
26
- "@atlaskit/editor-common": "^74.29.0",
26
+ "@atlaskit/editor-common": "^74.34.0",
27
27
  "@atlaskit/editor-plugin-context-panel": "^0.1.0",
28
28
  "@atlaskit/editor-plugin-decorations": "^0.1.0",
29
+ "@atlaskit/editor-plugin-editor-disabled": "^0.1.0",
29
30
  "@atlaskit/editor-plugin-feature-flags": "^0.1.0",
30
31
  "@atlaskit/editor-prosemirror": "1.0.2",
31
32
  "@babel/runtime": "^7.0.0"
package/report.api.md CHANGED
@@ -17,10 +17,20 @@
17
17
  ```ts
18
18
  import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
19
19
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
20
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
20
+ import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
21
21
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
22
+ import type { FloatingToolbarConfig } from '@atlaskit/editor-common/types';
22
23
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
24
+ import type { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
23
25
  import type { OptionalPlugin } from '@atlaskit/editor-common/types';
26
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
27
+
28
+ // @public (undocumented)
29
+ export type ConfigWithNodeInfo = {
30
+ config: FloatingToolbarConfig | undefined;
31
+ pos: number;
32
+ node: Node_2;
33
+ };
24
34
 
25
35
  // @public (undocumented)
26
36
  export type FloatingToolbarPlugin = NextEditorPlugin<
@@ -30,18 +40,29 @@ export type FloatingToolbarPlugin = NextEditorPlugin<
30
40
  typeof featureFlagsPlugin,
31
41
  typeof decorationsPlugin,
32
42
  OptionalPlugin<typeof contextPanelPlugin>,
43
+ EditorDisabledPlugin,
33
44
  ];
34
45
  actions: {
35
46
  forceFocusSelector: ForceFocusSelector;
36
47
  };
48
+ sharedState:
49
+ | undefined
50
+ | {
51
+ configWithNodeInfo: ConfigWithNodeInfo | undefined;
52
+ floatingToolbarData: FloatingToolbarPluginData | undefined;
53
+ };
37
54
  }
38
55
  >;
39
56
 
57
+ // @public (undocumented)
58
+ export type FloatingToolbarPluginData = {
59
+ confirmDialogForItem?: number;
60
+ };
61
+
40
62
  // @public (undocumented)
41
63
  export type ForceFocusSelector = (
42
64
  selector: null | string,
43
- view?: EditorView,
44
- ) => void;
65
+ ) => (tr: Transaction) => Transaction;
45
66
 
46
67
  // (No @packageDocumentation comment for this package)
47
68
  ```
@@ -6,25 +6,45 @@
6
6
 
7
7
  import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
8
8
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
9
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
+ import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
10
10
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
11
+ import type { FloatingToolbarConfig } from '@atlaskit/editor-common/types';
11
12
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
13
+ import type { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
12
14
  import type { OptionalPlugin } from '@atlaskit/editor-common/types';
15
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
16
+
17
+ // @public (undocumented)
18
+ export type ConfigWithNodeInfo = {
19
+ config: FloatingToolbarConfig | undefined;
20
+ pos: number;
21
+ node: Node_2;
22
+ };
13
23
 
14
24
  // @public (undocumented)
15
25
  export type FloatingToolbarPlugin = NextEditorPlugin<'floatingToolbar', {
16
26
  dependencies: [
17
27
  typeof featureFlagsPlugin,
18
28
  typeof decorationsPlugin,
19
- OptionalPlugin<typeof contextPanelPlugin>
29
+ OptionalPlugin<typeof contextPanelPlugin>,
30
+ EditorDisabledPlugin
20
31
  ];
21
32
  actions: {
22
33
  forceFocusSelector: ForceFocusSelector;
23
34
  };
35
+ sharedState: undefined | {
36
+ configWithNodeInfo: ConfigWithNodeInfo | undefined;
37
+ floatingToolbarData: FloatingToolbarPluginData | undefined;
38
+ };
24
39
  }>;
25
40
 
26
41
  // @public (undocumented)
27
- export type ForceFocusSelector = (selector: null | string, view?: EditorView) => void;
42
+ export type FloatingToolbarPluginData = {
43
+ confirmDialogForItem?: number;
44
+ };
45
+
46
+ // @public (undocumented)
47
+ export type ForceFocusSelector = (selector: null | string) => (tr: Transaction) => Transaction;
28
48
 
29
49
  // (No @packageDocumentation comment for this package)
30
50