@atlaskit/editor-plugin-code-block-advanced 12.0.2 → 12.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 +8 -0
- package/dist/cjs/nodeviews/extensions/prosemirrorDecorations.js +1 -6
- package/dist/es2019/nodeviews/extensions/prosemirrorDecorations.js +1 -6
- package/dist/esm/nodeviews/extensions/prosemirrorDecorations.js +1 -6
- package/package.json +4 -7
- package/src/nodeviews/extensions/prosemirrorDecorations.ts +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block-advanced
|
|
2
2
|
|
|
3
|
+
## 12.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8c7ebd7b40870`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8c7ebd7b40870) -
|
|
8
|
+
Clean up feature gate `platform_editor_fix_decoration_edge_case`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 12.0.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -12,7 +12,6 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
12
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _view = require("@codemirror/view");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
17
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
18
17
|
var PMWidget = /*#__PURE__*/function (_WidgetType) {
|
|
@@ -122,11 +121,7 @@ var prosemirrorDecorationPlugin = exports.prosemirrorDecorationPlugin = function
|
|
|
122
121
|
}).map(function (decoration) {
|
|
123
122
|
return mapPMDecorationToCMDecoration(decoration, editorView, getPos);
|
|
124
123
|
}).filter(isDefined);
|
|
125
|
-
|
|
126
|
-
return _view.Decoration.set(cmDecorations.sort(sortDecorationsByPositionAndSide));
|
|
127
|
-
} else {
|
|
128
|
-
return _view.Decoration.set(cmDecorations);
|
|
129
|
-
}
|
|
124
|
+
return _view.Decoration.set(cmDecorations.sort(sortDecorationsByPositionAndSide));
|
|
130
125
|
}
|
|
131
126
|
}, {
|
|
132
127
|
key: "update",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ViewPlugin, WidgetType, Decoration as CodeMirrorDecoration } from '@codemirror/view';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
class PMWidget extends WidgetType {
|
|
4
3
|
constructor(toDOMElement) {
|
|
5
4
|
super();
|
|
@@ -91,11 +90,7 @@ export const prosemirrorDecorationPlugin = (updateDecorationsEffect, editorView,
|
|
|
91
90
|
});
|
|
92
91
|
});
|
|
93
92
|
const cmDecorations = allDecorations.sort((a, b) => a.from < b.from ? -1 : 1).map(decoration => mapPMDecorationToCMDecoration(decoration, editorView, getPos)).filter(isDefined);
|
|
94
|
-
|
|
95
|
-
return CodeMirrorDecoration.set(cmDecorations.sort(sortDecorationsByPositionAndSide));
|
|
96
|
-
} else {
|
|
97
|
-
return CodeMirrorDecoration.set(cmDecorations);
|
|
98
|
-
}
|
|
93
|
+
return CodeMirrorDecoration.set(cmDecorations.sort(sortDecorationsByPositionAndSide));
|
|
99
94
|
}
|
|
100
95
|
update(update) {
|
|
101
96
|
this.decorations = this.updateDecorations(update.view);
|
|
@@ -7,7 +7,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import { ViewPlugin, WidgetType, Decoration as CodeMirrorDecoration } from '@codemirror/view';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
var PMWidget = /*#__PURE__*/function (_WidgetType) {
|
|
12
11
|
function PMWidget(toDOMElement) {
|
|
13
12
|
var _this;
|
|
@@ -115,11 +114,7 @@ export var prosemirrorDecorationPlugin = function prosemirrorDecorationPlugin(up
|
|
|
115
114
|
}).map(function (decoration) {
|
|
116
115
|
return mapPMDecorationToCMDecoration(decoration, editorView, getPos);
|
|
117
116
|
}).filter(isDefined);
|
|
118
|
-
|
|
119
|
-
return CodeMirrorDecoration.set(cmDecorations.sort(sortDecorationsByPositionAndSide));
|
|
120
|
-
} else {
|
|
121
|
-
return CodeMirrorDecoration.set(cmDecorations);
|
|
122
|
-
}
|
|
117
|
+
return CodeMirrorDecoration.set(cmDecorations.sort(sortDecorationsByPositionAndSide));
|
|
123
118
|
}
|
|
124
119
|
}, {
|
|
125
120
|
key: "update",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block-advanced",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.3",
|
|
4
4
|
"description": "CodeBlockAdvanced plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"atlaskit:src": "src/index.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@atlaskit/adf-schema": "^55.
|
|
23
|
+
"@atlaskit/adf-schema": "^55.2.0",
|
|
24
24
|
"@atlaskit/code": "^18.0.0",
|
|
25
25
|
"@atlaskit/editor-plugin-code-block": "^14.0.0",
|
|
26
26
|
"@atlaskit/editor-plugin-editor-disabled": "^12.0.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
31
31
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
32
32
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
33
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^107.1.0",
|
|
34
34
|
"@atlaskit/tokens": "^14.0.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|
|
36
36
|
"@codemirror/autocomplete": "6.18.4",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"codemirror-lang-elixir": "4.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@atlaskit/editor-common": "^116.
|
|
51
|
+
"@atlaskit/editor-common": "^116.3.0",
|
|
52
52
|
"react": "^18.2.0",
|
|
53
53
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
54
54
|
},
|
|
@@ -92,9 +92,6 @@
|
|
|
92
92
|
"platform_editor_adf_with_localid": {
|
|
93
93
|
"type": "boolean"
|
|
94
94
|
},
|
|
95
|
-
"platform_editor_fix_decoration_edge_case": {
|
|
96
|
-
"type": "boolean"
|
|
97
|
-
},
|
|
98
95
|
"platform_editor_content_mode_button_mvp": {
|
|
99
96
|
"type": "boolean"
|
|
100
97
|
}
|
|
@@ -3,7 +3,7 @@ import { ViewPlugin, WidgetType, Decoration as CodeMirrorDecoration } from '@cod
|
|
|
3
3
|
import type { EditorView as CodeMirror, DecorationSet, ViewUpdate } from '@codemirror/view';
|
|
4
4
|
|
|
5
5
|
import type { EditorView, Decoration, DecorationSource } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
|
|
8
8
|
class PMWidget extends WidgetType {
|
|
9
9
|
constructor(readonly toDOMElement: HTMLElement) {
|
|
@@ -140,11 +140,7 @@ export const prosemirrorDecorationPlugin = (
|
|
|
140
140
|
.map((decoration) => mapPMDecorationToCMDecoration(decoration, editorView, getPos))
|
|
141
141
|
.filter(isDefined);
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
return CodeMirrorDecoration.set(cmDecorations.sort(sortDecorationsByPositionAndSide));
|
|
145
|
-
} else {
|
|
146
|
-
return CodeMirrorDecoration.set(cmDecorations);
|
|
147
|
-
}
|
|
143
|
+
return CodeMirrorDecoration.set(cmDecorations.sort(sortDecorationsByPositionAndSide));
|
|
148
144
|
}
|
|
149
145
|
update(update: ViewUpdate) {
|
|
150
146
|
this.decorations = this.updateDecorations(update.view);
|