@atlaskit/editor-plugin-expand 8.6.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 +12 -0
- package/dist/cjs/legacyExpand/pm-plugins/plugin-factory.js +6 -4
- package/dist/cjs/singlePlayerExpand/ui/ExpandButton.js +1 -1
- package/dist/es2019/legacyExpand/pm-plugins/plugin-factory.js +5 -5
- package/dist/es2019/singlePlayerExpand/ui/ExpandButton.js +1 -1
- package/dist/esm/legacyExpand/pm-plugins/plugin-factory.js +5 -5
- package/dist/esm/singlePlayerExpand/ui/ExpandButton.js +1 -1
- package/dist/types/legacyExpand/pm-plugins/main.d.ts +2 -2
- package/dist/types/legacyExpand/pm-plugins/plugin-factory.d.ts +8 -3
- package/dist/types/singlePlayerExpand/commands.d.ts +2 -2
- package/dist/types/singlePlayerExpand/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/legacyExpand/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/legacyExpand/pm-plugins/plugin-factory.d.ts +8 -3
- package/dist/types-ts4.5/singlePlayerExpand/commands.d.ts +2 -2
- package/dist/types-ts4.5/singlePlayerExpand/pm-plugins/main.d.ts +2 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -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
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
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
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
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<
|
|
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 {
|
|
2
|
-
|
|
3
|
-
|
|
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) =>
|
|
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
|
|
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
|
|
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<
|
|
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 {
|
|
2
|
-
|
|
3
|
-
|
|
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) =>
|
|
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
|
|
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
|
|
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": "
|
|
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",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/adf-schema": "^52.2.0",
|
|
33
33
|
"@atlaskit/button": "^23.10.0",
|
|
34
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
35
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
36
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
37
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
38
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
39
|
-
"@atlaskit/editor-plugin-local-id": "^
|
|
40
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
41
|
-
"@atlaskit/editor-plugin-selection-marker": "^
|
|
34
|
+
"@atlaskit/editor-plugin-analytics": "^8.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-block-menu": "^7.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-decorations": "^8.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-editor-disabled": "^8.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^10.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-local-id": "^6.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-selection": "^8.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-selection-marker": "^8.0.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
44
44
|
"@atlaskit/editor-tables": "^2.9.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": "^
|
|
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",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"w3c-keyname": "^2.1.8"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^
|
|
59
|
+
"@atlaskit/editor-common": "^112.0.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0",
|
|
62
62
|
"react-intl-next": "npm:react-intl@^5.18.1"
|