@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.
Files changed (51) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/plugins/date/pm-plugins/keymap.js +4 -8
  3. package/dist/cjs/plugins/expand/pm-plugins/keymap.js +7 -10
  4. package/dist/cjs/plugins/extension/pm-plugins/keymap.js +2 -5
  5. package/dist/cjs/plugins/help-dialog/ui/index.js +29 -29
  6. package/dist/cjs/plugins/indentation/pm-plugins/keymap.js +5 -8
  7. package/dist/cjs/plugins/list/pm-plugins/keymap.js +9 -12
  8. package/dist/cjs/plugins/media/pm-plugins/keymap-media-single.js +2 -5
  9. package/dist/cjs/plugins/media/toolbar/index.js +7 -2
  10. package/dist/cjs/plugins/rule/pm-plugins/keymap.js +4 -7
  11. package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-keymap.js +8 -11
  12. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +12 -1
  13. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +12 -5
  14. package/dist/cjs/plugins/undo-redo/pm-plugins/keymaps.js +4 -8
  15. package/dist/cjs/version-wrapper.js +1 -1
  16. package/dist/cjs/version.json +1 -1
  17. package/dist/es2019/plugins/date/pm-plugins/keymap.js +3 -4
  18. package/dist/es2019/plugins/expand/pm-plugins/keymap.js +7 -7
  19. package/dist/es2019/plugins/extension/pm-plugins/keymap.js +2 -2
  20. package/dist/es2019/plugins/help-dialog/ui/index.js +29 -29
  21. package/dist/es2019/plugins/indentation/pm-plugins/keymap.js +5 -5
  22. package/dist/es2019/plugins/list/pm-plugins/keymap.js +10 -11
  23. package/dist/es2019/plugins/media/pm-plugins/keymap-media-single.js +2 -2
  24. package/dist/es2019/plugins/media/toolbar/index.js +7 -2
  25. package/dist/es2019/plugins/rule/pm-plugins/keymap.js +4 -4
  26. package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-keymap.js +8 -8
  27. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +10 -1
  28. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +15 -9
  29. package/dist/es2019/plugins/undo-redo/pm-plugins/keymaps.js +3 -4
  30. package/dist/es2019/version-wrapper.js +1 -1
  31. package/dist/es2019/version.json +1 -1
  32. package/dist/esm/plugins/date/pm-plugins/keymap.js +3 -4
  33. package/dist/esm/plugins/expand/pm-plugins/keymap.js +7 -7
  34. package/dist/esm/plugins/extension/pm-plugins/keymap.js +2 -2
  35. package/dist/esm/plugins/help-dialog/ui/index.js +29 -29
  36. package/dist/esm/plugins/indentation/pm-plugins/keymap.js +5 -5
  37. package/dist/esm/plugins/list/pm-plugins/keymap.js +10 -11
  38. package/dist/esm/plugins/media/pm-plugins/keymap-media-single.js +2 -2
  39. package/dist/esm/plugins/media/toolbar/index.js +7 -2
  40. package/dist/esm/plugins/rule/pm-plugins/keymap.js +4 -4
  41. package/dist/esm/plugins/selection/pm-plugins/gap-cursor-keymap.js +8 -8
  42. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +12 -1
  43. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +13 -6
  44. package/dist/esm/plugins/undo-redo/pm-plugins/keymaps.js +3 -4
  45. package/dist/esm/version-wrapper.js +1 -1
  46. package/dist/esm/version.json +1 -1
  47. package/dist/types/plugins/help-dialog/ui/index.d.ts +2 -2
  48. package/dist/types/plugins/list/pm-plugins/keymap.d.ts +1 -1
  49. package/dist/types-ts4.5/plugins/help-dialog/ui/index.d.ts +2 -2
  50. package/dist/types-ts4.5/plugins/list/pm-plugins/keymap.d.ts +1 -1
  51. 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, B100 } from '@atlaskit/theme/colors';
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 &:hover {\n background-color: ", ";\n }\n &:focus {\n box-shadow: inset 0px 0px 0px 2px ", ";\n outline: none;\n }\n"])), "var(--ds-background-selected, ".concat(N30, ")"), "var(--ds-border-focused, ".concat(B100, ")"));
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 0px 0px 0px 2px ".concat("var(--ds-border-focused, ".concat(B100, ")")),
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-selected, ".concat(N30, ")"));
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: selectionFrame
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 * as keymaps from '../../../keymaps';
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
- keymaps.bindKeymapWithCommand(keymaps.findKeyMapForBrowser(keymaps.redo), redoFromKeyboard, list);
7
- keymaps.bindKeymapWithCommand(keymaps.undo.common, undoFromKeyboard, list);
5
+ bindKeymapWithCommand(findKeyMapForBrowser(redo), redoFromKeyboard, list);
6
+ bindKeymapWithCommand(undo.common, undoFromKeyboard, list);
8
7
  return keymap(list);
9
8
  }
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.22.1";
2
+ export var version = "187.23.1";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.22.1",
3
+ "version": "187.23.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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 * as keymaps from '../../../keymaps';
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: keymaps.Keymap) => jsx.JSX.Element;
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 * as keymaps from '../../../keymaps';
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: keymaps.Keymap) => jsx.JSX.Element;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.22.1",
3
+ "version": "187.23.1",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"