@atlaskit/editor-common 130.3.2 → 130.4.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 +40 -0
- package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +2 -2
- package/dist/cjs/collab/index.js +2 -2
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/cjs/element-browser/components/ElementSearch.js +8 -8
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +3 -3
- package/dist/cjs/extensions/buildMenuItem.js +5 -2
- package/dist/cjs/guideline/defaultGuideline.js +2 -2
- package/dist/cjs/guideline/getContainerWidthOrFullEditorWidth.js +4 -4
- package/dist/cjs/guideline/getMediaSingleDimensions.js +2 -2
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +2 -2
- package/dist/cjs/media-inline/inline-image-card.js +2 -2
- package/dist/cjs/media-inline/inline-image-wrapper.js +2 -2
- package/dist/cjs/media-inline/media-inline-image-card.js +2 -2
- package/dist/cjs/media-single/CommentBadge.js +2 -2
- package/dist/cjs/media-single/calcMediaSingleMaxWidth.js +5 -5
- package/dist/cjs/media-single/getMediaSingleInitialWidth.js +5 -5
- package/dist/cjs/media-single/utils.js +4 -4
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/nesting/transformContainerNodesWhenRequired.js +2 -2
- package/dist/cjs/node-selection/index.js +2 -2
- package/dist/cjs/node-width/index.js +8 -8
- package/dist/cjs/quick-insert/build-quick-insert-menu-model.js +4 -2
- package/dist/cjs/quick-insert/get-matching-quick-insert-components.js +9 -6
- package/dist/cjs/quick-insert/quick-insert-rank.js +32 -0
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +0 -4
- package/dist/cjs/resizer/BreakoutResizer.js +6 -6
- package/dist/cjs/resizer/useBreakoutGuidelines.js +9 -9
- package/dist/cjs/selection/index.js +13 -13
- package/dist/cjs/styles/shared/blockquote.js +2 -2
- package/dist/cjs/styles/shared/calcTableWidth.js +4 -4
- package/dist/cjs/styles/shared/mapBackgroundColors.js +2 -2
- package/dist/cjs/styles/shared/media-single.js +2 -2
- package/dist/cjs/styles/shared/panel.js +2 -2
- package/dist/cjs/styles/shared/table.js +4 -3
- package/dist/cjs/table/NewSortingIcon.js +4 -3
- package/dist/cjs/toolbar/EditorToolbarUIProvider.js +2 -2
- package/dist/cjs/type-ahead/item-rank.js +36 -0
- package/dist/cjs/ui/BaseTheme/index.js +2 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Expand/index.js +2 -2
- package/dist/cjs/ui/HoverLinkOverlay/index.js +2 -2
- package/dist/cjs/ui/MediaSingle/grid.js +3 -3
- package/dist/cjs/ui/MediaSingle/index.js +5 -5
- package/dist/cjs/ui/MediaSingle/styled.js +5 -5
- package/dist/cjs/ui/PanelTextInput/styles.js +2 -2
- package/dist/cjs/ui/Popup/index.js +2 -2
- package/dist/cjs/ui/ResizerLegacy/index.js +2 -2
- package/dist/cjs/ui/TableSelector/index.js +2 -2
- package/dist/cjs/ui/UnsupportedBlock/index.js +2 -2
- package/dist/cjs/ui/UnsupportedInline/index.js +2 -2
- package/dist/cjs/ui-menu/DropdownMenu/index.js +2 -2
- package/dist/cjs/utils/areDocsEqualByBlockStructureAndText.js +2 -2
- package/dist/cjs/utils/breakout.js +10 -10
- package/dist/cjs/utils/calculateSnapPoints.js +2 -2
- package/dist/cjs/utils/filter/privacy-filter.js +2 -2
- package/dist/cjs/utils/page-element-counts.js +4 -4
- package/dist/cjs/utils/processRawValue.js +21 -10
- package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -3
- package/dist/es2019/card/MediaAndEmbedsToolbar/index.js +1 -1
- package/dist/es2019/collab/index.js +1 -1
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +1 -1
- package/dist/es2019/element-browser/components/ElementSearch.js +2 -2
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +1 -1
- package/dist/es2019/extensions/buildMenuItem.js +3 -0
- package/dist/es2019/guideline/defaultGuideline.js +1 -1
- package/dist/es2019/guideline/getContainerWidthOrFullEditorWidth.js +1 -1
- package/dist/es2019/guideline/getMediaSingleDimensions.js +1 -1
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +1 -1
- package/dist/es2019/media-inline/inline-image-card.js +1 -1
- package/dist/es2019/media-inline/inline-image-wrapper.js +1 -1
- package/dist/es2019/media-inline/media-inline-image-card.js +1 -1
- package/dist/es2019/media-single/CommentBadge.js +1 -1
- package/dist/es2019/media-single/calcMediaSingleMaxWidth.js +1 -1
- package/dist/es2019/media-single/getMediaSingleInitialWidth.js +1 -1
- package/dist/es2019/media-single/utils.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/nesting/transformContainerNodesWhenRequired.js +1 -1
- package/dist/es2019/node-selection/index.js +1 -1
- package/dist/es2019/node-width/index.js +1 -1
- package/dist/es2019/quick-insert/build-quick-insert-menu-model.js +4 -2
- package/dist/es2019/quick-insert/get-matching-quick-insert-components.js +9 -6
- package/dist/es2019/quick-insert/quick-insert-rank.js +28 -0
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +0 -4
- package/dist/es2019/resizer/BreakoutResizer.js +1 -1
- package/dist/es2019/resizer/useBreakoutGuidelines.js +1 -1
- package/dist/es2019/selection/index.js +2 -2
- package/dist/es2019/styles/shared/blockquote.js +1 -1
- package/dist/es2019/styles/shared/calcTableWidth.js +1 -1
- package/dist/es2019/styles/shared/mapBackgroundColors.js +1 -1
- package/dist/es2019/styles/shared/media-single.js +1 -1
- package/dist/es2019/styles/shared/panel.js +1 -1
- package/dist/es2019/styles/shared/table.js +2 -1
- package/dist/es2019/table/NewSortingIcon.js +2 -1
- package/dist/es2019/toolbar/EditorToolbarUIProvider.js +1 -1
- package/dist/es2019/type-ahead/item-rank.js +27 -0
- package/dist/es2019/ui/BaseTheme/index.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Expand/index.js +1 -1
- package/dist/es2019/ui/HoverLinkOverlay/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/grid.js +1 -1
- package/dist/es2019/ui/MediaSingle/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/styled.js +1 -1
- package/dist/es2019/ui/PanelTextInput/styles.js +1 -1
- package/dist/es2019/ui/Popup/index.js +1 -1
- package/dist/es2019/ui/ResizerLegacy/index.js +1 -1
- package/dist/es2019/ui/TableSelector/index.js +1 -1
- package/dist/es2019/ui/UnsupportedBlock/index.js +1 -1
- package/dist/es2019/ui/UnsupportedInline/index.js +1 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +1 -1
- package/dist/es2019/utils/areDocsEqualByBlockStructureAndText.js +1 -1
- package/dist/es2019/utils/breakout.js +1 -1
- package/dist/es2019/utils/calculateSnapPoints.js +1 -1
- package/dist/es2019/utils/filter/privacy-filter.js +1 -1
- package/dist/es2019/utils/page-element-counts.js +1 -1
- package/dist/es2019/utils/processRawValue.js +12 -1
- package/dist/es2019/utils/unsupportedContent/get-unsupported-content-level-data.js +1 -1
- package/dist/esm/card/MediaAndEmbedsToolbar/index.js +1 -1
- package/dist/esm/collab/index.js +1 -1
- package/dist/esm/element-browser/components/ElementList/ElementList.js +1 -1
- package/dist/esm/element-browser/components/ElementSearch.js +2 -2
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +1 -1
- package/dist/esm/extensions/buildMenuItem.js +5 -2
- package/dist/esm/guideline/defaultGuideline.js +1 -1
- package/dist/esm/guideline/getContainerWidthOrFullEditorWidth.js +1 -1
- package/dist/esm/guideline/getMediaSingleDimensions.js +1 -1
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +1 -1
- package/dist/esm/media-inline/inline-image-card.js +1 -1
- package/dist/esm/media-inline/inline-image-wrapper.js +1 -1
- package/dist/esm/media-inline/media-inline-image-card.js +1 -1
- package/dist/esm/media-single/CommentBadge.js +1 -1
- package/dist/esm/media-single/calcMediaSingleMaxWidth.js +1 -1
- package/dist/esm/media-single/getMediaSingleInitialWidth.js +1 -1
- package/dist/esm/media-single/utils.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/nesting/transformContainerNodesWhenRequired.js +1 -1
- package/dist/esm/node-selection/index.js +1 -1
- package/dist/esm/node-width/index.js +1 -1
- package/dist/esm/quick-insert/build-quick-insert-menu-model.js +4 -2
- package/dist/esm/quick-insert/get-matching-quick-insert-components.js +9 -6
- package/dist/esm/quick-insert/quick-insert-rank.js +27 -0
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +0 -4
- package/dist/esm/resizer/BreakoutResizer.js +1 -1
- package/dist/esm/resizer/useBreakoutGuidelines.js +1 -1
- package/dist/esm/selection/index.js +2 -2
- package/dist/esm/styles/shared/blockquote.js +1 -1
- package/dist/esm/styles/shared/calcTableWidth.js +1 -1
- package/dist/esm/styles/shared/mapBackgroundColors.js +1 -1
- package/dist/esm/styles/shared/media-single.js +1 -1
- package/dist/esm/styles/shared/panel.js +1 -1
- package/dist/esm/styles/shared/table.js +2 -1
- package/dist/esm/table/NewSortingIcon.js +2 -1
- package/dist/esm/toolbar/EditorToolbarUIProvider.js +1 -1
- package/dist/esm/type-ahead/item-rank.js +29 -0
- package/dist/esm/ui/BaseTheme/index.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Expand/index.js +1 -1
- package/dist/esm/ui/HoverLinkOverlay/index.js +1 -1
- package/dist/esm/ui/MediaSingle/grid.js +1 -1
- package/dist/esm/ui/MediaSingle/index.js +1 -1
- package/dist/esm/ui/MediaSingle/styled.js +1 -1
- package/dist/esm/ui/PanelTextInput/styles.js +1 -1
- package/dist/esm/ui/Popup/index.js +1 -1
- package/dist/esm/ui/ResizerLegacy/index.js +1 -1
- package/dist/esm/ui/TableSelector/index.js +1 -1
- package/dist/esm/ui/UnsupportedBlock/index.js +1 -1
- package/dist/esm/ui/UnsupportedInline/index.js +1 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +1 -1
- package/dist/esm/utils/areDocsEqualByBlockStructureAndText.js +1 -1
- package/dist/esm/utils/breakout.js +1 -1
- package/dist/esm/utils/calculateSnapPoints.js +1 -1
- package/dist/esm/utils/filter/privacy-filter.js +1 -1
- package/dist/esm/utils/page-element-counts.js +1 -1
- package/dist/esm/utils/processRawValue.js +12 -1
- package/dist/esm/utils/unsupportedContent/get-unsupported-content-level-data.js +1 -1
- package/dist/types/analytics/types/table-events.d.ts +1 -1
- package/dist/types/card/cardOptions.d.ts +1 -1
- package/dist/types/extensions/types/extension-manifest.d.ts +1 -0
- package/dist/types/extensions/types/utils.d.ts +1 -0
- package/dist/types/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
- package/dist/types/link/LinkSearch/types.d.ts +1 -1
- package/dist/types/link/LinkSearch/withActivityProvider.d.ts +1 -1
- package/dist/types/media-inline/inline-image-card.d.ts +2 -2
- package/dist/types/media-inline/media-inline-image-card.d.ts +2 -1
- package/dist/types/media-inline/types.d.ts +1 -1
- package/dist/types/provider-factory/types.d.ts +1 -1
- package/dist/types/quick-insert/build-quick-insert-menu-model.d.ts +2 -1
- package/dist/types/quick-insert/get-matching-quick-insert-components.d.ts +3 -1
- package/dist/types/quick-insert/quick-insert-rank.d.ts +3 -0
- package/dist/types/toolbar/EditorToolbarUIProvider.d.ts +1 -1
- package/dist/types/toolbar/getInputMethodFromParentKeys.d.ts +1 -1
- package/dist/types/toolbar/types.d.ts +1 -1
- package/dist/types/type-ahead/item-rank.d.ts +12 -0
- package/dist/types/types/annotation/index.d.ts +2 -0
- package/dist/types/types/hyperlink.d.ts +1 -1
- package/dist/types/types/quick-insert.d.ts +2 -0
- package/dist/types/types/type-ahead.d.ts +3 -0
- package/dist/types/ui/EventHandlers/index.d.ts +1 -1
- package/dist/types/utils/isSupportedInParent.d.ts +1 -1
- package/package.json +2 -2
- package/quick-insert/quick-insert-rank/package.json +10 -0
- package/type-ahead/item-rank/package.json +10 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { reduce } from '@atlaskit/adf-utils/reduce';
|
|
1
2
|
import { isNestedTableExtension } from '@atlaskit/adf-utils/transforms';
|
|
2
|
-
import { reduce } from '@atlaskit/adf-utils/traverse';
|
|
3
3
|
/**
|
|
4
4
|
* Traverses a JSON document and counts the number of unique elements, text formatting and macros.
|
|
5
5
|
*
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { transformDedupeMarks } from '@atlaskit/adf-utils/dedupe-marks-transform';
|
|
2
|
+
import { transformContainerNodes } from '@atlaskit/adf-utils/depth-limited-nesting-container-nodes-transform';
|
|
3
|
+
import { transformIndentationMarks } from '@atlaskit/adf-utils/indentation-marks-transform';
|
|
4
|
+
import { transformInvalidMediaContent } from '@atlaskit/adf-utils/invalid-media-content-transform';
|
|
5
|
+
import { transformMediaLinkMarks } from '@atlaskit/adf-utils/media-link-transform';
|
|
6
|
+
import { transformNodesMissingContent } from '@atlaskit/adf-utils/nodes-missing-content-transform';
|
|
7
|
+
import { panelC1FallbackTransform } from '@atlaskit/adf-utils/panel-c1-fallback-transform';
|
|
8
|
+
import { panelC1FallbackTransformV2 } from '@atlaskit/adf-utils/panel-c1-fallback-transform-v2';
|
|
9
|
+
import { syncBlockFallbackTransform } from '@atlaskit/adf-utils/sync-block-fallback-transform';
|
|
10
|
+
import { transformTextLinkCodeMarks } from '@atlaskit/adf-utils/text-link-code-transform';
|
|
11
|
+
import { transformMediaSingleWidth } from '@atlaskit/adf-utils/transform-media-single-width';
|
|
12
|
+
import { transformNestedTablesIncomingDocument } from '@atlaskit/adf-utils/transforms';
|
|
2
13
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
3
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { traverse } from '@atlaskit/adf-utils/traverse';
|
|
1
|
+
import { traverse } from '@atlaskit/adf-utils/traverse/main';
|
|
2
2
|
import { UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from './UNSUPPORTED_CONTENT_LEVEL_SEVERITY';
|
|
3
3
|
import { UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS } from './UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS';
|
|
4
4
|
var buildUnsupportedContentLevelThresholds = function buildUnsupportedContentLevelThresholds(customThresholds) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Valign } from '@atlaskit/adf-schema/valign';
|
|
2
|
-
import type { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
|
|
2
|
+
import type { TableSortOrder as SortOrder } from '@atlaskit/custom-steps/constants';
|
|
3
3
|
import type { EditorBreakpointKey } from '../../utils/analytics';
|
|
4
4
|
import type { ACTION_SUBJECT, INPUT_METHOD, ACTION_SUBJECT_ID } from './enums';
|
|
5
5
|
import type { OperationalAEP, TableAEP, UIAEP } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MouseEvent } from 'react';
|
|
2
|
-
import type { CardProps } from '@atlaskit/smart-card';
|
|
2
|
+
import type { CardProps } from '@atlaskit/smart-card/card/types';
|
|
3
3
|
import type { Providers } from '../provider-factory';
|
|
4
4
|
export type OnClickCallback = ({ event, url, }: {
|
|
5
5
|
event: MouseEvent<HTMLAnchorElement>;
|
|
@@ -6,7 +6,7 @@ import React, { PureComponent } from 'react';
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import type { SerializedStyles } from '@emotion/react';
|
|
8
8
|
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
9
|
-
import type { ActivityProvider } from '@atlaskit/activity-provider';
|
|
9
|
+
import type { ActivityProvider } from '@atlaskit/activity-provider/types';
|
|
10
10
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
11
11
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
12
|
import type { SearchProvider } from '../../../provider-factory';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { KeyboardEvent } from 'react';
|
|
2
|
-
import type { ActivityItem, ActivityProvider } from '@atlaskit/activity-provider';
|
|
2
|
+
import type { ActivityItem, ActivityProvider } from '@atlaskit/activity-provider/types';
|
|
3
3
|
import type { INPUT_METHOD } from '../../analytics';
|
|
4
4
|
export type RecentSearchInputTypes = INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL;
|
|
5
5
|
export interface ChildProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ActivityProvider } from '@atlaskit/activity-provider';
|
|
2
|
+
import type { ActivityProvider } from '@atlaskit/activity-provider/types';
|
|
3
3
|
import type { ProviderFactory } from '../../provider-factory';
|
|
4
4
|
import type { Diff } from '../../utils';
|
|
5
5
|
export interface ExpandedActivityProviderProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FileIdentifier } from '@atlaskit/media-client';
|
|
2
|
-
import type { SSR } from '@atlaskit/media-common';
|
|
1
|
+
import type { FileIdentifier } from '@atlaskit/media-client/identifier';
|
|
2
|
+
import type { SSR } from '@atlaskit/media-common/main-types';
|
|
3
3
|
import type { Dimensions } from './types';
|
|
4
4
|
export declare const InlineImageCard: ({ dimensions, identifier, renderError, alt, isLazy, ssr, crop, stretch, }: {
|
|
5
5
|
alt?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl';
|
|
3
|
-
import type { FileIdentifier
|
|
3
|
+
import type { FileIdentifier } from '@atlaskit/media-client/identifier';
|
|
4
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
4
5
|
import type { MediaInlineAttrs, MediaSSR } from './types';
|
|
5
6
|
export interface MediaInlineImageCardProps {
|
|
6
7
|
border?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActivityProvider } from '@atlaskit/activity-provider';
|
|
1
|
+
import type { ActivityProvider } from '@atlaskit/activity-provider/types';
|
|
2
2
|
import type { EmojiProvider } from '@atlaskit/emoji/types';
|
|
3
3
|
import type { MentionProvider } from '@atlaskit/mention/types';
|
|
4
4
|
import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SurfaceIdentifier } from '@atlaskit/editor-ui-control-model/surface-renderer/types';
|
|
2
2
|
import type { RegisterComponent, RegisterMenuItem, RegisterMenuSection, SurfaceContext } from '@atlaskit/editor-ui-control-model/types';
|
|
3
|
+
import { type RegisteredItemRankResolver } from '../type-ahead/item-rank';
|
|
3
4
|
import type { QuickInsertCategoryItemSelectionPolicy } from './selectQuickInsertCategoryItems';
|
|
4
5
|
export type QuickInsertMenuSection = [RegisterMenuSection, ...RegisterMenuItem[]];
|
|
5
6
|
export type QuickInsertMenuModel = {
|
|
@@ -9,4 +10,4 @@ export type QuickInsertMenuModel = {
|
|
|
9
10
|
searchResults?: RegisterMenuItem[];
|
|
10
11
|
sections: QuickInsertMenuSection[];
|
|
11
12
|
};
|
|
12
|
-
export declare const buildQuickInsertMenuModel: (components: RegisterComponent[], rootComponent: SurfaceIdentifier, selectCategoryItems?: QuickInsertCategoryItemSelectionPolicy, surfaceContext?: SurfaceContext) => QuickInsertMenuModel;
|
|
13
|
+
export declare const buildQuickInsertMenuModel: (components: RegisterComponent[], rootComponent: SurfaceIdentifier, selectCategoryItems?: QuickInsertCategoryItemSelectionPolicy, surfaceContext?: SurfaceContext, getItemRank?: RegisteredItemRankResolver) => QuickInsertMenuModel;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import type { SurfaceIdentifier } from '@atlaskit/editor-ui-control-model/surface-renderer/types';
|
|
3
3
|
import type { RegisterComponent, SurfaceContext } from '@atlaskit/editor-ui-control-model/types';
|
|
4
|
+
import { type RegisteredItemRankResolver } from '../type-ahead/item-rank';
|
|
4
5
|
import type { QuickInsertMenuModel } from './build-quick-insert-menu-model';
|
|
5
6
|
/**
|
|
6
7
|
* Resolves registered menu items for a non-empty query. This intentionally has
|
|
7
8
|
* no empty-query path so browse behavior remains owned by buildQuickInsertMenuModel.
|
|
8
9
|
*/
|
|
9
|
-
export declare const getMatchingQuickInsertComponents: ({ components, rootComponent, query, formatMessage, surfaceContext, }: {
|
|
10
|
+
export declare const getMatchingQuickInsertComponents: ({ components, rootComponent, query, formatMessage, surfaceContext, getItemRank, }: {
|
|
10
11
|
components: RegisterComponent[];
|
|
11
12
|
formatMessage: IntlShape['formatMessage'];
|
|
13
|
+
getItemRank?: RegisteredItemRankResolver;
|
|
12
14
|
query: string;
|
|
13
15
|
rootComponent: SurfaceIdentifier;
|
|
14
16
|
surfaceContext?: SurfaceContext;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { RegisteredItemRankResolver } from '../type-ahead/item-rank';
|
|
2
|
+
/** Recommendations and navigation controls retain their policy-defined order. */
|
|
3
|
+
export declare const createQuickInsertRankResolver: (getItemRank?: RegisteredItemRankResolver) => RegisteredItemRankResolver | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ToolbarUIContextType } from '@atlaskit/editor-toolbar';
|
|
2
|
+
import type { ToolbarUIContextType } from '@atlaskit/editor-toolbar/ui-context';
|
|
3
3
|
import type { ExtractInjectionAPI, NextEditorPlugin } from '../types';
|
|
4
4
|
type Props = Pick<ToolbarUIContextType, 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement' | 'fireAnalyticsEvent' | 'keyboardNavigation'> & {
|
|
5
5
|
api: ExtractInjectionAPI<NextEditorPlugin<any, any>> | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
|
|
1
|
+
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model/types';
|
|
2
2
|
import { INPUT_METHOD } from '../analytics';
|
|
3
3
|
export declare const getInputMethodFromParentKeys: (parents: ToolbarComponentTypes) => INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TOOLBAR;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RegisterComponent, RegisterComponentParent } from '@atlaskit/editor-ui-control-model/types';
|
|
2
|
+
export type RegisteredItemRankContext = {
|
|
3
|
+
component: RegisterComponent;
|
|
4
|
+
parent: RegisterComponentParent;
|
|
5
|
+
};
|
|
6
|
+
export type RegisteredItemRankOverride = {
|
|
7
|
+
rank: number;
|
|
8
|
+
};
|
|
9
|
+
/** Pure parent-rank override. Return undefined to preserve parent.rank; do not mutate either record. */
|
|
10
|
+
export type RegisteredItemRankResolver = (context: RegisteredItemRankContext) => RegisteredItemRankOverride | undefined;
|
|
11
|
+
/** Applies per-editor parent ranks without changing shared registry records. */
|
|
12
|
+
export declare const applyRegisteredItemRanks: (components: RegisterComponent[], getRegisteredItemRank?: RegisteredItemRankResolver) => RegisterComponent[];
|
|
@@ -141,6 +141,8 @@ export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationT
|
|
|
141
141
|
hoverComponent?: React.ComponentType<InlineCommentHoverComponentProps>;
|
|
142
142
|
/** Determines whether a specific block node supports inline comments. */
|
|
143
143
|
isBlockNodeSupported?: (node: PMNode) => boolean;
|
|
144
|
+
/** Additional creation policy for supported block nodes; does not control existing threads. */
|
|
145
|
+
canCreateCommentOnBlockNode?: (node: PMNode) => boolean;
|
|
144
146
|
selectionComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentSelectionComponentProps>>;
|
|
145
147
|
viewComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentViewComponentProps>>;
|
|
146
148
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinkPickerProps } from '@atlaskit/link-picker';
|
|
1
|
+
import type { LinkPickerProps } from '@atlaskit/link-picker/types';
|
|
2
2
|
import type { INPUT_METHOD } from '../analytics';
|
|
3
3
|
import type { CardOptions } from '../card';
|
|
4
4
|
import type { EditorAppearance } from './editor-appearance';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type Fuse from 'fuse.js';
|
|
2
2
|
import type { IntlShape } from 'react-intl';
|
|
3
3
|
import type { QuickInsertItem, QuickInsertProvider } from '../provider-factory';
|
|
4
|
+
import type { RegisteredItemRankResolver } from '../type-ahead/item-rank';
|
|
4
5
|
import type { EmptyStateHandler } from './empty-state-handler';
|
|
5
6
|
export type QuickInsertOptions = boolean | {
|
|
6
7
|
disableDefaultItems?: boolean;
|
|
@@ -54,6 +55,7 @@ export interface QuickInsertPluginOptions {
|
|
|
54
55
|
elementBrowserHelpUrl?: string;
|
|
55
56
|
emptyStateHandler?: EmptyStateHandler;
|
|
56
57
|
enableElementBrowser?: boolean;
|
|
58
|
+
getItemRank?: RegisteredItemRankResolver;
|
|
57
59
|
headless?: boolean;
|
|
58
60
|
/**
|
|
59
61
|
* EDITOR-6558: Optional predicate for filtering quick-insert items
|
|
@@ -4,6 +4,7 @@ import type { Fragment, Node as PMNode } from '@atlaskit/editor-prosemirror/mode
|
|
|
4
4
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { TypeAheadPayload } from '../analytics/types/type-ahead';
|
|
6
6
|
import type { SelectItemMode, TypeAheadAvailableNodes } from '../type-ahead';
|
|
7
|
+
import type { RegisteredItemRankResolver } from '../type-ahead/item-rank';
|
|
7
8
|
import type { EditorCommand } from '../types';
|
|
8
9
|
type TypeAheadForceSelectProps = {
|
|
9
10
|
editorState: EditorState;
|
|
@@ -133,6 +134,8 @@ export type TypeAheadHandler = {
|
|
|
133
134
|
query: string;
|
|
134
135
|
}) => Promise<Array<TypeAheadItem>>;
|
|
135
136
|
getMoreOptionsButtonConfig?: (intl: IntlShape) => MoreOptionsButtonConfig;
|
|
137
|
+
/** Overrides parent ranks in registered menus; does not reorder legacy getItems results. */
|
|
138
|
+
getRegisteredItemRank?: RegisteredItemRankResolver;
|
|
136
139
|
/** Optional section definitions used by type-ahead menu to group items */
|
|
137
140
|
getSections?: (props: {
|
|
138
141
|
intl: IntlShape;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SyntheticEvent } from 'react';
|
|
2
2
|
import type { CardEvent, InlineCardEvent } from '@atlaskit/media-card/types';
|
|
3
|
-
import type { Identifier } from '@atlaskit/media-client';
|
|
3
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
4
4
|
export interface CardSurroundings {
|
|
5
5
|
collectionName: string;
|
|
6
6
|
list: Identifier[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { CardAppearance } from '@atlaskit/smart-card';
|
|
3
|
+
import type { CardAppearance } from '@atlaskit/smart-card/card/types';
|
|
4
4
|
/**
|
|
5
5
|
* Checks if a particular node fragment is supported in the parent
|
|
6
6
|
* @param state EditorState
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "130.
|
|
3
|
+
"version": "130.4.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": "^232.0.0",
|
|
89
89
|
"@atlaskit/tokens": "^20.4.0",
|
|
90
90
|
"@atlaskit/tooltip": "^24.4.0",
|
|
91
91
|
"@atlaskit/width-detector": "^7.2.0",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/quick-insert/quick-insert-rank",
|
|
3
|
+
"main": "../../dist/cjs/quick-insert/quick-insert-rank.js",
|
|
4
|
+
"module": "../../dist/esm/quick-insert/quick-insert-rank.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/quick-insert/quick-insert-rank.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/quick-insert/quick-insert-rank.d.ts"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/type-ahead/item-rank",
|
|
3
|
+
"main": "../../dist/cjs/type-ahead/item-rank.js",
|
|
4
|
+
"module": "../../dist/esm/type-ahead/item-rank.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/type-ahead/item-rank.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/type-ahead/item-rank.d.ts"
|
|
10
|
+
}
|