@atlaskit/editor-plugin-undo-redo 11.0.13 → 11.0.15
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/package.json +2 -2
- package/undo-redo-plugin/package.json +1 -8
- package/undo-redo-plugin-type/package.json +1 -8
- package/dist/types-ts4.5/entry-points/undo-redo-plugin-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/undo-redo-plugin.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/attach-input-meta.d.ts +0 -28
- package/dist/types-ts4.5/pm-plugins/commands.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/enums.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/keymaps.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +0 -5
- package/dist/types-ts4.5/ui/ToolbarUndoRedo/RedoButton.d.ts +0 -8
- package/dist/types-ts4.5/ui/ToolbarUndoRedo/UndoButton.d.ts +0 -8
- package/dist/types-ts4.5/ui/ToolbarUndoRedo/index.d.ts +0 -23
- package/dist/types-ts4.5/ui/ToolbarUndoRedo/toolbar-components.d.ts +0 -4
- package/dist/types-ts4.5/undoRedoPlugin.d.ts +0 -2
- package/dist/types-ts4.5/undoRedoPluginType.d.ts +0 -29
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-undo-redo",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.15",
|
|
4
4
|
"description": "Undo redo plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/icon": "^35.4.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
41
41
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^103.0.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@emotion/react": "^11.7.1"
|
|
45
45
|
},
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/undo-redo-plugin.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/undo-redo-plugin.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/undo-redo-plugin.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/undo-redo-plugin-type.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/undo-redo-plugin-type.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/undo-redo-plugin-type.d.ts"
|
|
17
10
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { UndoRedoPlugin, UndoRedoAction } from '../undoRedoPluginType';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { undoRedoPlugin } from '../undoRedoPlugin';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI, ACTION } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { HigherOrderCommand, Command } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import { InputSource } from './enums';
|
|
5
|
-
type AttachInputMeta = (inputSource: InputSource) => HigherOrderCommand;
|
|
6
|
-
export declare const attachInputMeta: AttachInputMeta;
|
|
7
|
-
type NodeHistory = {
|
|
8
|
-
after: Node;
|
|
9
|
-
before: Node;
|
|
10
|
-
};
|
|
11
|
-
type NodeWithDifferingAttributes = {
|
|
12
|
-
attributes: string[];
|
|
13
|
-
type: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Analyzes changes between two ProseMirror document nodes.
|
|
17
|
-
*
|
|
18
|
-
* @param params - Object containing before and after node states
|
|
19
|
-
* @param params.before - The document node before changes
|
|
20
|
-
* @param params.after - The document node after changes
|
|
21
|
-
* @returns Object containing change analysis results with hasChanged boolean and affectedNodes array
|
|
22
|
-
*/
|
|
23
|
-
export declare function getChanges({ before, after }: NodeHistory): {
|
|
24
|
-
hasChanged: boolean;
|
|
25
|
-
affectedNodes: NodeWithDifferingAttributes[] | undefined;
|
|
26
|
-
};
|
|
27
|
-
export declare const attachInputMetaWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputSource: InputSource, action: ACTION.UNDO_PERFORMED | ACTION.REDO_PERFORMED) => (command: Command) => Command;
|
|
28
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
-
export declare const undoFromKeyboard: Command;
|
|
4
|
-
export declare const redoFromKeyboard: Command;
|
|
5
|
-
export declare const undoFromToolbar: Command;
|
|
6
|
-
export declare const redoFromToolbar: Command;
|
|
7
|
-
export declare const undoFromKeyboardWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
8
|
-
export declare const redoFromKeyboardWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
9
|
-
export declare const undoFromToolbarWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
10
|
-
export declare const redoFromToolbarWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { UndoRedoPlugin } from '../undoRedoPluginType';
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param api
|
|
7
|
-
* @example
|
|
8
|
-
*/
|
|
9
|
-
export declare function keymapPlugin(api?: ExtractInjectionAPI<UndoRedoPlugin>): SafePlugin;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import type { UndoRedoPlugin } from '../undoRedoPluginType';
|
|
4
|
-
export declare const closeTypeAheadAndRunCommand: (editorView: EditorView, api: ExtractInjectionAPI<UndoRedoPlugin> | undefined) => (command: Command) => boolean;
|
|
5
|
-
export declare const forceFocus: (editorView: EditorView, api: ExtractInjectionAPI<UndoRedoPlugin> | undefined) => (command: Command) => boolean;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { UndoRedoPlugin } from '../../undoRedoPluginType';
|
|
4
|
-
type RedoButtonProps = {
|
|
5
|
-
api?: ExtractInjectionAPI<UndoRedoPlugin>;
|
|
6
|
-
};
|
|
7
|
-
export declare const RedoButton: ({ api }: RedoButtonProps) => React.JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { UndoRedoPlugin } from '../../undoRedoPluginType';
|
|
4
|
-
type UndoButtonProps = {
|
|
5
|
-
api?: ExtractInjectionAPI<UndoRedoPlugin>;
|
|
6
|
-
};
|
|
7
|
-
export declare const UndoButton: ({ api }: UndoButtonProps) => React.JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import type { ComponentType, FC } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
8
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
-
import type { UndoRedoPlugin } from '../../undoRedoPluginType';
|
|
11
|
-
export interface Props {
|
|
12
|
-
api: ExtractInjectionAPI<UndoRedoPlugin> | undefined;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
editorView: EditorView;
|
|
15
|
-
isReducedSpacing?: boolean;
|
|
16
|
-
redoDisabled?: boolean;
|
|
17
|
-
undoDisabled?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare const ToolbarUndoRedo: ({ disabled, isReducedSpacing, editorView, api, intl: { formatMessage }, }: Props & WrappedComponentProps) => jsx.JSX.Element;
|
|
20
|
-
declare const _default_1: FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
21
|
-
WrappedComponent: ComponentType<Props & WrappedComponentProps>;
|
|
22
|
-
};
|
|
23
|
-
export default _default_1;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
3
|
-
import type { UndoRedoPlugin } from '../../undoRedoPluginType';
|
|
4
|
-
export declare const getToolbarComponents: (api?: ExtractInjectionAPI<UndoRedoPlugin>) => RegisterComponent[];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
-
import type { HistoryPlugin } from '@atlaskit/editor-plugin-history';
|
|
4
|
-
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
5
|
-
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
|
|
6
|
-
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
7
|
-
import type { InputSource } from './pm-plugins/enums';
|
|
8
|
-
export type UndoRedoAction = (inputSource?: InputSource) => boolean;
|
|
9
|
-
export type UndoRedoPlugin = NextEditorPlugin<'undoRedoPlugin', {
|
|
10
|
-
actions: {
|
|
11
|
-
redo: UndoRedoAction;
|
|
12
|
-
undo: UndoRedoAction;
|
|
13
|
-
};
|
|
14
|
-
dependencies: [
|
|
15
|
-
TypeAheadPlugin,
|
|
16
|
-
HistoryPlugin,
|
|
17
|
-
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
18
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
19
|
-
OptionalPlugin<ToolbarPlugin>
|
|
20
|
-
];
|
|
21
|
-
pluginConfiguration: {
|
|
22
|
-
/**
|
|
23
|
-
* Determines whether or not to show the toolbar buttons
|
|
24
|
-
* If not it just allows use of the actions + keybindings + analytics etc.
|
|
25
|
-
* Defaults to true
|
|
26
|
-
*/
|
|
27
|
-
showToolbarButton: boolean;
|
|
28
|
-
} | undefined;
|
|
29
|
-
}>;
|