@atlaskit/editor-core 177.0.1 → 178.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 +89 -0
- package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +147 -0
- package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +58 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +3 -1
- package/dist/cjs/create-editor/ReactEditorView.js +3 -2
- package/dist/cjs/create-editor/create-editor.js +3 -1
- package/dist/cjs/editor.js +7 -0
- package/dist/cjs/extensibility.js +7 -6
- package/dist/cjs/plugins/block-type/commands/delete-and-move-cursor.js +67 -0
- package/dist/cjs/plugins/block-type/commands/index.js +9 -1
- package/dist/cjs/plugins/block-type/pm-plugins/keymap.js +8 -3
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +12 -12
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +39 -11
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +8 -15
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -0
- package/dist/cjs/plugins/text-color/commands/change-color.js +1 -2
- package/dist/cjs/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -10
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +19 -1
- package/dist/cjs/ui/ColorPalette/Palettes/textColorPalette.js +0 -6
- package/dist/cjs/ui/ColorPickerButton/index.js +3 -8
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +27 -2
- package/dist/cjs/utils/performance/instrumented-plugin.js +6 -3
- package/dist/cjs/utils/performance/safer-transactions.js +8 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ErrorBoundary.js +3 -1
- package/dist/es2019/create-editor/ReactEditorView.js +3 -2
- package/dist/es2019/create-editor/create-editor.js +3 -1
- package/dist/es2019/editor.js +7 -0
- package/dist/es2019/extensibility.js +8 -1
- package/dist/es2019/plugins/block-type/commands/delete-and-move-cursor.js +63 -0
- package/dist/es2019/plugins/block-type/commands/index.js +2 -1
- package/dist/es2019/plugins/block-type/pm-plugins/keymap.js +7 -4
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +12 -12
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +42 -11
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +9 -17
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -0
- package/dist/es2019/plugins/text-color/commands/change-color.js +1 -2
- package/dist/es2019/plugins/text-color/pm-plugins/main.js +2 -2
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -6
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +19 -1
- package/dist/es2019/ui/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/es2019/ui/ColorPickerButton/index.js +20 -9
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +27 -2
- package/dist/es2019/utils/performance/instrumented-plugin.js +5 -3
- package/dist/es2019/utils/performance/safer-transactions.js +8 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ErrorBoundary.js +3 -1
- package/dist/esm/create-editor/ReactEditorView.js +3 -2
- package/dist/esm/create-editor/create-editor.js +3 -1
- package/dist/esm/editor.js +7 -0
- package/dist/esm/extensibility.js +8 -1
- package/dist/esm/plugins/block-type/commands/delete-and-move-cursor.js +58 -0
- package/dist/esm/plugins/block-type/commands/index.js +2 -1
- package/dist/esm/plugins/block-type/pm-plugins/keymap.js +7 -4
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +12 -12
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +40 -12
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +9 -17
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -0
- package/dist/esm/plugins/text-color/commands/change-color.js +1 -2
- package/dist/esm/plugins/text-color/pm-plugins/main.js +2 -2
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -9
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +19 -1
- package/dist/esm/ui/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/esm/ui/ColorPickerButton/index.js +5 -10
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +27 -2
- package/dist/esm/utils/performance/instrumented-plugin.js +6 -3
- package/dist/esm/utils/performance/safer-transactions.js +8 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/extensibility.d.ts +6 -1
- package/dist/types/plugins/block-type/commands/delete-and-move-cursor.d.ts +12 -0
- package/dist/types/plugins/block-type/commands/index.d.ts +1 -0
- package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +1 -0
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +1 -1
- package/dist/types/ui/ColorPalette/Palettes/textColorPalette.d.ts +1 -1
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +2 -1
- package/dist/types/utils/performance/instrumented-plugin.d.ts +1 -0
- package/dist/types/utils/performance/safer-transactions.d.ts +2 -1
- package/package.json +11 -12
- package/report.api.md +18 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Fixes cursor position after delete for list/task in panel and table
|
|
4
|
+
*
|
|
5
|
+
* ED-13873 fixes a bug where after deleting a list the cursor would move
|
|
6
|
+
* to the cell to the right. Uses setSelection to position the cursor as expected after deleting.
|
|
7
|
+
*
|
|
8
|
+
* @param state EditorState<any>
|
|
9
|
+
* @param dispatch CommandDispatch
|
|
10
|
+
* @returns boolean
|
|
11
|
+
*/
|
|
12
|
+
export declare const deleteAndMoveCursor: Command;
|
|
@@ -2,3 +2,4 @@ export { cleanUpAtTheStartOfDocument, insertBlockType, insertBlockTypesWithAnaly
|
|
|
2
2
|
export type { InputMethod } from './block-type';
|
|
3
3
|
export { insertBlock } from './insert-block';
|
|
4
4
|
export { isConvertableToCodeBlock, transformToCodeBlockAction, } from './transform-to-code-block';
|
|
5
|
+
export { deleteAndMoveCursor } from './delete-and-move-cursor';
|
|
@@ -19,6 +19,7 @@ export interface DropdownButtonItemProps extends ButtonItemProps {
|
|
|
19
19
|
onMouseEnter?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
20
20
|
onMouseOver?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
21
21
|
onMouseLeave?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
22
|
+
onMouseOut?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
22
23
|
onFocus?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
23
24
|
onBlur?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
24
25
|
}
|
|
@@ -5,7 +5,6 @@ import { PaletteColor } from '../../../ui/ColorPalette/Palettes/type';
|
|
|
5
5
|
export { DEFAULT_COLOR } from '../utils/color';
|
|
6
6
|
export declare type TextColorPluginState = {
|
|
7
7
|
palette: Array<PaletteColor>;
|
|
8
|
-
paletteExpanded?: Array<PaletteColor>;
|
|
9
8
|
defaultColor: string;
|
|
10
9
|
disabled?: boolean;
|
|
11
10
|
color: string | null;
|
|
@@ -25,6 +24,7 @@ export declare type TextColorDefaultColor = {
|
|
|
25
24
|
};
|
|
26
25
|
export interface TextColorPluginConfig {
|
|
27
26
|
defaultColor?: TextColorDefaultColor;
|
|
27
|
+
/** @deprecated [ED-15849] Color selection palette now shows more colors by default. */
|
|
28
28
|
allowMoreTextColors?: boolean;
|
|
29
29
|
}
|
|
30
30
|
export declare function createInitialPluginState(editorState: EditorState, pluginConfig?: TextColorPluginConfig): TextColorPluginState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { textColorPalette
|
|
1
|
+
export { textColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
@@ -12,10 +12,11 @@ export declare const KeyDownHandlerContext: React.Context<KeyDownHandlerContext>
|
|
|
12
12
|
* @param
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
|
-
export declare const ToolbarArrowKeyNavigationProvider: ({ children, editorView, childComponentSelector, handleEscape, disableArrowKeyNavigation, }: {
|
|
15
|
+
export declare const ToolbarArrowKeyNavigationProvider: ({ children, editorView, childComponentSelector, handleEscape, disableArrowKeyNavigation, isShortcutToFocusToolbar, }: {
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
editorView?: EditorView<any> | undefined;
|
|
18
18
|
childComponentSelector: string;
|
|
19
19
|
handleEscape?: ((event: KeyboardEvent) => void) | undefined;
|
|
20
20
|
disableArrowKeyNavigation?: boolean | undefined;
|
|
21
|
+
isShortcutToFocusToolbar?: ((event: KeyboardEvent) => boolean) | undefined;
|
|
21
22
|
}) => JSX.Element;
|
|
@@ -7,6 +7,7 @@ import { FeatureFlags } from '../../types/feature-flags';
|
|
|
7
7
|
import { DispatchAnalyticsEvent } from '../../plugins/analytics/types';
|
|
8
8
|
declare type InstrumentedPluginOptions = EditorProps['performanceTracking'] & {
|
|
9
9
|
saferDispatchedTransactions?: FeatureFlags['saferDispatchedTransactions'];
|
|
10
|
+
saferDispatchedTransactionsAnalyticsOnly?: FeatureFlags['saferDispatchedTransactionsAnalyticsOnly'];
|
|
10
11
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
11
12
|
};
|
|
12
13
|
export declare class InstrumentedPlugin<PluginState, NodeSchema extends Schema<any, any>> extends SafePlugin<PluginState, NodeSchema> {
|
|
@@ -3,6 +3,7 @@ export declare const UNSAFE_PROPERTY_SET_ERROR = "Setting an unsafe property on
|
|
|
3
3
|
interface FreezeUnsafeTransactionOptions {
|
|
4
4
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
5
5
|
pluginKey?: string;
|
|
6
|
+
analyticsOnly?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare const freezeUnsafeTransactionProperties: <TrType extends object>({ dispatchAnalyticsEvent, pluginKey, }: FreezeUnsafeTransactionOptions) => ProxyHandler<TrType>;
|
|
8
|
+
export declare const freezeUnsafeTransactionProperties: <TrType extends object>({ dispatchAnalyticsEvent, pluginKey, analyticsOnly, }: FreezeUnsafeTransactionOptions) => ProxyHandler<TrType>;
|
|
8
9
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "178.0.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/activity": "^1.0.1",
|
|
28
28
|
"@atlaskit/activity-provider": "^2.3.0",
|
|
29
|
-
"@atlaskit/adf-schema": "^25.
|
|
29
|
+
"@atlaskit/adf-schema": "^25.1.0",
|
|
30
30
|
"@atlaskit/adf-utils": "^18.0.0",
|
|
31
31
|
"@atlaskit/analytics-gas-types": "^5.0.0",
|
|
32
32
|
"@atlaskit/analytics-listeners": "^8.3.0",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"@atlaskit/avatar": "^21.1.0",
|
|
37
37
|
"@atlaskit/avatar-group": "^9.2.0",
|
|
38
38
|
"@atlaskit/button": "^16.5.0",
|
|
39
|
-
"@atlaskit/calendar": "^
|
|
39
|
+
"@atlaskit/calendar": "^13.0.0",
|
|
40
40
|
"@atlaskit/checkbox": "^12.4.0",
|
|
41
41
|
"@atlaskit/code": "^14.4.0",
|
|
42
42
|
"@atlaskit/date": "^0.9.0",
|
|
43
43
|
"@atlaskit/datetime-picker": "^12.3.0",
|
|
44
|
-
"@atlaskit/editor-common": "^72.
|
|
44
|
+
"@atlaskit/editor-common": "^72.1.0",
|
|
45
45
|
"@atlaskit/editor-json-transformer": "^8.8.0",
|
|
46
46
|
"@atlaskit/editor-markdown-transformer": "^5.0.0",
|
|
47
47
|
"@atlaskit/editor-plugin-table": "^1.0.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/locale": "^2.3.0",
|
|
57
57
|
"@atlaskit/logo": "^13.10.0",
|
|
58
58
|
"@atlaskit/media-card": "^74.4.0",
|
|
59
|
-
"@atlaskit/media-client": "^
|
|
59
|
+
"@atlaskit/media-client": "^20.0.0",
|
|
60
60
|
"@atlaskit/media-common": "^2.18.0",
|
|
61
61
|
"@atlaskit/media-filmstrip": "^46.1.0",
|
|
62
62
|
"@atlaskit/media-picker": "^64.1.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/radio": "^5.4.0",
|
|
70
70
|
"@atlaskit/section-message": "^6.3.0",
|
|
71
71
|
"@atlaskit/select": "^16.1.0",
|
|
72
|
-
"@atlaskit/smart-card": "^23.
|
|
72
|
+
"@atlaskit/smart-card": "^23.12.0",
|
|
73
73
|
"@atlaskit/smart-user-picker": "^6.0.0",
|
|
74
74
|
"@atlaskit/spinner": "^15.3.0",
|
|
75
75
|
"@atlaskit/status": "^1.2.0",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"w3c-keyname": "^2.1.0"
|
|
127
127
|
},
|
|
128
128
|
"peerDependencies": {
|
|
129
|
-
"@atlaskit/link-provider": "^1.3.
|
|
129
|
+
"@atlaskit/link-provider": "^1.3.8",
|
|
130
130
|
"@atlaskit/media-core": "^34.0.1",
|
|
131
131
|
"react": "^16.8.0",
|
|
132
132
|
"react-dom": "^16.8.0",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"@atlaskit/atlassian-navigation": "^2.3.0",
|
|
137
137
|
"@atlaskit/breadcrumbs": "11.7.7",
|
|
138
138
|
"@atlaskit/code": "^14.4.0",
|
|
139
|
-
"@atlaskit/collab-provider": "8.0.
|
|
139
|
+
"@atlaskit/collab-provider": "8.0.1",
|
|
140
140
|
"@atlaskit/docs": "*",
|
|
141
141
|
"@atlaskit/drawer": "^7.4.0",
|
|
142
142
|
"@atlaskit/dropdown-menu": "^11.5.0",
|
|
@@ -155,8 +155,8 @@
|
|
|
155
155
|
"@atlaskit/media-test-helpers": "^30.1.0",
|
|
156
156
|
"@atlaskit/menu": "^1.4.0",
|
|
157
157
|
"@atlaskit/page-layout": "^1.3.0",
|
|
158
|
-
"@atlaskit/profilecard": "^18.
|
|
159
|
-
"@atlaskit/pubsub": "^6.
|
|
158
|
+
"@atlaskit/profilecard": "^18.2.0",
|
|
159
|
+
"@atlaskit/pubsub": "^6.2.0",
|
|
160
160
|
"@atlaskit/renderer": "^105.0.0",
|
|
161
161
|
"@atlaskit/section-message": "^6.3.0",
|
|
162
162
|
"@atlaskit/share": "*",
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"@atlaskit/webdriver-runner": "*",
|
|
171
171
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
172
172
|
"@atlassian/link-picker-atlassian-plugin": "^26.0.0",
|
|
173
|
-
"@atlassian/link-picker-plugins": "^14.
|
|
173
|
+
"@atlassian/link-picker-plugins": "^14.1.0",
|
|
174
174
|
"@atlassian/search-provider": "2.3.9",
|
|
175
175
|
"@atlassian/ufo": "^0.1.0",
|
|
176
176
|
"@emotion/jest": "^11.8.0",
|
|
@@ -204,7 +204,6 @@
|
|
|
204
204
|
"react-test-renderer": "^16.8.0",
|
|
205
205
|
"rison": "^0.1.1",
|
|
206
206
|
"sinon": "^2.2.0",
|
|
207
|
-
"styled-components": "^3.2.6",
|
|
208
207
|
"typescript": "4.5.5",
|
|
209
208
|
"url-search-params": "^0.10.0",
|
|
210
209
|
"worker-plugin": "^4.0.2"
|
package/report.api.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
### Table of contents
|
|
9
9
|
|
|
10
10
|
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
11
12
|
|
|
12
13
|
### Main Entry Types
|
|
13
14
|
|
|
@@ -2497,7 +2498,7 @@ type TextColorDefaultColor = {
|
|
|
2497
2498
|
|
|
2498
2499
|
// @public (undocumented)
|
|
2499
2500
|
interface TextColorPluginConfig {
|
|
2500
|
-
// (undocumented)
|
|
2501
|
+
// @deprecated (undocumented)
|
|
2501
2502
|
allowMoreTextColors?: boolean;
|
|
2502
2503
|
// (undocumented)
|
|
2503
2504
|
defaultColor?: TextColorDefaultColor;
|
|
@@ -2509,7 +2510,6 @@ export const textColorPluginKey: PluginKey<TextColorPluginState, any>;
|
|
|
2509
2510
|
// @public (undocumented)
|
|
2510
2511
|
export type TextColorPluginState = {
|
|
2511
2512
|
palette: Array<PaletteColor>;
|
|
2512
|
-
paletteExpanded?: Array<PaletteColor>;
|
|
2513
2513
|
defaultColor: string;
|
|
2514
2514
|
disabled?: boolean;
|
|
2515
2515
|
color: null | string;
|
|
@@ -2862,3 +2862,19 @@ export { WithPluginState };
|
|
|
2862
2862
|
```
|
|
2863
2863
|
|
|
2864
2864
|
<!--SECTION END: Main Entry Types-->
|
|
2865
|
+
|
|
2866
|
+
### Peer Dependencies
|
|
2867
|
+
|
|
2868
|
+
<!--SECTION START: Peer Dependencies-->
|
|
2869
|
+
|
|
2870
|
+
```json
|
|
2871
|
+
{
|
|
2872
|
+
"@atlaskit/link-provider": "^1.3.4",
|
|
2873
|
+
"@atlaskit/media-core": "^34.0.1",
|
|
2874
|
+
"react": "^16.8.0",
|
|
2875
|
+
"react-dom": "^16.8.0",
|
|
2876
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
2877
|
+
}
|
|
2878
|
+
```
|
|
2879
|
+
|
|
2880
|
+
<!--SECTION END: Peer Dependencies-->
|