@atlaskit/editor-plugin-insert-block 12.0.14 → 12.0.15

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/insert-block-plugin/package.json +1 -8
  3. package/insert-block-plugin-type/package.json +1 -8
  4. package/package.json +3 -3
  5. package/types/package.json +1 -8
  6. package/dist/types-ts4.5/entry-points/insert-block-plugin-type.d.ts +0 -1
  7. package/dist/types-ts4.5/entry-points/insert-block-plugin.d.ts +0 -1
  8. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  9. package/dist/types-ts4.5/index.d.ts +0 -3
  10. package/dist/types-ts4.5/insertBlockPlugin.d.ts +0 -5
  11. package/dist/types-ts4.5/insertBlockPluginType.d.ts +0 -10
  12. package/dist/types-ts4.5/pm-plugins/experiences/toolbar-action-experiences.d.ts +0 -7
  13. package/dist/types-ts4.5/pm-plugins/experiences/toolbar-experience-utils.d.ts +0 -24
  14. package/dist/types-ts4.5/pm-plugins/toggleInsertBlock.d.ts +0 -8
  15. package/dist/types-ts4.5/types/index.d.ts +0 -120
  16. package/dist/types-ts4.5/ui/ElementBrowser/InsertMenu.d.ts +0 -14
  17. package/dist/types-ts4.5/ui/ElementBrowser/types.d.ts +0 -23
  18. package/dist/types-ts4.5/ui/ElementRail/useInsertMenuRailItems.d.ts +0 -6
  19. package/dist/types-ts4.5/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +0 -29
  20. package/dist/types-ts4.5/ui/ToolbarInsertBlock/block-insert-menu.d.ts +0 -28
  21. package/dist/types-ts4.5/ui/ToolbarInsertBlock/create-items.d.ts +0 -49
  22. package/dist/types-ts4.5/ui/ToolbarInsertBlock/dropdown-button.d.ts +0 -20
  23. package/dist/types-ts4.5/ui/ToolbarInsertBlock/index.d.ts +0 -64
  24. package/dist/types-ts4.5/ui/ToolbarInsertBlock/item.d.ts +0 -38
  25. package/dist/types-ts4.5/ui/ToolbarInsertBlock/shallow-equals.d.ts +0 -1
  26. package/dist/types-ts4.5/ui/ToolbarInsertBlock/styles.d.ts +0 -3
  27. package/dist/types-ts4.5/ui/ToolbarInsertBlock/types.d.ts +0 -68
  28. package/dist/types-ts4.5/ui/toolbar-components/CodeBlockButton.d.ts +0 -8
  29. package/dist/types-ts4.5/ui/toolbar-components/EmojiButton.d.ts +0 -3
  30. package/dist/types-ts4.5/ui/toolbar-components/ImageButton.d.ts +0 -8
  31. package/dist/types-ts4.5/ui/toolbar-components/InsertButton.d.ts +0 -24
  32. package/dist/types-ts4.5/ui/toolbar-components/LayoutButton.d.ts +0 -8
  33. package/dist/types-ts4.5/ui/toolbar-components/MediaButton.d.ts +0 -8
  34. package/dist/types-ts4.5/ui/toolbar-components/MentionButton.d.ts +0 -8
  35. package/dist/types-ts4.5/ui/toolbar-components/TableButton.d.ts +0 -8
  36. package/dist/types-ts4.5/ui/toolbar-components/TableSizePicker.d.ts +0 -7
  37. package/dist/types-ts4.5/ui/toolbar-components/TaskListButton.d.ts +0 -8
  38. package/dist/types-ts4.5/ui/toolbar-components/config-resolver.d.ts +0 -6
  39. package/dist/types-ts4.5/ui/toolbar-components/hooks/filterDropdownItems.d.ts +0 -5
  40. package/dist/types-ts4.5/ui/toolbar-components/hooks/useEmojiPickerPopup.d.ts +0 -20
  41. package/dist/types-ts4.5/ui/toolbar-components/hooks/useInsertButtonState.d.ts +0 -30
  42. package/dist/types-ts4.5/ui/toolbar-components/hooks/usePopupManager.d.ts +0 -21
  43. package/dist/types-ts4.5/ui/toolbar-components/hooks/useTableSelectorPopup.d.ts +0 -19
  44. package/dist/types-ts4.5/ui/toolbar-components/popups/EmojiPickerPopup.d.ts +0 -16
  45. package/dist/types-ts4.5/ui/toolbar-components/popups/TableSelectorPopupWrapper.d.ts +0 -15
  46. package/dist/types-ts4.5/ui/toolbar-components/shared/constants.d.ts +0 -15
  47. package/dist/types-ts4.5/ui/toolbar-components/shared/types.d.ts +0 -8
  48. package/dist/types-ts4.5/ui/toolbar-components/utils/utils.d.ts +0 -4
  49. package/dist/types-ts4.5/ui/toolbar-components.d.ts +0 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-insert-block
2
2
 
3
+ ## 12.0.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 12.0.14
4
10
 
5
11
  ### Patch Changes
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/insert-block-plugin.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/insert-block-plugin.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/insert-block-plugin.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/insert-block-plugin-type.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/insert-block-plugin-type.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/insert-block-plugin-type.d.ts"
17
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-insert-block",
3
- "version": "12.0.14",
3
+ "version": "12.0.15",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/editor-plugin-code-block": "^13.1.0",
36
36
  "@atlaskit/editor-plugin-connectivity": "^11.0.0",
37
37
  "@atlaskit/editor-plugin-date": "^13.0.0",
