@atlaskit/editor-core 187.16.1 → 187.17.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 (69) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/create-editor/ReactEditorViewInternal.js +5 -1
  3. package/dist/cjs/plugins/base/index.js +0 -8
  4. package/dist/cjs/plugins/better-type-history/index.js +34 -0
  5. package/dist/cjs/plugins/{base/pm-plugins/better-type-history.js → better-type-history/pm-plugins/main.js} +4 -5
  6. package/dist/cjs/plugins/better-type-history/pm-plugins/plugin-key.js +9 -0
  7. package/dist/cjs/plugins/index.js +7 -0
  8. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +34 -42
  9. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
  10. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -14
  11. package/dist/cjs/plugins/paste/pm-plugins/main.js +7 -7
  12. package/dist/cjs/version-wrapper.js +1 -1
  13. package/dist/cjs/version.json +1 -1
  14. package/dist/es2019/create-editor/ReactEditorViewInternal.js +3 -1
  15. package/dist/es2019/plugins/base/index.js +0 -7
  16. package/dist/es2019/plugins/better-type-history/index.js +24 -0
  17. package/dist/es2019/plugins/{base/pm-plugins/better-type-history.js → better-type-history/pm-plugins/main.js} +1 -2
  18. package/dist/es2019/plugins/better-type-history/pm-plugins/plugin-key.js +2 -0
  19. package/dist/es2019/plugins/index.js +1 -0
  20. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -11
  21. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -2
  22. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +2 -14
  23. package/dist/es2019/plugins/paste/pm-plugins/main.js +7 -7
  24. package/dist/es2019/version-wrapper.js +1 -1
  25. package/dist/es2019/version.json +1 -1
  26. package/dist/esm/create-editor/ReactEditorViewInternal.js +5 -1
  27. package/dist/esm/plugins/base/index.js +0 -8
  28. package/dist/esm/plugins/better-type-history/index.js +26 -0
  29. package/dist/esm/plugins/{base/pm-plugins/better-type-history.js → better-type-history/pm-plugins/main.js} +1 -2
  30. package/dist/esm/plugins/better-type-history/pm-plugins/plugin-key.js +2 -0
  31. package/dist/esm/plugins/index.js +1 -0
  32. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +34 -42
  33. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +2 -2
  34. package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -13
  35. package/dist/esm/plugins/paste/pm-plugins/main.js +7 -7
  36. package/dist/esm/version-wrapper.js +1 -1
  37. package/dist/esm/version.json +1 -1
  38. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +1 -0
  39. package/dist/types/plugins/better-type-history/index.d.ts +13 -0
  40. package/dist/types/plugins/{base/pm-plugins/better-type-history.d.ts → better-type-history/pm-plugins/main.d.ts} +0 -2
  41. package/dist/types/plugins/better-type-history/pm-plugins/plugin-key.d.ts +2 -0
  42. package/dist/types/plugins/index.d.ts +1 -0
  43. package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +2 -7
  44. package/dist/types/plugins/paste/index.d.ts +4 -2
  45. package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +1 -0
  46. package/dist/types-ts4.5/plugins/better-type-history/index.d.ts +13 -0
  47. package/dist/types-ts4.5/plugins/{base/pm-plugins/better-type-history.d.ts → better-type-history/pm-plugins/main.d.ts} +0 -2
  48. package/dist/types-ts4.5/plugins/better-type-history/pm-plugins/plugin-key.d.ts +2 -0
  49. package/dist/types-ts4.5/plugins/index.d.ts +1 -0
  50. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +2 -7
  51. package/dist/types-ts4.5/plugins/paste/index.d.ts +4 -2
  52. package/package.json +4 -4
  53. package/report.api.md +3 -1
  54. package/tmp/api-report-tmp.d.ts +3 -1
  55. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +0 -15
  56. package/dist/cjs/ui/Resizer/ResizeLabel/index.js +0 -20
  57. package/dist/cjs/ui/Resizer/ResizeLabel/styles.js +0 -17
  58. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +0 -8
  59. package/dist/es2019/ui/Resizer/ResizeLabel/index.js +0 -12
  60. package/dist/es2019/ui/Resizer/ResizeLabel/styles.js +0 -25
  61. package/dist/esm/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +0 -8
  62. package/dist/esm/ui/Resizer/ResizeLabel/index.js +0 -12
  63. package/dist/esm/ui/Resizer/ResizeLabel/styles.js +0 -7
  64. package/dist/types/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.d.ts +0 -7
  65. package/dist/types/ui/Resizer/ResizeLabel/index.d.ts +0 -8
  66. package/dist/types/ui/Resizer/ResizeLabel/styles.d.ts +0 -3
  67. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.d.ts +0 -7
  68. package/dist/types-ts4.5/ui/Resizer/ResizeLabel/index.d.ts +0 -8
  69. package/dist/types-ts4.5/ui/Resizer/ResizeLabel/styles.d.ts +0 -3
