@atlaskit/renderer 112.0.0 → 112.2.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 +25 -0
- package/dist/cjs/actions/index.js +7 -0
- package/dist/cjs/i18n/index.js +21 -0
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/actions/index.js +8 -1
- package/dist/es2019/i18n/index.js +4 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/actions/index.js +8 -1
- package/dist/esm/i18n/index.js +4 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/i18n/index.d.ts +4 -2
- package/dist/types-ts4.5/i18n/index.d.ts +4 -2
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 112.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#152319](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152319)
|
|
8
|
+
[`bfa9c49e1928b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bfa9c49e1928b) -
|
|
9
|
+
[ux] Added a check to handle the case where a single non-breaking space is selected and the user
|
|
10
|
+
attempts to leave a comment on it.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 112.1.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#154932](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154932)
|
|
21
|
+
[`3c26362f19c76`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3c26362f19c76) -
|
|
22
|
+
Adding support for en-ZZ i18n locale to editor package
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 112.0.0
|
|
4
29
|
|
|
5
30
|
### Major Changes
|
|
@@ -12,6 +12,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
12
12
|
var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
|
|
13
13
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
14
14
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
15
|
+
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
16
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
16
17
|
var _steps = require("../steps");
|
|
17
18
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -66,6 +67,12 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
|
|
|
66
67
|
if (!this.doc || !this.schema) {
|
|
67
68
|
return false;
|
|
68
69
|
}
|
|
70
|
+
if ((0, _platformFeatureFlags.fg)('forbid_comments_on_empty_newlines')) {
|
|
71
|
+
var currentSelection = _state.TextSelection.create(this.doc, from, to);
|
|
72
|
+
if ((0, _utils.isEmptyTextSelection)(currentSelection, this.schema)) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
69
76
|
return (0, _utils.canApplyAnnotationOnRange)({
|
|
70
77
|
from: from,
|
|
71
78
|
to: to
|
package/dist/cjs/i18n/index.js
CHANGED
|
@@ -22,6 +22,24 @@ Object.defineProperty(exports, "de", {
|
|
|
22
22
|
return _de.default;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
+
Object.defineProperty(exports, "en", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _en.default;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "en_GB", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function get() {
|
|
34
|
+
return _en_GB.default;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "en_ZZ", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function get() {
|
|
40
|
+
return _en_ZZ.default;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
25
43
|
Object.defineProperty(exports, "es", {
|
|
26
44
|
enumerable: true,
|
|
27
45
|
get: function get() {
|
|
@@ -163,6 +181,9 @@ var _et = _interopRequireDefault(require("./et"));
|
|
|
163
181
|
var _fi = _interopRequireDefault(require("./fi"));
|
|
164
182
|
var _fr = _interopRequireDefault(require("./fr"));
|
|
165
183
|
var _de = _interopRequireDefault(require("./de"));
|
|
184
|
+
var _en = _interopRequireDefault(require("./en"));
|
|
185
|
+
var _en_GB = _interopRequireDefault(require("./en_GB"));
|
|
186
|
+
var _en_ZZ = _interopRequireDefault(require("./en_ZZ"));
|
|
166
187
|
var _hu = _interopRequireDefault(require("./hu"));
|
|
167
188
|
var _it = _interopRequireDefault(require("./it"));
|
|
168
189
|
var _ja = _interopRequireDefault(require("./ja"));
|
|
@@ -65,7 +65,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
65
65
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
66
66
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
67
67
|
var packageName = "@atlaskit/renderer";
|
|
68
|
-
var packageVersion = "112.
|
|
68
|
+
var packageVersion = "112.2.0";
|
|
69
69
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
70
70
|
containerName: 'ak-renderer-wrapper',
|
|
71
71
|
containerType: 'inline-size',
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
3
|
-
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, isEmptyTextSelection } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
5
|
+
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import { AddNodeMarkStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
6
7
|
import { createAnnotationStep, getPosFromRange } from '../steps';
|
|
7
8
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
@@ -46,6 +47,12 @@ export default class RendererActions {
|
|
|
46
47
|
if (!this.doc || !this.schema) {
|
|
47
48
|
return false;
|
|
48
49
|
}
|
|
50
|
+
if (fg('forbid_comments_on_empty_newlines')) {
|
|
51
|
+
const currentSelection = TextSelection.create(this.doc, from, to);
|
|
52
|
+
if (isEmptyTextSelection(currentSelection, this.schema)) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
49
56
|
return canApplyAnnotationOnRange({
|
|
50
57
|
from,
|
|
51
58
|
to
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
4
|
+
* This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
|
|
6
5
|
*/
|
|
7
6
|
export { default as zh } from './zh';
|
|
8
7
|
export { default as zh_TW } from './zh_TW';
|
|
@@ -13,6 +12,9 @@ export { default as et } from './et';
|
|
|
13
12
|
export { default as fi } from './fi';
|
|
14
13
|
export { default as fr } from './fr';
|
|
15
14
|
export { default as de } from './de';
|
|
15
|
+
export { default as en } from './en';
|
|
16
|
+
export { default as en_GB } from './en_GB';
|
|
17
|
+
export { default as en_ZZ } from './en_ZZ';
|
|
16
18
|
export { default as hu } from './hu';
|
|
17
19
|
export { default as it } from './it';
|
|
18
20
|
export { default as ja } from './ja';
|
|
@@ -45,7 +45,7 @@ import { countNodes } from './count-nodes';
|
|
|
45
45
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
const packageName = "@atlaskit/renderer";
|
|
48
|
-
const packageVersion = "112.
|
|
48
|
+
const packageVersion = "112.2.0";
|
|
49
49
|
const setAsQueryContainerStyles = css({
|
|
50
50
|
containerName: 'ak-renderer-wrapper',
|
|
51
51
|
containerType: 'inline-size',
|
|
@@ -5,8 +5,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
8
|
-
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes } from '@atlaskit/editor-common/utils';
|
|
8
|
+
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, isEmptyTextSelection } from '@atlaskit/editor-common/utils';
|
|
9
9
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
10
|
+
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
10
11
|
import { AddNodeMarkStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
11
12
|
import { createAnnotationStep, getPosFromRange } from '../steps';
|
|
12
13
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
@@ -59,6 +60,12 @@ var RendererActions = /*#__PURE__*/function () {
|
|
|
59
60
|
if (!this.doc || !this.schema) {
|
|
60
61
|
return false;
|
|
61
62
|
}
|
|
63
|
+
if (fg('forbid_comments_on_empty_newlines')) {
|
|
64
|
+
var currentSelection = TextSelection.create(this.doc, from, to);
|
|
65
|
+
if (isEmptyTextSelection(currentSelection, this.schema)) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
62
69
|
return canApplyAnnotationOnRange({
|
|
63
70
|
from: from,
|
|
64
71
|
to: to
|
package/dist/esm/i18n/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
4
|
+
* This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
|
|
6
5
|
*/
|
|
7
6
|
export { default as zh } from './zh';
|
|
8
7
|
export { default as zh_TW } from './zh_TW';
|
|
@@ -13,6 +12,9 @@ export { default as et } from './et';
|
|
|
13
12
|
export { default as fi } from './fi';
|
|
14
13
|
export { default as fr } from './fr';
|
|
15
14
|
export { default as de } from './de';
|
|
15
|
+
export { default as en } from './en';
|
|
16
|
+
export { default as en_GB } from './en_GB';
|
|
17
|
+
export { default as en_ZZ } from './en_ZZ';
|
|
16
18
|
export { default as hu } from './hu';
|
|
17
19
|
export { default as it } from './it';
|
|
18
20
|
export { default as ja } from './ja';
|
|
@@ -55,7 +55,7 @@ import { countNodes } from './count-nodes';
|
|
|
55
55
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
56
56
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "112.
|
|
58
|
+
var packageVersion = "112.2.0";
|
|
59
59
|
var setAsQueryContainerStyles = css({
|
|
60
60
|
containerName: 'ak-renderer-wrapper',
|
|
61
61
|
containerType: 'inline-size',
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
4
|
+
* This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
|
|
6
5
|
*/
|
|
7
6
|
export { default as zh } from './zh';
|
|
8
7
|
export { default as zh_TW } from './zh_TW';
|
|
@@ -13,6 +12,9 @@ export { default as et } from './et';
|
|
|
13
12
|
export { default as fi } from './fi';
|
|
14
13
|
export { default as fr } from './fr';
|
|
15
14
|
export { default as de } from './de';
|
|
15
|
+
export { default as en } from './en';
|
|
16
|
+
export { default as en_GB } from './en_GB';
|
|
17
|
+
export { default as en_ZZ } from './en_ZZ';
|
|
16
18
|
export { default as hu } from './hu';
|
|
17
19
|
export { default as it } from './it';
|
|
18
20
|
export { default as ja } from './ja';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
4
|
+
* This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
|
|
6
5
|
*/
|
|
7
6
|
export { default as zh } from './zh';
|
|
8
7
|
export { default as zh_TW } from './zh_TW';
|
|
@@ -13,6 +12,9 @@ export { default as et } from './et';
|
|
|
13
12
|
export { default as fi } from './fi';
|
|
14
13
|
export { default as fr } from './fr';
|
|
15
14
|
export { default as de } from './de';
|
|
15
|
+
export { default as en } from './en';
|
|
16
|
+
export { default as en_GB } from './en_GB';
|
|
17
|
+
export { default as en_ZZ } from './en_ZZ';
|
|
16
18
|
export { default as hu } from './hu';
|
|
17
19
|
export { default as it } from './it';
|
|
18
20
|
export { default as ja } from './ja';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "112.
|
|
3
|
+
"version": "112.2.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
30
30
|
"@atlaskit/button": "^20.3.0",
|
|
31
31
|
"@atlaskit/code": "^15.6.0",
|
|
32
|
-
"@atlaskit/editor-common": "^94.
|
|
32
|
+
"@atlaskit/editor-common": "^94.9.0",
|
|
33
33
|
"@atlaskit/editor-json-transformer": "^8.20.0",
|
|
34
34
|
"@atlaskit/editor-palette": "1.6.3",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
"editor_inline_comments_on_inline_nodes": {
|
|
121
121
|
"type": "boolean"
|
|
122
122
|
},
|
|
123
|
+
"forbid_comments_on_empty_newlines": {
|
|
124
|
+
"type": "boolean"
|
|
125
|
+
},
|
|
123
126
|
"annotations_align_editor_and_renderer_styles": {
|
|
124
127
|
"type": "boolean"
|
|
125
128
|
},
|