@atlaskit/editor-plugin-insert-block 3.1.3 → 3.1.5

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 (51) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/insertBlockPlugin.js +2 -54
  3. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +14 -64
  4. package/dist/cjs/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
  5. package/dist/cjs/ui/ToolbarInsertBlock/block-insert-menu.js +1 -6
  6. package/dist/cjs/ui/ToolbarInsertBlock/index.js +28 -77
  7. package/dist/es2019/insertBlockPlugin.js +2 -52
  8. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +14 -64
  9. package/dist/es2019/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
  10. package/dist/es2019/ui/ToolbarInsertBlock/block-insert-menu.js +1 -7
  11. package/dist/es2019/ui/ToolbarInsertBlock/index.js +19 -72
  12. package/dist/esm/insertBlockPlugin.js +2 -54
  13. package/dist/esm/ui/ElementBrowser/InsertMenu.js +14 -64
  14. package/dist/esm/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -1
  15. package/dist/esm/ui/ToolbarInsertBlock/block-insert-menu.js +1 -6
  16. package/dist/esm/ui/ToolbarInsertBlock/index.js +28 -77
  17. package/dist/types/types/index.d.ts +0 -1
  18. package/dist/types/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +0 -1
  19. package/dist/types-ts4.5/types/index.d.ts +0 -1
  20. package/dist/types-ts4.5/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +0 -1
  21. package/package.json +9 -9
  22. package/dist/cjs/pm-plugins/commands.js +0 -16
  23. package/dist/cjs/pm-plugins/elementBrowser.js +0 -39
  24. package/dist/cjs/ui/ElementRail/index.js +0 -236
  25. package/dist/cjs/ui/assets/expand.js +0 -40
  26. package/dist/cjs/ui/assets/switch.js +0 -26
  27. package/dist/cjs/ui/transformOptions.js +0 -36
  28. package/dist/es2019/pm-plugins/commands.js +0 -11
  29. package/dist/es2019/pm-plugins/elementBrowser.js +0 -31
  30. package/dist/es2019/ui/ElementRail/index.js +0 -233
  31. package/dist/es2019/ui/assets/expand.js +0 -34
  32. package/dist/es2019/ui/assets/switch.js +0 -18
  33. package/dist/es2019/ui/transformOptions.js +0 -29
  34. package/dist/esm/pm-plugins/commands.js +0 -11
  35. package/dist/esm/pm-plugins/elementBrowser.js +0 -33
  36. package/dist/esm/ui/ElementRail/index.js +0 -225
  37. package/dist/esm/ui/assets/expand.js +0 -33
  38. package/dist/esm/ui/assets/switch.js +0 -18
  39. package/dist/esm/ui/transformOptions.js +0 -29
  40. package/dist/types/pm-plugins/commands.d.ts +0 -6
  41. package/dist/types/pm-plugins/elementBrowser.d.ts +0 -16
  42. package/dist/types/ui/ElementRail/index.d.ts +0 -21
  43. package/dist/types/ui/assets/expand.d.ts +0 -8
  44. package/dist/types/ui/assets/switch.d.ts +0 -6
  45. package/dist/types/ui/transformOptions.d.ts +0 -27
  46. package/dist/types-ts4.5/pm-plugins/commands.d.ts +0 -6
  47. package/dist/types-ts4.5/pm-plugins/elementBrowser.d.ts +0 -16
  48. package/dist/types-ts4.5/ui/ElementRail/index.d.ts +0 -21
  49. package/dist/types-ts4.5/ui/assets/expand.d.ts +0 -8
  50. package/dist/types-ts4.5/ui/assets/switch.d.ts +0 -6
  51. package/dist/types-ts4.5/ui/transformOptions.d.ts +0 -27
