@atlaskit/editor-plugin-insert-block 9.0.15 → 9.0.16

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,13 @@
1
1
  # @atlaskit/editor-plugin-insert-block
2
2
 
3
+ ## 9.0.16
4
+
5
+ ### Patch Changes
6
+
7
+ - [`88a7ee0806123`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88a7ee0806123) -
8
+ Mechanical type-import autofix for block, layout, and control packages.
9
+ - Updated dependencies
10
+
3
11
  ## 9.0.15
4
12
 
5
13
  ### Patch Changes
@@ -26,17 +26,18 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
26
26
  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; } /**
27
27
  * @jsxRuntime classic
28
28
  * @jsx jsx
29
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
29
+ */ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports, jsdoc/require-description -- Ignored via go/DSP-18766; jsdoc debt surfaced by this mechanical PR */
30
30
  var DEFAULT_HEIGHT = exports.DEFAULT_HEIGHT = 560;
31
31
 
32
32
  /**
33
- * Exported helper to allow testing of InsertMenu pinning logic. NOTE: this is
34
- *not* the ideal way to approach this, quickinsert plugin provides a `getSuggestions`
35
- method that can be used to get suggestions -> once all experiments are cleaned up,
36
- they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`
37
-
38
- `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`
39
- this newer implementation matches how the "quick insert menu" sorts elements
33
+ * Exported helper to allow testing of InsertMenu pinning logic.
34
+ *
35
+ * NOTE: this is *not* the ideal way to approach this. The quick insert plugin provides a
36
+ * `getSuggestions` method that can be used to get suggestions. Once all experiments are cleaned up,
37
+ * they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`.
38
+ *
39
+ * The `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`.
40
+ * This newer implementation matches how the quick insert menu sorts elements.
40
41
  */
