@atlaskit/editor-common 95.9.0 → 95.10.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 +22 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/preset/core-plugin/index.js +16 -0
- package/dist/cjs/styles/shared/column-layout.js +2 -1
- package/dist/cjs/types/index.js +5 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/preset/core-plugin/index.js +20 -0
- package/dist/es2019/styles/shared/column-layout.js +3 -2
- package/dist/es2019/types/index.js +4 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/preset/core-plugin/index.js +16 -0
- package/dist/esm/styles/shared/column-layout.js +3 -2
- package/dist/esm/types/index.js +4 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/types/index.d.ts +4 -1
- package/dist/types/types/next-editor-plugin.d.ts +8 -1
- package/dist/types/types/type-ahead.d.ts +1 -0
- package/dist/types-ts4.5/types/index.d.ts +4 -1
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +8 -1
- package/dist/types-ts4.5/types/type-ahead.d.ts +1 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 95.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#161872](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161872)
|
|
8
|
+
[`11eec41d47477`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/11eec41d47477) -
|
|
9
|
+
added new replace action to the core plugin actions to enable document replacement in a way that
|
|
10
|
+
doesn't reset editor state
|
|
11
|
+
- [#171350](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171350)
|
|
12
|
+
[`436dfb28a4833`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/436dfb28a4833) -
|
|
13
|
+
[ux] Support disabled type-ahead items while user is offline for media, emoji, and mentions.
|
|
14
|
+
|
|
15
|
+
## 95.9.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#170673](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170673)
|
|
20
|
+
[`09f6aa8666f9b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/09f6aa8666f9b) -
|
|
21
|
+
[ux] [ED-25899] Update layout breakpoint to 630px in renderer and corresponding breakpoints in
|
|
22
|
+
editor
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 95.9.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "95.
|
|
20
|
+
var packageVersion = "95.10.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.corePlugin = void 0;
|
|
7
|
+
var _processRawValue = require("../../../src/utils/processRawValue");
|
|
7
8
|
var _editorCommands = require("../editor-commands");
|
|
8
9
|
var _requestDocument = require("./requestDocument");
|
|
9
10
|
/**
|
|
@@ -46,6 +47,21 @@ var corePlugin = exports.corePlugin = function corePlugin(_ref) {
|
|
|
46
47
|
editorView.dom.blur();
|
|
47
48
|
return true;
|
|
48
49
|
},
|
|
50
|
+
replaceDocument: function replaceDocument(replaceValue) {
|
|
51
|
+
var editorView = config === null || config === void 0 ? void 0 : config.getEditorView();
|
|
52
|
+
if (!editorView || replaceValue === undefined || replaceValue === null) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
var state = editorView.state;
|
|
56
|
+
var schema = state.schema;
|
|
57
|
+
var content = Array.isArray(replaceValue) ? (0, _processRawValue.processRawFragmentValue)(schema, replaceValue) : (0, _processRawValue.processRawValue)(schema, replaceValue);
|
|
58
|
+
if (content) {
|
|
59
|
+
var tr = state.tr.replaceWith(0, state.doc.nodeSize - 2, content);
|
|
60
|
+
editorView.dispatch(tr.scrollIntoView());
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
},
|
|
49
65
|
requestDocument: function requestDocument(onReceive, options) {
|
|
50
66
|
var _config$getEditorView;
|
|
51
67
|
var view = (_config$getEditorView = config === null || config === void 0 ? void 0 : config.getEditorView()) !== null && _config$getEditorView !== void 0 ? _config$getEditorView : null;
|
|
@@ -51,11 +51,12 @@ var columnLayoutResponsiveSharedStyle = exports.columnLayoutResponsiveSharedStyl
|
|
|
51
51
|
containerName: 'layout-area'
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
var LAYOUT_BREAKPOINT_RENDERER = 629;
|
|
54
55
|
var columnLayoutResponsiveRendererStyles = exports.columnLayoutResponsiveRendererStyles = (0, _react.css)({
|
|
55
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
56
57
|
'.layout-section-container': {
|
|
57
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
58
|
-
'[data-layout-section]': (0, _defineProperty2.default)({}, "@container layout-area (max-width:".concat(
|
|
59
|
+
'[data-layout-section]': (0, _defineProperty2.default)({}, "@container layout-area (max-width:".concat(LAYOUT_BREAKPOINT_RENDERER, "px)"), {
|
|
59
60
|
flexDirection: 'column'
|
|
60
61
|
})
|
|
61
62
|
}
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -55,9 +55,12 @@ var SortOrder = exports.SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
55
55
|
SortOrder["DESC"] = "desc";
|
|
56
56
|
SortOrder["NO_ORDER"] = "no_order";
|
|
57
57
|
return SortOrder;
|
|
58
|
-
}({});
|
|
58
|
+
}({});
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* @deprecated
|
|
61
|
+
*/
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated
|
|
61
64
|
*
|
|
62
65
|
* Please use ExtractPresetAPI from "@atlaskit/editor-common/preset" instead.
|
|
63
66
|
*/
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "95.
|
|
27
|
+
var packageVersion = "95.10.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "95.
|
|
4
|
+
const packageVersion = "95.10.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { processRawFragmentValue, processRawValue } from '../../../src/utils/processRawValue';
|
|
1
2
|
import { editorCommandToPMCommand } from '../editor-commands';
|
|
2
3
|
import { scheduleDocumentRequest } from './requestDocument';
|
|
3
4
|
|
|
@@ -44,6 +45,25 @@ export const corePlugin = ({
|
|
|
44
45
|
editorView.dom.blur();
|
|
45
46
|
return true;
|
|
46
47
|
},
|
|
48
|
+
replaceDocument: replaceValue => {
|
|
49
|
+
const editorView = config === null || config === void 0 ? void 0 : config.getEditorView();
|
|
50
|
+
if (!editorView || replaceValue === undefined || replaceValue === null) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const {
|
|
54
|
+
state
|
|
55
|
+
} = editorView;
|
|
56
|
+
const {
|
|
57
|
+
schema
|
|
58
|
+
} = state;
|
|
59
|
+
const content = Array.isArray(replaceValue) ? processRawFragmentValue(schema, replaceValue) : processRawValue(schema, replaceValue);
|
|
60
|
+
if (content) {
|
|
61
|
+
const tr = state.tr.replaceWith(0, state.doc.nodeSize - 2, content);
|
|
62
|
+
editorView.dispatch(tr.scrollIntoView());
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
return false;
|
|
66
|
+
},
|
|
47
67
|
requestDocument(onReceive, options) {
|
|
48
68
|
var _config$getEditorView;
|
|
49
69
|
const view = (_config$getEditorView = config === null || config === void 0 ? void 0 : config.getEditorView()) !== null && _config$getEditorView !== void 0 ? _config$getEditorView : null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { gridMediumMaxWidth
|
|
3
|
+
import { gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
const columnLayoutSharedStyle = css({
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
6
6
|
'[data-layout-section]': {
|
|
@@ -44,13 +44,14 @@ const columnLayoutResponsiveSharedStyle = css({
|
|
|
44
44
|
containerName: 'layout-area'
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
+
const LAYOUT_BREAKPOINT_RENDERER = 629;
|
|
47
48
|
const columnLayoutResponsiveRendererStyles = css({
|
|
48
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
49
50
|
'.layout-section-container': {
|
|
50
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
51
52
|
'[data-layout-section]': {
|
|
52
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
53
|
-
[`@container layout-area (max-width:${
|
|
54
|
+
[`@container layout-area (max-width:${LAYOUT_BREAKPOINT_RENDERER}px)`]: {
|
|
54
55
|
flexDirection: 'column'
|
|
55
56
|
}
|
|
56
57
|
}
|
|
@@ -10,10 +10,12 @@ export let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
10
10
|
export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation/emitter';
|
|
11
11
|
export { ToolbarSize, ToolbarWidths, ToolbarWidthsNext, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext } from './toolbar';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated
|
|
15
|
+
*/
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
|
-
* @
|
|
18
|
+
* @deprecated
|
|
17
19
|
*
|
|
18
20
|
* Please use ExtractPresetAPI from "@atlaskit/editor-common/preset" instead.
|
|
19
21
|
*/
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "95.
|
|
16
|
+
const packageVersion = "95.10.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "95.
|
|
10
|
+
var packageVersion = "95.10.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { processRawFragmentValue, processRawValue } from '../../../src/utils/processRawValue';
|
|
1
2
|
import { editorCommandToPMCommand } from '../editor-commands';
|
|
2
3
|
import { scheduleDocumentRequest } from './requestDocument';
|
|
3
4
|
|
|
@@ -41,6 +42,21 @@ export var corePlugin = function corePlugin(_ref) {
|
|
|
41
42
|
editorView.dom.blur();
|
|
42
43
|
return true;
|
|
43
44
|
},
|
|
45
|
+
replaceDocument: function replaceDocument(replaceValue) {
|
|
46
|
+
var editorView = config === null || config === void 0 ? void 0 : config.getEditorView();
|
|
47
|
+
if (!editorView || replaceValue === undefined || replaceValue === null) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
var state = editorView.state;
|
|
51
|
+
var schema = state.schema;
|
|
52
|
+
var content = Array.isArray(replaceValue) ? processRawFragmentValue(schema, replaceValue) : processRawValue(schema, replaceValue);
|
|
53
|
+
if (content) {
|
|
54
|
+
var tr = state.tr.replaceWith(0, state.doc.nodeSize - 2, content);
|
|
55
|
+
editorView.dispatch(tr.scrollIntoView());
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
59
|
+
},
|
|
44
60
|
requestDocument: function requestDocument(onReceive, options) {
|
|
45
61
|
var _config$getEditorView;
|
|
46
62
|
var view = (_config$getEditorView = config === null || config === void 0 ? void 0 : config.getEditorView()) !== null && _config$getEditorView !== void 0 ? _config$getEditorView : null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import { gridMediumMaxWidth
|
|
4
|
+
import { gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
var columnLayoutSharedStyle = css({
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
7
7
|
'[data-layout-section]': _defineProperty({
|
|
@@ -43,11 +43,12 @@ var columnLayoutResponsiveSharedStyle = css({
|
|
|
43
43
|
containerName: 'layout-area'
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
+
var LAYOUT_BREAKPOINT_RENDERER = 629;
|
|
46
47
|
var columnLayoutResponsiveRendererStyles = css({
|
|
47
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
48
49
|
'.layout-section-container': {
|
|
49
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
50
|
-
'[data-layout-section]': _defineProperty({}, "@container layout-area (max-width:".concat(
|
|
51
|
+
'[data-layout-section]': _defineProperty({}, "@container layout-area (max-width:".concat(LAYOUT_BREAKPOINT_RENDERER, "px)"), {
|
|
51
52
|
flexDirection: 'column'
|
|
52
53
|
})
|
|
53
54
|
}
|
package/dist/esm/types/index.js
CHANGED
|
@@ -10,10 +10,12 @@ export var SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
10
10
|
export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation/emitter';
|
|
11
11
|
export { ToolbarSize, ToolbarWidths, ToolbarWidthsNext, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext } from './toolbar';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated
|
|
15
|
+
*/
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
|
-
* @
|
|
18
|
+
* @deprecated
|
|
17
19
|
*
|
|
18
20
|
* Please use ExtractPresetAPI from "@atlaskit/editor-common/preset" instead.
|
|
19
21
|
*/
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "95.
|
|
24
|
+
var packageVersion = "95.10.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -47,9 +47,12 @@ export type { QuickInsertPluginState, QuickInsertPluginStateKeys, QuickInsertOpt
|
|
|
47
47
|
export type { Refs, RefsNode, DocBuilder } from './doc-builder';
|
|
48
48
|
export type { SelectionToolbarGroup, SelectionToolbarHandler } from './selection-toolbar';
|
|
49
49
|
export type { FeedbackInfo } from './feedback-dialog';
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated
|
|
52
|
+
*/
|
|
50
53
|
import type { EditorPresetBuilder, ExtractPresetAPI } from '../preset';
|
|
51
54
|
/**
|
|
52
|
-
* @
|
|
55
|
+
* @deprecated
|
|
53
56
|
*
|
|
54
57
|
* Please use ExtractPresetAPI from "@atlaskit/editor-common/preset" instead.
|
|
55
58
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* are put together - but for now `Builder` & `Preset` aim to beinterchangeable.
|
|
6
6
|
*/
|
|
7
7
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
8
|
-
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
+
import type { Fragment, Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
import type { FireAnalyticsCallback } from '../analytics';
|
|
@@ -50,6 +50,13 @@ export type CorePlugin = NextEditorPlugin<'core', {
|
|
|
50
50
|
* @returns (boolean) if the blur was successful
|
|
51
51
|
*/
|
|
52
52
|
blur: () => boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Replaces the current content of the editor with the provided raw value.
|
|
55
|
+
*
|
|
56
|
+
* @param replaceValue - The new content to replace the current content. It can be of any type.
|
|
57
|
+
* @returns A boolean indicating whether the replacement was successful.
|
|
58
|
+
*/
|
|
59
|
+
replaceDocument: (replaceValue: Node | Fragment | Array<Node> | Object | string) => boolean;
|
|
53
60
|
/**
|
|
54
61
|
* Request the editor document.
|
|
55
62
|
* The document will return when available. If called multiple times it will throttle and return the
|
|
@@ -37,6 +37,7 @@ export type TypeAheadItem = {
|
|
|
37
37
|
key?: string | number;
|
|
38
38
|
icon?: () => ReactElement<any>;
|
|
39
39
|
render?: (props: TypeAheadItemRenderProps) => React.ReactElement<TypeAheadItemRenderProps> | null;
|
|
40
|
+
isDisabledOffline?: boolean;
|
|
40
41
|
[key: string]: any;
|
|
41
42
|
};
|
|
42
43
|
export type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
|
|
@@ -47,9 +47,12 @@ export type { QuickInsertPluginState, QuickInsertPluginStateKeys, QuickInsertOpt
|
|
|
47
47
|
export type { Refs, RefsNode, DocBuilder } from './doc-builder';
|
|
48
48
|
export type { SelectionToolbarGroup, SelectionToolbarHandler } from './selection-toolbar';
|
|
49
49
|
export type { FeedbackInfo } from './feedback-dialog';
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated
|
|
52
|
+
*/
|
|
50
53
|
import type { EditorPresetBuilder, ExtractPresetAPI } from '../preset';
|
|
51
54
|
/**
|
|
52
|
-
* @
|
|
55
|
+
* @deprecated
|
|
53
56
|
*
|
|
54
57
|
* Please use ExtractPresetAPI from "@atlaskit/editor-common/preset" instead.
|
|
55
58
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* are put together - but for now `Builder` & `Preset` aim to beinterchangeable.
|
|
6
6
|
*/
|
|
7
7
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
8
|
-
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
+
import type { Fragment, Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
import type { FireAnalyticsCallback } from '../analytics';
|
|
@@ -50,6 +50,13 @@ export type CorePlugin = NextEditorPlugin<'core', {
|
|
|
50
50
|
* @returns (boolean) if the blur was successful
|
|
51
51
|
*/
|
|
52
52
|
blur: () => boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Replaces the current content of the editor with the provided raw value.
|
|
55
|
+
*
|
|
56
|
+
* @param replaceValue - The new content to replace the current content. It can be of any type.
|
|
57
|
+
* @returns A boolean indicating whether the replacement was successful.
|
|
58
|
+
*/
|
|
59
|
+
replaceDocument: (replaceValue: Node | Fragment | Array<Node> | Object | string) => boolean;
|
|
53
60
|
/**
|
|
54
61
|
* Request the editor document.
|
|
55
62
|
* The document will return when available. If called multiple times it will throttle and return the
|
|
@@ -37,6 +37,7 @@ export type TypeAheadItem = {
|
|
|
37
37
|
key?: string | number;
|
|
38
38
|
icon?: () => ReactElement<any>;
|
|
39
39
|
render?: (props: TypeAheadItemRenderProps) => React.ReactElement<TypeAheadItemRenderProps> | null;
|
|
40
|
+
isDisabledOffline?: boolean;
|
|
40
41
|
[key: string]: any;
|
|
41
42
|
};
|
|
42
43
|
export type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "95.
|
|
3
|
+
"version": "95.10.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -124,17 +124,17 @@
|
|
|
124
124
|
"@atlaskit/dropdown-menu": "^12.23.0",
|
|
125
125
|
"@atlaskit/editor-json-transformer": "^8.21.0",
|
|
126
126
|
"@atlaskit/editor-palette": "1.6.3",
|
|
127
|
-
"@atlaskit/editor-prosemirror": "6.
|
|
127
|
+
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
128
128
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
129
129
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
130
130
|
"@atlaskit/emoji": "^67.11.0",
|
|
131
|
-
"@atlaskit/icon": "^22.
|
|
132
|
-
"@atlaskit/icon-object": "^6.
|
|
131
|
+
"@atlaskit/icon": "^22.28.0",
|
|
132
|
+
"@atlaskit/icon-object": "^6.8.0",
|
|
133
133
|
"@atlaskit/link-datasource": "^3.13.0",
|
|
134
134
|
"@atlaskit/link-picker": "^1.47.0",
|
|
135
|
-
"@atlaskit/media-card": "^78.
|
|
136
|
-
"@atlaskit/media-client": "^28.
|
|
137
|
-
"@atlaskit/media-client-react": "^2.
|
|
135
|
+
"@atlaskit/media-card": "^78.15.0",
|
|
136
|
+
"@atlaskit/media-client": "^28.5.0",
|
|
137
|
+
"@atlaskit/media-client-react": "^2.4.0",
|
|
138
138
|
"@atlaskit/media-common": "^11.7.0",
|
|
139
139
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
140
140
|
"@atlaskit/media-picker": "^67.0.0",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"@atlaskit/primitives": "^13.3.0",
|
|
149
149
|
"@atlaskit/profilecard": "^20.12.0",
|
|
150
150
|
"@atlaskit/section-message": "^6.7.0",
|
|
151
|
-
"@atlaskit/smart-card": "^32.
|
|
151
|
+
"@atlaskit/smart-card": "^32.2.0",
|
|
152
152
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
153
153
|
"@atlaskit/spinner": "^16.3.0",
|
|
154
154
|
"@atlaskit/task-decision": "^17.11.0",
|