@@ -1,225 +0,0 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import React, { useEffect } from 'react';
3
- import { useIntl } from 'react-intl-next';
4
- import { IconButton } from '@atlaskit/button/new';
5
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
- import { toolbarInsertBlockMessages } from '@atlaskit/editor-common/messages';
7
- import Heading from '@atlaskit/heading';
8
- import CloseIcon from '@atlaskit/icon/core/migration/close--cross';
9
- import { Box, xcss } from '@atlaskit/primitives';
10
- import { toggleInsertMenuRightRail } from '../../pm-plugins/commands';
11
- import InsertMenu from '../ElementBrowser/InsertMenu';
12
- import { useInsertMenuRailItems } from './useInsertMenuRailItems';
13
- var panelWrapper = xcss({
14
- height: '100%'
15
- });
16
- var panelContentHeader = xcss({
17
- height: '32px',
18
- display: 'flex',
19
- justifyContent: 'space-between',
20
- alignItems: 'center'
21
- });
22
-
23
- /**
24
- * For insert menu in right rail experiment
25
- * - Clean up ticket ED-24801
26
- */
27
- export var InsertMenuRail = function InsertMenuRail(_ref) {
28
- var editorView = _ref.editorView,
29
- options = _ref.options,
30
- api = _ref.api;
31
- var dropdownItems = useInsertMenuRailItems(editorView, options, api);
32
- var _useIntl = useIntl(),
33
- formatMessage = _useIntl.formatMessage;
34
- var onInsert = function onInsert(_ref2) {
35
- var _api$core, _api$hyperlink, _api$imageUpload, _api$media, _api$mention, _api$emoji, _api$codeBlock, _api$blockType, _api$panel, _api$taskDecision, _api$taskDecision2, _api$rule, _api$core2, _api$quickInsert, _api$core3, _api$date, _api$placeholderText, _api$layout, _api$core4, _api$status;
36
- var item = _ref2.item;
37
- var state = editorView.state,
38
- dispatch = editorView.dispatch;
39
- var inputMethod = INPUT_METHOD.INSERT_MENU_RIGHT_RAIL;
40
- if (!api) {
41
- return;
42
- }
43
- if (!editorView.hasFocus()) {
44
- editorView.focus();
45
- }
46
-
47
- // Below is duplicated from ToolbarInsertBlock/index.tsx - this function is only called
48
- // for BlockMenuItem items, which are rendered in the insert menu when no search has been performed.
49
- // When a search is performed, the list will be filled by QuickInsertItems, which handle their own insertion.
50
- switch (item.value.name) {
51
- case 'link':
52
- // @ts-expect-error
53
- (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$hyperlink = api.hyperlink) === null || _api$hyperlink === void 0 ? void 0 : _api$hyperlink.commands.showLinkToolbar(inputMethod));
54
- break;
55
- case 'table':
56
- // workaround to solve race condition where cursor is not placed correctly inside table
57
- queueMicrotask(function () {
58
- var _api$table, _api$table$actions$in, _api$table$actions;
59
- // @ts-expect-error
60
- (_api$table = api.table) === null || _api$table === void 0 || (_api$table$actions$in = (_api$table$actions = _api$table.actions).insertTable) === null || _api$table$actions$in === void 0 || _api$table$actions$in.call(_api$table$actions, {
61
- action: ACTION.INSERTED,
62
- actionSubject: ACTION_SUBJECT.DOCUMENT,
63
- actionSubjectId: ACTION_SUBJECT_ID.TABLE,
64
- attributes: {
65
- inputMethod: inputMethod
66
- },
67
- eventType: EVENT_TYPE.TRACK
68
- })(state, dispatch);
69
- });
70
- break;
71
- case 'image upload':
72
- (_api$imageUpload = api.imageUpload) === null || _api$imageUpload === void 0 || _api$imageUpload.actions.startUpload()(state, dispatch);
73
- break;
74
- case 'media':
75
- var mediaState = (_api$media = api.media) === null || _api$media === void 0 ? void 0 : _api$media.sharedState.currentState();
76
- if (mediaState) {
77
- var _api$analytics;
78
- mediaState.showMediaPicker();
79
- // @ts-expect-error
80
- (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.attachAnalyticsEvent({
81
- action: ACTION.OPENED,
82
- actionSubject: ACTION_SUBJECT.PICKER,
83
- actionSubjectId: ACTION_SUBJECT_ID.PICKER_CLOUD,
84
- attributes: {
85
- inputMethod: inputMethod
86
- },
87
- eventType: EVENT_TYPE.UI
88
- });
89
- }
90
- break;
91
- case 'mention':
92
- var pluginState = (_api$mention = api.mention) === null || _api$mention === void 0 ? void 0 : _api$mention.sharedState.currentState();
93
- if (pluginState && pluginState.canInsertMention) {
94
- var _api$mention2;
95
- // @ts-expect-error
96
- (_api$mention2 = api.mention) === null || _api$mention2 === void 0 || (_api$mention2 = _api$mention2.actions) === null || _api$mention2 === void 0 || _api$mention2.openTypeAhead(inputMethod);
97
- }
98
- break;
99
- case 'emoji':
100
- // @ts-expect-error
101
- (_api$emoji = api.emoji) === null || _api$emoji === void 0 || _api$emoji.actions.openTypeAhead(inputMethod);
102
- break;
103
- case 'codeblock':
104
- (_api$codeBlock = api.codeBlock) === null || _api$codeBlock === void 0 || _api$codeBlock.actions.insertCodeBlock(inputMethod)(state, dispatch);
105
- break;
106
- case 'blockquote':
107
- // @ts-expect-error
108
- (_api$blockType = api.blockType) === null || _api$blockType === void 0 || _api$blockType.actions.insertBlockQuote(inputMethod)(state, dispatch);
109
- break;
110
- case 'panel':
111
- (_api$panel = api.panel) === null || _api$panel === void 0 || _api$panel.actions.insertPanel(inputMethod)(state, dispatch);
112
- break;
113
- case 'action':
114
- // @ts-expect-error
115
- (_api$taskDecision = api.taskDecision) === null || _api$taskDecision === void 0 || _api$taskDecision.actions.insertTaskDecision('taskList', inputMethod)(state, dispatch);
116
- break;
117
- case 'decision':
118
- // @ts-expect-error
119
- (_api$taskDecision2 = api.taskDecision) === null || _api$taskDecision2 === void 0 || _api$taskDecision2.actions.insertTaskDecision('decisionList', inputMethod)(state, dispatch);
120
- break;
121
- case 'horizontalrule':
122
- // @ts-expect-error
123
- (_api$rule = api.rule) === null || _api$rule === void 0 || _api$rule.actions.insertHorizontalRule(inputMethod)(state, dispatch);
124
- break;
125
- case 'macro':
126
- (_api$core2 = api.core) === null || _api$core2 === void 0 || _api$core2.actions.execute((_api$quickInsert = api.quickInsert) === null || _api$quickInsert === void 0 ? void 0 : _api$quickInsert.commands.openElementBrowserModal);
127
- break;
128
- case 'date':
129
- (_api$core3 = api.core) === null || _api$core3 === void 0 || _api$core3.actions.execute((_api$date = api.date) === null || _api$date === void 0 || (_api$date = _api$date.commands) === null || _api$date === void 0 ? void 0 : _api$date.insertDate({
130
- // @ts-expect-error
131
- inputMethod: inputMethod
132
- }));
133
- break;
134
- case 'placeholder text':
135
- (_api$placeholderText = api.placeholderText) === null || _api$placeholderText === void 0 || _api$placeholderText.actions.showPlaceholderFloatingToolbar(editorView.state, editorView.dispatch);
136
- break;
137
- case 'layout':
138
- // @ts-expect-error
139
- (_api$layout = api.layout) === null || _api$layout === void 0 || _api$layout.actions.insertLayoutColumns(inputMethod)(editorView.state, editorView.dispatch);
140
- break;
141
- case 'status':
142
- // @ts-expect-error
143
- (_api$core4 = api.core) === null || _api$core4 === void 0 || _api$core4.actions.execute((_api$status = api.status) === null || _api$status === void 0 || (_api$status = _api$status.commands) === null || _api$status === void 0 ? void 0 : _api$status.insertStatus(inputMethod));
144
- break;
145
-
146
- // https://product-fabric.atlassian.net/browse/ED-8053
147
- // @ts-ignore: OK to fallthrough to default
148
- case 'expand':
149
- if (options.allowExpand) {
150
- var _api$expand;
151
- (_api$expand = api.expand) === null || _api$expand === void 0 || _api$expand.actions.insertExpand(state, dispatch);
152
- break;
153
- }
154
-
155
- // eslint-disable-next-line no-fallthrough
156
- default:
157
- // leaving this blank for now
158
- }
159
- };
160
- useEffect(function () {
161
- if (!api) {
162
- return;
163
- }
164
- api.core.actions.execute(function (_ref3) {
165
- var _api$analytics2;
166
- var tr = _ref3.tr;
167
- (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
168
- action: ACTION.OPENED,
169
- // @ts-expect-error
170
- actionSubject: INPUT_METHOD.INSERT_MENU_RIGHT_RAIL,
171
- eventType: EVENT_TYPE.UI
172
- })(tr);
173
- return tr;
174
- });
175
- return function () {
176
- if (!api) {
177
- return;
178
- }
179
- api.core.actions.execute(function (_ref4) {
180
- var _api$analytics3;
181
- var tr = _ref4.tr;
182
- (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 || _api$analytics3.actions.attachAnalyticsEvent({
183
- action: ACTION.CLOSED,
184
- // @ts-expect-error
185
- actionSubject: INPUT_METHOD.INSERT_MENU_RIGHT_RAIL,
186
- eventType: EVENT_TYPE.UI
187
- })(tr);
188
- return tr;
189
- });
190
- };
191
- }, [api]);
192
- return /*#__PURE__*/React.createElement(Box, {
193
- xcss: panelWrapper
194
- }, /*#__PURE__*/React.createElement(Box, {
195
- xcss: panelContentHeader
196
- }, /*#__PURE__*/React.createElement(Heading, {
197
- size: "small",
198
- as: "h2"
199
- }, formatMessage(toolbarInsertBlockMessages.insertRightRailTitle)), /*#__PURE__*/React.createElement(IconButton, {
200
- appearance: "subtle",
201
- testId: "right-rail-insert-menu-close-button",
202
- label: formatMessage(toolbarInsertBlockMessages.closeInsertRightRail),
203
- icon: CloseIcon,
204
- onClick: function onClick() {
205
- if (!api) {
206
- return;
207
- }
208
- api.core.actions.execute(function (_ref5) {
209
- var _api$contextPanel;
210
- var tr = _ref5.tr;
211
- toggleInsertMenuRightRail(tr);
212
- (_api$contextPanel = api.contextPanel) === null || _api$contextPanel === void 0 || _api$contextPanel.actions.applyChange(tr);
213
- return tr;
214
- });
215
- }
216
- })), /*#__PURE__*/React.createElement(InsertMenu, {
217
- editorView: editorView,
218
- dropdownItems: dropdownItems,
219
- onInsert: onInsert,
220
- toggleVisiblity: function toggleVisiblity() {},
221
- showElementBrowserLink: true,
222
- pluginInjectionApi: api,
223
- isFullPageAppearance: true
224
- }));
225
- };
@@ -1,33 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
6
- import { css, jsx } from '@emotion/react';
7
- var iconContainer = css({
8
- display: 'inline-flex',
9
- justifyContent: 'center',
10
- alignItems: 'center',
11
- width: '24px',
12
- height: '24px'
13
- });
14
- export default function ExpandIcon(_ref) {
15
- var disabled = _ref.disabled;
16
- return jsx("span", {
17
- css: iconContainer
18
- }, jsx("svg", {
19
- xmlns: "http://www.w3.org/2000/svg",
20
- width: "18",
21
- height: "16",
22
- viewBox: "0 0 18 16",
23
- fill: "none"
24
- }, jsx("path", {
25
- d: "M2 2V14H16V2H2ZM2 0H16C16.5304 0 17.0391 0.210714 17.4142 0.585786C17.7893 0.960859 18 1.46957 18 2V14C18 14.5304 17.7893 15.0391 17.4142 15.4142C17.0391 15.7893 16.5304 16 16 16H2C1.46957 16 0.960859 15.7893 0.585786 15.4142C0.210714 15.0391 0 14.5304 0 14V2C0 1.46957 0.210714 0.960859 0.585786 0.585786C0.960859 0.210714 1.46957 0 2 0Z",
26
- fill: disabled ? "var(--ds-icon-disabled, #B3B9C4)" : "var(--ds-icon, #44546F)"
27
- }), jsx("path", {
28
- fillRule: "evenodd",
29
- clipRule: "evenodd",
30
- d: "M5.29158 6.29294C5.10477 6.48183 5 6.73678 5 7.00244C5 7.2681 5.10477 7.52305 5.29158 7.71194L8.23058 10.6769C8.44858 10.8919 8.73058 10.9989 9.00958 10.9989C9.28858 10.9989 9.56558 10.8919 9.77858 10.6769L12.7086 7.72194C12.8951 7.53292 12.9998 7.27803 12.9998 7.01244C12.9998 6.74686 12.8951 6.49196 12.7086 6.30294C12.6167 6.20976 12.5073 6.13576 12.3866 6.08525C12.2659 6.03474 12.1364 6.00873 12.0056 6.00873C11.8748 6.00873 11.7452 6.03474 11.6245 6.08525C11.5039 6.13576 11.3944 6.20976 11.3026 6.30294L9.00458 8.61994L6.69758 6.29294C6.60554 6.20012 6.49604 6.12644 6.37538 6.07617C6.25472 6.02589 6.1253 6 5.99458 6C5.86386 6 5.73444 6.02589 5.61378 6.07617C5.49312 6.12644 5.38362 6.20012 5.29158 6.29294Z",
31
- fill: disabled ? "var(--ds-icon-disabled, #B3B9C4)" : "var(--ds-icon, #44546F)"
32
- })));
33
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
-
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
7
- import { css, jsx } from '@emotion/react';
8
- import RefreshIcon from '@atlaskit/icon/core/migration/refresh';
9
- var iconStyle = css({
10
- transform: 'rotate(-90deg)'
11
- });
12
- export default function SwitchIcon() {
13
- return jsx("span", {
14
- css: iconStyle
15
- }, jsx(RefreshIcon, {
16
- label: ""
17
- }));
18
- }
@@ -1,29 +0,0 @@
1
- import { blockTypeMessages as messages, toolbarInsertBlockMessages as toolbarMessages } from '@atlaskit/editor-common/messages';
2
- import EditorCodeIcon from '@atlaskit/icon/core/migration/angle-brackets--editor-code';
3
- import EditorInfoIcon from '@atlaskit/icon/core/migration/information--editor-info';
4
- import QuotationMarkIcon from '@atlaskit/icon/core/migration/quotation-mark--quote';
5
- import ExpandIcon from './assets/expand';
6
- export var transformationOptions = function transformationOptions(api, schema) {
7
- var _api$panel, _api$expand, _api$codeBlock, _api$blockType;
8
- return [{
9
- type: schema.nodes.panel,
10
- title: messages.panel,
11
- icon: EditorInfoIcon,
12
- command: api === null || api === void 0 || (_api$panel = api.panel) === null || _api$panel === void 0 ? void 0 : _api$panel.actions.insertPanel
13
- }, {
14
- type: schema.nodes.expand,
15
- title: toolbarMessages.expand,
16
- icon: ExpandIcon,
17
- command: api === null || api === void 0 || (_api$expand = api.expand) === null || _api$expand === void 0 ? void 0 : _api$expand.actions.insertExpandWithInputMethod
18
- }, {
19
- type: schema.nodes.codeBlock,
20
- title: messages.codeblock,
21
- icon: EditorCodeIcon,
22
- command: api === null || api === void 0 || (_api$codeBlock = api.codeBlock) === null || _api$codeBlock === void 0 ? void 0 : _api$codeBlock.actions.insertCodeBlock
23
- }, {
24
- type: schema.nodes.blockquote,
25
- title: messages.blockquote,
26
- icon: QuotationMarkIcon,
27
- command: api === null || api === void 0 || (_api$blockType = api.blockType) === null || _api$blockType === void 0 ? void 0 : _api$blockType.actions.insertBlockQuote
28
- }];
29
- };
@@ -1,6 +0,0 @@
1
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
2
- /**
3
- * For insert menu in right rail experiment
4
- * - Clean up ticket ED-24801
5
- */
6
- export declare const toggleInsertMenuRightRail: (tr: Transaction) => Transaction;
@@ -1,16 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- type ElementBrowserPmPluginState = {
4
- menuBrowserOpen: boolean;
5
- };
6
- /**
7
- * For insert menu in right rail experiment
8
- * - Clean up ticket ED-24801
9
- */
10
- export declare const elementBrowserPmKey: PluginKey<ElementBrowserPmPluginState>;
11
- /**
12
- * For insert menu in right rail experiment
13
- * - Clean up ticket ED-24801
14
- */
15
- export declare const elementBrowserPmPlugin: () => SafePlugin<ElementBrowserPmPluginState>;
16
- export {};
@@ -1,21 +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 '../../insertBlockPluginType';
5
- import { type InsertBlockOptions } from '../../types';
6
- /**
7
- * For insert menu in right rail experiment
8
- * - Clean up ticket ED-24801
9
- */
10
- export declare const InsertMenuRail: ({ editorView, options, api, }: {
11
- editorView: EditorView;
12
- options: InsertBlockOptions;
13
- api?: import("@atlaskit/editor-common/types").EditorInjectionAPI<"insertBlock", {
14
- pluginConfiguration: InsertBlockOptions | undefined;
15
- dependencies: import("../../types").InsertBlockPluginDependencies;
16
- actions: {
17
- toggleAdditionalMenu: () => void;
18
- };
19
- sharedState: import("../../types").InsertBlockPluginState | undefined;
20
- }> | undefined;
21
- }) => React.JSX.Element;
@@ -1,8 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- export default function ExpandIcon({ disabled }: {
7
- disabled?: boolean;
8
- }): jsx.JSX.Element;
@@ -1,6 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- export default function SwitchIcon(): jsx.JSX.Element;
@@ -1,27 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import { type Schema } from '@atlaskit/editor-prosemirror/model';
4
- import type { InsertBlockPlugin } from '../insertBlockPluginType';
5
- import ExpandIcon from './assets/expand';
6
- export declare const transformationOptions: (api: ExtractInjectionAPI<InsertBlockPlugin> | undefined, schema: Schema) => ({
7
- type: import("prosemirror-model").NodeType;
8
- title: {
9
- id: string;
10
- defaultMessage: string;
11
- description: string;
12
- };
13
- icon: typeof ExpandIcon;
14
- command: ((inputMethod: import("@atlaskit/editor-plugin-expand").InsertMethod) => import("@atlaskit/editor-common/types").Command) | undefined;
15
- } | {
16
- type: import("prosemirror-model").NodeType;
17
- title: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- icon: {
23
- (props: Omit<import("@atlaskit/icon").NewCoreIconProps, "LEGACY_fallbackIcon">): JSX.Element;
24
- displayName: string;
25
- };
26
- command: ((inputMethod: import("@atlaskit/editor-plugin-block-type").InputMethod) => import("@atlaskit/editor-common/types").Command) | undefined;
27
- })[];
@@ -1,6 +0,0 @@
1
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
2
- /**
3
- * For insert menu in right rail experiment
4
- * - Clean up ticket ED-24801
5
- */
6
- export declare const toggleInsertMenuRightRail: (tr: Transaction) => Transaction;
@@ -1,16 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- type ElementBrowserPmPluginState = {
4
- menuBrowserOpen: boolean;
5
- };
6
- /**
7
- * For insert menu in right rail experiment
8
- * - Clean up ticket ED-24801
9
- */
10
- export declare const elementBrowserPmKey: PluginKey<ElementBrowserPmPluginState>;
11
- /**
12
- * For insert menu in right rail experiment
13
- * - Clean up ticket ED-24801
14
- */
15
- export declare const elementBrowserPmPlugin: () => SafePlugin<ElementBrowserPmPluginState>;
16
- export {};
@@ -1,21 +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 '../../insertBlockPluginType';
5
- import { type InsertBlockOptions } from '../../types';
6
- /**
7
- * For insert menu in right rail experiment
8
- * - Clean up ticket ED-24801
9
- */
10
- export declare const InsertMenuRail: ({ editorView, options, api, }: {
11
- editorView: EditorView;
12
- options: InsertBlockOptions;
13
- api?: import("@atlaskit/editor-common/types").EditorInjectionAPI<"insertBlock", {
14
- pluginConfiguration: InsertBlockOptions | undefined;
15
- dependencies: import("../../types").InsertBlockPluginDependencies;
16
- actions: {
17
- toggleAdditionalMenu: () => void;
18
- };
19
- sharedState: import("../../types").InsertBlockPluginState | undefined;
20
- }> | undefined;
21
- }) => React.JSX.Element;
@@ -1,8 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- export default function ExpandIcon({ disabled }: {
7
- disabled?: boolean;
8
- }): jsx.JSX.Element;
@@ -1,6 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- export default function SwitchIcon(): jsx.JSX.Element;
@@ -1,27 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import { type Schema } from '@atlaskit/editor-prosemirror/model';
4
- import type { InsertBlockPlugin } from '../insertBlockPluginType';
5
- import ExpandIcon from './assets/expand';
6
- export declare const transformationOptions: (api: ExtractInjectionAPI<InsertBlockPlugin> | undefined, schema: Schema) => ({
7
- type: import("prosemirror-model").NodeType;
8
- title: {
9
- id: string;
10
- defaultMessage: string;
11
- description: string;
12
- };
13
- icon: typeof ExpandIcon;
14
- command: ((inputMethod: import("@atlaskit/editor-plugin-expand").InsertMethod) => import("@atlaskit/editor-common/types").Command) | undefined;
15
- } | {
16
- type: import("prosemirror-model").NodeType;
17
- title: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- icon: {
23
- (props: Omit<import("@atlaskit/icon").NewCoreIconProps, "LEGACY_fallbackIcon">): JSX.Element;
24
- displayName: string;
25
- };
26
- command: ((inputMethod: import("@atlaskit/editor-plugin-block-type").InputMethod) => import("@atlaskit/editor-common/types").Command) | undefined;
27
- })[];