@atlaskit/editor-plugin-limited-mode 16.0.1 → 16.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 +22 -0
- package/dist/cjs/limitedModePlugin.js +3 -2
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/es2019/entry-points/limited-mode-plugin.js +1 -0
- package/dist/es2019/limitedModePlugin.js +3 -2
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/esm/entry-points/limited-mode-plugin.js +1 -0
- package/dist/esm/limitedModePlugin.js +3 -2
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/types/pm-plugins/utils/latch-detector-types.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-limited-mode
|
|
2
2
|
|
|
3
|
+
## 16.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`fc26bfc51dd5c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fc26bfc51dd5c) -
|
|
8
|
+
Add sparse block-control surface anchors, intersection-driven candidates, and explicit visibility
|
|
9
|
+
invalidation for registry-backed block controls. Expose registration change subscriptions from the
|
|
10
|
+
UI control registry model, and refresh cached visibility from suggestion and collapse transaction
|
|
11
|
+
metadata. Under `platform_editor_block_control_migration`, use native node-anchor identity across
|
|
12
|
+
Editor and Block Controls, and route expand keyboard focus through the shared Block Controls
|
|
13
|
+
command. Preserve Show Diff visibility checks in both migration cohorts so block controls stay
|
|
14
|
+
hidden while a diff is displayed. Keep the block menu closed when a migrated layout-column handle
|
|
15
|
+
opens the layout menu, and close the layout menu when the selection moves away from its selected
|
|
16
|
+
columns.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
19
|
+
## 16.0.2
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 16.0.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -6,9 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.limitedModePlugin = void 0;
|
|
7
7
|
var _nodeAnchor = require("@atlaskit/editor-common/node-anchor");
|
|
8
8
|
var _usePluginStateEffect = require("@atlaskit/editor-common/use-plugin-state-effect");
|
|
9
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
9
10
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
|
-
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
11
11
|
var _main = require("./pm-plugins/main");
|
|
12
|
+
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
12
13
|
var limitedModePlugin = exports.limitedModePlugin = function limitedModePlugin(_ref) {
|
|
13
14
|
var api = _ref.api;
|
|
14
15
|
return {
|
|
@@ -40,7 +41,7 @@ var limitedModePlugin = exports.limitedModePlugin = function limitedModePlugin(_
|
|
|
40
41
|
var editorView = _ref2.editorView;
|
|
41
42
|
(0, _usePluginStateEffect.usePluginStateEffect)(api, ['limitedMode'], function (_ref3) {
|
|
42
43
|
var limitedModeState = _ref3.limitedModeState;
|
|
43
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
|
|
44
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_control_migration')) {
|
|
44
45
|
var _limitedModeState$ena;
|
|
45
46
|
var isEnabled = (_limitedModeState$ena = limitedModeState === null || limitedModeState === void 0 ? void 0 : limitedModeState.enabled) !== null && _limitedModeState$ena !== void 0 ? _limitedModeState$ena : false;
|
|
46
47
|
var nodeIdProvider = (0, _nodeAnchor.getNodeIdProvider)(editorView);
|
|
@@ -9,8 +9,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
10
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
11
|
var _shouldEnableLimitedMode = require("@atlaskit/editor-common/should-enable-limited-mode");
|
|
12
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
13
12
|
var _expVal = require("@atlaskit/platform-feature-experiments/exp-val");
|
|
13
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
14
14
|
var _pluginKey = require("./plugin-key");
|
|
15
15
|
var _latchDetector = require("./utils/latch-detector");
|
|
16
16
|
var _latchPolicy = require("./utils/latch-policy");
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getNodeIdProvider } from '@atlaskit/editor-common/node-anchor';
|
|
2
2
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
|
-
import { limitedModePluginKey } from './pm-plugins/plugin-key';
|
|
5
5
|
import { createPlugin } from './pm-plugins/main';
|
|
6
|
+
import { limitedModePluginKey } from './pm-plugins/plugin-key';
|
|
6
7
|
export const limitedModePlugin = ({
|
|
7
8
|
api
|
|
8
9
|
}) => {
|
|
@@ -35,7 +36,7 @@ export const limitedModePlugin = ({
|
|
|
35
36
|
usePluginStateEffect(api, ['limitedMode'], ({
|
|
36
37
|
limitedModeState
|
|
37
38
|
}) => {
|
|
38
|
-
if (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
|
|
39
|
+
if (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || isExperimentEnabled('platform_editor_block_control_migration')) {
|
|
39
40
|
var _limitedModeState$ena;
|
|
40
41
|
const isEnabled = (_limitedModeState$ena = limitedModeState === null || limitedModeState === void 0 ? void 0 : limitedModeState.enabled) !== null && _limitedModeState$ena !== void 0 ? _limitedModeState$ena : false;
|
|
41
42
|
const nodeIdProvider = getNodeIdProvider(editorView);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { shouldEnableLimitedModeForDocument } from '@atlaskit/editor-common/should-enable-limited-mode';
|
|
4
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
4
|
import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
|
|
5
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
6
|
import { limitedModePluginKey } from './plugin-key';
|
|
7
7
|
import { createLatchDetector } from './utils/latch-detector';
|
|
8
8
|
import { LatchPolicy } from './utils/latch-policy';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getNodeIdProvider } from '@atlaskit/editor-common/node-anchor';
|
|
2
2
|
import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
|
-
import { limitedModePluginKey } from './pm-plugins/plugin-key';
|
|
5
5
|
import { createPlugin } from './pm-plugins/main';
|
|
6
|
+
import { limitedModePluginKey } from './pm-plugins/plugin-key';
|
|
6
7
|
export var limitedModePlugin = function limitedModePlugin(_ref) {
|
|
7
8
|
var api = _ref.api;
|
|
8
9
|
return {
|
|
@@ -34,7 +35,7 @@ export var limitedModePlugin = function limitedModePlugin(_ref) {
|
|
|
34
35
|
var editorView = _ref2.editorView;
|
|
35
36
|
usePluginStateEffect(api, ['limitedMode'], function (_ref3) {
|
|
36
37
|
var limitedModeState = _ref3.limitedModeState;
|
|
37
|
-
if (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
|
|
38
|
+
if (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || isExperimentEnabled('platform_editor_block_control_migration')) {
|
|
38
39
|
var _limitedModeState$ena;
|
|
39
40
|
var isEnabled = (_limitedModeState$ena = limitedModeState === null || limitedModeState === void 0 ? void 0 : limitedModeState.enabled) !== null && _limitedModeState$ena !== void 0 ? _limitedModeState$ena : false;
|
|
40
41
|
var nodeIdProvider = getNodeIdProvider(editorView);
|
|
@@ -4,8 +4,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
6
|
import { shouldEnableLimitedModeForDocument } from '@atlaskit/editor-common/should-enable-limited-mode';
|
|
7
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
8
7
|
import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
|
|
8
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
9
|
import { limitedModePluginKey } from './plugin-key';
|
|
10
10
|
import { createLatchDetector } from './utils/latch-detector';
|
|
11
11
|
import { LatchPolicy } from './utils/latch-policy';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-limited-mode",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.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": "^6.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": "^201.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": "^123.
|
|
33
|
+
"@atlaskit/editor-common": "^123.3.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
|
},
|