38
- "@atlaskit/editor-plugin-emoji": "^12.0.0",
38
+ "@atlaskit/editor-plugin-emoji": "^12.1.0",
39
39
  "@atlaskit/editor-plugin-expand": "^12.0.0",
40
40
  "@atlaskit/editor-plugin-extension": "^14.1.0",
41
41
  "@atlaskit/editor-plugin-feature-flags": "^10.0.0",
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/icon": "^35.4.0",
65
65
  "@atlaskit/icon-lab": "^6.14.0",
66
66
  "@atlaskit/platform-feature-flags": "^1.1.0",
67
- "@atlaskit/tmp-editor-statsig": "^102.0.0",
67
+ "@atlaskit/tmp-editor-statsig": "^103.0.0",
68
68
  "@atlaskit/tokens": "^13.4.0",
69
69
  "@babel/runtime": "^7.0.0",
70
70
  "@emotion/react": "^11.7.1",
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -1 +0,0 @@
1
- export type { InsertBlockPlugin } from '../insertBlockPluginType';
@@ -1 +0,0 @@
1
- export { insertBlockPlugin } from '../insertBlockPlugin';
@@ -1 +0,0 @@
1
- export type { InsertBlockOptions, InsertBlockPluginOptions, InsertBlockPluginDependencies, InsertBlockPluginState, ToolbarInsertBlockButtonsConfig, } from '../types/index';
@@ -1,3 +0,0 @@
1
- export { insertBlockPlugin } from './insertBlockPlugin';
2
- export type { InsertBlockPlugin } from './insertBlockPluginType';
3
- export type { InsertBlockOptions, InsertBlockPluginOptions, InsertBlockPluginDependencies, InsertBlockPluginState, ToolbarInsertBlockButtonsConfig, } from './types';
@@ -1,5 +0,0 @@
1
- import type { EditorAppearance } from '@atlaskit/editor-common/types';
2
- import { ToolbarSize } from '@atlaskit/editor-common/types';
3
- import type { InsertBlockPlugin } from './insertBlockPluginType';
4
- export declare const toolbarSizeToButtons: (toolbarSize: ToolbarSize, appearance?: EditorAppearance) => 0 | 2 | 3 | 5 | 7;
5
- export declare const insertBlockPlugin: InsertBlockPlugin;
@@ -1,10 +0,0 @@
1
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import type { InsertBlockPluginOptions, InsertBlockPluginDependencies, InsertBlockPluginState } from './types';
3
- export type InsertBlockPlugin = NextEditorPlugin<'insertBlock', {
4
- actions: {
5
- toggleAdditionalMenu: () => void;
6
- };
7
- dependencies: InsertBlockPluginDependencies;
8
- pluginConfiguration: InsertBlockPluginOptions | undefined;
9
- sharedState: InsertBlockPluginState | undefined;
10
- }>;
@@ -1,7 +0,0 @@
1
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- type ToolbarActionExperienceOptions = {
4
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
5
- };
6
- export declare const getToolbarActionExperiencesPlugin: ({ dispatchAnalyticsEvent, }: ToolbarActionExperienceOptions) => SafePlugin;
7
- export {};
@@ -1,24 +0,0 @@
1
- import type { ExperienceCheckResult } from '@atlaskit/editor-common/experiences';
2
- /**
3
- * DOM marker selectors for node types inserted via toolbar actions.
4
- * Matches outermost wrapper elements set synchronously by ReactNodeView
5
- * (`{nodeTypeName}View-content-wrap`) or schema `toDOM` attributes.
6
- */
7
- export declare const NODE_INSERT_MARKERS: {
8
- readonly TABLE: ".tableView-content-wrap";
9
- readonly LAYOUT: ".layoutSectionView-content-wrap";
10
- readonly LAYOUT_COLUMN: ".layoutColumnView-content-wrap";
11
- readonly TASK_LIST: "[data-node-type=\"actionList\"]";
12
- readonly TASK_ITEM: ".taskItemView-content-wrap";
13
- };
14
- export declare const isToolbarButtonClick: (target: HTMLElement, testId: string) => boolean;
15
- /**
16
- * Evaluates DOM mutations to detect a node insert action.
17
- *
18
- * Uses two strategies:
19
- * 1. Marker-based: checks `addedNodes` against known node insert selectors.
20
- * 2. Structure-based: detects element add+remove (block-level replacement).
21
- */
22
- export declare const handleEditorNodeInsertDomMutation: ({ mutations, }: {
23
- mutations: MutationRecord[];
24
- }) => ExperienceCheckResult | undefined;
@@ -1,8 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- type ToggleInsertBlockPmPluginState = {
4
- showElementBrowser: boolean;
5
- };
6
- export declare const toggleInsertBlockPmKey: PluginKey<ToggleInsertBlockPmPluginState>;
7
- export declare const toggleInsertBlockPmPlugin: () => SafePlugin<ToggleInsertBlockPmPluginState>;
8
- export {};
@@ -1,120 +0,0 @@
1
- import type { PluginToolbarComponentConfig } from '@atlaskit/editor-common/toolbar';
2
- import type { EditorAppearance, OptionalPlugin } from '@atlaskit/editor-common/types';
3
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
- import type { BlockTypePlugin } from '@atlaskit/editor-plugin-block-type';
5
- import type { CodeBlockPlugin } from '@atlaskit/editor-plugin-code-block';
6
- import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
7
- import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
8
- import type { DatePlugin } from '@atlaskit/editor-plugin-date';
9
- import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
10
- import type { ExpandPlugin } from '@atlaskit/editor-plugin-expand';
11
- import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
12
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
13
- import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
14
- import type { ImageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
15
- import type { LayoutPlugin } from '@atlaskit/editor-plugin-layout';
16
- import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
17
- import type { MediaInsertPlugin } from '@atlaskit/editor-plugin-media-insert';
18
- import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
19
- import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
20
- import type { PanelPlugin } from '@atlaskit/editor-plugin-panel';
21
- import type { PlaceholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
22
- import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
23
- import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
24
- import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
25
- import type { StatusPlugin } from '@atlaskit/editor-plugin-status';
26
- import type { TablePlugin } from '@atlaskit/editor-plugin-table';
27
- import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
28
- import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
29
- import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
30
- export type InsertBlockPluginDependencies = [
31
- TypeAheadPlugin,
32
- OptionalPlugin<TablePlugin>,
33
- OptionalPlugin<HyperlinkPlugin>,
34
- OptionalPlugin<DatePlugin>,
35
- OptionalPlugin<BlockTypePlugin>,
36
- OptionalPlugin<AnalyticsPlugin>,
37
- OptionalPlugin<ImageUploadPlugin>,
38
- OptionalPlugin<EmojiPlugin>,
39
- OptionalPlugin<QuickInsertPlugin>,
40
- OptionalPlugin<RulePlugin>,
41
- OptionalPlugin<CodeBlockPlugin>,
42
- OptionalPlugin<PanelPlugin>,
43
- OptionalPlugin<MediaPlugin>,
44
- OptionalPlugin<MediaInsertPlugin>,
45
- OptionalPlugin<MentionsPlugin>,
46
- OptionalPlugin<MetricsPlugin>,
47
- OptionalPlugin<StatusPlugin>,
48
- OptionalPlugin<LayoutPlugin>,
49
- OptionalPlugin<ExpandPlugin>,
50
- OptionalPlugin<PlaceholderTextPlugin>,
51
- OptionalPlugin<ExtensionPlugin>,
52
- OptionalPlugin<TasksAndDecisionsPlugin>,
53
- OptionalPlugin<PrimaryToolbarPlugin>,
54
- OptionalPlugin<FeatureFlagsPlugin>,
55
- OptionalPlugin<ContextPanelPlugin>,
56
- OptionalPlugin<ConnectivityPlugin>,
57
- OptionalPlugin<ToolbarPlugin>
58
- ];
59
- type PluginToolbarComponentsConfig<T extends string> = {
60
- [componentName in T]?: PluginToolbarComponentConfig;
61
- };
62
- export type ToolbarInsertBlockButtonsConfig = PluginToolbarComponentsConfig<'codeBlock' | 'emoji' | 'insert' | 'layout' | 'media' | 'mention' | 'table' | 'taskList'>;
63
- export interface InsertBlockPluginOptions {
64
- allowExpand?: boolean;
65
- allowTables?: boolean;
66
- appearance?: EditorAppearance;
67
- horizontalRuleEnabled?: boolean;
68
- insertMenuItems?: any;
69
- /**
70
- * EDITOR-6558: Optional predicate for filtering insert-block items by
71
- * `value.name` before they're rendered in the toolbar / dropdown /
72
- * element browser. Items returning `false` are hidden.
73
- *
74
- * Used by Markdown Mode (gated by the `cc-markdown-mode` experiment in
75
- * Confluence) to allowlist only items whose corresponding node/mark
76
- * types have a clean GFM round-trip. Currently applied to the main
77
- * toolbar insert surfaces (`ToolbarInsertBlock`, `useInsertButtonState`).
78
- */
79
- itemFilter?: (item: {
80
- value: {
81
- name: string;
82
- };
83
- }) => boolean;
84
- nativeStatusSupported?: boolean;
85
- /**
86
- * To hide the element browser "view more" button in the
87
- * overflow dropdown menu
88
- * @default undefined Does not show the view more by default
89
- */
90
- showElementBrowserLink?: boolean;
91
- tableSelectorSupported?: boolean;
92
- /**
93
- * Configure which toolbar buttons should be visible
94
- * @default undefined - shows all available buttons (current behaviour)
95
- *
96
- * Only applies when platform_editor_toolbar_aifc is enabled
97
- */
98
- toolbarButtons?: ToolbarInsertBlockButtonsConfig;
99
- /**
100
- * To hide the individual insert block buttons in the toolbar
101
- * and only show the plus button
102
- * @default undefined Shows the insert block buttons and the plus button
103
- *
104
- * Only applies when platform_editor_toolbar_aifc is enabled
105
- *
106
- * @warning Use {@link toolbarButtons} instead to configure the insert block toolbar buttons
107
- * @see https://product-fabric.atlassian.net/browse/ED-29426
108
- */
109
- toolbarShowPlusInsertOnly?: boolean;
110
- }
111
- /**
112
- * @private
113
- * @deprecated Use {@link InsertBlockPluginOptions} instead
114
- * @see https://product-fabric.atlassian.net/browse/ED-27496
115
- */
116
- export type InsertBlockOptions = InsertBlockPluginOptions;
117
- export interface InsertBlockPluginState {
118
- showElementBrowser: boolean;
119
- }
120
- export {};
@@ -1,14 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import type { MessageDescriptor } from 'react-intl';
3
- import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
4
- import type { InsertMenuProps } from './types';
5
- export declare const DEFAULT_HEIGHT = 560;
6
- /**
7
- * Exported helper to allow testing of InsertMenu pinning logic.
8
- *
9
- * The `cc_fd_db_top_editor_toolbar` experiment adds new logic to sort elements by `priority`.
10
- * This newer implementation matches how the quick insert menu sorts elements.
11
- */
12
- export declare const sortFeaturedItems: (featuredItems: QuickInsertItem[], formatMessage: (msg: MessageDescriptor) => string) => QuickInsertItem[];
13
- declare const InsertMenu: ({ editorView, dropdownItems, showElementBrowserLink, onInsert, toggleVisiblity, pluginInjectionApi, }: InsertMenuProps) => jsx.JSX.Element;
14
- export default InsertMenu;
@@ -1,23 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
3
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { InsertBlockPlugin } from '../../index';
6
- import type { BlockMenuItem } from '../ToolbarInsertBlock/create-items';
7
- type SimpleEventHandler<T> = (event?: T) => void;
8
- export interface InsertMenuProps {
9
- dropdownItems: BlockMenuItem[];
10
- editorView: EditorView;
11
- isFullPageAppearance?: boolean;
12
- onInsert: OnInsert;
13
- pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
14
- showElementBrowserLink: boolean;
15
- toggleVisiblity: SimpleEventHandler<MouseEvent | KeyboardEvent>;
16
- }
17
- export type SvgGetterParams = {
18
- name: string;
19
- };
20
- export type OnInsert = ({ item }: {
21
- item: MenuItem;
22
- }) => Transaction;
23
- export {};
@@ -1,6 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { insertBlockPlugin } from '../../insertBlockPlugin';
4
- import type { InsertBlockOptions } from '../../types';
5
- import type { BlockMenuItem } from '../ToolbarInsertBlock/create-items';
6
- export declare const useInsertMenuRailItems: (editorView: EditorView, options: InsertBlockOptions, api?: ExtractInjectionAPI<typeof insertBlockPlugin>) => BlockMenuItem[];
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { InsertBlockPlugin } from '../../index';
5
- import type { OnInsert } from '../ElementBrowser/types';
6
- import type { BlockMenuItem } from './create-items';
7
- type SimpleEventHandler<T> = (event?: T) => void;
8
- export interface BlockInsertElementBrowserProps {
9
- disabled: boolean;
10
- editorView: EditorView;
11
- isFullPageAppearance?: boolean;
12
- items: BlockMenuItem[];
13
- label: string;
14
- onClick: React.MouseEventHandler;
15
- onInsert: OnInsert;
16
- onKeyDown?: React.KeyboardEventHandler;
17
- onRef(el: HTMLElement): void;
18
- open: boolean;
19
- pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
20
- plusButtonRef?: HTMLElement;
21
- popupsBoundariesElement?: HTMLElement;
22
- popupsMountPoint?: HTMLElement;
23
- popupsScrollableElement?: HTMLElement;
24
- showElementBrowserLink: boolean;
25
- spacing: 'none' | 'default';
26
- togglePlusMenuVisibility: SimpleEventHandler<MouseEvent | KeyboardEvent>;
27
- }
28
- export declare const BlockInsertElementBrowser: (props: BlockInsertElementBrowserProps) => React.JSX.Element;
29
- export {};
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { InsertBlockPlugin } from '../../index';
5
- import type { OnInsert } from '../ElementBrowser/types';
6
- import type { BlockMenuItem } from './create-items';
7
- export interface BlockInsertMenuProps {
8
- disabled: boolean;
9
- editorView: EditorView;
10
- isFullPageAppearance?: boolean;
11
- items: BlockMenuItem[];
12
- label: string;
13
- onClick: React.MouseEventHandler;
14
- onInsert: OnInsert;
15
- onKeyDown?: React.KeyboardEventHandler;
16
- onPlusButtonRef(el: HTMLElement): void;
17
- onRef(el: HTMLElement): void;
18
- open: boolean;
19
- pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
20
- plusButtonRef?: HTMLElement;
21
- popupsBoundariesElement?: HTMLElement;
22
- popupsMountPoint?: HTMLElement;
23
- popupsScrollableElement?: HTMLElement;
24
- showElementBrowserLink: boolean;
25
- spacing: 'none' | 'default';
26
- togglePlusMenuVisibility(): void;
27
- }
28
- export declare const BlockInsertMenu: (props: BlockInsertMenuProps) => React.JSX.Element | null;
@@ -1,49 +0,0 @@
1
- import type { MemoizedFn } from 'memoize-one';
2
- import type { WrappedComponentProps } from 'react-intl';
3
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
4
- import type { BlockType } from '@atlaskit/editor-plugin-block-type';
5
- import type { Schema } from '@atlaskit/editor-prosemirror/model';
6
- import type { EmojiProvider } from '@atlaskit/emoji/resource';
7
- export interface CreateItemsConfig {
8
- actionSupported?: boolean;
9
- availableWrapperBlockTypes?: BlockType[];
10
- dateEnabled?: boolean;
11
- decisionSupported?: boolean;
12
- emojiDisabled?: boolean;
13
- emojiProvider?: Promise<EmojiProvider> | EmojiProvider;
14
- expandEnabled?: boolean;
15
- formatMessage: WrappedComponentProps['intl']['formatMessage'];
16
- hasEmojiPlugin?: boolean;
17
- hasMediaPlugin?: boolean;
18
- hasMentionsPlugin?: boolean;
19
- horizontalRuleEnabled?: boolean;
20
- imageUploadEnabled?: boolean;
21
- imageUploadSupported?: boolean;
22
- insertMenuItems?: MenuItem[];
23
- isEditorOffline?: boolean;
24
- isNewMenuEnabled?: boolean;
25
- isTypeAheadAllowed?: boolean;
26
- /** @see InsertBlockPluginOptions.itemFilter */
27
- itemFilter?: (item: MenuItem) => boolean;
28
- layoutSectionEnabled?: boolean;
29
- linkDisabled?: boolean;
30
- linkSupported?: boolean;
31
- mediaSupported?: boolean;
32
- mediaUploadsEnabled?: boolean;
33
- mentionsDisabled?: boolean;
34
- mentionsSupported?: boolean;
35
- nativeStatusSupported?: boolean;
36
- numberOfButtons: number;
37
- placeholderTextEnabled?: boolean;
38
- schema: Schema;
39
- showElementBrowserLink?: boolean;
40
- tableSelectorSupported?: boolean;
41
- tableSupported?: boolean;
42
- }
43
- export interface BlockMenuItem extends MenuItem {
44
- title: JSX.Element | null;
45
- }
46
- export declare const createItems: MemoizedFn<(config: CreateItemsConfig) => Readonly<[
47
- BlockMenuItem[],
48
- BlockMenuItem[]
49
- ]>>;
@@ -1,20 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import React from 'react';
6
- import { jsx } from '@emotion/react';
7
- import type { ToolbarButtonRef } from '@atlaskit/editor-common/ui-menu';
8
- export interface DropDownButtonProps {
9
- 'aria-expanded': React.AriaAttributes['aria-expanded'];
10
- 'aria-haspopup': React.AriaAttributes['aria-haspopup'];
11
- 'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
12
- disabled?: boolean;
13
- handleRef(el: ToolbarButtonRef): void;
14
- label: string;
15
- onClick: React.MouseEventHandler;
16
- onKeyDown?: React.KeyboardEventHandler;
17
- selected: boolean;
18
- spacing: 'none' | 'default';
19
- }
20
- export declare const DropDownButton: React.MemoExoticComponent<(props: DropDownButtonProps) => jsx.JSX.Element>;
@@ -1,64 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import React from 'react';
6
- import { jsx } from '@emotion/react';
7
- import type { SerializedStyles } from '@emotion/react';
8
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
9
- import type { Props, State } from './types';
10
- export declare const tableButtonWrapper: ({ isTableSelectorOpen, isButtonDisabled, }: {
11
- isButtonDisabled: boolean | undefined;
12
- isTableSelectorOpen: boolean;
13
- }) => SerializedStyles;
14
- export declare class ToolbarInsertBlock extends React.PureComponent<Props & WrappedComponentProps, State> {
15
- private dropdownButtonRef?;
16
- private emojiButtonRef?;
17
- private mediaButtonRef?;
18
- private plusButtonRef?;
19
- private tableButtonRef;
20
- private tableSelectorButtonRef;
21
- state: State;
22
- static getDerivedStateFromProps(props: Props & WrappedComponentProps, state: State): State | null;
23
- componentDidUpdate(prevProps: Props): void;
24
- private onOpenChange;
25
- private togglePlusMenuVisibility;
26
- private toggleEmojiPicker;
27
- private handleEmojiPressEscape;
28
- private handleEmojiClickOutside;
29
- private renderPopup;
30
- private getToolbarButtonTestId;
31
- private handleToolbarRef;
32
- private handlePlusButtonRef;
33
- private handleDropDownButtonRef;
34
- private toggleTableSelector;
35
- private renderTableSelectorPopup;
36
- private handleSelectedTableSize;
37
- private handleTableSelectorPressEscape;
38
- private handleTableSelectorClickOutside;
39
- render(): jsx.JSX.Element | null;
40
- private handleClick;
41
- private handleOpenByKeyboard;
42
- private handleTableSelectorOpenByKeyboard;
43
- private toggleLinkPanel;
44
- private insertMention;
45
- private insertTable;
46
- private insertTableWithSize;
47
- private createDate;
48
- private createPlaceholderText;
49
- private insertLayoutColumns;
50
- private createStatus;
51
- private openMediaPicker;
52
- private insertTaskDecision;
53
- private insertHorizontalRule;
54
- private insertExpand;
55
- private insertBlockType;
56
- private handleSelectedEmoji;
57
- private onItemActivated;
58
- private insertToolbarMenuItem;
59
- private insertInsertMenuItem;
60
- }
61
- declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
62
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
63
- };
64
- export default _default_1;
@@ -1,38 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import React from 'react';
6
- import type { MemoizedFn } from 'memoize-one';
7
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
8
- export interface CreateInit {
9
- 'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
10
- 'aria-label'?: React.AriaAttributes['aria-label'];
11
- content: string;
12
- disabled: boolean;
13
- tooltipDescription?: string;
14
- }
15
- export declare const action: MemoizedFn<(init: CreateInit) => MenuItem>;
16
- export declare const link: MemoizedFn<(init: CreateInit) => MenuItem>;
17
- export declare const media: MemoizedFn<(init: CreateInit) => MenuItem>;
18
- export declare const imageUpload: MemoizedFn<(init: CreateInit) => MenuItem>;
19
- export declare const mention: MemoizedFn<(init: CreateInit) => MenuItem>;
20
- export declare const emoji: MemoizedFn<(init: CreateInit) => MenuItem>;
21
- export declare const table: MemoizedFn<(init: CreateInit) => MenuItem>;
22
- export declare const tableSelector: MemoizedFn<(init: CreateInit) => MenuItem>;
23
- export declare const layout: MemoizedFn<(init: CreateInit) => MenuItem>;
24
- export declare const codeblock: MemoizedFn<(init: CreateInit & {
25
- shortcut?: string;
26
- }) => MenuItem>;
27
- export declare const panel: MemoizedFn<(init: CreateInit & {
28
- shortcut?: string;
29
- }) => MenuItem>;
30
- export declare const blockquote: MemoizedFn<(init: CreateInit & {
31
- shortcut?: string;
32
- }) => MenuItem>;
33
- export declare const decision: MemoizedFn<(init: CreateInit) => MenuItem>;
34
- export declare const horizontalrule: MemoizedFn<(init: CreateInit) => MenuItem>;
35
- export declare const expand: MemoizedFn<(init: CreateInit) => MenuItem>;
36
- export declare const date: MemoizedFn<(init: CreateInit) => MenuItem>;
37
- export declare const placeholder: MemoizedFn<(init: CreateInit) => MenuItem>;
38
- export declare const status: MemoizedFn<(init: CreateInit) => MenuItem>;
@@ -1 +0,0 @@
1
- export declare const shallowEquals: <T extends Object>([aRaw]: ReadonlyArray<unknown>, [bRaw]: ReadonlyArray<unknown>) => boolean;
@@ -1,3 +0,0 @@
1
- import type { SerializedStyles } from '@emotion/react';
2
- export declare const triggerWrapper: SerializedStyles;
3
- export declare const expandWrapperStyle: SerializedStyles;
@@ -1,68 +0,0 @@
1
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
- import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
3
- import type { Command, EditorActionsOptions as EditorActions, EditorAppearance, ExtractInjectionAPI, ImageUploadPluginReferenceEvent } from '@atlaskit/editor-common/types';
4
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
5
- import type { BlockType } from '@atlaskit/editor-plugin-block-type';
6
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
7
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
- import type { EmojiProvider } from '@atlaskit/emoji';
9
- import type { InsertBlockPlugin } from '../../index';
10
- import type { BlockMenuItem } from './create-items';
11
- export interface Props {
12
- actionSupported?: boolean;
13
- availableWrapperBlockTypes?: BlockType[];
14
- buttons: number;
15
- dateEnabled?: boolean;
16
- decisionSupported?: boolean;
17
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
18
- editorActions?: EditorActions;
19
- editorAppearance?: EditorAppearance;
20
- editorView: EditorView;
21
- emojiDisabled?: boolean;
22
- emojiProvider?: Promise<EmojiProvider>;
23
- expandEnabled?: boolean;
24
- handleImageUpload?: (event?: ImageUploadPluginReferenceEvent) => Command;
25
- horizontalRuleEnabled?: boolean;
26
- imageUploadEnabled?: boolean;
27
- imageUploadSupported?: boolean;
28
- insertMenuItems?: MenuItem[];
29
- isDisabled?: boolean;
30
- isEditorOffline?: boolean;
31
- isReducedSpacing: boolean;
32
- isTypeAheadAllowed?: boolean;
33
- /** @see InsertBlockPluginOptions.itemFilter */
34
- itemFilter?: (item: MenuItem) => boolean;
35
- layoutSectionEnabled?: boolean;
36
- linkDisabled?: boolean;
37
- linkSupported?: boolean;
38
- mediaSupported?: boolean;
39
- mediaUploadsEnabled?: boolean;
40
- mentionsDisabled?: boolean;
41
- mentionsSupported?: boolean;
42
- nativeStatusSupported?: boolean;
43
- onInsertBlockType?: (name: string) => Command;
44
- onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
45
- onShowMediaPicker?: (mountInfo?: {
46
- mountPoint: HTMLElement;
47
- ref: HTMLElement;
48
- }) => void;
49
- placeholderTextEnabled?: boolean;
50
- pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
51
- popupsBoundariesElement?: HTMLElement;
52
- popupsMountPoint?: HTMLElement;
53
- popupsScrollableElement?: HTMLElement;
54
- showElementBrowser: boolean;
55
- showElementBrowserLink?: boolean;
56
- showSeparator?: boolean;
57
- tableSelectorSupported?: boolean;
58
- tableSupported?: boolean;
59
- }
60
- export interface State {
61
- buttons: BlockMenuItem[];
62
- dropdownItems: BlockMenuItem[];
63
- emojiPickerOpen: boolean;
64
- isOpenedByKeyboard: boolean;
65
- isPlusMenuOpen: boolean;
66
- isTableSelectorOpen: boolean;
67
- isTableSelectorOpenedByKeyboard: boolean;
68
- }
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { InsertBlockPlugin } from '../../insertBlockPluginType';
4
- type CodeBlockButtonProps = {
5
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
6
- };
7
- export declare const CodeBlockButton: ({ api }: CodeBlockButtonProps) => React.JSX.Element | null;
8
- export {};
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { BaseToolbarButtonProps } from './shared/types';
3
- export declare const EmojiButton: ({ api }: BaseToolbarButtonProps) => React.JSX.Element | null;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { InsertBlockPlugin } from '../../insertBlockPluginType';
4
- type ImageButtonProps = {
5
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
6
- };
7
- export declare const ImageButton: ({ api }: ImageButtonProps) => React.JSX.Element;
8
- export {};
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI, Command } from '@atlaskit/editor-common/types';
3
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
4
- import type { Breakpoint } from '@atlaskit/editor-toolbar';
5
- import type { InsertBlockPlugin } from '../../insertBlockPluginType';
6
- import type { ToolbarInsertBlockButtonsConfig } from '../../types';
7
- type InsertButtonProps = {
8
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
9
- breakpoint?: Breakpoint | null;
10
- expandEnabled?: boolean;
11
- horizontalRuleEnabled?: boolean;
12
- insertMenuItems?: MenuItem[];
13
- isFullPageAppearance?: boolean;
14
- /** @see InsertBlockPluginOptions.itemFilter */
15
- itemFilter?: (item: MenuItem) => boolean;
16
- nativeStatusSupported?: boolean;
17
- numberOfButtons?: number;
18
- onInsertBlockType?: (name: string) => Command;
19
- showElementBrowserLink?: boolean;
20
- tableSelectorSupported?: boolean;
21
- toolbarConfig?: ToolbarInsertBlockButtonsConfig;
22
- };
23
- export declare const InsertButton: ({ api, breakpoint, showElementBrowserLink, isFullPageAppearance, tableSelectorSupported, nativeStatusSupported, horizontalRuleEnabled, expandEnabled, insertMenuItems, itemFilter, numberOfButtons, onInsertBlockType, toolbarConfig, }: InsertButtonProps) => React.JSX.Element | null;
24
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { InsertBlockPlugin } from '../../insertBlockPluginType';
4
- type LayoutButtonProps = {
5
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
6
- };
7
- export declare const LayoutButton: ({ api }: LayoutButtonProps) => React.JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { InsertBlockPlugin } from '../../insertBlockPluginType';
4
- type MediaButtonProps = {
5
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
6
- };
7
- export declare const MediaButton: ({ api }: MediaButtonProps) => React.JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { InsertBlockPlugin } from '../../insertBlockPluginType';
4
- type MentionButtonProps = {
5
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
6
- };
7
- export declare const MentionButton: ({ api }: MentionButtonProps) => React.JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { InsertBlockPlugin } from '../../insertBlockPluginType';
4
- type TableButtonProps = {
5
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
6
- };
7
- export declare const TableButton: ({ api }: TableButtonProps) => React.JSX.Element | null;
8
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import type { BaseToolbarButtonProps } from './shared/types';
3
- interface TableSizePickerProps extends BaseToolbarButtonProps {
4
- tableSelectorSupported?: boolean;
5
- }
6
- export declare const TableSizePicker: ({ api, tableSelectorSupported, }: TableSizePickerProps) => React.JSX.Element | null;
7
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { InsertBlockPlugin } from '../../insertBlockPluginType';
4
- type TaskListButtonProps = {
5
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
6
- };
7
- export declare const TaskListButton: ({ api }: TaskListButtonProps) => React.JSX.Element | null;
8
- export {};
@@ -1,6 +0,0 @@
1
- import type { InsertBlockPluginOptions, ToolbarInsertBlockButtonsConfig } from '../../types';
2
- /**
3
- * Resolves toolbar configuration from plugin options, handling backward compatibility
4
- * and providing sensible defaults.
5
- */
6
- export declare const resolveToolbarConfig: (options: InsertBlockPluginOptions) => ToolbarInsertBlockButtonsConfig;
@@ -1,5 +0,0 @@
1
- import type { Breakpoint } from '@atlaskit/editor-toolbar';
2
- import type { ToolbarInsertBlockButtonsConfig } from '../../../types';
3
- import type { BlockMenuItem } from '../../ToolbarInsertBlock/create-items';
4
- export declare const LINK_BUTTON_KEY = "link";
5
- export declare function filterDropdownItemsByBreakpoint(items: BlockMenuItem[], currentBreakpoint: Breakpoint | null, toolbarConfig: ToolbarInsertBlockButtonsConfig): BlockMenuItem[];
@@ -1,20 +0,0 @@
1
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { ExtractInjectionAPI, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
3
- import type { EmojiId } from '@atlaskit/emoji/types';
4
- import type { InsertBlockPlugin } from '../../../insertBlockPluginType';
5
- interface UseEmojiPickerPopupProps {
6
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
7
- buttonRef: React.RefObject<HTMLElement>;
8
- }
9
- export declare const useEmojiPickerPopup: ({ api, buttonRef, }: UseEmojiPickerPopupProps) => {
10
- handleSelectedEmoji: (emojiId: EmojiId) => true;
11
- onPopupUnmount: () => void;
12
- isOpen: boolean;
13
- isOpenedByKeyboard: boolean;
14
- toggle: (inputMethod?: TOOLBAR_MENU_TYPE | INPUT_METHOD) => void;
15
- close: () => void;
16
- handleEscapeKeydown: () => void;
17
- handleClickOutside: (e: MouseEvent) => void;
18
- handleKeyboardOpen: (event: React.KeyboardEvent) => void;
19
- };
20
- export {};
@@ -1,30 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { Breakpoint } from '@atlaskit/editor-toolbar';
5
- import type { EmojiProvider } from '@atlaskit/emoji';
6
- import type { InsertBlockPlugin } from '../../../insertBlockPluginType';
7
- import type { ToolbarInsertBlockButtonsConfig } from '../../../types';
8
- import type { BlockMenuItem } from '../../ToolbarInsertBlock/create-items';
9
- interface UseInsertButtonStateProps {
10
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
11
- breakpoint?: Breakpoint | null;
12
- editorView?: EditorView;
13
- expandEnabled?: boolean;
14
- horizontalRuleEnabled?: boolean;
15
- insertMenuItems?: MenuItem[];
16
- /** @see InsertBlockPluginOptions.itemFilter */
17
- itemFilter?: (item: MenuItem) => boolean;
18
- nativeStatusSupported?: boolean;
19
- numberOfButtons?: number;
20
- showElementBrowserLink?: boolean;
21
- tableSelectorSupported?: boolean;
22
- toolbarConfig?: ToolbarInsertBlockButtonsConfig;
23
- }
24
- export interface InsertButtonState {
25
- dropdownItems: BlockMenuItem[];
26
- emojiProvider?: EmojiProvider;
27
- isTypeAheadAllowed?: boolean;
28
- }
29
- export declare const useInsertButtonState: ({ api, breakpoint, editorView, horizontalRuleEnabled, insertMenuItems, itemFilter, nativeStatusSupported, numberOfButtons, tableSelectorSupported, expandEnabled, showElementBrowserLink, toolbarConfig, }: UseInsertButtonStateProps) => InsertButtonState;
30
- export {};
@@ -1,21 +0,0 @@
1
- import type { RefObject } from 'react';
2
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
- import type { TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
4
- interface PopupManagerConfig {
5
- analytics?: {
6
- onToggle?: (isOpen: boolean, inputMethod?: TOOLBAR_MENU_TYPE | INPUT_METHOD) => void;
7
- };
8
- focusTarget?: RefObject<HTMLElement>;
9
- onClose?: () => void;
10
- onOpen?: (inputMethod?: TOOLBAR_MENU_TYPE | INPUT_METHOD) => void;
11
- }
12
- export declare const usePopupManager: (config?: PopupManagerConfig) => {
13
- isOpen: boolean;
14
- isOpenedByKeyboard: boolean;
15
- toggle: (inputMethod?: TOOLBAR_MENU_TYPE | INPUT_METHOD) => void;
16
- close: () => void;
17
- handleEscapeKeydown: () => void;
18
- handleClickOutside: (e: MouseEvent) => void;
19
- handleKeyboardOpen: (event: React.KeyboardEvent) => void;
20
- };
21
- export {};
@@ -1,19 +0,0 @@
1
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { ExtractInjectionAPI, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
3
- import type { InsertBlockPlugin } from '../../../insertBlockPluginType';
4
- interface UseTableSelectorPopupProps {
5
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
6
- buttonRef: React.RefObject<HTMLElement>;
7
- }
8
- export declare const useTableSelectorPopup: ({ api, buttonRef, }: UseTableSelectorPopupProps) => {
9
- handleSelectedTableSize: (rowsCount: number, colsCount: number) => void;
10
- onPopupUnmount: () => void;
11
- isOpen: boolean;
12
- isOpenedByKeyboard: boolean;
13
- toggle: (inputMethod?: TOOLBAR_MENU_TYPE | INPUT_METHOD) => void;
14
- close: () => void;
15
- handleEscapeKeydown: () => void;
16
- handleClickOutside: (e: MouseEvent) => void;
17
- handleKeyboardOpen: (event: React.KeyboardEvent) => void;
18
- };
19
- export {};
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import type { EmojiId, EmojiProvider } from '@atlaskit/emoji/types';
3
- interface EmojiPickerPopupProps {
4
- emojiProvider?: Promise<EmojiProvider>;
5
- isOpen: boolean;
6
- onClickOutside: (e: MouseEvent) => void;
7
- onEscapeKeydown: () => void;
8
- onSelection: (emojiId: EmojiId) => boolean;
9
- onUnmount: () => void;
10
- popupsBoundariesElement?: HTMLElement;
11
- popupsMountPoint?: HTMLElement;
12
- popupsScrollableElement?: HTMLElement;
13
- targetRef: React.RefObject<HTMLElement>;
14
- }
15
- export declare const EmojiPickerPopup: ({ isOpen, targetRef, emojiProvider, onSelection, onClickOutside, onEscapeKeydown, onUnmount, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, }: EmojiPickerPopupProps) => React.JSX.Element | null;
16
- export {};
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- interface TableSelectorPopupWrapperProps {
3
- isOpen: boolean;
4
- isOpenedByKeyboard: boolean;
5
- onClickOutside: (e: MouseEvent) => void;
6
- onEscapeKeydown: () => void;
7
- onSelection: (rowsCount: number, colsCount: number) => void;
8
- onUnmount: () => void;
9
- popupsBoundariesElement?: HTMLElement;
10
- popupsMountPoint?: HTMLElement;
11
- popupsScrollableElement?: HTMLElement;
12
- targetRef: React.RefObject<HTMLElement>;
13
- }
14
- export declare const TableSelectorPopupWrapper: ({ isOpen, targetRef, isOpenedByKeyboard, onSelection, onClickOutside, onEscapeKeydown, onUnmount, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, }: TableSelectorPopupWrapperProps) => React.JSX.Element | null;
15
- export {};
@@ -1,15 +0,0 @@
1
- export declare const POPUP_Z_INDEX = "akEditorMenuZIndex";
2
- export declare const POPUP_DIMENSIONS: {
3
- readonly EMOJI_PICKER: {
4
- readonly fitHeight: 350;
5
- readonly fitWidth: 350;
6
- readonly offset: [
7
- number,
8
- number
9
- ];
10
- };
11
- };
12
- export declare const FOCUS_DELAY: {
13
- readonly ANIMATION_FRAME: "requestAnimationFrame";
14
- readonly MICROTASK: "queueMicrotask";
15
- };
@@ -1,8 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { InsertBlockPlugin } from '../../../insertBlockPluginType';
3
- export interface BaseToolbarButtonProps {
4
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
5
- popupsBoundariesElement?: HTMLElement;
6
- popupsMountPoint?: HTMLElement;
7
- popupsScrollableElement?: HTMLElement;
8
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * Checks if an element is detached (i.e. not in the current document)
3
- */
4
- export declare const isDetachedElement: (el: HTMLElement) => boolean;
@@ -1,15 +0,0 @@
1
- import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
- import type { InsertBlockPlugin } from '../insertBlockPluginType';
4
- import type { InsertBlockPluginOptions } from '../types';
5
- type GetToolbarComponentsProps = {
6
- api?: ExtractInjectionAPI<InsertBlockPlugin>;
7
- onInsertBlockType?: (name: string) => Command;
8
- options: InsertBlockPluginOptions;
9
- };
10
- /**
11
- * Updated toolbar components function that uses the new configuration resolver.
12
- * This function replaces the hardcoded approach with a config-driven one.
13
- */
14
- export declare const getToolbarComponents: ({ api, options, onInsertBlockType, }: GetToolbarComponentsProps) => RegisterComponent[];
15
- export {};