@atlaskit/editor-core 187.22.1 → 187.23.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 +13 -0
- package/dist/cjs/plugins/date/pm-plugins/keymap.js +4 -8
- package/dist/cjs/plugins/expand/pm-plugins/keymap.js +7 -10
- package/dist/cjs/plugins/extension/pm-plugins/keymap.js +2 -5
- package/dist/cjs/plugins/help-dialog/ui/index.js +29 -29
- package/dist/cjs/plugins/indentation/pm-plugins/keymap.js +5 -8
- package/dist/cjs/plugins/list/pm-plugins/keymap.js +9 -12
- package/dist/cjs/plugins/media/pm-plugins/keymap-media-single.js +2 -5
- package/dist/cjs/plugins/media/toolbar/index.js +7 -2
- package/dist/cjs/plugins/rule/pm-plugins/keymap.js +4 -7
- package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-keymap.js +8 -11
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +12 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +12 -5
- package/dist/cjs/plugins/undo-redo/pm-plugins/keymaps.js +4 -8
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/date/pm-plugins/keymap.js +3 -4
- package/dist/es2019/plugins/expand/pm-plugins/keymap.js +7 -7
- package/dist/es2019/plugins/extension/pm-plugins/keymap.js +2 -2
- package/dist/es2019/plugins/help-dialog/ui/index.js +29 -29
- package/dist/es2019/plugins/indentation/pm-plugins/keymap.js +5 -5
- package/dist/es2019/plugins/list/pm-plugins/keymap.js +10 -11
- package/dist/es2019/plugins/media/pm-plugins/keymap-media-single.js +2 -2
- package/dist/es2019/plugins/media/toolbar/index.js +7 -2
- package/dist/es2019/plugins/rule/pm-plugins/keymap.js +4 -4
- package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-keymap.js +8 -8
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +10 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +15 -9
- package/dist/es2019/plugins/undo-redo/pm-plugins/keymaps.js +3 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/date/pm-plugins/keymap.js +3 -4
- package/dist/esm/plugins/expand/pm-plugins/keymap.js +7 -7
- package/dist/esm/plugins/extension/pm-plugins/keymap.js +2 -2
- package/dist/esm/plugins/help-dialog/ui/index.js +29 -29
- package/dist/esm/plugins/indentation/pm-plugins/keymap.js +5 -5
- package/dist/esm/plugins/list/pm-plugins/keymap.js +10 -11
- package/dist/esm/plugins/media/pm-plugins/keymap-media-single.js +2 -2
- package/dist/esm/plugins/media/toolbar/index.js +7 -2
- package/dist/esm/plugins/rule/pm-plugins/keymap.js +4 -4
- package/dist/esm/plugins/selection/pm-plugins/gap-cursor-keymap.js +8 -8
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +12 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +13 -6
- package/dist/esm/plugins/undo-redo/pm-plugins/keymaps.js +3 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/help-dialog/ui/index.d.ts +2 -2
- package/dist/types/plugins/list/pm-plugins/keymap.d.ts +1 -1
- package/dist/types-ts4.5/plugins/help-dialog/ui/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/list/pm-plugins/keymap.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useCallback, useMemo, useLayoutEffect } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
|
-
import { DN600, N200, N800, N30,
|
|
6
|
+
import { DN600, N200, N800, N30, B400 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { themed } from '@atlaskit/theme/components';
|
|
8
8
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
9
9
|
import { ButtonItem } from '@atlaskit/menu';
|
|
@@ -25,7 +25,7 @@ var itemText = function itemText(theme) {
|
|
|
25
25
|
})(theme), relativeFontSizeToBase16(12), "var(--ds-text-subtlest, ".concat(N200, ")"));
|
|
26
26
|
};
|
|
27
27
|
var itemAfter = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n"])));
|
|
28
|
-
var customRenderItemDivStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n overflow: hidden;\n &:
|
|
28
|
+
var customRenderItemDivStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n overflow: hidden;\n &:focus {\n box-shadow: inset 2px 0px 0px ", ";\n background-color: ", ";\n outline: none;\n }\n"])), "var(--ds-border-focused, ".concat(B400, ")"), "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")"));
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* This CSS emulates the desired behaviour with :focus-visible for firefox.
|
|
@@ -34,14 +34,19 @@ var customRenderItemDivStyle = css(_templateObject5 || (_templateObject5 = _tagg
|
|
|
34
34
|
*/
|
|
35
35
|
var selectionFrame = {
|
|
36
36
|
'& > button:focus': {
|
|
37
|
-
boxShadow: "inset
|
|
37
|
+
boxShadow: "inset 2px 0px 0px ".concat("var(--ds-border-focused, ".concat(B400, ")"), ";"),
|
|
38
|
+
backgroundColor: "".concat("var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")")),
|
|
38
39
|
outline: 'none',
|
|
39
40
|
'&:active': {
|
|
40
41
|
boxShadow: 'none'
|
|
41
42
|
}
|
|
43
|
+
},
|
|
44
|
+
'& > button:hover': {
|
|
45
|
+
backgroundColor: 'inherit',
|
|
46
|
+
outline: 'none'
|
|
42
47
|
}
|
|
43
48
|
};
|
|
44
|
-
var selectedStyle = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background-color: ", ";\n"])), "var(--ds-background-
|
|
49
|
+
var selectedStyle = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background-color: ", ";\n box-shadow: inset 2px 0px 0px ", ";\n"])), "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")"), "var(--ds-border-focused, ".concat(B400, ")"));
|
|
45
50
|
var FallbackIcon = /*#__PURE__*/React.memo(function (_ref) {
|
|
46
51
|
var label = _ref.label;
|
|
47
52
|
return jsx(IconFallback, null);
|
|
@@ -127,8 +132,9 @@ export var TypeAheadListItem = function TypeAheadListItem(_ref3) {
|
|
|
127
132
|
if (customItem) {
|
|
128
133
|
return customItem;
|
|
129
134
|
}
|
|
135
|
+
var listItemClasses = [selectionFrame, isSelected && selectedStyle];
|
|
130
136
|
return jsx("span", {
|
|
131
|
-
css:
|
|
137
|
+
css: listItemClasses
|
|
132
138
|
}, jsx(ButtonItem, {
|
|
133
139
|
onClick: insertSelectedItem,
|
|
134
140
|
iconBefore: elementIcon,
|
|
@@ -137,7 +143,8 @@ export var TypeAheadListItem = function TypeAheadListItem(_ref3) {
|
|
|
137
143
|
"aria-label": title,
|
|
138
144
|
"aria-setsize": itemsLength,
|
|
139
145
|
role: "option",
|
|
140
|
-
ref: buttonItemRef
|
|
146
|
+
ref: buttonItemRef,
|
|
147
|
+
css: listItemClasses
|
|
141
148
|
}, jsx("div", {
|
|
142
149
|
"aria-hidden": true
|
|
143
150
|
}, jsx("div", {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { keymap } from '@atlaskit/editor-common/keymaps';
|
|
1
|
+
import { undo, redo, keymap, bindKeymapWithCommand, findKeyMapForBrowser } from '@atlaskit/editor-common/keymaps';
|
|
3
2
|
import { redoFromKeyboard, undoFromKeyboard } from '../commands';
|
|
4
3
|
export function keymapPlugin() {
|
|
5
4
|
var list = {};
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
bindKeymapWithCommand(findKeyMapForBrowser(redo), redoFromKeyboard, list);
|
|
6
|
+
bindKeymapWithCommand(undo.common, undoFromKeyboard, list);
|
|
8
7
|
return keymap(list);
|
|
9
8
|
}
|
package/dist/esm/version.json
CHANGED
|
@@ -4,7 +4,7 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
5
5
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import
|
|
7
|
+
import type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
8
8
|
export interface Format {
|
|
9
9
|
name: string;
|
|
10
10
|
type: string;
|
|
@@ -14,7 +14,7 @@ export interface Format {
|
|
|
14
14
|
}
|
|
15
15
|
export declare const formatting: (intl: IntlShape) => Format[];
|
|
16
16
|
export declare const getSupportedFormatting: (schema: Schema, intl: IntlShape, imageEnabled?: boolean, quickInsertEnabled?: boolean) => Format[];
|
|
17
|
-
export declare const getComponentFromKeymap: (keymap:
|
|
17
|
+
export declare const getComponentFromKeymap: (keymap: Keymap) => jsx.JSX.Element;
|
|
18
18
|
export interface Props {
|
|
19
19
|
editorView: EditorView;
|
|
20
20
|
isVisible: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
4
|
export declare function keymapPlugin(featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
5
5
|
export default keymapPlugin;
|
|
@@ -4,7 +4,7 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
5
5
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import
|
|
7
|
+
import type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
8
8
|
export interface Format {
|
|
9
9
|
name: string;
|
|
10
10
|
type: string;
|
|
@@ -14,7 +14,7 @@ export interface Format {
|
|
|
14
14
|
}
|
|
15
15
|
export declare const formatting: (intl: IntlShape) => Format[];
|
|
16
16
|
export declare const getSupportedFormatting: (schema: Schema, intl: IntlShape, imageEnabled?: boolean, quickInsertEnabled?: boolean) => Format[];
|
|
17
|
-
export declare const getComponentFromKeymap: (keymap:
|
|
17
|
+
export declare const getComponentFromKeymap: (keymap: Keymap) => jsx.JSX.Element;
|
|
18
18
|
export interface Props {
|
|
19
19
|
editorView: EditorView;
|
|
20
20
|
isVisible: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
4
|
export declare function keymapPlugin(featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
5
5
|
export default keymapPlugin;
|