@atlaskit/editor-common 101.1.2 → 102.1.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 +25 -0
- package/dist/cjs/ai-messages/ai.js +5 -0
- package/dist/cjs/analytics/types/general-events.js +1 -1
- package/dist/cjs/collab/index.js +2 -0
- package/dist/cjs/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +26 -52
- package/dist/cjs/extensibility/MultiBodiedExtension/action-api.js +2 -0
- package/dist/cjs/insert/index.js +2 -0
- package/dist/cjs/keymaps/keymap.js +4 -2
- package/dist/cjs/lazy-node-view/index.js +1 -1
- package/dist/cjs/media-inline/inline-image-card.js +2 -0
- package/dist/cjs/messages/annotation.js +2 -0
- package/dist/cjs/messages/help-dialog.js +2 -0
- package/dist/cjs/monitoring/environment.js +2 -0
- package/dist/cjs/monitoring/error.js +3 -1
- package/dist/cjs/node-width/index.js +0 -1
- package/dist/cjs/quick-insert/assets/datasource-assets-objects.js +1 -1
- package/dist/cjs/quick-insert/assets/datasource-jira-issue.js +1 -1
- package/dist/cjs/quick-insert/assets/feedback.js +1 -1
- package/dist/cjs/quick-insert/assets/quote.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +1 -1
- package/dist/cjs/react-node-view/index.js +1 -1
- package/dist/cjs/selection/gap-cursor/selection.js +1 -1
- package/dist/cjs/selection/utils.js +2 -2
- package/dist/cjs/styles/shared/annotation.js +1 -1
- package/dist/cjs/ugc-tokens/index.js +13 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Layer/index.js +0 -1
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/cjs/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +13 -4
- package/dist/cjs/utils/calculate-toolbar-position.js +4 -0
- package/dist/cjs/utils/compareNodes.js +0 -1
- package/dist/cjs/utils/get-performance-options.js +0 -1
- package/dist/cjs/utils/is-text-input.js +0 -2
- package/dist/cjs/utils/table.js +2 -0
- package/dist/cjs/utils/validate-using-spec.js +2 -0
- package/dist/cjs/with-plugin-state/index.js +4 -270
- package/dist/es2019/ai-messages/ai.js +5 -0
- package/dist/es2019/analytics/types/general-events.js +1 -3
- package/dist/es2019/collab/index.js +2 -0
- package/dist/es2019/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +28 -54
- package/dist/es2019/extensibility/MultiBodiedExtension/action-api.js +2 -0
- package/dist/es2019/insert/index.js +2 -0
- package/dist/es2019/keymaps/keymap.js +4 -2
- package/dist/es2019/lazy-node-view/index.js +1 -1
- package/dist/es2019/media-inline/inline-image-card.js +2 -0
- package/dist/es2019/messages/annotation.js +2 -0
- package/dist/es2019/messages/help-dialog.js +2 -0
- package/dist/es2019/monitoring/environment.js +2 -0
- package/dist/es2019/monitoring/error.js +3 -1
- package/dist/es2019/node-width/index.js +0 -1
- package/dist/es2019/quick-insert/assets/datasource-assets-objects.js +1 -1
- package/dist/es2019/quick-insert/assets/datasource-jira-issue.js +1 -1
- package/dist/es2019/quick-insert/assets/feedback.js +1 -1
- package/dist/es2019/quick-insert/assets/quote.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +1 -1
- package/dist/es2019/react-node-view/index.js +1 -1
- package/dist/es2019/selection/gap-cursor/selection.js +1 -1
- package/dist/es2019/selection/utils.js +2 -2
- package/dist/es2019/styles/shared/annotation.js +1 -1
- package/dist/es2019/ugc-tokens/index.js +3 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Layer/index.js +0 -1
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/es2019/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +12 -3
- package/dist/es2019/utils/calculate-toolbar-position.js +4 -0
- package/dist/es2019/utils/compareNodes.js +0 -1
- package/dist/es2019/utils/get-performance-options.js +0 -1
- package/dist/es2019/utils/is-text-input.js +0 -2
- package/dist/es2019/utils/table.js +2 -0
- package/dist/es2019/utils/validate-using-spec.js +2 -0
- package/dist/es2019/with-plugin-state/index.js +2 -241
- package/dist/esm/ai-messages/ai.js +5 -0
- package/dist/esm/analytics/types/general-events.js +1 -3
- package/dist/esm/collab/index.js +2 -0
- package/dist/esm/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +27 -52
- package/dist/esm/extensibility/MultiBodiedExtension/action-api.js +2 -0
- package/dist/esm/insert/index.js +2 -0
- package/dist/esm/keymaps/keymap.js +4 -2
- package/dist/esm/lazy-node-view/index.js +1 -1
- package/dist/esm/media-inline/inline-image-card.js +2 -0
- package/dist/esm/messages/annotation.js +2 -0
- package/dist/esm/messages/help-dialog.js +2 -0
- package/dist/esm/monitoring/environment.js +2 -0
- package/dist/esm/monitoring/error.js +3 -1
- package/dist/esm/node-width/index.js +0 -1
- package/dist/esm/quick-insert/assets/datasource-assets-objects.js +1 -1
- package/dist/esm/quick-insert/assets/datasource-jira-issue.js +1 -1
- package/dist/esm/quick-insert/assets/feedback.js +1 -1
- package/dist/esm/quick-insert/assets/quote.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +1 -1
- package/dist/esm/react-node-view/index.js +1 -1
- package/dist/esm/selection/gap-cursor/selection.js +1 -1
- package/dist/esm/selection/utils.js +2 -2
- package/dist/esm/styles/shared/annotation.js +1 -1
- package/dist/esm/ugc-tokens/index.js +3 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Layer/index.js +0 -1
- package/dist/esm/ui-menu/ColorPickerButton/index.js +1 -1
- package/dist/esm/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +13 -4
- package/dist/esm/utils/calculate-toolbar-position.js +4 -0
- package/dist/esm/utils/compareNodes.js +0 -1
- package/dist/esm/utils/get-performance-options.js +0 -1
- package/dist/esm/utils/is-text-input.js +0 -2
- package/dist/esm/utils/table.js +2 -0
- package/dist/esm/utils/validate-using-spec.js +2 -0
- package/dist/esm/with-plugin-state/index.js +2 -270
- package/dist/types/ai-messages/ai.d.ts +5 -0
- package/dist/types/analytics/types/ai-unified-events.d.ts +13 -6
- package/dist/types/selection/utils.d.ts +3 -4
- package/dist/types/types/annotation/index.d.ts +0 -3
- package/dist/types/ugc-tokens/index.d.ts +2 -0
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +6 -0
- package/dist/types/with-plugin-state/index.d.ts +0 -42
- package/dist/types-ts4.5/ai-messages/ai.d.ts +5 -0
- package/dist/types-ts4.5/analytics/types/ai-unified-events.d.ts +13 -6
- package/dist/types-ts4.5/selection/utils.d.ts +3 -4
- package/dist/types-ts4.5/types/annotation/index.d.ts +0 -3
- package/dist/types-ts4.5/ugc-tokens/index.d.ts +2 -0
- package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +6 -0
- package/dist/types-ts4.5/with-plugin-state/index.d.ts +0 -42
- package/package.json +8 -10
- package/ugc-tokens/package.json +17 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { ResolvedPos, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const isSelectionAtEndOfNode: ($pos: ResolvedPos, parentNode?: ContentNodeWithPos) => boolean;
|
|
3
|
+
export declare const isSelectionAtStartOfNode: ($pos: ResolvedPos, parentNode?: PMNode) => boolean;
|
|
4
|
+
export declare const isSelectionAtEndOfNode: ($pos: ResolvedPos, parentNode?: PMNode) => boolean;
|
|
6
5
|
export declare function atTheEndOfDoc(state: EditorState): boolean;
|
|
7
6
|
export declare function atTheBeginningOfDoc(state: EditorState): boolean;
|
|
8
7
|
export declare function atTheEndOfBlock(state: EditorState): boolean;
|
|
@@ -84,9 +84,6 @@ export type InlineCommentViewComponentProps = {
|
|
|
84
84
|
* for annotation with given ID.
|
|
85
85
|
*
|
|
86
86
|
* The `undefined` will be returned if `editor_inline_comments_on_inline_nodes` is off.
|
|
87
|
-
*
|
|
88
|
-
* @todo: Do not forget to remove `undefined` when the
|
|
89
|
-
* `editor_inline_comments_on_inline_nodes` is removed.
|
|
90
87
|
*/
|
|
91
88
|
getInlineNodeTypes: (annotationId: string) => string[] | undefined;
|
|
92
89
|
};
|
|
@@ -7,6 +7,12 @@ export interface WithOutsideClickProps {
|
|
|
7
7
|
handleEnterKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
8
8
|
targetRef?: any;
|
|
9
9
|
closeOnTab?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Use when you want the click handler to call on the capture phase instead of during bubbling.
|
|
12
|
+
* This is useful when you're in a popup with interative UI elements that may disappear on click
|
|
13
|
+
* like when toggling UI states
|
|
14
|
+
*/
|
|
15
|
+
captureClick?: boolean;
|
|
10
16
|
}
|
|
11
17
|
export default function withReactEditorViewOuterListeners<P extends Object>(Component: React.ComponentType<React.PropsWithChildren<P>>): React.ComponentType<React.PropsWithChildren<P & WithOutsideClickProps>>;
|
|
12
18
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
4
|
import type { EventDispatcher } from '../event-dispatcher';
|
|
@@ -19,17 +18,9 @@ export type EditorActionsPrivateAccess = {
|
|
|
19
18
|
_privateSubscribe: (cb: ContextUpdateHandler) => void;
|
|
20
19
|
_privateUnsubscribe: (cb: ContextUpdateHandler) => void;
|
|
21
20
|
};
|
|
22
|
-
type EditorSharedConfigPrivateAccess = {
|
|
23
|
-
editorView: EditorView;
|
|
24
|
-
eventDispatcher: EventDispatcher;
|
|
25
|
-
};
|
|
26
21
|
export type PluginsConfig = {
|
|
27
22
|
[name: string]: PluginKey;
|
|
28
23
|
};
|
|
29
|
-
type Context = {
|
|
30
|
-
editorActions?: EditorActionsPrivateAccess;
|
|
31
|
-
editorSharedConfig?: EditorSharedConfigPrivateAccess;
|
|
32
|
-
};
|
|
33
24
|
export interface Props<P extends NamedPluginKeys> {
|
|
34
25
|
debounce?: boolean;
|
|
35
26
|
eventDispatcher?: EventDispatcher;
|
|
@@ -107,37 +98,4 @@ export declare class WithPluginStateInner<P extends NamedPluginKeys> extends Rea
|
|
|
107
98
|
componentWillUnmount(): void;
|
|
108
99
|
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
109
100
|
}
|
|
110
|
-
export declare class WithPluginStateOld<P extends NamedPluginKeys> extends React.Component<Props<P>, State> {
|
|
111
|
-
static displayName: string;
|
|
112
|
-
private listeners;
|
|
113
|
-
private debounce;
|
|
114
|
-
private notAppliedState;
|
|
115
|
-
private isSubscribed;
|
|
116
|
-
private callsCount;
|
|
117
|
-
static contextTypes: {
|
|
118
|
-
editorActions: PropTypes.Requireable<object>;
|
|
119
|
-
editorSharedConfig: PropTypes.Requireable<object>;
|
|
120
|
-
};
|
|
121
|
-
context: Context;
|
|
122
|
-
state: NamedPluginStates<P>;
|
|
123
|
-
constructor(props: Props<P>, context: Context);
|
|
124
|
-
private getEditorView;
|
|
125
|
-
private getEventDispatcher;
|
|
126
|
-
private handlePluginStateChange;
|
|
127
|
-
/**
|
|
128
|
-
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
129
|
-
*/
|
|
130
|
-
private updateState;
|
|
131
|
-
private dispatchAnalyticsEvent;
|
|
132
|
-
private getPluginsStates;
|
|
133
|
-
private subscribe;
|
|
134
|
-
private unsubscribe;
|
|
135
|
-
private onContextUpdate;
|
|
136
|
-
private subscribeToContextUpdates;
|
|
137
|
-
private unsubscribeFromContextUpdates;
|
|
138
|
-
componentDidMount(): void;
|
|
139
|
-
UNSAFE_componentWillReceiveProps(nextProps: Props<P>): void;
|
|
140
|
-
componentWillUnmount(): void;
|
|
141
|
-
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
142
|
-
}
|
|
143
101
|
export { WithPluginState };
|
|
@@ -4,6 +4,11 @@ export declare const aiMessages: {
|
|
|
4
4
|
defaultMessage: string;
|
|
5
5
|
description: string;
|
|
6
6
|
};
|
|
7
|
+
eventHubfallbackSuggestedTitlePrefix: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
7
12
|
aiToolbarTitle: {
|
|
8
13
|
id: string;
|
|
9
14
|
defaultMessage: string;
|
|
@@ -14,19 +14,26 @@ export type AIUnifiedCommonAttributes = {
|
|
|
14
14
|
aiExperienceName?: string;
|
|
15
15
|
traceIds?: string[];
|
|
16
16
|
};
|
|
17
|
-
type
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
type AIUnifiedAgentAttributes = {
|
|
18
|
+
agentName?: string;
|
|
19
|
+
agentId?: string;
|
|
20
|
+
agentCreatorType?: string;
|
|
21
|
+
agentExternalConfigReference?: string;
|
|
22
|
+
agentIsDefault?: boolean;
|
|
23
|
+
};
|
|
24
|
+
type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
|
|
25
|
+
type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
|
|
26
|
+
type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
|
|
27
|
+
type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
|
|
21
28
|
promptType?: string;
|
|
22
29
|
refinementCount?: number;
|
|
23
30
|
aiResultAction: string;
|
|
24
31
|
}, undefined>;
|
|
25
|
-
type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
|
|
32
|
+
type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
|
|
26
33
|
aiErrorMessage?: string;
|
|
27
34
|
aiErrorCode?: number;
|
|
28
35
|
}, undefined>;
|
|
29
|
-
type AIFeedbackSubmittedAEP = TrackAEP<ACTION.SUBMITTED, ACTION_SUBJECT.AI_FEEDBACK, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
|
|
36
|
+
type AIFeedbackSubmittedAEP = TrackAEP<ACTION.SUBMITTED, ACTION_SUBJECT.AI_FEEDBACK, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
|
|
30
37
|
aiFeedbackResult: 'up' | 'down';
|
|
31
38
|
}, undefined>;
|
|
32
39
|
export type AIUnifiedEventPayload = AIInteractionInitiatedAEP | AIResultViewedAEP | AIResultErrorAEP | AIInteractionDismissedAEP | AIResultActionedAEP | AIFeedbackSubmittedAEP;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { ResolvedPos, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const isSelectionAtEndOfNode: ($pos: ResolvedPos, parentNode?: ContentNodeWithPos) => boolean;
|
|
3
|
+
export declare const isSelectionAtStartOfNode: ($pos: ResolvedPos, parentNode?: PMNode) => boolean;
|
|
4
|
+
export declare const isSelectionAtEndOfNode: ($pos: ResolvedPos, parentNode?: PMNode) => boolean;
|
|
6
5
|
export declare function atTheEndOfDoc(state: EditorState): boolean;
|
|
7
6
|
export declare function atTheBeginningOfDoc(state: EditorState): boolean;
|
|
8
7
|
export declare function atTheEndOfBlock(state: EditorState): boolean;
|
|
@@ -84,9 +84,6 @@ export type InlineCommentViewComponentProps = {
|
|
|
84
84
|
* for annotation with given ID.
|
|
85
85
|
*
|
|
86
86
|
* The `undefined` will be returned if `editor_inline_comments_on_inline_nodes` is off.
|
|
87
|
-
*
|
|
88
|
-
* @todo: Do not forget to remove `undefined` when the
|
|
89
|
-
* `editor_inline_comments_on_inline_nodes` is removed.
|
|
90
87
|
*/
|
|
91
88
|
getInlineNodeTypes: (annotationId: string) => string[] | undefined;
|
|
92
89
|
};
|
|
@@ -7,6 +7,12 @@ export interface WithOutsideClickProps {
|
|
|
7
7
|
handleEnterKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
8
8
|
targetRef?: any;
|
|
9
9
|
closeOnTab?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Use when you want the click handler to call on the capture phase instead of during bubbling.
|
|
12
|
+
* This is useful when you're in a popup with interative UI elements that may disappear on click
|
|
13
|
+
* like when toggling UI states
|
|
14
|
+
*/
|
|
15
|
+
captureClick?: boolean;
|
|
10
16
|
}
|
|
11
17
|
export default function withReactEditorViewOuterListeners<P extends Object>(Component: React.ComponentType<React.PropsWithChildren<P>>): React.ComponentType<React.PropsWithChildren<P & WithOutsideClickProps>>;
|
|
12
18
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
4
|
import type { EventDispatcher } from '../event-dispatcher';
|
|
@@ -19,17 +18,9 @@ export type EditorActionsPrivateAccess = {
|
|
|
19
18
|
_privateSubscribe: (cb: ContextUpdateHandler) => void;
|
|
20
19
|
_privateUnsubscribe: (cb: ContextUpdateHandler) => void;
|
|
21
20
|
};
|
|
22
|
-
type EditorSharedConfigPrivateAccess = {
|
|
23
|
-
editorView: EditorView;
|
|
24
|
-
eventDispatcher: EventDispatcher;
|
|
25
|
-
};
|
|
26
21
|
export type PluginsConfig = {
|
|
27
22
|
[name: string]: PluginKey;
|
|
28
23
|
};
|
|
29
|
-
type Context = {
|
|
30
|
-
editorActions?: EditorActionsPrivateAccess;
|
|
31
|
-
editorSharedConfig?: EditorSharedConfigPrivateAccess;
|
|
32
|
-
};
|
|
33
24
|
export interface Props<P extends NamedPluginKeys> {
|
|
34
25
|
debounce?: boolean;
|
|
35
26
|
eventDispatcher?: EventDispatcher;
|
|
@@ -107,37 +98,4 @@ export declare class WithPluginStateInner<P extends NamedPluginKeys> extends Rea
|
|
|
107
98
|
componentWillUnmount(): void;
|
|
108
99
|
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
109
100
|
}
|
|
110
|
-
export declare class WithPluginStateOld<P extends NamedPluginKeys> extends React.Component<Props<P>, State> {
|
|
111
|
-
static displayName: string;
|
|
112
|
-
private listeners;
|
|
113
|
-
private debounce;
|
|
114
|
-
private notAppliedState;
|
|
115
|
-
private isSubscribed;
|
|
116
|
-
private callsCount;
|
|
117
|
-
static contextTypes: {
|
|
118
|
-
editorActions: PropTypes.Requireable<object>;
|
|
119
|
-
editorSharedConfig: PropTypes.Requireable<object>;
|
|
120
|
-
};
|
|
121
|
-
context: Context;
|
|
122
|
-
state: NamedPluginStates<P>;
|
|
123
|
-
constructor(props: Props<P>, context: Context);
|
|
124
|
-
private getEditorView;
|
|
125
|
-
private getEventDispatcher;
|
|
126
|
-
private handlePluginStateChange;
|
|
127
|
-
/**
|
|
128
|
-
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
129
|
-
*/
|
|
130
|
-
private updateState;
|
|
131
|
-
private dispatchAnalyticsEvent;
|
|
132
|
-
private getPluginsStates;
|
|
133
|
-
private subscribe;
|
|
134
|
-
private unsubscribe;
|
|
135
|
-
private onContextUpdate;
|
|
136
|
-
private subscribeToContextUpdates;
|
|
137
|
-
private unsubscribeFromContextUpdates;
|
|
138
|
-
componentDidMount(): void;
|
|
139
|
-
UNSAFE_componentWillReceiveProps(nextProps: Props<P>): void;
|
|
140
|
-
componentWillUnmount(): void;
|
|
141
|
-
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
142
|
-
}
|
|
143
101
|
export { WithPluginState };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "102.1.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/"
|
|
@@ -112,7 +112,8 @@
|
|
|
112
112
|
"./lazy-node-view": "./src/lazy-node-view/index.ts",
|
|
113
113
|
"./nesting": "./src/nesting/utilities.ts",
|
|
114
114
|
"./UNSAFE_do_not_use_editor_context": "./src/ui/EditorContext/index.ts",
|
|
115
|
-
"./median": "./src/utils/median.ts"
|
|
115
|
+
"./median": "./src/utils/median.ts",
|
|
116
|
+
"./ugc-tokens": "./src/ugc-tokens/index.ts"
|
|
116
117
|
},
|
|
117
118
|
"dependencies": {
|
|
118
119
|
"@atlaskit/activity-provider": "^2.5.0",
|
|
@@ -129,7 +130,7 @@
|
|
|
129
130
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
130
131
|
"@atlaskit/dropdown-menu": "^13.0.0",
|
|
131
132
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
132
|
-
"@atlaskit/editor-palette": "2.0.0",
|
|
133
|
+
"@atlaskit/editor-palette": "^2.0.0",
|
|
133
134
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
134
135
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
135
136
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
"@atlaskit/media-file-preview": "^0.11.0",
|
|
146
147
|
"@atlaskit/media-picker": "^68.0.0",
|
|
147
148
|
"@atlaskit/media-ui": "^28.0.0",
|
|
148
|
-
"@atlaskit/media-viewer": "52.0.
|
|
149
|
+
"@atlaskit/media-viewer": "^52.0.0",
|
|
149
150
|
"@atlaskit/mention": "^24.1.0",
|
|
150
151
|
"@atlaskit/menu": "^3.1.0",
|
|
151
152
|
"@atlaskit/onboarding": "^13.0.0",
|
|
@@ -153,7 +154,7 @@
|
|
|
153
154
|
"@atlaskit/popper": "^7.0.0",
|
|
154
155
|
"@atlaskit/primitives": "^14.1.0",
|
|
155
156
|
"@atlaskit/profilecard": "^23.2.0",
|
|
156
|
-
"@atlaskit/section-message": "^8.
|
|
157
|
+
"@atlaskit/section-message": "^8.1.0",
|
|
157
158
|
"@atlaskit/smart-card": "^35.2.0",
|
|
158
159
|
"@atlaskit/smart-user-picker": "^8.0.0",
|
|
159
160
|
"@atlaskit/spinner": "^18.0.0",
|
|
@@ -197,11 +198,11 @@
|
|
|
197
198
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
198
199
|
},
|
|
199
200
|
"devDependencies": {
|
|
200
|
-
"@af/visual-regression": "
|
|
201
|
+
"@af/visual-regression": "^1.3.0",
|
|
201
202
|
"@atlaskit/media-core": "^35.0.0",
|
|
202
203
|
"@atlaskit/media-test-helpers": "^35.0.0",
|
|
203
204
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
204
|
-
"@atlaskit/visual-regression": "
|
|
205
|
+
"@atlaskit/visual-regression": "^0.10.0",
|
|
205
206
|
"@testing-library/dom": "^10.1.0",
|
|
206
207
|
"@testing-library/jest-dom": "^6.4.5",
|
|
207
208
|
"@testing-library/react": "^13.4.0",
|
|
@@ -255,9 +256,6 @@
|
|
|
255
256
|
"platform_editor_react18_phase2_v2": {
|
|
256
257
|
"type": "boolean"
|
|
257
258
|
},
|
|
258
|
-
"platform_editor_is_disabled_state_element_browser": {
|
|
259
|
-
"type": "boolean"
|
|
260
|
-
},
|
|
261
259
|
"platform_editor_allow_annotation_triple_click": {
|
|
262
260
|
"type": "boolean"
|
|
263
261
|
},
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/ugc-tokens",
|
|
3
|
+
"main": "../dist/cjs/ugc-tokens/index.js",
|
|
4
|
+
"module": "../dist/esm/ugc-tokens/index.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/ugc-tokens/index.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/ugc-tokens/index.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.4": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/ugc-tokens/index.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|