@atlaskit/editor-core 164.0.0 → 164.0.3
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/plugins/code-block/pm-plugins/keymaps.js +1 -1
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +8 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/code-block/pm-plugins/keymaps.js +1 -1
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +8 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/code-block/pm-plugins/keymaps.js +1 -1
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +8 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/commands/index.d.ts +2 -1
- package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +1 -1
- package/dist/types/create-editor/WithEditorView.d.ts +1 -1
- package/dist/types/editor.d.ts +5 -7
- package/dist/types/labs/EditorWithActions/index.d.ts +1 -1
- package/dist/types/labs/next/full-page.d.ts +1 -1
- package/dist/types/labs/next/internal/context/shared-config.d.ts +2 -2
- package/dist/types/labs/next/mobile.d.ts +1 -1
- package/dist/types/plugins/alignment/commands/index.d.ts +3 -2
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +1 -1
- package/dist/types/plugins/card/nodeviews/embedCard.d.ts +1 -1
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/plugins/card/pm-plugins/util/state.d.ts +2 -2
- package/dist/types/plugins/card/toolbar.d.ts +1 -1
- package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +1 -1
- package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types/plugins/card/utils.d.ts +1 -1
- package/dist/types/plugins/date/actions.d.ts +2 -1
- package/dist/types/plugins/emoji/ui/EmojiContextProvider/index.d.ts +1 -1
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +2 -2
- package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/index.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/ui/ToolbarLoader.d.ts +1 -1
- package/dist/types/plugins/help-dialog/ui/HelpDialogLoader.d.ts +1 -1
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
- package/dist/types/plugins/media/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -1
- package/dist/types/plugins/media/utils/media-files.d.ts +3 -2
- package/dist/types/plugins/media/utils/media-single.d.ts +2 -2
- package/dist/types/plugins/mentions/analytics.d.ts +4 -3
- package/dist/types/plugins/quick-insert/assets/index.d.ts +24 -24
- package/dist/types/plugins/status/ui/statusPicker.d.ts +1 -1
- package/dist/types/plugins/table/nodeviews/tableCell.d.ts +0 -1
- package/dist/types/plugins/table/types.d.ts +0 -1
- package/dist/types/plugins/type-ahead/api.d.ts +1 -2
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +8 -5
- package/dist/types/plugins/type-ahead/ui/hooks/use-resize-observer.d.ts +0 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +365 -3
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanelLoader.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ErrorMessage/index.d.ts +5 -4
- package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +8 -5
- package/dist/types/ui/ConfigPanel/Fields/TabGroup.d.ts +6 -4
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Header.d.ts +13 -7
- package/dist/types/ui/ConfigPanel/NestedForms/RemovableField.d.ts +13 -8
- package/dist/types/ui/ContentStyles/index.d.ts +3 -2
- package/dist/types/ui/EditorContext/index.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/CategoryList.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/ElementBrowserLoader.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/ElementSearch.d.ts +2 -2
- package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
- package/dist/types/ui/LinkSearch/index.d.ts +20 -20
- package/dist/types/ui/LinkSearch/withActivityProvider.d.ts +21 -20
- package/dist/types/ui/Toolbar/toolbar-size.d.ts +3 -2
- package/dist/types/ui/ToolbarButton/index.d.ts +4 -7
- package/dist/types/ui/ToolbarButton/styles.d.ts +2 -4
- package/dist/types/ui/ToolbarFeedback/index.d.ts +1 -1
- package/dist/types/ui/WithEditorActions/index.d.ts +2 -2
- package/dist/types/ui/WithHelpTrigger/index.d.ts +1 -1
- package/dist/types/ui/WithPluginState/index.d.ts +3 -3
- package/dist/types/utils/nodes.d.ts +2 -1
- package/editor/package.json +1 -0
- package/element-browser/package.json +1 -0
- package/extensibility/package.json +1 -0
- package/extensions/package.json +1 -0
- package/labs-next/package.json +1 -0
- package/messages/package.json +1 -0
- package/package.json +9 -9
- package/test-utils/package.json +1 -0
- package/version-wrapper/package.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 164.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1f18014c3c3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1f18014c3c3) - [ux] ED-14909: Fix Chrome bug where typeahead would write duplicate slash prefix triggers on multiple focusout events
|
|
8
|
+
|
|
9
|
+
## 164.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`a424e62b264`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a424e62b264) - Changes to support Node 16 Typescript definitions from `@types/node`.
|
|
14
|
+
|
|
15
|
+
## 164.0.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 164.0.0
|
|
4
23
|
|
|
5
24
|
### Major Changes
|
|
@@ -58,7 +58,7 @@ function keymapPlugin(schema) {
|
|
|
58
58
|
return true;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
if (
|
|
61
|
+
if ($cursor.node && (0, _utils.isEmptyNode)(schema)($cursor.node()) && ((0, _prosemirrorUtils.hasParentNodeOfType)(layoutColumn)(state.selection) || (0, _prosemirrorUtils.hasParentNodeOfType)(table)(state.selection))) {
|
|
62
62
|
var tr = state.tr;
|
|
63
63
|
var insertPos = $cursor.pos;
|
|
64
64
|
dispatch((0, _utils.pipe)(deleteCurrentItem($cursor), setTextSelection(insertPos))(tr).scrollIntoView());
|
|
@@ -201,12 +201,24 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
var onFocusOut = function onFocusOut(event) {
|
|
204
|
+
var _window$getSelection;
|
|
205
|
+
|
|
204
206
|
var relatedTarget = event.relatedTarget; // Given the user is changing the focus
|
|
205
207
|
// When the target is inside the TypeAhead Popup
|
|
206
208
|
// Then the popup should stay open
|
|
207
209
|
|
|
208
210
|
if (relatedTarget instanceof HTMLElement && relatedTarget.closest && relatedTarget.closest(".".concat(_constants.TYPE_AHEAD_POPUP_CONTENT_CLASS))) {
|
|
209
211
|
return;
|
|
212
|
+
} // See ED-14909: Chrome may emit focusout events where an input
|
|
213
|
+
// device was not directly responsible. (This rears in react v17+ consumers
|
|
214
|
+
// where react-managed node removal now appears to propagate focusout events to
|
|
215
|
+
// our event listener). As this path is strictly for click or other typeahead
|
|
216
|
+
// dismissals that don't involve typeahead item selection, we carve out an
|
|
217
|
+
// exception for Chrome-specific events where an input device was not the initiator.
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
if (_utils.browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !('sourceCapabilities' in event && event.sourceCapabilities)) {
|
|
221
|
+
return;
|
|
210
222
|
}
|
|
211
223
|
|
|
212
224
|
cancel({
|
|
@@ -52,8 +52,14 @@ function _validate(value, isRequired) {
|
|
|
52
52
|
function handleOnChange(onChange, onFieldChange, event) {
|
|
53
53
|
var _event$target;
|
|
54
54
|
|
|
55
|
-
onChange((event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.checked) || false);
|
|
56
|
-
|
|
55
|
+
onChange((event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.checked) || false); // Note: prior to bumping typescript to version 2.4.2 onFieldChange
|
|
56
|
+
// was being called with a global variable (which had a value of '')
|
|
57
|
+
// While this was not intended, the code still worked as expected.
|
|
58
|
+
// In typescript 2.4.2 accessing the global variable name has been
|
|
59
|
+
// deprecated, so this has been replaced with the value it was
|
|
60
|
+
// previously passing.
|
|
61
|
+
|
|
62
|
+
onFieldChange('', true);
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
function Checkbox(_ref) {
|
|
@@ -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 = "164.0.
|
|
9
|
+
var version = "164.0.3";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
|
|
12
12
|
var nextMajorVersion = function nextMajorVersion() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -44,7 +44,7 @@ export function keymapPlugin(schema) {
|
|
|
44
44
|
return true;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
if (
|
|
47
|
+
if ($cursor.node && isEmptyNode(schema)($cursor.node()) && (hasParentNodeOfType(layoutColumn)(state.selection) || hasParentNodeOfType(table)(state.selection))) {
|
|
48
48
|
const {
|
|
49
49
|
tr
|
|
50
50
|
} = state;
|
|
@@ -182,6 +182,8 @@ export const InputQuery = /*#__PURE__*/React.memo(({
|
|
|
182
182
|
};
|
|
183
183
|
|
|
184
184
|
const onFocusOut = event => {
|
|
185
|
+
var _window$getSelection;
|
|
186
|
+
|
|
185
187
|
const {
|
|
186
188
|
relatedTarget
|
|
187
189
|
} = event; // Given the user is changing the focus
|
|
@@ -190,6 +192,16 @@ export const InputQuery = /*#__PURE__*/React.memo(({
|
|
|
190
192
|
|
|
191
193
|
if (relatedTarget instanceof HTMLElement && relatedTarget.closest && relatedTarget.closest(`.${TYPE_AHEAD_POPUP_CONTENT_CLASS}`)) {
|
|
192
194
|
return;
|
|
195
|
+
} // See ED-14909: Chrome may emit focusout events where an input
|
|
196
|
+
// device was not directly responsible. (This rears in react v17+ consumers
|
|
197
|
+
// where react-managed node removal now appears to propagate focusout events to
|
|
198
|
+
// our event listener). As this path is strictly for click or other typeahead
|
|
199
|
+
// dismissals that don't involve typeahead item selection, we carve out an
|
|
200
|
+
// exception for Chrome-specific events where an input device was not the initiator.
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
if (browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !('sourceCapabilities' in event && event.sourceCapabilities)) {
|
|
204
|
+
return;
|
|
193
205
|
}
|
|
194
206
|
|
|
195
207
|
cancel({
|
|
@@ -27,8 +27,14 @@ function validate(value, isRequired) {
|
|
|
27
27
|
function handleOnChange(onChange, onFieldChange, event) {
|
|
28
28
|
var _event$target;
|
|
29
29
|
|
|
30
|
-
onChange((event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.checked) || false);
|
|
31
|
-
|
|
30
|
+
onChange((event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.checked) || false); // Note: prior to bumping typescript to version 2.4.2 onFieldChange
|
|
31
|
+
// was being called with a global variable (which had a value of '')
|
|
32
|
+
// While this was not intended, the code still worked as expected.
|
|
33
|
+
// In typescript 2.4.2 accessing the global variable name has been
|
|
34
|
+
// deprecated, so this has been replaced with the value it was
|
|
35
|
+
// previously passing.
|
|
36
|
+
|
|
37
|
+
onFieldChange('', true);
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
function Checkbox({
|
package/dist/es2019/version.json
CHANGED
|
@@ -47,7 +47,7 @@ export function keymapPlugin(schema) {
|
|
|
47
47
|
return true;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
if (
|
|
50
|
+
if ($cursor.node && isEmptyNode(schema)($cursor.node()) && (hasParentNodeOfType(layoutColumn)(state.selection) || hasParentNodeOfType(table)(state.selection))) {
|
|
51
51
|
var tr = state.tr;
|
|
52
52
|
var insertPos = $cursor.pos;
|
|
53
53
|
dispatch(pipe(deleteCurrentItem($cursor), setTextSelection(insertPos))(tr).scrollIntoView());
|
|
@@ -181,12 +181,24 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
181
181
|
};
|
|
182
182
|
|
|
183
183
|
var onFocusOut = function onFocusOut(event) {
|
|
184
|
+
var _window$getSelection;
|
|
185
|
+
|
|
184
186
|
var relatedTarget = event.relatedTarget; // Given the user is changing the focus
|
|
185
187
|
// When the target is inside the TypeAhead Popup
|
|
186
188
|
// Then the popup should stay open
|
|
187
189
|
|
|
188
190
|
if (relatedTarget instanceof HTMLElement && relatedTarget.closest && relatedTarget.closest(".".concat(TYPE_AHEAD_POPUP_CONTENT_CLASS))) {
|
|
189
191
|
return;
|
|
192
|
+
} // See ED-14909: Chrome may emit focusout events where an input
|
|
193
|
+
// device was not directly responsible. (This rears in react v17+ consumers
|
|
194
|
+
// where react-managed node removal now appears to propagate focusout events to
|
|
195
|
+
// our event listener). As this path is strictly for click or other typeahead
|
|
196
|
+
// dismissals that don't involve typeahead item selection, we carve out an
|
|
197
|
+
// exception for Chrome-specific events where an input device was not the initiator.
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
if (browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !('sourceCapabilities' in event && event.sourceCapabilities)) {
|
|
201
|
+
return;
|
|
190
202
|
}
|
|
191
203
|
|
|
192
204
|
cancel({
|
|
@@ -27,8 +27,14 @@ function _validate(value, isRequired) {
|
|
|
27
27
|
function handleOnChange(onChange, onFieldChange, event) {
|
|
28
28
|
var _event$target;
|
|
29
29
|
|
|
30
|
-
onChange((event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.checked) || false);
|
|
31
|
-
|
|
30
|
+
onChange((event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.checked) || false); // Note: prior to bumping typescript to version 2.4.2 onFieldChange
|
|
31
|
+
// was being called with a global variable (which had a value of '')
|
|
32
|
+
// While this was not intended, the code still worked as expected.
|
|
33
|
+
// In typescript 2.4.2 accessing the global variable name has been
|
|
34
|
+
// deprecated, so this has been replaced with the value it was
|
|
35
|
+
// previously passing.
|
|
36
|
+
|
|
37
|
+
onFieldChange('', true);
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
function Checkbox(_ref) {
|
package/dist/esm/version.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Node as PMNode, NodeType, MarkType, Schema } from 'prosemirror-model';
|
|
2
2
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
3
|
import { Command } from '../types';
|
|
4
|
+
import { AlignmentState } from '../plugins/alignment/pm-plugins/types';
|
|
4
5
|
export declare function preventDefault(): Command;
|
|
5
6
|
export declare function insertNewLine(): Command;
|
|
6
7
|
export declare const insertNewLineWithAnalytics: Command;
|
|
@@ -9,7 +10,7 @@ export declare const createNewParagraphBelow: Command;
|
|
|
9
10
|
export declare function createParagraphNear(append?: boolean): Command;
|
|
10
11
|
export declare function addParagraphAtEnd(tr: Transaction): void;
|
|
11
12
|
export declare function createParagraphAtEnd(): Command;
|
|
12
|
-
export declare const changeImageAlignment: (align?:
|
|
13
|
+
export declare const changeImageAlignment: (align?: AlignmentState | undefined) => Command;
|
|
13
14
|
export declare const createToggleBlockMarkOnRange: <T = object>(markType: MarkType, getAttrs: (prevAttrs?: T | undefined, node?: PMNode<any> | undefined) => false | T | undefined, allowedBlocks?: NodeType<any>[] | ((schema: Schema, node: PMNode, parent: PMNode) => boolean) | undefined) => (from: number, to: number, tr: Transaction, state: EditorState) => boolean;
|
|
14
15
|
/**
|
|
15
16
|
* Toggles block mark based on the return type of `getAttrs`.
|
|
@@ -38,5 +38,5 @@ export declare class ErrorBoundaryWithEditorView extends React.Component<ErrorBo
|
|
|
38
38
|
componentDidMount(): Promise<void>;
|
|
39
39
|
render(): JSX.Element;
|
|
40
40
|
}
|
|
41
|
-
declare const _default: React.ComponentType<
|
|
41
|
+
declare const _default: React.ComponentType<Omit<ErrorBoundaryProps, "editorView">>;
|
|
42
42
|
export default _default;
|
|
@@ -59,7 +59,7 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
59
59
|
validTransactionCount: number;
|
|
60
60
|
experienceStore?: ExperienceStore;
|
|
61
61
|
static contextTypes: {
|
|
62
|
-
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<any>;
|
|
62
|
+
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
|
|
63
63
|
};
|
|
64
64
|
private canDispatchTransactions;
|
|
65
65
|
private focusTimeoutId?;
|
|
@@ -3,4 +3,4 @@ import { EditorView } from 'prosemirror-view';
|
|
|
3
3
|
export interface WithEditorViewInternalProps {
|
|
4
4
|
editorView?: EditorView | undefined;
|
|
5
5
|
}
|
|
6
|
-
export declare const WithEditorView: <P extends WithEditorViewInternalProps>(WrappedComponent: React.ComponentType<P>) => React.ComponentType<
|
|
6
|
+
export declare const WithEditorView: <P extends WithEditorViewInternalProps>(WrappedComponent: React.ComponentType<P>) => React.ComponentType<Omit<P, "editorView">>;
|
package/dist/types/editor.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
7
7
|
import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
8
8
|
import { Transformer } from '@atlaskit/editor-common/types';
|
|
9
9
|
import EditorActions from './actions';
|
|
10
|
-
import { EditorProps } from './types/editor-props';
|
|
10
|
+
import { EditorProps, ExtensionProvidersProp } from './types/editor-props';
|
|
11
11
|
import { EventDispatcher } from './event-dispatcher';
|
|
12
12
|
import { FireAnalyticsCallback } from './plugins/analytics';
|
|
13
|
-
import { QuickInsertProvider } from './plugins/quick-insert/types';
|
|
13
|
+
import { QuickInsertProvider, QuickInsertOptions } from './plugins/quick-insert/types';
|
|
14
14
|
export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionProvidersProp, ExtensionConfig, FeedbackInfo, MarkConfig, MessageDescriptor, NodeConfig, NodeViewConfig, PMPlugin, PMPluginCreateConfig, PMPluginFactory, PMPluginFactoryParams, PluginsOptions, ReactComponents, ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, UIComponentFactory, UiComponentFactoryParams, } from './types';
|
|
15
15
|
declare type Context = {
|
|
16
16
|
editorActions?: EditorActions;
|
|
@@ -23,7 +23,7 @@ declare type State = {
|
|
|
23
23
|
export default class Editor extends React.Component<EditorProps, State> {
|
|
24
24
|
static defaultProps: EditorProps;
|
|
25
25
|
static contextTypes: {
|
|
26
|
-
editorActions: PropTypes.Requireable<
|
|
26
|
+
editorActions: PropTypes.Requireable<object>;
|
|
27
27
|
};
|
|
28
28
|
private providerFactory;
|
|
29
29
|
private editorActions;
|
|
@@ -52,10 +52,8 @@ export default class Editor extends React.Component<EditorProps, State> {
|
|
|
52
52
|
};
|
|
53
53
|
} | undefined;
|
|
54
54
|
};
|
|
55
|
-
prepareExtensionProvider: import("memoize-one").MemoizedFn<(extensionProviders?:
|
|
56
|
-
prepareQuickInsertProvider: (extensionProvider?: ExtensionProvider<any> | undefined, quickInsert?:
|
|
57
|
-
provider: Promise<QuickInsertProvider>;
|
|
58
|
-
} | undefined) => Promise<QuickInsertProvider> | undefined;
|
|
55
|
+
prepareExtensionProvider: import("memoize-one").MemoizedFn<(extensionProviders?: ExtensionProvidersProp | undefined) => ExtensionProvider<any> | undefined>;
|
|
56
|
+
prepareQuickInsertProvider: (extensionProvider?: ExtensionProvider<any> | undefined, quickInsert?: QuickInsertOptions | undefined) => Promise<QuickInsertProvider> | undefined;
|
|
59
57
|
onEditorCreated(instance: {
|
|
60
58
|
view: EditorView;
|
|
61
59
|
eventDispatcher: EventDispatcher;
|
|
@@ -14,7 +14,7 @@ export interface EditorWithActionsProps extends EditorWithActionsPropsOverride {
|
|
|
14
14
|
}
|
|
15
15
|
export default class EditorWithActions extends React.Component<EditorWithActionsProps, {}> {
|
|
16
16
|
static contextTypes: {
|
|
17
|
-
editorActions: PropTypes.Validator<
|
|
17
|
+
editorActions: PropTypes.Validator<object>;
|
|
18
18
|
};
|
|
19
19
|
context: {
|
|
20
20
|
editorActions?: EditorActions;
|
|
@@ -5,5 +5,5 @@ import EditorActions from '../../actions';
|
|
|
5
5
|
export declare type FullPageProps = EditorProps & {
|
|
6
6
|
onMount?: (actions: EditorActions) => void;
|
|
7
7
|
} & WithAnalyticsEventsProps;
|
|
8
|
-
declare const FullPageWithAnalytics: React.ForwardRefExoticComponent<
|
|
8
|
+
declare const FullPageWithAnalytics: React.ForwardRefExoticComponent<Omit<FullPageProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
9
9
|
export { FullPageWithAnalytics as FullPage };
|
|
@@ -32,7 +32,7 @@ export declare class EditorSharedConfigProvider extends React.Component<{
|
|
|
32
32
|
value: EditorSharedConfig | null;
|
|
33
33
|
}, any> {
|
|
34
34
|
static childContextTypes: {
|
|
35
|
-
editorSharedConfig: PropTypes.Requireable<
|
|
35
|
+
editorSharedConfig: PropTypes.Requireable<object>;
|
|
36
36
|
};
|
|
37
37
|
getChildContext(): {
|
|
38
38
|
editorSharedConfig: EditorSharedConfig | null;
|
|
@@ -43,7 +43,7 @@ export declare class EditorSharedConfigConsumer extends React.Component<{
|
|
|
43
43
|
children: (value: EditorSharedConfig | null) => React.ReactNode | null;
|
|
44
44
|
}> {
|
|
45
45
|
static contextTypes: {
|
|
46
|
-
editorSharedConfig: PropTypes.Requireable<
|
|
46
|
+
editorSharedConfig: PropTypes.Requireable<object>;
|
|
47
47
|
};
|
|
48
48
|
render(): JSX.Element;
|
|
49
49
|
}
|
|
@@ -9,4 +9,4 @@ export declare function MobileEditor(props: MobileEditorProps & WithAnalyticsEve
|
|
|
9
9
|
export declare namespace MobileEditor {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
|
12
|
-
export declare const Mobile: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const Mobile: React.ForwardRefExoticComponent<Omit<MobileEditorProps & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Command } from '../../../types/command';
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
2
|
+
import { AlignmentState } from '../pm-plugins/types';
|
|
3
|
+
export declare const isAlignable: (align?: AlignmentState | undefined) => Command;
|
|
4
|
+
export declare const changeAlignment: (align?: AlignmentState | undefined) => Command;
|
|
@@ -14,7 +14,7 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
|
|
|
14
14
|
private scrollContainer?;
|
|
15
15
|
onClick: () => void;
|
|
16
16
|
static contextTypes: {
|
|
17
|
-
contextAdapter: PropTypes.Requireable<
|
|
17
|
+
contextAdapter: PropTypes.Requireable<object>;
|
|
18
18
|
};
|
|
19
19
|
UNSAFE_componentWillMount(): void;
|
|
20
20
|
onResolve: (data: {
|
|
@@ -14,7 +14,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
14
14
|
private embedIframeRef;
|
|
15
15
|
onClick: () => void;
|
|
16
16
|
static contextTypes: {
|
|
17
|
-
contextAdapter: PropTypes.Requireable<
|
|
17
|
+
contextAdapter: PropTypes.Requireable<object>;
|
|
18
18
|
};
|
|
19
19
|
state: EmbedCardState;
|
|
20
20
|
UNSAFE_componentWillMount(): void;
|
|
@@ -6,7 +6,7 @@ export declare class InlineCardComponent extends React.PureComponent<SmartCardPr
|
|
|
6
6
|
private scrollContainer?;
|
|
7
7
|
private onClick;
|
|
8
8
|
static contextTypes: {
|
|
9
|
-
contextAdapter: PropTypes.Requireable<
|
|
9
|
+
contextAdapter: PropTypes.Requireable<object>;
|
|
10
10
|
};
|
|
11
11
|
UNSAFE_componentWillMount(): void;
|
|
12
12
|
onResolve: (data: {
|
|
@@ -5,9 +5,9 @@ export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState
|
|
|
5
5
|
requests: {
|
|
6
6
|
pos: number;
|
|
7
7
|
url: string;
|
|
8
|
-
appearance: import("@atlaskit/
|
|
8
|
+
appearance: import("@atlaskit/editor-common/provider-factory").CardAppearance;
|
|
9
9
|
compareLinkText: boolean;
|
|
10
|
-
source: import("
|
|
10
|
+
source: import("../../types").CardReplacementInputMethod;
|
|
11
11
|
analyticsAction?: import("../../../analytics").ACTION | undefined;
|
|
12
12
|
shouldReplaceLink?: boolean | undefined;
|
|
13
13
|
}[];
|
|
@@ -6,4 +6,4 @@ import { CardOptions } from '@atlaskit/editor-common/card';
|
|
|
6
6
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
7
|
export declare const removeCard: Command;
|
|
8
8
|
export declare const visitCardLink: Command;
|
|
9
|
-
export declare const floatingToolbar: (cardOptions: CardOptions, platform?: "
|
|
9
|
+
export declare const floatingToolbar: (cardOptions: CardOptions, platform?: import("json-ld-types").JsonLd.Primitives.Platforms | undefined) => (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
@@ -16,7 +16,7 @@ export interface LinkToolbarAppearanceProps {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps, {}> {
|
|
18
18
|
static contextTypes: {
|
|
19
|
-
contextAdapter: PropTypes.Requireable<
|
|
19
|
+
contextAdapter: PropTypes.Requireable<object>;
|
|
20
20
|
};
|
|
21
21
|
renderDropdown: (view?: EditorView<any> | undefined, cardContext?: CardContext | undefined) => JSX.Element | null;
|
|
22
22
|
render(): JSX.Element | null;
|
|
@@ -40,7 +40,7 @@ export default class ResizableEmbedCard extends React.Component<Props, State> {
|
|
|
40
40
|
wrapper?: HTMLElement;
|
|
41
41
|
get wideLayoutWidth(): number;
|
|
42
42
|
calcSnapPoints(): number[];
|
|
43
|
-
calcPxWidth: (useLayout?:
|
|
43
|
+
calcPxWidth: (useLayout?: RichMediaLayout | undefined) => number;
|
|
44
44
|
get insideInlineLike(): boolean;
|
|
45
45
|
highlights: (newWidth: number, snapPoints: number[]) => number[] | string[];
|
|
46
46
|
/**
|
|
@@ -3,7 +3,7 @@ import { NodeType, Node, Slice } from 'prosemirror-model';
|
|
|
3
3
|
import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import { CardInfo } from './types';
|
|
5
5
|
export declare const appearanceForNodeType: (spec: NodeType) => CardAppearance | undefined;
|
|
6
|
-
export declare const selectedCardAppearance: (state: EditorState) => false |
|
|
6
|
+
export declare const selectedCardAppearance: (state: EditorState) => false | CardAppearance | undefined;
|
|
7
7
|
export declare type TitleUrlPair = {
|
|
8
8
|
title?: string;
|
|
9
9
|
url?: string;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
2
2
|
import { Command, CommandDispatch } from '../../types';
|
|
3
3
|
import { DateType } from './types';
|
|
4
|
+
import { TOOLBAR_MENU_TYPE } from '../insert-block/ui/ToolbarInsertBlock/types';
|
|
4
5
|
import { INPUT_METHOD } from '../analytics';
|
|
5
6
|
export declare const createDate: (isQuickInsertAction?: boolean | undefined) => (insert: (node: Node | Object | string, opts?: any) => Transaction, state: EditorState) => Transaction;
|
|
6
7
|
/** Delete the date and close the datepicker */
|
|
7
8
|
export declare const deleteDate: () => Command;
|
|
8
9
|
/** Focus input */
|
|
9
10
|
export declare const focusDateInput: () => (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
10
|
-
export declare const insertDate: (date?: DateType | undefined, inputMethod?:
|
|
11
|
+
export declare const insertDate: (date?: DateType | undefined, inputMethod?: TOOLBAR_MENU_TYPE | undefined, commitMethod?: INPUT_METHOD.KEYBOARD | INPUT_METHOD.PICKER | undefined, enterPressed?: boolean) => Command;
|
|
11
12
|
export declare const setDatePickerAt: (showDatePickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
12
13
|
export declare const closeDatePicker: () => Command;
|
|
13
14
|
export declare const closeDatePickerWithAnalytics: ({ date, }: {
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export declare class EmojiContextProvider extends React.Component<any, any> {
|
|
4
4
|
static childContextTypes: {
|
|
5
|
-
emoji: PropTypes.Requireable<
|
|
5
|
+
emoji: PropTypes.Requireable<object>;
|
|
6
6
|
};
|
|
7
7
|
getChildContext(): {
|
|
8
8
|
emoji: {
|
|
@@ -34,7 +34,7 @@ declare const _default: {
|
|
|
34
34
|
handleContainer: (container: HTMLElement | null) => void;
|
|
35
35
|
render(): JSX.Element;
|
|
36
36
|
context: any;
|
|
37
|
-
setState<K extends
|
|
37
|
+
setState<K extends keyof import("@atlaskit/editor-common/ui").OverflowShadowState>(state: import("@atlaskit/editor-common/ui").OverflowShadowState | ((prevState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, props: Readonly<Props>) => import("@atlaskit/editor-common/ui").OverflowShadowState | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K> | null) | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
|
|
38
38
|
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
39
39
|
readonly props: Readonly<Props> & Readonly<{
|
|
40
40
|
children?: React.ReactNode;
|
|
@@ -72,7 +72,7 @@ declare const _default: {
|
|
|
72
72
|
handleContainer: (container: HTMLElement | null) => void;
|
|
73
73
|
render(): JSX.Element;
|
|
74
74
|
context: any;
|
|
75
|
-
setState<K_1 extends
|
|
75
|
+
setState<K_1 extends keyof import("@atlaskit/editor-common/ui").OverflowShadowState>(state: import("@atlaskit/editor-common/ui").OverflowShadowState | ((prevState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, props: Readonly<Props>) => import("@atlaskit/editor-common/ui").OverflowShadowState | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K_1> | null) | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K_1> | null, callback?: (() => void) | undefined): void;
|
|
76
76
|
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
77
77
|
readonly props: Readonly<Props> & Readonly<{
|
|
78
78
|
children?: React.ReactNode;
|
|
@@ -4,4 +4,4 @@ import type { FeatureFlags } from '../../types/feature-flags';
|
|
|
4
4
|
*
|
|
5
5
|
* Useful for analytics and analysis purposes.
|
|
6
6
|
*/
|
|
7
|
-
export declare function getEnabledFeatureFlagKeys(featureFlags: FeatureFlags): (
|
|
7
|
+
export declare function getEnabledFeatureFlagKeys(featureFlags: FeatureFlags): (keyof FeatureFlags)[];
|
|
@@ -16,4 +16,4 @@ export default floatingToolbarPlugin;
|
|
|
16
16
|
* ProseMirror Plugin
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
|
-
export declare const pluginKey: PluginKey<
|
|
19
|
+
export declare const pluginKey: PluginKey<FloatingToolbarPluginState, any>;
|
|
@@ -24,7 +24,7 @@ export interface Props {
|
|
|
24
24
|
extensionsProvider?: ExtensionProvider;
|
|
25
25
|
}
|
|
26
26
|
export declare const isSameItem: (leftItem: Item, rightItem: Item) => boolean;
|
|
27
|
-
export declare const areSameItems: (leftArr?:
|
|
27
|
+
export declare const areSameItems: (leftArr?: Item[] | undefined, rightArr?: Item[] | undefined) => boolean;
|
|
28
28
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
29
29
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
30
30
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import Loadable from 'react-loadable';
|
|
3
3
|
import type { Props } from './Toolbar';
|
|
4
|
-
export declare const ToolbarLoader:
|
|
4
|
+
export declare const ToolbarLoader: import("react").ComponentType<Props> & Loadable.LoadableComponent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import Loadable from 'react-loadable';
|
|
3
3
|
import type { Props as HelpDialogProps } from './index';
|
|
4
|
-
export declare const HelpDialogLoader:
|
|
4
|
+
export declare const HelpDialogLoader: import("react").ComponentType<HelpDialogProps> & Loadable.LoadableComponent;
|
|
@@ -105,5 +105,5 @@ export declare class HyperlinkLinkAddToolbar extends PureComponent<Props, State>
|
|
|
105
105
|
export declare const HyperlinkLinkAddToolbarWithIntl: React.FC<import("react-intl-next").WithIntlProps<HyperlinkLinkAddToolbarProps>> & {
|
|
106
106
|
WrappedComponent: React.ComponentType<HyperlinkLinkAddToolbarProps>;
|
|
107
107
|
};
|
|
108
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
108
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<HyperlinkLinkAddToolbarProps>>, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
109
109
|
export default _default;
|
|
@@ -37,5 +37,5 @@ export declare class AltTextEditComponent extends React.Component<Props, AltText
|
|
|
37
37
|
private handleOnBlur;
|
|
38
38
|
private handleClearText;
|
|
39
39
|
}
|
|
40
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
40
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<Props>>, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
41
41
|
export default _default;
|
|
@@ -33,7 +33,7 @@ export default class ResizableMediaSingle extends React.Component<Props, State>
|
|
|
33
33
|
get gridWidth(): number;
|
|
34
34
|
calcColumnLeftOffset: () => number;
|
|
35
35
|
wrapper?: HTMLElement;
|
|
36
|
-
calcPxWidth: (useLayout?:
|
|
36
|
+
calcPxWidth: (useLayout?: MediaSingleLayout | undefined) => number;
|
|
37
37
|
get insideInlineLike(): boolean;
|
|
38
38
|
get insideLayout(): boolean;
|
|
39
39
|
highlights: (newWidth: number, snapPoints: number[]) => number[] | string[];
|