@atlaskit/editor-common 82.9.2 → 82.11.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 +26 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +5 -3
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +3 -1
- package/dist/cjs/extensibility/Extension.js +2 -2
- package/dist/cjs/extensibility/ExtensionComponent.js +4 -4
- package/dist/cjs/extensibility/ExtensionNodeWrapper.js +3 -1
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +5 -3
- package/dist/cjs/extensibility/extensionNodeView.js +4 -4
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +14 -16
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/annotation/index.js +30 -0
- package/dist/cjs/utils/index.js +6 -0
- package/dist/es2019/extensibility/Extension/Extension/index.js +4 -1
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +4 -1
- package/dist/es2019/extensibility/Extension.js +2 -2
- package/dist/es2019/extensibility/ExtensionComponent.js +4 -4
- package/dist/es2019/extensibility/ExtensionNodeWrapper.js +4 -1
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +4 -1
- package/dist/es2019/extensibility/extensionNodeView.js +4 -4
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +15 -17
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/annotation/index.js +29 -0
- package/dist/es2019/utils/index.js +1 -1
- package/dist/esm/extensibility/Extension/Extension/index.js +5 -3
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +3 -1
- package/dist/esm/extensibility/Extension.js +2 -2
- package/dist/esm/extensibility/ExtensionComponent.js +4 -4
- package/dist/esm/extensibility/ExtensionNodeWrapper.js +3 -1
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +5 -3
- package/dist/esm/extensibility/extensionNodeView.js +4 -4
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +15 -17
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/annotation/index.js +29 -0
- package/dist/esm/utils/index.js +1 -1
- package/dist/types/extensibility/Extension/Extension/index.d.ts +2 -2
- package/dist/types/extensibility/Extension/InlineExtension/index.d.ts +2 -2
- package/dist/types/extensibility/Extension.d.ts +2 -2
- package/dist/types/extensibility/ExtensionComponent.d.ts +2 -2
- package/dist/types/extensibility/ExtensionNodeWrapper.d.ts +3 -2
- package/dist/types/extensibility/MultiBodiedExtension/index.d.ts +2 -2
- package/dist/types/extensibility/extensionNodeView.d.ts +3 -3
- package/dist/types/extensibility/types.d.ts +4 -0
- package/dist/types/types/annotation/index.d.ts +10 -0
- package/dist/types/types/feature-flags.d.ts +8 -0
- package/dist/types/utils/annotation/index.d.ts +12 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/extensibility/Extension/Extension/index.d.ts +2 -2
- package/dist/types-ts4.5/extensibility/Extension/InlineExtension/index.d.ts +2 -2
- package/dist/types-ts4.5/extensibility/Extension.d.ts +2 -2
- package/dist/types-ts4.5/extensibility/ExtensionComponent.d.ts +2 -2
- package/dist/types-ts4.5/extensibility/ExtensionNodeWrapper.d.ts +3 -2
- package/dist/types-ts4.5/extensibility/MultiBodiedExtension/index.d.ts +2 -2
- package/dist/types-ts4.5/extensibility/extensionNodeView.d.ts +3 -3
- package/dist/types-ts4.5/extensibility/types.d.ts +4 -0
- package/dist/types-ts4.5/types/annotation/index.d.ts +10 -0
- package/dist/types-ts4.5/types/feature-flags.d.ts +8 -0
- package/dist/types-ts4.5/utils/annotation/index.d.ts +12 -0
- package/dist/types-ts4.5/utils/index.d.ts +1 -1
- package/package.json +4 -4
|
@@ -9,7 +9,7 @@ import type { ForwardRef, getPosHandler } from '../react-node-view';
|
|
|
9
9
|
import ReactNodeView from '../react-node-view';
|
|
10
10
|
import type { EditorAppearance } from '../types';
|
|
11
11
|
import type { LegacyPortalProviderAPI } from '../ui/PortalProvider';
|
|
12
|
-
import type { ExtensionsPluginInjectionAPI } from './types';
|
|
12
|
+
import type { ExtensionsPluginInjectionAPI, MacroInteractionDesignFeatureFlags } from './types';
|
|
13
13
|
interface ExtensionNodeViewOptions {
|
|
14
14
|
appearance?: EditorAppearance;
|
|
15
15
|
}
|
|
@@ -26,8 +26,8 @@ export declare class ExtensionNode extends ReactNodeView {
|
|
|
26
26
|
extensionHandlers: ExtensionHandlers;
|
|
27
27
|
extensionNodeViewOptions?: ExtensionNodeViewOptions;
|
|
28
28
|
pluginInjectionApi: ExtensionsPluginInjectionAPI;
|
|
29
|
-
|
|
29
|
+
macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags;
|
|
30
30
|
}, forwardRef: ForwardRef): JSX.Element;
|
|
31
31
|
}
|
|
32
|
-
export default function ExtensionNodeView(portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: ExtensionsPluginInjectionAPI,
|
|
32
|
+
export default function ExtensionNodeView(portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: ExtensionsPluginInjectionAPI, macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
33
33
|
export {};
|
|
@@ -5,4 +5,8 @@ type WidthPluginType = NextEditorPlugin<'width', {
|
|
|
5
5
|
export type ExtensionsPluginInjectionAPI = PublicPluginAPI<[
|
|
6
6
|
WidthPluginType
|
|
7
7
|
]> | undefined;
|
|
8
|
+
export type MacroInteractionDesignFeatureFlags = {
|
|
9
|
+
showMacroInteractionDesignUpdates?: boolean;
|
|
10
|
+
showMacroButtonUpdates?: boolean;
|
|
11
|
+
};
|
|
8
12
|
export {};
|
|
@@ -79,6 +79,16 @@ export type InlineCommentViewComponentProps = {
|
|
|
79
79
|
*/
|
|
80
80
|
clickElementTarget?: HTMLElement;
|
|
81
81
|
deleteAnnotation: (annotationInfo: AnnotationInfo) => ActionResult;
|
|
82
|
+
/**
|
|
83
|
+
* Return a list of inline node types, which are wrapped by the annotation,
|
|
84
|
+
* for annotation with given ID.
|
|
85
|
+
*
|
|
86
|
+
* The `undefined` will be returned if `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is off.
|
|
87
|
+
*
|
|
88
|
+
* @todo: Do not forget to remove `undefined` when the
|
|
89
|
+
* `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is removed.
|
|
90
|
+
*/
|
|
91
|
+
getInlineNodeTypes: (annotationId: string) => string[] | undefined;
|
|
82
92
|
};
|
|
83
93
|
export type InlineCommentHoverComponentProps = {
|
|
84
94
|
/**
|
|
@@ -269,6 +269,14 @@ export type FeatureFlags = {
|
|
|
269
269
|
* @default false
|
|
270
270
|
*/
|
|
271
271
|
macroInteractionUpdates?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* @description
|
|
274
|
+
* Enables macro interaction visual button updates
|
|
275
|
+
*
|
|
276
|
+
* @see https://product-fabric.atlassian.net/browse/PGXT-5513
|
|
277
|
+
* @default false
|
|
278
|
+
*/
|
|
279
|
+
macroInteractionButtonUpdates?: boolean;
|
|
272
280
|
/**
|
|
273
281
|
* @description
|
|
274
282
|
* Enables bug fix on media comments
|
|
@@ -18,4 +18,16 @@ export declare function getRangeInlineNodeNames({ doc, pos, }: {
|
|
|
18
18
|
to: number;
|
|
19
19
|
};
|
|
20
20
|
}): string[] | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* This function returns a list of node types that are wrapped by an annotation mark.
|
|
23
|
+
*
|
|
24
|
+
* The `undefined` will be returned if `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is off.
|
|
25
|
+
*
|
|
26
|
+
* @todo: Do not forget to remove `undefined` when the
|
|
27
|
+
* `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is removed.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getAnnotationInlineNodeTypes(state: {
|
|
30
|
+
doc: PMNode;
|
|
31
|
+
schema: Schema;
|
|
32
|
+
}, annotationId: string): string[] | undefined;
|
|
21
33
|
export {};
|
|
@@ -2,7 +2,7 @@ import type { Node as PMNode, ResolvedPos, Schema } from '@atlaskit/editor-prose
|
|
|
2
2
|
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
export { shouldAutoLinkifyMatch } from './should-auto-linkify-tld';
|
|
5
|
-
export { canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, hasAnnotationMark, getRangeInlineNodeNames, } from './annotation';
|
|
5
|
+
export { canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, hasAnnotationMark, getRangeInlineNodeNames, } from './annotation';
|
|
6
6
|
export { getExtensionLozengeData } from './macro';
|
|
7
7
|
export type { Params } from './macro';
|
|
8
8
|
export { default as browser } from './browser';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "82.
|
|
3
|
+
"version": "82.11.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/"
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@atlaskit/analytics-namespaced-context": "^6.10.0",
|
|
103
103
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
104
104
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
105
|
-
"@atlaskit/button": "^17.
|
|
105
|
+
"@atlaskit/button": "^17.23.0",
|
|
106
106
|
"@atlaskit/code": "^15.3.0",
|
|
107
107
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
108
108
|
"@atlaskit/custom-steps": "^0.2.0",
|
|
@@ -135,8 +135,8 @@
|
|
|
135
135
|
"@atlaskit/spinner": "^16.2.0",
|
|
136
136
|
"@atlaskit/task-decision": "^17.10.0",
|
|
137
137
|
"@atlaskit/textfield": "^6.4.0",
|
|
138
|
-
"@atlaskit/theme": "^12.
|
|
139
|
-
"@atlaskit/tokens": "^1.
|
|
138
|
+
"@atlaskit/theme": "^12.11.0",
|
|
139
|
+
"@atlaskit/tokens": "^1.52.0",
|
|
140
140
|
"@atlaskit/tooltip": "^18.5.0",
|
|
141
141
|
"@atlaskit/ufo": "^0.2.0",
|
|
142
142
|
"@atlaskit/width-detector": "^4.2.0",
|