@atlaskit/editor-core 186.0.0 → 187.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 +19 -0
- package/dist/cjs/labs-next.js +0 -65
- package/dist/cjs/plugins/expand/commands.js +2 -0
- package/dist/cjs/plugins/expand/index.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/labs-next.js +0 -4
- package/dist/es2019/plugins/expand/commands.js +2 -0
- package/dist/es2019/plugins/expand/index.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/labs-next.js +0 -4
- package/dist/esm/plugins/expand/commands.js +2 -0
- package/dist/esm/plugins/expand/index.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/labs/next/presets/default.d.ts +2 -3
- package/dist/types/labs-next.d.ts +0 -7
- package/dist/types/plugins/expand/commands.d.ts +3 -3
- package/dist/types/plugins/expand/index.d.ts +2 -2
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +2 -3
- package/dist/types-ts4.5/labs-next.d.ts +0 -7
- package/dist/types-ts4.5/plugins/expand/commands.d.ts +3 -3
- package/dist/types-ts4.5/plugins/expand/index.d.ts +2 -2
- package/package.json +5 -5
- package/report.api.md +2 -26
- package/dist/cjs/labs/next/ContentComponents.js +0 -43
- package/dist/cjs/labs/next/Editor.js +0 -76
- package/dist/cjs/labs/next/Toolbar.js +0 -39
- package/dist/cjs/labs/next/full-page.js +0 -127
- package/dist/cjs/labs/next/internal/components/EditorContent.js +0 -25
- package/dist/cjs/labs/next/internal/components/EditorInternal.js +0 -81
- package/dist/cjs/labs/next/internal/context/preset-context.js +0 -15
- package/dist/cjs/labs/next/internal/context/shared-config.js +0 -77
- package/dist/cjs/labs/next/internal/editor-props-type.js +0 -5
- package/dist/cjs/labs/next/internal/hooks/use-analytics/index.js +0 -41
- package/dist/cjs/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +0 -62
- package/dist/cjs/labs/next/internal/hooks/use-editor/create-editor.js +0 -94
- package/dist/cjs/labs/next/internal/hooks/use-editor/index.js +0 -193
- package/dist/cjs/labs/next/mobile.js +0 -37
- package/dist/cjs/labs/next/presets/cxhtml.js +0 -117
- package/dist/cjs/labs/next/presets/mobile.js +0 -130
- package/dist/cjs/labs/next/presets/utils.js +0 -30
- package/dist/es2019/labs/next/ContentComponents.js +0 -38
- package/dist/es2019/labs/next/Editor.js +0 -46
- package/dist/es2019/labs/next/Toolbar.js +0 -34
- package/dist/es2019/labs/next/full-page.js +0 -192
- package/dist/es2019/labs/next/internal/components/EditorContent.js +0 -17
- package/dist/es2019/labs/next/internal/components/EditorInternal.js +0 -66
- package/dist/es2019/labs/next/internal/context/preset-context.js +0 -5
- package/dist/es2019/labs/next/internal/context/shared-config.js +0 -34
- package/dist/es2019/labs/next/internal/editor-props-type.js +0 -1
- package/dist/es2019/labs/next/internal/hooks/use-analytics/index.js +0 -32
- package/dist/es2019/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +0 -51
- package/dist/es2019/labs/next/internal/hooks/use-editor/create-editor.js +0 -85
- package/dist/es2019/labs/next/internal/hooks/use-editor/index.js +0 -179
- package/dist/es2019/labs/next/mobile.js +0 -27
- package/dist/es2019/labs/next/presets/cxhtml.js +0 -106
- package/dist/es2019/labs/next/presets/mobile.js +0 -118
- package/dist/es2019/labs/next/presets/utils.js +0 -22
- package/dist/esm/labs/next/ContentComponents.js +0 -36
- package/dist/esm/labs/next/Editor.js +0 -48
- package/dist/esm/labs/next/Toolbar.js +0 -32
- package/dist/esm/labs/next/full-page.js +0 -121
- package/dist/esm/labs/next/internal/components/EditorContent.js +0 -17
- package/dist/esm/labs/next/internal/components/EditorInternal.js +0 -73
- package/dist/esm/labs/next/internal/context/preset-context.js +0 -7
- package/dist/esm/labs/next/internal/context/shared-config.js +0 -68
- package/dist/esm/labs/next/internal/editor-props-type.js +0 -1
- package/dist/esm/labs/next/internal/hooks/use-analytics/index.js +0 -34
- package/dist/esm/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +0 -55
- package/dist/esm/labs/next/internal/hooks/use-editor/create-editor.js +0 -88
- package/dist/esm/labs/next/internal/hooks/use-editor/index.js +0 -185
- package/dist/esm/labs/next/mobile.js +0 -25
- package/dist/esm/labs/next/presets/cxhtml.js +0 -108
- package/dist/esm/labs/next/presets/mobile.js +0 -120
- package/dist/esm/labs/next/presets/utils.js +0 -23
- package/dist/types/labs/next/ContentComponents.d.ts +0 -8
- package/dist/types/labs/next/Editor.d.ts +0 -27
- package/dist/types/labs/next/Toolbar.d.ts +0 -6
- package/dist/types/labs/next/full-page.d.ts +0 -9
- package/dist/types/labs/next/internal/components/EditorContent.d.ts +0 -7
- package/dist/types/labs/next/internal/components/EditorInternal.d.ts +0 -9
- package/dist/types/labs/next/internal/context/preset-context.d.ts +0 -5
- package/dist/types/labs/next/internal/context/shared-config.d.ts +0 -50
- package/dist/types/labs/next/internal/editor-props-type.d.ts +0 -29
- package/dist/types/labs/next/internal/hooks/use-analytics/index.d.ts +0 -8
- package/dist/types/labs/next/internal/hooks/use-editor/create-dispatch-transaction.d.ts +0 -6
- package/dist/types/labs/next/internal/hooks/use-editor/create-editor.d.ts +0 -19
- package/dist/types/labs/next/internal/hooks/use-editor/index.d.ts +0 -11
- package/dist/types/labs/next/mobile.d.ts +0 -12
- package/dist/types/labs/next/presets/cxhtml.d.ts +0 -338
- package/dist/types/labs/next/presets/mobile.d.ts +0 -343
- package/dist/types/labs/next/presets/utils.d.ts +0 -3
- package/dist/types-ts4.5/labs/next/ContentComponents.d.ts +0 -8
- package/dist/types-ts4.5/labs/next/Editor.d.ts +0 -27
- package/dist/types-ts4.5/labs/next/Toolbar.d.ts +0 -6
- package/dist/types-ts4.5/labs/next/full-page.d.ts +0 -9
- package/dist/types-ts4.5/labs/next/internal/components/EditorContent.d.ts +0 -7
- package/dist/types-ts4.5/labs/next/internal/components/EditorInternal.d.ts +0 -9
- package/dist/types-ts4.5/labs/next/internal/context/preset-context.d.ts +0 -5
- package/dist/types-ts4.5/labs/next/internal/context/shared-config.d.ts +0 -50
- package/dist/types-ts4.5/labs/next/internal/editor-props-type.d.ts +0 -29
- package/dist/types-ts4.5/labs/next/internal/hooks/use-analytics/index.d.ts +0 -8
- package/dist/types-ts4.5/labs/next/internal/hooks/use-editor/create-dispatch-transaction.d.ts +0 -6
- package/dist/types-ts4.5/labs/next/internal/hooks/use-editor/create-editor.d.ts +0 -19
- package/dist/types-ts4.5/labs/next/internal/hooks/use-editor/index.d.ts +0 -14
- package/dist/types-ts4.5/labs/next/mobile.d.ts +0 -12
- package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +0 -414
- package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +0 -419
- package/dist/types-ts4.5/labs/next/presets/utils.d.ts +0 -3
- package/tmp/api-report-tmp.d.ts +0 -2278
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`304c002d875`](https://bitbucket.org/atlassian/atlassian-frontend/commits/304c002d875) - Removing `Editor` from `labs-next` entry point. This `Editor` was experimental and is not maintained any longer.
|
|
8
|
+
|
|
9
|
+
You should use the existing `Editor` from `editor-core`:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
import { Editor } from '@atlaskit/editor-core';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 186.0.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`38dc2298bf5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/38dc2298bf5) - fix issue where wrong expand node type was being inserted into tables
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 186.0.0
|
|
4
23
|
|
|
5
24
|
### Major Changes
|
package/dist/cjs/labs-next.js
CHANGED
|
@@ -1,77 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
Object.defineProperty(exports, "Editor", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _Editor.Editor;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "EditorContent", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function get() {
|
|
16
|
-
return _Editor.EditorContent;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "EditorContext", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function get() {
|
|
22
|
-
return _EditorContext.default;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, "EditorPresetMobile", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function get() {
|
|
28
|
-
return _mobile2.EditorPresetMobile;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(exports, "EditorSharedConfigConsumer", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function get() {
|
|
34
|
-
return _Editor.EditorSharedConfigConsumer;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(exports, "Mobile", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function get() {
|
|
40
|
-
return _mobile.Mobile;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(exports, "MobileEditor", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function get() {
|
|
46
|
-
return _mobile.MobileEditor;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(exports, "PresetProvider", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
get: function get() {
|
|
52
|
-
return _Editor.PresetProvider;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
6
|
Object.defineProperty(exports, "createDefaultPreset", {
|
|
56
7
|
enumerable: true,
|
|
57
8
|
get: function get() {
|
|
58
9
|
return _default.createDefaultPreset;
|
|
59
10
|
}
|
|
60
11
|
});
|
|
61
|
-
Object.defineProperty(exports, "useEditorSharedConfig", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function get() {
|
|
64
|
-
return _Editor.useEditorSharedConfig;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(exports, "useMobilePreset", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
get: function get() {
|
|
70
|
-
return _mobile2.useMobilePreset;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
var _mobile = require("./labs/next/mobile");
|
|
74
|
-
var _mobile2 = require("./labs/next/presets/mobile");
|
|
75
|
-
var _Editor = require("./labs/next/Editor");
|
|
76
|
-
var _EditorContext = _interopRequireDefault(require("./ui/EditorContext"));
|
|
77
12
|
var _default = require("./labs/next/presets/default");
|
|
@@ -107,6 +107,8 @@ var toggleExpandExpanded = function toggleExpandExpanded(pos, nodeType) {
|
|
|
107
107
|
return true;
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
|
+
|
|
111
|
+
// Creates either an expand or a nestedExpand node based on the current selection
|
|
110
112
|
exports.toggleExpandExpanded = toggleExpandExpanded;
|
|
111
113
|
var createExpandNode = function createExpandNode(state) {
|
|
112
114
|
var _state$schema$nodes = state.schema.nodes,
|
|
@@ -76,7 +76,7 @@ var expandPlugin = function expandPlugin() {
|
|
|
76
76
|
}
|
|
77
77
|
var tr = (0, _blockType.createWrapSelectionTransaction)({
|
|
78
78
|
state: state,
|
|
79
|
-
type:
|
|
79
|
+
type: node.type
|
|
80
80
|
});
|
|
81
81
|
return (0, _analytics.addAnalytics)(state, tr, {
|
|
82
82
|
action: _analytics.ACTION.INSERTED,
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "
|
|
9
|
+
var version = "187.0.0";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/labs-next.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export { Mobile, MobileEditor } from './labs/next/mobile';
|
|
2
|
-
export { EditorPresetMobile, useMobilePreset } from './labs/next/presets/mobile';
|
|
3
|
-
export { Editor, EditorContent, EditorSharedConfigConsumer, PresetProvider, useEditorSharedConfig } from './labs/next/Editor';
|
|
4
|
-
export { default as EditorContext } from './ui/EditorContext';
|
|
5
1
|
export { createDefaultPreset } from './labs/next/presets/default';
|
|
@@ -87,6 +87,8 @@ export const toggleExpandExpanded = (pos, nodeType) => (state, dispatch) => {
|
|
|
87
87
|
}
|
|
88
88
|
return true;
|
|
89
89
|
};
|
|
90
|
+
|
|
91
|
+
// Creates either an expand or a nestedExpand node based on the current selection
|
|
90
92
|
export const createExpandNode = state => {
|
|
91
93
|
const {
|
|
92
94
|
expand,
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/labs-next.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export { Mobile, MobileEditor } from './labs/next/mobile';
|
|
2
|
-
export { EditorPresetMobile, useMobilePreset } from './labs/next/presets/mobile';
|
|
3
|
-
export { Editor, EditorContent, EditorSharedConfigConsumer, PresetProvider, useEditorSharedConfig } from './labs/next/Editor';
|
|
4
|
-
export { default as EditorContext } from './ui/EditorContext';
|
|
5
1
|
export { createDefaultPreset } from './labs/next/presets/default';
|
|
@@ -96,6 +96,8 @@ export var toggleExpandExpanded = function toggleExpandExpanded(pos, nodeType) {
|
|
|
96
96
|
return true;
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
|
+
|
|
100
|
+
// Creates either an expand or a nestedExpand node based on the current selection
|
|
99
101
|
export var createExpandNode = function createExpandNode(state) {
|
|
100
102
|
var _state$schema$nodes = state.schema.nodes,
|
|
101
103
|
expand = _state$schema$nodes.expand,
|
package/dist/esm/version.json
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
4
|
import { PastePluginOptions } from '../../../plugins/paste';
|
|
5
5
|
import { BasePluginOptions } from '../../../plugins/base';
|
|
6
|
-
import { EditorProps } from '
|
|
7
|
-
import { EditorProps as AllEditorProps } from '../../../types/editor-props';
|
|
6
|
+
import { EditorProps } from '../../../types/editor-props';
|
|
8
7
|
import { EditorPresetProps } from './types';
|
|
9
8
|
import { BlockTypePluginOptions } from '../../../plugins/block-type/types';
|
|
10
9
|
import { PlaceholderPluginOptions } from '../../../plugins/placeholder';
|
|
@@ -33,7 +32,7 @@ export type DefaultPresetPluginOptions = {
|
|
|
33
32
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
34
33
|
typeAhead?: TypeAheadPluginOptions;
|
|
35
34
|
allowAnalyticsGASV3?: boolean;
|
|
36
|
-
performanceTracking?:
|
|
35
|
+
performanceTracking?: EditorProps['performanceTracking'];
|
|
37
36
|
};
|
|
38
37
|
/**
|
|
39
38
|
* Note: The order that presets are added determines
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export { Mobile, MobileEditor } from './labs/next/mobile';
|
|
2
|
-
export type { MobileEditorProps } from './labs/next/mobile';
|
|
3
|
-
export { EditorPresetMobile, useMobilePreset, } from './labs/next/presets/mobile';
|
|
4
|
-
export type { MobilePresetProps } from './labs/next/presets/mobile';
|
|
5
|
-
export { Editor, EditorContent, EditorSharedConfigConsumer, PresetProvider, useEditorSharedConfig, } from './labs/next/Editor';
|
|
6
|
-
export type { EditorProps, EditorSharedConfig } from './labs/next/Editor';
|
|
7
|
-
export { default as EditorContext } from './ui/EditorContext';
|
|
8
1
|
export { createDefaultPreset } from './labs/next/presets/default';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
2
|
-
import { Node as PMNode, NodeType } from 'prosemirror-model';
|
|
3
|
-
import { Command } from '../../types';
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
|
+
import type { Node as PMNode, NodeType } from 'prosemirror-model';
|
|
3
|
+
import type { Command } from '../../types';
|
|
4
4
|
export declare const setExpandRef: (ref?: HTMLDivElement | null) => Command;
|
|
5
5
|
export declare const deleteExpandAtPos: (expandNodePos: number, expandNode: PMNode) => Command;
|
|
6
6
|
export declare const deleteExpand: () => Command;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NextEditorPlugin, EditorProps } from '../../types';
|
|
2
|
-
import { LongPressSelectionPluginOptions } from '../selection/types';
|
|
1
|
+
import type { NextEditorPlugin, EditorProps } from '../../types';
|
|
2
|
+
import type { LongPressSelectionPluginOptions } from '../selection/types';
|
|
3
3
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
5
5
|
interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
4
|
import { PastePluginOptions } from '../../../plugins/paste';
|
|
5
5
|
import { BasePluginOptions } from '../../../plugins/base';
|
|
6
|
-
import { EditorProps } from '
|
|
7
|
-
import { EditorProps as AllEditorProps } from '../../../types/editor-props';
|
|
6
|
+
import { EditorProps } from '../../../types/editor-props';
|
|
8
7
|
import { EditorPresetProps } from './types';
|
|
9
8
|
import { BlockTypePluginOptions } from '../../../plugins/block-type/types';
|
|
10
9
|
import { PlaceholderPluginOptions } from '../../../plugins/placeholder';
|
|
@@ -33,7 +32,7 @@ export type DefaultPresetPluginOptions = {
|
|
|
33
32
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
34
33
|
typeAhead?: TypeAheadPluginOptions;
|
|
35
34
|
allowAnalyticsGASV3?: boolean;
|
|
36
|
-
performanceTracking?:
|
|
35
|
+
performanceTracking?: EditorProps['performanceTracking'];
|
|
37
36
|
};
|
|
38
37
|
/**
|
|
39
38
|
* Note: The order that presets are added determines
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export { Mobile, MobileEditor } from './labs/next/mobile';
|
|
2
|
-
export type { MobileEditorProps } from './labs/next/mobile';
|
|
3
|
-
export { EditorPresetMobile, useMobilePreset, } from './labs/next/presets/mobile';
|
|
4
|
-
export type { MobilePresetProps } from './labs/next/presets/mobile';
|
|
5
|
-
export { Editor, EditorContent, EditorSharedConfigConsumer, PresetProvider, useEditorSharedConfig, } from './labs/next/Editor';
|
|
6
|
-
export type { EditorProps, EditorSharedConfig } from './labs/next/Editor';
|
|
7
|
-
export { default as EditorContext } from './ui/EditorContext';
|
|
8
1
|
export { createDefaultPreset } from './labs/next/presets/default';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
2
|
-
import { Node as PMNode, NodeType } from 'prosemirror-model';
|
|
3
|
-
import { Command } from '../../types';
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
|
+
import type { Node as PMNode, NodeType } from 'prosemirror-model';
|
|
3
|
+
import type { Command } from '../../types';
|
|
4
4
|
export declare const setExpandRef: (ref?: HTMLDivElement | null) => Command;
|
|
5
5
|
export declare const deleteExpandAtPos: (expandNodePos: number, expandNode: PMNode) => Command;
|
|
6
6
|
export declare const deleteExpand: () => Command;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NextEditorPlugin, EditorProps } from '../../types';
|
|
2
|
-
import { LongPressSelectionPluginOptions } from '../selection/types';
|
|
1
|
+
import type { NextEditorPlugin, EditorProps } from '../../types';
|
|
2
|
+
import type { LongPressSelectionPluginOptions } from '../selection/types';
|
|
3
3
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
5
5
|
interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "187.0.0",
|
|
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.
|
|
58
|
+
"@atlaskit/editor-common": "^74.23.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",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
70
70
|
"@atlaskit/editor-plugin-guideline": "^0.3.4",
|
|
71
71
|
"@atlaskit/editor-plugin-hyperlink": "^0.2.0",
|
|
72
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
72
|
+
"@atlaskit/editor-plugin-table": "^2.3.0",
|
|
73
73
|
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
74
74
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
75
75
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"@atlaskit/collab-provider": "9.7.2",
|
|
150
150
|
"@atlaskit/dropdown-menu": "^11.10.0",
|
|
151
151
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
152
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
152
|
+
"@atlaskit/editor-plugin-table": "^2.3.0",
|
|
153
153
|
"@atlaskit/editor-test-helpers": "^18.10.0",
|
|
154
154
|
"@atlaskit/flag": "^15.2.0",
|
|
155
155
|
"@atlaskit/icon-object": "^6.3.0",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
163
163
|
"@atlaskit/menu": "^1.9.0",
|
|
164
164
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
165
|
-
"@atlaskit/renderer": "^108.
|
|
165
|
+
"@atlaskit/renderer": "^108.7.0",
|
|
166
166
|
"@atlaskit/section-message": "^6.4.0",
|
|
167
167
|
"@atlaskit/smart-user-picker": "^6.1.0",
|
|
168
168
|
"@atlaskit/synchrony-test-helpers": "^2.3.0",
|
package/report.api.md
CHANGED
|
@@ -70,7 +70,7 @@ import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
|
70
70
|
import { ExtensionType } from '@atlaskit/editor-common/provider-factory';
|
|
71
71
|
import { FC } from 'react';
|
|
72
72
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
73
|
-
import { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
73
|
+
import type { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
74
74
|
import { FloatingToolbarButton } from '@atlaskit/editor-common/types';
|
|
75
75
|
import { FloatingToolbarColorPicker } from '@atlaskit/editor-common/types';
|
|
76
76
|
import { FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
@@ -566,7 +566,7 @@ type DefaultPresetPluginOptions = {
|
|
|
566
566
|
blockType?: BlockTypePluginOptions;
|
|
567
567
|
placeholder?: PlaceholderPluginOptions;
|
|
568
568
|
textFormatting?: TextFormattingOptions;
|
|
569
|
-
submitEditor?:
|
|
569
|
+
submitEditor?: EditorProps['onSave'];
|
|
570
570
|
annotationProviders?: AnnotationProviders;
|
|
571
571
|
quickInsert?: QuickInsertPluginOptions;
|
|
572
572
|
codeBlock?: CodeBlockOptions;
|
|
@@ -951,30 +951,6 @@ export interface EditorProps
|
|
|
951
951
|
};
|
|
952
952
|
}
|
|
953
953
|
|
|
954
|
-
// @public (undocumented)
|
|
955
|
-
type EditorProps_2 = {
|
|
956
|
-
plugins?: Array<EditorPlugin>;
|
|
957
|
-
transformer?: (schema: Schema) => Transformer_2<any>;
|
|
958
|
-
children?: React.ReactChild;
|
|
959
|
-
defaultValue?: object | string;
|
|
960
|
-
popupsMountPoint?: HTMLElement;
|
|
961
|
-
popupsBoundariesElement?: HTMLElement;
|
|
962
|
-
popupsScrollableElement?: HTMLElement;
|
|
963
|
-
disabled?: boolean;
|
|
964
|
-
placeholder?: string;
|
|
965
|
-
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
966
|
-
onChange?: (
|
|
967
|
-
value: any,
|
|
968
|
-
meta: {
|
|
969
|
-
source: 'local' | 'remote';
|
|
970
|
-
},
|
|
971
|
-
) => void;
|
|
972
|
-
onSave?: (value: any) => void;
|
|
973
|
-
onCancel?: (value: any) => void;
|
|
974
|
-
onMount?: (actions: EditorActions) => void;
|
|
975
|
-
onDestroy?: () => void;
|
|
976
|
-
};
|
|
977
|
-
|
|
978
954
|
// @public (undocumented)
|
|
979
955
|
interface EditorProviderProps {
|
|
980
956
|
// (undocumented)
|
|
@@ -1,43 +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.ContentComponents = ContentComponents;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _editorDisabled = require("../../plugins/editor-disabled");
|
|
10
|
-
var _WithPluginState = _interopRequireDefault(require("../../ui/WithPluginState"));
|
|
11
|
-
var _PluginSlot = _interopRequireDefault(require("../../ui/PluginSlot"));
|
|
12
|
-
var _Editor = require("./Editor");
|
|
13
|
-
function ContentComponents(_ref) {
|
|
14
|
-
var disabled = _ref.disabled,
|
|
15
|
-
wrapperElement = _ref.wrapperElement,
|
|
16
|
-
containerElement = _ref.containerElement;
|
|
17
|
-
var config = (0, _Editor.useEditorSharedConfig)();
|
|
18
|
-
if (!config) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
22
|
-
plugins: {
|
|
23
|
-
disabled: _editorDisabled.pluginKey
|
|
24
|
-
},
|
|
25
|
-
render: function render(_ref2) {
|
|
26
|
-
var _disabled$editorDisab;
|
|
27
|
-
var disabled = _ref2.disabled;
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement(_PluginSlot.default, {
|
|
29
|
-
editorView: config.editorView,
|
|
30
|
-
eventDispatcher: config.eventDispatcher,
|
|
31
|
-
providerFactory: config.providerFactory,
|
|
32
|
-
items: config.contentComponents,
|
|
33
|
-
popupsMountPoint: config.popupsMountPoint,
|
|
34
|
-
popupsBoundariesElement: config.popupsBoundariesElement,
|
|
35
|
-
popupsScrollableElement: config.popupsScrollableElement,
|
|
36
|
-
containerElement: containerElement // TODO: Figure out how to pass containerElement here ED-8448
|
|
37
|
-
,
|
|
38
|
-
wrapperElement: wrapperElement,
|
|
39
|
-
disabled: (_disabled$editorDisab = disabled === null || disabled === void 0 ? void 0 : disabled.editorDisabled) !== null && _disabled$editorDisab !== void 0 ? _disabled$editorDisab : false
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
@@ -1,76 +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.Editor = Editor;
|
|
8
|
-
Object.defineProperty(exports, "EditorContent", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _EditorContent.EditorContent;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "EditorSharedConfigConsumer", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _sharedConfig.EditorSharedConfigConsumer;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "PresetProvider", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return _presetContext.PresetProvider;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(exports, "useEditorSharedConfig", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function get() {
|
|
29
|
-
return _sharedConfig.useEditorSharedConfig;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
33
|
-
var _react = _interopRequireDefault(require("react"));
|
|
34
|
-
var _reactIntlNext = require("react-intl-next");
|
|
35
|
-
var _portalProvider = require("@atlaskit/editor-common/portal-provider");
|
|
36
|
-
var _EditorInternal = require("./internal/components/EditorInternal");
|
|
37
|
-
var _presetContext = require("./internal/context/preset-context");
|
|
38
|
-
var _sharedConfig = require("./internal/context/shared-config");
|
|
39
|
-
var _EditorContent = require("./internal/components/EditorContent");
|
|
40
|
-
/**
|
|
41
|
-
* Main Editor component. Use in combination with `EditorContent` and a `Preset`.
|
|
42
|
-
* Internally it constructs `ProseMirror View` and mounts it to `EditorContent`.
|
|
43
|
-
*
|
|
44
|
-
* `EditorContent` can be wrapped to implement any layout/design requirements.
|
|
45
|
-
*
|
|
46
|
-
* ```js
|
|
47
|
-
* <Preset>
|
|
48
|
-
* <Editor>
|
|
49
|
-
* <EditorContent/>
|
|
50
|
-
* </Editor>
|
|
51
|
-
* </Preset>
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
function Editor(props) {
|
|
55
|
-
var plugins = (0, _presetContext.usePresetContext)();
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(_reactIntlNext.IntlProvider, {
|
|
57
|
-
locale: "en"
|
|
58
|
-
}, /*#__PURE__*/_react.default.createElement(_portalProvider.PortalProvider, {
|
|
59
|
-
onAnalyticsEvent: props.onAnalyticsEvent,
|
|
60
|
-
render: function render(portalProviderAPI) {
|
|
61
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_EditorInternal.EditorInternal, (0, _extends2.default)({}, props, {
|
|
62
|
-
plugins: plugins.length ? plugins : props.plugins,
|
|
63
|
-
portalProviderAPI: portalProviderAPI,
|
|
64
|
-
onAnalyticsEvent: props.onAnalyticsEvent
|
|
65
|
-
})), /*#__PURE__*/_react.default.createElement(_portalProvider.PortalRenderer, {
|
|
66
|
-
portalProviderAPI: portalProviderAPI
|
|
67
|
-
}));
|
|
68
|
-
}
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* Public API Exports.
|
|
75
|
-
*
|
|
76
|
-
*/
|
|
@@ -1,39 +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.Toolbar = Toolbar;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _editorDisabled = require("../../plugins/editor-disabled");
|
|
10
|
-
var _WithPluginState = _interopRequireDefault(require("../../ui/WithPluginState"));
|
|
11
|
-
var _Toolbar = _interopRequireDefault(require("../../ui/Toolbar"));
|
|
12
|
-
var _Editor = require("./Editor");
|
|
13
|
-
function Toolbar(_ref) {
|
|
14
|
-
var containerElement = _ref.containerElement;
|
|
15
|
-
var config = (0, _Editor.useEditorSharedConfig)();
|
|
16
|
-
if (!config) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
20
|
-
plugins: {
|
|
21
|
-
disabled: _editorDisabled.pluginKey
|
|
22
|
-
},
|
|
23
|
-
render: function render(_ref2) {
|
|
24
|
-
var _disabled$editorDisab;
|
|
25
|
-
var disabled = _ref2.disabled;
|
|
26
|
-
return /*#__PURE__*/_react.default.createElement(_Toolbar.default, {
|
|
27
|
-
editorView: config.editorView,
|
|
28
|
-
eventDispatcher: config.eventDispatcher,
|
|
29
|
-
providerFactory: config.providerFactory,
|
|
30
|
-
items: config.primaryToolbarComponents,
|
|
31
|
-
popupsMountPoint: config.popupsMountPoint,
|
|
32
|
-
popupsBoundariesElement: config.popupsBoundariesElement,
|
|
33
|
-
popupsScrollableElement: config.popupsScrollableElement,
|
|
34
|
-
disabled: (_disabled$editorDisab = disabled === null || disabled === void 0 ? void 0 : disabled.editorDisabled) !== null && _disabled$editorDisab !== void 0 ? _disabled$editorDisab : false,
|
|
35
|
-
containerElement: containerElement
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|