@atlaskit/editor-plugin-expand 9.0.0 → 9.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 9.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 9.0.0
4
10
 
5
11
  ### Patch Changes
@@ -8,8 +8,10 @@ exports.pluginKey = exports.getPluginState = exports.createPluginState = exports
8
8
  var _utils = require("@atlaskit/editor-common/utils");
9
9
  var _state = require("@atlaskit/editor-prosemirror/state");
10
10
  var _reducer = _interopRequireDefault(require("../reducer"));
11
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports
12
+
11
13
  var pluginKey = exports.pluginKey = new _state.PluginKey('expandPlugin');
12
- var _pluginFactory = (0, _utils.pluginFactory)(pluginKey, _reducer.default),
13
- createPluginState = exports.createPluginState = _pluginFactory.createPluginState,
14
- createCommand = exports.createCommand = _pluginFactory.createCommand,
15
- getPluginState = exports.getPluginState = _pluginFactory.getPluginState;
14
+ var dest = (0, _utils.pluginFactory)(pluginKey, _reducer.default);
15
+ var createPluginState = exports.createPluginState = dest.createPluginState;
16
+ var createCommand = exports.createCommand = dest.createCommand;
17
+ var getPluginState = exports.getPluginState = dest.getPluginState;
@@ -22,7 +22,7 @@ var _excluded = ["buttonStyles"];
22
22
  * @jsxRuntime classic
23
23
  * @jsx jsx
24
24
  */
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
26
26
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
27
27
  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; }
28
28
  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; }
@@ -1,9 +1,9 @@
1
1
  import { pluginFactory } from '@atlaskit/editor-common/utils';
2
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports
2
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
4
  import reducer from '../reducer';
4
5
  export const pluginKey = new PluginKey('expandPlugin');
5
- export const {
6
- createPluginState,
7
- createCommand,
8
- getPluginState
9
- } = pluginFactory(pluginKey, reducer);
6
+ const dest = pluginFactory(pluginKey, reducer);
7
+ export const createPluginState = dest.createPluginState;
8
+ export const createCommand = dest.createCommand;
9
+ export const getPluginState = dest.getPluginState;
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  import React, { useCallback } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { jsx } from '@emotion/react';
10
10
  import Button from '@atlaskit/button/custom-theme-button';
11
11
  import { expandClassNames } from '@atlaskit/editor-common/styles';
@@ -1,9 +1,9 @@
1
1
  import { pluginFactory } from '@atlaskit/editor-common/utils';
2
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports
2
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
4
  import reducer from '../reducer';
4
5
  export var pluginKey = new PluginKey('expandPlugin');
5
- var _pluginFactory = pluginFactory(pluginKey, reducer),
6
- createPluginState = _pluginFactory.createPluginState,
7
- createCommand = _pluginFactory.createCommand,
8
- getPluginState = _pluginFactory.getPluginState;
9
- export { createPluginState, createCommand, getPluginState };
6
+ var dest = pluginFactory(pluginKey, reducer);
7
+ export var createPluginState = dest.createPluginState;
8
+ export var createCommand = dest.createCommand;
9
+ export var getPluginState = dest.getPluginState;
@@ -10,7 +10,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  */
11
11
  import React, { useCallback } from 'react';
12
12
 
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
14
14
  import { jsx } from '@emotion/react';
15
15
  import Button from '@atlaskit/button/custom-theme-button';
16
16
  import { expandClassNames } from '@atlaskit/editor-common/styles';
@@ -5,9 +5,9 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import type { EditorAppearance, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
6
  import { type Slice } from '@atlaskit/editor-prosemirror/model';
7
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
- import type { ExpandPlugin } from '../../types';
8
+ import type { ExpandPlugin, ExpandPluginState } from '../../types';
9
9
  export declare function containsClass(element: Element | null, className: string): boolean;
10
- export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorAppearance | undefined, useLongPressSelection: boolean | undefined, api: ExtractInjectionAPI<ExpandPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, allowInteractiveExpand?: boolean, __livePage?: boolean) => SafePlugin<import("../..").ExpandPluginState>;
10
+ export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorAppearance | undefined, useLongPressSelection: boolean | undefined, api: ExtractInjectionAPI<ExpandPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, allowInteractiveExpand?: boolean, __livePage?: boolean) => SafePlugin<ExpandPluginState>;
11
11
  /**
12
12
  * Convert a nested expand to an expand when dropped outside an expand or table. Convert an expand to a nested expand when dropped inside an expand or table.
13
13
  */
