@atlaskit/editor-core 189.4.0 → 189.4.2

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 (131) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/plugins/index.js +0 -14
  3. package/dist/cjs/presets/universal.js +4 -2
  4. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +7 -3
  5. package/dist/cjs/version-wrapper.js +1 -1
  6. package/dist/es2019/plugins/index.js +0 -2
  7. package/dist/es2019/presets/universal.js +3 -1
  8. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +7 -3
  9. package/dist/es2019/version-wrapper.js +1 -1
  10. package/dist/esm/plugins/index.js +0 -2
  11. package/dist/esm/presets/universal.js +3 -1
  12. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +7 -3
  13. package/dist/esm/version-wrapper.js +1 -1
  14. package/dist/types/plugins/index.d.ts +0 -2
  15. package/dist/types-ts4.5/plugins/index.d.ts +0 -2
  16. package/package.json +11 -5
  17. package/dist/cjs/plugins/insert-block/index.js +0 -165
  18. package/dist/cjs/plugins/insert-block/types.js +0 -5
  19. package/dist/cjs/plugins/insert-block/ui/ElementBrowser/InsertMenu.js +0 -152
  20. package/dist/cjs/plugins/insert-block/ui/ElementBrowser/types.js +0 -5
  21. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +0 -42
  22. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +0 -42
  23. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +0 -66
  24. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +0 -217
  25. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +0 -49
  26. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +0 -565
  27. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/item.js +0 -250
  28. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +0 -12
  29. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/shallow-equals.js +0 -20
  30. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.js +0 -30
  31. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/styles.js +0 -11
  32. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/types.js +0 -5
  33. package/dist/cjs/plugins/toolbar-lists-indentation/index.js +0 -91
  34. package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +0 -56
  35. package/dist/cjs/plugins/toolbar-lists-indentation/types.js +0 -5
  36. package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +0 -135
  37. package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +0 -168
  38. package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +0 -63
  39. package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +0 -53
  40. package/dist/es2019/plugins/insert-block/index.js +0 -159
  41. package/dist/es2019/plugins/insert-block/types.js +0 -1
  42. package/dist/es2019/plugins/insert-block/ui/ElementBrowser/InsertMenu.js +0 -150
  43. package/dist/es2019/plugins/insert-block/ui/ElementBrowser/types.js +0 -1
  44. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +0 -35
  45. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +0 -35
  46. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +0 -59
  47. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +0 -198
  48. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +0 -37
  49. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +0 -558
  50. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/item.js +0 -201
  51. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +0 -1
  52. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/shallow-equals.js +0 -8
  53. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.js +0 -22
  54. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/styles.js +0 -16
  55. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/types.js +0 -1
  56. package/dist/es2019/plugins/toolbar-lists-indentation/index.js +0 -86
  57. package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +0 -53
  58. package/dist/es2019/plugins/toolbar-lists-indentation/types.js +0 -1
  59. package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +0 -123
  60. package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +0 -158
  61. package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +0 -58
  62. package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +0 -46
  63. package/dist/esm/plugins/insert-block/index.js +0 -158
  64. package/dist/esm/plugins/insert-block/types.js +0 -1
  65. package/dist/esm/plugins/insert-block/ui/ElementBrowser/InsertMenu.js +0 -146
  66. package/dist/esm/plugins/insert-block/ui/ElementBrowser/types.js +0 -1
  67. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +0 -35
  68. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +0 -35
  69. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +0 -59
  70. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +0 -210
  71. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +0 -41
  72. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +0 -560
  73. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/item.js +0 -243
  74. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +0 -1
  75. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/shallow-equals.js +0 -13
  76. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.js +0 -24
  77. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/styles.js +0 -4
  78. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/types.js +0 -1
  79. package/dist/esm/plugins/toolbar-lists-indentation/index.js +0 -83
  80. package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +0 -50
  81. package/dist/esm/plugins/toolbar-lists-indentation/types.js +0 -1
  82. package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +0 -124
  83. package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +0 -161
  84. package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +0 -56
  85. package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +0 -47
  86. package/dist/types/plugins/insert-block/index.d.ts +0 -16
  87. package/dist/types/plugins/insert-block/types.d.ts +0 -45
  88. package/dist/types/plugins/insert-block/ui/ElementBrowser/InsertMenu.d.ts +0 -4
  89. package/dist/types/plugins/insert-block/ui/ElementBrowser/types.d.ts +0 -22
  90. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +0 -28
  91. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +0 -18
  92. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +0 -30
  93. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +0 -39
  94. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +0 -16
  95. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +0 -46
  96. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/item.d.ts +0 -34
  97. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/messages.d.ts +0 -1
  98. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/shallow-equals.d.ts +0 -1
  99. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.d.ts +0 -2
  100. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/styles.d.ts +0 -1
  101. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +0 -59
  102. package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +0 -33
  103. package/dist/types/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +0 -19
  104. package/dist/types/plugins/toolbar-lists-indentation/types.d.ts +0 -20
  105. package/dist/types/plugins/toolbar-lists-indentation/ui/Toolbar.d.ts +0 -4
  106. package/dist/types/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.d.ts +0 -9
  107. package/dist/types/plugins/toolbar-lists-indentation/ui/index.d.ts +0 -26
  108. package/dist/types/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +0 -9
  109. package/dist/types-ts4.5/plugins/insert-block/index.d.ts +0 -16
  110. package/dist/types-ts4.5/plugins/insert-block/types.d.ts +0 -45
  111. package/dist/types-ts4.5/plugins/insert-block/ui/ElementBrowser/InsertMenu.d.ts +0 -4
  112. package/dist/types-ts4.5/plugins/insert-block/ui/ElementBrowser/types.d.ts +0 -22
  113. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +0 -28
  114. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +0 -18
  115. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +0 -30
  116. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +0 -42
  117. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +0 -16
  118. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +0 -46
  119. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/item.d.ts +0 -34
  120. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/messages.d.ts +0 -1
  121. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/shallow-equals.d.ts +0 -1
  122. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.d.ts +0 -2
  123. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/styles.d.ts +0 -1
  124. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +0 -59
  125. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/index.d.ts +0 -33
  126. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.d.ts +0 -19
  127. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/types.d.ts +0 -20
  128. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/Toolbar.d.ts +0 -4
  129. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.d.ts +0 -9
  130. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/index.d.ts +0 -26
  131. package/dist/types-ts4.5/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +0 -9
