@atlaskit/editor-common 129.0.0 → 129.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 +24 -0
- package/dist/cjs/clipboard/index.js +41 -21
- package/dist/cjs/extensibility/extensionNodeView.js +17 -2
- package/dist/cjs/extensibility/preserveRemixNodeView.js +150 -0
- package/dist/cjs/extensions/native-embed-maui-extension-key.js +8 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/get-matching-quick-insert-components.js +38 -9
- package/dist/cjs/quick-insert/getQuickInsertMenuRows.js +12 -0
- package/dist/cjs/quick-insert/registered-menu-model.js +7 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/clipboard/index.js +18 -6
- package/dist/es2019/extensibility/extensionNodeView.js +15 -2
- package/dist/es2019/extensibility/preserveRemixNodeView.js +132 -0
- package/dist/es2019/extensions/native-embed-maui-extension-key.js +2 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/get-matching-quick-insert-components.js +23 -3
- package/dist/es2019/quick-insert/getQuickInsertMenuRows.js +4 -0
- package/dist/es2019/quick-insert/registered-menu-model.js +1 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/clipboard/index.js +40 -20
- package/dist/esm/extensibility/extensionNodeView.js +17 -2
- package/dist/esm/extensibility/preserveRemixNodeView.js +145 -0
- package/dist/esm/extensions/native-embed-maui-extension-key.js +2 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/get-matching-quick-insert-components.js +37 -9
- package/dist/esm/quick-insert/getQuickInsertMenuRows.js +5 -0
- package/dist/esm/quick-insert/registered-menu-model.js +1 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/extensibility/preserveRemixNodeView.d.ts +33 -0
- package/dist/types/extensions/native-embed-maui-extension-key.d.ts +1 -0
- package/dist/types/quick-insert/build-quick-insert-menu-model.d.ts +1 -0
- package/dist/types/quick-insert/getQuickInsertMenuRows.d.ts +3 -0
- package/dist/types/quick-insert/registered-menu-model.d.ts +1 -0
- package/extensibility/preserve-remix-node-view/package.json +10 -0
- package/extensions/native-embed-maui-extension-key/package.json +10 -0
- package/package.json +2 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
export var getQuickInsertMenuRows = function getQuickInsertMenuRows(model) {
|
|
3
|
+
var _model$searchResults, _model$fallbackItems;
|
|
4
|
+
return [].concat(_toConsumableArray((_model$searchResults = model.searchResults) !== null && _model$searchResults !== void 0 ? _model$searchResults : model.sections.flat()), _toConsumableArray((_model$fallbackItems = model.fallbackItems) !== null && _model$fallbackItems !== void 0 ? _model$fallbackItems : []));
|
|
5
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
2
|
|
|
3
3
|
export { buildQuickInsertMenuModel } from './build-quick-insert-menu-model';
|
|
4
|
+
export { getQuickInsertMenuRows } from './getQuickInsertMenuRows';
|
|
4
5
|
export { quickInsertProviderMenuItemKey } from './getQuickInsertProviderMenuItemKey';
|
|
5
6
|
export { selectQuickInsertCategoryItems } from './selectQuickInsertCategoryItems';
|
|
6
7
|
export { getMatchingQuickInsertComponents } from './get-matching-quick-insert-components';
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "
|
|
24
|
+
var packageVersion = "129.0.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { Decoration, DecorationSource, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
import type { getPosHandler } from '../react-node-view';
|
|
4
|
+
type ExtensionView = {
|
|
5
|
+
destroy: () => void;
|
|
6
|
+
dom: HTMLElement;
|
|
7
|
+
getPos: getPosHandler;
|
|
8
|
+
ignoreMutation: (mutation: MutationRecord | {
|
|
9
|
+
target: Node;
|
|
10
|
+
type: 'selection';
|
|
11
|
+
}) => boolean;
|
|
12
|
+
init: () => NodeView;
|
|
13
|
+
node: PMNode;
|
|
14
|
+
reactComponentProps: unknown;
|
|
15
|
+
stopEvent: (event: Event) => boolean;
|
|
16
|
+
update: (node: PMNode, decorations: readonly Decoration[], innerDecorations?: DecorationSource) => boolean;
|
|
17
|
+
view: EditorView;
|
|
18
|
+
};
|
|
19
|
+
type PreservationOptions = {
|
|
20
|
+
createExtensionNode: (node: PMNode) => ExtensionView;
|
|
21
|
+
getPos: getPosHandler;
|
|
22
|
+
node: PMNode;
|
|
23
|
+
rendererKind: object;
|
|
24
|
+
renderProps: unknown;
|
|
25
|
+
view: EditorView;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A disposable ProseMirror slot around a retained React portal. destroy() parks the
|
|
29
|
+
* portal before ProseMirror disconnects its mark wrapper. After reconciliation, the
|
|
30
|
+
* replacement claims the parked portal without taking one from a still-live node.
|
|
31
|
+
*/
|
|
32
|
+
export declare function preserveRemixNodeView({ node, view, getPos, renderProps, rendererKind, createExtensionNode, }: PreservationOptions): NodeView;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NATIVE_EMBED_MAUI_EXTENSION_KEY: string;
|
|
@@ -6,6 +6,7 @@ export type QuickInsertMenuModel = {
|
|
|
6
6
|
fallbackItems?: RegisterMenuItem[];
|
|
7
7
|
footer: RegisterMenuItem | undefined;
|
|
8
8
|
root: RegisterComponent | undefined;
|
|
9
|
+
searchResults?: RegisterMenuItem[];
|
|
9
10
|
sections: QuickInsertMenuSection[];
|
|
10
11
|
};
|
|
11
12
|
export declare const buildQuickInsertMenuModel: (components: RegisterComponent[], rootComponent: SurfaceIdentifier, selectCategoryItems?: QuickInsertCategoryItemSelectionPolicy, surfaceContext?: SurfaceContext) => QuickInsertMenuModel;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { RegisterMenuItem, RegisterMenuSection } from '@atlaskit/editor-ui-control-model/types';
|
|
2
|
+
import type { QuickInsertMenuModel } from './build-quick-insert-menu-model';
|
|
3
|
+
export declare const getQuickInsertMenuRows: (model: QuickInsertMenuModel) => Array<RegisterMenuItem | RegisterMenuSection>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { buildQuickInsertMenuModel } from './build-quick-insert-menu-model';
|
|
2
|
+
export { getQuickInsertMenuRows } from './getQuickInsertMenuRows';
|
|
2
3
|
export { quickInsertProviderMenuItemKey } from './getQuickInsertProviderMenuItemKey';
|
|
3
4
|
export { selectQuickInsertCategoryItems } from './selectQuickInsertCategoryItems';
|
|
4
5
|
export { getMatchingQuickInsertComponents } from './get-matching-quick-insert-components';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/extensibility/preserve-remix-node-view",
|
|
3
|
+
"main": "../../dist/cjs/extensibility/preserveRemixNodeView.js",
|
|
4
|
+
"module": "../../dist/esm/extensibility/preserveRemixNodeView.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/extensibility/preserveRemixNodeView.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/extensibility/preserveRemixNodeView.d.ts"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/extensions/native-embed-maui-extension-key",
|
|
3
|
+
"main": "../../dist/cjs/extensions/native-embed-maui-extension-key.js",
|
|
4
|
+
"module": "../../dist/esm/extensions/native-embed-maui-extension-key.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/extensions/native-embed-maui-extension-key.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/extensions/native-embed-maui-extension-key.d.ts"
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "129.
|
|
3
|
+
"version": "129.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/"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@atlaskit/task-decision": "^21.12.0",
|
|
86
86
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
87
87
|
"@atlaskit/textfield": "^10.2.0",
|
|
88
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
88
|
+
"@atlaskit/tmp-editor-statsig": "^225.0.0",
|
|
89
89
|
"@atlaskit/tokens": "^20.3.0",
|
|
90
90
|
"@atlaskit/tooltip": "^24.4.0",
|
|
91
91
|
"@atlaskit/width-detector": "^7.2.0",
|