@@ -2,6 +2,7 @@ export { default as basePlugin } from './base';
2
2
  export { default as blockTypePlugin } from './block-type';
3
3
  export { pluginKey as blockPluginStateKey } from './block-type';
4
4
  export type { BlockTypeState } from './block-type';
5
+ export { default as betterTypeHistoryPlugin } from './better-type-history';
5
6
  export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-marks-on-change-to-empty-document';
6
7
  export { default as codeBlockPlugin } from './code-block';
7
8
  export { default as collabEditPlugin } from './collab-edit';
@@ -6,7 +6,6 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
6
6
  import type { MediaClientConfig } from '@atlaskit/media-core';
7
7
  import type { Props } from './types';
8
8
  import type { Dimensions, HandleResize, HandleResizeStart, Position, Snap } from '@atlaskit/editor-common/resizer';
9
- import type { WrappedComponentProps } from 'react-intl-next';
10
9
  import type { GuidelineConfig, GuidelineSnapsReference } from '@atlaskit/editor-common/guideline';
11
10
  type State = {
12
11
  offsetLeft: number;
@@ -17,7 +16,7 @@ type State = {
17
16
  snaps: Snap;
18
17
  };
19
18
  export declare const resizerNextTestId = "mediaSingle.resizerNext.testid";
20
- type ResizableMediaSingleNextProps = Props & WrappedComponentProps;
19
+ type ResizableMediaSingleNextProps = Props;
21
20
  declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSingleNextProps, State> {
22
21
  private guidelines;
23
22
  constructor(props: ResizableMediaSingleNextProps);
@@ -72,8 +71,4 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
72
71
  handleResizeStop: HandleResize;
73
72
  render(): jsx.JSX.Element;
74
73
  }
75
- export { ResizableMediaSingleNext as UnwrappedResizableMediaSingleNext };
76
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<ResizableMediaSingleNextProps>> & {
77
- WrappedComponent: React.ComponentType<ResizableMediaSingleNextProps>;
78
- };
79
- export default _default;
74
+ export default ResizableMediaSingleNext;
@@ -1,7 +1,8 @@
1
- import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import { CardOptions } from '@atlaskit/editor-common/card';
1
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { CardOptions } from '@atlaskit/editor-common/card';
3
3
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { cardPlugin } from '@atlaskit/editor-plugin-card';
5
+ import type betterTypeHistoryPlugin from '../better-type-history';
5
6
  export type PastePluginOptions = {
6
7
  cardOptions?: CardOptions;
7
8
  sanitizePrivateContent?: boolean;
@@ -10,6 +11,7 @@ declare const pastePlugin: NextEditorPlugin<'paste', {
10
11
  pluginConfiguration: PastePluginOptions;
11
12
  dependencies: [
12
13
  typeof featureFlagsPlugin,
14
+ typeof betterTypeHistoryPlugin,
13
15
  OptionalPlugin<typeof cardPlugin>
14
16
  ];
15
17
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.16.1",
3
+ "version": "187.17.1",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/code": "^14.6.0",
56
56
  "@atlaskit/date": "^0.10.0",
57
57
  "@atlaskit/datetime-picker": "^12.7.0",
58
- "@atlaskit/editor-common": "^74.41.0",
58
+ "@atlaskit/editor-common": "^74.42.0",
59
59
  "@atlaskit/editor-json-transformer": "^8.10.0",
60
60
  "@atlaskit/editor-markdown-transformer": "^5.2.5",
61
61
  "@atlaskit/editor-palette": "1.5.1",
@@ -70,7 +70,7 @@
70
70
  "@atlaskit/editor-plugin-grid": "^0.1.0",
71
71
  "@atlaskit/editor-plugin-guideline": "^0.3.4",
72
72
  "@atlaskit/editor-plugin-hyperlink": "^0.3.0",
73
- "@atlaskit/editor-plugin-table": "^2.7.0",
73
+ "@atlaskit/editor-plugin-table": "^2.8.0",
74
74
  "@atlaskit/editor-plugin-width": "^0.1.0",
75
75
  "@atlaskit/editor-prosemirror": "1.0.2",
76
76
  "@atlaskit/editor-shared-styles": "^2.6.0",
@@ -143,7 +143,7 @@
143
143
  "@atlaskit/collab-provider": "9.9.0",
144
144
  "@atlaskit/dropdown-menu": "^11.11.0",
145
145
  "@atlaskit/editor-extension-dropbox": "^0.4.0",
146
- "@atlaskit/editor-plugin-table": "^2.7.0",
146
+ "@atlaskit/editor-plugin-table": "^2.8.0",
147
147
  "@atlaskit/editor-test-helpers": "^18.10.0",
148
148
  "@atlaskit/flag": "^15.2.0",
149
149
  "@atlaskit/icon-object": "^6.3.0",
package/report.api.md CHANGED
@@ -30,7 +30,7 @@ import type { AnalyticsEventPayload as AnalyticsEventPayload_2 } from '@atlaskit
30
30
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
31
31
  import { AnnotationTypes } from '@atlaskit/adf-schema';
32
32
  import { BrowserFreezetracking } from '@atlaskit/editor-common/types';
33
- import { CardOptions } from '@atlaskit/editor-common/card';
33
+ import type { CardOptions } from '@atlaskit/editor-common/card';
34
34
  import { CardProvider } from '@atlaskit/editor-common/provider-factory';
35
35
  import { clearEditorContent } from '@atlaskit/editor-common/commands';
36
36
  import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
@@ -1856,6 +1856,8 @@ class ReactEditorView_2<T = {}> extends React_2.Component<
1856
1856
  // (undocumented)
1857
1857
  getEditorState: () => EditorState | undefined;
1858
1858
  // (undocumented)
1859
+ getEditorView: () => EditorView | undefined;
1860
+ // (undocumented)
1859
1861
  getPlugins(
1860
1862
  preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>,
1861
1863
  ): EditorPlugin[];
@@ -19,7 +19,7 @@ import type { AnalyticsEventPayload as AnalyticsEventPayload_2 } from '@atlaskit
19
19
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
20
20
  import { AnnotationTypes } from '@atlaskit/adf-schema';
21
21
  import { BrowserFreezetracking } from '@atlaskit/editor-common/types';
22
- import { CardOptions } from '@atlaskit/editor-common/card';
22
+ import type { CardOptions } from '@atlaskit/editor-common/card';
23
23
  import { CardProvider } from '@atlaskit/editor-common/provider-factory';
24
24
  import { clearEditorContent } from '@atlaskit/editor-common/commands';
25
25
  import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
@@ -1650,6 +1650,8 @@ class ReactEditorView_2<T = {}> extends React_2.Component<EditorViewProps & Wrap
1650
1650
  // (undocumented)
1651
1651
  getEditorState: () => EditorState | undefined;
1652
1652
  // (undocumented)
1653
+ getEditorView: () => EditorView | undefined;
1654
+ // (undocumented)
1653
1655
  getPlugins(preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>): EditorPlugin[];
1654
1656
  // (undocumented)
1655
1657
  handleAnalyticsEvent: FireAnalyticsCallback;
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.messages = void 0;
7
- var _reactIntlNext = require("react-intl-next");
8
- var messages = (0, _reactIntlNext.defineMessages)({
9
- fullWidthImage: {
10
- id: 'fabric.editor.image.fullWidthImage',
11
- defaultMessage: 'Full width image',
12
- description: 'The image has reached its full width'
13
- }
14
- });
15
- exports.messages = messages;
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = require("@emotion/react");
8
- var _styles = require("./styles");
9
- /** @jsx jsx */
10
-
11
- var ResizeLabelBreakoutWidth = 110;
12
- var ResizeLabel = function ResizeLabel(props) {
13
- return (0, _react.jsx)("div", {
14
- css: _styles.wrapper
15
- }, (0, _react.jsx)("span", {
16
- css: [_styles.text, props.containerWidth < ResizeLabelBreakoutWidth && _styles.smallText]
17
- }, props.label));
18
- };
19
- var _default = ResizeLabel;
20
- exports.default = _default;
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.wrapper = exports.text = exports.smallText = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
- var _react = require("@emotion/react");
10
- var _colors = require("@atlaskit/theme/colors");
11
- var _templateObject, _templateObject2, _templateObject3;
12
- var wrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", ";\n width: 100%;\n text-align: center;\n position: absolute;\n transform: translateY(-125%);\n top: 0;\n"])), "var(--ds-font-size-100, 14px)");
13
- exports.wrapper = wrapper;
14
- var text = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n border-radius: 6px;\n min-width: 75px;\n background-color: ", ";\n color: ", ";\n padding: ", " ", ";\n letter-spacing: 0.5px;\n"])), "var(--ds-text-accent-blue, ".concat(_colors.B300, ")"), "var(--ds-text-inverse, white)", "var(--ds-space-050, 4px)", "var(--ds-space-200, 16px)");
15
- exports.text = text;
16
- var smallText = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n letter-spacing: -0.5px;\n font-size: ", ";\n min-width: 27px;\n padding: ", " ", ";\n"])), "var(--ds-font-size-050, 8px)", "var(--ds-space-0, 0px)", "var(--ds-space-025, 2px)");
17
- exports.smallText = smallText;
@@ -1,8 +0,0 @@
1
- import { defineMessages } from 'react-intl-next';
2
- export const messages = defineMessages({
3
- fullWidthImage: {
4
- id: 'fabric.editor.image.fullWidthImage',
5
- defaultMessage: 'Full width image',
6
- description: 'The image has reached its full width'
7
- }
8
- });
@@ -1,12 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import { wrapper, text, smallText } from './styles';
4
- const ResizeLabelBreakoutWidth = 110;
5
- const ResizeLabel = props => {
6
- return jsx("div", {
7
- css: wrapper
8
- }, jsx("span", {
9
- css: [text, props.containerWidth < ResizeLabelBreakoutWidth && smallText]
10
- }, props.label));
11
- };
12
- export default ResizeLabel;
@@ -1,25 +0,0 @@
1
- import { css } from '@emotion/react';
2
- import { B300 } from '@atlaskit/theme/colors';
3
- export const wrapper = css`
4
- font-size: ${"var(--ds-font-size-100, 14px)"};
5
- width: 100%;
6
- text-align: center;
7
- position: absolute;
8
- transform: translateY(-125%);
9
- top: 0;
10
- `;
11
- export const text = css`
12
- display: inline-block;
13
- border-radius: 6px;
14
- min-width: 75px;
15
- background-color: ${`var(--ds-text-accent-blue, ${B300})`};
16
- color: ${"var(--ds-text-inverse, white)"};
17
- padding: ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-200, 16px)"};
18
- letter-spacing: 0.5px;
19
- `;
20
- export const smallText = css`
21
- letter-spacing: -0.5px;
22
- font-size: ${"var(--ds-font-size-050, 8px)"};
23
- min-width: 27px;
24
- padding: ${"var(--ds-space-0, 0px)"} ${"var(--ds-space-025, 2px)"};
25
- `;
@@ -1,8 +0,0 @@
1
- import { defineMessages } from 'react-intl-next';
2
- export var messages = defineMessages({
3
- fullWidthImage: {
4
- id: 'fabric.editor.image.fullWidthImage',
5
- defaultMessage: 'Full width image',
6
- description: 'The image has reached its full width'
7
- }
8
- });
@@ -1,12 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import { wrapper, text, smallText } from './styles';
4
- var ResizeLabelBreakoutWidth = 110;
5
- var ResizeLabel = function ResizeLabel(props) {
6
- return jsx("div", {
7
- css: wrapper
8
- }, jsx("span", {
9
- css: [text, props.containerWidth < ResizeLabelBreakoutWidth && smallText]
10
- }, props.label));
11
- };
12
- export default ResizeLabel;
@@ -1,7 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3;
3
- import { css } from '@emotion/react';
4
- import { B300 } from '@atlaskit/theme/colors';
5
- export var wrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: ", ";\n width: 100%;\n text-align: center;\n position: absolute;\n transform: translateY(-125%);\n top: 0;\n"])), "var(--ds-font-size-100, 14px)");
6
- export var text = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n border-radius: 6px;\n min-width: 75px;\n background-color: ", ";\n color: ", ";\n padding: ", " ", ";\n letter-spacing: 0.5px;\n"])), "var(--ds-text-accent-blue, ".concat(B300, ")"), "var(--ds-text-inverse, white)", "var(--ds-space-050, 4px)", "var(--ds-space-200, 16px)");
7
- export var smallText = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n letter-spacing: -0.5px;\n font-size: ", ";\n min-width: 27px;\n padding: ", " ", ";\n"])), "var(--ds-font-size-050, 8px)", "var(--ds-space-0, 0px)", "var(--ds-space-025, 2px)");
@@ -1,7 +0,0 @@
1
- export declare const messages: {
2
- fullWidthImage: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- };
@@ -1,8 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- interface Props {
4
- label: string;
5
- containerWidth: number;
6
- }
7
- declare const ResizeLabel: (props: Props) => jsx.JSX.Element;
8
- export default ResizeLabel;
@@ -1,3 +0,0 @@
1
- export declare const wrapper: import("@emotion/react").SerializedStyles;
2
- export declare const text: import("@emotion/react").SerializedStyles;
3
- export declare const smallText: import("@emotion/react").SerializedStyles;
@@ -1,7 +0,0 @@
1
- export declare const messages: {
2
- fullWidthImage: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- };
@@ -1,8 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- interface Props {
4
- label: string;
5
- containerWidth: number;
6
- }
7
- declare const ResizeLabel: (props: Props) => jsx.JSX.Element;
8
- export default ResizeLabel;
@@ -1,3 +0,0 @@
1
- export declare const wrapper: import("@emotion/react").SerializedStyles;
2
- export declare const text: import("@emotion/react").SerializedStyles;
3
- export declare const smallText: import("@emotion/react").SerializedStyles;