@atlaskit/editor-plugin-base 4.1.5 → 4.1.7
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/CHANGELOG.md +16 -0
- package/dist/types/basePluginType.d.ts +9 -9
- package/dist/types/pm-plugins/scroll-gutter/plugin.d.ts +3 -3
- package/dist/types/pm-plugins/utils/input-latency-tracking.d.ts +3 -3
- package/dist/types-ts4.5/basePluginType.d.ts +11 -11
- package/dist/types-ts4.5/pm-plugins/scroll-gutter/plugin.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/utils/input-latency-tracking.d.ts +3 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-base
|
|
2
2
|
|
|
3
|
+
## 4.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.1.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`57b19274b9fdd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/57b19274b9fdd) -
|
|
16
|
+
EDITOR-1373 Bump adf-schema version
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 4.1.5
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -6,35 +6,35 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
6
6
|
import { type setKeyboardHeight } from './editor-commands/set-keyboard-height';
|
|
7
7
|
import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter/plugin';
|
|
8
8
|
export interface BasePluginOptions {
|
|
9
|
-
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
10
9
|
allowInlineCursorTarget?: boolean;
|
|
10
|
+
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
11
11
|
/**
|
|
12
12
|
* @deprecated do not use
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
browserFreezeTracking?: BrowserFreezetracking;
|
|
15
15
|
/**
|
|
16
16
|
* @deprecated do not use
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
inputTracking?: InputTracking;
|
|
19
19
|
}
|
|
20
20
|
export type BasePluginState = {
|
|
21
21
|
/** Current height of keyboard (+ custom toolbar) in iOS app */
|
|
22
22
|
keyboardHeight: number | undefined;
|
|
23
23
|
};
|
|
24
24
|
export type BasePlugin = NextEditorPlugin<'base', {
|
|
25
|
-
pluginConfiguration: BasePluginOptions | undefined;
|
|
26
|
-
dependencies: [OptionalPlugin<FeatureFlagsPlugin>, OptionalPlugin<ContextIdentifierPlugin>];
|
|
27
|
-
sharedState: BasePluginState;
|
|
28
25
|
actions: {
|
|
29
|
-
setKeyboardHeight: typeof setKeyboardHeight;
|
|
30
26
|
registerMarks: (callback: Callback) => void;
|
|
31
27
|
resolveMarks: (from: number, to: number, tr: Transaction) => void;
|
|
28
|
+
setKeyboardHeight: typeof setKeyboardHeight;
|
|
32
29
|
};
|
|
30
|
+
dependencies: [OptionalPlugin<FeatureFlagsPlugin>, OptionalPlugin<ContextIdentifierPlugin>];
|
|
31
|
+
pluginConfiguration: BasePluginOptions | undefined;
|
|
32
|
+
sharedState: BasePluginState;
|
|
33
33
|
}>;
|
|
34
34
|
export type Callback = ({ node, tr, pos, from, to, }: {
|
|
35
|
+
from: number;
|
|
35
36
|
node: PMNode;
|
|
36
|
-
tr: Transaction;
|
|
37
37
|
pos: number;
|
|
38
|
-
from: number;
|
|
39
38
|
to: number;
|
|
39
|
+
tr: Transaction;
|
|
40
40
|
}) => void;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
export type ScrollGutterPluginOptions = {
|
|
4
|
-
/** Element the page uses for scrolling */
|
|
5
|
-
getScrollElement?: (view: EditorView) => HTMLElement | null;
|
|
6
4
|
/**
|
|
7
5
|
* @deprecated
|
|
8
6
|
*
|
|
@@ -11,6 +9,9 @@ export type ScrollGutterPluginOptions = {
|
|
|
11
9
|
* Default is true
|
|
12
10
|
*/
|
|
13
11
|
allowCustomScrollHandler?: boolean;
|
|
12
|
+
/** Element the page uses for scrolling */
|
|
13
|
+
getScrollElement?: (view: EditorView) => HTMLElement | null;
|
|
14
|
+
gutterSize?: number;
|
|
14
15
|
/**
|
|
15
16
|
* @deprecated
|
|
16
17
|
*
|
|
@@ -18,7 +19,6 @@ export type ScrollGutterPluginOptions = {
|
|
|
18
19
|
* Default is false
|
|
19
20
|
*/
|
|
20
21
|
persistScrollGutter?: boolean;
|
|
21
|
-
gutterSize?: number;
|
|
22
22
|
};
|
|
23
23
|
declare const _default: (pluginOptions?: ScrollGutterPluginOptions) => SafePlugin<{}> | undefined;
|
|
24
24
|
export default _default;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { SEVERITY } from '@atlaskit/editor-common/utils';
|
|
2
2
|
interface Opts {
|
|
3
|
+
degradedThreshold: number;
|
|
3
4
|
dispatchAverage?: (data: {
|
|
4
5
|
mean: number;
|
|
5
6
|
median: number;
|
|
6
7
|
sampleSize: number;
|
|
7
8
|
}, severity: SEVERITY) => void;
|
|
8
9
|
dispatchSample?: (sample: number, severity: SEVERITY) => void;
|
|
9
|
-
|
|
10
|
+
normalThreshold: number;
|
|
10
11
|
onSampleEnd?: (time: number, info: {
|
|
11
12
|
isSlow: boolean;
|
|
12
13
|
severity: SEVERITY;
|
|
13
14
|
}) => void;
|
|
15
|
+
onSampleStart?: () => void;
|
|
14
16
|
onSlowInput?: (time: number) => void;
|
|
15
17
|
samplingRate: number;
|
|
16
18
|
slowThreshold: number;
|
|
17
|
-
normalThreshold: number;
|
|
18
|
-
degradedThreshold: number;
|
|
19
19
|
}
|
|
20
20
|
export default class InputLatencyTracker {
|
|
21
21
|
private samples;
|
|
@@ -6,38 +6,38 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
6
6
|
import { type setKeyboardHeight } from './editor-commands/set-keyboard-height';
|
|
7
7
|
import type { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter/plugin';
|
|
8
8
|
export interface BasePluginOptions {
|
|
9
|
-
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
10
9
|
allowInlineCursorTarget?: boolean;
|
|
10
|
+
allowScrollGutter?: ScrollGutterPluginOptions;
|
|
11
11
|
/**
|
|
12
12
|
* @deprecated do not use
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
browserFreezeTracking?: BrowserFreezetracking;
|
|
15
15
|
/**
|
|
16
16
|
* @deprecated do not use
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
inputTracking?: InputTracking;
|
|
19
19
|
}
|
|
20
20
|
export type BasePluginState = {
|
|
21
21
|
/** Current height of keyboard (+ custom toolbar) in iOS app */
|
|
22
22
|
keyboardHeight: number | undefined;
|
|
23
23
|
};
|
|
24
24
|
export type BasePlugin = NextEditorPlugin<'base', {
|
|
25
|
-
|
|
25
|
+
actions: {
|
|
26
|
+
registerMarks: (callback: Callback) => void;
|
|
27
|
+
resolveMarks: (from: number, to: number, tr: Transaction) => void;
|
|
28
|
+
setKeyboardHeight: typeof setKeyboardHeight;
|
|
29
|
+
};
|
|
26
30
|
dependencies: [
|
|
27
31
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
28
32
|
OptionalPlugin<ContextIdentifierPlugin>
|
|
29
33
|
];
|
|
34
|
+
pluginConfiguration: BasePluginOptions | undefined;
|
|
30
35
|
sharedState: BasePluginState;
|
|
31
|
-
actions: {
|
|
32
|
-
setKeyboardHeight: typeof setKeyboardHeight;
|
|
33
|
-
registerMarks: (callback: Callback) => void;
|
|
34
|
-
resolveMarks: (from: number, to: number, tr: Transaction) => void;
|
|
35
|
-
};
|
|
36
36
|
}>;
|
|
37
37
|
export type Callback = ({ node, tr, pos, from, to, }: {
|
|
38
|
+
from: number;
|
|
38
39
|
node: PMNode;
|
|
39
|
-
tr: Transaction;
|
|
40
40
|
pos: number;
|
|
41
|
-
from: number;
|
|
42
41
|
to: number;
|
|
42
|
+
tr: Transaction;
|
|
43
43
|
}) => void;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
export type ScrollGutterPluginOptions = {
|
|
4
|
-
/** Element the page uses for scrolling */
|
|
5
|
-
getScrollElement?: (view: EditorView) => HTMLElement | null;
|
|
6
4
|
/**
|
|
7
5
|
* @deprecated
|
|
8
6
|
*
|
|
@@ -11,6 +9,9 @@ export type ScrollGutterPluginOptions = {
|
|
|
11
9
|
* Default is true
|
|
12
10
|
*/
|
|
13
11
|
allowCustomScrollHandler?: boolean;
|
|
12
|
+
/** Element the page uses for scrolling */
|
|
13
|
+
getScrollElement?: (view: EditorView) => HTMLElement | null;
|
|
14
|
+
gutterSize?: number;
|
|
14
15
|
/**
|
|
15
16
|
* @deprecated
|
|
16
17
|
*
|
|
@@ -18,7 +19,6 @@ export type ScrollGutterPluginOptions = {
|
|
|
18
19
|
* Default is false
|
|
19
20
|
*/
|
|
20
21
|
persistScrollGutter?: boolean;
|
|
21
|
-
gutterSize?: number;
|
|
22
22
|
};
|
|
23
23
|
declare const _default: (pluginOptions?: ScrollGutterPluginOptions) => SafePlugin<{}> | undefined;
|
|
24
24
|
export default _default;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { SEVERITY } from '@atlaskit/editor-common/utils';
|
|
2
2
|
interface Opts {
|
|
3
|
+
degradedThreshold: number;
|
|
3
4
|
dispatchAverage?: (data: {
|
|
4
5
|
mean: number;
|
|
5
6
|
median: number;
|
|
6
7
|
sampleSize: number;
|
|
7
8
|
}, severity: SEVERITY) => void;
|
|
8
9
|
dispatchSample?: (sample: number, severity: SEVERITY) => void;
|
|
9
|
-
|
|
10
|
+
normalThreshold: number;
|
|
10
11
|
onSampleEnd?: (time: number, info: {
|
|
11
12
|
isSlow: boolean;
|
|
12
13
|
severity: SEVERITY;
|
|
13
14
|
}) => void;
|
|
15
|
+
onSampleStart?: () => void;
|
|
14
16
|
onSlowInput?: (time: number) => void;
|
|
15
17
|
samplingRate: number;
|
|
16
18
|
slowThreshold: number;
|
|
17
|
-
normalThreshold: number;
|
|
18
|
-
degradedThreshold: number;
|
|
19
19
|
}
|
|
20
20
|
export default class InputLatencyTracker {
|
|
21
21
|
private samples;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-base",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.7",
|
|
4
4
|
"description": "Base plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
".": "./src/index.ts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/adf-schema": "^50.2.
|
|
33
|
+
"@atlaskit/adf-schema": "^50.2.1",
|
|
34
34
|
"@atlaskit/editor-plugin-context-identifier": "^3.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-feature-flags": "^2.0.0",
|
|
36
36
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
38
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
38
|
+
"@atlaskit/tmp-editor-statsig": "^11.5.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0"
|
|
40
40
|
},
|
|
41
41
|
"techstack": {
|
|
@@ -77,6 +77,6 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@atlaskit/editor-common": "^107.
|
|
80
|
+
"@atlaskit/editor-common": "^107.28.0"
|
|
81
81
|
}
|
|
82
82
|
}
|