@atlaskit/editor-plugin-base 1.11.1 → 1.11.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 +18 -0
- package/dist/cjs/plugin.js +4 -2
- package/dist/cjs/pm-plugins/disable-spell-checking.js +11 -11
- package/dist/cjs/pm-plugins/inline-cursor-target.js +2 -1
- package/dist/es2019/plugin.js +4 -2
- package/dist/es2019/pm-plugins/disable-spell-checking.js +1 -1
- package/dist/es2019/pm-plugins/inline-cursor-target.js +2 -1
- package/dist/esm/plugin.js +4 -2
- package/dist/esm/pm-plugins/disable-spell-checking.js +1 -1
- package/dist/esm/pm-plugins/inline-cursor-target.js +2 -1
- package/package.json +3 -8
- package/tsconfig.app.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-base
|
|
2
2
|
|
|
3
|
+
## 1.11.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#139034](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139034)
|
|
8
|
+
[`517cdc0f7ea1a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/517cdc0f7ea1a) -
|
|
9
|
+
Used experiment for lazy node view
|
|
10
|
+
|
|
11
|
+
## 1.11.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#138801](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138801)
|
|
16
|
+
[`eeb1f7ad41211`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eeb1f7ad41211) -
|
|
17
|
+
Adding new entry-points to editor-common to optimise bundle size and move away from "utils"
|
|
18
|
+
entry-point.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 1.11.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -11,7 +11,7 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
11
11
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
12
12
|
var _commands = require("@atlaskit/editor-prosemirror/commands");
|
|
13
13
|
var _history = require("@atlaskit/editor-prosemirror/history");
|
|
14
|
-
var
|
|
14
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
15
|
var _commands2 = require("./commands");
|
|
16
16
|
var _disableSpellChecking = _interopRequireDefault(require("./pm-plugins/disable-spell-checking"));
|
|
17
17
|
var _filterSteps = _interopRequireDefault(require("./pm-plugins/filter-steps"));
|
|
@@ -47,7 +47,9 @@ var basePlugin = function basePlugin(_ref) {
|
|
|
47
47
|
return (0, _filterSteps.default)(dispatchAnalyticsEvent);
|
|
48
48
|
}
|
|
49
49
|
}];
|
|
50
|
-
if ((0,
|
|
50
|
+
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', true, {
|
|
51
|
+
exposure: true
|
|
52
|
+
})) {
|
|
51
53
|
plugins.push({
|
|
52
54
|
name: 'lazyNodeViewDecorationsPlugin',
|
|
53
55
|
plugin: function plugin() {
|
|
@@ -4,30 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _browser = require("@atlaskit/editor-common/browser");
|
|
7
8
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
8
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
9
9
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
10
10
|
function getCurrentBrowserAndVersion() {
|
|
11
11
|
switch (true) {
|
|
12
|
-
case
|
|
12
|
+
case _browser.browser.chrome === true:
|
|
13
13
|
return {
|
|
14
14
|
browser: 'chrome',
|
|
15
|
-
version:
|
|
15
|
+
version: _browser.browser.chrome_version
|
|
16
16
|
};
|
|
17
|
-
case
|
|
17
|
+
case _browser.browser.ie === true:
|
|
18
18
|
return {
|
|
19
19
|
browser: 'ie',
|
|
20
|
-
version:
|
|
20
|
+
version: _browser.browser.ie_version
|
|
21
21
|
};
|
|
22
|
-
case
|
|
22
|
+
case _browser.browser.gecko === true:
|
|
23
23
|
return {
|
|
24
24
|
browser: 'gecko',
|
|
25
|
-
version:
|
|
25
|
+
version: _browser.browser.gecko_version
|
|
26
26
|
};
|
|
27
|
-
case
|
|
27
|
+
case _browser.browser.safari === true:
|
|
28
28
|
return {
|
|
29
29
|
browser: 'safari',
|
|
30
|
-
version:
|
|
30
|
+
version: _browser.browser.safari_version
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
return undefined;
|
|
@@ -46,10 +46,10 @@ var _default = exports.default = function _default(featureFlags) {
|
|
|
46
46
|
return {};
|
|
47
47
|
}
|
|
48
48
|
var browserVersionDisableRange = browserConfigFeatureFlag[userCurrentBrowserAndVersion.browser];
|
|
49
|
-
if (!browserVersionDisableRange || !
|
|
49
|
+
if (!browserVersionDisableRange || !_browser.browser[userCurrentBrowserAndVersion.browser]) {
|
|
50
50
|
return {};
|
|
51
51
|
}
|
|
52
|
-
var shouldDisableSpellcheck = !!browserVersionDisableRange.maximum ? userCurrentBrowserAndVersion.version >= browserVersionDisableRange.minimum && userCurrentBrowserAndVersion.version <= browserVersionDisableRange.maximum :
|
|
52
|
+
var shouldDisableSpellcheck = !!browserVersionDisableRange.maximum ? userCurrentBrowserAndVersion.version >= browserVersionDisableRange.minimum && userCurrentBrowserAndVersion.version <= browserVersionDisableRange.maximum : _browser.browser[userCurrentBrowserAndVersion.browser] && userCurrentBrowserAndVersion.version >= browserVersionDisableRange.minimum;
|
|
53
53
|
if (shouldDisableSpellcheck) {
|
|
54
54
|
return {
|
|
55
55
|
spellcheck: 'false'
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isInlineNodeView = exports.inlineCursorTargetStateKey = exports.default = void 0;
|
|
7
|
+
var _browser = require("@atlaskit/editor-common/browser");
|
|
7
8
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
8
9
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
9
10
|
var _whitespace = require("@atlaskit/editor-common/whitespace");
|
|
@@ -95,7 +96,7 @@ var _default = exports.default = function _default() {
|
|
|
95
96
|
// TODO We may be able to remove this when playing the following ticket:
|
|
96
97
|
// https://product-fabric.atlassian.net/browse/ED-14938
|
|
97
98
|
keydown: function keydown(view, event) {
|
|
98
|
-
if (
|
|
99
|
+
if (_browser.browser.safari && event instanceof KeyboardEvent && event.shiftKey && (event.key === 'ArrowLeft' || event.key === 'ArrowRight')) {
|
|
99
100
|
view.dispatch(view.state.tr.setMeta(inlineCursorTargetStateKey, {
|
|
100
101
|
cursorTarget: undefined
|
|
101
102
|
}));
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -2,7 +2,7 @@ import { doc, paragraph, text } from '@atlaskit/adf-schema';
|
|
|
2
2
|
import { keymap } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { baseKeymap } from '@atlaskit/editor-prosemirror/commands';
|
|
4
4
|
import { history } from '@atlaskit/editor-prosemirror/history';
|
|
5
|
-
import {
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
6
|
import { setKeyboardHeight } from './commands';
|
|
7
7
|
import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
|
|
8
8
|
import filterStepsPlugin from './pm-plugins/filter-steps';
|
|
@@ -34,7 +34,9 @@ const basePlugin = ({
|
|
|
34
34
|
dispatchAnalyticsEvent
|
|
35
35
|
}) => filterStepsPlugin(dispatchAnalyticsEvent)
|
|
36
36
|
}];
|
|
37
|
-
if (
|
|
37
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', true, {
|
|
38
|
+
exposure: true
|
|
39
|
+
})) {
|
|
38
40
|
plugins.push({
|
|
39
41
|
name: 'lazyNodeViewDecorationsPlugin',
|
|
40
42
|
plugin: () => createLazyNodeViewDecorationPlugin()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { browser as browserEnv } from '@atlaskit/editor-common/browser';
|
|
1
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { browser as browserEnv } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
function getCurrentBrowserAndVersion() {
|
|
5
5
|
switch (true) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { browser } from '@atlaskit/editor-common/browser';
|
|
1
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import {
|
|
3
|
+
import { isTextSelection } from '@atlaskit/editor-common/utils';
|
|
3
4
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
4
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
package/dist/esm/plugin.js
CHANGED
|
@@ -5,7 +5,7 @@ import { doc, paragraph, text } from '@atlaskit/adf-schema';
|
|
|
5
5
|
import { keymap } from '@atlaskit/editor-common/keymaps';
|
|
6
6
|
import { baseKeymap } from '@atlaskit/editor-prosemirror/commands';
|
|
7
7
|
import { history } from '@atlaskit/editor-prosemirror/history';
|
|
8
|
-
import {
|
|
8
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
9
|
import { setKeyboardHeight } from './commands';
|
|
10
10
|
import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
|
|
11
11
|
import filterStepsPlugin from './pm-plugins/filter-steps';
|
|
@@ -37,7 +37,9 @@ var basePlugin = function basePlugin(_ref) {
|
|
|
37
37
|
return filterStepsPlugin(dispatchAnalyticsEvent);
|
|
38
38
|
}
|
|
39
39
|
}];
|
|
40
|
-
if (
|
|
40
|
+
if (editorExperiment('platform_editor_exp_lazy_node_views', true, {
|
|
41
|
+
exposure: true
|
|
42
|
+
})) {
|
|
41
43
|
plugins.push({
|
|
42
44
|
name: 'lazyNodeViewDecorationsPlugin',
|
|
43
45
|
plugin: function plugin() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { browser as browserEnv } from '@atlaskit/editor-common/browser';
|
|
1
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { browser as browserEnv } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
function getCurrentBrowserAndVersion() {
|
|
5
5
|
switch (true) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { browser } from '@atlaskit/editor-common/browser';
|
|
1
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import {
|
|
3
|
+
import { isTextSelection } from '@atlaskit/editor-common/utils';
|
|
3
4
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
4
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-base",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.3",
|
|
4
4
|
"description": "Base plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,18 +32,13 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^40.9.0",
|
|
35
|
-
"@atlaskit/editor-common": "^88.
|
|
35
|
+
"@atlaskit/editor-common": "^88.13.0",
|
|
36
36
|
"@atlaskit/editor-plugin-context-identifier": "^1.3.0",
|
|
37
37
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
39
|
-
"@atlaskit/
|
|
39
|
+
"@atlaskit/tmp-editor-statsig": "^2.1.8",
|
|
40
40
|
"@babel/runtime": "^7.0.0"
|
|
41
41
|
},
|
|
42
|
-
"platform-feature-flags": {
|
|
43
|
-
"platform_editor_lazy-node-views": {
|
|
44
|
-
"type": "boolean"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
42
|
"techstack": {
|
|
48
43
|
"@atlassian/frontend": {
|
|
49
44
|
"import-structure": [
|