@atlaskit/editor-common 82.13.0 → 83.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 +34 -0
- package/afm-jira/tsconfig.json +150 -0
- package/dist/cjs/hooks/useSharedPluginState.js +1 -4
- package/dist/cjs/i18n/cs.js +2 -1
- package/dist/cjs/i18n/da.js +2 -1
- package/dist/cjs/i18n/de.js +2 -1
- package/dist/cjs/i18n/en.js +1 -0
- package/dist/cjs/i18n/en_GB.js +1 -0
- package/dist/cjs/i18n/en_ZZ.js +1 -0
- package/dist/cjs/i18n/es.js +2 -1
- package/dist/cjs/i18n/fi.js +2 -1
- package/dist/cjs/i18n/fr.js +2 -1
- package/dist/cjs/i18n/hu.js +2 -1
- package/dist/cjs/i18n/it.js +2 -1
- package/dist/cjs/i18n/ja.js +2 -1
- package/dist/cjs/i18n/ko.js +2 -1
- package/dist/cjs/i18n/nb.js +2 -1
- package/dist/cjs/i18n/nl.js +2 -1
- package/dist/cjs/i18n/pl.js +2 -1
- package/dist/cjs/i18n/pt_BR.js +2 -1
- package/dist/cjs/i18n/ru.js +2 -1
- package/dist/cjs/i18n/sv.js +2 -1
- package/dist/cjs/i18n/th.js +7 -3
- package/dist/cjs/i18n/tr.js +4 -3
- package/dist/cjs/i18n/uk.js +2 -1
- package/dist/cjs/i18n/vi.js +2 -1
- package/dist/cjs/i18n/zh.js +3 -2
- package/dist/cjs/i18n/zh_TW.js +2 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/preset/builder.js +491 -0
- package/dist/cjs/styles/shared/annotation.js +20 -18
- package/dist/cjs/types/index.js +6 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Mention/mention-with-profilecard.js +3 -1
- package/dist/es2019/hooks/useSharedPluginState.js +1 -6
- package/dist/es2019/i18n/cs.js +2 -1
- package/dist/es2019/i18n/da.js +2 -1
- package/dist/es2019/i18n/de.js +2 -1
- package/dist/es2019/i18n/en.js +1 -0
- package/dist/es2019/i18n/en_GB.js +1 -0
- package/dist/es2019/i18n/en_ZZ.js +1 -0
- package/dist/es2019/i18n/es.js +2 -1
- package/dist/es2019/i18n/fi.js +2 -1
- package/dist/es2019/i18n/fr.js +2 -1
- package/dist/es2019/i18n/hu.js +2 -1
- package/dist/es2019/i18n/it.js +2 -1
- package/dist/es2019/i18n/ja.js +2 -1
- package/dist/es2019/i18n/ko.js +2 -1
- package/dist/es2019/i18n/nb.js +2 -1
- package/dist/es2019/i18n/nl.js +2 -1
- package/dist/es2019/i18n/pl.js +2 -1
- package/dist/es2019/i18n/pt_BR.js +2 -1
- package/dist/es2019/i18n/ru.js +2 -1
- package/dist/es2019/i18n/sv.js +2 -1
- package/dist/es2019/i18n/th.js +7 -3
- package/dist/es2019/i18n/tr.js +4 -3
- package/dist/es2019/i18n/uk.js +2 -1
- package/dist/es2019/i18n/vi.js +2 -1
- package/dist/es2019/i18n/zh.js +3 -2
- package/dist/es2019/i18n/zh_TW.js +2 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/preset/builder.js +528 -0
- package/dist/es2019/preset/core-plugin/index.js +1 -0
- package/dist/es2019/styles/shared/annotation.js +54 -29
- package/dist/es2019/types/index.js +9 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Mention/mention-with-profilecard.js +2 -0
- package/dist/esm/hooks/useSharedPluginState.js +1 -4
- package/dist/esm/i18n/cs.js +2 -1
- package/dist/esm/i18n/da.js +2 -1
- package/dist/esm/i18n/de.js +2 -1
- package/dist/esm/i18n/en.js +1 -0
- package/dist/esm/i18n/en_GB.js +1 -0
- package/dist/esm/i18n/en_ZZ.js +1 -0
- package/dist/esm/i18n/es.js +2 -1
- package/dist/esm/i18n/fi.js +2 -1
- package/dist/esm/i18n/fr.js +2 -1
- package/dist/esm/i18n/hu.js +2 -1
- package/dist/esm/i18n/it.js +2 -1
- package/dist/esm/i18n/ja.js +2 -1
- package/dist/esm/i18n/ko.js +2 -1
- package/dist/esm/i18n/nb.js +2 -1
- package/dist/esm/i18n/nl.js +2 -1
- package/dist/esm/i18n/pl.js +2 -1
- package/dist/esm/i18n/pt_BR.js +2 -1
- package/dist/esm/i18n/ru.js +2 -1
- package/dist/esm/i18n/sv.js +2 -1
- package/dist/esm/i18n/th.js +7 -3
- package/dist/esm/i18n/tr.js +4 -3
- package/dist/esm/i18n/uk.js +2 -1
- package/dist/esm/i18n/vi.js +2 -1
- package/dist/esm/i18n/zh.js +3 -2
- package/dist/esm/i18n/zh_TW.js +2 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/preset/builder.js +528 -0
- package/dist/esm/preset/core-plugin/index.js +1 -0
- package/dist/esm/styles/shared/annotation.js +20 -18
- package/dist/esm/types/index.js +9 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Mention/mention-with-profilecard.js +3 -1
- package/dist/types/hooks/useSharedPluginState.d.ts +5 -5
- package/dist/types/i18n/cs.d.ts +1 -0
- package/dist/types/i18n/da.d.ts +1 -0
- package/dist/types/i18n/de.d.ts +1 -0
- package/dist/types/i18n/en.d.ts +1 -0
- package/dist/types/i18n/en_GB.d.ts +1 -0
- package/dist/types/i18n/en_ZZ.d.ts +1 -0
- package/dist/types/i18n/es.d.ts +1 -0
- package/dist/types/i18n/fi.d.ts +1 -0
- package/dist/types/i18n/fr.d.ts +1 -0
- package/dist/types/i18n/hu.d.ts +1 -0
- package/dist/types/i18n/it.d.ts +1 -0
- package/dist/types/i18n/ja.d.ts +1 -0
- package/dist/types/i18n/ko.d.ts +1 -0
- package/dist/types/i18n/nb.d.ts +1 -0
- package/dist/types/i18n/nl.d.ts +1 -0
- package/dist/types/i18n/pl.d.ts +1 -0
- package/dist/types/i18n/pt_BR.d.ts +1 -0
- package/dist/types/i18n/ru.d.ts +1 -0
- package/dist/types/i18n/sv.d.ts +1 -0
- package/dist/types/i18n/th.d.ts +4 -0
- package/dist/types/i18n/tr.d.ts +1 -0
- package/dist/types/i18n/uk.d.ts +1 -0
- package/dist/types/i18n/vi.d.ts +1 -0
- package/dist/types/i18n/zh.d.ts +1 -0
- package/dist/types/i18n/zh_TW.d.ts +1 -0
- package/dist/types/portal/PortalManager.d.ts +3 -3
- package/dist/types/preset/builder.d.ts +550 -11
- package/dist/types/preset/core-plugin/index.d.ts +1 -1
- package/dist/types/preset/core-plugin/requestDocument.d.ts +1 -2
- package/dist/types/preset/index.d.ts +1 -0
- package/dist/types/preset/plugin-injection-api.d.ts +9 -3
- package/dist/types/styles/shared/annotation.d.ts +17 -0
- package/dist/types/types/index.d.ts +8 -7
- package/dist/types/types/next-editor-plugin.d.ts +641 -98
- package/dist/types/ui/Mention/mention-with-profilecard.d.ts +2 -1
- package/dist/types-ts4.5/hooks/useSharedPluginState.d.ts +5 -5
- package/dist/types-ts4.5/i18n/cs.d.ts +1 -0
- package/dist/types-ts4.5/i18n/da.d.ts +1 -0
- package/dist/types-ts4.5/i18n/de.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +1 -0
- package/dist/types-ts4.5/i18n/es.d.ts +1 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +1 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +1 -0
- package/dist/types-ts4.5/i18n/it.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +1 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +1 -0
- package/dist/types-ts4.5/i18n/th.d.ts +4 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +1 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +1 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -0
- package/dist/types-ts4.5/portal/PortalManager.d.ts +3 -3
- package/dist/types-ts4.5/preset/builder.d.ts +577 -13
- package/dist/types-ts4.5/preset/core-plugin/index.d.ts +1 -1
- package/dist/types-ts4.5/preset/core-plugin/requestDocument.d.ts +1 -2
- package/dist/types-ts4.5/preset/index.d.ts +1 -0
- package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +9 -8
- package/dist/types-ts4.5/styles/shared/annotation.d.ts +17 -0
- package/dist/types-ts4.5/types/index.d.ts +8 -7
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +673 -127
- package/dist/types-ts4.5/ui/Mention/mention-with-profilecard.d.ts +2 -1
- package/package.json +4 -4
- package/dist/cjs/preset/core-plugin/types.js +0 -5
- package/dist/cjs/types/editor-public-api.js +0 -5
- package/dist/es2019/preset/core-plugin/types.js +0 -1
- package/dist/es2019/types/editor-public-api.js +0 -1
- package/dist/esm/preset/core-plugin/types.js +0 -1
- package/dist/esm/types/editor-public-api.js +0 -1
- package/dist/types/preset/core-plugin/types.d.ts +0 -59
- package/dist/types/types/editor-public-api.d.ts +0 -3
- package/dist/types-ts4.5/preset/core-plugin/types.d.ts +0 -59
- package/dist/types-ts4.5/types/editor-public-api.d.ts +0 -4
|
@@ -3,6 +3,7 @@ import type { MentionProvider } from '@atlaskit/mention';
|
|
|
3
3
|
import type { ProfilecardProvider } from '../../provider-factory/profile-card-provider';
|
|
4
4
|
import type { MentionEventHandler } from '../EventHandlers';
|
|
5
5
|
export interface Props {
|
|
6
|
+
autoFocus?: boolean;
|
|
6
7
|
id: string;
|
|
7
8
|
text: string;
|
|
8
9
|
accessLevel?: string;
|
|
@@ -13,4 +14,4 @@ export interface Props {
|
|
|
13
14
|
onMouseLeave?: MentionEventHandler;
|
|
14
15
|
localId?: string;
|
|
15
16
|
}
|
|
16
|
-
export default function MentionWithProfileCard({ id, text, accessLevel, mentionProvider, profilecardProvider, onClick, onMouseEnter, onMouseLeave, localId, }: Props): JSX.Element;
|
|
17
|
+
export default function MentionWithProfileCard({ autoFocus, id, text, accessLevel, mentionProvider, profilecardProvider, onClick, onMouseEnter, onMouseLeave, localId, }: Props): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "83.0.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/"
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"@atlaskit/icon": "^22.4.0",
|
|
116
116
|
"@atlaskit/icon-object": "^6.4.0",
|
|
117
117
|
"@atlaskit/link-datasource": "^2.4.0",
|
|
118
|
-
"@atlaskit/link-picker": "^1.
|
|
118
|
+
"@atlaskit/link-picker": "^1.38.0",
|
|
119
119
|
"@atlaskit/media-card": "^77.12.0",
|
|
120
120
|
"@atlaskit/media-client": "^27.3.0",
|
|
121
121
|
"@atlaskit/media-client-react": "^2.0.0",
|
|
@@ -127,10 +127,10 @@
|
|
|
127
127
|
"@atlaskit/mention": "^23.2.0",
|
|
128
128
|
"@atlaskit/menu": "^2.5.0",
|
|
129
129
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
130
|
-
"@atlaskit/primitives": "^8.
|
|
130
|
+
"@atlaskit/primitives": "^8.2.0",
|
|
131
131
|
"@atlaskit/profilecard": "^19.15.0",
|
|
132
132
|
"@atlaskit/section-message": "^6.5.0",
|
|
133
|
-
"@atlaskit/smart-card": "^27.
|
|
133
|
+
"@atlaskit/smart-card": "^27.7.0",
|
|
134
134
|
"@atlaskit/smart-user-picker": "^6.9.0",
|
|
135
135
|
"@atlaskit/spinner": "^16.2.0",
|
|
136
136
|
"@atlaskit/task-decision": "^17.10.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
2
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { EditorCommand, NextEditorPlugin, Transformer } from '../../types';
|
|
5
|
-
export type CorePlugin = NextEditorPlugin<'core', {
|
|
6
|
-
pluginConfiguration: {
|
|
7
|
-
getEditorView: () => EditorView | undefined;
|
|
8
|
-
};
|
|
9
|
-
actions: {
|
|
10
|
-
/**
|
|
11
|
-
* Dispatches an EditorCommand to ProseMirror
|
|
12
|
-
*
|
|
13
|
-
* @param command A function (EditorCommand | undefined) that takes an object containing a `Transaction` and returns a `Transaction` if it
|
|
14
|
-
* is successful or `null` if it shouldn't be dispatched.
|
|
15
|
-
* @returns (boolean) if the command was successful in dispatching
|
|
16
|
-
*/
|
|
17
|
-
execute: (command: EditorCommand | undefined) => boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Focuses the editor.
|
|
20
|
-
*
|
|
21
|
-
* Calls the focus method of the `EditorView` and scrolls the
|
|
22
|
-
* current selection into view.
|
|
23
|
-
*
|
|
24
|
-
* @returns (boolean) if the focus was successful
|
|
25
|
-
*/
|
|
26
|
-
focus: () => boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Blurs the editor.
|
|
29
|
-
*
|
|
30
|
-
* Calls blur on the editor DOM element.
|
|
31
|
-
*
|
|
32
|
-
* @returns (boolean) if the blur was successful
|
|
33
|
-
*/
|
|
34
|
-
blur: () => boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Request the editor document.
|
|
37
|
-
* The document will return when available. If called multiple times it will throttle and return the
|
|
38
|
-
* latest document when ready.
|
|
39
|
-
*
|
|
40
|
-
* A transformer can be created using `createTransformer`.
|
|
41
|
-
*
|
|
42
|
-
* @param onReceive Callback to handle the document. Document type based on the transformer.
|
|
43
|
-
* @param options Pass a transformer for the document to be transformed into a different format.
|
|
44
|
-
*/
|
|
45
|
-
requestDocument<GenericTransformer extends Transformer<any> = Transformer<JSONDocNode>>(onReceive: (document: TransformerResult<GenericTransformer> | undefined) => void, options?: {
|
|
46
|
-
transformer?: GenericTransformer;
|
|
47
|
-
}): void;
|
|
48
|
-
/**
|
|
49
|
-
* Create a transformer
|
|
50
|
-
*
|
|
51
|
-
* @param schema Schema of the document
|
|
52
|
-
* @returns Transformer which can be used to request a document
|
|
53
|
-
*/
|
|
54
|
-
createTransformer<Format>(cb: (schema: Schema) => Transformer<Format>): Transformer<Format> | undefined;
|
|
55
|
-
};
|
|
56
|
-
}>;
|
|
57
|
-
export type TransformerResult<GenericTransformer = Transformer<JSONDocNode>> = GenericTransformer extends Transformer<infer Content> ? Content : JSONDocNode;
|
|
58
|
-
export type InferTransformerResultCallback<T extends Transformer<any> | undefined> = (doc: T extends Transformer<infer U> ? TransformerResult<U> : TransformerResult<JSONDocNode>) => void;
|
|
59
|
-
export type DefaultTransformerResultCallback = (doc: TransformerResult<JSONDocNode> | undefined) => void;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { EditorPresetBuilder } from '../preset/builder';
|
|
2
|
-
import type { ExtractNextEditorPlugins, PublicPluginAPI } from './next-editor-plugin';
|
|
3
|
-
export type ExtractPublicEditorAPI<T extends EditorPresetBuilder<any, any>> = T extends EditorPresetBuilder<any, infer Plugins> ? PublicPluginAPI<ExtractNextEditorPlugins<Plugins>> : PublicPluginAPI<[]>;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
2
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { EditorCommand, NextEditorPlugin, Transformer } from '../../types';
|
|
5
|
-
export type CorePlugin = NextEditorPlugin<'core', {
|
|
6
|
-
pluginConfiguration: {
|
|
7
|
-
getEditorView: () => EditorView | undefined;
|
|
8
|
-
};
|
|
9
|
-
actions: {
|
|
10
|
-
/**
|
|
11
|
-
* Dispatches an EditorCommand to ProseMirror
|
|
12
|
-
*
|
|
13
|
-
* @param command A function (EditorCommand | undefined) that takes an object containing a `Transaction` and returns a `Transaction` if it
|
|
14
|
-
* is successful or `null` if it shouldn't be dispatched.
|
|
15
|
-
* @returns (boolean) if the command was successful in dispatching
|
|
16
|
-
*/
|
|
17
|
-
execute: (command: EditorCommand | undefined) => boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Focuses the editor.
|
|
20
|
-
*
|
|
21
|
-
* Calls the focus method of the `EditorView` and scrolls the
|
|
22
|
-
* current selection into view.
|
|
23
|
-
*
|
|
24
|
-
* @returns (boolean) if the focus was successful
|
|
25
|
-
*/
|
|
26
|
-
focus: () => boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Blurs the editor.
|
|
29
|
-
*
|
|
30
|
-
* Calls blur on the editor DOM element.
|
|
31
|
-
*
|
|
32
|
-
* @returns (boolean) if the blur was successful
|
|
33
|
-
*/
|
|
34
|
-
blur: () => boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Request the editor document.
|
|
37
|
-
* The document will return when available. If called multiple times it will throttle and return the
|
|
38
|
-
* latest document when ready.
|
|
39
|
-
*
|
|
40
|
-
* A transformer can be created using `createTransformer`.
|
|
41
|
-
*
|
|
42
|
-
* @param onReceive Callback to handle the document. Document type based on the transformer.
|
|
43
|
-
* @param options Pass a transformer for the document to be transformed into a different format.
|
|
44
|
-
*/
|
|
45
|
-
requestDocument<GenericTransformer extends Transformer<any> = Transformer<JSONDocNode>>(onReceive: (document: TransformerResult<GenericTransformer> | undefined) => void, options?: {
|
|
46
|
-
transformer?: GenericTransformer;
|
|
47
|
-
}): void;
|
|
48
|
-
/**
|
|
49
|
-
* Create a transformer
|
|
50
|
-
*
|
|
51
|
-
* @param schema Schema of the document
|
|
52
|
-
* @returns Transformer which can be used to request a document
|
|
53
|
-
*/
|
|
54
|
-
createTransformer<Format>(cb: (schema: Schema) => Transformer<Format>): Transformer<Format> | undefined;
|
|
55
|
-
};
|
|
56
|
-
}>;
|
|
57
|
-
export type TransformerResult<GenericTransformer = Transformer<JSONDocNode>> = GenericTransformer extends Transformer<infer Content> ? Content : JSONDocNode;
|
|
58
|
-
export type InferTransformerResultCallback<T extends Transformer<any> | undefined> = (doc: T extends Transformer<infer U> ? TransformerResult<U> : TransformerResult<JSONDocNode>) => void;
|
|
59
|
-
export type DefaultTransformerResultCallback = (doc: TransformerResult<JSONDocNode> | undefined) => void;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { EditorPresetBuilder } from '../preset/builder';
|
|
2
|
-
import type { ExtractNextEditorPlugins, PublicPluginAPI } from './next-editor-plugin';
|
|
3
|
-
export type ExtractPublicEditorAPI<T extends EditorPresetBuilder<any, any>> = T extends EditorPresetBuilder<any, infer Plugins> ? PublicPluginAPI<ExtractNextEditorPlugins<Plugins>> : PublicPluginAPI<[
|
|
4
|
-
]>;
|