@atlaskit/editor-core 187.43.13 → 187.43.17

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 (28) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/plugins/type-ahead/index.js +2 -2
  3. package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +4 -4
  4. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +2 -2
  5. package/dist/cjs/version-wrapper.js +1 -1
  6. package/dist/es2019/plugins/type-ahead/index.js +1 -1
  7. package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +1 -1
  8. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +1 -1
  9. package/dist/es2019/version-wrapper.js +1 -1
  10. package/dist/esm/plugins/type-ahead/index.js +1 -1
  11. package/dist/esm/plugins/type-ahead/pm-plugins/main.js +1 -1
  12. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +1 -1
  13. package/dist/esm/version-wrapper.js +1 -1
  14. package/dist/types/plugins/type-ahead/api.d.ts +1 -1
  15. package/dist/types/plugins/type-ahead/commands/update-list-items.d.ts +1 -1
  16. package/dist/types/plugins/type-ahead/commands/update-query.d.ts +1 -1
  17. package/dist/types/plugins/type-ahead/commands/update-selected-index.d.ts +1 -1
  18. package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +1 -1
  19. package/dist/types/plugins/type-ahead/types.d.ts +1 -1
  20. package/dist/types-ts4.5/plugins/type-ahead/api.d.ts +1 -1
  21. package/dist/types-ts4.5/plugins/type-ahead/commands/update-list-items.d.ts +1 -1
  22. package/dist/types-ts4.5/plugins/type-ahead/commands/update-query.d.ts +1 -1
  23. package/dist/types-ts4.5/plugins/type-ahead/commands/update-selected-index.d.ts +1 -1
  24. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/main.d.ts +1 -1
  25. package/dist/types-ts4.5/plugins/type-ahead/types.d.ts +1 -1
  26. package/package.json +7 -3
  27. package/report.api.md +1 -1
  28. package/tmp/api-report-tmp.d.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.43.17
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3323edc01b9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3323edc01b9) - ED-20003 decoupled type-ahead plugin from editor-core
8
+
3
9
  ## 187.43.13
4
10
 
5
11
  ### Patch Changes
@@ -16,7 +16,7 @@ var _react = _interopRequireDefault(require("react"));
16
16
  var _typeAhead = require("@atlaskit/editor-common/type-ahead");
17
17
  var _main = require("./pm-plugins/main");
18
18
  var _insertItemPlugin = require("./pm-plugins/insert-item-plugin");
19
- var _WithPluginState = _interopRequireDefault(require("../../ui/WithPluginState"));
19
+ var _withPluginState = require("@atlaskit/editor-common/with-plugin-state");
20
20
  var _adfSchema = require("@atlaskit/adf-schema");
21
21
  var _key = require("./pm-plugins/key");
22
22
  var _inputRules = require("./pm-plugins/input-rules");
@@ -188,7 +188,7 @@ var typeAheadPlugin = function typeAheadPlugin(_ref4) {
188
188
  popupsBoundariesElement: popupsBoundariesElement,
189
189
  popupsScrollableElement: popupsScrollableElement || containerElement || undefined
190
190
  };
