@atlaskit/editor-plugin-type-ahead 1.8.2 → 1.8.3

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,14 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 1.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#136348](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136348)
8
+ [`fb4fb56f1da7c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fb4fb56f1da7c) -
9
+ Use optimised entry-points on editor-common for browser.
10
+ - Updated dependencies
11
+
3
12
  ## 1.8.2
4
13
 
5
14
  ### Patch Changes
@@ -11,11 +11,11 @@ var _react = _interopRequireWildcard(require("react"));
11
11
  var _react2 = require("@emotion/react");
12
12
  var _reactIntlNext = require("react-intl-next");
13
13
  var _w3cKeyname = require("w3c-keyname");
14
+ var _browser = require("@atlaskit/editor-common/browser");
14
15
  var _typeAhead = require("@atlaskit/editor-common/type-ahead");
15
- var _utils = require("@atlaskit/editor-common/utils");
16
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
17
  var _constants = require("../constants");
18
- var _utils2 = require("../utils");
18
+ var _utils = require("../utils");
19
19
  var _AssistiveText = require("./AssistiveText");
20
20
  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); }
21
21
  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 && Object.prototype.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; }
@@ -109,7 +109,7 @@ var InputQuery = exports.InputQuery = /*#__PURE__*/_react.default.memo(function
109
109
  var raw = ((_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.textContent) || '';
110
110
  var text = cleanedInputContent();
111
111
  var stopDefault = false;
112
- var _ref2 = (0, _utils2.getPluginState)(editorView.state) || {},
112
+ var _ref2 = (0, _utils.getPluginState)(editorView.state) || {},
113
113
  selectedIndex = _ref2.selectedIndex;
114
114
  setInFocus(true);
115
115
  switch (key) {
@@ -261,7 +261,7 @@ var InputQuery = exports.InputQuery = /*#__PURE__*/_react.default.memo(function
261
261
  // our event listener). As this path is strictly for click or other typeahead
262
262
  // dismissals that don't involve typeahead item selection, we carve out an
263
263
  // exception for Chrome-specific events where an input device was not the initiator.
264
- if (_utils.browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') &&
264
+ if (_browser.browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') &&
265
265
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
266
266
  !('sourceCapabilities' in event && event.sourceCapabilities)) {
267
267
  return;
@@ -299,7 +299,7 @@ var InputQuery = exports.InputQuery = /*#__PURE__*/_react.default.memo(function
299
299
 
300
300
  // We need to change the content on Safari
301
301
  // and set the cursor at the right place
302
- if (_utils.browser.safari) {
302
+ if (_browser.browser.safari) {
303
303
  e.preventDefault();
304
304
  var dataElement = document.createTextNode(e.data);
305
305
  element.appendChild(dataElement);
@@ -313,7 +313,7 @@ var InputQuery = exports.InputQuery = /*#__PURE__*/_react.default.memo(function
313
313
  }
314
314
  };
315
315
  var onInput = function onInput() {};
316
- if (_utils.browser.safari) {
316
+ if (_browser.browser.safari) {
317
317
  // On Safari, for reasons beyond my understanding,
318
318
  // The undo behavior is totally different from other browsers
319
319
  // That why we need to have an specific branch only for Safari.
@@ -341,7 +341,7 @@ var InputQuery = exports.InputQuery = /*#__PURE__*/_react.default.memo(function
341
341
  element.removeEventListener('focusin', onFocusIn);
342
342
  element.removeEventListener('keydown', keyDown);
343
343
  element.removeEventListener('beforeinput', beforeinput);
344
- if (_utils.browser.safari) {
344
+ if (_browser.browser.safari) {
345
345
  element.removeEventListener('input', onInput);
346
346
  }
347
347
  };
@@ -8,8 +8,8 @@ import React, { Fragment, useCallback, useLayoutEffect, useRef, useState } from
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { useIntl } from 'react-intl-next';
10
10
  import { keyName as keyNameNormalized } from 'w3c-keyname';
11
+ import { browser } from '@atlaskit/editor-common/browser';
11
12
  import { SelectItemMode, typeAheadListMessages } from '@atlaskit/editor-common/type-ahead';
12
- import { browser } from '@atlaskit/editor-common/utils';
13
13
  import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
14
14
  import { CloseSelectionOptions, TYPE_AHEAD_DECORATION_ELEMENT_ID, TYPE_AHEAD_POPUP_CONTENT_CLASS } from '../constants';
15
15
  import { getPluginState } from '../utils';
@@ -9,8 +9,8 @@ import React, { Fragment, useCallback, useLayoutEffect, useRef, useState } from
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { useIntl } from 'react-intl-next';
11
11
  import { keyName as keyNameNormalized } from 'w3c-keyname';
12
+ import { browser } from '@atlaskit/editor-common/browser';
12
13
  import { SelectItemMode, typeAheadListMessages } from '@atlaskit/editor-common/type-ahead';
13
- import { browser } from '@atlaskit/editor-common/utils';
14
14
  import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
15
15
  import { CloseSelectionOptions, TYPE_AHEAD_DECORATION_ELEMENT_ID, TYPE_AHEAD_POPUP_CONTENT_CLASS } from '../constants';
16
16
  import { getPluginState } from '../utils';
@@ -2,7 +2,6 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- /// <reference types="lodash" />
6
5
  import React from 'react';
7
6
  import { jsx } from '@emotion/react';
8
7
  import debounce from 'lodash/debounce';
@@ -1,4 +1,3 @@
1
- /// <reference types="lodash" />
2
1
  /**
3
2
  * @jsxRuntime classic
4
3
  * @jsx jsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -9,7 +9,6 @@
9
9
  },
10
10
  "atlassian": {
11
11
  "team": "Editor: Lego",
12
- "releaseModel": "continuous",
13
12
  "singleton": true,
14
13
  "runReact18": false
15
14
  },
@@ -33,7 +32,7 @@
33
32
  },
34
33
  "dependencies": {
35
34
  "@atlaskit/adf-schema": "^40.9.0",
36
- "@atlaskit/editor-common": "^88.2.0",
35
+ "@atlaskit/editor-common": "^88.8.0",
37
36
  "@atlaskit/editor-plugin-analytics": "^1.8.0",
38
37
  "@atlaskit/editor-prosemirror": "5.0.1",
39
38
  "@atlaskit/editor-shared-styles": "^2.13.0",