@@ -1,3 +1,8 @@
1
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- export declare const pluginKey: PluginKey<any>;
3
- export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("../..").ExpandPluginState | ((state: import("prosemirror-state").EditorState) => import("../..").ExpandPluginState)) => import("prosemirror-state").SafeStateField<import("../..").ExpandPluginState>, createCommand: <A = import("../../types").ExpandPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("../..").ExpandPluginState;
1
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
+ import { EditorState, PluginKey, Transaction, type SafeStateField } from '@atlaskit/editor-prosemirror/state';
4
+ import type { ExpandPluginState, ExpandPluginAction } from '../../types';
5
+ export declare const pluginKey: PluginKey;
6
+ export declare const createPluginState: (dispatch: Dispatch, initialState: ExpandPluginState | ((state: EditorState) => ExpandPluginState)) => SafeStateField<ExpandPluginState>;
7
+ export declare const createCommand: <A = ExpandPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
8
+ export declare const getPluginState: (state: EditorState) => ExpandPluginState;
@@ -2,7 +2,7 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
2
  import type { Command, EditorCommand } from '@atlaskit/editor-common/types';
3
3
  import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
6
6
  import { Selection } from '@atlaskit/editor-prosemirror/state';
7
7
  import type { ExpandPlugin, InsertMethod } from '../types';
8
8
  export declare const createExpandNode: (state: EditorState, setExpandedState?: boolean, addLocalId?: boolean) => PMNode | null;
@@ -10,7 +10,7 @@ export declare const createExpandNode: (state: EditorState, setExpandedState?: b
10
10
  * When cleaning up platform_editor_adf_with_localid we can reuse this function
11
11
  * in insertExpandWithInputMethod.
12
12
  */
13
- export declare const wrapSelectionAndSetExpandedState: (state: EditorState, node: PMNode) => import("prosemirror-state").Transaction;
13
+ export declare const wrapSelectionAndSetExpandedState: (state: EditorState, node: PMNode) => Transaction;
14
14
  export declare const insertExpandWithInputMethod: (api: ExtractInjectionAPI<ExpandPlugin> | undefined) => (inputMethod: InsertMethod) => Command;
15
15
  export declare const insertExpand: (api: ExtractInjectionAPI<ExpandPlugin> | undefined) => Command;
16
16
  export declare const deleteExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
@@ -7,9 +7,9 @@ import { type Slice } from '@atlaskit/editor-prosemirror/model';
7
7
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
8
8
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { ExpandPlugin } from '../../types';
10
- export declare const pluginKey: PluginKey<any>;
10
+ export declare const pluginKey: PluginKey;
11
11
  export declare function containsClass(element: Element | null, className: string): boolean;
12
- export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorAppearance | undefined, useLongPressSelection: boolean | undefined, api: ExtractInjectionAPI<ExpandPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, allowInteractiveExpand?: boolean, __livePage?: boolean) => SafePlugin<any>;
12
+ export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorAppearance | undefined, useLongPressSelection: boolean | undefined, api: ExtractInjectionAPI<ExpandPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, allowInteractiveExpand?: boolean, __livePage?: boolean) => SafePlugin;
13
13
  /**
14
14
  * Convert a nested expand to an expand when dropped outside an expand or table. Convert an expand to a nested expand when dropped inside an expand or table.
15
15
  */
@@ -5,9 +5,9 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import type { EditorAppearance, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
6
  import { type Slice } from '@atlaskit/editor-prosemirror/model';
7
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
- import type { ExpandPlugin } from '../../types';
8
+ import type { ExpandPlugin, ExpandPluginState } from '../../types';
9
9
  export declare function containsClass(element: Element | null, className: string): boolean;
10
- export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorAppearance | undefined, useLongPressSelection: boolean | undefined, api: ExtractInjectionAPI<ExpandPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, allowInteractiveExpand?: boolean, __livePage?: boolean) => SafePlugin<import("../..").ExpandPluginState>;
10
+ export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorAppearance | undefined, useLongPressSelection: boolean | undefined, api: ExtractInjectionAPI<ExpandPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, allowInteractiveExpand?: boolean, __livePage?: boolean) => SafePlugin<ExpandPluginState>;
11
11
  /**
12
12
  * Convert a nested expand to an expand when dropped outside an expand or table. Convert an expand to a nested expand when dropped inside an expand or table.
13
13
  */
