@atlaskit/editor-plugin-paste-options-toolbar 3.0.0 → 3.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,26 @@
1
1
  # @atlaskit/editor-plugin-paste-options-toolbar
2
2
 
3
+ ## 3.1.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
+
15
+ ## 3.0.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [#183158](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/183158)
20
+ [`d6096ec5c8ad9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d6096ec5c8ad9) -
21
+ Migrate to useSharedPluginStateWithSelector
22
+ - Updated dependencies
23
+
3
24
  ## 3.0.0
4
25
 
5
26
  ### Major Changes
@@ -6,19 +6,24 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.pasteOptionsToolbarPlugin = void 0;
7
7
  var _react = require("react");
8
8
  var _hooks = require("@atlaskit/editor-common/hooks");
9
- var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
10
9
  var _commands = require("./editor-commands/commands");
11
10
  var _main = require("./pm-plugins/main");
12
11
  var _types = require("./types/types");
13
12
  var _toolbar = require("./ui/toolbar");
14
13
  var useSharedPasteState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (api) {
15
- var lastContentPasted = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'paste.lastContentPasted');
14
+ var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['paste'], function (states) {
15
+ var _states$pasteState;
16
+ return {
17
+ lastContentPasted: (_states$pasteState = states.pasteState) === null || _states$pasteState === void 0 ? void 0 : _states$pasteState.lastContentPasted
18
+ };
19
+ }),
20
+ lastContentPasted = _useSharedPluginState.lastContentPasted;
16
21
  return {
17
22
  lastContentPasted: lastContentPasted
18
23
  };
19
24
  }, function (api) {
20
- var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['paste']),
21
- pasteState = _useSharedPluginState.pasteState;
25
+ var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(api, ['paste']),
26
+ pasteState = _useSharedPluginState2.pasteState;
22
27
  return {
23
28
  lastContentPasted: pasteState === null || pasteState === void 0 ? void 0 : pasteState.lastContentPasted
24
29
  };
@@ -1,12 +1,18 @@
1
1
  import { useEffect } from 'react';
2
- import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
3
- import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
2
+ import { useSharedPluginState, sharedPluginStateHookMigratorFactory, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
3
  import { hideToolbar, showToolbar } from './editor-commands/commands';
5
4
  import { createPlugin } from './pm-plugins/main';
6
5
  import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types/types';
7
6
  import { buildToolbar, isToolbarVisible } from './ui/toolbar';
8
7
  const useSharedPasteState = sharedPluginStateHookMigratorFactory(api => {
9
- const lastContentPasted = useSharedPluginStateSelector(api, 'paste.lastContentPasted');
8
+ const {
9
+ lastContentPasted
10
+ } = useSharedPluginStateWithSelector(api, ['paste'], states => {
11
+ var _states$pasteState;
12
+ return {
13
+ lastContentPasted: (_states$pasteState = states.pasteState) === null || _states$pasteState === void 0 ? void 0 : _states$pasteState.lastContentPasted
14
+ };
15
+ });
10
16
  return {
11
17
  lastContentPasted
12
18
  };
@@ -1,18 +1,23 @@
1
1
  import { useEffect } from 'react';
2
- import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
3
- import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
2
+ import { useSharedPluginState, sharedPluginStateHookMigratorFactory, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
3
  import { hideToolbar, showToolbar } from './editor-commands/commands';
5
4
  import { createPlugin } from './pm-plugins/main';
6
5
  import { pasteOptionsPluginKey, ToolbarDropdownOption } from './types/types';
7
6
  import { buildToolbar, isToolbarVisible } from './ui/toolbar';
8
7
  var useSharedPasteState = sharedPluginStateHookMigratorFactory(function (api) {
9
- var lastContentPasted = useSharedPluginStateSelector(api, 'paste.lastContentPasted');
8
+ var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['paste'], function (states) {
9
+ var _states$pasteState;
10
+ return {
11
+ lastContentPasted: (_states$pasteState = states.pasteState) === null || _states$pasteState === void 0 ? void 0 : _states$pasteState.lastContentPasted
12
+ };
13
+ }),
14
+ lastContentPasted = _useSharedPluginState.lastContentPasted;
10
15
  return {
11
16
  lastContentPasted: lastContentPasted
12
17
  };
13
18
  }, function (api) {
14
- var _useSharedPluginState = useSharedPluginState(api, ['paste']),
15
- pasteState = _useSharedPluginState.pasteState;
19
+ var _useSharedPluginState2 = useSharedPluginState(api, ['paste']),
20
+ pasteState = _useSharedPluginState2.pasteState;
16
21
  return {
17
22
  lastContentPasted: pasteState === null || pasteState === void 0 ? void 0 : pasteState.lastContentPasted
18
23
  };
@@ -1,2 +1,2 @@
1
1
  export { pasteOptionsToolbarPlugin } from './pasteOptionsToolbarPlugin';
2
- export type { PasteOptionsToolbarPlugin } from './pasteOptionsToolbarPluginType';
2
+ export type { PasteOptionsToolbarPlugin, PasteOptionsToolbarPluginDependencies, } from './pasteOptionsToolbarPluginType';
@@ -1,2 +1,2 @@
1
1
  export { pasteOptionsToolbarPlugin } from './pasteOptionsToolbarPlugin';
2
- export type { PasteOptionsToolbarPlugin } from './pasteOptionsToolbarPluginType';
2
+ export type { PasteOptionsToolbarPlugin, PasteOptionsToolbarPluginDependencies, } from './pasteOptionsToolbarPluginType';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste-options-toolbar",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Paste options toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,17 +35,17 @@
35
35
  "dependencies": {
36
36
  "@atlaskit/editor-markdown-transformer": "^5.16.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^3.0.0",
38
- "@atlaskit/editor-plugin-paste": "^4.0.0",
38
+ "@atlaskit/editor-plugin-paste": "^4.1.0",
39
39
  "@atlaskit/editor-prosemirror": "7.0.0",
40
- "@atlaskit/editor-shared-styles": "^3.4.0",
41
- "@atlaskit/icon": "^27.2.0",
42
- "@atlaskit/tokens": "^5.4.0",
40
+ "@atlaskit/editor-shared-styles": "^3.5.0",
41
+ "@atlaskit/icon": "^27.5.0",
42
+ "@atlaskit/tokens": "^5.6.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1",
45
45
  "react-intl-next": "npm:react-intl@^5.18.1"
46
46
  },
47
47
  "peerDependencies": {
48
- "@atlaskit/editor-common": "^107.6.0",
48
+ "@atlaskit/editor-common": "^107.9.0",
49
49
  "react": "^18.2.0",
50
50
  "react-dom": "^18.2.0"
51
51
  },