41
42
  var sortPrioritizedElements = exports.sortPrioritizedElements = function sortPrioritizedElements(featuredItems, formatMessage) {
42
43
  if (['new-description', 'orig-description'].includes((0, _expVal.expVal)('cc_fd_db_top_editor_toolbar', 'cohort', 'control'))) {
@@ -36,7 +36,7 @@ var _templateObject;
36
36
  * @jsxRuntime classic
37
37
  * @jsx jsx
38
38
  */
39
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
39
+ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports */
40
40
  // Ignored via go/ees005
41
41
  // eslint-disable-next-line import/no-namespace
42
42
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
@@ -52,6 +52,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
52
52
  /**
53
53
  * Checks if an element is detached (i.e. not in the current document)
54
54
  */
55
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing DOM check surfaced by this mechanical PR.
55
56
  var isDetachedElement = function isDetachedElement(el) {
56
57
  return !document.body.contains(el);
57
58
  };
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.triggerWrapper = exports.expandWrapperStyle = void 0;
7
7
  var _react = require("@emotion/react");
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766 */
9
9
 
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
11
11
  var triggerWrapper = exports.triggerWrapper = (0, _react.css)({
@@ -6,7 +6,7 @@ import _extends from "@babel/runtime/helpers/extends";
6
6
 
7
7
  import { useCallback, useContext, useLayoutEffect, useMemo, useState } from 'react';
8
8
 
9
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
+ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports, jsdoc/require-description -- Ignored via go/DSP-18766; jsdoc debt surfaced by this mechanical PR */
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { useIntl } from 'react-intl-next';
12
12
  import { CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
@@ -20,13 +20,14 @@ import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
20
20
  export const DEFAULT_HEIGHT = 560;
21
21
 
22
22
  /**
23
- * Exported helper to allow testing of InsertMenu pinning logic. NOTE: this is
24
- *not* the ideal way to approach this, quickinsert plugin provides a `getSuggestions`
25
- method that can be used to get suggestions -> once all experiments are cleaned up,
26
- they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`
27
-
28
- `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`
29
- this newer implementation matches how the "quick insert menu" sorts elements
23
+ * Exported helper to allow testing of InsertMenu pinning logic.
24
+ *
25
+ * NOTE: this is *not* the ideal way to approach this. The quick insert plugin provides a
26
+ * `getSuggestions` method that can be used to get suggestions. Once all experiments are cleaned up,
27
+ * they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`.
28
+ *
29
+ * The `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`.
30
+ * This newer implementation matches how the quick insert menu sorts elements.
30
31
  */
31
32
  export const sortPrioritizedElements = (featuredItems, formatMessage) => {
32
33
  if (['new-description', 'orig-description'].includes(expVal('cc_fd_db_top_editor_toolbar', 'cohort', 'control'))) {
@@ -7,7 +7,7 @@ import _extends from "@babel/runtime/helpers/extends";
7
7
  */
8
8
  import React from 'react';
9
9
 
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
10
+ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports */
11
11
  import { css, jsx } from '@emotion/react';
12
12
  import { injectIntl } from 'react-intl-next';
13
13
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
@@ -31,6 +31,7 @@ import { createItems } from './create-items';
31
31
  /**
32
32
  * Checks if an element is detached (i.e. not in the current document)
33
33
  */
34
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing DOM check surfaced by this mechanical PR.
34
35
  const isDetachedElement = el => !document.body.contains(el);
35
36
  const TABLE_SELECTOR_STRING = 'table selector';
36
37
 
@@ -1,4 +1,4 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
1
+ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766 */
2
2
  import { css } from '@emotion/react';
3
3
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
4
4
  export const triggerWrapper = css({
@@ -13,7 +13,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
13
13
 
14
14
  import { useCallback, useContext, useLayoutEffect, useMemo, useState } from 'react';
15
15
 
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
16
+ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports, jsdoc/require-description -- Ignored via go/DSP-18766; jsdoc debt surfaced by this mechanical PR */
17
17
  import { css, jsx } from '@emotion/react';
18
18
  import { useIntl } from 'react-intl-next';
19
19
  import { CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
@@ -27,13 +27,14 @@ import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
27
27
  export var DEFAULT_HEIGHT = 560;
28
28
 
29
29
  /**
30
- * Exported helper to allow testing of InsertMenu pinning logic. NOTE: this is
31
- *not* the ideal way to approach this, quickinsert plugin provides a `getSuggestions`
32
- method that can be used to get suggestions -> once all experiments are cleaned up,
33
- they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`
34
-
35
- `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`
36
- this newer implementation matches how the "quick insert menu" sorts elements
30
+ * Exported helper to allow testing of InsertMenu pinning logic.
31
+ *
32
+ * NOTE: this is *not* the ideal way to approach this. The quick insert plugin provides a
33
+ * `getSuggestions` method that can be used to get suggestions. Once all experiments are cleaned up,
34
+ * they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`.
35
+ *
36
+ * The `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`.
37
+ * This newer implementation matches how the quick insert menu sorts elements.
37
38
  */
38
39
  export var sortPrioritizedElements = function sortPrioritizedElements(featuredItems, formatMessage) {
39
40
  if (['new-description', 'orig-description'].includes(expVal('cc_fd_db_top_editor_toolbar', 'cohort', 'control'))) {
@@ -22,7 +22,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
22
22
  */
23
23
  import React from 'react';
24
24
 
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
25
+ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports */
26
26
  import { css, jsx } from '@emotion/react';
27
27
  import { injectIntl } from 'react-intl-next';
28
28
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
@@ -46,6 +46,7 @@ import { createItems } from './create-items';
46
46
  /**
47
47
  * Checks if an element is detached (i.e. not in the current document)
48
48
  */
49
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing DOM check surfaced by this mechanical PR.
49
50
  var isDetachedElement = function isDetachedElement(el) {
50
51
  return !document.body.contains(el);
51
52
  };
@@ -1,4 +1,4 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
1
+ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766 */
2
2
  import { css } from '@emotion/react';
3
3
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
4
4
  export var triggerWrapper = css({
@@ -1,4 +1,4 @@
1
- import { type DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
1
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  type ToolbarActionExperienceOptions = {
4
4
  dispatchAnalyticsEvent: DispatchAnalyticsEvent;
@@ -1,16 +1,17 @@
1
1
  import { jsx } from '@emotion/react';
2
- import { type MessageDescriptor } from 'react-intl-next';
2
+ import type { MessageDescriptor } from 'react-intl-next';
3
3
  import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
4
4
  import type { InsertMenuProps } from './types';
5
5
  export declare const DEFAULT_HEIGHT = 560;
6
6
  /**
7
- * Exported helper to allow testing of InsertMenu pinning logic. NOTE: this is
8
- *not* the ideal way to approach this, quickinsert plugin provides a `getSuggestions`
9
- method that can be used to get suggestions -> once all experiments are cleaned up,
10
- they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`
11
-
12
- `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`
13
- this newer implementation matches how the "quick insert menu" sorts elements
7
+ * Exported helper to allow testing of InsertMenu pinning logic.
8
+ *
9
+ * NOTE: this is *not* the ideal way to approach this. The quick insert plugin provides a
10
+ * `getSuggestions` method that can be used to get suggestions. Once all experiments are cleaned up,
11
+ * they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`.
12
+ *
13
+ * The `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`.
14
+ * This newer implementation matches how the quick insert menu sorts elements.
14
15
  */
15
16
  export declare const sortPrioritizedElements: (featuredItems: QuickInsertItem[], formatMessage: (msg: MessageDescriptor) => string) => QuickInsertItem[];
16
17
  declare const InsertMenu: ({ editorView, dropdownItems, showElementBrowserLink, onInsert, toggleVisiblity, pluginInjectionApi, }: InsertMenuProps) => jsx.JSX.Element;
@@ -2,5 +2,5 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { insertBlockPlugin } from '../../insertBlockPlugin';
4
4
  import type { InsertBlockOptions } from '../../types';
5
- import { type BlockMenuItem } from '../ToolbarInsertBlock/create-items';
5
+ import type { BlockMenuItem } from '../ToolbarInsertBlock/create-items';
6
6
  export declare const useInsertMenuRailItems: (editorView: EditorView, options: InsertBlockOptions, api?: ExtractInjectionAPI<typeof insertBlockPlugin>) => BlockMenuItem[];
@@ -1,4 +1,4 @@
1
- import { type MemoizedFn } from 'memoize-one';
1
+ import type { MemoizedFn } from 'memoize-one';
2
2
  import type { WrappedComponentProps } from 'react-intl-next';
3
3
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
4
4
  import type { BlockType } from '@atlaskit/editor-plugin-block-type';
@@ -3,7 +3,8 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import { jsx, type SerializedStyles } from '@emotion/react';
6
+ import { jsx } from '@emotion/react';
7
+ import type { SerializedStyles } from '@emotion/react';
7
8
  import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
8
9
  import type { Props, State } from './types';
9
10
  export declare const tableButtonWrapper: ({ isTableSelectorOpen, isButtonDisabled, }: {
@@ -1,3 +1,3 @@
1
- import { type SerializedStyles } from '@emotion/react';
1
+ import type { SerializedStyles } from '@emotion/react';
2
2
  export declare const triggerWrapper: SerializedStyles;
3
3
  export declare const expandWrapperStyle: SerializedStyles;
@@ -1,4 +1,4 @@
1
- import { type DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
1
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  type ToolbarActionExperienceOptions = {
4
4
  dispatchAnalyticsEvent: DispatchAnalyticsEvent;
@@ -1,16 +1,17 @@
1
1
  import { jsx } from '@emotion/react';
2
- import { type MessageDescriptor } from 'react-intl-next';
2
+ import type { MessageDescriptor } from 'react-intl-next';
3
3
  import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
4
4
  import type { InsertMenuProps } from './types';
5
5
  export declare const DEFAULT_HEIGHT = 560;
6
6
  /**
7
- * Exported helper to allow testing of InsertMenu pinning logic. NOTE: this is
8
- *not* the ideal way to approach this, quickinsert plugin provides a `getSuggestions`
9
- method that can be used to get suggestions -> once all experiments are cleaned up,
10
- they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`
11
-
12
- `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`
13
- this newer implementation matches how the "quick insert menu" sorts elements
7
+ * Exported helper to allow testing of InsertMenu pinning logic.
8
+ *
9
+ * NOTE: this is *not* the ideal way to approach this. The quick insert plugin provides a
10
+ * `getSuggestions` method that can be used to get suggestions. Once all experiments are cleaned up,
11
+ * they should be unified through `pluginInjectionApi?.quickInsert?.actions.getSuggestions`.
12
+ *
13
+ * The `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`.
14
+ * This newer implementation matches how the quick insert menu sorts elements.
14
15
  */
15
16
  export declare const sortPrioritizedElements: (featuredItems: QuickInsertItem[], formatMessage: (msg: MessageDescriptor) => string) => QuickInsertItem[];
16
17
  declare const InsertMenu: ({ editorView, dropdownItems, showElementBrowserLink, onInsert, toggleVisiblity, pluginInjectionApi, }: InsertMenuProps) => jsx.JSX.Element;
@@ -2,5 +2,5 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { insertBlockPlugin } from '../../insertBlockPlugin';
4
4
  import type { InsertBlockOptions } from '../../types';
5
- import { type BlockMenuItem } from '../ToolbarInsertBlock/create-items';
5
+ import type { BlockMenuItem } from '../ToolbarInsertBlock/create-items';
6
6
  export declare const useInsertMenuRailItems: (editorView: EditorView, options: InsertBlockOptions, api?: ExtractInjectionAPI<typeof insertBlockPlugin>) => BlockMenuItem[];
@@ -1,4 +1,4 @@
1
- import { type MemoizedFn } from 'memoize-one';
1
+ import type { MemoizedFn } from 'memoize-one';
2
2
  import type { WrappedComponentProps } from 'react-intl-next';
3
3
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
4
4
  import type { BlockType } from '@atlaskit/editor-plugin-block-type';
@@ -3,7 +3,8 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import { jsx, type SerializedStyles } from '@emotion/react';
6
+ import { jsx } from '@emotion/react';
7
+ import type { SerializedStyles } from '@emotion/react';
7
8
  import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
8
9
  import type { Props, State } from './types';
9
10
  export declare const tableButtonWrapper: ({ isTableSelectorOpen, isButtonDisabled, }: {
@@ -1,3 +1,3 @@
1
- import { type SerializedStyles } from '@emotion/react';
1
+ import type { SerializedStyles } from '@emotion/react';
2
2
  export declare const triggerWrapper: SerializedStyles;
3
3
  export declare const expandWrapperStyle: SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-insert-block",
3
- "version": "9.0.15",
3
+ "version": "9.0.16",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/icon": "^33.1.0",
65
65
  "@atlaskit/icon-lab": "^6.2.0",
66
66
  "@atlaskit/platform-feature-flags": "^1.1.0",
67
- "@atlaskit/tmp-editor-statsig": "^47.0.0",
67
+ "@atlaskit/tmp-editor-statsig": "^48.0.0",
68
68
  "@atlaskit/tokens": "^11.3.0",
69
69
  "@babel/runtime": "^7.0.0",
70
70
  "@emotion/react": "^11.7.1",
@@ -74,7 +74,7 @@
74
74
  "react-virtualized": "^9.22.6"
75
75
  },
76
76
  "peerDependencies": {
77
- "@atlaskit/editor-common": "^112.10.0",
77
+ "@atlaskit/editor-common": "^112.11.0",
78
78
  "react": "^18.2.0",
79
79
  "react-dom": "^18.2.0",
80
80
  "react-intl-next": "npm:react-intl@^5.18.1"