@atlaskit/editor-core 187.30.9 → 187.31.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 +16 -0
- package/dist/cjs/index.js +2 -21
- package/dist/cjs/plugins/help-dialog/index.js +3 -6
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -9
- package/dist/cjs/plugins/quick-insert/commands.js +6 -10
- package/dist/cjs/plugins/quick-insert/index.js +49 -52
- package/dist/cjs/plugins/quick-insert/search.js +17 -61
- package/dist/cjs/plugins/quick-insert/ui/ModalElementBrowser/index.js +12 -5
- package/dist/cjs/plugins/selection/gap-cursor/utils/place-gap-cursor.js +2 -1
- package/dist/cjs/plugins/selection/gap-cursor/utils.js +17 -1
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +54 -54
- package/dist/cjs/utils/index.js +0 -32
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/index.js +7 -4
- package/dist/es2019/plugins/help-dialog/index.js +3 -6
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +7 -3
- package/dist/es2019/plugins/quick-insert/commands.js +6 -9
- package/dist/es2019/plugins/quick-insert/index.js +48 -45
- package/dist/es2019/plugins/quick-insert/search.js +15 -42
- package/dist/es2019/plugins/quick-insert/ui/ModalElementBrowser/index.js +11 -4
- package/dist/es2019/plugins/selection/gap-cursor/utils/place-gap-cursor.js +3 -2
- package/dist/es2019/plugins/selection/gap-cursor/utils.js +14 -0
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +28 -25
- package/dist/es2019/utils/index.js +0 -25
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/index.js +7 -4
- package/dist/esm/plugins/help-dialog/index.js +3 -6
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +5 -3
- package/dist/esm/plugins/quick-insert/commands.js +6 -10
- package/dist/esm/plugins/quick-insert/index.js +49 -46
- package/dist/esm/plugins/quick-insert/search.js +15 -56
- package/dist/esm/plugins/quick-insert/ui/ModalElementBrowser/index.js +12 -5
- package/dist/esm/plugins/selection/gap-cursor/utils/place-gap-cursor.js +3 -2
- package/dist/esm/plugins/selection/gap-cursor/utils.js +14 -0
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +54 -54
- package/dist/esm/utils/index.js +0 -31
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/index.d.ts +6 -3
- package/dist/types/labs/next/presets/default.d.ts +32 -0
- package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +1 -1
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +4 -4
- package/dist/types/plugins/help-dialog/index.d.ts +5 -1
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +3 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +3 -0
- package/dist/types/plugins/quick-insert/commands.d.ts +2 -2
- package/dist/types/plugins/quick-insert/index.d.ts +12 -9
- package/dist/types/plugins/quick-insert/search.d.ts +3 -5
- package/dist/types/plugins/selection/gap-cursor/utils.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ElementBrowser/InsertMenu.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +3 -0
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +6 -3
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +32 -0
- package/dist/types-ts4.5/plugins/expand/ui/ExpandIconButton.d.ts +1 -1
- package/dist/types-ts4.5/plugins/extension/ui/Extension/Extension/index.d.ts +4 -4
- package/dist/types-ts4.5/plugins/help-dialog/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +3 -0
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +3 -0
- package/dist/types-ts4.5/plugins/quick-insert/commands.d.ts +2 -2
- package/dist/types-ts4.5/plugins/quick-insert/index.d.ts +12 -9
- package/dist/types-ts4.5/plugins/quick-insert/search.d.ts +3 -5
- package/dist/types-ts4.5/plugins/selection/gap-cursor/utils.d.ts +1 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/ElementBrowser/InsertMenu.d.ts +1 -1
- package/dist/types-ts4.5/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
- package/dist/types-ts4.5/ui/ElementBrowser/types.d.ts +3 -0
- package/dist/types-ts4.5/utils/index.d.ts +0 -1
- package/package.json +3 -6
- package/report.api.md +2 -30
- package/tmp/api-report-tmp.d.ts +2 -21
- package/dist/cjs/plugins/quick-insert/api.js +0 -23
- package/dist/cjs/plugins/quick-insert/types.js +0 -5
- package/dist/es2019/plugins/quick-insert/api.js +0 -14
- package/dist/es2019/plugins/quick-insert/types.js +0 -1
- package/dist/esm/plugins/quick-insert/api.js +0 -16
- package/dist/esm/plugins/quick-insert/types.js +0 -1
- package/dist/types/plugins/quick-insert/api.d.ts +0 -6
- package/dist/types/plugins/quick-insert/types.d.ts +0 -4
- package/dist/types-ts4.5/plugins/quick-insert/api.d.ts +0 -6
- package/dist/types-ts4.5/plugins/quick-insert/types.d.ts +0 -4
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
34
34
|
import { darkModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
35
35
|
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
36
36
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
37
|
+
import { dedupe } from '@atlaskit/editor-common/utils';
|
|
37
38
|
import { DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
38
39
|
import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
|
|
39
40
|
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
@@ -76,7 +77,6 @@ import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
|
|
|
76
77
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
77
78
|
import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
78
79
|
import { InputTracking } from '@atlaskit/editor-common/types';
|
|
79
|
-
import type { IntlShape } from 'react-intl-next';
|
|
80
80
|
import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
|
|
81
81
|
import { jsx } from '@emotion/react';
|
|
82
82
|
import { lightModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
@@ -121,7 +121,6 @@ import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
|
121
121
|
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
122
122
|
import type { QuickInsertOptions } from '@atlaskit/editor-common/types';
|
|
123
123
|
import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
|
|
124
|
-
import type { QuickInsertPluginState } from '@atlaskit/editor-common/types';
|
|
125
124
|
import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
|
|
126
125
|
import { default as React_2 } from 'react';
|
|
127
126
|
import type { ReactElement } from 'react';
|
|
@@ -374,11 +373,6 @@ interface CreateEditorStateOptions {
|
|
|
374
373
|
selectionAtStart?: boolean;
|
|
375
374
|
}
|
|
376
375
|
|
|
377
|
-
// @public (undocumented)
|
|
378
|
-
export const createQuickInsertTools: (editorView: EditorView) => {
|
|
379
|
-
getItems: (query: string, options?: QuickInsertPluginOptions) => QuickInsertItem[];
|
|
380
|
-
};
|
|
381
|
-
|
|
382
376
|
export { createTable }
|
|
383
377
|
|
|
384
378
|
// @public (undocumented)
|
|
@@ -474,8 +468,7 @@ type DateType = {
|
|
|
474
468
|
day?: number;
|
|
475
469
|
};
|
|
476
470
|
|
|
477
|
-
|
|
478
|
-
export function dedupe<T>(list?: T[], iteratee?: (p: T) => T | T[keyof T]): T[];
|
|
471
|
+
export { dedupe }
|
|
479
472
|
|
|
480
473
|
export { DEFAULT_BORDER_COLOR }
|
|
481
474
|
|
|
@@ -1485,12 +1478,6 @@ export { PresenceResource }
|
|
|
1485
1478
|
// @public (undocumented)
|
|
1486
1479
|
type PrimaryToolbarComponents = BeforeAndAfterToolbarComponents | ReactComponents;
|
|
1487
1480
|
|
|
1488
|
-
// @public (undocumented)
|
|
1489
|
-
const processItems: (items: Array<QuickInsertHandler | QuickInsertItem>, intl: IntlShape, extendedActions?: Record<string, Function>) => QuickInsertItem[];
|
|
1490
|
-
|
|
1491
|
-
// @public (undocumented)
|
|
1492
|
-
export const processQuickInsertItems: typeof processItems;
|
|
1493
|
-
|
|
1494
1481
|
// @public (undocumented)
|
|
1495
1482
|
interface Props {
|
|
1496
1483
|
// (undocumented)
|
|
@@ -1546,14 +1533,8 @@ type Props_5 = {
|
|
|
1546
1533
|
// @public (undocumented)
|
|
1547
1534
|
type ProsemirrorGetPosHandler = () => number | undefined;
|
|
1548
1535
|
|
|
1549
|
-
// @public (undocumented)
|
|
1550
|
-
type QuickInsertHandler = ((intl: IntlShape) => Array<QuickInsertItem>) | Array<QuickInsertItem>;
|
|
1551
|
-
|
|
1552
1536
|
export { QuickInsertItem }
|
|
1553
1537
|
|
|
1554
|
-
// @public (undocumented)
|
|
1555
|
-
export const quickInsertPluginKey: PluginKey<QuickInsertPluginState>;
|
|
1556
|
-
|
|
1557
1538
|
export { QuickInsertProvider }
|
|
1558
1539
|
|
|
1559
1540
|
// @public (undocumented)
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createQuickInsertTools = void 0;
|
|
7
|
-
var _pluginKey = require("./plugin-key");
|
|
8
|
-
var _search = require("./search");
|
|
9
|
-
var getItems = function getItems(editorView) {
|
|
10
|
-
return function (query, options) {
|
|
11
|
-
var pluginState = _pluginKey.pluginKey.getState(editorView.state);
|
|
12
|
-
if (!pluginState) {
|
|
13
|
-
return [];
|
|
14
|
-
}
|
|
15
|
-
return (0, _search.searchQuickInsertItems)(pluginState, options)(query);
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
var createQuickInsertTools = function createQuickInsertTools(editorView) {
|
|
19
|
-
return {
|
|
20
|
-
getItems: getItems(editorView)
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
exports.createQuickInsertTools = createQuickInsertTools;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { pluginKey as quickInsertPluginKey } from './plugin-key';
|
|
2
|
-
import { searchQuickInsertItems } from './search';
|
|
3
|
-
const getItems = editorView => (query, options) => {
|
|
4
|
-
const pluginState = quickInsertPluginKey.getState(editorView.state);
|
|
5
|
-
if (!pluginState) {
|
|
6
|
-
return [];
|
|
7
|
-
}
|
|
8
|
-
return searchQuickInsertItems(pluginState, options)(query);
|
|
9
|
-
};
|
|
10
|
-
export const createQuickInsertTools = editorView => {
|
|
11
|
-
return {
|
|
12
|
-
getItems: getItems(editorView)
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { pluginKey as quickInsertPluginKey } from './plugin-key';
|
|
2
|
-
import { searchQuickInsertItems } from './search';
|
|
3
|
-
var getItems = function getItems(editorView) {
|
|
4
|
-
return function (query, options) {
|
|
5
|
-
var pluginState = quickInsertPluginKey.getState(editorView.state);
|
|
6
|
-
if (!pluginState) {
|
|
7
|
-
return [];
|
|
8
|
-
}
|
|
9
|
-
return searchQuickInsertItems(pluginState, options)(query);
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export var createQuickInsertTools = function createQuickInsertTools(editorView) {
|
|
13
|
-
return {
|
|
14
|
-
getItems: getItems(editorView)
|
|
15
|
-
};
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare const createQuickInsertTools: (editorView: EditorView) => {
|
|
5
|
-
getItems: (query: string, options?: QuickInsertPluginOptions) => QuickInsertItem[];
|
|
6
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl-next';
|
|
2
|
-
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
export type { IconProps } from '@atlaskit/editor-common/types';
|
|
4
|
-
export type QuickInsertHandler = Array<QuickInsertItem> | ((intl: IntlShape) => Array<QuickInsertItem>);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare const createQuickInsertTools: (editorView: EditorView) => {
|
|
5
|
-
getItems: (query: string, options?: QuickInsertPluginOptions) => QuickInsertItem[];
|
|
6
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl-next';
|
|
2
|
-
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
export type { IconProps } from '@atlaskit/editor-common/types';
|
|
4
|
-
export type QuickInsertHandler = Array<QuickInsertItem> | ((intl: IntlShape) => Array<QuickInsertItem>);
|