@@ -1,33 +0,0 @@
1
- /// <reference types="react" />
2
- import type { FeatureFlags, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type { ListPlugin } from '@atlaskit/editor-plugin-list';
6
- import type { ToolbarUiComponentFactoryParams } from '../../types';
7
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
- import type { IndentationPlugin } from '@atlaskit/editor-plugin-indentation';
9
- import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
10
- type Config = {
11
- showIndentationButtons: boolean;
12
- allowHeadingAndParagraphIndentation: boolean;
13
- };
14
- type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndentation', {
15
- pluginConfiguration: Config;
16
- dependencies: [
17
- OptionalPlugin<FeatureFlagsPlugin>,
18
- ListPlugin,
19
- OptionalPlugin<IndentationPlugin>,
20
- OptionalPlugin<TasksAndDecisionsPlugin>,
21
- OptionalPlugin<AnalyticsPlugin>
22
- ];
23
- }>;
24
- declare const toolbarListsIndentationPlugin: ToolbarListsIndentationPlugin;
25
- type PrimaryToolbarComponentProps = Pick<ToolbarUiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement' | 'disabled' | 'isToolbarReducedSpacing'> & {
26
- featureFlags: FeatureFlags;
27
- isSmall: boolean;
28
- showIndentationButtons?: boolean;
29
- pluginInjectionApi: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
30
- allowHeadingAndParagraphIndentation: boolean;
31
- };
32
- export declare function PrimaryToolbarComponent({ featureFlags, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, isSmall, isToolbarReducedSpacing, disabled, editorView, showIndentationButtons, pluginInjectionApi, allowHeadingAndParagraphIndentation, }: PrimaryToolbarComponentProps): JSX.Element | null;
33
- export default toolbarListsIndentationPlugin;
@@ -1,19 +0,0 @@
1
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export type IndentationButtonNode = null | 'paragraph_heading' | 'list' | 'taskList';
3
- export interface IndentationButtons {
4
- indentDisabled: boolean;
5
- outdentDisabled: boolean;
6
- node: IndentationButtonNode;
7
- }
8
- interface TaskDecisionState {
9
- isInsideTask: boolean;
10
- indentDisabled: boolean;
11
- outdentDisabled: boolean;
12
- }
13
- interface IndentationState {
14
- isIndentationAllowed: boolean;
15
- indentDisabled: boolean;
16
- outdentDisabled: boolean;
17
- }
18
- export declare function getIndentationButtonsState(editorState: EditorState, allowHeadingAndParagraphIndentation: boolean, taskDecisionState: TaskDecisionState | undefined, indentationState: IndentationState | undefined, isInsideListItem: ((tr: Transaction) => boolean | undefined) | undefined): IndentationButtons;
19
- export {};
@@ -1,20 +0,0 @@
1
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- import type { onItemActivated } from './ui/onItemActivated';
3
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
4
- export type ButtonName = 'bullet_list' | 'ordered_list' | 'indent' | 'outdent';
5
- export interface ToolbarProps {
6
- editorView: EditorView;
7
- featureFlags: FeatureFlags;
8
- bulletListActive?: boolean;
9
- bulletListDisabled?: boolean;
10
- orderedListActive?: boolean;
11
- orderedListDisabled?: boolean;
12
- disabled?: boolean;
13
- isSmall?: boolean;
14
- isSeparator?: boolean;
15
- isReducedSpacing?: boolean;
16
- showIndentationButtons?: boolean;
17
- indentDisabled?: boolean;
18
- outdentDisabled?: boolean;
19
- onItemActivated: ReturnType<typeof onItemActivated>;
20
- }
@@ -1,4 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import type { ToolbarProps } from '../types';
4
- export declare function Toolbar(props: ToolbarProps): jsx.JSX.Element;
@@ -1,9 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import type { ToolbarProps } from '../types';
4
- export type DropdownProps = ToolbarProps & {
5
- popupsMountPoint?: HTMLElement;
6
- popupsBoundariesElement?: HTMLElement;
7
- popupsScrollableElement?: HTMLElement;
8
- };
9
- export declare function ToolbarDropdown(props: DropdownProps): jsx.JSX.Element;
@@ -1,26 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
5
- import type toolbarListsIndentationPlugin from '../index';
6
- import type { IndentationButtonNode } from '../pm-plugins/indentation-buttons';
7
- export interface Props {
8
- editorView: EditorView;
9
- featureFlags: FeatureFlags;
10
- bulletListActive?: boolean;
11
- bulletListDisabled?: boolean;
12
- orderedListActive?: boolean;
13
- orderedListDisabled?: boolean;
14
- disabled?: boolean;
15
- isSmall?: boolean;
16
- isReducedSpacing?: boolean;
17
- popupsMountPoint?: HTMLElement;
18
- popupsBoundariesElement?: HTMLElement;
19
- popupsScrollableElement?: HTMLElement;
20
- showIndentationButtons?: boolean;
21
- indentDisabled?: boolean;
22
- outdentDisabled?: boolean;
23
- indentationStateNode?: IndentationButtonNode;
24
- pluginInjectionApi?: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
25
- }
26
- export default function ToolbarListsIndentation(props: Props): jsx.JSX.Element;
@@ -1,9 +0,0 @@
1
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- import type { IndentationButtonNode } from '../pm-plugins/indentation-buttons';
3
- import type { ButtonName } from '../types';
4
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
- import type toolbarListsIndentationPlugin from '../index';
6
- export declare const onItemActivated: (pluginInjectionApi: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined, indentationStateNode: IndentationButtonNode | undefined) => ({ buttonName, editorView, }: {
7
- buttonName: ButtonName;
8
- editorView: EditorView;
9
- }) => void;
@@ -1,16 +0,0 @@
1
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import type { InsertBlockPluginDependencies } from './types';
3
- export interface InsertBlockOptions {
4
- allowTables?: boolean;
5
- allowExpand?: boolean;
6
- insertMenuItems?: any;
7
- horizontalRuleEnabled?: boolean;
8
- nativeStatusSupported?: boolean;
9
- replacePlusMenuWithElementBrowser?: boolean;
10
- showElementBrowserLink?: boolean;
11
- }
12
- declare const insertBlockPlugin: NextEditorPlugin<'insertBlock', {
13
- pluginConfiguration: InsertBlockOptions | undefined;
14
- dependencies: InsertBlockPluginDependencies;
15
- }>;
16
- export default insertBlockPlugin;
@@ -1,45 +0,0 @@
1
- import type { OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import type { ImageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
3
- import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
4
- import type { DatePlugin } from '@atlaskit/editor-plugin-date';
5
- import type { TablePlugin } from '@atlaskit/editor-plugin-table';
6
- import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
- import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
8
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
9
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
10
- import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
11
- import type { BlockTypePlugin } from '@atlaskit/editor-plugin-block-type';
12
- import type { CodeBlockPlugin } from '@atlaskit/editor-plugin-code-block';
13
- import type { PanelPlugin } from '@atlaskit/editor-plugin-panel';
14
- import type { LayoutPlugin } from '@atlaskit/editor-plugin-layout';
15
- import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
16
- import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
17
- import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
18
- import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
19
- import type { StatusPlugin } from '@atlaskit/editor-plugin-status';
20
- import type { PlaceholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
21
- import type { ExpandPlugin } from '@atlaskit/editor-plugin-expand';
22
- import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
23
- export type InsertBlockPluginDependencies = [
24
- OptionalPlugin<FeatureFlagsPlugin>,
25
- TypeAheadPlugin,
26
- OptionalPlugin<TablePlugin>,
27
- OptionalPlugin<HyperlinkPlugin>,
28
- OptionalPlugin<DatePlugin>,
29
- OptionalPlugin<BlockTypePlugin>,
30
- OptionalPlugin<AnalyticsPlugin>,
31
- OptionalPlugin<ImageUploadPlugin>,
32
- OptionalPlugin<EmojiPlugin>,
33
- OptionalPlugin<QuickInsertPlugin>,
34
- OptionalPlugin<RulePlugin>,
35
- OptionalPlugin<CodeBlockPlugin>,
36
- OptionalPlugin<PanelPlugin>,
37
- OptionalPlugin<MediaPlugin>,
38
- OptionalPlugin<MentionsPlugin>,
39
- OptionalPlugin<StatusPlugin>,
40
- OptionalPlugin<LayoutPlugin>,
41
- OptionalPlugin<ExpandPlugin>,
42
- OptionalPlugin<PlaceholderTextPlugin>,
43
- OptionalPlugin<ExtensionPlugin>,
44
- OptionalPlugin<TasksAndDecisionsPlugin>
45
- ];
@@ -1,4 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import type { InsertMenuProps } from './types';
3
- declare const InsertMenu: ({ editorView, dropdownItems, showElementBrowserLink, onInsert, toggleVisiblity, pluginInjectionApi, }: InsertMenuProps) => jsx.JSX.Element;
4
- export default InsertMenu;
@@ -1,22 +0,0 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
4
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
5
- import type { InsertBlockPluginDependencies } from '../../types';
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
- showElementBrowserLink: boolean;
12
- toggleVisiblity: SimpleEventHandler<MouseEvent | KeyboardEvent>;
13
- onInsert: OnInsert;
14
- pluginInjectionApi: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies> | undefined;
15
- }
16
- export type SvgGetterParams = {
17
- name: string;
18
- };
19
- export type OnInsert = ({ item }: {
20
- item: MenuItem;
21
- }) => Transaction;
22
- export {};
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { BlockMenuItem } from './create-items';
4
- import type { OnInsert } from '../ElementBrowser/types';
5
- import type { PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
6
- import type { InsertBlockPluginDependencies } from '../../types';
7
- type SimpleEventHandler<T> = (event?: T) => void;
8
- export interface BlockInsertElementBrowserProps {
9
- disabled: boolean;
10
- editorView: EditorView;
11
- items: BlockMenuItem[];
12
- spacing: 'none' | 'default';
13
- label: string;
14
- open: boolean;
15
- popupsBoundariesElement?: HTMLElement;
16
- popupsMountPoint?: HTMLElement;
17
- popupsScrollableElement?: HTMLElement;
18
- plusButtonRef?: HTMLElement;
19
- showElementBrowserLink: boolean;
20
- onRef(el: HTMLElement): void;
21
- onClick: React.MouseEventHandler;
22
- onKeyDown?: React.KeyboardEventHandler;
23
- onInsert: OnInsert;
24
- togglePlusMenuVisibility: SimpleEventHandler<MouseEvent | KeyboardEvent>;
25
- pluginInjectionApi: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies> | undefined;
26
- }
27
- export declare const BlockInsertElementBrowser: React.FC<BlockInsertElementBrowserProps>;
28
- export {};
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import type { BlockMenuItem } from './create-items';
3
- export interface BlockInsertMenuLegacyProps {
4
- disabled: boolean;
5
- spacing: 'none' | 'default';
6
- label: string;
7
- open: boolean;
8
- items: BlockMenuItem[];
9
- popupsMountPoint?: HTMLElement;
10
- popupsBoundariesElement?: HTMLElement;
11
- popupsScrollableElement?: HTMLElement;
12
- onClick: React.MouseEventHandler;
13
- onKeyDown?: React.KeyboardEventHandler;
14
- onRef(el: HTMLElement): void;
15
- onItemActivated(attrs: any): void;
16
- onOpenChange(attrs: any): void;
17
- }
18
- export declare const BlockInsertMenuLegacy: React.FC<BlockInsertMenuLegacyProps>;
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { OnInsert } from '../ElementBrowser/types';
4
- import type { BlockMenuItem } from './create-items';
5
- import type { PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
6
- import type { InsertBlockPluginDependencies } from '../../types';
7
- export interface BlockInsertMenuProps {
8
- disabled: boolean;
9
- editorView: EditorView;
10
- items: BlockMenuItem[];
11
- label: string;
12
- open: boolean;
13
- plusButtonRef?: HTMLElement;
14
- popupsBoundariesElement?: HTMLElement;
15
- popupsMountPoint?: HTMLElement;
16
- popupsScrollableElement?: HTMLElement;
17
- replacePlusMenuWithElementBrowser: boolean;
18
- spacing: 'none' | 'default';
19
- showElementBrowserLink: boolean;
20
- onRef(el: HTMLElement): void;
21
- onPlusButtonRef(el: HTMLElement): void;
22
- onClick: React.MouseEventHandler;
23
- onItemActivated(attrs: any): void;
24
- onInsert: OnInsert;
25
- onOpenChange(attrs: any): void;
26
- togglePlusMenuVisibility(): void;
27
- onKeyDown?: React.KeyboardEventHandler;
28
- pluginInjectionApi: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies> | undefined;
29
- }
30
- export declare const BlockInsertMenu: React.FC<BlockInsertMenuProps>;
@@ -1,42 +0,0 @@
1
- /// <reference types="react" />
2
- import type { WrappedComponentProps } from 'react-intl-next';
3
- import type { Schema } from '@atlaskit/editor-prosemirror/model';
4
- import type { EmojiProvider } from '@atlaskit/emoji/resource';
5
- import type { BlockType } from '@atlaskit/editor-plugin-block-type';
6
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
7
- export interface CreateItemsConfig {
8
- isTypeAheadAllowed?: boolean;
9
- tableSupported?: boolean;
10
- mediaUploadsEnabled?: boolean;
11
- mediaSupported?: boolean;
12
- imageUploadSupported?: boolean;
13
- imageUploadEnabled?: boolean;
14
- mentionsSupported?: boolean;
15
- mentionsDisabled?: boolean;
16
- availableWrapperBlockTypes?: BlockType[];
17
- actionSupported?: boolean;
18
- decisionSupported?: boolean;
19
- linkSupported?: boolean;
20
- linkDisabled?: boolean;
21
- emojiDisabled?: boolean;
22
- nativeStatusSupported?: boolean;
23
- dateEnabled?: boolean;
24
- placeholderTextEnabled?: boolean;
25
- horizontalRuleEnabled?: boolean;
26
- layoutSectionEnabled?: boolean;
27
- showElementBrowserLink?: boolean;
28
- expandEnabled?: boolean;
29
- insertMenuItems?: MenuItem[];
30
- emojiProvider?: Promise<EmojiProvider>;
31
- schema: Schema;
32
- numberOfButtons: number;
33
- formatMessage: WrappedComponentProps['intl']['formatMessage'];
34
- isNewMenuEnabled?: boolean;
35
- }
36
- export interface BlockMenuItem extends MenuItem {
37
- title: JSX.Element | null;
38
- }
39
- export declare const createItems: import("memoize-one").MemoizedFn<(config: CreateItemsConfig) => readonly [
40
- BlockMenuItem[],
41
- BlockMenuItem[]
42
- ]>;
@@ -1,16 +0,0 @@
1
- /** @jsx jsx */
2
- import React from 'react';
3
- import type { ToolbarButtonRef } from '@atlaskit/editor-common/ui-menu';
4
- export interface DropDownButtonProps {
5
- label: string;
6
- selected: boolean;
7
- disabled?: boolean;
8
- 'aria-expanded': React.AriaAttributes['aria-expanded'];
9
- 'aria-haspopup': React.AriaAttributes['aria-haspopup'];
10
- 'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
11
- onClick: React.MouseEventHandler;
12
- onKeyDown?: React.KeyboardEventHandler;
13
- spacing: 'none' | 'default';
14
- handleRef(el: ToolbarButtonRef): void;
15
- }
16
- export declare const DropDownButton: React.StatelessComponent<DropDownButtonProps>;
@@ -1,46 +0,0 @@
1
- /** @jsx jsx */
2
- import React from 'react';
3
- import { jsx } from '@emotion/react';
4
- import type { WrappedComponentProps } from 'react-intl-next';
5
- import type { Props, State } from './types';
6
- export declare class ToolbarInsertBlock extends React.PureComponent<Props & WrappedComponentProps, State> {
7
- private dropdownButtonRef?;
8
- private emojiButtonRef?;
9
- private plusButtonRef?;
10
- state: State;
11
- static getDerivedStateFromProps(props: Props & WrappedComponentProps, state: State): State | null;
12
- componentDidUpdate(prevProps: Props): void;
13
- private onOpenChange;
14
- private togglePlusMenuVisibility;
15
- private toggleEmojiPicker;
16
- private handleEmojiPressEscape;
17
- private handleEmojiClickOutside;
18
- private renderPopup;
19
- private handleEmojiButtonRef;
20
- private handlePlusButtonRef;
21
- private handleDropDownButtonRef;
22
- render(): jsx.JSX.Element | null;
23
- private handleClick;
24
- private handleOpenByKeyboard;
25
- private toggleLinkPanel;
26
- private insertMention;
27
- private insertTable;
28
- private createDate;
29
- private createPlaceholderText;
30
- private insertLayoutColumns;
31
- private createStatus;
32
- private openMediaPicker;
33
- private insertTaskDecision;
34
- private insertHorizontalRule;
35
- private insertExpand;
36
- private insertBlockType;
37
- private handleSelectedEmoji;
38
- private openElementBrowser;
39
- private onItemActivated;
40
- private insertToolbarMenuItem;
41
- private insertInsertMenuItem;
42
- }
43
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
44
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
45
- };
46
- export default _default;
@@ -1,34 +0,0 @@
1
- /** @jsx jsx */
2
- import React from 'react';
3
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
4
- export interface CreateInit {
5
- content: string;
6
- disabled: boolean;
7
- tooltipDescription?: string;
8
- 'aria-label'?: React.AriaAttributes['aria-label'];
9
- 'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
10
- }
11
- export declare const action: (init: CreateInit) => MenuItem;
12
- export declare const link: (init: CreateInit) => MenuItem;
13
- export declare const media: (init: CreateInit) => MenuItem;
14
- export declare const imageUpload: (init: CreateInit) => MenuItem;
15
- export declare const mention: (init: CreateInit) => MenuItem;
16
- export declare const emoji: (init: CreateInit) => MenuItem;
17
- export declare const table: (init: CreateInit) => MenuItem;
18
- export declare const layout: (init: CreateInit) => MenuItem;
19
- export declare const codeblock: (init: CreateInit & {
20
- shortcut?: string;
21
- }) => MenuItem;
22
- export declare const panel: (init: CreateInit & {
23
- shortcut?: string;
24
- }) => MenuItem;
25
- export declare const blockquote: (init: CreateInit & {
26
- shortcut?: string;
27
- }) => MenuItem;
28
- export declare const decision: (init: CreateInit) => MenuItem;
29
- export declare const horizontalrule: (init: CreateInit) => MenuItem;
30
- export declare const expand: (init: CreateInit) => MenuItem;
31
- export declare const date: (init: CreateInit) => MenuItem;
32
- export declare const placeholder: (init: CreateInit) => MenuItem;
33
- export declare const status: (init: CreateInit) => MenuItem;
34
- export declare const more: (init: CreateInit) => MenuItem;
@@ -1 +0,0 @@
1
- export { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
@@ -1 +0,0 @@
1
- export declare const shallowEquals: <T extends {}>([aRaw]: ReadonlyArray<unknown>, [bRaw]: ReadonlyArray<unknown>) => boolean;
@@ -1,2 +0,0 @@
1
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
2
- export declare const sortItems: (items: MenuItem[]) => MenuItem[];
@@ -1 +0,0 @@
1
- export declare const triggerWrapper: import("@emotion/react").SerializedStyles;
@@ -1,59 +0,0 @@
1
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { EditorActionsOptions as EditorActions, FeatureFlags, ImageUploadPluginReferenceEvent, Command, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
4
- import type { EmojiProvider } from '@atlaskit/emoji';
5
- import type { BlockType } from '@atlaskit/editor-plugin-block-type';
6
- import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
7
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
8
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
9
- import type { BlockMenuItem } from './create-items';
10
- import type { InsertBlockPluginDependencies } from '../../types';
11
- export interface Props {
12
- buttons: number;
13
- isReducedSpacing: boolean;
14
- isDisabled?: boolean;
15
- isTypeAheadAllowed?: boolean;
16
- editorView: EditorView;
17
- editorActions?: EditorActions;
18
- tableSupported?: boolean;
19
- actionSupported?: boolean;
20
- decisionSupported?: boolean;
21
- mentionsSupported?: boolean;
22
- mediaUploadsEnabled?: boolean;
23
- mediaSupported?: boolean;
24
- imageUploadSupported?: boolean;
25
- imageUploadEnabled?: boolean;
26
- handleImageUpload?: (event?: ImageUploadPluginReferenceEvent) => Command;
27
- dateEnabled?: boolean;
28
- horizontalRuleEnabled?: boolean;
29
- placeholderTextEnabled?: boolean;
30
- layoutSectionEnabled?: boolean;
31
- expandEnabled?: boolean;
32
- emojiProvider?: Promise<EmojiProvider>;
33
- availableWrapperBlockTypes?: BlockType[];
34
- linkSupported?: boolean;
35
- linkDisabled?: boolean;
36
- emojiDisabled?: boolean;
37
- nativeStatusSupported?: boolean;
38
- popupsMountPoint?: HTMLElement;
39
- popupsBoundariesElement?: HTMLElement;
40
- popupsScrollableElement?: HTMLElement;
41
- insertMenuItems?: MenuItem[];
42
- showElementBrowserLink?: boolean;
43
- showSeparator?: boolean;
44
- replacePlusMenuWithElementBrowser?: boolean;
45
- onShowMediaPicker?: () => void;
46
- onInsertBlockType?: (name: string) => Command;
47
- onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
48
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
49
- featureFlags: FeatureFlags;
50
- pluginInjectionApi?: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies>;
51
- mentionsDisabled?: boolean;
52
- }
53
- export interface State {
54
- isPlusMenuOpen: boolean;
55
- emojiPickerOpen: boolean;
56
- buttons: BlockMenuItem[];
57
- dropdownItems: BlockMenuItem[];
58
- isOpenedByKeyboard: boolean;
59
- }
@@ -1,33 +0,0 @@
1
- /// <reference types="react" />
2
- import type { FeatureFlags, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type { ListPlugin } from '@atlaskit/editor-plugin-list';
6
- import type { ToolbarUiComponentFactoryParams } from '../../types';
7
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
- import type { IndentationPlugin } from '@atlaskit/editor-plugin-indentation';
9
- import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
10
- type Config = {
11
- showIndentationButtons: boolean;
12
- allowHeadingAndParagraphIndentation: boolean;
13
- };
14
- type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndentation', {
15
- pluginConfiguration: Config;
16
- dependencies: [
17
- OptionalPlugin<FeatureFlagsPlugin>,
18
- ListPlugin,
19
- OptionalPlugin<IndentationPlugin>,
20
- OptionalPlugin<TasksAndDecisionsPlugin>,
21
- OptionalPlugin<AnalyticsPlugin>
22
- ];
23
- }>;
24
- declare const toolbarListsIndentationPlugin: ToolbarListsIndentationPlugin;
25
- type PrimaryToolbarComponentProps = Pick<ToolbarUiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement' | 'disabled' | 'isToolbarReducedSpacing'> & {
26
- featureFlags: FeatureFlags;
27
- isSmall: boolean;
28
- showIndentationButtons?: boolean;
29
- pluginInjectionApi: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
30
- allowHeadingAndParagraphIndentation: boolean;
31
- };
32
- export declare function PrimaryToolbarComponent({ featureFlags, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, isSmall, isToolbarReducedSpacing, disabled, editorView, showIndentationButtons, pluginInjectionApi, allowHeadingAndParagraphIndentation, }: PrimaryToolbarComponentProps): JSX.Element | null;
33
- export default toolbarListsIndentationPlugin;
@@ -1,19 +0,0 @@
1
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export type IndentationButtonNode = null | 'paragraph_heading' | 'list' | 'taskList';
3
- export interface IndentationButtons {
4
- indentDisabled: boolean;
5
- outdentDisabled: boolean;
6
- node: IndentationButtonNode;
7
- }
8
- interface TaskDecisionState {
9
- isInsideTask: boolean;
10
- indentDisabled: boolean;
11
- outdentDisabled: boolean;
12
- }
13
- interface IndentationState {
14
- isIndentationAllowed: boolean;
15
- indentDisabled: boolean;
16
- outdentDisabled: boolean;
17
- }
18
- export declare function getIndentationButtonsState(editorState: EditorState, allowHeadingAndParagraphIndentation: boolean, taskDecisionState: TaskDecisionState | undefined, indentationState: IndentationState | undefined, isInsideListItem: ((tr: Transaction) => boolean | undefined) | undefined): IndentationButtons;
19
- export {};
@@ -1,20 +0,0 @@
1
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- import type { onItemActivated } from './ui/onItemActivated';
3
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
4
- export type ButtonName = 'bullet_list' | 'ordered_list' | 'indent' | 'outdent';
5
- export interface ToolbarProps {
6
- editorView: EditorView;
7
- featureFlags: FeatureFlags;
8
- bulletListActive?: boolean;
9
- bulletListDisabled?: boolean;
10
- orderedListActive?: boolean;
11
- orderedListDisabled?: boolean;
12
- disabled?: boolean;
13
- isSmall?: boolean;
14
- isSeparator?: boolean;
15
- isReducedSpacing?: boolean;
16
- showIndentationButtons?: boolean;
17
- indentDisabled?: boolean;
18
- outdentDisabled?: boolean;
19
- onItemActivated: ReturnType<typeof onItemActivated>;
20
- }
@@ -1,4 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import type { ToolbarProps } from '../types';
4
- export declare function Toolbar(props: ToolbarProps): jsx.JSX.Element;
@@ -1,9 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import type { ToolbarProps } from '../types';
4
- export type DropdownProps = ToolbarProps & {
5
- popupsMountPoint?: HTMLElement;
6
- popupsBoundariesElement?: HTMLElement;
7
- popupsScrollableElement?: HTMLElement;
8
- };
9
- export declare function ToolbarDropdown(props: DropdownProps): jsx.JSX.Element;
@@ -1,26 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
5
- import type toolbarListsIndentationPlugin from '../index';
6
- import type { IndentationButtonNode } from '../pm-plugins/indentation-buttons';
7
- export interface Props {
8
- editorView: EditorView;
9
- featureFlags: FeatureFlags;
10
- bulletListActive?: boolean;
11
- bulletListDisabled?: boolean;
12
- orderedListActive?: boolean;
13
- orderedListDisabled?: boolean;
14
- disabled?: boolean;
15
- isSmall?: boolean;
16
- isReducedSpacing?: boolean;
17
- popupsMountPoint?: HTMLElement;
18
- popupsBoundariesElement?: HTMLElement;
19
- popupsScrollableElement?: HTMLElement;
20
- showIndentationButtons?: boolean;
21
- indentDisabled?: boolean;
22
- outdentDisabled?: boolean;
23
- indentationStateNode?: IndentationButtonNode;
24
- pluginInjectionApi?: ExtractInjectionAPI<typeof toolbarListsIndentationPlugin> | undefined;
25
- }
26
- export default function ToolbarListsIndentation(props: Props): jsx.JSX.Element;