@@ -1,3 +1,8 @@
1
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- export declare const pluginKey: PluginKey<any>;
3
- export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("../..").ExpandPluginState | ((state: import("prosemirror-state").EditorState) => import("../..").ExpandPluginState)) => import("prosemirror-state").SafeStateField<import("../..").ExpandPluginState>, createCommand: <A = import("../../types").ExpandPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("../..").ExpandPluginState;
1
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
+ import { EditorState, PluginKey, Transaction, type SafeStateField } from '@atlaskit/editor-prosemirror/state';
4
+ import type { ExpandPluginState, ExpandPluginAction } from '../../types';
5
+ export declare const pluginKey: PluginKey;
6
+ export declare const createPluginState: (dispatch: Dispatch, initialState: ExpandPluginState | ((state: EditorState) => ExpandPluginState)) => SafeStateField<ExpandPluginState>;
7
+ export declare const createCommand: <A = ExpandPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
8
+ export declare const getPluginState: (state: EditorState) => ExpandPluginState;
@@ -2,7 +2,7 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
2
  import type { Command, EditorCommand } from '@atlaskit/editor-common/types';
3
3
  import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
6
6
  import { Selection } from '@atlaskit/editor-prosemirror/state';
7
7
  import type { ExpandPlugin, InsertMethod } from '../types';
8
8
  export declare const createExpandNode: (state: EditorState, setExpandedState?: boolean, addLocalId?: boolean) => PMNode | null;
@@ -10,7 +10,7 @@ export declare const createExpandNode: (state: EditorState, setExpandedState?: b
10
10
  * When cleaning up platform_editor_adf_with_localid we can reuse this function
11
11
  * in insertExpandWithInputMethod.
12
12
  */
13
- export declare const wrapSelectionAndSetExpandedState: (state: EditorState, node: PMNode) => import("prosemirror-state").Transaction;
13
+ export declare const wrapSelectionAndSetExpandedState: (state: EditorState, node: PMNode) => Transaction;
14
14
  export declare const insertExpandWithInputMethod: (api: ExtractInjectionAPI<ExpandPlugin> | undefined) => (inputMethod: InsertMethod) => Command;
15
15
  export declare const insertExpand: (api: ExtractInjectionAPI<ExpandPlugin> | undefined) => Command;
16
16
  export declare const deleteExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
@@ -7,9 +7,9 @@ import { type Slice } from '@atlaskit/editor-prosemirror/model';
7
7
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
8
8
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { ExpandPlugin } from '../../types';
10
- export declare const pluginKey: PluginKey<any>;
10
+ export declare const pluginKey: PluginKey;
11
11
  export declare function containsClass(element: Element | null, className: string): boolean;
12
- export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorAppearance | undefined, useLongPressSelection: boolean | undefined, api: ExtractInjectionAPI<ExpandPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, allowInteractiveExpand?: boolean, __livePage?: boolean) => SafePlugin<any>;
12
+ export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorAppearance | undefined, useLongPressSelection: boolean | undefined, api: ExtractInjectionAPI<ExpandPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, allowInteractiveExpand?: boolean, __livePage?: boolean) => SafePlugin;
13
13
  /**
14
14
  * Convert a nested expand to an expand when dropped outside an expand or table. Convert an expand to a nested expand when dropped inside an expand or table.
15
15
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,7 @@
47
47
  "@atlaskit/icon-lab": "^5.17.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/prosemirror-history": "^0.2.0",
50
- "@atlaskit/tmp-editor-statsig": "^35.10.0",
50
+ "@atlaskit/tmp-editor-statsig": "^36.0.0",
51
51
  "@atlaskit/tokens": "^11.1.0",
52
52
  "@atlaskit/tooltip": "^20.14.0",
53
53
  "@babel/runtime": "^7.0.0",