@atlaskit/editor-plugin-toolbar 8.0.14 → 9.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/package.json +15 -23
- package/plugin-key/package.json +1 -8
- package/toolbar-plugin/package.json +1 -8
- package/toolbar-plugin-type/package.json +1 -8
- package/types/package.json +1 -8
- package/dist/types-ts4.5/entry-points/plugin-key.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/toolbar-plugin-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/toolbar-plugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/experiences/selection-toolbar-open-experience.d.ts +0 -20
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -2
- package/dist/types-ts4.5/toolbarPlugin.d.ts +0 -2
- package/dist/types-ts4.5/toolbarPluginType.d.ts +0 -81
- package/dist/types-ts4.5/types/index.d.ts +0 -111
- package/dist/types-ts4.5/ui/OverflowMenu.d.ts +0 -4
- package/dist/types-ts4.5/ui/OverflowMenuSection.d.ts +0 -6
- package/dist/types-ts4.5/ui/OverflowSection.d.ts +0 -7
- package/dist/types-ts4.5/ui/PrimaryToolbar.d.ts +0 -8
- package/dist/types-ts4.5/ui/Section.d.ts +0 -14
- package/dist/types-ts4.5/ui/SelectionToolbar/index.d.ts +0 -13
- package/dist/types-ts4.5/ui/SelectionToolbar/keyboard-config.d.ts +0 -6
- package/dist/types-ts4.5/ui/SelectionToolbar/types.d.ts +0 -6
- package/dist/types-ts4.5/ui/SelectionToolbar/utils.d.ts +0 -3
- package/dist/types-ts4.5/ui/TextCollapsedMenu.d.ts +0 -10
- package/dist/types-ts4.5/ui/consts.d.ts +0 -5
- package/dist/types-ts4.5/ui/toolbar-components.d.ts +0 -6
- package/dist/types-ts4.5/ui/utils/toolbar.d.ts +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar
|
|
2
2
|
|
|
3
|
+
## 9.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
|
+
## 8.0.15
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 8.0.14
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -17,35 +17,27 @@
|
|
|
17
17
|
"module": "dist/esm/index.js",
|
|
18
18
|
"module:es2019": "dist/es2019/index.js",
|
|
19
19
|
"types": "dist/types/index.d.ts",
|
|
20
|
-
"typesVersions": {
|
|
21
|
-
">=4.5 <4.9": {
|
|
22
|
-
"*": [
|
|
23
|
-
"dist/types-ts4.5/*",
|
|
24
|
-
"dist/types-ts4.5/index.d.ts"
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
20
|
"sideEffects": false,
|
|
29
21
|
"atlaskit:src": "src/index.ts",
|
|
30
22
|
"dependencies": {
|
|
31
|
-
"@atlaskit/browser-apis": "^0.0
|
|
32
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
33
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
34
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
35
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
36
|
-
"@atlaskit/editor-plugin-user-intent": "^
|
|
37
|
-
"@atlaskit/editor-plugin-user-preferences": "^
|
|
38
|
-
"@atlaskit/editor-prosemirror": "^
|
|
39
|
-
"@atlaskit/editor-shared-styles": "^
|
|
40
|
-
"@atlaskit/editor-toolbar": "^
|
|
41
|
-
"@atlaskit/editor-toolbar-model": "^0.
|
|
42
|
-
"@atlaskit/platform-feature-flags": "^
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
23
|
+
"@atlaskit/browser-apis": "^1.0.0",
|
|
24
|
+
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
25
|
+
"@atlaskit/editor-plugin-connectivity": "^12.0.0",
|
|
26
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^14.0.0",
|
|
27
|
+
"@atlaskit/editor-plugin-selection": "^12.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-user-intent": "^10.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-user-preferences": "^10.0.0",
|
|
30
|
+
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
31
|
+
"@atlaskit/editor-shared-styles": "^4.0.0",
|
|
32
|
+
"@atlaskit/editor-toolbar": "^2.0.0",
|
|
33
|
+
"@atlaskit/editor-toolbar-model": "^1.0.0",
|
|
34
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
35
|
+
"@atlaskit/tmp-editor-statsig": "^104.0.0",
|
|
44
36
|
"@babel/runtime": "^7.0.0",
|
|
45
37
|
"bind-event-listener": "^3.0.0"
|
|
46
38
|
},
|
|
47
39
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^
|
|
40
|
+
"@atlaskit/editor-common": "^116.0.0",
|
|
49
41
|
"react": "^18.2.0",
|
|
50
42
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
51
43
|
},
|
package/plugin-key/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/plugin-key.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/plugin-key.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/plugin-key.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/plugin-key.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/plugin-key.d.ts"
|
|
15
8
|
}
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/toolbar-plugin.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/toolbar-plugin.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/toolbar-plugin.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/toolbar-plugin.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/toolbar-plugin.d.ts"
|
|
15
8
|
}
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/toolbar-plugin-type.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/toolbar-plugin-type.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/toolbar-plugin-type.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/toolbar-plugin-type.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/toolbar-plugin-type.d.ts"
|
|
15
8
|
}
|
package/types/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/types.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/types.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/types.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/types.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/types.d.ts"
|
|
15
8
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { editorToolbarPluginKey } from '../pm-plugins/plugin-key';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { ToolbarPlugin, EditorToolbarPluginState } from '../toolbarPluginType';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { toolbarPlugin } from '../toolbarPlugin';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { ToolbarPluginOptions, RegisterComponentsAction } from '../types/index';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
type SelectionToolbarOpenExperienceOptions = {
|
|
4
|
-
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
5
|
-
refs: {
|
|
6
|
-
popupsMountPoint?: HTMLElement;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* This experience tracks when the selection toolbar is opened.
|
|
11
|
-
*
|
|
12
|
-
* Start: When user makes a selection via mouseup or shift+arrow key down
|
|
13
|
-
* Success: When the selection toolbar is added to the DOM within 1000ms of start
|
|
14
|
-
* Failure: When 1000ms passes without the selection toolbar being added to the DOM
|
|
15
|
-
* Abort: When selection transitions to empty or block menu is opened
|
|
16
|
-
*
|
|
17
|
-
* @see https://hello.atlassian.net/wiki/spaces/EDITOR/pages/6262117789/Experience+tracking+Selection+toolbar+open
|
|
18
|
-
*/
|
|
19
|
-
export declare const getSelectionToolbarOpenExperiencePlugin: ({ refs, dispatchAnalyticsEvent, }: SelectionToolbarOpenExperienceOptions) => SafePlugin<{}>;
|
|
20
|
-
export {};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import type { ContextualFormattingEnabledOptions } from '@atlaskit/editor-common/toolbar';
|
|
2
|
-
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
-
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
5
|
-
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
6
|
-
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
7
|
-
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
8
|
-
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
|
9
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
-
import type { BreakpointPreset } from '@atlaskit/editor-toolbar';
|
|
11
|
-
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
12
|
-
import type { RegisterComponentsAction, ToolbarPluginOptions } from './types';
|
|
13
|
-
export type EditorToolbarPluginState = {
|
|
14
|
-
/**
|
|
15
|
-
* Runtime override for the contextual-formatting mode. When set, callers
|
|
16
|
-
* should treat it as taking precedence over `contextualFormattingMode()`.
|
|
17
|
-
* Lives in PM state so React subscribers re-render on flip. Updated via
|
|
18
|
-
* the `setContextualFormattingModeOverride` command; consumers must read
|
|
19
|
-
* it via `useSharedPluginStateWithSelector(api, ['toolbar'], ...)` and
|
|
20
|
-
* merge it themselves — see SelectionToolbar / Section / FullPageToolbarNext
|
|
21
|
-
* for the merge pattern. Used by Markdown Mode to pin the primary toolbar
|
|
22
|
-
* while source / preview view is active (no PM selection to anchor a
|
|
23
|
-
* floating toolbar to).
|
|
24
|
-
*/
|
|
25
|
-
contextualFormattingModeOverride?: ContextualFormattingEnabledOptions;
|
|
26
|
-
selectedNode?: {
|
|
27
|
-
marks: string[];
|
|
28
|
-
node: PMNode;
|
|
29
|
-
nodeType: string;
|
|
30
|
-
pos: number;
|
|
31
|
-
};
|
|
32
|
-
shouldShowToolbar: boolean;
|
|
33
|
-
};
|
|
34
|
-
export type ToolbarPlugin = NextEditorPlugin<'toolbar', {
|
|
35
|
-
actions: {
|
|
36
|
-
/**
|
|
37
|
-
* Returns the current contextual formatting toolbar mode configuration.
|
|
38
|
-
*
|
|
39
|
-
* This method retrieves the active setting that determines the behavior and placement
|
|
40
|
-
* of the contextual formatting toolbar in the editor.
|
|
41
|
-
*
|
|
42
|
-
* @returns The active contextual formatting mode:
|
|
43
|
-
* - `always-inline`: Formatting controls appear in a floating toolbar near selected text
|
|
44
|
-
* - `always-pinned`: Formatting controls are pinned to the top toolbar (default)
|
|
45
|
-
* - `controlled`: Both inline and primary toolbars are available - this option requires editor-plugin-selection-toolbar to be configured with
|
|
46
|
-
* userPreferencesProvider to control the toolbar pinning.
|
|
47
|
-
*/
|
|
48
|
-
contextualFormattingMode: () => ContextualFormattingEnabledOptions;
|
|
49
|
-
/**
|
|
50
|
-
* Returns the breakpoint preset configuration for the toolbar.
|
|
51
|
-
*
|
|
52
|
-
* This method retrieves the breakpoint preset that determines how the toolbar
|
|
53
|
-
* responds to different viewport sizes and layouts.
|
|
54
|
-
*
|
|
55
|
-
* @returns The configured breakpoint preset, or `undefined` if not set.
|
|
56
|
-
*/
|
|
57
|
-
getBreakpointPreset: () => BreakpointPreset | undefined;
|
|
58
|
-
getComponents: () => Array<RegisterComponent>;
|
|
59
|
-
registerComponents: RegisterComponentsAction;
|
|
60
|
-
};
|
|
61
|
-
commands: {
|
|
62
|
-
/**
|
|
63
|
-
* Sets (or clears) the runtime override for `contextualFormattingMode`.
|
|
64
|
-
* Pass `undefined` to clear and fall back to config / user preference.
|
|
65
|
-
* Used by Markdown Mode to pin the toolbar while the source / preview
|
|
66
|
-
* view is active. Exposed as a command (not an action) so callers can
|
|
67
|
-
* compose the meta onto an existing transaction and dispatch once.
|
|
68
|
-
*/
|
|
69
|
-
setContextualFormattingModeOverride: (mode: ContextualFormattingEnabledOptions | undefined) => EditorCommand;
|
|
70
|
-
};
|
|
71
|
-
dependencies: [
|
|
72
|
-
OptionalPlugin<UserIntentPlugin>,
|
|
73
|
-
OptionalPlugin<SelectionPlugin>,
|
|
74
|
-
OptionalPlugin<UserPreferencesPlugin>,
|
|
75
|
-
OptionalPlugin<EditorViewModePlugin>,
|
|
76
|
-
OptionalPlugin<ConnectivityPlugin>,
|
|
77
|
-
OptionalPlugin<AnalyticsPlugin>
|
|
78
|
-
];
|
|
79
|
-
pluginConfiguration?: ToolbarPluginOptions;
|
|
80
|
-
sharedState: EditorToolbarPluginState;
|
|
81
|
-
}>;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import type { ContextualFormattingEnabledOptions } from '@atlaskit/editor-common/toolbar';
|
|
2
|
-
import type { BreakpointPreset } from '@atlaskit/editor-toolbar';
|
|
3
|
-
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
4
|
-
export type ToolbarPluginOptions = {
|
|
5
|
-
/**
|
|
6
|
-
* Option to set the breakpoint preset for the toolbar.
|
|
7
|
-
*/
|
|
8
|
-
breakpointPreset?: BreakpointPreset;
|
|
9
|
-
/**
|
|
10
|
-
* EDITOR-6558: Optional predicate applied to every component returned
|
|
11
|
-
* from `getComponents` (i.e. evaluated at read time, not registration
|
|
12
|
-
* time). Components returning `false` are silently dropped. Used by
|
|
13
|
-
* Markdown Mode to hide toolbar buttons / menus whose underlying mark
|
|
14
|
-
* or node has no clean GFM round-trip (e.g. text colour, highlight,
|
|
15
|
-
* alignment, indentation, font size, etc.), and to hide ALL but the
|
|
16
|
-
* view-mode toggle when in source/preview view.
|
|
17
|
-
*
|
|
18
|
-
* The filter receives the registered component's `key` and `type` so
|
|
19
|
-
* consumers can distinguish buttons / menus / sections by their stable
|
|
20
|
-
* identifier without poking into component internals.
|
|
21
|
-
*
|
|
22
|
-
* Because the filter runs on every `getComponents` call, it can read
|
|
23
|
-
* mutable runtime state (e.g. via a closure over a sweet-state hook
|
|
24
|
-
* value) — but the consumer is responsible for ensuring the React tree
|
|
25
|
-
* re-renders when that state changes (e.g. via a parent component that
|
|
26
|
-
* subscribes to the same state and propagates re-renders).
|
|
27
|
-
*/
|
|
28
|
-
componentFilter?: (component: {
|
|
29
|
-
key: string;
|
|
30
|
-
type: string;
|
|
31
|
-
}) => boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Controls which toolbars are available for in the editor.
|
|
34
|
-
*
|
|
35
|
-
* The contextual formatting toolbar provides text formatting options (bold, italic, links, etc.)
|
|
36
|
-
* that appear contextually based on user selection.
|
|
37
|
-
*
|
|
38
|
-
* **Notes:**
|
|
39
|
-
* - The inline text toolbar has only been tested to work in the full-page and chromless editor appearances.
|
|
40
|
-
*
|
|
41
|
-
* **Options:**
|
|
42
|
-
* - `always-inline`: Formatting controls appear in a floating toolbar near selected text
|
|
43
|
-
* - `always-pinned`: Formatting controls are pinned to the top toolbar (default)
|
|
44
|
-
* - `controlled`: Both inline and primary toolbars are available - this option requires editor-plugin-selection-toolbar to be configured with
|
|
45
|
-
* userPreferencesProvider to control the toolbar pinning.
|
|
46
|
-
*
|
|
47
|
-
* @remarks
|
|
48
|
-
* This option determines where and when the formatting toolbar is displayed:
|
|
49
|
-
* - **Primary toolbar**: The toolbar mounted at the top of the editor that is always visible
|
|
50
|
-
* - **Inline text toolbar**: A floating toolbar that appears near the selected text
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```tsx
|
|
54
|
-
* // Always show formatting controls in a floating (inline) toolbar near selection
|
|
55
|
-
* const toolbarPlugin = createToolbarPlugin({
|
|
56
|
-
* contextualFormattingEnabled: 'always-inline',
|
|
57
|
-
* });
|
|
58
|
-
* ```
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```tsx
|
|
62
|
-
* // Always show formatting controls pinned to the top (primary) toolbar
|
|
63
|
-
* const toolbarPlugin = createToolbarPlugin({
|
|
64
|
-
* contextualFormattingEnabled: 'always-pinned',
|
|
65
|
-
* });
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```tsx
|
|
70
|
-
* // Must have editor-plugin-selection-toolbar configured with userPreferencesProvider
|
|
71
|
-
* // Allow dynamic control of toolbar placement (both inline and primary available)
|
|
72
|
-
* const toolbarPlugin = createToolbarPlugin({
|
|
73
|
-
* contextualFormattingEnabled: 'controlled',
|
|
74
|
-
* });
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* @public
|
|
78
|
-
*/
|
|
79
|
-
contextualFormattingEnabled?: ContextualFormattingEnabledOptions;
|
|
80
|
-
/**
|
|
81
|
-
* EDITOR-6558: Optional override for the `contextualFormattingMode`.
|
|
82
|
-
* When the returned value is non-null it takes precedence over the
|
|
83
|
-
* `contextualFormattingEnabled` config (and over the user's saved
|
|
84
|
-
* docking preference). Used by Markdown Mode to lock the toolbar to
|
|
85
|
-
* `always-pinned` while the floating toolbar would be useless (i.e.
|
|
86
|
-
* when the source / preview view is active and there's no ProseMirror
|
|
87
|
-
* selection to anchor to).
|
|
88
|
-
*/
|
|
89
|
-
contextualFormattingModeOverride?: () => 'always-inline' | 'always-pinned' | 'controlled' | undefined;
|
|
90
|
-
/**
|
|
91
|
-
* @private
|
|
92
|
-
* @deprecated
|
|
93
|
-
* @description
|
|
94
|
-
* This option is deprecated and will be removed in the future, replaced with `contextualFormattingEnabled`.
|
|
95
|
-
*
|
|
96
|
-
* To disable the selection toolbar (so only the primary toolbar is shown), use `contextualFormattingEnabled: 'always-pinned'`.
|
|
97
|
-
* @example
|
|
98
|
-
* ```ts
|
|
99
|
-
* const toolbarPlugin = createToolbarPlugin({
|
|
100
|
-
* contextualFormattingEnabled: 'always-inline',
|
|
101
|
-
* });
|
|
102
|
-
* ```
|
|
103
|
-
*/
|
|
104
|
-
disableSelectionToolbar?: boolean;
|
|
105
|
-
disableSelectionToolbarWhenPinned?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Option to enable new toolbar designs
|
|
108
|
-
*/
|
|
109
|
-
enableNewToolbarExperience?: boolean;
|
|
110
|
-
};
|
|
111
|
-
export type RegisterComponentsAction = (toolbarComponents: Array<RegisterComponent>, replaceItems?: boolean) => void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { SeparatorPosition } from '@atlaskit/editor-toolbar';
|
|
3
|
-
export declare const OverflowSection: ({ children, hasSeparator, testId, }: {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
hasSeparator?: boolean | SeparatorPosition;
|
|
6
|
-
testId?: string;
|
|
7
|
-
}) => React.JSX.Element | null;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { BreakpointPreset } from '@atlaskit/editor-toolbar';
|
|
3
|
-
type PrimaryToolbarProps = {
|
|
4
|
-
breakpointPreset?: BreakpointPreset;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
};
|
|
7
|
-
export declare const PrimaryToolbar: ({ children, breakpointPreset, }: PrimaryToolbarProps) => React.JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
|
|
4
|
-
import type { ToolbarPlugin } from '../toolbarPluginType';
|
|
5
|
-
type SectionProps = {
|
|
6
|
-
api?: ExtractInjectionAPI<ToolbarPlugin>;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
isSharedSection?: boolean;
|
|
9
|
-
parents: ToolbarComponentTypes;
|
|
10
|
-
showSeparatorInFullPagePrimaryToolbar?: boolean;
|
|
11
|
-
testId?: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const Section: ({ children, parents, api, testId, showSeparatorInFullPagePrimaryToolbar, isSharedSection, }: SectionProps) => React.JSX.Element | null;
|
|
14
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { ToolbarPlugin } from '../../toolbarPluginType';
|
|
5
|
-
type SelectionToolbarProps = {
|
|
6
|
-
api?: ExtractInjectionAPI<ToolbarPlugin>;
|
|
7
|
-
disableSelectionToolbarWhenPinned: boolean;
|
|
8
|
-
editorView: EditorView;
|
|
9
|
-
mountPoint: HTMLElement | undefined;
|
|
10
|
-
};
|
|
11
|
-
export declare const SelectionToolbar: ({ api, editorView, mountPoint, disableSelectionToolbarWhenPinned, }: SelectionToolbarProps) => React.JSX.Element | null;
|
|
12
|
-
export declare const SelectionToolbarWithErrorBoundary: ({ api, editorView, mountPoint, disableSelectionToolbarWhenPinned, }: SelectionToolbarProps) => React.JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { ToolbarKeyboardNavigationProviderConfig } from '@atlaskit/editor-toolbar';
|
|
5
|
-
import type { ToolbarPlugin } from '../../toolbarPluginType';
|
|
6
|
-
export declare const getKeyboardNavigationConfig: (editorView: EditorView, intl: IntlShape, api?: ExtractInjectionAPI<ToolbarPlugin>) => ToolbarKeyboardNavigationProviderConfig | undefined;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
export declare const getDomRefFromSelection: (view: EditorView, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => HTMLElement | undefined;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type TextStylesMenuButtonProps = {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Basic version of existing 'Text Styles' Menu - which doesn't dynamically change icon
|
|
7
|
-
* and is also placeholder to render all other menus in the collapsed state.
|
|
8
|
-
*/
|
|
9
|
-
export declare const TextCollapsedMenu: ({ children }: TextStylesMenuButtonProps) => React.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ContextualFormattingEnabledOptions } from '@atlaskit/editor-common/toolbar';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { BreakpointPreset } from '@atlaskit/editor-toolbar';
|
|
4
|
-
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
5
|
-
import type { ToolbarPlugin } from '../toolbarPluginType';
|
|
6
|
-
export declare const getToolbarComponents: (contextualFormattingEnabled: ContextualFormattingEnabledOptions, api?: ExtractInjectionAPI<ToolbarPlugin>, breakpointPreset?: BreakpointPreset) => RegisterComponent[];
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const isEventInContainer: (event: Event, containerSelector: string) => boolean;
|
|
2
|
-
export declare const isShortcutToFocusToolbar: (event: KeyboardEvent) => boolean;
|
|
3
|
-
export declare const getFocusableElements: (rootNode: HTMLElement | null) => Array<HTMLElement>;
|