@atlaskit/editor-plugin-expand 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSE.md +13 -0
  3. package/README.md +30 -0
  4. package/dist/cjs/commands.js +184 -0
  5. package/dist/cjs/index.js +12 -0
  6. package/dist/cjs/nodeviews/index.js +494 -0
  7. package/dist/cjs/plugin.js +101 -0
  8. package/dist/cjs/pm-plugins/keymap.js +170 -0
  9. package/dist/cjs/pm-plugins/main.js +85 -0
  10. package/dist/cjs/pm-plugins/plugin-factory.js +15 -0
  11. package/dist/cjs/reducer.js +20 -0
  12. package/dist/cjs/toolbar.js +59 -0
  13. package/dist/cjs/types.js +5 -0
  14. package/dist/cjs/ui/ExpandIconButton.js +107 -0
  15. package/dist/cjs/utils.js +24 -0
  16. package/dist/es2019/commands.js +161 -0
  17. package/dist/es2019/index.js +1 -0
  18. package/dist/es2019/nodeviews/index.js +484 -0
  19. package/dist/es2019/plugin.js +86 -0
  20. package/dist/es2019/pm-plugins/keymap.js +197 -0
  21. package/dist/es2019/pm-plugins/main.js +73 -0
  22. package/dist/es2019/pm-plugins/plugin-factory.js +9 -0
  23. package/dist/es2019/reducer.js +11 -0
  24. package/dist/es2019/toolbar.js +52 -0
  25. package/dist/es2019/types.js +1 -0
  26. package/dist/es2019/ui/ExpandIconButton.js +88 -0
  27. package/dist/es2019/utils.js +1 -0
  28. package/dist/esm/commands.js +177 -0
  29. package/dist/esm/index.js +1 -0
  30. package/dist/esm/nodeviews/index.js +486 -0
  31. package/dist/esm/plugin.js +88 -0
  32. package/dist/esm/pm-plugins/keymap.js +165 -0
  33. package/dist/esm/pm-plugins/main.js +77 -0
  34. package/dist/esm/pm-plugins/plugin-factory.js +9 -0
  35. package/dist/esm/reducer.js +13 -0
  36. package/dist/esm/toolbar.js +52 -0
  37. package/dist/esm/types.js +1 -0
  38. package/dist/esm/ui/ExpandIconButton.js +98 -0
  39. package/dist/esm/utils.js +1 -0
  40. package/dist/types/commands.d.ts +13 -0
  41. package/dist/types/index.d.ts +3 -0
  42. package/dist/types/nodeviews/index.d.ts +55 -0
  43. package/dist/types/plugin.d.ts +24 -0
  44. package/dist/types/pm-plugins/keymap.d.ts +4 -0
  45. package/dist/types/pm-plugins/main.d.ts +7 -0
  46. package/dist/types/pm-plugins/plugin-factory.d.ts +3 -0
  47. package/dist/types/reducer.d.ts +3 -0
  48. package/dist/types/toolbar.d.ts +3 -0
  49. package/dist/types/types.d.ts +31 -0
  50. package/dist/types/ui/ExpandIconButton.d.ts +43 -0
  51. package/dist/types/utils.d.ts +1 -0
  52. package/dist/types-ts4.5/commands.d.ts +13 -0
  53. package/dist/types-ts4.5/index.d.ts +3 -0
  54. package/dist/types-ts4.5/nodeviews/index.d.ts +55 -0
  55. package/dist/types-ts4.5/plugin.d.ts +24 -0
  56. package/dist/types-ts4.5/pm-plugins/keymap.d.ts +4 -0
  57. package/dist/types-ts4.5/pm-plugins/main.d.ts +7 -0
  58. package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +3 -0
  59. package/dist/types-ts4.5/reducer.d.ts +3 -0
  60. package/dist/types-ts4.5/toolbar.d.ts +3 -0
  61. package/dist/types-ts4.5/types.d.ts +31 -0
  62. package/dist/types-ts4.5/ui/ExpandIconButton.d.ts +43 -0
  63. package/dist/types-ts4.5/utils.d.ts +1 -0
  64. package/package.json +104 -0
  65. package/report.api.md +93 -0
  66. package/tmp/api-report-tmp.d.ts +62 -0
