@atlaskit/editor-common 74.0.0 → 74.0.1
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 +7 -0
- package/analytics/package.json +2 -2
- package/card/package.json +2 -2
- package/collab/package.json +2 -2
- package/core-utils/package.json +2 -2
- package/dist/cjs/provider-helpers/combine-providers.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/provider-helpers/combine-providers.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/provider-helpers/combine-providers.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/__tests_external__/cases/fundamentals/test-cases/editor-is-present.d.ts +1 -1
- package/dist/types/__tests_external__/cases/fundamentals/test-cases/editor-typing.d.ts +1 -1
- package/dist/types/__tests_external__/page-objects/Editor.d.ts +2 -0
- package/dist/types/__tests_external__/page-objects/EditorSmartLink.d.ts +2 -0
- package/dist/types/__tests_external__/page-objects/Renderer.d.ts +2 -0
- package/dist/types/analytics/api.d.ts +1 -1
- package/dist/types/analytics/types/avatar.d.ts +2 -2
- package/dist/types/analytics/types/block.d.ts +3 -3
- package/dist/types/analytics/types/config-panel-events.d.ts +4 -4
- package/dist/types/analytics/types/cut-copy-events.d.ts +3 -3
- package/dist/types/analytics/types/date-events.d.ts +6 -6
- package/dist/types/analytics/types/dispatch-analytics-event.d.ts +1 -1
- package/dist/types/analytics/types/element-browser-events.d.ts +4 -4
- package/dist/types/analytics/types/events.d.ts +26 -26
- package/dist/types/analytics/types/experimental-events.d.ts +4 -4
- package/dist/types/analytics/types/extension-events.d.ts +5 -5
- package/dist/types/analytics/types/find-replace-events.d.ts +9 -9
- package/dist/types/analytics/types/format-events.d.ts +10 -10
- package/dist/types/analytics/types/general-events.d.ts +40 -40
- package/dist/types/analytics/types/inline-comment-events.d.ts +5 -5
- package/dist/types/analytics/types/insert-events.d.ts +23 -23
- package/dist/types/analytics/types/link-tool-bar-events.d.ts +14 -14
- package/dist/types/analytics/types/list-events.d.ts +11 -11
- package/dist/types/analytics/types/media-events.d.ts +12 -12
- package/dist/types/analytics/types/node-events.d.ts +11 -11
- package/dist/types/analytics/types/paste-events.d.ts +10 -10
- package/dist/types/analytics/types/performance-report.d.ts +1 -1
- package/dist/types/analytics/types/referentiality-events.d.ts +10 -10
- package/dist/types/analytics/types/selection-events.d.ts +6 -6
- package/dist/types/analytics/types/smart-links.d.ts +2 -2
- package/dist/types/analytics/types/substitute-events.d.ts +5 -5
- package/dist/types/analytics/types/table-events.d.ts +18 -18
- package/dist/types/analytics/types/toolbar-button.d.ts +2 -2
- package/dist/types/analytics/types/type-ahead.d.ts +8 -8
- package/dist/types/analytics/types/utils.d.ts +9 -9
- package/dist/types/card/utils.d.ts +2 -2
- package/dist/types/collab/types.d.ts +2 -2
- package/dist/types/event-dispatcher/index.d.ts +2 -2
- package/dist/types/extensions/combine-extension-providers.d.ts +1 -1
- package/dist/types/extensions/default-extension-provider.d.ts +1 -1
- package/dist/types/extensions/extension-handlers.d.ts +2 -2
- package/dist/types/extensions/manifest-helpers.d.ts +6 -5
- package/dist/types/extensions/module-helpers.d.ts +4 -4
- package/dist/types/extensions/types/extension-handler.d.ts +9 -9
- package/dist/types/extensions/types/extension-manifest-common.d.ts +4 -4
- package/dist/types/extensions/types/extension-manifest-toolbar-item.d.ts +11 -11
- package/dist/types/extensions/types/extension-manifest.d.ts +30 -30
- package/dist/types/extensions/types/extension-parameters.d.ts +2 -2
- package/dist/types/extensions/types/field-definitions.d.ts +12 -12
- package/dist/types/extensions/types/utils.d.ts +2 -2
- package/dist/types/hooks/useSharedPluginState.d.ts +2 -2
- package/dist/types/i18n/cs.d.ts +6 -6
- package/dist/types/i18n/da.d.ts +6 -6
- package/dist/types/i18n/de.d.ts +6 -6
- package/dist/types/i18n/en.d.ts +6 -6
- package/dist/types/i18n/en_GB.d.ts +6 -6
- package/dist/types/i18n/en_ZZ.d.ts +6 -6
- package/dist/types/i18n/es.d.ts +6 -6
- package/dist/types/i18n/et.d.ts +1 -1
- package/dist/types/i18n/fi.d.ts +6 -6
- package/dist/types/i18n/fr.d.ts +6 -6
- package/dist/types/i18n/hu.d.ts +6 -6
- package/dist/types/i18n/it.d.ts +6 -6
- package/dist/types/i18n/ja.d.ts +6 -6
- package/dist/types/i18n/ko.d.ts +6 -6
- package/dist/types/i18n/languages.d.ts +6 -6
- package/dist/types/i18n/nb.d.ts +6 -6
- package/dist/types/i18n/nl.d.ts +6 -6
- package/dist/types/i18n/pl.d.ts +6 -6
- package/dist/types/i18n/pt_BR.d.ts +6 -6
- package/dist/types/i18n/pt_PT.d.ts +1 -1
- package/dist/types/i18n/ru.d.ts +6 -6
- package/dist/types/i18n/sk.d.ts +1 -1
- package/dist/types/i18n/sv.d.ts +6 -6
- package/dist/types/i18n/th.d.ts +6 -6
- package/dist/types/i18n/tr.d.ts +6 -6
- package/dist/types/i18n/uk.d.ts +6 -6
- package/dist/types/i18n/vi.d.ts +6 -6
- package/dist/types/i18n/zh.d.ts +6 -6
- package/dist/types/i18n/zh_TW.d.ts +6 -6
- package/dist/types/node-width/index.d.ts +1 -1
- package/dist/types/normalize-feature-flags.d.ts +2 -2
- package/dist/types/preset/plugin-injection-api.d.ts +5 -5
- package/dist/types/provider-factory/autoformatting-provider.d.ts +3 -3
- package/dist/types/provider-factory/card-provider.d.ts +1 -1
- package/dist/types/provider-factory/image-upload-provider.d.ts +2 -2
- package/dist/types/provider-factory/macro-provider.d.ts +1 -1
- package/dist/types/provider-factory/media-provider.d.ts +1 -1
- package/dist/types/provider-factory/quick-insert-provider.d.ts +4 -4
- package/dist/types/provider-factory/search-provider.d.ts +1 -1
- package/dist/types/provider-factory/types.d.ts +3 -3
- package/dist/types/provider-factory/with-providers.d.ts +1 -1
- package/dist/types/provider-helpers/combine-providers.d.ts +4 -4
- package/dist/types/provider-helpers/promise-helpers.d.ts +2 -2
- package/dist/types/react-node-view/types.d.ts +6 -6
- package/dist/types/selection/gap-cursor/utils/is-ignored.d.ts +1 -1
- package/dist/types/selection/gap-cursor/utils/is-valid-target-node.d.ts +1 -1
- package/dist/types/selection/types.d.ts +1 -1
- package/dist/types/selection/utils.d.ts +2 -2
- package/dist/types/styles/shared/table.d.ts +1 -1
- package/dist/types/transforms/expand.d.ts +1 -1
- package/dist/types/types/annotation/emitter.d.ts +5 -5
- package/dist/types/types/annotation/index.d.ts +8 -8
- package/dist/types/types/collab.d.ts +2 -2
- package/dist/types/types/command.d.ts +3 -3
- package/dist/types/types/context-panel.d.ts +1 -1
- package/dist/types/types/copy-button.d.ts +2 -2
- package/dist/types/types/editor-actions.d.ts +2 -2
- package/dist/types/types/editor-appearance.d.ts +1 -1
- package/dist/types/types/editor-container-width.d.ts +2 -2
- package/dist/types/types/editor-plugin.d.ts +4 -4
- package/dist/types/types/editor-react-context.d.ts +1 -1
- package/dist/types/types/empty-state-handler.d.ts +2 -2
- package/dist/types/types/feature-flags.d.ts +3 -3
- package/dist/types/types/floating-toolbar.d.ts +26 -26
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/next-editor-plugin.d.ts +38 -38
- package/dist/types/types/plugin-factory.d.ts +3 -3
- package/dist/types/types/quick-insert.d.ts +5 -5
- package/dist/types/types/supported-browsers.d.ts +3 -3
- package/dist/types/types/toolbar.d.ts +2 -2
- package/dist/types/types/type-ahead.d.ts +7 -7
- package/dist/types/types/ui-components.d.ts +2 -2
- package/dist/types/ufo/experience-store.d.ts +2 -2
- package/dist/types/ui/BaseTheme/index.d.ts +2 -2
- package/dist/types/ui/Caption/index.d.ts +1 -1
- package/dist/types/ui/DropList/index.d.ts +1 -1
- package/dist/types/ui/ErrorBoundary/index.d.ts +1 -1
- package/dist/types/ui/EventHandlers/index.d.ts +5 -5
- package/dist/types/ui/Layer/index.d.ts +2 -2
- package/dist/types/ui/MediaSingle/index.d.ts +1 -1
- package/dist/types/ui/OverflowShadow/shadowObserver.d.ts +1 -1
- package/dist/types/ui/PortalProvider/index.d.ts +5 -5
- package/dist/types/ui/WidthProvider/index.d.ts +4 -4
- package/dist/types/ui/WithCreateAnalyticsEvent/index.d.ts +1 -1
- package/dist/types/ui/with-outer-listeners.d.ts +1 -1
- package/dist/types/ui-color/ColorPalette/Palettes/type.d.ts +2 -2
- package/dist/types/ui-menu/ArrowKeyNavigationProvider/types.d.ts +7 -7
- package/dist/types/ui-menu/ToolbarButton/index.d.ts +2 -2
- package/dist/types/ui-react/ReactEditorViewContext.d.ts +1 -1
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +2 -2
- package/dist/types/utils/analytics.d.ts +7 -7
- package/dist/types/utils/annotation/index.d.ts +1 -1
- package/dist/types/utils/browser-extensions.d.ts +6 -6
- package/dist/types/utils/collab.d.ts +1 -1
- package/dist/types/utils/compare-props.d.ts +8 -8
- package/dist/types/utils/compareNodes.d.ts +2 -2
- package/dist/types/utils/compose.d.ts +1 -1
- package/dist/types/utils/date.d.ts +1 -1
- package/dist/types/utils/dom.d.ts +1 -1
- package/dist/types/utils/error-reporter.d.ts +1 -1
- package/dist/types/utils/extension-handler.d.ts +2 -2
- package/dist/types/utils/imageLoader.d.ts +1 -1
- package/dist/types/utils/nodes.d.ts +2 -2
- package/dist/types/utils/performance/hooks/use-component-render-tracking/index.d.ts +3 -3
- package/dist/types/utils/plugin-state-factory.d.ts +3 -3
- package/dist/types/utils/profiler/render-count.d.ts +2 -2
- package/dist/types/utils/referentiality.d.ts +6 -6
- package/dist/types/utils/slice.d.ts +2 -2
- package/dist/types/utils/track-unsupported-content.d.ts +4 -4
- package/dist/types/utils/traversor.d.ts +1 -1
- package/dist/types/utils/types.d.ts +2 -2
- package/dist/types/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +2 -2
- package/dist/types/utils/validate-using-spec.d.ts +3 -3
- package/dist/types/utils/validator.d.ts +1 -1
- package/dist/types/with-plugin-state/index.d.ts +6 -6
- package/dist/types/with-plugin-state/types.d.ts +3 -3
- package/emoji/package.json +2 -2
- package/error-boundary/package.json +2 -2
- package/event-dispatcher/package.json +2 -2
- package/extensions/package.json +2 -2
- package/hooks/package.json +2 -2
- package/icons/package.json +2 -2
- package/in-product/package.json +2 -2
- package/keymaps/package.json +2 -2
- package/mention/package.json +2 -2
- package/messages/package.json +2 -2
- package/node-width/package.json +2 -2
- package/normalize-feature-flags/package.json +2 -2
- package/package.json +15 -7
- package/panel/package.json +2 -2
- package/portal-provider/package.json +2 -2
- package/preset/package.json +2 -2
- package/provider-factory/package.json +2 -2
- package/provider-helpers/package.json +2 -2
- package/react-node-view/package.json +2 -2
- package/safe-plugin/package.json +2 -2
- package/selection/package.json +2 -2
- package/styles/package.json +2 -2
- package/transforms/package.json +2 -2
- package/type-ahead/package.json +2 -2
- package/types/package.json +2 -2
- package/ufo/package.json +2 -2
- package/ui/package.json +2 -2
- package/ui-color/package.json +2 -2
- package/ui-menu/package.json +2 -2
- package/ui-react/package.json +2 -2
- package/utils/package.json +2 -2
- package/validator/package.json +2 -2
- package/with-plugin-state/package.json +2 -2
|
@@ -5,8 +5,8 @@ export interface PaletteColor {
|
|
|
5
5
|
border: string;
|
|
6
6
|
message?: MessageDescriptor;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type Palette = Array<PaletteColor>;
|
|
9
|
+
export type PaletteTooltipMessages = {
|
|
10
10
|
dark: Record<string, MessageDescriptor>;
|
|
11
11
|
light: Record<string, MessageDescriptor>;
|
|
12
12
|
};
|
|
@@ -4,33 +4,33 @@ export interface KeyDownHandlerContext {
|
|
|
4
4
|
handleArrowLeft: () => void;
|
|
5
5
|
handleTab: () => void;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export type SimpleEventHandler<T> = (event: T) => void;
|
|
8
8
|
export declare enum ArrowKeyNavigationType {
|
|
9
9
|
COLOR = "color",
|
|
10
10
|
MENU = "menu"
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type ColorPaletteArrowKeyNavigationOptions = {
|
|
13
13
|
type: ArrowKeyNavigationType.COLOR;
|
|
14
14
|
selectedRowIndex: number;
|
|
15
15
|
selectedColumnIndex: number;
|
|
16
16
|
isOpenedByKeyboard: boolean;
|
|
17
17
|
isPopupPositioned: boolean;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type ColorPaletteArrowKeyNavigationProps = ColorPaletteArrowKeyNavigationOptions & {
|
|
20
20
|
handleClose?: SimpleEventHandler<KeyboardEvent>;
|
|
21
21
|
closeOnTab?: boolean;
|
|
22
22
|
editorRef: React.RefObject<HTMLDivElement>;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type MenuArrowKeyNavigationOptions = {
|
|
25
25
|
type: ArrowKeyNavigationType.MENU;
|
|
26
26
|
disableArrowKeyNavigation?: boolean;
|
|
27
27
|
keyDownHandlerContext?: KeyDownHandlerContext;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type MenuArrowKeyNavigationProviderProps = MenuArrowKeyNavigationOptions & {
|
|
30
30
|
handleClose?: SimpleEventHandler<KeyboardEvent>;
|
|
31
31
|
onSelection?: (index: number) => void;
|
|
32
32
|
closeOnTab?: boolean;
|
|
33
33
|
editorRef: React.RefObject<HTMLDivElement>;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
36
|
-
export
|
|
35
|
+
export type ArrowKeyNavigationProviderOptions = ColorPaletteArrowKeyNavigationOptions | MenuArrowKeyNavigationOptions;
|
|
36
|
+
export type ArrowKeyNavigationProviderProps = Omit<ColorPaletteArrowKeyNavigationProps, 'editorRef'> | Omit<MenuArrowKeyNavigationProviderProps, 'editorRef'>;
|
|
@@ -5,7 +5,7 @@ import { PositionType } from '@atlaskit/tooltip';
|
|
|
5
5
|
import { TOOLBAR_ACTION_SUBJECT_ID } from '../../analytics';
|
|
6
6
|
import { MenuItem } from '../DropdownMenu';
|
|
7
7
|
export declare const TOOLBAR_BUTTON: typeof TOOLBAR_ACTION_SUBJECT_ID;
|
|
8
|
-
export
|
|
8
|
+
export type Props = {
|
|
9
9
|
buttonId?: TOOLBAR_ACTION_SUBJECT_ID;
|
|
10
10
|
className?: string;
|
|
11
11
|
disabled?: boolean;
|
|
@@ -29,7 +29,7 @@ export declare type Props = {
|
|
|
29
29
|
'aria-pressed'?: React.AriaAttributes['aria-pressed'];
|
|
30
30
|
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
31
31
|
} & Pick<ButtonProps, 'aria-label' | 'children'>;
|
|
32
|
-
export
|
|
32
|
+
export type ToolbarButtonRef = HTMLElement;
|
|
33
33
|
declare const ToolbarButton: React.ForwardRefExoticComponent<{
|
|
34
34
|
buttonId?: TOOLBAR_ACTION_SUBJECT_ID | undefined;
|
|
35
35
|
className?: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ComponentClass, StatelessComponent } from 'react';
|
|
2
|
-
|
|
2
|
+
type SimpleEventHandler<T> = (event: T) => void;
|
|
3
3
|
export interface WithOutsideClickProps {
|
|
4
4
|
handleClickOutside?: SimpleEventHandler<MouseEvent>;
|
|
5
5
|
handleEscapeKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
@@ -7,5 +7,5 @@ export interface WithOutsideClickProps {
|
|
|
7
7
|
targetRef?: any;
|
|
8
8
|
closeOnTab?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export default function withReactEditorViewOuterListeners<P>(Component: ComponentClass<P> | StatelessComponent<P>): React.FC<P & WithOutsideClickProps>;
|
|
10
|
+
export default function withReactEditorViewOuterListeners<P extends {}>(Component: ComponentClass<P> | StatelessComponent<P>): React.FC<P & WithOutsideClickProps>;
|
|
11
11
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EDITOR_APPEARANCE_CONTEXT } from '@atlaskit/analytics-namespaced-context';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics';
|
|
3
|
-
export declare const getAnalyticsAppearance: (appearance?: string
|
|
4
|
-
export declare const getAnalyticsEditorAppearance: (editorAppearance?: string
|
|
3
|
+
export declare const getAnalyticsAppearance: (appearance?: string) => EDITOR_APPEARANCE_CONTEXT | undefined;
|
|
4
|
+
export declare const getAnalyticsEditorAppearance: (editorAppearance?: string) => string;
|
|
5
5
|
export declare const getAnalyticsEventSeverity: (duration: number, normalThreshold: number, degradedThreshold: number) => SEVERITY;
|
|
6
6
|
export declare enum SEVERITY {
|
|
7
7
|
NORMAL = "normal",
|
|
@@ -10,20 +10,20 @@ export declare enum SEVERITY {
|
|
|
10
10
|
}
|
|
11
11
|
export { UNSUPPORTED_CONTENT_LEVEL_SEVERITY, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS, } from './unsupportedContent/get-unsupported-content-level-data';
|
|
12
12
|
export type { UnsupportedContentLevelsTracking } from './unsupportedContent/get-unsupported-content-level-data';
|
|
13
|
-
|
|
13
|
+
type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
|
|
14
14
|
action: Action;
|
|
15
15
|
actionSubject: ActionSubject;
|
|
16
16
|
actionSubjectId?: ActionSubjectID;
|
|
17
17
|
attributes?: Attributes;
|
|
18
18
|
eventType: EventType;
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
type TrackAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, EVENT_TYPE.TRACK>;
|
|
21
|
+
type UnsupportedContentEncounteredAEP = TrackAEP<ACTION.UNSUPPORTED_CONTENT_ENCOUNTERED, ACTION_SUBJECT.DOCUMENT, ACTION_SUBJECT_ID, {
|
|
22
22
|
unsupportedNode: Record<string, any>;
|
|
23
23
|
errorCode?: String;
|
|
24
24
|
}>;
|
|
25
|
-
export
|
|
26
|
-
export
|
|
25
|
+
export type UnsupportedContentPayload = UnsupportedContentEncounteredAEP;
|
|
26
|
+
export type UnsupportedContentTooltipPayload = AEP<ACTION.UNSUPPORTED_TOOLTIP_VIEWED, ACTION_SUBJECT.TOOLTIP, ACTION_SUBJECT_ID.ON_UNSUPPORTED_BLOCK | ACTION_SUBJECT_ID.ON_UNSUPPORTED_INLINE, {
|
|
27
27
|
unsupportedNodeType: string | undefined;
|
|
28
28
|
}, EVENT_TYPE.UI>;
|
|
29
29
|
export declare const analyticsEventKey = "EDITOR_ANALYTICS_EVENT";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
type UserBrowserExtension = 'grammarly';
|
|
2
|
+
export type UserBrowserExtensionResults = UserBrowserExtension[];
|
|
3
|
+
type BaseOptions = {
|
|
4
4
|
extensions: UserBrowserExtension[];
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type AsyncOptions = BaseOptions & {
|
|
7
7
|
async: true;
|
|
8
8
|
asyncTimeoutMs: number;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type SyncOptions = BaseOptions & {
|
|
11
11
|
async?: false;
|
|
12
12
|
asyncTimeoutMs?: never;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type Options = BaseOptions & (SyncOptions | AsyncOptions);
|
|
15
15
|
/**
|
|
16
16
|
* Call this to return a list (or a Promise of a list) of detected browser extensions.
|
|
17
17
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { EditorState } from 'prosemirror-state';
|
|
2
|
-
export declare const getParticipantsCount: (editorState?: EditorState
|
|
2
|
+
export declare const getParticipantsCount: (editorState?: EditorState) => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type ChangedData<T> = {
|
|
2
2
|
key: keyof T;
|
|
3
3
|
difference?: any;
|
|
4
4
|
maxDepthReached?: boolean;
|
|
@@ -6,24 +6,24 @@ declare type ChangedData<T> = {
|
|
|
6
6
|
oldValue?: any;
|
|
7
7
|
reactElementChanged?: boolean;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
export
|
|
9
|
+
type Changed<T> = Array<ChangedData<T>>;
|
|
10
|
+
export type PropsDifference<T> = {
|
|
11
11
|
removed: Array<keyof T>;
|
|
12
12
|
added: Array<keyof T>;
|
|
13
13
|
changed: Changed<T>;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type ShallowPropsDifference<T> = {
|
|
16
16
|
removed: Array<keyof T>;
|
|
17
17
|
added: Array<keyof T>;
|
|
18
18
|
changed: Array<keyof T>;
|
|
19
19
|
};
|
|
20
20
|
export declare const getKeys: <T>(obj: T) => (keyof T)[];
|
|
21
21
|
export declare const getKeysAddedRemovedCommon: <T>(object1: T, object2: T) => {
|
|
22
|
-
added: (keyof T)[];
|
|
23
|
-
common: (keyof T)[];
|
|
24
|
-
removed: (keyof T)[];
|
|
22
|
+
added: (keyof T & keyof (T & {}))[];
|
|
23
|
+
common: (keyof T & keyof (T & {}))[];
|
|
24
|
+
removed: (keyof T & keyof (T & {}))[];
|
|
25
25
|
};
|
|
26
|
-
export declare const serializeValue: <T>(value: T[keyof T]) => string | T[keyof T] | {
|
|
26
|
+
export declare const serializeValue: <T>(value: T[keyof T]) => string | (T[keyof T] & {}) | {
|
|
27
27
|
type: string;
|
|
28
28
|
keys: string[];
|
|
29
29
|
} | undefined;
|
|
@@ -16,8 +16,8 @@ interface NodeMetaGenerator<Type, Value> {
|
|
|
16
16
|
type: Type;
|
|
17
17
|
value: Value;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
type TextNodeMeta = NodeMetaGenerator<ContentType.TEXT, string>;
|
|
20
|
+
type NodeMeta = TextNodeMeta | NodeMetaGenerator<ContentType.NUMBER, number> | NodeMetaGenerator<ContentType.STATUS, string> | NodeMetaGenerator<ContentType.DATE, number> | NodeMetaGenerator<ContentType.MENTION, string> | NodeMetaGenerator<ContentType.LINK, string>;
|
|
21
21
|
export declare function extractMetaFromTextNode(textNode: PMNode): NodeMeta;
|
|
22
22
|
/**
|
|
23
23
|
* Compare 2 prosemirror nodes and check if it's greater, equal or less than the other node
|
|
@@ -11,7 +11,7 @@ export interface Date {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const timestampToUTCDate: (timestamp: string | number) => Date;
|
|
13
13
|
export declare const todayTimestampInUTC: () => string;
|
|
14
|
-
export declare const timestampToString: (timestamp: string | number, intl: IntlShape | null, pattern?: FORMATS
|
|
14
|
+
export declare const timestampToString: (timestamp: string | number, intl: IntlShape | null, pattern?: FORMATS) => string;
|
|
15
15
|
export declare const timestampToIsoFormat: (timestamp: string | number) => string;
|
|
16
16
|
export declare const isPastDate: (timestamp: string | number) => boolean;
|
|
17
17
|
export declare const timestampToTaskContext: (timestamp: string | number, intl: IntlShape) => string;
|
|
@@ -35,6 +35,6 @@ export declare function closestElement(node: HTMLElement | null | undefined, s:
|
|
|
35
35
|
*/
|
|
36
36
|
export declare function parsePx<PXString extends `${number}px`>(pxStr: PXString): number;
|
|
37
37
|
export declare function parsePx<PXString extends string>(pxStr: PXString): number | undefined;
|
|
38
|
-
export
|
|
38
|
+
export type MapCallback<T, S> = (elem: S, idx: number, parent: Element) => T;
|
|
39
39
|
export declare function mapElem<T>(elem: Element, callback: MapCallback<T, Element>): Array<T>;
|
|
40
40
|
export declare function maphElem<T, U extends HTMLElement>(elem: U, callback: MapCallback<T, U>): Array<T>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Extension, ExtensionHandler } from '../extensions/types';
|
|
2
|
-
export declare function getExtensionRenderer<T>(extensionHandler: Extension<T> | ExtensionHandler<T>): ExtensionHandler<T>;
|
|
1
|
+
import { Extension, ExtensionHandler, Parameters } from '../extensions/types';
|
|
2
|
+
export declare function getExtensionRenderer<T extends Parameters>(extensionHandler: Extension<T> | ExtensionHandler<T>): ExtensionHandler<T>;
|
|
@@ -10,5 +10,5 @@ export interface ImageLoaderProps {
|
|
|
10
10
|
export interface ImageLoaderState {
|
|
11
11
|
imageStatus: ImageStatus;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type ImageStatus = 'complete' | 'loading' | 'error';
|
|
14
14
|
export declare const withImageLoader: <P extends {}>(Wrapped: React.ComponentType<P & ImageLoaderProps>) => React.ComponentClass<P & ImageLoaderProps, any>;
|
|
@@ -10,7 +10,7 @@ export declare const findChangedNodesFromTransaction: (tr: Transaction) => PMNod
|
|
|
10
10
|
export declare const validNode: (node: PMNode) => boolean;
|
|
11
11
|
/** Validates prosemirror nodes, and returns true only if all nodes are valid */
|
|
12
12
|
export declare const validateNodes: (nodes: PMNode[]) => boolean;
|
|
13
|
-
|
|
13
|
+
type PMEntities = PMNode | PMMark | null | undefined;
|
|
14
14
|
export declare const isType: (node: PMEntities, type: NodeType | MarkType | undefined) => boolean | null | undefined;
|
|
15
15
|
export declare const isParagraph: (node: PMEntities, schema: Schema) => boolean | null | undefined;
|
|
16
16
|
export declare const isText: (node: PMEntities, schema: Schema) => boolean | null | undefined;
|
|
@@ -31,7 +31,7 @@ export declare const isNodeSelectedOrInRange: (anchorPosition: number, headPosit
|
|
|
31
31
|
* @param state EditorState
|
|
32
32
|
* @param fragment The fragment to be checked for
|
|
33
33
|
*/
|
|
34
|
-
export declare const isSupportedInParent: (state: EditorState, fragment: Fragment, currentAppearance?: CardAppearance
|
|
34
|
+
export declare const isSupportedInParent: (state: EditorState, fragment: Fragment, currentAppearance?: CardAppearance) => boolean;
|
|
35
35
|
/**
|
|
36
36
|
* Checks if the passed in node is a media node
|
|
37
37
|
* Includes media, mediaInline, mediaGroup, mediaSingle
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PropsDifference, ShallowPropsDifference } from '../../../compare-props';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type PropsDiff<Props> = ShallowPropsDifference<Props> | PropsDifference<Props>;
|
|
3
|
+
type OnRenderCb<Props = undefined> = ({ renderCount, propsDifference, }: {
|
|
4
4
|
renderCount: number;
|
|
5
5
|
propsDifference: PropsDiff<Props> | undefined;
|
|
6
6
|
componentId: string;
|
|
7
7
|
}) => void;
|
|
8
|
-
export
|
|
8
|
+
export type UseComponentRenderTrackingArgs<Props = undefined> = {
|
|
9
9
|
onRender: OnRenderCb<Props>;
|
|
10
10
|
propsDiffingOptions?: {
|
|
11
11
|
enabled: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EditorState, PluginKey, ReadonlyTransaction, SafeStateField, Transaction } from 'prosemirror-state';
|
|
2
2
|
import { Dispatch } from '../event-dispatcher';
|
|
3
3
|
import { Command } from '../types';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export type Reducer<PluginState, Action> = (state: PluginState, action: Action) => PluginState;
|
|
5
|
+
type MapState<PluginState> = (tr: ReadonlyTransaction, pluginState: PluginState, editorState: EditorState) => PluginState;
|
|
6
|
+
type SafePlugin<PluginState, Action, InitialState extends PluginState> = {
|
|
7
7
|
createPluginState: (dispatch: Dispatch, initialState: InitialState | ((state: EditorState) => InitialState)) => SafeStateField<PluginState>;
|
|
8
8
|
createCommand: <A = Action>(action: A | ((state: Readonly<EditorState>) => A | false), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
9
9
|
getPluginState: (state: EditorState) => PluginState;
|
|
@@ -3,7 +3,7 @@ interface ComponentInstanceRenderCounter {
|
|
|
3
3
|
instanceId: string;
|
|
4
4
|
count: number;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type ProfilerData = {
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
components?: {
|
|
9
9
|
[componentId: string]: {
|
|
@@ -13,7 +13,7 @@ declare type ProfilerData = {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
type RenderCountProfilerInstanceParams = {
|
|
17
17
|
store: Object;
|
|
18
18
|
};
|
|
19
19
|
export declare class RenderCountProfiler {
|
|
@@ -2,17 +2,17 @@ import { Node as PMNode } from 'prosemirror-model';
|
|
|
2
2
|
import { EditorState } from 'prosemirror-state';
|
|
3
3
|
import type { FragmentAttributes } from '@atlaskit/adf-schema/schema';
|
|
4
4
|
import { ConfirmDialogChildInfo } from '../types';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type LocalId = FragmentAttributes['localId'];
|
|
6
|
+
type NodeAndTargetLinkages = {
|
|
7
7
|
readonly localId: LocalId;
|
|
8
8
|
readonly name: string;
|
|
9
9
|
readonly node: PMNode;
|
|
10
10
|
readonly pos: number;
|
|
11
11
|
readonly targets: LocalId[];
|
|
12
12
|
};
|
|
13
|
-
export declare const isReferencedSource: (state: EditorState, node?: PMNode
|
|
13
|
+
export declare const isReferencedSource: (state: EditorState, node?: PMNode) => boolean;
|
|
14
14
|
export declare const getConnections: (state: EditorState) => Record<string, NodeAndTargetLinkages>;
|
|
15
|
-
export declare const removeConnectedNodes: (state: EditorState, node?: PMNode
|
|
16
|
-
export declare const getChildrenInfo: (state: EditorState, node?: PMNode
|
|
17
|
-
export declare const getNodeName: (state: EditorState, node?: PMNode
|
|
15
|
+
export declare const removeConnectedNodes: (state: EditorState, node?: PMNode) => import("prosemirror-state").Transaction<any>;
|
|
16
|
+
export declare const getChildrenInfo: (state: EditorState, node?: PMNode) => ConfirmDialogChildInfo[];
|
|
17
|
+
export declare const getNodeName: (state: EditorState, node?: PMNode) => string;
|
|
18
18
|
export {};
|
|
@@ -5,7 +5,7 @@ import { Fragment, Node, Slice } from 'prosemirror-model';
|
|
|
5
5
|
export declare function getFragmentBackingArray(fragment: Fragment): ReadonlyArray<Node>;
|
|
6
6
|
export declare function mapFragment(content: Fragment, callback: (node: Node, parent: Node | null, index: number) => Node | Node[] | Fragment | null, parent?: Node | null): Fragment<any>;
|
|
7
7
|
export declare function mapSlice(slice: Slice, callback: (node: Node, parent: Node | null, index: number) => Node | Node[] | Fragment | null): Slice;
|
|
8
|
-
export
|
|
8
|
+
export type FlatMapCallback = (node: Node, index: number, fragment: Fragment) => Node | Node[];
|
|
9
9
|
export declare function flatmap(fragment: Fragment, callback: FlatMapCallback): Fragment;
|
|
10
|
-
export
|
|
10
|
+
export type MapWithCallback<T> = (node: Node, index: number, fragment: Fragment) => T;
|
|
11
11
|
export declare function mapChildren<T>(node: Node | Fragment, callback: MapWithCallback<T>): Array<T>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Node as PMNode, Schema } from 'prosemirror-model';
|
|
2
2
|
import { ACTION_SUBJECT_ID } from '../analytics';
|
|
3
3
|
import { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from './analytics';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type DispatchAnalyticsEvent = (payload: UnsupportedContentPayload) => void;
|
|
5
|
+
type DispatchAnalyticsEventTooltip = (payload: UnsupportedContentTooltipPayload) => void;
|
|
6
6
|
export declare const findAndTrackUnsupportedContentNodes: (node: PMNode, schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, ancestorHierarchy?: string) => void;
|
|
7
7
|
interface UnsupportedNode {
|
|
8
8
|
type: string;
|
|
@@ -15,6 +15,6 @@ interface UnsupportedNode {
|
|
|
15
15
|
[key: string]: any;
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
export declare const fireUnsupportedEvent: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, actionSubjectId: ACTION_SUBJECT_ID, unsupportedNode: UnsupportedNode, errorCode?: string
|
|
19
|
-
export declare const trackUnsupportedContentTooltipDisplayedFor: (dispatchAnalyticsEvent: DispatchAnalyticsEventTooltip, unsupportedContentType: UnsupportedContentTooltipPayload['actionSubjectId'], originalNodeType?: string
|
|
18
|
+
export declare const fireUnsupportedEvent: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, actionSubjectId: ACTION_SUBJECT_ID, unsupportedNode: UnsupportedNode, errorCode?: string) => void;
|
|
19
|
+
export declare const trackUnsupportedContentTooltipDisplayedFor: (dispatchAnalyticsEvent: DispatchAnalyticsEventTooltip, unsupportedContentType: UnsupportedContentTooltipPayload['actionSubjectId'], originalNodeType?: string) => void;
|
|
20
20
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
2
|
+
export type Diff<T, K> = Omit<T, keyof K>;
|
|
@@ -4,11 +4,11 @@ export declare enum UNSUPPORTED_CONTENT_LEVEL_SEVERITY {
|
|
|
4
4
|
DEGRADED = "degraded",
|
|
5
5
|
BLOCKING = "blocking"
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type UnsupportedContentLevelThresholds = {
|
|
8
8
|
blocking: number;
|
|
9
9
|
degraded: number;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type UnsupportedContentLevelsTracking = {
|
|
12
12
|
enabled: boolean;
|
|
13
13
|
thresholds?: Partial<UnsupportedContentLevelThresholds>;
|
|
14
14
|
samplingRates?: {
|
|
@@ -3,14 +3,14 @@ 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
5
|
import { UnsupportedContentPayload } from './analytics';
|
|
6
|
-
export
|
|
7
|
-
export declare const validationErrorHandler: (entity: ADFEntity, error: ValidationError, options: ErrorCallbackOptions, marks: string[], validate: Validate, dispatchAnalyticsEvent?: DispatchAnalyticsEvent
|
|
6
|
+
export type DispatchAnalyticsEvent = (event: UnsupportedContentPayload) => void;
|
|
7
|
+
export declare const validationErrorHandler: (entity: ADFEntity, error: ValidationError, options: ErrorCallbackOptions, marks: string[], validate: Validate, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => ADFEntity | {
|
|
8
8
|
type: string;
|
|
9
9
|
attrs: {
|
|
10
10
|
originalValue: ADFEntity;
|
|
11
11
|
};
|
|
12
12
|
} | undefined;
|
|
13
|
-
export declare const validateADFEntity: (schema: Schema, node: ADFEntity, dispatchAnalyticsEvent?: DispatchAnalyticsEvent
|
|
13
|
+
export declare const validateADFEntity: (schema: Schema, node: ADFEntity, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => ADFEntity;
|
|
14
14
|
export declare function wrapWithUnsupported(originalValue: ADFEntity, type?: 'block' | 'inline' | 'mark'): {
|
|
15
15
|
type: string;
|
|
16
16
|
attrs: {
|
|
@@ -3,7 +3,7 @@ export declare const ADFStages: {
|
|
|
3
3
|
readonly FINAL: "final";
|
|
4
4
|
readonly STAGE_0: "stage0";
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type ADFStage = (typeof ADFStages)[keyof typeof ADFStages];
|
|
7
7
|
export interface ADDoc {
|
|
8
8
|
version: 1;
|
|
9
9
|
type: 'doc';
|
|
@@ -4,7 +4,7 @@ import { 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';
|
|
7
|
-
export
|
|
7
|
+
export type PerformanceOptions = {
|
|
8
8
|
samplingRate: number;
|
|
9
9
|
slowThreshold: number;
|
|
10
10
|
trackingEnabled: boolean;
|
|
@@ -12,21 +12,21 @@ export declare type PerformanceOptions = {
|
|
|
12
12
|
export interface State {
|
|
13
13
|
[name: string]: any;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
export
|
|
15
|
+
type ContextUpdateHandler = (editorView: EditorView, eventDispatcher: EventDispatcher) => void;
|
|
16
|
+
export type EditorActionsPrivateAccess = {
|
|
17
17
|
_privateGetEditorView: () => EditorView;
|
|
18
18
|
_privateGetEventDispatcher: () => EventDispatcher;
|
|
19
19
|
_privateSubscribe: (cb: ContextUpdateHandler) => void;
|
|
20
20
|
_privateUnsubscribe: (cb: ContextUpdateHandler) => void;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
type EditorSharedConfigPrivateAccess = {
|
|
23
23
|
editorView: EditorView;
|
|
24
24
|
eventDispatcher: EventDispatcher;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type PluginsConfig = {
|
|
27
27
|
[name: string]: PluginKey;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
type Context = {
|
|
30
30
|
editorActions?: EditorActionsPrivateAccess;
|
|
31
31
|
editorSharedConfig?: EditorSharedConfigPrivateAccess;
|
|
32
32
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PluginKey } from 'prosemirror-state';
|
|
2
|
-
export
|
|
2
|
+
export type NamedPluginKeys = Readonly<{
|
|
3
3
|
[stateName: string]: PluginKey;
|
|
4
4
|
}>;
|
|
5
|
-
export
|
|
5
|
+
export type NamedPluginStates<P extends NamedPluginKeys> = Readonly<Partial<{
|
|
6
6
|
[K in keyof P]: P[K] extends PluginKey<infer T> ? T : never;
|
|
7
7
|
}>>;
|
|
8
|
-
export
|
|
8
|
+
export type Writeable<T> = {
|
|
9
9
|
-readonly [P in keyof T]: T[P];
|
|
10
10
|
};
|
package/emoji/package.json
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"types": "../dist/types/ui/ErrorBoundary/index.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
|
-
">=4.
|
|
9
|
+
">=4.5 <4.9": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.
|
|
11
|
+
"../dist/types-ts4.5/ui/ErrorBoundary/index.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"types": "../dist/types/event-dispatcher/index.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
|
-
">=4.
|
|
9
|
+
">=4.5 <4.9": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.
|
|
11
|
+
"../dist/types-ts4.5/event-dispatcher/index.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
package/extensions/package.json
CHANGED
package/hooks/package.json
CHANGED
package/icons/package.json
CHANGED
package/in-product/package.json
CHANGED
package/keymaps/package.json
CHANGED
package/mention/package.json
CHANGED