@atlaskit/editor-common 74.7.5 → 74.7.7
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 +12 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/resizer/Resizer.js +35 -21
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Expand/index.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/resizer/Resizer.js +27 -25
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Expand/index.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/resizer/Resizer.js +32 -21
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Expand/index.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/utils.d.ts +2 -2
- package/dist/types/card/utils.d.ts +2 -2
- package/dist/types/core-utils/inside.d.ts +1 -1
- package/dist/types/event-dispatcher/index.d.ts +1 -1
- package/dist/types/provider-factory/card-provider.d.ts +1 -1
- package/dist/types/provider-factory/quick-insert-provider.d.ts +3 -3
- package/dist/types/resizer/Resizer.d.ts +3 -7
- package/dist/types/resizer/index.d.ts +1 -1
- package/dist/types/resizer/types.d.ts +6 -7
- package/dist/types/safe-plugin/index.d.ts +1 -1
- package/dist/types/selection/types.d.ts +2 -2
- package/dist/types/transforms/expand.d.ts +1 -1
- package/dist/types/types/annotation/index.d.ts +2 -2
- package/dist/types/types/command.d.ts +2 -2
- package/dist/types/types/copy-button.d.ts +3 -3
- package/dist/types/types/editor-actions.d.ts +4 -4
- package/dist/types/types/floating-toolbar.d.ts +1 -1
- package/dist/types/types/type-ahead.d.ts +1 -1
- package/dist/types/ui/MediaSingle/grid.d.ts +1 -1
- package/dist/types/utils/collab.d.ts +1 -1
- package/dist/types/utils/document.d.ts +3 -3
- package/dist/types/utils/filter/privacy-filter.d.ts +2 -2
- package/dist/types/utils/get-performance-options.d.ts +1 -1
- package/dist/types/utils/is-text-input.d.ts +1 -1
- package/dist/types/utils/nodes.d.ts +3 -3
- package/dist/types/utils/plugin-state-factory.d.ts +1 -1
- package/dist/types/utils/referentiality.d.ts +1 -1
- package/dist/types/utils/table.d.ts +1 -1
- package/dist/types/utils/track-unsupported-content.d.ts +2 -2
- package/dist/types/utils/validate-using-spec.d.ts +2 -2
- package/dist/types/utils/validator.d.ts +1 -1
- package/dist/types/with-plugin-state/index.d.ts +1 -1
- package/dist/types/with-plugin-state/types.d.ts +1 -1
- package/dist/types-ts4.5/analytics/utils.d.ts +2 -2
- package/dist/types-ts4.5/card/utils.d.ts +2 -2
- package/dist/types-ts4.5/core-utils/inside.d.ts +1 -1
- package/dist/types-ts4.5/event-dispatcher/index.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/card-provider.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/quick-insert-provider.d.ts +3 -3
- package/dist/types-ts4.5/resizer/Resizer.d.ts +3 -7
- package/dist/types-ts4.5/resizer/index.d.ts +1 -1
- package/dist/types-ts4.5/resizer/types.d.ts +6 -7
- package/dist/types-ts4.5/safe-plugin/index.d.ts +1 -1
- package/dist/types-ts4.5/selection/types.d.ts +2 -2
- package/dist/types-ts4.5/transforms/expand.d.ts +1 -1
- package/dist/types-ts4.5/types/annotation/index.d.ts +2 -2
- package/dist/types-ts4.5/types/command.d.ts +2 -2
- package/dist/types-ts4.5/types/copy-button.d.ts +3 -3
- package/dist/types-ts4.5/types/editor-actions.d.ts +4 -4
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +1 -1
- package/dist/types-ts4.5/types/type-ahead.d.ts +1 -1
- package/dist/types-ts4.5/ui/MediaSingle/grid.d.ts +1 -1
- package/dist/types-ts4.5/utils/collab.d.ts +1 -1
- package/dist/types-ts4.5/utils/document.d.ts +3 -3
- package/dist/types-ts4.5/utils/filter/privacy-filter.d.ts +2 -2
- package/dist/types-ts4.5/utils/get-performance-options.d.ts +1 -1
- package/dist/types-ts4.5/utils/is-text-input.d.ts +1 -1
- package/dist/types-ts4.5/utils/nodes.d.ts +3 -3
- package/dist/types-ts4.5/utils/plugin-state-factory.d.ts +1 -1
- package/dist/types-ts4.5/utils/referentiality.d.ts +1 -1
- package/dist/types-ts4.5/utils/table.d.ts +1 -1
- package/dist/types-ts4.5/utils/track-unsupported-content.d.ts +2 -2
- package/dist/types-ts4.5/utils/validate-using-spec.d.ts +2 -2
- package/dist/types-ts4.5/utils/validator.d.ts +1 -1
- package/dist/types-ts4.5/with-plugin-state/index.d.ts +1 -1
- package/dist/types-ts4.5/with-plugin-state/types.d.ts +1 -1
- package/package.json +4 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MarkType, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { EditorState } from 'prosemirror-state';
|
|
3
|
-
import { IntlShape } from 'react-intl-next';
|
|
1
|
+
import type { MarkType, NodeType } from 'prosemirror-model';
|
|
2
|
+
import type { EditorState } from 'prosemirror-state';
|
|
3
|
+
import type { IntlShape } from 'react-intl-next';
|
|
4
4
|
import { Command } from './command';
|
|
5
5
|
export type MarkOptions = {
|
|
6
6
|
state: EditorState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Node } from 'prosemirror-model';
|
|
2
|
-
import { EditorView } from 'prosemirror-view';
|
|
1
|
+
import type { Node } from 'prosemirror-model';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
3
|
import type { ResolvedEditorState } from '@atlaskit/collab-provider/types';
|
|
4
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
5
|
-
import { EventDispatcher } from '../event-dispatcher';
|
|
4
|
+
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
5
|
+
import type { EventDispatcher } from '../event-dispatcher';
|
|
6
6
|
export type ContextUpdateHandler = (editorView: EditorView, eventDispatcher: EventDispatcher) => void;
|
|
7
7
|
export type ReplaceRawValue = Node | object | string;
|
|
8
8
|
export interface EditorActionsOptions<T = any> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { Node, NodeType } from 'prosemirror-model';
|
|
3
|
-
import { EditorState } from 'prosemirror-state';
|
|
3
|
+
import type { EditorState } from 'prosemirror-state';
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
5
|
import { IntlShape } from 'react-intl-next';
|
|
6
6
|
import type { EmojiId } from '@atlaskit/emoji/types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import { Fragment, Node as PMNode } from 'prosemirror-model';
|
|
3
|
-
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
4
4
|
import type { TypeAheadPayload } from '../analytics/types/type-ahead';
|
|
5
5
|
import type { SelectItemMode, TypeAheadAvailableNodes } from '../type-ahead';
|
|
6
6
|
type TypeAheadForceSelectProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
2
|
import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
3
3
|
import { EditorContainerWidth } from '../../types';
|
|
4
4
|
export declare const layoutSupportsWidth: (layout: MediaSingleLayout) => boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
2
|
export declare const getParticipantsCount: (editorState?: EditorState) => any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Node, ResolvedPos, Schema } from 'prosemirror-model';
|
|
2
|
-
import { EditorState, ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
2
|
+
import type { EditorState, ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
3
3
|
import { DispatchAnalyticsEvent } from '../analytics';
|
|
4
|
-
import { ProviderFactory } from '../provider-factory';
|
|
5
|
-
import { ReplaceRawValue, Transformer } from '../types';
|
|
4
|
+
import type { ProviderFactory } from '../provider-factory';
|
|
5
|
+
import type { ReplaceRawValue, Transformer } from '../types';
|
|
6
6
|
type ChangedFn = (node: Node<any>, pos: number, parent: Node<any>, index: number) => boolean | null | undefined | void;
|
|
7
7
|
export declare const getStepRange: (transaction: Transaction | ReadonlyTransaction) => {
|
|
8
8
|
from: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
2
|
-
import { ProviderFactory } from '../../provider-factory';
|
|
1
|
+
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
2
|
+
import type { ProviderFactory } from '../../provider-factory';
|
|
3
3
|
/**
|
|
4
4
|
* Sanitises a document where some content should not be in the document (e.g. mention names).
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
2
|
import type { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { AnalyticsEventPayload } from '../analytics';
|
|
4
4
|
export declare function getPerformanceOptions(view: EditorView): {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
1
|
+
import type { ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
2
2
|
export declare const isTextInput: (tr: Transaction | ReadonlyTransaction) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Fragment, MarkType, NodeType, Mark as PMMark, Node as PMNode, ResolvedPos, Schema } from 'prosemirror-model';
|
|
2
|
-
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
-
import { CardAppearance } from '@atlaskit/smart-card';
|
|
1
|
+
import type { Fragment, MarkType, NodeType, Mark as PMMark, Node as PMNode, ResolvedPos, Schema } from 'prosemirror-model';
|
|
2
|
+
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
import type { CardAppearance } from '@atlaskit/smart-card';
|
|
4
4
|
/**
|
|
5
5
|
* Finds all top level nodes affected by the transaction
|
|
6
6
|
* Uses from/to positions in transaction's steps to work out which nodes will
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorState, PluginKey, ReadonlyTransaction, SafeStateField, Transaction } from 'prosemirror-state';
|
|
1
|
+
import type { EditorState, PluginKey, ReadonlyTransaction, SafeStateField, Transaction } from 'prosemirror-state';
|
|
2
2
|
import { Dispatch } from '../event-dispatcher';
|
|
3
3
|
import { Command } from '../types';
|
|
4
4
|
export type Reducer<PluginState, Action> = (state: PluginState, action: Action) => PluginState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Node as PMNode } from 'prosemirror-model';
|
|
2
|
-
import { EditorState } from 'prosemirror-state';
|
|
2
|
+
import type { EditorState } from 'prosemirror-state';
|
|
3
3
|
import type { FragmentAttributes } from '@atlaskit/adf-schema/schema';
|
|
4
4
|
import { ConfirmDialogChildInfo } from '../types';
|
|
5
5
|
type LocalId = FragmentAttributes['localId'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PmNode } from 'prosemirror-model';
|
|
1
|
+
import type { Node as PmNode } from 'prosemirror-model';
|
|
2
2
|
export declare function calcTableColumnWidths(node: PmNode): number[];
|
|
3
3
|
export declare function hasMergedCell(tableNode: PmNode): boolean;
|
|
4
4
|
export declare function convertProsemirrorTableNodeToArrayOfRows(tableNode: PmNode): Array<Array<PmNode | null>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror-model';
|
|
1
|
+
import type { Node as PMNode, Schema } from 'prosemirror-model';
|
|
2
2
|
import { ACTION_SUBJECT_ID } from '../analytics';
|
|
3
|
-
import { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from './analytics';
|
|
3
|
+
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from './analytics';
|
|
4
4
|
type DispatchAnalyticsEvent = (payload: UnsupportedContentPayload) => void;
|
|
5
5
|
type DispatchAnalyticsEventTooltip = (payload: UnsupportedContentTooltipPayload) => void;
|
|
6
6
|
export declare const findAndTrackUnsupportedContentNodes: (node: PMNode, schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, ancestorHierarchy?: string) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Schema } from 'prosemirror-model';
|
|
1
|
+
import type { Schema } from 'prosemirror-model';
|
|
2
2
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
3
|
import type { ErrorCallbackOptions, Validate, ValidationError } from '@atlaskit/adf-utils/validatorTypes';
|
|
4
4
|
export declare const UNSUPPORTED_NODE_ATTRIBUTE = "unsupportedNodeAttribute";
|
|
5
|
-
import { UnsupportedContentPayload } from './analytics';
|
|
5
|
+
import type { UnsupportedContentPayload } from './analytics';
|
|
6
6
|
export type DispatchAnalyticsEvent = (event: UnsupportedContentPayload) => void;
|
|
7
7
|
export declare const validationErrorHandler: (entity: ADFEntity, error: ValidationError, options: ErrorCallbackOptions, marks: string[], validate: Validate, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => ADFEntity | {
|
|
8
8
|
type: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { PluginKey } from 'prosemirror-state';
|
|
3
|
+
import type { PluginKey } from 'prosemirror-state';
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
5
|
import { EventDispatcher } from '../event-dispatcher';
|
|
6
6
|
import type { NamedPluginKeys, NamedPluginStates } from './types';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
2
|
-
import { AnalyticsEventPayloadWithChannel } from './types';
|
|
1
|
+
import type { ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
2
|
+
import type { AnalyticsEventPayloadWithChannel } from './types';
|
|
3
3
|
export declare function getAnalyticsEventsFromTransaction(tr: Transaction | ReadonlyTransaction): AnalyticsEventPayloadWithChannel[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EditorState, ReadonlyTransaction, Selection, Transaction } from 'prosemirror-state';
|
|
2
|
-
import { EditorView } from 'prosemirror-view';
|
|
1
|
+
import type { EditorState, ReadonlyTransaction, Selection, Transaction } from 'prosemirror-state';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { LinkStepMetadata } from '@atlaskit/adf-schema/steps';
|
|
4
4
|
/**
|
|
5
5
|
* Records metadata about the user action and input method relating to a transaction
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
2
|
export declare const insideTable: (state: EditorState) => Boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Node } from 'prosemirror-model';
|
|
2
|
-
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
-
import { TypeAheadItem } from '../types/type-ahead';
|
|
1
|
+
import type { Node } from 'prosemirror-model';
|
|
2
|
+
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
import type { TypeAheadItem } from '../types/type-ahead';
|
|
4
4
|
export type QuickInsertActionInsert = (node?: Node | Record<string, any> | string, opts?: {
|
|
5
5
|
selectInlineNode?: boolean;
|
|
6
6
|
}) => Transaction;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { HandleComponent } from 're-resizable';
|
|
3
|
-
import { EnabledHandles, HandleAlignmentMethod,
|
|
4
|
-
export interface ResizableNumberSize {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
}
|
|
3
|
+
import { EnabledHandles, HandleAlignmentMethod, HandleHeightSizeType, HandleResize } from './types';
|
|
8
4
|
export type ResizerProps = {
|
|
9
5
|
enable: EnabledHandles;
|
|
10
6
|
width: number;
|
|
11
|
-
handleResizeStart: () =>
|
|
7
|
+
handleResizeStart: () => void;
|
|
12
8
|
handleResize: HandleResize;
|
|
13
9
|
handleResizeStop: HandleResize;
|
|
14
10
|
innerPadding?: number;
|
|
@@ -18,7 +14,7 @@ export type ResizerProps = {
|
|
|
18
14
|
maxWidth?: number;
|
|
19
15
|
handleWrapperStyle?: React.CSSProperties;
|
|
20
16
|
handleComponent?: HandleComponent;
|
|
21
|
-
|
|
17
|
+
handleHeightSize?: HandleHeightSizeType;
|
|
22
18
|
handleAlignmentMethod?: HandleAlignmentMethod;
|
|
23
19
|
resizeRatio?: number;
|
|
24
20
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as ResizerNext } from './Resizer';
|
|
2
|
-
export type {
|
|
2
|
+
export type { HandleHeightSizeType, EnabledHandles, HandleResize, } from './types';
|
|
@@ -3,18 +3,17 @@ export type EnabledHandles = {
|
|
|
3
3
|
left?: boolean;
|
|
4
4
|
right?: boolean;
|
|
5
5
|
};
|
|
6
|
+
export type Dimensions = {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
};
|
|
6
10
|
export type HandleResize = (newWidth: {
|
|
7
11
|
x: number;
|
|
8
12
|
y: number;
|
|
9
|
-
|
|
10
|
-
height: number;
|
|
11
|
-
}, delta: {
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
}) => number;
|
|
13
|
+
} & Dimensions, delta: Dimensions) => void;
|
|
15
14
|
export type HandleStyles = {
|
|
16
15
|
right?: React.CSSProperties;
|
|
17
16
|
left?: React.CSSProperties;
|
|
18
17
|
};
|
|
19
|
-
export type
|
|
18
|
+
export type HandleHeightSizeType = 'small' | 'medium' | 'large';
|
|
20
19
|
export type HandleAlignmentMethod = 'center' | 'sticky';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EditorState, Selection, Transaction } from 'prosemirror-state';
|
|
2
|
-
import { DecorationSet } from 'prosemirror-view';
|
|
1
|
+
import type { EditorState, Selection, Transaction } from 'prosemirror-state';
|
|
2
|
+
import type { DecorationSet } from 'prosemirror-view';
|
|
3
3
|
export declare enum RelativeSelectionPos {
|
|
4
4
|
Before = "Before",
|
|
5
5
|
Start = "Start",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema, Slice } from 'prosemirror-model';
|
|
2
|
-
import { EditorState, Selection } from 'prosemirror-state';
|
|
2
|
+
import type { EditorState, Selection } from 'prosemirror-state';
|
|
3
3
|
export declare const findExpand: (state: EditorState, selection?: Selection<any> | null) => import("prosemirror-utils").ContentNodeWithPos | undefined;
|
|
4
4
|
export declare const transformSliceToRemoveOpenExpand: (slice: Slice, schema: Schema) => Slice;
|
|
5
5
|
export declare const transformSliceNestedExpandToExpand: (slice: Slice, schema: Schema) => Slice;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Step } from 'prosemirror-transform';
|
|
2
|
+
import type { Step } from 'prosemirror-transform';
|
|
3
3
|
import { AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
4
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
|
+
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
5
5
|
import { AnnotationState, AnnotationUpdateEmitter, AnnotationUpdateEvent, AnnotationUpdateEventPayloads, OnAnnotationClickPayload } from './emitter';
|
|
6
6
|
export type { AnnotationState };
|
|
7
7
|
export type AnnotationByMatches = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
-
import { EditorView } from 'prosemirror-view';
|
|
1
|
+
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
3
|
export type CommandDispatch = (tr: Transaction) => void;
|
|
4
4
|
export type Command = (state: EditorState, dispatch?: CommandDispatch, view?: EditorView) => boolean;
|
|
5
5
|
export type HigherOrderCommand = (command: Command) => Command;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MarkType, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { EditorState } from 'prosemirror-state';
|
|
3
|
-
import { IntlShape } from 'react-intl-next';
|
|
1
|
+
import type { MarkType, NodeType } from 'prosemirror-model';
|
|
2
|
+
import type { EditorState } from 'prosemirror-state';
|
|
3
|
+
import type { IntlShape } from 'react-intl-next';
|
|
4
4
|
import { Command } from './command';
|
|
5
5
|
export type MarkOptions = {
|
|
6
6
|
state: EditorState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Node } from 'prosemirror-model';
|
|
2
|
-
import { EditorView } from 'prosemirror-view';
|
|
1
|
+
import type { Node } from 'prosemirror-model';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
3
|
import type { ResolvedEditorState } from '@atlaskit/collab-provider/types';
|
|
4
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
5
|
-
import { EventDispatcher } from '../event-dispatcher';
|
|
4
|
+
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
5
|
+
import type { EventDispatcher } from '../event-dispatcher';
|
|
6
6
|
export type ContextUpdateHandler = (editorView: EditorView, eventDispatcher: EventDispatcher) => void;
|
|
7
7
|
export type ReplaceRawValue = Node | object | string;
|
|
8
8
|
export interface EditorActionsOptions<T = any> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { Node, NodeType } from 'prosemirror-model';
|
|
3
|
-
import { EditorState } from 'prosemirror-state';
|
|
3
|
+
import type { EditorState } from 'prosemirror-state';
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
5
|
import { IntlShape } from 'react-intl-next';
|
|
6
6
|
import type { EmojiId } from '@atlaskit/emoji/types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import { Fragment, Node as PMNode } from 'prosemirror-model';
|
|
3
|
-
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
4
4
|
import type { TypeAheadPayload } from '../analytics/types/type-ahead';
|
|
5
5
|
import type { SelectItemMode, TypeAheadAvailableNodes } from '../type-ahead';
|
|
6
6
|
type TypeAheadForceSelectProps = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
2
|
import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
3
3
|
import { EditorContainerWidth } from '../../types';
|
|
4
4
|
export declare const layoutSupportsWidth: (layout: MediaSingleLayout) => boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
2
|
export declare const getParticipantsCount: (editorState?: EditorState) => any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Node, ResolvedPos, Schema } from 'prosemirror-model';
|
|
2
|
-
import { EditorState, ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
2
|
+
import type { EditorState, ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
3
3
|
import { DispatchAnalyticsEvent } from '../analytics';
|
|
4
|
-
import { ProviderFactory } from '../provider-factory';
|
|
5
|
-
import { ReplaceRawValue, Transformer } from '../types';
|
|
4
|
+
import type { ProviderFactory } from '../provider-factory';
|
|
5
|
+
import type { ReplaceRawValue, Transformer } from '../types';
|
|
6
6
|
type ChangedFn = (node: Node<any>, pos: number, parent: Node<any>, index: number) => boolean | null | undefined | void;
|
|
7
7
|
export declare const getStepRange: (transaction: Transaction | ReadonlyTransaction) => {
|
|
8
8
|
from: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
2
|
-
import { ProviderFactory } from '../../provider-factory';
|
|
1
|
+
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
2
|
+
import type { ProviderFactory } from '../../provider-factory';
|
|
3
3
|
/**
|
|
4
4
|
* Sanitises a document where some content should not be in the document (e.g. mention names).
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
2
|
import type { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { AnalyticsEventPayload } from '../analytics';
|
|
4
4
|
export declare function getPerformanceOptions(view: EditorView): {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
1
|
+
import type { ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
2
2
|
export declare const isTextInput: (tr: Transaction | ReadonlyTransaction) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Fragment, MarkType, NodeType, Mark as PMMark, Node as PMNode, ResolvedPos, Schema } from 'prosemirror-model';
|
|
2
|
-
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
-
import { CardAppearance } from '@atlaskit/smart-card';
|
|
1
|
+
import type { Fragment, MarkType, NodeType, Mark as PMMark, Node as PMNode, ResolvedPos, Schema } from 'prosemirror-model';
|
|
2
|
+
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
import type { CardAppearance } from '@atlaskit/smart-card';
|
|
4
4
|
/**
|
|
5
5
|
* Finds all top level nodes affected by the transaction
|
|
6
6
|
* Uses from/to positions in transaction's steps to work out which nodes will
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorState, PluginKey, ReadonlyTransaction, SafeStateField, Transaction } from 'prosemirror-state';
|
|
1
|
+
import type { EditorState, PluginKey, ReadonlyTransaction, SafeStateField, Transaction } from 'prosemirror-state';
|
|
2
2
|
import { Dispatch } from '../event-dispatcher';
|
|
3
3
|
import { Command } from '../types';
|
|
4
4
|
export type Reducer<PluginState, Action> = (state: PluginState, action: Action) => PluginState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Node as PMNode } from 'prosemirror-model';
|
|
2
|
-
import { EditorState } from 'prosemirror-state';
|
|
2
|
+
import type { EditorState } from 'prosemirror-state';
|
|
3
3
|
import type { FragmentAttributes } from '@atlaskit/adf-schema/schema';
|
|
4
4
|
import { ConfirmDialogChildInfo } from '../types';
|
|
5
5
|
type LocalId = FragmentAttributes['localId'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as PmNode } from 'prosemirror-model';
|
|
1
|
+
import type { Node as PmNode } from 'prosemirror-model';
|
|
2
2
|
export declare function calcTableColumnWidths(node: PmNode): number[];
|
|
3
3
|
export declare function hasMergedCell(tableNode: PmNode): boolean;
|
|
4
4
|
export declare function convertProsemirrorTableNodeToArrayOfRows(tableNode: PmNode): Array<Array<PmNode | null>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Node as PMNode, Schema } from 'prosemirror-model';
|
|
1
|
+
import type { Node as PMNode, Schema } from 'prosemirror-model';
|
|
2
2
|
import { ACTION_SUBJECT_ID } from '../analytics';
|
|
3
|
-
import { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from './analytics';
|
|
3
|
+
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from './analytics';
|
|
4
4
|
type DispatchAnalyticsEvent = (payload: UnsupportedContentPayload) => void;
|
|
5
5
|
type DispatchAnalyticsEventTooltip = (payload: UnsupportedContentTooltipPayload) => void;
|
|
6
6
|
export declare const findAndTrackUnsupportedContentNodes: (node: PMNode, schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, ancestorHierarchy?: string) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Schema } from 'prosemirror-model';
|
|
1
|
+
import type { Schema } from 'prosemirror-model';
|
|
2
2
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
3
|
import type { ErrorCallbackOptions, Validate, ValidationError } from '@atlaskit/adf-utils/validatorTypes';
|
|
4
4
|
export declare const UNSUPPORTED_NODE_ATTRIBUTE = "unsupportedNodeAttribute";
|
|
5
|
-
import { UnsupportedContentPayload } from './analytics';
|
|
5
|
+
import type { UnsupportedContentPayload } from './analytics';
|
|
6
6
|
export type DispatchAnalyticsEvent = (event: UnsupportedContentPayload) => void;
|
|
7
7
|
export declare const validationErrorHandler: (entity: ADFEntity, error: ValidationError, options: ErrorCallbackOptions, marks: string[], validate: Validate, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => ADFEntity | {
|
|
8
8
|
type: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { PluginKey } from 'prosemirror-state';
|
|
3
|
+
import type { PluginKey } from 'prosemirror-state';
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
5
|
import { EventDispatcher } from '../event-dispatcher';
|
|
6
6
|
import type { NamedPluginKeys, NamedPluginStates } from './types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "74.7.
|
|
3
|
+
"version": "74.7.7",
|
|
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/"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
74
|
-
"@atlaskit/adf-schema": "^25.
|
|
74
|
+
"@atlaskit/adf-schema": "^25.9.0",
|
|
75
75
|
"@atlaskit/adf-utils": "^18.4.0",
|
|
76
76
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
77
77
|
"@atlaskit/analytics-namespaced-context": "^6.7.0",
|
|
@@ -81,7 +81,6 @@
|
|
|
81
81
|
"@atlaskit/code": "^14.6.0",
|
|
82
82
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
83
83
|
"@atlaskit/collab-provider": "^9.2.0",
|
|
84
|
-
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
85
84
|
"@atlaskit/editor-palette": "1.5.0",
|
|
86
85
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
87
86
|
"@atlaskit/emoji": "^67.4.0",
|
|
@@ -94,11 +93,10 @@
|
|
|
94
93
|
"@atlaskit/menu": "^1.7.0",
|
|
95
94
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
96
95
|
"@atlaskit/profilecard": "^19.4.0",
|
|
97
|
-
"@atlaskit/smart-card": "^26.5.0",
|
|
98
96
|
"@atlaskit/smart-user-picker": "^6.1.0",
|
|
99
97
|
"@atlaskit/task-decision": "^17.6.0",
|
|
100
98
|
"@atlaskit/theme": "^12.5.0",
|
|
101
|
-
"@atlaskit/tokens": "^1.
|
|
99
|
+
"@atlaskit/tokens": "^1.6.0",
|
|
102
100
|
"@atlaskit/tooltip": "^17.8.0",
|
|
103
101
|
"@atlaskit/ufo": "^0.2.0",
|
|
104
102
|
"@atlaskit/width-detector": "^4.1.0",
|
|
@@ -148,6 +146,7 @@
|
|
|
148
146
|
"@atlaskit/editor-test-helpers": "^18.6.0",
|
|
149
147
|
"@atlaskit/media-core": "^34.1.0",
|
|
150
148
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
149
|
+
"@atlaskit/smart-card": "^26.5.0",
|
|
151
150
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
152
151
|
"@atlaskit/visual-regression": "*",
|
|
153
152
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|