@atlaskit/editor-plugin-floating-toolbar 13.0.15 → 14.0.0
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 +32 -0
- package/floatingToolbarPlugin/package.json +1 -8
- package/floatingToolbarPluginType/package.json +1 -8
- package/package.json +27 -35
- package/dist/types-ts4.5/entry-points/floatingToolbarPlugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/floatingToolbarPluginType.d.ts +0 -1
- package/dist/types-ts4.5/floatingToolbarPlugin.d.ts +0 -60
- package/dist/types-ts4.5/floatingToolbarPluginType.d.ts +0 -63
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/commands.d.ts +0 -6
- package/dist/types-ts4.5/pm-plugins/force-focus/index.d.ts +0 -21
- package/dist/types-ts4.5/pm-plugins/toolbar-data/commands.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/toolbar-data/plugin-factory.d.ts +0 -8
- package/dist/types-ts4.5/pm-plugins/toolbar-data/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/toolbar-data/plugin.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/toolbar-data/reducer.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/toolbar-data/types.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +0 -2
- package/dist/types-ts4.5/ui/CheckboxModal.d.ts +0 -4
- package/dist/types-ts4.5/ui/ConfirmationModal.d.ts +0 -6
- package/dist/types-ts4.5/ui/Divider.d.ts +0 -2
- package/dist/types-ts4.5/ui/Dropdown.d.ts +0 -57
- package/dist/types-ts4.5/ui/DropdownMenu.d.ts +0 -35
- package/dist/types-ts4.5/ui/EditorEmojiAddIcon.d.ts +0 -2
- package/dist/types-ts4.5/ui/EmojiPickerButton.d.ts +0 -20
- package/dist/types-ts4.5/ui/ExpandButton.d.ts +0 -2
- package/dist/types-ts4.5/ui/ExtensionsPlaceholder.d.ts +0 -24
- package/dist/types-ts4.5/ui/Input.d.ts +0 -13
- package/dist/types-ts4.5/ui/ScrollButton.d.ts +0 -12
- package/dist/types-ts4.5/ui/ScrollButtons.d.ts +0 -17
- package/dist/types-ts4.5/ui/Select.d.ts +0 -20
- package/dist/types-ts4.5/ui/SimpleModal.d.ts +0 -4
- package/dist/types-ts4.5/ui/Toolbar.d.ts +0 -44
- package/dist/types-ts4.5/ui/utils/index.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 14.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 13.0.16
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 13.0.15
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/floatingToolbarPlugin.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/floatingToolbarPlugin.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/floatingToolbarPlugin.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/floatingToolbarPluginType.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/floatingToolbarPluginType.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/floatingToolbarPluginType.d.ts"
|
|
17
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,31 +21,31 @@
|
|
|
21
21
|
],
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atlaskit/adf-utils": "^
|
|
25
|
-
"@atlaskit/button": "^
|
|
26
|
-
"@atlaskit/checkbox": "^
|
|
27
|
-
"@atlaskit/editor-palette": "^
|
|
28
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
29
|
-
"@atlaskit/editor-plugin-context-panel": "^
|
|
30
|
-
"@atlaskit/editor-plugin-copy-button": "^
|
|
31
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
32
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
33
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
34
|
-
"@atlaskit/editor-plugin-emoji": "^
|
|
35
|
-
"@atlaskit/editor-plugin-extension": "^
|
|
36
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
37
|
-
"@atlaskit/editor-plugin-user-intent": "^
|
|
38
|
-
"@atlaskit/editor-prosemirror": "^
|
|
39
|
-
"@atlaskit/emoji": "^
|
|
40
|
-
"@atlaskit/icon": "^
|
|
41
|
-
"@atlaskit/menu": "^
|
|
42
|
-
"@atlaskit/modal-dialog": "^
|
|
43
|
-
"@atlaskit/platform-feature-flags": "^
|
|
44
|
-
"@atlaskit/primitives": "^
|
|
45
|
-
"@atlaskit/select": "^
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
-
"@atlaskit/tokens": "^
|
|
48
|
-
"@atlaskit/tooltip": "^
|
|
24
|
+
"@atlaskit/adf-utils": "^20.0.0",
|
|
25
|
+
"@atlaskit/button": "^24.0.0",
|
|
26
|
+
"@atlaskit/checkbox": "^18.0.0",
|
|
27
|
+
"@atlaskit/editor-palette": "^3.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-context-panel": "^14.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-copy-button": "^12.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-decorations": "^12.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-editor-disabled": "^12.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^14.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-emoji": "^13.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-extension": "^15.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-interaction": "^21.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-user-intent": "^10.0.0",
|
|
38
|
+
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
39
|
+
"@atlaskit/emoji": "^71.0.0",
|
|
40
|
+
"@atlaskit/icon": "^36.0.0",
|
|
41
|
+
"@atlaskit/menu": "^9.0.0",
|
|
42
|
+
"@atlaskit/modal-dialog": "^16.0.0",
|
|
43
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
44
|
+
"@atlaskit/primitives": "^20.0.0",
|
|
45
|
+
"@atlaskit/select": "^22.0.0",
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^104.0.0",
|
|
47
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
48
|
+
"@atlaskit/tooltip": "^23.0.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@emotion/react": "^11.7.1",
|
|
51
51
|
"bind-event-listener": "^3.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"react-loadable": "^5.1.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@atlaskit/editor-common": "^
|
|
57
|
+
"@atlaskit/editor-common": "^116.0.0",
|
|
58
58
|
"react": "^18.2.0",
|
|
59
59
|
"react-dom": "^18.2.0",
|
|
60
60
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -102,14 +102,6 @@
|
|
|
102
102
|
]
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
|
-
"typesVersions": {
|
|
106
|
-
">=4.5 <4.9": {
|
|
107
|
-
"*": [
|
|
108
|
-
"dist/types-ts4.5/*",
|
|
109
|
-
"dist/types-ts4.5/index.d.ts"
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
105
|
"platform-feature-flags": {
|
|
114
106
|
"platform_editor_ai_remix_toolbar": {
|
|
115
107
|
"type": "boolean"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { floatingToolbarPlugin } from '../floatingToolbarPlugin';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { FloatingToolbarPlugin, ForceFocusSelector, ConfigWithNodeInfo, FloatingToolbarPluginData, FloatingToolbarPluginState, FloatingToolbarPluginDependencies, } from '../floatingToolbarPluginType';
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { IntlShape } from 'react-intl';
|
|
3
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
|
-
import type { ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolbarHandler, UiComponentFactoryParams } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
|
-
import type { ConfigWithNodeInfo, FloatingToolbarPlugin, FloatingToolbarPluginState } from './floatingToolbarPluginType';
|
|
10
|
-
export declare const getRelevantConfig: (selection: Selection, configs: Array<FloatingToolbarConfig>) => ConfigWithNodeInfo | undefined;
|
|
11
|
-
export declare const floatingToolbarPlugin: FloatingToolbarPlugin;
|
|
12
|
-
/**
|
|
13
|
-
* React component that renders the floating toolbar UI for the editor.
|
|
14
|
-
*
|
|
15
|
-
* This component manages the display of floating toolbars based on the current editor state,
|
|
16
|
-
* selection, and configuration. It handles visibility conditions, positioning, toolbar items
|
|
17
|
-
* consolidation, and confirmation dialogs.
|
|
18
|
-
*
|
|
19
|
-
* @param props - Component properties
|
|
20
|
-
* @param props.pluginInjectionApi - Plugin injection API for accessing other plugin states
|
|
21
|
-
* @param props.editorView - ProseMirror EditorView instance
|
|
22
|
-
* @param props.popupsMountPoint - DOM element where popups should be mounted
|
|
23
|
-
* @param props.popupsBoundariesElement - Element that defines popup boundaries
|
|
24
|
-
* @param props.popupsScrollableElement - Scrollable container element for popups
|
|
25
|
-
* @param props.providerFactory - Factory for creating various providers
|
|
26
|
-
* @param props.dispatchAnalyticsEvent - Function to dispatch analytics events
|
|
27
|
-
* @returns JSX element representing the floating toolbar or null if not visible
|
|
28
|
-
*/
|
|
29
|
-
export declare function ContentComponent({ pluginInjectionApi, editorView, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, providerFactory, dispatchAnalyticsEvent, }: Pick<UiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'providerFactory' | 'dispatchAnalyticsEvent' | 'popupsScrollableElement'> & {
|
|
30
|
-
pluginInjectionApi: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
|
|
31
|
-
} & {
|
|
32
|
-
editorView: EditorView;
|
|
33
|
-
}): React.JSX.Element | null;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* ProseMirror Plugin
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
39
|
-
export declare const pluginKey: PluginKey<FloatingToolbarPluginState>;
|
|
40
|
-
/**
|
|
41
|
-
* Creates a floating toolbar plugin for the ProseMirror editor.
|
|
42
|
-
*
|
|
43
|
-
* This factory function creates a SafePlugin that manages floating toolbars in the editor.
|
|
44
|
-
* It processes an array of floating toolbar handlers and determines which toolbar configuration
|
|
45
|
-
* should be active based on the current editor state and selection.
|
|
46
|
-
*
|
|
47
|
-
* @param options - Configuration object for the floating toolbar plugin
|
|
48
|
-
* @param options.floatingToolbarHandlers - Array of handlers that return toolbar configurations
|
|
49
|
-
* @param options.getIntl - Function that returns the IntlShape instance for internationalization
|
|
50
|
-
* @param options.providerFactory - Factory for creating various providers used by the editor
|
|
51
|
-
* @returns A SafePlugin instance that manages floating toolbar state and behavior
|
|
52
|
-
*/
|
|
53
|
-
export declare function floatingToolbarPluginFactory(options: {
|
|
54
|
-
api: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
|
|
55
|
-
floatingToolbarHandlers: Array<FloatingToolbarHandler>;
|
|
56
|
-
getIntl: () => IntlShape;
|
|
57
|
-
providerFactory: ProviderFactory;
|
|
58
|
-
}): SafePlugin<{
|
|
59
|
-
getConfigWithNodeInfo: (editorState: EditorState) => ConfigWithNodeInfo | null | undefined;
|
|
60
|
-
}>;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { FloatingToolbarConfig, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
-
import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
5
|
-
import type { CopyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
|
|
6
|
-
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
|
-
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
8
|
-
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
9
|
-
import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
|
|
10
|
-
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
11
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
12
|
-
import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
13
|
-
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
|
|
14
|
-
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
15
|
-
import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
16
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
17
|
-
export type ConfigWithNodeInfo = {
|
|
18
|
-
config: FloatingToolbarConfig | undefined;
|
|
19
|
-
node: Node;
|
|
20
|
-
pos: number;
|
|
21
|
-
};
|
|
22
|
-
export type FloatingToolbarPluginState = {
|
|
23
|
-
getConfigWithNodeInfo: (state: EditorState) => ConfigWithNodeInfo | null | undefined;
|
|
24
|
-
suppressedToolbar?: boolean;
|
|
25
|
-
};
|
|
26
|
-
export type FloatingToolbarPluginData = {
|
|
27
|
-
confirmDialogForItem?: number;
|
|
28
|
-
confirmDialogForItemOption?: number;
|
|
29
|
-
};
|
|
30
|
-
export type ForceFocusSelector = (selector: string | null) => (tr: Transaction) => Transaction;
|
|
31
|
-
/**
|
|
32
|
-
* Floating toolbar plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
33
|
-
* from `@atlaskit/editor-core`.
|
|
34
|
-
*/
|
|
35
|
-
export type FloatingToolbarPluginDependencies = [
|
|
36
|
-
DecorationsPlugin,
|
|
37
|
-
OptionalPlugin<ContextPanelPlugin>,
|
|
38
|
-
OptionalPlugin<ExtensionPlugin>,
|
|
39
|
-
CopyButtonPlugin,
|
|
40
|
-
EditorDisabledPlugin,
|
|
41
|
-
OptionalPlugin<EditorViewModePlugin>,
|
|
42
|
-
OptionalPlugin<FeatureFlagsPlugin>,
|
|
43
|
-
OptionalPlugin<EmojiPlugin>,
|
|
44
|
-
OptionalPlugin<UserIntentPlugin>,
|
|
45
|
-
OptionalPlugin<InteractionPlugin>,
|
|
46
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
47
|
-
OptionalPlugin<ToolbarPlugin>
|
|
48
|
-
];
|
|
49
|
-
export type FloatingToolbarPlugin = NextEditorPlugin<'floatingToolbar', {
|
|
50
|
-
actions: {
|
|
51
|
-
forceFocusSelector: ForceFocusSelector;
|
|
52
|
-
};
|
|
53
|
-
commands: {
|
|
54
|
-
copyNode: (nodeType: NodeType | NodeType[], inputMethod?: INPUT_METHOD) => ({ tr }: {
|
|
55
|
-
tr: Transaction;
|
|
56
|
-
}) => Transaction;
|
|
57
|
-
};
|
|
58
|
-
dependencies: FloatingToolbarPluginDependencies;
|
|
59
|
-
sharedState: {
|
|
60
|
-
configWithNodeInfo: ConfigWithNodeInfo | undefined;
|
|
61
|
-
floatingToolbarData: FloatingToolbarPluginData | undefined;
|
|
62
|
-
} | undefined;
|
|
63
|
-
}>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
export declare const copyNode: (nodeType: NodeType | Array<NodeType>, editorAnalyticsApi?: EditorAnalyticsAPI | undefined, inputMethod?: INPUT_METHOD) => ({ tr }: {
|
|
5
|
-
tr: Transaction;
|
|
6
|
-
}) => Transaction;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
export declare const forceFocusStateKey: PluginKey;
|
|
6
|
-
/**
|
|
7
|
-
* Used in cases where a floating toolbar button opens a submenu which destroys
|
|
8
|
-
* the button, but the user has pressed ESC to close the submenu and focus needs
|
|
9
|
-
* to move back to the button. */
|
|
10
|
-
declare const _default: () => SafePlugin<{
|
|
11
|
-
selector: null;
|
|
12
|
-
}>;
|
|
13
|
-
export default _default;
|
|
14
|
-
/**
|
|
15
|
-
* The provided selector should be the floating toolbar button that needs focus.
|
|
16
|
-
*/
|
|
17
|
-
export declare const forceFocusSelector: (selector: string | null) => (tr: Transaction) => Transaction;
|
|
18
|
-
/**
|
|
19
|
-
* If a selector is set and the element exists, focus it.
|
|
20
|
-
*/
|
|
21
|
-
export declare function checkShouldForceFocusAndApply(view?: EditorView): void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { FloatingToolbarPluginData } from '../../floatingToolbarPluginType';
|
|
5
|
-
import type { FloatingToolbarPluginAction } from './types';
|
|
6
|
-
export declare const createPluginState: (dispatch: Dispatch, initialState: FloatingToolbarPluginData | ((state: EditorState) => FloatingToolbarPluginData)) => SafeStateField<FloatingToolbarPluginData>;
|
|
7
|
-
export declare const createCommand: <A = FloatingToolbarPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
8
|
-
export declare const getPluginState: (state: EditorState) => FloatingToolbarPluginData;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { FloatingToolbarPluginData } from '../../floatingToolbarPluginType';
|
|
4
|
-
export declare const createPlugin: (dispatch: Dispatch) => SafePlugin<FloatingToolbarPluginData>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { FloatingToolbarPluginData } from '../../floatingToolbarPluginType';
|
|
2
|
-
import type { FloatingToolbarPluginAction } from './types';
|
|
3
|
-
export declare const reducer: (pluginState: FloatingToolbarPluginData, action: FloatingToolbarPluginAction) => FloatingToolbarPluginData;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl';
|
|
3
|
-
import type { ConfirmationDialogProps } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare const CheckboxModal: (props: ConfirmationDialogProps & WrappedComponentProps) => React.JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
3
|
-
import type { ConfirmationDialogProps } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare const ConfirmationModal: React.FC<WithIntlProps<ConfirmationDialogProps & WrappedComponentProps>> & {
|
|
5
|
-
WrappedComponent: React.ComponentType<ConfirmationDialogProps & WrappedComponentProps>;
|
|
6
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
* @jsxFrag
|
|
5
|
-
*/
|
|
6
|
-
import type { ReactElement } from 'react';
|
|
7
|
-
import React, { Component } from 'react';
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
9
|
-
import type { CommandDispatch, DropdownOptions, ExtensionDropdownOptions, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
|
|
10
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
11
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
|
-
export interface Props {
|
|
13
|
-
alignDropdownWithToolbar?: boolean;
|
|
14
|
-
alignX?: 'left' | 'right' | 'center';
|
|
15
|
-
areAnyNewToolbarFlagsEnabled: boolean;
|
|
16
|
-
boundariesElement?: HTMLElement;
|
|
17
|
-
buttonTestId?: string;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
dispatchCommand: (command: Function) => void;
|
|
20
|
-
dropdownListId?: string;
|
|
21
|
-
dropdownWidth?: number;
|
|
22
|
-
editorView?: EditorView;
|
|
23
|
-
footer?: React.ReactNode;
|
|
24
|
-
hideExpandIcon?: boolean;
|
|
25
|
-
icon?: ReactElement<any>;
|
|
26
|
-
iconBefore?: ReactElement<any>;
|
|
27
|
-
mountPoint?: HTMLElement;
|
|
28
|
-
onClick?: () => void;
|
|
29
|
-
onMount?: () => void;
|
|
30
|
-
onToggle?: (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
31
|
-
options: DropdownOptions<Function> | FloatingToolbarOverflowDropdownOptions<Function> | ExtensionDropdownOptions;
|
|
32
|
-
/** If true, the component will have pulse onboarding effect around it. */
|
|
33
|
-
pulse?: boolean;
|
|
34
|
-
scrollableElement?: HTMLElement;
|
|
35
|
-
setDisableParentScroll?: (disable: boolean) => void;
|
|
36
|
-
shouldFitContainer?: boolean;
|
|
37
|
-
showSelected?: boolean;
|
|
38
|
-
title: string;
|
|
39
|
-
tooltip?: string;
|
|
40
|
-
}
|
|
41
|
-
export interface State {
|
|
42
|
-
isOpen: boolean;
|
|
43
|
-
isOpenedByKeyboard: boolean;
|
|
44
|
-
}
|
|
45
|
-
export default class Dropdown extends Component<Props, State> {
|
|
46
|
-
state: State;
|
|
47
|
-
triggerRef: React.RefObject<HTMLDivElement>;
|
|
48
|
-
render(): jsx.JSX.Element;
|
|
49
|
-
private makeArrayOptionsFromCallback;
|
|
50
|
-
private renderArrayOptions;
|
|
51
|
-
private toggleOpen;
|
|
52
|
-
private toggleOpenByKeyboard;
|
|
53
|
-
private hide;
|
|
54
|
-
private hideOnEsc;
|
|
55
|
-
private onOpenChanged;
|
|
56
|
-
componentDidUpdate(prevProps: Props, prevState: State): void;
|
|
57
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { ComponentType, FC } from 'react';
|
|
2
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
3
|
-
import type { ExtensionAPI, ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
4
|
-
import type { DropdownOptionT, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { ButtonItemProps } from '@atlaskit/menu';
|
|
7
|
-
export declare const menuItemDimensions: {
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
};
|
|
11
|
-
export declare const itemSpacing = 4;
|
|
12
|
-
export interface Props {
|
|
13
|
-
areAnyNewToolbarFlagsEnabled?: boolean;
|
|
14
|
-
dispatchCommand: Function;
|
|
15
|
-
editorView?: EditorView;
|
|
16
|
-
hide: Function;
|
|
17
|
-
items: Array<DropdownOptionT<Function>> | FloatingToolbarOverflowDropdownOptions<Function>;
|
|
18
|
-
showSelected?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export type ExtensionProps = {
|
|
21
|
-
extensionApi?: ExtensionAPI;
|
|
22
|
-
extensionProvider?: Promise<ExtensionProvider>;
|
|
23
|
-
};
|
|
24
|
-
export interface DropdownButtonItemProps extends ButtonItemProps {
|
|
25
|
-
onBlur?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
26
|
-
onFocus?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
27
|
-
onMouseEnter?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
28
|
-
onMouseLeave?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
29
|
-
onMouseOut?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
30
|
-
onMouseOver?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
31
|
-
}
|
|
32
|
-
declare const _default_1: FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
33
|
-
WrappedComponent: ComponentType<Props & WrappedComponentProps>;
|
|
34
|
-
};
|
|
35
|
-
export default _default_1;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { EmojiId } from '@atlaskit/emoji';
|
|
5
|
-
import type { FloatingToolbarPlugin } from '../floatingToolbarPluginType';
|
|
6
|
-
type EmojiPickerButtonReturnType = (props: {
|
|
7
|
-
className?: string;
|
|
8
|
-
editorView?: EditorView;
|
|
9
|
-
idx?: number;
|
|
10
|
-
isSelected?: boolean;
|
|
11
|
-
mountPoint?: HTMLElement;
|
|
12
|
-
onChange?: (emoji: EmojiId) => void;
|
|
13
|
-
pluginInjectionApi?: ExtractInjectionAPI<FloatingToolbarPlugin>;
|
|
14
|
-
popupsBoundariesElement?: HTMLElement;
|
|
15
|
-
providerFactory?: ProviderFactory;
|
|
16
|
-
setDisableParentScroll?: (disable: boolean) => void;
|
|
17
|
-
title?: string;
|
|
18
|
-
}) => JSX.Element;
|
|
19
|
-
export declare const EmojiPickerButton: EmojiPickerButtonReturnType;
|
|
20
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtensionAPI, ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
3
|
-
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
4
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
interface Props {
|
|
7
|
-
alignDropdownWithToolbar?: boolean;
|
|
8
|
-
applyChangeToContextPanel: ApplyChangeHandler | undefined;
|
|
9
|
-
areAnyNewToolbarFlagsEnabled: boolean;
|
|
10
|
-
dispatchCommand?: (command: Function) => void;
|
|
11
|
-
editorView: EditorView;
|
|
12
|
-
extensionApi: ExtensionAPI | undefined;
|
|
13
|
-
extensionProvider: Promise<ExtensionProvider>;
|
|
14
|
-
node: PMNode;
|
|
15
|
-
popupsBoundariesElement?: HTMLElement;
|
|
16
|
-
popupsMountPoint?: HTMLElement;
|
|
17
|
-
popupsScrollableElement?: HTMLElement;
|
|
18
|
-
scrollable?: boolean;
|
|
19
|
-
separator?: 'start' | 'end' | 'both';
|
|
20
|
-
setDisableParentScroll?: (disable: boolean) => void;
|
|
21
|
-
setDisableScroll?: (disable: boolean) => void;
|
|
22
|
-
}
|
|
23
|
-
export declare const ExtensionsPlaceholder: (props: Props) => React.JSX.Element | null;
|
|
24
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
export interface Props {
|
|
3
|
-
boundariesElement?: HTMLElement;
|
|
4
|
-
defaultValue?: string;
|
|
5
|
-
mountPoint?: HTMLElement;
|
|
6
|
-
onBlur?: (text: string) => void;
|
|
7
|
-
onSubmit?: (text: string) => void;
|
|
8
|
-
placeholder?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface State {
|
|
11
|
-
text: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const Input: (props: Props) => jsx.JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { IntlShape } from 'react-intl';
|
|
3
|
-
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
type ScrollButtonProps = {
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
intl: IntlShape;
|
|
7
|
-
node: Node;
|
|
8
|
-
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
9
|
-
side: 'left' | 'right';
|
|
10
|
-
};
|
|
11
|
-
export declare const ScrollButton: ({ intl, scrollContainerRef, node, disabled, side, }: ScrollButtonProps) => false | React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { IntlShape } from 'react-intl';
|
|
8
|
-
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
|
-
interface ScrollButtonsProps {
|
|
10
|
-
areAnyNewToolbarFlagsEnabled: boolean;
|
|
11
|
-
disabled: boolean;
|
|
12
|
-
intl: IntlShape;
|
|
13
|
-
node: Node;
|
|
14
|
-
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
15
|
-
}
|
|
16
|
-
export declare const ScrollButtons: ({ intl, scrollContainerRef, node, disabled, areAnyNewToolbarFlagsEnabled, }: ScrollButtonsProps) => jsx.JSX.Element | null;
|
|
17
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { SelectOption } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { ValueType } from '@atlaskit/select';
|
|
4
|
-
export interface Props {
|
|
5
|
-
ariaLabel?: string;
|
|
6
|
-
boundariesElement?: HTMLElement;
|
|
7
|
-
classNamePrefix?: string;
|
|
8
|
-
defaultValue?: SelectOption | null;
|
|
9
|
-
dispatchCommand: (command: Function) => void;
|
|
10
|
-
filterOption?: ((option: SelectOption, rawInput: string) => boolean) | null;
|
|
11
|
-
hideExpandIcon?: boolean;
|
|
12
|
-
mountPoint?: HTMLElement;
|
|
13
|
-
onChange?: (change: ValueType<SelectOption>) => void;
|
|
14
|
-
options: SelectOption[];
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
scrollableElement?: HTMLElement;
|
|
17
|
-
setDisableParentScroll?: (disable: boolean) => void;
|
|
18
|
-
width?: number;
|
|
19
|
-
}
|
|
20
|
-
export default function Search(props: Props): React.JSX.Element;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl';
|
|
3
|
-
import type { ConfirmationDialogProps } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare const SimpleModal: (props: ConfirmationDialogProps & WrappedComponentProps) => React.JSX.Element;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
7
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
9
|
-
import type { Item } from '@atlaskit/editor-common/floating-toolbar';
|
|
10
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
11
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
12
|
-
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
13
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
|
-
import type { FloatingToolbarPlugin } from '../floatingToolbarPluginType';
|
|
15
|
-
export interface Props {
|
|
16
|
-
api: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
|
|
17
|
-
className?: string;
|
|
18
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
19
|
-
dispatchCommand: (command?: Function) => void;
|
|
20
|
-
editorView?: EditorView;
|
|
21
|
-
extensionsProvider?: Promise<ExtensionProvider>;
|
|
22
|
-
focusEditor?: () => void;
|
|
23
|
-
groupLabel?: string;
|
|
24
|
-
items: Array<Item>;
|
|
25
|
-
mediaAssistiveMessage?: string;
|
|
26
|
-
node: Node;
|
|
27
|
-
popupsBoundariesElement?: HTMLElement;
|
|
28
|
-
popupsMountPoint?: HTMLElement;
|
|
29
|
-
popupsScrollableElement?: HTMLElement;
|
|
30
|
-
providerFactory?: ProviderFactory;
|
|
31
|
-
scrollable?: boolean;
|
|
32
|
-
shouldFitContainer?: boolean;
|
|
33
|
-
target?: HTMLElement;
|
|
34
|
-
}
|
|
35
|
-
type GroupedItems = (Item | Item[])[];
|
|
36
|
-
export declare function groupItems(items: Item[], areAnyNewToolbarFlagsEnabled: boolean): GroupedItems;
|
|
37
|
-
export interface State {
|
|
38
|
-
mounted: boolean;
|
|
39
|
-
scrollDisabled: boolean;
|
|
40
|
-
}
|
|
41
|
-
declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
42
|
-
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
43
|
-
};
|
|
44
|
-
export default _default_1;
|