@atlaskit/editor-plugin-insert-block 3.1.2 → 3.1.4

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 +4 -4
  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,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
- })[];