191
- return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
191
+ return /*#__PURE__*/_react.default.createElement(_withPluginState.WithPluginState, {
192
192
  plugins: {
193
193
  typeAheadState: _key.pluginKey
194
194
  },
@@ -10,10 +10,10 @@ var _steps = require("@atlaskit/adf-schema/steps");
10
10
  var _constants = require("../constants");
11
11
  var _actions = require("./actions");
12
12
  var _key = require("./key");
13
- var _dom = require("../../../utils/dom");
13
+ var _utils = require("@atlaskit/editor-common/utils");
14
14
  var _reducer = require("./reducer");
15
15
  var _decorations = require("./decorations");
16
- var _utils = require("./utils");
16
+ var _utils2 = require("./utils");
17
17
  var hasValidTypeAheadStep = function hasValidTypeAheadStep(tr) {
18
18
  var steps = tr.steps.filter(function (step) {
19
19
  return step instanceof _steps.InsertTypeAheadStep;
@@ -71,7 +71,7 @@ function createPlugin(_ref) {
71
71
  }
72
72
  },
73
73
  appendTransaction: function appendTransaction(transactions, _oldState, newState) {
74
- var insertItemCallback = (0, _utils.isInsertionTransaction)(transactions, _actions.ACTIONS.INSERT_RAW_QUERY);
74
+ var insertItemCallback = (0, _utils2.isInsertionTransaction)(transactions, _actions.ACTIONS.INSERT_RAW_QUERY);
75
75
  if (insertItemCallback) {
76
76
  var tr = insertItemCallback(newState);
77
77
  if (tr) {
@@ -99,7 +99,7 @@ function createPlugin(_ref) {
99
99
  // When this event is coming from the typeahead
100
100
  // we should tell to ProseMirror to sit down and relax
101
101
  // cuz we know what we are doing (I hope)
102
- if (target instanceof HTMLElement && (0, _dom.closest)(target, "[data-type-ahead=".concat(_constants.TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE, "]"))) {
102
+ if (target instanceof HTMLElement && (0, _utils.closest)(target, "[data-type-ahead=".concat(_constants.TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE, "]"))) {
103
103
  return true;
104
104
  }
105
105
  return false;
@@ -15,7 +15,7 @@ var _constants = require("@atlaskit/theme/constants");
15
15
  var _menu = require("@atlaskit/menu");
16
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
17
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
18
- var _styles = require("../../../ui/styles");
18
+ var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
19
19
  var _typeAhead = require("@atlaskit/editor-common/type-ahead");
20
20
  var _reactIntlNext = require("react-intl-next");
21
21
  var _messages = require("../messages");
@@ -170,7 +170,7 @@ var TypeAheadListItem = function TypeAheadListItem(_ref3) {
170
170
  }, item.title), (0, _react2.jsx)("div", {
171
171
  css: itemAfter
172
172
  }, item.keyshortcut && (0, _react2.jsx)("div", {
173
- css: _styles.shortcutStyle
173
+ css: _shortcut.shortcutStyle
174
174
  }, item.keyshortcut))), (0, _react2.jsx)("div", {
175
175
  className: "item-description"
176
176
  }, item.description))), (0, _react2.jsx)(AssistiveText, {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.43.13";
9
+ var version = "187.43.17";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -10,7 +10,7 @@ import React from 'react';
10
10
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
11
11
  import { createPlugin } from './pm-plugins/main';
12
12
  import { createPlugin as createInsertItemPlugin } from './pm-plugins/insert-item-plugin';
13
- import WithPluginState from '../../ui/WithPluginState';
13
+ import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
14
14
  import { typeAheadQuery } from '@atlaskit/adf-schema';
15
15
  import { pluginKey as typeAheadPluginKey } from './pm-plugins/key';
16
16
  import { inputRulePlugin } from './pm-plugins/input-rules';
@@ -4,7 +4,7 @@ import { InsertTypeAheadStep } from '@atlaskit/adf-schema/steps';
4
4
  import { TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE } from '../constants';
5
5
  import { ACTIONS } from './actions';
6
6
  import { pluginKey } from './key';
7
- import { closest } from '../../../utils/dom';
7
+ import { closest } from '@atlaskit/editor-common/utils';
8
8
  import { createReducer } from './reducer';
9
9
  import { factoryDecorations } from './decorations';
10
10
  import { isInsertionTransaction } from './utils';
@@ -7,7 +7,7 @@ import { borderRadius } from '@atlaskit/theme/constants';
7
7
  import { ButtonItem } from '@atlaskit/menu';
8
8
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
9
9
  import { IconFallback } from '@atlaskit/editor-common/quick-insert';
10
- import { shortcutStyle } from '../../../ui/styles';
10
+ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
11
11
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
12
12
  import { useIntl } from 'react-intl-next';
13
13
  import { typeAheadListMessages } from '../messages';
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.43.13";
2
+ export const version = "187.43.17";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -11,7 +11,7 @@ import React from 'react';
11
11
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
12
12
  import { createPlugin } from './pm-plugins/main';
13
13
  import { createPlugin as createInsertItemPlugin } from './pm-plugins/insert-item-plugin';
14
- import WithPluginState from '../../ui/WithPluginState';
14
+ import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
15
15
  import { typeAheadQuery } from '@atlaskit/adf-schema';
16
16
  import { pluginKey as typeAheadPluginKey } from './pm-plugins/key';
17
17
  import { inputRulePlugin } from './pm-plugins/input-rules';
@@ -4,7 +4,7 @@ import { InsertTypeAheadStep } from '@atlaskit/adf-schema/steps';
4
4
  import { TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE } from '../constants';
5
5
  import { ACTIONS } from './actions';
6
6
  import { pluginKey } from './key';
7
- import { closest } from '../../../utils/dom';
7
+ import { closest } from '@atlaskit/editor-common/utils';
8
8
  import { createReducer } from './reducer';
9
9
  import { factoryDecorations } from './decorations';
10
10
  import { isInsertionTransaction } from './utils';
@@ -9,7 +9,7 @@ import { borderRadius } from '@atlaskit/theme/constants';
9
9
  import { ButtonItem } from '@atlaskit/menu';
10
10
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
11
11
  import { IconFallback } from '@atlaskit/editor-common/quick-insert';
12
- import { shortcutStyle } from '../../../ui/styles';
12
+ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
13
13
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
14
14
  import { useIntl } from 'react-intl-next';
15
15
  import { typeAheadListMessages } from '../messages';
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.43.13";
2
+ export var version = "187.43.17";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -4,7 +4,7 @@ import type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
4
4
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
5
5
  import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
6
6
  import type { TypeAheadHandler } from './types';
7
- import type { Command } from '../../types/command';
7
+ import type { Command } from '@atlaskit/editor-common/types';
8
8
  type CloseOptions = {
9
9
  insertCurrentQueryAsRawText: boolean;
10
10
  attachCommand?: Command;
@@ -1,3 +1,3 @@
1
1
  import type { TypeAheadItem } from '../types';
2
- import { Command } from '../../../types/command';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
3
  export declare const updateListItem: (items: Array<TypeAheadItem>) => Command;
@@ -1,2 +1,2 @@
1
- import { Command } from '../../../types/command';
1
+ import type { Command } from '@atlaskit/editor-common/types';
2
2
  export declare const updateQuery: (query: string) => Command;
@@ -1,2 +1,2 @@
1
- import { Command } from '../../../types/command';
1
+ import type { Command } from '@atlaskit/editor-common/types';
2
2
  export declare const updateSelectedIndex: (selectedIndex: number) => Command;
@@ -1,7 +1,7 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { IntlShape } from 'react-intl-next';
3
3
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
- import type { Dispatch } from '../../../event-dispatcher';
4
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
5
5
  import type { PopupMountPointReference, TypeAheadHandler } from '../types';
6
6
  type Props = {
7
7
  reactDispatch: Dispatch;
@@ -1,7 +1,7 @@
1
1
  import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { EditorState, Transaction, ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { CloseSelectionOptions } from './constants';
4
- import type { UiComponentFactoryParams } from '../../types/ui-components';
4
+ import type { UiComponentFactoryParams } from '@atlaskit/editor-common/types';
5
5
  import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
6
6
  import type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler } from '@atlaskit/editor-common/types';
7
7
  import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
@@ -4,7 +4,7 @@ import type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
4
4
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
5
5
  import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
6
6
  import type { TypeAheadHandler } from './types';
7
- import type { Command } from '../../types/command';
7
+ import type { Command } from '@atlaskit/editor-common/types';
8
8
  type CloseOptions = {
9
9
  insertCurrentQueryAsRawText: boolean;
10
10
  attachCommand?: Command;
@@ -1,3 +1,3 @@
1
1
  import type { TypeAheadItem } from '../types';
2
- import { Command } from '../../../types/command';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
3
  export declare const updateListItem: (items: Array<TypeAheadItem>) => Command;
@@ -1,2 +1,2 @@
1
- import { Command } from '../../../types/command';
1
+ import type { Command } from '@atlaskit/editor-common/types';
2
2
  export declare const updateQuery: (query: string) => Command;
@@ -1,2 +1,2 @@
1
- import { Command } from '../../../types/command';
1
+ import type { Command } from '@atlaskit/editor-common/types';
2
2
  export declare const updateSelectedIndex: (selectedIndex: number) => Command;
@@ -1,7 +1,7 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { IntlShape } from 'react-intl-next';
3
3
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
- import type { Dispatch } from '../../../event-dispatcher';
4
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
5
5
  import type { PopupMountPointReference, TypeAheadHandler } from '../types';
6
6
  type Props = {
7
7
  reactDispatch: Dispatch;
@@ -1,7 +1,7 @@
1
1
  import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { EditorState, Transaction, ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { CloseSelectionOptions } from './constants';
4
- import type { UiComponentFactoryParams } from '../../types/ui-components';
4
+ import type { UiComponentFactoryParams } from '@atlaskit/editor-common/types';
5
5
  import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
6
6
  import type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler } from '@atlaskit/editor-common/types';
7
7
  import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.43.13",
3
+ "version": "187.43.17",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -121,7 +121,7 @@
121
121
  "@atlaskit/textfield": "^5.6.0",
122
122
  "@atlaskit/theme": "^12.6.0",
123
123
  "@atlaskit/toggle": "^12.6.0",
124
- "@atlaskit/tokens": "^1.23.0",
124
+ "@atlaskit/tokens": "^1.24.0",
125
125
  "@atlaskit/tooltip": "^17.8.0",
126
126
  "@atlaskit/width-detector": "^4.1.0",
127
127
  "@babel/runtime": "^7.0.0",
@@ -179,7 +179,7 @@
179
179
  "@atlaskit/visual-regression": "*",
180
180
  "@atlaskit/webdriver-runner": "*",
181
181
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
182
- "@atlassian/editor-extension-link-create": "^0.2.0",
182
+ "@atlassian/editor-extension-link-create": "^0.3.0",
183
183
  "@atlassian/feature-flags-test-utils": "^0.1.1",
184
184
  "@atlassian/link-picker-plugins": "^23.0.0",
185
185
  "@atlassian/search-provider": "2.4.7",
@@ -263,6 +263,10 @@
263
263
  "type": "boolean",
264
264
  "referenceOnly": "true"
265
265
  },
266
+ "platform.design-system-team.update-border-radio-checkbox_7askv": {
267
+ "type": "boolean",
268
+ "referenceOnly": "true"
269
+ },
266
270
  "platform.editor.disable-chrome-88-selection-fix_uk53m": {
267
271
  "type": "boolean"
268
272
  },
package/report.api.md CHANGED
@@ -300,7 +300,7 @@ export { clearEditorContent };
300
300
  // @public (undocumented)
301
301
  type CloseOptions = {
302
302
  insertCurrentQueryAsRawText: boolean;
303
- attachCommand?: Command;
303
+ attachCommand?: Command_2;
304
304
  };
305
305
 
306
306
  // @public (undocumented)
@@ -286,7 +286,7 @@ export { clearEditorContent }
286
286
  // @public (undocumented)
287
287
  type CloseOptions = {
288
288
  insertCurrentQueryAsRawText: boolean;
289
- attachCommand?: Command;
289
+ attachCommand?: Command_2;
290
290
  };
291
291
 
292
292
  // @public (undocumented)