@atlaskit/editor-core 187.48.0 → 187.48.4
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 +521 -507
- package/dist/cjs/{editor-next → composable-editor}/editor-internal.js +2 -22
- package/dist/cjs/{editor-next/index.js → composable-editor/editor.js} +14 -8
- package/dist/cjs/composable-editor.js +2 -3
- package/dist/cjs/editor.js +4 -4
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +3 -70
- package/dist/cjs/plugins/floating-toolbar/utils.js +0 -41
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -1
- package/dist/cjs/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.js +28 -11
- package/dist/cjs/ui/CollapsedEditor/index.js +3 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/{editor-next → composable-editor}/editor-internal.js +1 -23
- package/dist/es2019/{editor-next/index.js → composable-editor/editor.js} +14 -6
- package/dist/es2019/composable-editor.js +1 -1
- package/dist/es2019/editor.js +4 -4
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +1 -52
- package/dist/es2019/plugins/floating-toolbar/utils.js +0 -36
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -1
- package/dist/es2019/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.js +21 -4
- package/dist/es2019/ui/CollapsedEditor/index.js +3 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/{editor-next → composable-editor}/editor-internal.js +1 -20
- package/dist/esm/{editor-next/index.js → composable-editor/editor.js} +14 -6
- package/dist/esm/composable-editor.js +1 -1
- package/dist/esm/editor.js +4 -4
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +1 -66
- package/dist/esm/plugins/floating-toolbar/utils.js +0 -37
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -1
- package/dist/esm/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.js +21 -4
- package/dist/esm/ui/CollapsedEditor/index.js +3 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/{types-ts4.5/editor-next → types/composable-editor}/editor-internal.d.ts +4 -13
- package/dist/types/{editor-next/index.d.ts → composable-editor/editor.d.ts} +2 -4
- package/dist/types/{editor-next → composable-editor}/hooks/useMeasureEditorMountTime.d.ts +3 -3
- package/dist/types/{editor-next → composable-editor}/utils/getBaseFontSize.d.ts +1 -1
- package/dist/{types-ts4.5/editor-next → types/composable-editor}/utils/getProvidersFromEditorProps.d.ts +2 -2
- package/dist/types/{editor-next → composable-editor}/utils/sendDurationAnalytics.d.ts +4 -4
- package/dist/{types-ts4.5/editor-next → types/composable-editor}/utils/trackEditorActions.d.ts +3 -3
- package/dist/types/composable-editor.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/commands.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -4
- package/dist/types/plugins/floating-toolbar/utils.d.ts +0 -2
- package/dist/{types/editor-next → types-ts4.5/composable-editor}/editor-internal.d.ts +4 -13
- package/dist/types-ts4.5/{editor-next/index.d.ts → composable-editor/editor.d.ts} +2 -4
- package/dist/types-ts4.5/{editor-next → composable-editor}/hooks/useMeasureEditorMountTime.d.ts +3 -3
- package/dist/types-ts4.5/{editor-next → composable-editor}/utils/getBaseFontSize.d.ts +1 -1
- package/dist/{types/editor-next → types-ts4.5/composable-editor}/utils/getProvidersFromEditorProps.d.ts +2 -2
- package/dist/types-ts4.5/{editor-next → composable-editor}/utils/sendDurationAnalytics.d.ts +4 -4
- package/dist/{types/editor-next → types-ts4.5/composable-editor}/utils/trackEditorActions.d.ts +3 -3
- package/dist/types-ts4.5/composable-editor.d.ts +1 -1
- package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/toolbar-data/commands.d.ts +1 -1
- package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin.d.ts +1 -1
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/Select.d.ts +1 -1
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -4
- package/dist/types-ts4.5/plugins/floating-toolbar/utils.d.ts +0 -2
- package/package.json +2 -2
- /package/dist/cjs/{editor-next → composable-editor}/hooks/useEditorMeasuresConstructor.js +0 -0
- /package/dist/cjs/{editor-next → composable-editor}/hooks/useMeasureEditorMountTime.js +0 -0
- /package/dist/cjs/{editor-next → composable-editor}/hooks/useProviderFactory.js +0 -0
- /package/dist/cjs/{editor-next → composable-editor}/utils/editorMeasureTTICallback.js +0 -0
- /package/dist/cjs/{editor-next → composable-editor}/utils/getBaseFontSize.js +0 -0
- /package/dist/cjs/{editor-next → composable-editor}/utils/getProvidersFromEditorProps.js +0 -0
- /package/dist/cjs/{editor-next → composable-editor}/utils/handleProviders.js +0 -0
- /package/dist/cjs/{editor-next → composable-editor}/utils/sendDurationAnalytics.js +0 -0
- /package/dist/cjs/{editor-next → composable-editor}/utils/trackEditorActions.js +0 -0
- /package/dist/es2019/{editor-next → composable-editor}/hooks/useEditorMeasuresConstructor.js +0 -0
- /package/dist/es2019/{editor-next → composable-editor}/hooks/useMeasureEditorMountTime.js +0 -0
- /package/dist/es2019/{editor-next → composable-editor}/hooks/useProviderFactory.js +0 -0
- /package/dist/es2019/{editor-next → composable-editor}/utils/editorMeasureTTICallback.js +0 -0
- /package/dist/es2019/{editor-next → composable-editor}/utils/getBaseFontSize.js +0 -0
- /package/dist/es2019/{editor-next → composable-editor}/utils/getProvidersFromEditorProps.js +0 -0
- /package/dist/es2019/{editor-next → composable-editor}/utils/handleProviders.js +0 -0
- /package/dist/es2019/{editor-next → composable-editor}/utils/sendDurationAnalytics.js +0 -0
- /package/dist/es2019/{editor-next → composable-editor}/utils/trackEditorActions.js +0 -0
- /package/dist/esm/{editor-next → composable-editor}/hooks/useEditorMeasuresConstructor.js +0 -0
- /package/dist/esm/{editor-next → composable-editor}/hooks/useMeasureEditorMountTime.js +0 -0
- /package/dist/esm/{editor-next → composable-editor}/hooks/useProviderFactory.js +0 -0
- /package/dist/esm/{editor-next → composable-editor}/utils/editorMeasureTTICallback.js +0 -0
- /package/dist/esm/{editor-next → composable-editor}/utils/getBaseFontSize.js +0 -0
- /package/dist/esm/{editor-next → composable-editor}/utils/getProvidersFromEditorProps.js +0 -0
- /package/dist/esm/{editor-next → composable-editor}/utils/handleProviders.js +0 -0
- /package/dist/esm/{editor-next → composable-editor}/utils/sendDurationAnalytics.js +0 -0
- /package/dist/esm/{editor-next → composable-editor}/utils/trackEditorActions.js +0 -0
- /package/dist/types/{editor-next → composable-editor}/hooks/useEditorMeasuresConstructor.d.ts +0 -0
- /package/dist/types/{editor-next → composable-editor}/hooks/useProviderFactory.d.ts +0 -0
- /package/dist/types/{editor-next → composable-editor}/utils/editorMeasureTTICallback.d.ts +0 -0
- /package/dist/types/{editor-next → composable-editor}/utils/handleProviders.d.ts +0 -0
- /package/dist/types-ts4.5/{editor-next → composable-editor}/hooks/useEditorMeasuresConstructor.d.ts +0 -0
- /package/dist/types-ts4.5/{editor-next → composable-editor}/hooks/useProviderFactory.d.ts +0 -0
- /package/dist/types-ts4.5/{editor-next → composable-editor}/utils/editorMeasureTTICallback.d.ts +0 -0
- /package/dist/types-ts4.5/{editor-next → composable-editor}/utils/handleProviders.d.ts +0 -0
|
@@ -5,17 +5,15 @@ import type { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
|
5
5
|
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
6
6
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
7
|
import type { AllEditorPresetPluginTypes, Transformer } from '@atlaskit/editor-common/types';
|
|
8
|
-
import type { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
9
8
|
import type EditorActions from '../actions';
|
|
10
9
|
import type { EventDispatcher } from '../event-dispatcher';
|
|
11
|
-
import type { EditorNextProps
|
|
12
|
-
interface
|
|
13
|
-
props:
|
|
10
|
+
import type { EditorNextProps } from '../types/editor-props';
|
|
11
|
+
interface InternalProps {
|
|
12
|
+
props: EditorNextProps;
|
|
14
13
|
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
15
14
|
createAnalyticsEvent: CreateUIAnalyticsEvent;
|
|
16
15
|
handleSave: (view: EditorView) => void;
|
|
17
16
|
editorActions: EditorActions;
|
|
18
|
-
getExperienceStore: () => ExperienceStore | undefined;
|
|
19
17
|
onEditorCreated: (instance: {
|
|
20
18
|
view: EditorView;
|
|
21
19
|
eventDispatcher: EventDispatcher;
|
|
@@ -26,18 +24,11 @@ interface Props<PropsType> {
|
|
|
26
24
|
transformer?: Transformer<string>;
|
|
27
25
|
}) => void;
|
|
28
26
|
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
29
|
-
}
|
|
30
|
-
interface InternalProps extends Omit<Props<EditorNextProps | EditorProps>, 'getExperienceStore'> {
|
|
31
27
|
providerFactory: ProviderFactory;
|
|
32
28
|
}
|
|
33
|
-
/**
|
|
34
|
-
* EditorInternal is used for the internal editor react component
|
|
35
|
-
* with the lifecycle methods extracted into hooks.
|
|
36
|
-
*/
|
|
37
|
-
export default function EditorInternal(props: Props<EditorNextProps>): jsx.JSX.Element;
|
|
38
29
|
/**
|
|
39
30
|
* EditorInternalComponent is used to capture the common component
|
|
40
31
|
* from the `render` method of `Editor` and share it with `EditorNext`.
|
|
41
32
|
*/
|
|
42
|
-
export declare function
|
|
33
|
+
export declare function EditorInternal({ props, handleAnalyticsEvent, createAnalyticsEvent, handleSave, editorActions, providerFactory, onEditorCreated, onEditorDestroyed, preset, }: InternalProps): jsx.JSX.Element;
|
|
43
34
|
export {};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { EditorNextProps } from '../types/editor-props';
|
|
3
|
-
export declare function
|
|
4
|
-
declare
|
|
5
|
-
declare namespace EditorNext {
|
|
3
|
+
export declare function ComposableEditor(props: EditorNextProps): jsx.JSX.Element;
|
|
4
|
+
export declare namespace ComposableEditor {
|
|
6
5
|
var propTypes: {
|
|
7
6
|
minHeight: ({ appearance, minHeight, }: Pick<EditorNextProps, "appearance" | "minHeight">) => Error | null;
|
|
8
7
|
preset: ({ preset }: Pick<EditorNextProps, "preset">) => Error | null;
|
|
9
8
|
};
|
|
10
9
|
}
|
|
11
|
-
export default EditorNext;
|
package/dist/types-ts4.5/{editor-next → composable-editor}/hooks/useMeasureEditorMountTime.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
3
|
-
import { EditorNextProps, EditorProps } from '../../types/editor-props';
|
|
1
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
+
import type { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
3
|
+
import type { EditorNextProps, EditorProps } from '../../types/editor-props';
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
6
6
|
* Hook to run the analytics for the Editor component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
-
import { EditorProps } from '../../types/editor-props';
|
|
1
|
+
import type { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
+
import type { EditorProps } from '../../types/editor-props';
|
|
3
3
|
type Complete<T> = {
|
|
4
4
|
[P in keyof Required<T>]: Pick<T, P> extends Required<Pick<T, P>> ? T[P] : T[P] | undefined;
|
|
5
5
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
4
|
-
import { EditorProps } from '../../types/editor-props';
|
|
1
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
+
import type { ACTION } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
4
|
+
import type { EditorProps } from '../../types/editor-props';
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
* Util function to be used with the Editor component to send duration analytics
|
package/dist/{types/editor-next → types-ts4.5/composable-editor}/utils/trackEditorActions.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import EditorActions from '../../actions';
|
|
3
|
-
import { PerformanceTracking } from '../../types/performance-tracking';
|
|
1
|
+
import type { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type EditorActions from '../../actions';
|
|
3
|
+
import type { PerformanceTracking } from '../../types/performance-tracking';
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
6
6
|
* Util function to be used with the Editor to track the EditorActions prop
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ComposableEditor } from './composable-editor/editor';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
3
|
export declare const createPlugin: (dispatch: Dispatch) => SafePlugin<import("@atlaskit/editor-plugin-floating-toolbar").FloatingToolbarPluginData>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ValueType } from '@atlaskit/select';
|
|
2
|
+
import type { ValueType } from '@atlaskit/select';
|
|
3
3
|
import type { RenderOptionsPropsT, SelectOption } from '@atlaskit/editor-common/types';
|
|
4
4
|
export type { RenderOptionsPropsT, SelectOption };
|
|
5
5
|
export interface Props {
|
|
@@ -6,11 +6,12 @@ import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
|
6
6
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
7
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
9
|
-
import type {
|
|
9
|
+
import type { FeatureFlags, PluginInjectionAPIWithDependencies, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
11
11
|
import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
12
12
|
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
13
|
-
|
|
13
|
+
import type { Item } from '@atlaskit/editor-common/floating-toolbar';
|
|
14
|
+
export type { Item };
|
|
14
15
|
export interface Props {
|
|
15
16
|
items: Array<Item>;
|
|
16
17
|
dispatchCommand: (command?: Function) => void;
|
|
@@ -33,8 +34,6 @@ export interface Props {
|
|
|
33
34
|
OptionalPlugin<ExtensionPlugin>
|
|
34
35
|
]> | undefined;
|
|
35
36
|
}
|
|
36
|
-
export declare const isSameItem: (leftItem: Item, rightItem: Item) => boolean;
|
|
37
|
-
export declare const areSameItems: (leftArr?: Array<Item>, rightArr?: Array<Item>) => boolean;
|
|
38
37
|
export interface State {
|
|
39
38
|
scrollDisabled: boolean;
|
|
40
39
|
mounted: boolean;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
export declare const shallowEqual: (objA?: Object, objB?: Object) => boolean;
|
|
3
|
-
export declare const compareArrays: <T extends any[]>(left: T[], right: T[], compareFn?: (left: T, right: T) => boolean) => boolean;
|
|
4
2
|
export declare function findNode(parent: Node, predicate: (node: Node) => boolean): Node | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.48.
|
|
3
|
+
"version": "187.48.4",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/code": "^14.6.0",
|
|
56
56
|
"@atlaskit/date": "^0.10.0",
|
|
57
57
|
"@atlaskit/datetime-picker": "^12.10.0",
|
|
58
|
-
"@atlaskit/editor-common": "^76.
|
|
58
|
+
"@atlaskit/editor-common": "^76.1.0",
|
|
59
59
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
60
60
|
"@atlaskit/editor-markdown-transformer": "^5.2.5",
|
|
61
61
|
"@atlaskit/editor-palette": "1.5.1",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/es2019/{editor-next → composable-editor}/hooks/useEditorMeasuresConstructor.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/{editor-next → composable-editor}/hooks/useEditorMeasuresConstructor.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types-ts4.5/{editor-next → composable-editor}/hooks/useEditorMeasuresConstructor.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/types-ts4.5/{editor-next → composable-editor}/utils/editorMeasureTTICallback.d.ts
RENAMED
|
File without changes
|
|
File without changes
|