@atlaskit/editor-plugin-base 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.
- package/.eslintrc.js +14 -0
- package/CHANGELOG.md +11 -0
- package/LICENSE.md +13 -0
- package/README.md +33 -0
- package/dist/cjs/commands.js +20 -0
- package/dist/cjs/index.js +33 -0
- package/dist/cjs/plugin.js +143 -0
- package/dist/cjs/pm-plugins/context-identifier.js +58 -0
- package/dist/cjs/pm-plugins/disable-spell-checking.js +63 -0
- package/dist/cjs/pm-plugins/filter-steps.js +34 -0
- package/dist/cjs/pm-plugins/fix-chrome-88-selection.js +34 -0
- package/dist/cjs/pm-plugins/frozen-editor.js +265 -0
- package/dist/cjs/pm-plugins/inline-cursor-target.js +184 -0
- package/dist/cjs/pm-plugins/newline-preserve-marks.js +34 -0
- package/dist/cjs/pm-plugins/scroll-gutter/index.js +264 -0
- package/dist/cjs/pm-plugins/scroll-gutter/plugin-key.js +15 -0
- package/dist/cjs/types.js +5 -0
- package/dist/cjs/utils/frozen-editor.js +11 -0
- package/dist/cjs/utils/input-latency-tracking.js +134 -0
- package/dist/es2019/commands.js +13 -0
- package/dist/es2019/index.js +4 -0
- package/dist/es2019/plugin.js +113 -0
- package/dist/es2019/pm-plugins/context-identifier.js +43 -0
- package/dist/es2019/pm-plugins/disable-spell-checking.js +54 -0
- package/dist/es2019/pm-plugins/filter-steps.js +23 -0
- package/dist/es2019/pm-plugins/fix-chrome-88-selection.js +24 -0
- package/dist/es2019/pm-plugins/frozen-editor.js +258 -0
- package/dist/es2019/pm-plugins/inline-cursor-target.js +187 -0
- package/dist/es2019/pm-plugins/newline-preserve-marks.js +20 -0
- package/dist/es2019/pm-plugins/scroll-gutter/index.js +244 -0
- package/dist/es2019/pm-plugins/scroll-gutter/plugin-key.js +7 -0
- package/dist/es2019/types.js +1 -0
- package/dist/es2019/utils/frozen-editor.js +2 -0
- package/dist/es2019/utils/input-latency-tracking.js +103 -0
- package/dist/esm/commands.js +13 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/plugin.js +131 -0
- package/dist/esm/pm-plugins/context-identifier.js +48 -0
- package/dist/esm/pm-plugins/disable-spell-checking.js +56 -0
- package/dist/esm/pm-plugins/filter-steps.js +27 -0
- package/dist/esm/pm-plugins/fix-chrome-88-selection.js +26 -0
- package/dist/esm/pm-plugins/frozen-editor.js +251 -0
- package/dist/esm/pm-plugins/inline-cursor-target.js +175 -0
- package/dist/esm/pm-plugins/newline-preserve-marks.js +26 -0
- package/dist/esm/pm-plugins/scroll-gutter/index.js +256 -0
- package/dist/esm/pm-plugins/scroll-gutter/plugin-key.js +7 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/utils/frozen-editor.js +4 -0
- package/dist/esm/utils/input-latency-tracking.js +127 -0
- package/dist/types/commands.d.ts +2 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/plugin.d.ts +24 -0
- package/dist/types/pm-plugins/context-identifier.d.ts +12 -0
- package/dist/types/pm-plugins/disable-spell-checking.d.ts +4 -0
- package/dist/types/pm-plugins/filter-steps.d.ts +4 -0
- package/dist/types/pm-plugins/fix-chrome-88-selection.d.ts +5 -0
- package/dist/types/pm-plugins/frozen-editor.d.ts +12 -0
- package/dist/types/pm-plugins/inline-cursor-target.d.ts +17 -0
- package/dist/types/pm-plugins/newline-preserve-marks.d.ts +5 -0
- package/dist/types/pm-plugins/scroll-gutter/index.d.ts +22 -0
- package/dist/types/pm-plugins/scroll-gutter/plugin-key.d.ts +7 -0
- package/dist/types/types.d.ts +4 -0
- package/dist/types/utils/frozen-editor.d.ts +2 -0
- package/dist/types/utils/input-latency-tracking.d.ts +42 -0
- package/dist/types-ts4.5/commands.d.ts +2 -0
- package/dist/types-ts4.5/index.d.ts +7 -0
- package/dist/types-ts4.5/plugin.d.ts +26 -0
- package/dist/types-ts4.5/pm-plugins/context-identifier.d.ts +12 -0
- package/dist/types-ts4.5/pm-plugins/disable-spell-checking.d.ts +4 -0
- package/dist/types-ts4.5/pm-plugins/filter-steps.d.ts +4 -0
- package/dist/types-ts4.5/pm-plugins/fix-chrome-88-selection.d.ts +5 -0
- package/dist/types-ts4.5/pm-plugins/frozen-editor.d.ts +12 -0
- package/dist/types-ts4.5/pm-plugins/inline-cursor-target.d.ts +17 -0
- package/dist/types-ts4.5/pm-plugins/newline-preserve-marks.d.ts +5 -0
- package/dist/types-ts4.5/pm-plugins/scroll-gutter/index.d.ts +22 -0
- package/dist/types-ts4.5/pm-plugins/scroll-gutter/plugin-key.d.ts +7 -0
- package/dist/types-ts4.5/types.d.ts +4 -0
- package/dist/types-ts4.5/utils/frozen-editor.d.ts +2 -0
- package/dist/types-ts4.5/utils/input-latency-tracking.d.ts +42 -0
- package/package.json +92 -0
- package/report.api.md +89 -0
- package/tmp/api-report-tmp.d.ts +64 -0
- package/tsconfig.app.json +45 -0
- package/tsconfig.dev.json +81 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
+
import type { BrowserFreezetracking, InputTracking } from '@atlaskit/editor-common/types';
|
|
4
|
+
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
+
export declare const frozenEditorPluginKey: PluginKey<any>;
|
|
6
|
+
export declare const DEFAULT_FREEZE_THRESHOLD = 600;
|
|
7
|
+
export declare const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
8
|
+
export declare const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
9
|
+
export declare const DEFAULT_TRACK_SEVERITY_THRESHOLD_NORMAL = 100;
|
|
10
|
+
export declare const DEFAULT_TRACK_SEVERITY_THRESHOLD_DEGRADED = 500;
|
|
11
|
+
declare const _default: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, inputTracking?: InputTracking, browserFreezeTracking?: BrowserFreezetracking, ufo?: boolean) => SafePlugin<any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
+
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
+
export declare const inlineCursorTargetStateKey: PluginKey<any>;
|
|
6
|
+
export declare const isInlineNodeView: (node: Node | null | undefined) => boolean | null | undefined;
|
|
7
|
+
export interface InlineCursorTargetState {
|
|
8
|
+
cursorTarget?: {
|
|
9
|
+
decorations: (Decoration | null)[];
|
|
10
|
+
positions: {
|
|
11
|
+
from: number;
|
|
12
|
+
to: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare const _default: () => SafePlugin<InlineCursorTargetState>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
export declare const getKeyboardHeight: (state?: EditorState) => number | undefined;
|
|
5
|
+
export type ScrollGutterPluginOptions = {
|
|
6
|
+
/** Element the page uses for scrolling */
|
|
7
|
+
getScrollElement?: (view: EditorView) => HTMLElement | null;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to allow custom functionality to scroll to gutter element in
|
|
10
|
+
* plugin's handleScrollToSelection function
|
|
11
|
+
* Default is true
|
|
12
|
+
*/
|
|
13
|
+
allowCustomScrollHandler?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Persist scroll gutter when the mobile appearance is COMPACT
|
|
16
|
+
* Default is false
|
|
17
|
+
*/
|
|
18
|
+
persistScrollGutter?: boolean;
|
|
19
|
+
gutterSize?: number;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: (pluginOptions?: ScrollGutterPluginOptions) => SafePlugin<{}> | undefined;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
export type ScrollGutterPluginState = {
|
|
4
|
+
keyboardHeight: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const scrollGutterPluginKey: PluginKey<ScrollGutterPluginState>;
|
|
7
|
+
export declare const getScrollGutterPluginState: (state?: EditorState) => ScrollGutterPluginState | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
export type CommandDispatch = (tr: Transaction) => void;
|
|
4
|
+
export type Command = (state: EditorState, dispatch?: CommandDispatch, view?: EditorView) => boolean;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { SEVERITY } from '@atlaskit/editor-common/utils';
|
|
2
|
+
interface Opts {
|
|
3
|
+
dispatchAverage?: (data: {
|
|
4
|
+
mean: number;
|
|
5
|
+
median: number;
|
|
6
|
+
sampleSize: number;
|
|
7
|
+
}, severity: SEVERITY) => void;
|
|
8
|
+
dispatchSample?: (sample: number, severity: SEVERITY) => void;
|
|
9
|
+
onSampleStart?: () => void;
|
|
10
|
+
onSampleEnd?: (time: number, info: {
|
|
11
|
+
isSlow: boolean;
|
|
12
|
+
severity: SEVERITY;
|
|
13
|
+
}) => void;
|
|
14
|
+
onSlowInput?: (time: number) => void;
|
|
15
|
+
samplingRate: number;
|
|
16
|
+
slowThreshold: number;
|
|
17
|
+
normalThreshold: number;
|
|
18
|
+
degradedThreshold: number;
|
|
19
|
+
}
|
|
20
|
+
export default class InputLatencyTracker {
|
|
21
|
+
private samples;
|
|
22
|
+
private total;
|
|
23
|
+
private samplingRate;
|
|
24
|
+
private slowThreshold;
|
|
25
|
+
private normalThreshold;
|
|
26
|
+
private degradedThreshold;
|
|
27
|
+
private dispatchAverage;
|
|
28
|
+
private dispatchSample;
|
|
29
|
+
private onSampleStart;
|
|
30
|
+
private onSampleEnd;
|
|
31
|
+
private onSlowInput;
|
|
32
|
+
constructor({ samplingRate, slowThreshold, normalThreshold, degradedThreshold, dispatchAverage, dispatchSample, onSampleStart, onSampleEnd, onSlowInput, }: Opts);
|
|
33
|
+
start(): () => void;
|
|
34
|
+
flush(): void;
|
|
35
|
+
private dispatch;
|
|
36
|
+
private push;
|
|
37
|
+
private severity;
|
|
38
|
+
private getLast;
|
|
39
|
+
private getMean;
|
|
40
|
+
private getMedian;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-base",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Base 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",
|
|
12
|
+
"singleton": true,
|
|
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": "^29.1.0",
|
|
35
|
+
"@atlaskit/editor-common": "^76.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-feature-flags": "^1.0.1",
|
|
37
|
+
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
38
|
+
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
39
|
+
"@babel/runtime": "^7.0.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@atlaskit/editor-plugin-analytics": "^0.2.0",
|
|
43
|
+
"@atlaskit/editor-plugin-content-insertion": "^0.1.0",
|
|
44
|
+
"@atlaskit/editor-plugin-emoji": "^0.3.0",
|
|
45
|
+
"@atlaskit/editor-plugin-guideline": "^0.5.0",
|
|
46
|
+
"@atlaskit/editor-plugin-table": "^4.0.0",
|
|
47
|
+
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
48
|
+
"@atlaskit/util-data-test": "^17.8.0",
|
|
49
|
+
"@atlaskit/webdriver-runner": "*",
|
|
50
|
+
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
51
|
+
"@testing-library/react": "^12.1.5",
|
|
52
|
+
"raf-stub": "^2.0.1"
|
|
53
|
+
},
|
|
54
|
+
"techstack": {
|
|
55
|
+
"@atlassian/frontend": {
|
|
56
|
+
"import-structure": [
|
|
57
|
+
"atlassian-conventions"
|
|
58
|
+
],
|
|
59
|
+
"circular-dependencies": [
|
|
60
|
+
"file-and-folder-level"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"@repo/internal": {
|
|
64
|
+
"dom-events": "use-bind-event-listener",
|
|
65
|
+
"analytics": [
|
|
66
|
+
"analytics-next"
|
|
67
|
+
],
|
|
68
|
+
"design-tokens": [
|
|
69
|
+
"color"
|
|
70
|
+
],
|
|
71
|
+
"theming": [
|
|
72
|
+
"react-context"
|
|
73
|
+
],
|
|
74
|
+
"ui-components": [
|
|
75
|
+
"lite-mode"
|
|
76
|
+
],
|
|
77
|
+
"deprecation": [
|
|
78
|
+
"no-deprecated-imports"
|
|
79
|
+
],
|
|
80
|
+
"styling": [
|
|
81
|
+
"static",
|
|
82
|
+
"emotion"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0",
|
|
87
|
+
"platform-feature-flags": {
|
|
88
|
+
"platform.editor.disable-chrome-88-selection-fix_uk53m": {
|
|
89
|
+
"type": "boolean"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
package/report.api.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<!-- API Report Version: 2.3 -->
|
|
2
|
+
|
|
3
|
+
## API Report File for "@atlaskit/editor-plugin-base"
|
|
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 { BrowserFreezetracking } from '@atlaskit/editor-common/types';
|
|
19
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
20
|
+
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
21
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
22
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
23
|
+
import type { InputTracking } from '@atlaskit/editor-common/types';
|
|
24
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
25
|
+
|
|
26
|
+
// @public (undocumented)
|
|
27
|
+
export type BasePlugin = NextEditorPlugin<
|
|
28
|
+
'base',
|
|
29
|
+
{
|
|
30
|
+
pluginConfiguration: BasePluginOptions | undefined;
|
|
31
|
+
dependencies: [FeatureFlagsPlugin];
|
|
32
|
+
sharedState: BasePluginState;
|
|
33
|
+
}
|
|
34
|
+
>;
|
|
35
|
+
|
|
36
|
+
// @public (undocumented)
|
|
37
|
+
export const basePlugin: BasePlugin;
|
|
38
|
+
|
|
39
|
+
// @public (undocumented)
|
|
40
|
+
export interface BasePluginOptions {
|
|
41
|
+
// (undocumented)
|
|
42
|
+
allowInlineCursorTarget?: boolean;
|
|
43
|
+
// (undocumented)
|
|
44
|
+
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
45
|
+
// (undocumented)
|
|
46
|
+
browserFreezeTracking?: BrowserFreezetracking;
|
|
47
|
+
// (undocumented)
|
|
48
|
+
inputTracking?: InputTracking;
|
|
49
|
+
// (undocumented)
|
|
50
|
+
ufo?: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// @public (undocumented)
|
|
54
|
+
export type BasePluginState = {
|
|
55
|
+
contextIdentifier: ContextIdentifierProvider | undefined;
|
|
56
|
+
keyboardHeight: number | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// @public (undocumented)
|
|
60
|
+
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
61
|
+
|
|
62
|
+
// @public (undocumented)
|
|
63
|
+
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
64
|
+
|
|
65
|
+
// @public (undocumented)
|
|
66
|
+
export type ScrollGutterPluginOptions = {
|
|
67
|
+
getScrollElement?: (view: EditorView) => HTMLElement | null;
|
|
68
|
+
allowCustomScrollHandler?: boolean;
|
|
69
|
+
persistScrollGutter?: boolean;
|
|
70
|
+
gutterSize?: number;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// @public (undocumented)
|
|
74
|
+
export const setKeyboardHeight: (keyboardHeight: number) => 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
|
+
```
|
|
88
|
+
|
|
89
|
+
<!--SECTION END: Peer Dependencies-->
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/editor-plugin-base"
|
|
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 { BrowserFreezetracking } from '@atlaskit/editor-common/types';
|
|
8
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
9
|
+
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
10
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
12
|
+
import type { InputTracking } from '@atlaskit/editor-common/types';
|
|
13
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
14
|
+
|
|
15
|
+
// @public (undocumented)
|
|
16
|
+
export type BasePlugin = NextEditorPlugin<'base', {
|
|
17
|
+
pluginConfiguration: BasePluginOptions | undefined;
|
|
18
|
+
dependencies: [FeatureFlagsPlugin];
|
|
19
|
+
sharedState: BasePluginState;
|
|
20
|
+
}>;
|
|
21
|
+
|
|
22
|
+
// @public (undocumented)
|
|
23
|
+
export const basePlugin: BasePlugin;
|
|
24
|
+
|
|
25
|
+
// @public (undocumented)
|
|
26
|
+
export interface BasePluginOptions {
|
|
27
|
+
// (undocumented)
|
|
28
|
+
allowInlineCursorTarget?: boolean;
|
|
29
|
+
// (undocumented)
|
|
30
|
+
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
31
|
+
// (undocumented)
|
|
32
|
+
browserFreezeTracking?: BrowserFreezetracking;
|
|
33
|
+
// (undocumented)
|
|
34
|
+
inputTracking?: InputTracking;
|
|
35
|
+
// (undocumented)
|
|
36
|
+
ufo?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// @public (undocumented)
|
|
40
|
+
export type BasePluginState = {
|
|
41
|
+
contextIdentifier: ContextIdentifierProvider | undefined;
|
|
42
|
+
keyboardHeight: number | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// @public (undocumented)
|
|
46
|
+
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
|
+
|
|
48
|
+
// @public (undocumented)
|
|
49
|
+
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
50
|
+
|
|
51
|
+
// @public (undocumented)
|
|
52
|
+
export type ScrollGutterPluginOptions = {
|
|
53
|
+
getScrollElement?: (view: EditorView) => HTMLElement | null;
|
|
54
|
+
allowCustomScrollHandler?: boolean;
|
|
55
|
+
persistScrollGutter?: boolean;
|
|
56
|
+
gutterSize?: number;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// @public (undocumented)
|
|
60
|
+
export const setKeyboardHeight: (keyboardHeight: number) => Command;
|
|
61
|
+
|
|
62
|
+
// (No @packageDocumentation comment for this package)
|
|
63
|
+
|
|
64
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../tsconfig.base.json",
|
|
3
|
+
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
|
|
4
|
+
"exclude": [
|
|
5
|
+
"**/docs/**/*",
|
|
6
|
+
"**/__tests__/**/*",
|
|
7
|
+
"**/vr-tests/**/*",
|
|
8
|
+
"**/__perf__/**/*",
|
|
9
|
+
"**/*.test.*",
|
|
10
|
+
"**/test.*",
|
|
11
|
+
"**/test-*",
|
|
12
|
+
"**/examples.ts",
|
|
13
|
+
"**/examples.tsx",
|
|
14
|
+
"**/examples/*.ts",
|
|
15
|
+
"**/examples/*.tsx",
|
|
16
|
+
"**/examples/**/*.ts",
|
|
17
|
+
"**/examples/**/*.tsx",
|
|
18
|
+
"**/storybook/**/*",
|
|
19
|
+
"**/constellation/**/*",
|
|
20
|
+
".storybook/*",
|
|
21
|
+
"./__fixtures__/**/*",
|
|
22
|
+
"./__generated__/**/*",
|
|
23
|
+
"./mocks/**/*",
|
|
24
|
+
"./__mocks__/**/*",
|
|
25
|
+
"**/mock.*",
|
|
26
|
+
"**/codemods/**/*.ts",
|
|
27
|
+
"**/codemods/**/*.tsx"
|
|
28
|
+
],
|
|
29
|
+
"compilerOptions": {
|
|
30
|
+
"baseUrl": "",
|
|
31
|
+
"composite": true,
|
|
32
|
+
"outDir": "../../../tsDist/@atlaskit__editor-plugin-base/app"
|
|
33
|
+
},
|
|
34
|
+
"references": [
|
|
35
|
+
{
|
|
36
|
+
"path": "../editor-common/tsconfig.app.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../editor-plugin-feature-flags/tsconfig.app.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../../platform/feature-flags/tsconfig.app.json"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../tsconfig.base.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"**/docs/**/*",
|
|
5
|
+
"**/__tests__/**/*",
|
|
6
|
+
"**/vr-tests/**/*",
|
|
7
|
+
"**/__perf__/**/*",
|
|
8
|
+
"**/*.test.*",
|
|
9
|
+
"**/test.*",
|
|
10
|
+
"**/test-*",
|
|
11
|
+
"**/examples.ts",
|
|
12
|
+
"**/examples.tsx",
|
|
13
|
+
"**/examples/*.ts",
|
|
14
|
+
"**/examples/*.tsx",
|
|
15
|
+
"**/examples/**/*.ts",
|
|
16
|
+
"**/examples/**/*.tsx",
|
|
17
|
+
"**/storybook/**/*",
|
|
18
|
+
"**/constellation/**/*",
|
|
19
|
+
".storybook/*",
|
|
20
|
+
"./__fixtures__/**/*",
|
|
21
|
+
"./__generated__/**/*",
|
|
22
|
+
"./mocks/**/*",
|
|
23
|
+
"./__mocks__/**/*",
|
|
24
|
+
"**/mock.*",
|
|
25
|
+
"**/codemods/**/*.ts",
|
|
26
|
+
"**/codemods/**/*.tsx"
|
|
27
|
+
],
|
|
28
|
+
"exclude": ["./dist/**/*", "./build/**/*", "./node_modules/**/*"],
|
|
29
|
+
"compilerOptions": {
|
|
30
|
+
"baseUrl": "",
|
|
31
|
+
"composite": true,
|
|
32
|
+
"outDir": "../../../tsDist/@atlaskit__editor-plugin-base/dev"
|
|
33
|
+
},
|
|
34
|
+
"references": [
|
|
35
|
+
{
|
|
36
|
+
"path": "tsconfig.app.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../../../build/website/docs/tsconfig.app.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../editor-common/tsconfig.app.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../editor-core/tsconfig.app.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "../editor-plugin-analytics/tsconfig.app.json"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "../editor-plugin-content-insertion/tsconfig.app.json"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../editor-plugin-emoji/tsconfig.app.json"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "../editor-plugin-feature-flags/tsconfig.app.json"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "../editor-plugin-guideline/tsconfig.app.json"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "../editor-plugin-table/tsconfig.app.json"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "../editor-plugin-width/tsconfig.app.json"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "../editor-test-helpers/tsconfig.app.json"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "../../design-system/tokens/tsconfig.app.json"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../elements/util-data-test/tsconfig.app.json"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "../../../build/test-tooling/webdriver-runner/tsconfig.app.json"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|