@atlaskit/editor-common 112.8.1 → 112.8.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 +17 -0
- package/dist/cjs/card/ui/assets/card.js +1 -1
- package/dist/cjs/card/ui/assets/embed.js +1 -1
- package/dist/cjs/card/ui/assets/inline.js +1 -1
- package/dist/cjs/card/ui/assets/url.js +1 -1
- package/dist/cjs/extensibility/Extension/Extension/index.js +3 -3
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
- package/dist/cjs/extensibility/Extension.js +1 -1
- package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +2 -2
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/index.js +2 -2
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +2 -2
- package/dist/cjs/link/LinkSearch/withActivityProvider.js +1 -1
- package/dist/cjs/media-inline/inline-image-card.js +1 -1
- package/dist/cjs/media-inline/media-inline-image-card.js +2 -2
- package/dist/cjs/media-single/CommentBadge.js +1 -1
- package/dist/cjs/media-single/CommentBadgeNext.js +1 -1
- package/dist/cjs/media-single/MediaBadges.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/preset/core-plugin/index.js +36 -1
- package/dist/cjs/preset/core-plugin/pm-plugins/appearance-plugin.js +36 -0
- package/dist/cjs/preset/plugin-injection-api.js +27 -2
- package/dist/cjs/react-node-view/onVisibleObserverFactory.js +1 -1
- package/dist/cjs/resizer/BreakoutResizer.js +1 -1
- package/dist/cjs/resizer/Resizer.js +1 -1
- package/dist/cjs/toolbar/context.js +1 -1
- package/dist/cjs/ui/ContextPanel/context.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/FloatingToolbar/Button.js +2 -2
- package/dist/cjs/ui/Mention/index.js +1 -1
- package/dist/cjs/ui/ResizerLegacy/index.js +1 -1
- package/dist/cjs/ui/TableSelector/index.js +1 -1
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +4 -4
- package/dist/cjs/ui-menu/DropdownMenu/index.js +6 -6
- package/dist/cjs/utils/commands.js +1 -2
- package/dist/es2019/card/ui/assets/card.js +1 -1
- package/dist/es2019/card/ui/assets/embed.js +1 -1
- package/dist/es2019/card/ui/assets/inline.js +1 -1
- package/dist/es2019/card/ui/assets/url.js +1 -1
- package/dist/es2019/extensibility/Extension/Extension/index.js +3 -3
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
- package/dist/es2019/extensibility/Extension.js +1 -1
- package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +2 -2
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/index.js +2 -2
- package/dist/es2019/link/LinkSearch/LinkSearchList.js +2 -2
- package/dist/es2019/link/LinkSearch/withActivityProvider.js +1 -1
- package/dist/es2019/media-inline/inline-image-card.js +1 -1
- package/dist/es2019/media-inline/media-inline-image-card.js +2 -2
- package/dist/es2019/media-single/CommentBadge.js +1 -1
- package/dist/es2019/media-single/CommentBadgeNext.js +1 -1
- package/dist/es2019/media-single/MediaBadges.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/preset/core-plugin/index.js +34 -1
- package/dist/es2019/preset/core-plugin/pm-plugins/appearance-plugin.js +24 -0
- package/dist/es2019/preset/plugin-injection-api.js +25 -2
- package/dist/es2019/react-node-view/onVisibleObserverFactory.js +2 -0
- package/dist/es2019/resizer/BreakoutResizer.js +1 -1
- package/dist/es2019/resizer/Resizer.js +1 -1
- package/dist/es2019/toolbar/context.js +1 -1
- package/dist/es2019/ui/ContextPanel/context.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/FloatingToolbar/Button.js +2 -2
- package/dist/es2019/ui/Mention/index.js +1 -1
- package/dist/es2019/ui/ResizerLegacy/index.js +1 -1
- package/dist/es2019/ui/TableSelector/index.js +1 -1
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +4 -4
- package/dist/es2019/ui-menu/DropdownMenu/index.js +6 -6
- package/dist/es2019/utils/commands.js +1 -2
- package/dist/esm/card/ui/assets/card.js +1 -1
- package/dist/esm/card/ui/assets/embed.js +1 -1
- package/dist/esm/card/ui/assets/inline.js +1 -1
- package/dist/esm/card/ui/assets/url.js +1 -1
- package/dist/esm/extensibility/Extension/Extension/index.js +3 -3
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
- package/dist/esm/extensibility/Extension.js +1 -1
- package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +2 -2
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/index.js +2 -2
- package/dist/esm/link/LinkSearch/LinkSearchList.js +2 -2
- package/dist/esm/link/LinkSearch/withActivityProvider.js +1 -1
- package/dist/esm/media-inline/inline-image-card.js +1 -1
- package/dist/esm/media-inline/media-inline-image-card.js +2 -2
- package/dist/esm/media-single/CommentBadge.js +1 -1
- package/dist/esm/media-single/CommentBadgeNext.js +1 -1
- package/dist/esm/media-single/MediaBadges.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/preset/core-plugin/index.js +36 -1
- package/dist/esm/preset/core-plugin/pm-plugins/appearance-plugin.js +28 -0
- package/dist/esm/preset/plugin-injection-api.js +27 -2
- package/dist/esm/react-node-view/onVisibleObserverFactory.js +2 -0
- package/dist/esm/resizer/BreakoutResizer.js +1 -1
- package/dist/esm/resizer/Resizer.js +1 -1
- package/dist/esm/toolbar/context.js +1 -1
- package/dist/esm/ui/ContextPanel/context.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/FloatingToolbar/Button.js +2 -2
- package/dist/esm/ui/Mention/index.js +1 -1
- package/dist/esm/ui/ResizerLegacy/index.js +1 -1
- package/dist/esm/ui/TableSelector/index.js +1 -1
- package/dist/esm/ui-menu/ColorPickerButton/index.js +4 -4
- package/dist/esm/ui-menu/DropdownMenu/index.js +6 -6
- package/dist/esm/utils/commands.js +1 -2
- package/dist/types/preset/core-plugin/pm-plugins/appearance-plugin.d.ts +9 -0
- package/dist/types/preset/plugin-injection-api.d.ts +11 -1
- package/dist/types/types/next-editor-plugin.d.ts +15 -0
- package/dist/types-ts4.5/preset/core-plugin/pm-plugins/appearance-plugin.d.ts +9 -0
- package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +11 -1
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +15 -0
- package/package.json +3 -6
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import { type FireAnalyticsCallback } from '../analytics';
|
|
4
|
+
import type { EditorAppearance } from '../types';
|
|
4
5
|
import type { BasePluginDependenciesAPI, CorePlugin, NextEditorPlugin, PluginDependenciesAPI } from '../types/next-editor-plugin';
|
|
5
6
|
type NextEditorPluginInitializedType = ReturnType<NextEditorPlugin<any>>;
|
|
6
7
|
type SharedStateAPIProps = {
|
|
7
8
|
getEditorState: () => EditorState | undefined;
|
|
8
9
|
};
|
|
9
10
|
interface PluginInjectionAPIProps extends SharedStateAPIProps {
|
|
11
|
+
appearance?: EditorAppearance;
|
|
10
12
|
fireAnalyticsEvent?: FireAnalyticsCallback;
|
|
11
13
|
getEditorView: () => EditorView | undefined;
|
|
12
14
|
}
|
|
@@ -46,7 +48,15 @@ export declare class EditorPluginInjectionAPI implements PluginInjectionAPIDefin
|
|
|
46
48
|
private actionsAPI;
|
|
47
49
|
private commandsAPI;
|
|
48
50
|
private plugins;
|
|
49
|
-
constructor({ getEditorState, getEditorView, fireAnalyticsEvent }: PluginInjectionAPIProps);
|
|
51
|
+
constructor({ getEditorState, getEditorView, fireAnalyticsEvent, appearance }: PluginInjectionAPIProps);
|
|
52
|
+
/**
|
|
53
|
+
* Returns PM plugins from internally-registered plugins (e.g. the core plugin)
|
|
54
|
+
* that are not processed through the normal preset builder flow.
|
|
55
|
+
*/
|
|
56
|
+
getInternalPMPlugins(): Array<{
|
|
57
|
+
name: string;
|
|
58
|
+
plugin: (...args: any[]) => any;
|
|
59
|
+
}>;
|
|
50
60
|
private createAPI;
|
|
51
61
|
api(): GenericAPIWithCore;
|
|
52
62
|
onEditorViewUpdated: ({ newEditorState, oldEditorState }: EditorStateDiff) => void;
|
|
@@ -9,6 +9,7 @@ import type { Fragment, Node, Schema, Node as PMNode } from '@atlaskit/editor-pr
|
|
|
9
9
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
import type { FireAnalyticsCallback } from '../analytics';
|
|
12
|
+
import type { EditorAppearance } from './editor-appearance';
|
|
12
13
|
import type { EditorCommand, EditorCommandWithMetadata } from './editor-command';
|
|
13
14
|
import type { EditorPlugin } from './editor-plugin';
|
|
14
15
|
export interface Transformer<T> {
|
|
@@ -115,12 +116,26 @@ export type CorePlugin = NextEditorPlugin<'core', {
|
|
|
115
116
|
* @returns (boolean) if scroll was successful
|
|
116
117
|
*/
|
|
117
118
|
scrollToPos: (pos: number, scrollOptions?: boolean | ScrollIntoViewOptions) => boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Updates the editor appearance in shared state. Dispatches a ProseMirror transaction
|
|
121
|
+
* so that shared state subscribers are correctly notified of the change.
|
|
122
|
+
*
|
|
123
|
+
* @param appearance - The new editor appearance value
|
|
124
|
+
* @returns true if the update was dispatched, false if the experiment is off or the view was unavailable
|
|
125
|
+
*/
|
|
126
|
+
updateAppearance: (appearance: EditorAppearance | undefined) => boolean;
|
|
118
127
|
};
|
|
119
128
|
pluginConfiguration: {
|
|
129
|
+
appearance?: EditorAppearance;
|
|
120
130
|
fireAnalyticsEvent?: FireAnalyticsCallback;
|
|
121
131
|
getEditorView: () => EditorView | undefined;
|
|
122
132
|
};
|
|
123
133
|
sharedState: {
|
|
134
|
+
/**
|
|
135
|
+
* The appearance configuration of the editor. Used as fallback when individual
|
|
136
|
+
* plugins don't have explicit appearance configuration.
|
|
137
|
+
*/
|
|
138
|
+
appearance: EditorAppearance | undefined;
|
|
124
139
|
/**
|
|
125
140
|
* The schema of the editor. It is guarranteed to be static for its lifecycle
|
|
126
141
|
* so is safe to use `currentState`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "112.8.
|
|
3
|
+
"version": "112.8.3",
|
|
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/"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@atlaskit/primitives": "^18.0.0",
|
|
74
74
|
"@atlaskit/profilecard": "^24.44.0",
|
|
75
75
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
76
|
-
"@atlaskit/react-ufo": "^5.
|
|
76
|
+
"@atlaskit/react-ufo": "^5.5.0",
|
|
77
77
|
"@atlaskit/section-message": "^8.12.0",
|
|
78
78
|
"@atlaskit/smart-card": "^43.27.0",
|
|
79
79
|
"@atlaskit/smart-user-picker": "^9.2.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@atlaskit/status": "^3.1.0",
|
|
82
82
|
"@atlaskit/task-decision": "^19.3.0",
|
|
83
83
|
"@atlaskit/textfield": "^8.2.0",
|
|
84
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
84
|
+
"@atlaskit/tmp-editor-statsig": "^45.0.0",
|
|
85
85
|
"@atlaskit/tokens": "^11.1.0",
|
|
86
86
|
"@atlaskit/tooltip": "^21.0.0",
|
|
87
87
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -171,9 +171,6 @@
|
|
|
171
171
|
"platform_editor_typography_ugc": {
|
|
172
172
|
"type": "boolean"
|
|
173
173
|
},
|
|
174
|
-
"platform_editor_blocktaskitem_patch_3": {
|
|
175
|
-
"type": "boolean"
|
|
176
|
-
},
|
|
177
174
|
"platform_editor_block_menu_v2_patch_3": {
|
|
178
175
|
"type": "boolean"
|
|
179
176
|
},
|