@atlaskit/editor-plugin-quick-insert 1.6.0 → 1.6.1

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/index.js +2 -2
  3. package/dist/cjs/{commands.js → pm-plugins/commands/index.js} +1 -1
  4. package/dist/cjs/{plugin.js → quickInsertPlugin.js} +3 -3
  5. package/dist/cjs/quickInsertPluginType.js +5 -0
  6. package/dist/cjs/ui/ModalElementBrowser/index.js +2 -2
  7. package/dist/es2019/index.js +1 -1
  8. package/dist/es2019/{commands.js → pm-plugins/commands/index.js} +1 -1
  9. package/dist/es2019/{plugin.js → quickInsertPlugin.js} +3 -3
  10. package/dist/es2019/quickInsertPluginType.js +1 -0
  11. package/dist/es2019/ui/ModalElementBrowser/index.js +2 -2
  12. package/dist/esm/index.js +1 -1
  13. package/dist/esm/{commands.js → pm-plugins/commands/index.js} +1 -1
  14. package/dist/esm/{plugin.js → quickInsertPlugin.js} +3 -3
  15. package/dist/esm/quickInsertPluginType.js +1 -0
  16. package/dist/esm/ui/ModalElementBrowser/index.js +2 -2
  17. package/dist/types/index.d.ts +2 -2
  18. package/dist/types/quickInsertPlugin.d.ts +4 -0
  19. package/dist/types/{plugin.d.ts → quickInsertPluginType.d.ts} +0 -2
  20. package/dist/types/ui/ModalElementBrowser/index.d.ts +1 -1
  21. package/dist/types-ts4.5/index.d.ts +2 -2
  22. package/dist/types-ts4.5/quickInsertPlugin.d.ts +4 -0
  23. package/dist/types-ts4.5/{plugin.d.ts → quickInsertPluginType.d.ts} +0 -2
  24. package/dist/types-ts4.5/ui/ModalElementBrowser/index.d.ts +1 -1
  25. package/package.json +6 -3
  26. /package/dist/cjs/{plugin-key.js → pm-plugins/plugin-key.js} +0 -0
  27. /package/dist/cjs/{search.js → ui/search.js} +0 -0
  28. /package/dist/es2019/{plugin-key.js → pm-plugins/plugin-key.js} +0 -0
  29. /package/dist/es2019/{search.js → ui/search.js} +0 -0
  30. /package/dist/esm/{plugin-key.js → pm-plugins/plugin-key.js} +0 -0
  31. /package/dist/esm/{search.js → ui/search.js} +0 -0
  32. /package/dist/types/{commands.d.ts → pm-plugins/commands/index.d.ts} +0 -0
  33. /package/dist/types/{plugin-key.d.ts → pm-plugins/plugin-key.d.ts} +0 -0
  34. /package/dist/types/{search.d.ts → ui/search.d.ts} +0 -0
  35. /package/dist/types-ts4.5/{commands.d.ts → pm-plugins/commands/index.d.ts} +0 -0
  36. /package/dist/types-ts4.5/{plugin-key.d.ts → pm-plugins/plugin-key.d.ts} +0 -0
  37. /package/dist/types-ts4.5/{search.d.ts → ui/search.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-plugin-quick-insert
2
2
 
3
+ ## 1.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#159777](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159777)
8
+ [`e708d0a9e4b36`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e708d0a9e4b36) -
9
+ Refactoring plugins to meet folder standards.
10
+ - Updated dependencies
11
+
3
12
  ## 1.6.0
4
13
 
5
14
  ### Minor Changes
package/dist/cjs/index.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "quickInsertPlugin", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _plugin.quickInsertPlugin;
9
+ return _quickInsertPlugin.quickInsertPlugin;
10
10
  }
11
11
  });
12
- var _plugin = require("./plugin");
12
+ var _quickInsertPlugin = require("./quickInsertPlugin");
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.openElementBrowserModal = exports.createInsertItem = exports.closeElementBrowserModal = void 0;
7
7
  var _insert = require("@atlaskit/editor-common/insert");
