@atlaskit/editor-common 125.2.1 → 125.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 +61 -0
- package/dist/cjs/element-browser/components/ElementBrowserLoader.js +8 -31
- package/dist/cjs/extensions/buildMenuItem.js +6 -3
- package/dist/cjs/extensions/extension-handlers.js +17 -96
- package/dist/cjs/floating-toolbar/DropdownMenuExtensionItems.js +4 -25
- package/dist/cjs/icons/index.js +10 -33
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.compiled.css +0 -1
- package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +22 -28
- package/dist/cjs/quick-insert/QuickInsertHoverPreview.compiled.css +42 -1
- package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +147 -68
- package/dist/cjs/quick-insert/QuickInsertMenuItem.js +4 -0
- package/dist/cjs/quick-insert/QuickInsertMenuSection.js +11 -4
- package/dist/cjs/quick-insert/assets/index.js +257 -888
- package/dist/cjs/quick-insert/confluence-attribution-icon.js +18 -0
- package/dist/cjs/quick-insert/jira-attribution-icon.js +18 -0
- package/dist/cjs/quick-insert/messages.js +30 -0
- package/dist/cjs/quick-insert/preview.js +5 -0
- package/dist/cjs/quick-insert/snippetPreviewImageUrls.js +43 -43
- package/dist/cjs/quick-insert/use-menu-list-height.js +58 -0
- package/dist/cjs/quick-insert/use-menu-popup-sizing.js +60 -0
- package/dist/cjs/toolbar-flag-check.js +2 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Mention/mention-with-profilecard.js +19 -30
- package/dist/cjs/ui/Popup/index.js +101 -17
- package/dist/es2019/element-browser/components/ElementBrowserLoader.js +2 -16
- package/dist/es2019/extensions/buildMenuItem.js +5 -1
- package/dist/es2019/extensions/extension-handlers.js +15 -70
- package/dist/es2019/floating-toolbar/DropdownMenuExtensionItems.js +2 -16
- package/dist/es2019/icons/index.js +3 -17
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.compiled.css +0 -1
- package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +20 -29
- package/dist/es2019/quick-insert/QuickInsertHoverPreview.compiled.css +42 -1
- package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +130 -55
- package/dist/es2019/quick-insert/QuickInsertMenuItem.js +4 -0
- package/dist/es2019/quick-insert/QuickInsertMenuSection.js +11 -4
- package/dist/es2019/quick-insert/assets/index.js +66 -386
- package/dist/es2019/quick-insert/confluence-attribution-icon.js +10 -0
- package/dist/es2019/quick-insert/jira-attribution-icon.js +10 -0
- package/dist/es2019/quick-insert/messages.js +30 -0
- package/dist/es2019/quick-insert/preview.js +1 -0
- package/dist/es2019/quick-insert/snippetPreviewImageUrls.js +43 -43
- package/dist/es2019/quick-insert/use-menu-list-height.js +37 -0
- package/dist/es2019/quick-insert/use-menu-popup-sizing.js +49 -0
- package/dist/es2019/toolbar-flag-check.js +2 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Mention/mention-with-profilecard.js +12 -15
- package/dist/es2019/ui/Popup/index.js +89 -7
- package/dist/esm/element-browser/components/ElementBrowserLoader.js +6 -28
- package/dist/esm/extensions/buildMenuItem.js +6 -3
- package/dist/esm/extensions/extension-handlers.js +17 -97
- package/dist/esm/floating-toolbar/DropdownMenuExtensionItems.js +4 -24
- package/dist/esm/icons/index.js +7 -29
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/CompactQuickInsertMenuItem.compiled.css +0 -1
- package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +23 -29
- package/dist/esm/quick-insert/QuickInsertHoverPreview.compiled.css +42 -1
- package/dist/esm/quick-insert/QuickInsertHoverPreview.js +150 -68
- package/dist/esm/quick-insert/QuickInsertMenuItem.js +4 -0
- package/dist/esm/quick-insert/QuickInsertMenuSection.js +11 -4
- package/dist/esm/quick-insert/assets/index.js +194 -764
- package/dist/esm/quick-insert/confluence-attribution-icon.js +12 -0
- package/dist/esm/quick-insert/jira-attribution-icon.js +12 -0
- package/dist/esm/quick-insert/messages.js +30 -0
- package/dist/esm/quick-insert/preview.js +1 -0
- package/dist/esm/quick-insert/snippetPreviewImageUrls.js +43 -43
- package/dist/esm/quick-insert/use-menu-list-height.js +51 -0
- package/dist/esm/quick-insert/use-menu-popup-sizing.js +53 -0
- package/dist/esm/toolbar-flag-check.js +2 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Mention/mention-with-profilecard.js +16 -25
- package/dist/esm/ui/Popup/index.js +101 -17
- package/dist/types/extensions/types/extension-manifest.d.ts +5 -0
- package/dist/types/extensions/types/utils.d.ts +2 -0
- package/dist/types/icons/index.d.ts +3 -5
- package/dist/types/provider-factory/profile-card-provider.d.ts +14 -1
- package/dist/types/provider-factory/quick-insert-provider.d.ts +3 -0
- package/dist/types/quick-insert/CompactQuickInsertMenuItem.d.ts +1 -1
- package/dist/types/quick-insert/QuickInsertHoverPreview.d.ts +7 -6
- package/dist/types/quick-insert/QuickInsertMenuItem.d.ts +7 -2
- package/dist/types/quick-insert/assets/index.d.ts +32 -34
- package/dist/types/quick-insert/confluence-attribution-icon.d.ts +3 -0
- package/dist/types/quick-insert/jira-attribution-icon.d.ts +3 -0
- package/dist/types/quick-insert/messages.d.ts +5 -2
- package/dist/types/quick-insert/preview.d.ts +16 -0
- package/dist/types/quick-insert/use-menu-list-height.d.ts +6 -0
- package/dist/types/quick-insert/use-menu-popup-sizing.d.ts +11 -0
- package/dist/types/ui/Popup/index.d.ts +11 -0
- package/package.json +6 -6
- package/quick-insert/confluence-attribution-icon/package.json +10 -0
- package/quick-insert/jira-attribution-icon/package.json +10 -0
- package/quick-insert/preview/package.json +10 -0
- package/quick-insert/use-menu-list-height/package.json +10 -0
- package/quick-insert/use-menu-popup-sizing/package.json +10 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
3
|
import type { BlockTransformExtension } from '../../block-menu/block-transform-extension';
|
|
4
|
+
import type { QuickInsertPreview } from '../../quick-insert/preview';
|
|
4
5
|
import type { ExtensionAPI, ExtensionParams, MultiBodiedExtensionActions, UpdateExtension } from './extension-handler';
|
|
5
6
|
import type { ExtensionIconModule, MaybeESModule } from './extension-manifest-common';
|
|
6
7
|
import type { ContextualToolbar } from './extension-manifest-toolbar-item';
|
|
@@ -49,6 +50,8 @@ export type ExtensionModule<T extends Parameters = Parameters> = {
|
|
|
49
50
|
keywords?: string[];
|
|
50
51
|
lozenge?: ReactNode;
|
|
51
52
|
parameters?: T;
|
|
53
|
+
/** Module-specific preview, which takes precedence over the manifest preview. */
|
|
54
|
+
preview?: QuickInsertPreview;
|
|
52
55
|
priority?: number;
|
|
53
56
|
title?: string;
|
|
54
57
|
};
|
|
@@ -136,6 +139,8 @@ export type ExtensionManifest<T extends Parameters = Parameters> = {
|
|
|
136
139
|
key: ExtensionKey;
|
|
137
140
|
keywords?: string[];
|
|
138
141
|
modules: ExtensionModules<T>;
|
|
142
|
+
/** Default preview content for quick insert modules that do not override it. */
|
|
143
|
+
preview?: QuickInsertPreview;
|
|
139
144
|
summary?: string;
|
|
140
145
|
title: string;
|
|
141
146
|
type: ExtensionType;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
|
+
import type { QuickInsertPreview } from '../../quick-insert/preview';
|
|
3
4
|
import type { ExtensionApp, ExtensionKey, ExtensionModuleActionHandler, ExtensionType, Icon } from './extension-manifest';
|
|
4
5
|
export type MenuItem = {
|
|
5
6
|
app?: ExtensionApp;
|
|
@@ -15,6 +16,7 @@ export type MenuItem = {
|
|
|
15
16
|
keywords: string[];
|
|
16
17
|
lozenge?: ReactNode;
|
|
17
18
|
node: ADFEntity | ExtensionModuleActionHandler;
|
|
19
|
+
preview?: QuickInsertPreview;
|
|
18
20
|
priority?: number;
|
|
19
21
|
summary?: string;
|
|
20
22
|
title: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import Loadable from 'react-loadable';
|
|
2
3
|
import type { IconProps } from '../types';
|
|
3
4
|
export { PanelInfoIcon } from './shared/PanelInfoIcon';
|
|
4
5
|
export { PanelWarningIcon } from './shared/PanelWarningIcon';
|
|
@@ -8,7 +9,4 @@ export { PanelNoteIcon } from './shared/PanelNoteIcon';
|
|
|
8
9
|
export { BorderIcon } from './shared/BorderIcon';
|
|
9
10
|
export { SteppedRainbowIconDecoration, rainbow, disabledRainbow, } from './shared/SteppedRainbowIconDecoration';
|
|
10
11
|
export { DynamicStrokeIconDecoration } from './shared/DynamicStrokeIconDecoration';
|
|
11
|
-
export declare const IconTable:
|
|
12
|
-
(props: React.PropsWithChildren<IconProps>): React.ReactElement;
|
|
13
|
-
preload: () => void;
|
|
14
|
-
};
|
|
12
|
+
export declare const IconTable: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import type { Placement } from '@atlaskit/popper/main';
|
|
3
3
|
import type ProfileClient from '@atlaskit/profilecard/profile-card-client';
|
|
4
4
|
import type { ProfileCardAction } from '@atlaskit/profilecard/types';
|
|
@@ -31,9 +31,22 @@ export type RenderUserMentionCard = (props: {
|
|
|
31
31
|
referenceElement?: HTMLElement;
|
|
32
32
|
userId: string;
|
|
33
33
|
}) => ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Render-prop for injecting a custom agent profile card around a mention. `children` present
|
|
36
|
+
* means the renderer path (wrap it with your own trigger/popup); absent means the editor path
|
|
37
|
+
* (render a bare card).
|
|
38
|
+
*/
|
|
39
|
+
export type RenderAgentMentionCard = (props: {
|
|
40
|
+
accountId: string;
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
cloudId: string;
|
|
43
|
+
isReadOnly?: boolean;
|
|
44
|
+
onChatClick?: (event: MouseEvent, agentStudioId?: string) => void;
|
|
45
|
+
}) => ReactNode;
|
|
34
46
|
export interface ProfilecardProvider {
|
|
35
47
|
cloudId: string;
|
|
36
48
|
getActions: (id: string, text: string, accessLevel?: string) => ProfileCardAction[];
|
|
49
|
+
renderAgentMentionCard?: RenderAgentMentionCard;
|
|
37
50
|
/**
|
|
38
51
|
* Optional render-prop that wraps a user mention with a consumer-supplied profile card UI.
|
|
39
52
|
* Only used when the `people-teams_migrate-user-profile-card` feature gate is on. Lets 1P
|
|
@@ -3,6 +3,7 @@ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/stat
|
|
|
3
3
|
import type { RegisterMenuItem } from '@atlaskit/editor-ui-control-model/types';
|
|
4
4
|
import type { INPUT_METHOD } from '../analytics/types/enums';
|
|
5
5
|
import type { ExtensionApp } from '../extensions/types/extension-manifest';
|
|
6
|
+
import type { QuickInsertPreview } from '../quick-insert/preview';
|
|
6
7
|
import type { TypeAheadItem } from '../types/type-ahead';
|
|
7
8
|
export type QuickInsertActionInsert = (node?: Node | Record<string, any> | string, opts?: {
|
|
8
9
|
selectInlineNode?: boolean;
|
|
@@ -34,6 +35,8 @@ export type QuickInsertItem = TypeAheadItem & {
|
|
|
34
35
|
isHidden?: () => boolean;
|
|
35
36
|
/** other names used to find the item */
|
|
36
37
|
keywords?: Array<string>;
|
|
38
|
+
/** Optional visual and attribution content shown while this item is selected. */
|
|
39
|
+
preview?: QuickInsertPreview;
|
|
37
40
|
};
|
|
38
41
|
export type QuickInsertProvider = {
|
|
39
42
|
/** Registered leaf items for the Quick Insert browse menu. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { QuickInsertMenuItemProps } from './QuickInsertMenuItem';
|
|
3
|
-
export declare const CompactQuickInsertMenuItem: ({ ariaLabel, iconBefore, isDisabled, onSelect, previewImageUrls, shortcut, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
|
|
3
|
+
export declare const CompactQuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, preview, previewImageUrls, shortcut, shouldShowPreview, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import type { QuickInsertPreview } from './preview';
|
|
2
|
+
/** The selected item's description and attribution are announced through its aria-describedby. */
|
|
3
|
+
export declare const QuickInsertHoverPreview: ({ description, id, preview, referenceElement, title, }: {
|
|
4
|
+
description?: string;
|
|
5
|
+
id: string;
|
|
6
|
+
preview: QuickInsertPreview;
|
|
7
7
|
referenceElement: HTMLElement;
|
|
8
|
+
title: string;
|
|
8
9
|
}) => React.JSX.Element;
|
|
@@ -3,6 +3,7 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { INPUT_METHOD } from '../analytics';
|
|
5
5
|
import type { TypeAheadInsert } from '../types';
|
|
6
|
+
import type { QuickInsertPreview } from './preview';
|
|
6
7
|
export type OnSelectContext = {
|
|
7
8
|
editorView: EditorView;
|
|
8
9
|
insert: TypeAheadInsert;
|
|
@@ -14,13 +15,17 @@ export type QuickInsertMenuItemProps = {
|
|
|
14
15
|
iconBefore?: React.ReactNode;
|
|
15
16
|
isDisabled?: boolean;
|
|
16
17
|
onSelect: (context: OnSelectContext) => Transaction | false | void;
|
|
17
|
-
/**
|
|
18
|
+
/** Structured preview content for the selected item. */
|
|
19
|
+
preview?: QuickInsertPreview;
|
|
20
|
+
/** Retained for existing callers; new callers should pass `preview.image`. */
|
|
18
21
|
previewImageUrls?: {
|
|
19
22
|
dark?: string;
|
|
20
23
|
light: string;
|
|
21
24
|
} | null;
|
|
22
25
|
shortcut?: string;
|
|
26
|
+
/** Disable previews for navigation actions rather than insertable items. */
|
|
27
|
+
shouldShowPreview?: boolean;
|
|
23
28
|
shouldWrapIcon?: boolean;
|
|
24
29
|
title: string;
|
|
25
30
|
};
|
|
26
|
-
export declare const QuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, previewImageUrls, shortcut, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
|
|
31
|
+
export declare const QuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, preview, previewImageUrls, shortcut, shouldShowPreview, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
|
|
@@ -1,41 +1,39 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import Loadable from 'react-loadable';
|
|
2
3
|
import type { HeadingLevels, IconProps } from '../../types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const IconThreeColumnLayout: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
28
|
-
export declare const IconFourColumnLayout: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
29
|
-
export declare const IconFiveColumnLayout: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
4
|
+
export declare const IconAction: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
5
|
+
export declare const IconCode: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
6
|
+
export declare const IconDate: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
7
|
+
export declare const IconDecision: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
8
|
+
export declare const IconDivider: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
9
|
+
export declare const IconEmoji: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
10
|
+
export declare const IconImages: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
11
|
+
export declare const IconLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
12
|
+
export declare const IconLink: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
13
|
+
export declare const IconListNumber: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
14
|
+
export declare const IconList: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
15
|
+
export declare const IconMention: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
16
|
+
export declare const IconPanelError: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
17
|
+
export declare const IconPanelNote: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
18
|
+
export declare const IconPanelSuccess: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
19
|
+
export declare const IconPanelWarning: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
20
|
+
export declare const IconPanel: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
21
|
+
export declare const IconQuote: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
22
|
+
export declare const IconStatus: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
23
|
+
export declare const IconOneColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
24
|
+
export declare const IconTwoColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
25
|
+
export declare const IconThreeColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
26
|
+
export declare const IconFourColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
27
|
+
export declare const IconFiveColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
30
28
|
type HeadingProps = IconProps & {
|
|
31
29
|
level: HeadingLevels;
|
|
32
30
|
};
|
|
33
31
|
export declare const IconHeading: ({ level, label, }: Pick<HeadingProps, 'level' | 'label'>) => React.JSX.Element;
|
|
34
|
-
export declare const IconFeedback:
|
|
35
|
-
export declare const IconExpand:
|
|
36
|
-
export declare const IconDatasourceJiraIssue:
|
|
37
|
-
export declare const IconDatasourceAssetsObjects:
|
|
38
|
-
export declare const IconDatasourceConfluenceSearch:
|
|
39
|
-
export declare const IconLoom:
|
|
40
|
-
export declare const IconSyncBlock:
|
|
32
|
+
export declare const IconFeedback: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
33
|
+
export declare const IconExpand: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
34
|
+
export declare const IconDatasourceJiraIssue: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
35
|
+
export declare const IconDatasourceAssetsObjects: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
36
|
+
export declare const IconDatasourceConfluenceSearch: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
37
|
+
export declare const IconLoom: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
38
|
+
export declare const IconSyncBlock: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
|
|
41
39
|
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl';
|
|
2
|
-
type Messages<Keys extends string> = Record<Keys, MessageDescriptor
|
|
3
|
-
|
|
2
|
+
type Messages<Keys extends string> = Record<Keys, MessageDescriptor & {
|
|
3
|
+
defaultMessage: string;
|
|
4
|
+
id: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const messages: Messages<'admin' | 'AI' | 'all' | 'browse' | 'categoryBlockTemplates' | 'categoryDataAndCharts' | 'categoryEmbed' | 'categoryMedia' | 'categoryOther' | 'categoryRecommended' | 'categoryRovo' | 'categoryStructure' | 'categoryTextFormatting' | 'previewAttributionBy' | 'previewAttributionAtlassian' | 'previewAttributionAssets' | 'previewAttributionConfluence' | 'previewAttributionJira' | 'previewAttributionMicrosoft' | 'close' | 'communication' | 'confluence-content' | 'development' | 'external-content' | 'featuredWhiteboardDescription' | 'formatting' | 'help' | 'insert' | 'media' | 'navigation' | 'reporting' | 'visuals'>;
|
|
4
7
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
/** An image asset with a light default and an optional dark theme variant. */
|
|
3
|
+
export type PreviewImage = {
|
|
4
|
+
dark?: string;
|
|
5
|
+
light: string;
|
|
6
|
+
};
|
|
7
|
+
export type QuickInsertPreview = {
|
|
8
|
+
attribution?: {
|
|
9
|
+
/** Decorative icon shown at a fixed 16px size beside the attribution. */
|
|
10
|
+
icon?: ComponentType;
|
|
11
|
+
/** Localized display name; Editor adds a localized prefix when no icon is supplied. */
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
14
|
+
/** Optional image; text and attribution still render when an image is omitted or fails to load. */
|
|
15
|
+
image?: PreviewImage;
|
|
16
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
|
|
2
|
+
/** Keep the list viewport in sync with measured rows, including short search results. */
|
|
3
|
+
export declare function useMenuListHeight(cache: CellMeasurerCache, rowCount: number, rowKeySignature: string): {
|
|
4
|
+
height: number;
|
|
5
|
+
updateHeight: () => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Options = {
|
|
2
|
+
boundariesElement?: HTMLElement;
|
|
3
|
+
isOpen?: boolean;
|
|
4
|
+
maxHeight: number;
|
|
5
|
+
offset: number;
|
|
6
|
+
scrollableElement?: HTMLElement;
|
|
7
|
+
target?: HTMLElement | null;
|
|
8
|
+
};
|
|
9
|
+
/** Constrain menu height to the available space; Popup chooses placement. */
|
|
10
|
+
export declare function useMenuPopupSizing({ target, boundariesElement, scrollableElement, maxHeight, offset, isOpen, }: Options): number;
|
|
11
|
+
export {};
|
|
@@ -15,11 +15,14 @@ export interface Props {
|
|
|
15
15
|
/** Enable focus trap to contain the user's focus within the popup */
|
|
16
16
|
focusTrap?: boolean | FocusTrapOptions;
|
|
17
17
|
forcePlacement?: boolean;
|
|
18
|
+
/** Hide the popup while its visibility target is fully outside the visible viewport. */
|
|
19
|
+
hideWhenTargetOutOfView?: boolean;
|
|
18
20
|
minPopupMargin?: number;
|
|
19
21
|
mountTo?: HTMLElement;
|
|
20
22
|
offset?: number[];
|
|
21
23
|
onPlacementChanged?: (placement: [string, string]) => void;
|
|
22
24
|
onPositionCalculated?: (position: Position) => Position;
|
|
25
|
+
onTargetVisibilityChanged?: (isVisible: boolean) => void;
|
|
23
26
|
onUnmount?: () => void;
|
|
24
27
|
preventOverflow?: boolean;
|
|
25
28
|
rect?: DOMRect;
|
|
@@ -29,16 +32,21 @@ export interface Props {
|
|
|
29
32
|
stick?: boolean;
|
|
30
33
|
style?: React.CSSProperties;
|
|
31
34
|
target?: HTMLElement;
|
|
35
|
+
/** Element whose viewport visibility controls the popup. Defaults to `target`. */
|
|
36
|
+
visibilityTarget?: HTMLElement;
|
|
32
37
|
zIndex?: number;
|
|
33
38
|
}
|
|
34
39
|
export interface State {
|
|
35
40
|
popup?: HTMLElement;
|
|
36
41
|
position?: Position;
|
|
42
|
+
targetVisible: boolean;
|
|
37
43
|
validPosition: boolean;
|
|
38
44
|
}
|
|
39
45
|
export default class Popup extends React.Component<Props, State> {
|
|
40
46
|
scrollElement: undefined | false | HTMLElement;
|
|
47
|
+
private reportedTargetVisibility?;
|
|
41
48
|
private unbindScroll?;
|
|
49
|
+
private targetVisibilityObserver?;
|
|
42
50
|
rafIds: Set<number>;
|
|
43
51
|
static defaultProps: {
|
|
44
52
|
allowOutOfBound: boolean;
|
|
@@ -53,6 +61,9 @@ export default class Popup extends React.Component<Props, State> {
|
|
|
53
61
|
*/
|
|
54
62
|
private calculatePosition;
|
|
55
63
|
private updatePosition;
|
|
64
|
+
private setTargetVisibility;
|
|
65
|
+
private reportTargetVisibility;
|
|
66
|
+
private initTargetVisibilityObserver;
|
|
56
67
|
private cannotSetPopup;
|
|
57
68
|
/**
|
|
58
69
|
* Popup initialization.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "125.
|
|
3
|
+
"version": "125.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/"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
48
48
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
49
49
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
50
|
-
"@atlaskit/editor-toolbar": "^2.
|
|
50
|
+
"@atlaskit/editor-toolbar": "^2.8.0",
|
|
51
51
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
52
52
|
"@atlaskit/editor-ui-control-model": "^2.10.0",
|
|
53
53
|
"@atlaskit/emoji": "^72.4.0",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"@atlaskit/link": "^5.1.0",
|
|
57
57
|
"@atlaskit/link-datasource": "^7.0.0",
|
|
58
58
|
"@atlaskit/link-picker": "^6.9.0",
|
|
59
|
+
"@atlaskit/logo": "^23.3.0",
|
|
59
60
|
"@atlaskit/media-card": "^82.1.0",
|
|
60
61
|
"@atlaskit/media-client": "^39.0.0",
|
|
61
62
|
"@atlaskit/media-client-react": "^7.0.0",
|
|
@@ -78,13 +79,13 @@
|
|
|
78
79
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
79
80
|
"@atlaskit/react-ufo": "^8.0.0",
|
|
80
81
|
"@atlaskit/section-message": "^10.2.0",
|
|
81
|
-
"@atlaskit/smart-card": "^46.
|
|
82
|
+
"@atlaskit/smart-card": "^46.1.0",
|
|
82
83
|
"@atlaskit/smart-user-picker": "^12.0.0",
|
|
83
84
|
"@atlaskit/spinner": "^20.4.0",
|
|
84
|
-
"@atlaskit/task-decision": "^21.
|
|
85
|
+
"@atlaskit/task-decision": "^21.11.0",
|
|
85
86
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
86
87
|
"@atlaskit/textfield": "^10.2.0",
|
|
87
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
88
|
+
"@atlaskit/tmp-editor-statsig": "^209.0.0",
|
|
88
89
|
"@atlaskit/tokens": "^20.0.0",
|
|
89
90
|
"@atlaskit/tooltip": "^24.3.0",
|
|
90
91
|
"@atlaskit/width-detector": "^7.2.0",
|
|
@@ -112,7 +113,6 @@
|
|
|
112
113
|
"re-resizable": "6.0.0",
|
|
113
114
|
"react-focus-lock": "^2.9.5",
|
|
114
115
|
"react-loadable": "^5.1.0",
|
|
115
|
-
"react-loosely-lazy": "^1.0.0",
|
|
116
116
|
"react-virtualized": "^9.22.6",
|
|
117
117
|
"rusha": "^0.8.13",
|
|
118
118
|
"uuid": "^11.1.1",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/quick-insert/confluence-attribution-icon",
|
|
3
|
+
"main": "../../dist/cjs/quick-insert/confluence-attribution-icon.js",
|
|
4
|
+
"module": "../../dist/esm/quick-insert/confluence-attribution-icon.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/quick-insert/confluence-attribution-icon.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/quick-insert/confluence-attribution-icon.d.ts"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/quick-insert/jira-attribution-icon",
|
|
3
|
+
"main": "../../dist/cjs/quick-insert/jira-attribution-icon.js",
|
|
4
|
+
"module": "../../dist/esm/quick-insert/jira-attribution-icon.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/quick-insert/jira-attribution-icon.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/quick-insert/jira-attribution-icon.d.ts"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/quick-insert/preview",
|
|
3
|
+
"main": "../../dist/cjs/quick-insert/preview.js",
|
|
4
|
+
"module": "../../dist/esm/quick-insert/preview.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/quick-insert/preview.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/quick-insert/preview.d.ts"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/quick-insert/use-menu-list-height",
|
|
3
|
+
"main": "../../dist/cjs/quick-insert/use-menu-list-height.js",
|
|
4
|
+
"module": "../../dist/esm/quick-insert/use-menu-list-height.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/quick-insert/use-menu-list-height.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/quick-insert/use-menu-list-height.d.ts"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/quick-insert/use-menu-popup-sizing",
|
|
3
|
+
"main": "../../dist/cjs/quick-insert/use-menu-popup-sizing.js",
|
|
4
|
+
"module": "../../dist/esm/quick-insert/use-menu-popup-sizing.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/quick-insert/use-menu-popup-sizing.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/quick-insert/use-menu-popup-sizing.d.ts"
|
|
10
|
+
}
|