@atlaskit/editor-plugin-limited-mode 26.0.1 → 26.0.3
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 +12 -0
- package/dist/cjs/pm-plugins/utils/latch-detector.js +5 -7
- package/dist/cjs/pm-plugins/utils/latch-policy.js +4 -5
- package/dist/es2019/pm-plugins/utils/latch-detector.js +5 -7
- package/dist/es2019/pm-plugins/utils/latch-policy.js +4 -5
- package/dist/esm/pm-plugins/utils/latch-detector.js +5 -7
- package/dist/esm/pm-plugins/utils/latch-policy.js +4 -5
- package/dist/types/pm-plugins/utils/latch-detector.d.ts +4 -5
- package/dist/types/pm-plugins/utils/latch-policy.d.ts +4 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -14,11 +14,10 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
14
14
|
* Holds no configuration and makes no decisions: it measures, and forwards. Everything tunable lives
|
|
15
15
|
* on the policy, including the clock it reads.
|
|
16
16
|
*
|
|
17
|
-
* The measurement mirrors `
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* and deleting it is a single-directory revert if the experiment does not ship. The marginal cost is
|
|
17
|
+
* The measurement mirrors the removed legacy `ACTION.SLOW_INPUT` / `ACTION.BROWSER_FREEZE`
|
|
18
|
+
* telemetry (a `longtask` observer and per-keystroke rAF measurement). It stays self-contained
|
|
19
|
+
* inside the limited-mode plugin — no cross-plugin dependency, and deleting it is a
|
|
20
|
+
* single-directory revert if the experiment does not ship. The marginal cost is
|
|
22
21
|
* one `performance.now()` and one `requestAnimationFrame` per keystroke.
|
|
23
22
|
*/
|
|
24
23
|
var createLatchDetector = exports.createLatchDetector = function createLatchDetector(_ref) {
|
|
@@ -91,8 +90,7 @@ var createLatchDetector = exports.createLatchDetector = function createLatchDete
|
|
|
91
90
|
var start = now();
|
|
92
91
|
|
|
93
92
|
// Runs after every handleTextInput and all resulting plugin work, but before paint — the
|
|
94
|
-
// same measurement point
|
|
95
|
-
// SLOW_INPUT telemetry.
|
|
93
|
+
// same measurement point as the legacy SLOW_INPUT telemetry, so the numbers are comparable.
|
|
96
94
|
requestAnimationFrame(function () {
|
|
97
95
|
if (destroyed || policy.isLatched()) {
|
|
98
96
|
return;
|
|
@@ -20,11 +20,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
20
20
|
* 600ms within 30s corroborated by a slow keystroke in that same 30s. Two qualifying windows at
|
|
21
21
|
* least 30s apart latch limited mode.
|
|
22
22
|
*
|
|
23
|
-
* `freezeTaskMs` matches `
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* needs to notice a degraded experience, not just an unusable one.
|
|
23
|
+
* `freezeTaskMs` matches the freeze threshold of the removed legacy `ACTION.BROWSER_FREEZE`
|
|
24
|
+
* telemetry, so its historical dashboards can be used to calibrate it. `slowInputMs` is
|
|
25
|
+
* deliberately tighter than that telemetry's slow-input threshold of 300 — this needs to notice a
|
|
26
|
+
* degraded experience, not just an unusable one.
|
|
28
27
|
*
|
|
29
28
|
* `requiredConfirmations` and `confirmationGapMs` are the values that matter most — see the comment
|
|
30
29
|
* on the former.
|
|
@@ -5,11 +5,10 @@ import { isPerformanceAPIAvailable, isPerformanceObserverLongTaskAvailable } fro
|
|
|
5
5
|
* Holds no configuration and makes no decisions: it measures, and forwards. Everything tunable lives
|
|
6
6
|
* on the policy, including the clock it reads.
|
|
7
7
|
*
|
|
8
|
-
* The measurement mirrors `
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* and deleting it is a single-directory revert if the experiment does not ship. The marginal cost is
|
|
8
|
+
* The measurement mirrors the removed legacy `ACTION.SLOW_INPUT` / `ACTION.BROWSER_FREEZE`
|
|
9
|
+
* telemetry (a `longtask` observer and per-keystroke rAF measurement). It stays self-contained
|
|
10
|
+
* inside the limited-mode plugin — no cross-plugin dependency, and deleting it is a
|
|
11
|
+
* single-directory revert if the experiment does not ship. The marginal cost is
|
|
13
12
|
* one `performance.now()` and one `requestAnimationFrame` per keystroke.
|
|
14
13
|
*/
|
|
15
14
|
export const createLatchDetector = ({
|
|
@@ -75,8 +74,7 @@ export const createLatchDetector = ({
|
|
|
75
74
|
const start = now();
|
|
76
75
|
|
|
77
76
|
// Runs after every handleTextInput and all resulting plugin work, but before paint — the
|
|
78
|
-
// same measurement point
|
|
79
|
-
// SLOW_INPUT telemetry.
|
|
77
|
+
// same measurement point as the legacy SLOW_INPUT telemetry, so the numbers are comparable.
|
|
80
78
|
requestAnimationFrame(() => {
|
|
81
79
|
if (destroyed || policy.isLatched()) {
|
|
82
80
|
return;
|
|
@@ -9,11 +9,10 @@ import { shouldEnableLimitedModeForDocument } from '@atlaskit/editor-common/shou
|
|
|
9
9
|
* 600ms within 30s corroborated by a slow keystroke in that same 30s. Two qualifying windows at
|
|
10
10
|
* least 30s apart latch limited mode.
|
|
11
11
|
*
|
|
12
|
-
* `freezeTaskMs` matches `
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* needs to notice a degraded experience, not just an unusable one.
|
|
12
|
+
* `freezeTaskMs` matches the freeze threshold of the removed legacy `ACTION.BROWSER_FREEZE`
|
|
13
|
+
* telemetry, so its historical dashboards can be used to calibrate it. `slowInputMs` is
|
|
14
|
+
* deliberately tighter than that telemetry's slow-input threshold of 300 — this needs to notice a
|
|
15
|
+
* degraded experience, not just an unusable one.
|
|
17
16
|
*
|
|
18
17
|
* `requiredConfirmations` and `confirmationGapMs` are the values that matter most — see the comment
|
|
19
18
|
* on the former.
|
|
@@ -8,11 +8,10 @@ import { isPerformanceAPIAvailable, isPerformanceObserverLongTaskAvailable } fro
|
|
|
8
8
|
* Holds no configuration and makes no decisions: it measures, and forwards. Everything tunable lives
|
|
9
9
|
* on the policy, including the clock it reads.
|
|
10
10
|
*
|
|
11
|
-
* The measurement mirrors `
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* and deleting it is a single-directory revert if the experiment does not ship. The marginal cost is
|
|
11
|
+
* The measurement mirrors the removed legacy `ACTION.SLOW_INPUT` / `ACTION.BROWSER_FREEZE`
|
|
12
|
+
* telemetry (a `longtask` observer and per-keystroke rAF measurement). It stays self-contained
|
|
13
|
+
* inside the limited-mode plugin — no cross-plugin dependency, and deleting it is a
|
|
14
|
+
* single-directory revert if the experiment does not ship. The marginal cost is
|
|
16
15
|
* one `performance.now()` and one `requestAnimationFrame` per keystroke.
|
|
17
16
|
*/
|
|
18
17
|
export var createLatchDetector = function createLatchDetector(_ref) {
|
|
@@ -85,8 +84,7 @@ export var createLatchDetector = function createLatchDetector(_ref) {
|
|
|
85
84
|
var start = now();
|
|
86
85
|
|
|
87
86
|
// Runs after every handleTextInput and all resulting plugin work, but before paint — the
|
|
88
|
-
// same measurement point
|
|
89
|
-
// SLOW_INPUT telemetry.
|
|
87
|
+
// same measurement point as the legacy SLOW_INPUT telemetry, so the numbers are comparable.
|
|
90
88
|
requestAnimationFrame(function () {
|
|
91
89
|
if (destroyed || policy.isLatched()) {
|
|
92
90
|
return;
|
|
@@ -13,11 +13,10 @@ import { shouldEnableLimitedModeForDocument } from '@atlaskit/editor-common/shou
|
|
|
13
13
|
* 600ms within 30s corroborated by a slow keystroke in that same 30s. Two qualifying windows at
|
|
14
14
|
* least 30s apart latch limited mode.
|
|
15
15
|
*
|
|
16
|
-
* `freezeTaskMs` matches `
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* needs to notice a degraded experience, not just an unusable one.
|
|
16
|
+
* `freezeTaskMs` matches the freeze threshold of the removed legacy `ACTION.BROWSER_FREEZE`
|
|
17
|
+
* telemetry, so its historical dashboards can be used to calibrate it. `slowInputMs` is
|
|
18
|
+
* deliberately tighter than that telemetry's slow-input threshold of 300 — this needs to notice a
|
|
19
|
+
* degraded experience, not just an unusable one.
|
|
21
20
|
*
|
|
22
21
|
* `requiredConfirmations` and `confirmationGapMs` are the values that matter most — see the comment
|
|
23
22
|
* on the former.
|
|
@@ -5,11 +5,10 @@ import type { CreateLatchDetectorOptions, LatchDetector } from './latch-detector
|
|
|
5
5
|
* Holds no configuration and makes no decisions: it measures, and forwards. Everything tunable lives
|
|
6
6
|
* on the policy, including the clock it reads.
|
|
7
7
|
*
|
|
8
|
-
* The measurement mirrors `
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* and deleting it is a single-directory revert if the experiment does not ship. The marginal cost is
|
|
8
|
+
* The measurement mirrors the removed legacy `ACTION.SLOW_INPUT` / `ACTION.BROWSER_FREEZE`
|
|
9
|
+
* telemetry (a `longtask` observer and per-keystroke rAF measurement). It stays self-contained
|
|
10
|
+
* inside the limited-mode plugin — no cross-plugin dependency, and deleting it is a
|
|
11
|
+
* single-directory revert if the experiment does not ship. The marginal cost is
|
|
13
12
|
* one `performance.now()` and one `requestAnimationFrame` per keystroke.
|
|
14
13
|
*/
|
|
15
14
|
export declare const createLatchDetector: ({ onLatchCriteriaMet, policy, }: CreateLatchDetectorOptions) => LatchDetector;
|
|
@@ -8,11 +8,10 @@ import type { LatchDetails, LatchEvaluation, LatchPolicyConfig, LatchPolicyOptio
|
|
|
8
8
|
* 600ms within 30s corroborated by a slow keystroke in that same 30s. Two qualifying windows at
|
|
9
9
|
* least 30s apart latch limited mode.
|
|
10
10
|
*
|
|
11
|
-
* `freezeTaskMs` matches `
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* needs to notice a degraded experience, not just an unusable one.
|
|
11
|
+
* `freezeTaskMs` matches the freeze threshold of the removed legacy `ACTION.BROWSER_FREEZE`
|
|
12
|
+
* telemetry, so its historical dashboards can be used to calibrate it. `slowInputMs` is
|
|
13
|
+
* deliberately tighter than that telemetry's slow-input threshold of 300 — this needs to notice a
|
|
14
|
+
* degraded experience, not just an unusable one.
|
|
16
15
|
*
|
|
17
16
|
* `requiredConfirmations` and `confirmationGapMs` are the values that matter most — see the comment
|
|
18
17
|
* on the former.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-limited-mode",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.3",
|
|
4
4
|
"description": "LimitedMode plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"@atlaskit/feature-gate-js-client": "^7.0.0",
|
|
26
26
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
27
27
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
28
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^245.0.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0",
|
|
30
30
|
"bind-event-listener": "^3.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@atlaskit/editor-common": "^133.
|
|
33
|
+
"@atlaskit/editor-common": "^133.5.0",
|
|
34
34
|
"react": "^18.2.0 || ^19.2.0",
|
|
35
35
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
36
36
|
},
|