8
- var _pluginKey = require("./plugin-key");
8
+ var _pluginKey = require("../plugin-key");
9
9
  var openElementBrowserModal = exports.openElementBrowserModal = function openElementBrowserModal(_ref) {
10
10
  var tr = _ref.tr;
11
11
  return tr.setMeta(_pluginKey.pluginKey, {
@@ -14,10 +14,10 @@ var _reactIntlNext = require("react-intl-next");
14
14
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
15
15
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
16
16
  var _typeAhead = require("@atlaskit/editor-common/type-ahead");
17
- var _commands = require("./commands");
18
- var _pluginKey = require("./plugin-key");
19
- var _search = require("./search");
17
+ var _commands = require("./pm-plugins/commands");
18
+ var _pluginKey = require("./pm-plugins/plugin-key");
20
19
  var _ModalElementBrowser = _interopRequireDefault(require("./ui/ModalElementBrowser"));
20
+ var _search = require("./ui/search");
21
21
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
22
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
23
  var quickInsertPlugin = exports.quickInsertPlugin = function quickInsertPlugin(_ref) {
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _hooks = require("@atlaskit/editor-common/hooks");
11
- var _commands = require("../../commands");
12
- var _search = require("../../search");
11
+ var _commands = require("../../pm-plugins/commands");
12
+ var _search = require("../search");
13
13
  var _ModalElementBrowser = _interopRequireDefault(require("./ModalElementBrowser"));
14
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -1 +1 @@
1
- export { quickInsertPlugin } from './plugin';
1
+ export { quickInsertPlugin } from './quickInsertPlugin';
@@ -1,5 +1,5 @@
1
1
  import { insertSelectedItem } from '@atlaskit/editor-common/insert';
2
- import { pluginKey } from './plugin-key';
2
+ import { pluginKey } from '../plugin-key';
3
3
  export const openElementBrowserModal = ({
4
4
  tr
5
5
  }) => tr.setMeta(pluginKey, {
@@ -3,10 +3,10 @@ import { useIntl } from 'react-intl-next';
3
3
  import { memoProcessQuickInsertItems } from '@atlaskit/editor-common/quick-insert';
4
4
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
6
- import { createInsertItem, openElementBrowserModal } from './commands';
7
- import { pluginKey } from './plugin-key';
8
- import { getQuickInsertSuggestions } from './search';
6
+ import { createInsertItem, openElementBrowserModal } from './pm-plugins/commands';
7
+ import { pluginKey } from './pm-plugins/plugin-key';
9
8
  import ModalElementBrowser from './ui/ModalElementBrowser';
9
+ import { getQuickInsertSuggestions } from './ui/search';
10
10
  export const quickInsertPlugin = ({
11
11
  config: options,
12
12
  api
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
3
- import { closeElementBrowserModal } from '../../commands';
4
- import { getQuickInsertSuggestions } from '../../search';
3
+ import { closeElementBrowserModal } from '../../pm-plugins/commands';
4
+ import { getQuickInsertSuggestions } from '../search';
5
5
  import ModalElementBrowser from './ModalElementBrowser';
6
6
  const Modal = ({
7
7
  quickInsertState,
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export { quickInsertPlugin } from './plugin';
1
+ export { quickInsertPlugin } from './quickInsertPlugin';
@@ -1,5 +1,5 @@
1
1
  import { insertSelectedItem } from '@atlaskit/editor-common/insert';
2
- import { pluginKey } from './plugin-key';
2
+ import { pluginKey } from '../plugin-key';
3
3
  export var openElementBrowserModal = function openElementBrowserModal(_ref) {
4
4
  var tr = _ref.tr;
5
5
  return tr.setMeta(pluginKey, {
@@ -9,10 +9,10 @@ import { useIntl } from 'react-intl-next';
9
9
  import { memoProcessQuickInsertItems } from '@atlaskit/editor-common/quick-insert';
10
10
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
11
11
  import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
12
- import { createInsertItem, openElementBrowserModal } from './commands';
13
- import { pluginKey } from './plugin-key';
14
- import { getQuickInsertSuggestions } from './search';
12
+ import { createInsertItem, openElementBrowserModal } from './pm-plugins/commands';
13
+ import { pluginKey } from './pm-plugins/plugin-key';
15
14
  import ModalElementBrowser from './ui/ModalElementBrowser';
15
+ import { getQuickInsertSuggestions } from './ui/search';
16
16
  export var quickInsertPlugin = function quickInsertPlugin(_ref) {
17
17
  var options = _ref.config,
18
18
  api = _ref.api;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
3
- import { closeElementBrowserModal } from '../../commands';
4
- import { getQuickInsertSuggestions } from '../../search';
3
+ import { closeElementBrowserModal } from '../../pm-plugins/commands';
4
+ import { getQuickInsertSuggestions } from '../search';
5
5
  import ModalElementBrowser from './ModalElementBrowser';
6
6
  var Modal = function Modal(_ref) {
7
7
  var quickInsertState = _ref.quickInsertState,
@@ -1,2 +1,2 @@
1
- export { quickInsertPlugin } from './plugin';
2
- export type { QuickInsertPlugin, QuickInsertSharedState } from './plugin';
1
+ export { quickInsertPlugin } from './quickInsertPlugin';
2
+ export type { QuickInsertPlugin, QuickInsertSharedState } from './quickInsertPluginType';
@@ -0,0 +1,4 @@
1
+ import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
2
+ import { type QuickInsertPlugin } from './quickInsertPluginType';
3
+ export type { QuickInsertPluginOptions };
4
+ export declare const quickInsertPlugin: QuickInsertPlugin;
@@ -2,7 +2,6 @@ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
3
3
  import type { Command, QuickInsertSharedState as CommonQuickInsertSharedState, EditorCommand, NextEditorPlugin, QuickInsertHandler, QuickInsertPluginOptions, QuickInsertSearchOptions, TypeAheadHandler } from '@atlaskit/editor-common/types';
4
4
  import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
5
- export type { QuickInsertPluginOptions };
6
5
  export type QuickInsertSharedState = CommonQuickInsertSharedState & {
7
6
  typeAheadHandler: TypeAheadHandler;
8
7
  };
@@ -20,4 +19,3 @@ export type QuickInsertPlugin = NextEditorPlugin<'quickInsert', {
20
19
  addQuickInsertItem: (item: QuickInsertHandler) => EditorCommand;
21
20
  };
22
21
  }>;
23
- export declare const quickInsertPlugin: QuickInsertPlugin;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { QuickInsertPlugin } from '../../index';
4
+ import type { QuickInsertPlugin } from '../../quickInsertPluginType';
5
5
  type Props = {
6
6
  editorView: EditorView;
7
7
  helpUrl: string | undefined;
@@ -1,2 +1,2 @@
1
- export { quickInsertPlugin } from './plugin';
2
- export type { QuickInsertPlugin, QuickInsertSharedState } from './plugin';
1
+ export { quickInsertPlugin } from './quickInsertPlugin';
2
+ export type { QuickInsertPlugin, QuickInsertSharedState } from './quickInsertPluginType';
@@ -0,0 +1,4 @@
1
+ import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
2
+ import { type QuickInsertPlugin } from './quickInsertPluginType';
3
+ export type { QuickInsertPluginOptions };
4
+ export declare const quickInsertPlugin: QuickInsertPlugin;
@@ -2,7 +2,6 @@ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
3
3
  import type { Command, QuickInsertSharedState as CommonQuickInsertSharedState, EditorCommand, NextEditorPlugin, QuickInsertHandler, QuickInsertPluginOptions, QuickInsertSearchOptions, TypeAheadHandler } from '@atlaskit/editor-common/types';
4
4
  import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
5
- export type { QuickInsertPluginOptions };
6
5
  export type QuickInsertSharedState = CommonQuickInsertSharedState & {
7
6
  typeAheadHandler: TypeAheadHandler;
8
7
  };
@@ -22,4 +21,3 @@ export type QuickInsertPlugin = NextEditorPlugin<'quickInsert', {
22
21
  addQuickInsertItem: (item: QuickInsertHandler) => EditorCommand;
23
22
  };
24
23
  }>;
25
- export declare const quickInsertPlugin: QuickInsertPlugin;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { QuickInsertPlugin } from '../../index';
4
+ import type { QuickInsertPlugin } from '../../quickInsertPluginType';
5
5
  type Props = {
6
6
  editorView: EditorView;
7
7
  helpUrl: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-quick-insert",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Quick insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,13 +32,13 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/button": "^20.3.0",
35
- "@atlaskit/editor-common": "^94.8.0",
35
+ "@atlaskit/editor-common": "^94.12.0",
36
36
  "@atlaskit/editor-plugin-type-ahead": "^1.10.0",
37
37
  "@atlaskit/editor-prosemirror": "6.0.0",
38
38
  "@atlaskit/icon": "^22.24.0",
39
39
  "@atlaskit/modal-dialog": "^12.17.0",
40
40
  "@atlaskit/theme": "^14.0.0",
41
- "@atlaskit/tokens": "^2.0.0",
41
+ "@atlaskit/tokens": "^2.1.0",
42
42
  "@babel/runtime": "^7.0.0",
43
43
  "@emotion/react": "^11.7.1"
44
44
  },
@@ -57,6 +57,9 @@
57
57
  },
58
58
  "techstack": {
59
59
  "@atlassian/frontend": {
60
+ "code-structure": [
61
+ "editor-plugin"
62
+ ],
60
63
  "import-structure": [
61
64
  "atlassian-conventions"
62
65
  ],
File without changes
File without changes
File without changes
File without changes