@atlaskit/editor-plugin-expand 17.1.11 → 18.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/CHANGELOG.md +42 -0
- package/dist/cjs/legacyExpand/nodeviews/index.js +3 -1
- package/dist/cjs/singlePlayerExpand/node-views/index.js +3 -1
- package/dist/es2019/legacyExpand/nodeviews/index.js +3 -1
- package/dist/es2019/singlePlayerExpand/node-views/index.js +3 -1
- package/dist/esm/legacyExpand/nodeviews/index.js +3 -1
- package/dist/esm/singlePlayerExpand/node-views/index.js +3 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 18.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`aec3fcfe13ff9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aec3fcfe13ff9) -
|
|
8
|
+
EDITOR-8303 Add runtime input-latency trigger for limited mode behind
|
|
9
|
+
platform_editor_dynamic_limited_mode. Limited mode can now latch mid-session when sustained slow
|
|
10
|
+
input or repeated browser freezes indicate the device is struggling, in addition to the existing
|
|
11
|
+
document-size decision. The latch is one-way. Nothing is constructed when the experiment is off.
|
|
12
|
+
|
|
13
|
+
How much evidence is needed is a single tunable, `requiredConfirmations`: that many qualifying
|
|
14
|
+
windows, each separated from the last by `confirmationGapMs`. The hardware no longer feeds into
|
|
15
|
+
the decision — `navigator.hardwareConcurrency` and `navigator.deviceMemory` are reported with the
|
|
16
|
+
`limitedModeLatched` event instead, so which devices latch can be answered from the data rather
|
|
17
|
+
than assumed up front.
|
|
18
|
+
|
|
19
|
+
`LimitedModePluginState` gains a derived `enabled` flag, which is now the single thing consumers
|
|
20
|
+
should branch on — the individual reasons (`documentSizeBreachesThreshold`, `latchPolicyBreached`)
|
|
21
|
+
no longer need to be combined at each call site, so a future reason needs no change outside this
|
|
22
|
+
plugin. `sharedState.enabled` reads from it.
|
|
23
|
+
|
|
24
|
+
Under the experiment the document decision is also evaluated on load and on document replacement
|
|
25
|
+
only, rather than on every transaction that changes the document. That check walks the whole
|
|
26
|
+
document, so it was a full-document scan per keystroke on exactly the pages least able to afford
|
|
27
|
+
one. The trade-off is that a document editing its way past the thresholds is not re-judged until
|
|
28
|
+
it next loads.
|
|
29
|
+
|
|
30
|
+
Consumers updated to react to a mid-session change: table sticky headers now subscribe instead of
|
|
31
|
+
reading once at construction, block-controls resets rather than freezes its state on entry, and
|
|
32
|
+
the expand, media and table nodeviews read the derived flag so they no longer miss a runtime
|
|
33
|
+
latch.
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Updated dependencies
|
|
38
|
+
|
|
39
|
+
## 18.0.0
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- Updated dependencies
|
|
44
|
+
|
|
3
45
|
## 17.1.11
|
|
4
46
|
|
|
5
47
|
### Patch Changes
|
|
@@ -655,7 +655,9 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
655
655
|
// Read from `this.view.state` via the exposed plugin key rather than the shared state's
|
|
656
656
|
// `enabled`, which reads a stale `false` during initial EditorView construction (the injection
|
|
657
657
|
// API's editor state isn't wired up yet).
|
|
658
|
-
|
|
658
|
+
//
|
|
659
|
+
// Reads the plugin's derived `enabled`, so this covers every reason limited mode can be on.
|
|
660
|
+
return Boolean((_this$api9 = this.api) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.limitedMode) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.sharedState.currentState()) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.limitedModePluginKey) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.getState(this.view.state)) === null || _this$api9 === void 0 ? void 0 : _this$api9.enabled);
|
|
659
661
|
}
|
|
660
662
|
}, {
|
|
661
663
|
key: "stopEvent",
|
|
@@ -681,7 +681,9 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
681
681
|
// Read from `this.view.state` via the exposed plugin key rather than the shared state's
|
|
682
682
|
// `enabled`, which reads a stale `false` during initial EditorView construction (the injection
|
|
683
683
|
// API's editor state isn't wired up yet).
|
|
684
|
-
|
|
684
|
+
//
|
|
685
|
+
// Reads the plugin's derived `enabled`, so this covers every reason limited mode can be on.
|
|
686
|
+
return Boolean((_this$api9 = this.api) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.limitedMode) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.sharedState.currentState()) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.limitedModePluginKey) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.getState(this.view.state)) === null || _this$api9 === void 0 ? void 0 : _this$api9.enabled);
|
|
685
687
|
}
|
|
686
688
|
}, {
|
|
687
689
|
key: "updateDisplayStyle",
|
|
@@ -648,7 +648,9 @@ export class ExpandNodeView {
|
|
|
648
648
|
// Read from `this.view.state` via the exposed plugin key rather than the shared state's
|
|
649
649
|
// `enabled`, which reads a stale `false` during initial EditorView construction (the injection
|
|
650
650
|
// API's editor state isn't wired up yet).
|
|
651
|
-
|
|
651
|
+
//
|
|
652
|
+
// Reads the plugin's derived `enabled`, so this covers every reason limited mode can be on.
|
|
653
|
+
return Boolean((_this$api9 = this.api) === null || _this$api9 === void 0 ? void 0 : (_this$api9$limitedMod = _this$api9.limitedMode) === null || _this$api9$limitedMod === void 0 ? void 0 : (_this$api9$limitedMod2 = _this$api9$limitedMod.sharedState.currentState()) === null || _this$api9$limitedMod2 === void 0 ? void 0 : (_this$api9$limitedMod3 = _this$api9$limitedMod2.limitedModePluginKey) === null || _this$api9$limitedMod3 === void 0 ? void 0 : (_this$api9$limitedMod4 = _this$api9$limitedMod3.getState(this.view.state)) === null || _this$api9$limitedMod4 === void 0 ? void 0 : _this$api9$limitedMod4.enabled);
|
|
652
654
|
}
|
|
653
655
|
stopEvent(event) {
|
|
654
656
|
// Ignored via go/ees005
|
|
@@ -668,7 +668,9 @@ export class ExpandNodeView {
|
|
|
668
668
|
// Read from `this.view.state` via the exposed plugin key rather than the shared state's
|
|
669
669
|
// `enabled`, which reads a stale `false` during initial EditorView construction (the injection
|
|
670
670
|
// API's editor state isn't wired up yet).
|
|
671
|
-
|
|
671
|
+
//
|
|
672
|
+
// Reads the plugin's derived `enabled`, so this covers every reason limited mode can be on.
|
|
673
|
+
return Boolean((_this$api9 = this.api) === null || _this$api9 === void 0 ? void 0 : (_this$api9$limitedMod = _this$api9.limitedMode) === null || _this$api9$limitedMod === void 0 ? void 0 : (_this$api9$limitedMod2 = _this$api9$limitedMod.sharedState.currentState()) === null || _this$api9$limitedMod2 === void 0 ? void 0 : (_this$api9$limitedMod3 = _this$api9$limitedMod2.limitedModePluginKey) === null || _this$api9$limitedMod3 === void 0 ? void 0 : (_this$api9$limitedMod4 = _this$api9$limitedMod3.getState(this.view.state)) === null || _this$api9$limitedMod4 === void 0 ? void 0 : _this$api9$limitedMod4.enabled);
|
|
672
674
|
}
|
|
673
675
|
updateDisplayStyle(node) {
|
|
674
676
|
if (this.content) {
|
|
@@ -648,7 +648,9 @@ export var ExpandNodeView = /*#__PURE__*/function () {
|
|
|
648
648
|
// Read from `this.view.state` via the exposed plugin key rather than the shared state's
|
|
649
649
|
// `enabled`, which reads a stale `false` during initial EditorView construction (the injection
|
|
650
650
|
// API's editor state isn't wired up yet).
|
|
651
|
-
|
|
651
|
+
//
|
|
652
|
+
// Reads the plugin's derived `enabled`, so this covers every reason limited mode can be on.
|
|
653
|
+
return Boolean((_this$api9 = this.api) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.limitedMode) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.sharedState.currentState()) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.limitedModePluginKey) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.getState(this.view.state)) === null || _this$api9 === void 0 ? void 0 : _this$api9.enabled);
|
|
652
654
|
}
|
|
653
655
|
}, {
|
|
654
656
|
key: "stopEvent",
|
|
@@ -673,7 +673,9 @@ export var ExpandNodeView = /*#__PURE__*/function () {
|
|
|
673
673
|
// Read from `this.view.state` via the exposed plugin key rather than the shared state's
|
|
674
674
|
// `enabled`, which reads a stale `false` during initial EditorView construction (the injection
|
|
675
675
|
// API's editor state isn't wired up yet).
|
|
676
|
-
|
|
676
|
+
//
|
|
677
|
+
// Reads the plugin's derived `enabled`, so this covers every reason limited mode can be on.
|
|
678
|
+
return Boolean((_this$api9 = this.api) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.limitedMode) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.sharedState.currentState()) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.limitedModePluginKey) === null || _this$api9 === void 0 || (_this$api9 = _this$api9.getState(this.view.state)) === null || _this$api9 === void 0 ? void 0 : _this$api9.enabled);
|
|
677
679
|
}
|
|
678
680
|
}, {
|
|
679
681
|
key: "updateDisplayStyle",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.1.0",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
],
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atlaskit/adf-schema": "^57.
|
|
24
|
+
"@atlaskit/adf-schema": "^57.4.0",
|
|
25
25
|
"@atlaskit/button": "^25.3.0",
|
|
26
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
27
|
-
"@atlaskit/editor-plugin-block-controls": "^
|
|
28
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
29
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
30
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
31
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
32
|
-
"@atlaskit/editor-plugin-limited-mode": "^
|
|
33
|
-
"@atlaskit/editor-plugin-local-id": "^
|
|
34
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
35
|
-
"@atlaskit/editor-plugin-selection-marker": "^
|
|
26
|
+
"@atlaskit/editor-plugin-analytics": "^17.0.0",
|
|
27
|
+
"@atlaskit/editor-plugin-block-controls": "^18.1.0",
|
|
28
|
+
"@atlaskit/editor-plugin-block-menu": "^16.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-decorations": "^17.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-editor-disabled": "^17.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^19.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-limited-mode": "^14.1.0",
|
|
33
|
+
"@atlaskit/editor-plugin-local-id": "^15.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-selection": "^17.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-selection-marker": "^17.0.0",
|
|
36
36
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
37
37
|
"@atlaskit/editor-shared-styles": "^4.1.0",
|
|
38
38
|
"@atlaskit/editor-tables": "^3.1.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
45
45
|
"@atlaskit/prosemirror-history": "^1.2.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^179.0.0",
|
|
47
47
|
"@atlaskit/tokens": "^16.11.0",
|
|
48
48
|
"@atlaskit/tooltip": "^24.3.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"w3c-keyname": "^2.1.8"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@atlaskit/editor-common": "^
|
|
55
|
+
"@atlaskit/editor-common": "^121.1.0",
|
|
56
56
|
"react": "^18.2.0 || ^19.2.0",
|
|
57
57
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
58
58
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|