@@ -0,0 +1,3 @@
1
+ export type { ExpandPlugin } from './plugin';
2
+ export type { ExpandPluginState, ExpandPluginOptions } from './types';
3
+ export { expandPlugin } from './plugin';
@@ -0,0 +1,55 @@
1
+ import type { IntlShape } from 'react-intl-next';
2
+ import type { SetSelectionRelativeToNode } from '@atlaskit/editor-common/selection';
3
+ import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
4
+ import type { getPosHandler, getPosHandlerNode } from '@atlaskit/editor-common/types';
5
+ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
6
+ import type { Decoration, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
7
+ import type { ExpandPlugin } from '../types';
8
+ export declare class ExpandNodeView implements NodeView {
9
+ private selectNearNode;
10
+ node: PmNode;
11
+ view: EditorView;
12
+ dom: HTMLElement;
13
+ contentDOM?: HTMLElement;
14
+ icon?: HTMLElement | null;
15
+ input?: HTMLInputElement | null;
16
+ titleContainer?: HTMLElement | null;
17
+ content?: HTMLElement | null;
18
+ getPos: getPosHandlerNode;
19
+ intl: IntlShape;
20
+ allowInteractiveExpand: boolean;
21
+ isMobile: boolean;
22
+ featureFlags: FeatureFlags;
23
+ api: ExtractInjectionAPI<ExpandPlugin> | undefined;
24
+ constructor(node: PmNode, view: EditorView, getPos: getPosHandlerNode, getIntl: () => IntlShape, isMobile: boolean, featureFlags: FeatureFlags, selectNearNode: SetSelectionRelativeToNode | undefined, api: ExtractInjectionAPI<ExpandPlugin> | undefined);
25
+ private initHandlers;
26
+ private focusTitle;
27
+ private handleIconKeyDown;
28
+ private renderIcon;
29
+ private isAllowInteractiveExpandEnabled;
30
+ private handleClick;
31
+ private handleInput;
32
+ private handleFocus;
33
+ private handleTitleKeydown;
34
+ private deleteExpand;
35
+ private toggleExpand;
36
+ private moveToOutsideOfTitle;
37
+ private isCollapsed;
38
+ private setRightGapCursor;
39
+ private setLeftGapCursor;
40
+ private handleArrowRightFromTitle;
41
+ private handleArrowLeftFromTitle;
42
+ stopEvent(event: Event): boolean;
43
+ ignoreMutation(mutationRecord: MutationRecord | {
44
+ type: 'selection';
45
+ target: Element;
46
+ }): boolean;
47
+ update(node: PmNode, _decorations: readonly Decoration[]): boolean;
48
+ destroy(): void;
49
+ }
50
+ export default function ({ getIntl, isMobile, featureFlags, api, }: {
51
+ getIntl: () => IntlShape;
52
+ isMobile: boolean;
53
+ featureFlags: FeatureFlags;
54
+ api: ExtractInjectionAPI<ExpandPlugin> | undefined;
55
+ }): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -0,0 +1,24 @@
1
+ import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
+ import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
+ import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
6
+ import { insertExpand } from './commands';
7
+ interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
8
+ allowInsertion?: boolean;
9
+ appearance?: EditorAppearance;
10
+ }
11
+ export type ExpandPlugin = NextEditorPlugin<'expand', {
12
+ pluginConfiguration: ExpandPluginOptions | undefined;
13
+ dependencies: [
14
+ FeatureFlagsPlugin,
15
+ DecorationsPlugin,
16
+ SelectionPlugin,
17
+ OptionalPlugin<AnalyticsPlugin>
18
+ ];
19
+ actions: {
20
+ insertExpand: ReturnType<typeof insertExpand>;
21
+ };
22
+ }>;
23
+ export declare const expandPlugin: ExpandPlugin;
24
+ export { pluginKey } from './pm-plugins/plugin-factory';
@@ -0,0 +1,4 @@
1
+ import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { ExpandPlugin } from '../types';
4
+ export declare function expandKeymap(api: ExtractInjectionAPI<ExpandPlugin> | undefined): SafePlugin;
@@ -0,0 +1,7 @@
1
+ import type { IntlShape } from 'react-intl-next';
2
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
3
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
+ import type { EditorAppearance, ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
5
+ import type { ExpandPlugin } from '../types';
6
+ export declare function containsClass(element: Element | null, className: string): boolean;
7
+ export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorAppearance | undefined, useLongPressSelection: boolean | undefined, featureFlags: FeatureFlags, api: ExtractInjectionAPI<ExpandPlugin> | undefined) => SafePlugin<import("../types").ExpandPluginState>;
@@ -0,0 +1,3 @@
1
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
+ export declare const pluginKey: PluginKey<any>;
3
+ export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: import("..").ExpandPluginState | ((state: import("prosemirror-state").EditorState) => import("..").ExpandPluginState)) => import("prosemirror-state").SafeStateField<import("..").ExpandPluginState>, createCommand: <A = import("../types").ExpandPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("..").ExpandPluginState;
@@ -0,0 +1,3 @@
1
+ import type { ExpandPluginAction, ExpandPluginState } from './types';
2
+ declare const _default: (pluginState: ExpandPluginState, action: ExpandPluginAction) => ExpandPluginState;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { ExtractInjectionAPI, FloatingToolbarHandler } from '@atlaskit/editor-common/types';
2
+ import type { ExpandPlugin } from './index';
3
+ export declare const getToolbarConfig: (api: ExtractInjectionAPI<ExpandPlugin> | undefined) => FloatingToolbarHandler;
@@ -0,0 +1,31 @@
1
+ import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
+ import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
+ import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
6
+ import type { insertExpand } from './commands';
7
+ export interface ExpandPluginState {
8
+ expandRef?: HTMLDivElement | null;
9
+ }
10
+ export type ExpandPluginAction = {
11
+ type: 'SET_EXPAND_REF';
12
+ data: {
13
+ ref?: HTMLDivElement | null;
14
+ };
15
+ };
16
+ export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
17
+ allowInsertion?: boolean;
18
+ appearance?: EditorAppearance;
19
+ }
20
+ export type ExpandPlugin = NextEditorPlugin<'expand', {
21
+ pluginConfiguration: ExpandPluginOptions | undefined;
22
+ dependencies: [
23
+ FeatureFlagsPlugin,
24
+ DecorationsPlugin,
25
+ SelectionPlugin,
26
+ OptionalPlugin<AnalyticsPlugin>
27
+ ];
28
+ actions: {
29
+ insertExpand: ReturnType<typeof insertExpand>;
30
+ };
31
+ }>;
@@ -0,0 +1,43 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import type { IntlShape } from 'react-intl-next';
5
+ interface ExpandIconButtonProps {
6
+ allowInteractiveExpand: boolean;
7
+ expanded: boolean;
8
+ intl?: IntlShape;
9
+ }
10
+ interface ExpandIconButtonWithLabelProps extends ExpandIconButtonProps {
11
+ label: string;
12
+ }
13
+ export declare const withTooltip: (WrapperComponent: React.ElementType) => {
14
+ new (props: ExpandIconButtonWithLabelProps): {
15
+ render(): jsx.JSX.Element;
16
+ context: any;
17
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ExpandIconButtonWithLabelProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
18
+ forceUpdate(callback?: (() => void) | undefined): void;
19
+ readonly props: Readonly<ExpandIconButtonWithLabelProps> & Readonly<{
20
+ children?: React.ReactNode;
21
+ }>;
22
+ state: Readonly<{}>;
23
+ refs: {
24
+ [key: string]: React.ReactInstance;
25
+ };
26
+ componentDidMount?(): void;
27
+ shouldComponentUpdate?(nextProps: Readonly<ExpandIconButtonWithLabelProps>, nextState: Readonly<{}>, nextContext: any): boolean;
28
+ componentWillUnmount?(): void;
29
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
30
+ getSnapshotBeforeUpdate?(prevProps: Readonly<ExpandIconButtonWithLabelProps>, prevState: Readonly<{}>): any;
31
+ componentDidUpdate?(prevProps: Readonly<ExpandIconButtonWithLabelProps>, prevState: Readonly<{}>, snapshot?: any): void;
32
+ componentWillMount?(): void;
33
+ UNSAFE_componentWillMount?(): void;
34
+ componentWillReceiveProps?(nextProps: Readonly<ExpandIconButtonWithLabelProps>, nextContext: any): void;
35
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<ExpandIconButtonWithLabelProps>, nextContext: any): void;
36
+ componentWillUpdate?(nextProps: Readonly<ExpandIconButtonWithLabelProps>, nextState: Readonly<{}>, nextContext: any): void;
37
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<ExpandIconButtonWithLabelProps>, nextState: Readonly<{}>, nextContext: any): void;
38
+ };
39
+ contextType?: React.Context<any> | undefined;
40
+ };
41
+ export declare const CustomButton: (props: ExpandIconButtonWithLabelProps) => jsx.JSX.Element;
42
+ export declare const ExpandIconButton: (props: ExpandIconButtonProps) => jsx.JSX.Element;
43
+ export {};
@@ -0,0 +1 @@
1
+ export { findExpand, transformSliceToRemoveOpenExpand, transformSliceNestedExpandToExpand, } from '@atlaskit/editor-common/transforms';
package/package.json ADDED
@@ -0,0 +1,104 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-expand",
3
+ "version": "0.1.0",
4
+ "description": "Expand plugin for @atlaskit/editor-core",
5
+ "author": "Atlassian Pty Ltd",
6
+ "license": "Apache-2.0",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
10
+ "atlassian": {
11
+ "team": "Editor: Jenga",
12
+ "inPublicMirror": false,
13
+ "releaseModel": "continuous"
14
+ },
15
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
16
+ "main": "dist/cjs/index.js",
17
+ "module": "dist/esm/index.js",
18
+ "module:es2019": "dist/es2019/index.js",
19
+ "types": "dist/types/index.d.ts",
20
+ "typesVersions": {
21
+ ">=4.5 <4.9": {
22
+ "*": [
23
+ "dist/types-ts4.5/*",
24
+ "dist/types-ts4.5/index.d.ts"
25
+ ]
26
+ }
27
+ },
28
+ "sideEffects": false,
29
+ "atlaskit:src": "src/index.ts",
30
+ "af:exports": {
31
+ ".": "./src/index.ts"
32
+ },
33
+ "dependencies": {
34
+ "@atlaskit/adf-schema": "^32.0.0",
35
+ "@atlaskit/button": "^16.13.0",
36
+ "@atlaskit/editor-common": "^76.18.0",
37
+ "@atlaskit/editor-plugin-analytics": "^0.3.0",
38
+ "@atlaskit/editor-plugin-decorations": "^0.2.0",
39
+ "@atlaskit/editor-plugin-feature-flags": "^1.0.1",
40
+ "@atlaskit/editor-plugin-selection": "^0.1.0",
41
+ "@atlaskit/editor-prosemirror": "1.1.0",
42
+ "@atlaskit/editor-shared-styles": "^2.8.0",
43
+ "@atlaskit/editor-tables": "^2.3.0",
44
+ "@atlaskit/icon": "^21.12.0",
45
+ "@atlaskit/tooltip": "^17.8.0",
46
+ "@babel/runtime": "^7.0.0",
47
+ "@emotion/react": "^11.7.1",
48
+ "w3c-keyname": "^2.1.0"
49
+ },
50
+ "peerDependencies": {
51
+ "react": "^16.8.0",
52
+ "react-dom": "^16.8.0",
53
+ "react-intl-next": "npm:react-intl@^5.18.1"
54
+ },
55
+ "devDependencies": {
56
+ "@atlaskit/analytics-next": "^9.1.0",
57
+ "@atlaskit/editor-plugin-content-insertion": "^0.1.0",
58
+ "@atlaskit/editor-plugin-guideline": "^0.5.0",
59
+ "@atlaskit/editor-plugin-quick-insert": "^0.2.0",
60
+ "@atlaskit/editor-plugin-table": "^5.3.0",
61
+ "@atlaskit/editor-plugin-type-ahead": "^0.7.0",
62
+ "@atlaskit/editor-plugin-width": "^0.2.0",
63
+ "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
64
+ "@testing-library/react": "^12.1.5",
65
+ "react-test-renderer": "^16.8.0",
66
+ "typescript": "~4.9.5"
67
+ },
68
+ "techstack": {
69
+ "@atlassian/frontend": {
70
+ "import-structure": [
71
+ "atlassian-conventions"
72
+ ],
73
+ "circular-dependencies": [
74
+ "file-and-folder-level"
75
+ ]
76
+ },
77
+ "@repo/internal": {
78
+ "dom-events": "use-bind-event-listener",
79
+ "analytics": [
80
+ "analytics-next"
81
+ ],
82
+ "design-tokens": [
83
+ "color"
84
+ ],
85
+ "theming": [
86
+ "react-context"
87
+ ],
88
+ "ui-components": [
89
+ "lite-mode"
90
+ ],
91
+ "deprecation": [
92
+ "no-deprecated-imports"
93
+ ],
94
+ "styling": [
95
+ "static",
96
+ "emotion"
97
+ ],
98
+ "imports": [
99
+ "import-no-extraneous-disable-for-examples-and-docs"
100
+ ]
101
+ }
102
+ },
103
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
104
+ }
package/report.api.md ADDED
@@ -0,0 +1,93 @@
1
+ <!-- API Report Version: 2.3 -->
2
+
3
+ ## API Report File for "@atlaskit/editor-plugin-expand"
4
+
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
11
+ - [Peer Dependencies](#peer-dependencies)
12
+
13
+ ### Main Entry Types
14
+
15
+ <!--SECTION START: Main Entry Types-->
16
+
17
+ ```ts
18
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
19
+ import type { Command } from '@atlaskit/editor-common/types';
20
+ import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
21
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
22
+ import type { EditorAppearance } from '@atlaskit/editor-common/types';
23
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
24
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
25
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
26
+ import type { OptionalPlugin } from '@atlaskit/editor-common/types';
27
+ import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
28
+
29
+ // @public (undocumented)
30
+ export type ExpandPlugin = NextEditorPlugin<
31
+ 'expand',
32
+ {
33
+ pluginConfiguration: ExpandPluginOptions_2 | undefined;
34
+ dependencies: [
35
+ FeatureFlagsPlugin,
36
+ DecorationsPlugin,
37
+ SelectionPlugin,
38
+ OptionalPlugin<AnalyticsPlugin>,
39
+ ];
40
+ actions: {
41
+ insertExpand: ReturnType<typeof insertExpand>;
42
+ };
43
+ }
44
+ >;
45
+
46
+ // @public (undocumented)
47
+ export const expandPlugin: ExpandPlugin;
48
+
49
+ // @public (undocumented)
50
+ export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
51
+ // (undocumented)
52
+ allowInsertion?: boolean;
53
+ // (undocumented)
54
+ appearance?: EditorAppearance;
55
+ }
56
+
57
+ // @public (undocumented)
58
+ interface ExpandPluginOptions_2 extends LongPressSelectionPluginOptions {
59
+ // (undocumented)
60
+ allowInsertion?: boolean;
61
+ // (undocumented)
62
+ appearance?: EditorAppearance;
63
+ }
64
+
65
+ // @public (undocumented)
66
+ export interface ExpandPluginState {
67
+ // (undocumented)
68
+ expandRef?: HTMLDivElement | null;
69
+ }
70
+
71
+ // @public (undocumented)
72
+ const insertExpand: (
73
+ editorAnalyticsAPI: EditorAnalyticsAPI | undefined,
74
+ ) => Command;
75
+
76
+ // (No @packageDocumentation comment for this package)
77
+ ```
78
+
79
+ <!--SECTION END: Main Entry Types-->
80
+
81
+ ### Peer Dependencies
82
+
83
+ <!--SECTION START: Peer Dependencies-->
84
+
85
+ ```json
86
+ {
87
+ "react": "^16.8.0",
88
+ "react-dom": "^16.8.0",
89
+ "react-intl-next": "npm:react-intl@^5.18.1"
90
+ }
91
+ ```
92
+
93
+ <!--SECTION END: Peer Dependencies-->
@@ -0,0 +1,62 @@
1
+ ## API Report File for "@atlaskit/editor-plugin-expand"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
8
+ import type { Command } from '@atlaskit/editor-common/types';
9
+ import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
10
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
11
+ import type { EditorAppearance } from '@atlaskit/editor-common/types';
12
+ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
13
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
14
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
15
+ import type { OptionalPlugin } from '@atlaskit/editor-common/types';
16
+ import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
17
+
18
+ // @public (undocumented)
19
+ export type ExpandPlugin = NextEditorPlugin<'expand', {
20
+ pluginConfiguration: ExpandPluginOptions_2 | undefined;
21
+ dependencies: [
22
+ FeatureFlagsPlugin,
23
+ DecorationsPlugin,
24
+ SelectionPlugin,
25
+ OptionalPlugin<AnalyticsPlugin>
26
+ ];
27
+ actions: {
28
+ insertExpand: ReturnType<typeof insertExpand>;
29
+ };
30
+ }>;
31
+
32
+ // @public (undocumented)
33
+ export const expandPlugin: ExpandPlugin;
34
+
35
+ // @public (undocumented)
36
+ export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
37
+ // (undocumented)
38
+ allowInsertion?: boolean;
39
+ // (undocumented)
40
+ appearance?: EditorAppearance;
41
+ }
42
+
43
+ // @public (undocumented)
44
+ interface ExpandPluginOptions_2 extends LongPressSelectionPluginOptions {
45
+ // (undocumented)
46
+ allowInsertion?: boolean;
47
+ // (undocumented)
48
+ appearance?: EditorAppearance;
49
+ }
50
+
51
+ // @public (undocumented)
52
+ export interface ExpandPluginState {
53
+ // (undocumented)
54
+ expandRef?: HTMLDivElement | null;
55
+ }
56
+
57
+ // @public (undocumented)
58
+ const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
59
+
60
+ // (No @packageDocumentation comment for this package)
61
+
62
+ ```