@atlaskit/editor-ssr-renderer 2.1.0 → 2.1.2
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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-ssr-renderer
|
|
2
2
|
|
|
3
|
+
## 2.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`3242cbd5e88b9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3242cbd5e88b9) -
|
|
14
|
+
Update packages to match prosemirror library updates
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 2.1.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -20,6 +20,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
20
20
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
21
21
|
var _eventDispatcher = require("@atlaskit/editor-common/event-dispatcher");
|
|
22
22
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
23
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
24
|
var _excluded = ["plugins", "schema", "doc", "portalProviderAPI", "intl", "onEditorStateChanged"];
|
|
24
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
26
|
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; }
|
|
@@ -147,6 +148,16 @@ var SSREditorView = /*#__PURE__*/function () {
|
|
|
147
148
|
value: function someProp() {
|
|
148
149
|
return undefined;
|
|
149
150
|
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "serializeForClipboard",
|
|
153
|
+
value: function serializeForClipboard(slice) {
|
|
154
|
+
// No-op in SSR - clipboard operations are not supported
|
|
155
|
+
return {
|
|
156
|
+
dom: document.createElement('div'),
|
|
157
|
+
text: '',
|
|
158
|
+
slice: slice
|
|
159
|
+
};
|
|
160
|
+
}
|
|
150
161
|
}]);
|
|
151
162
|
}();
|
|
152
163
|
var SSREventDispatcher = /*#__PURE__*/function (_EventDispatcher) {
|
|
@@ -374,6 +385,8 @@ function EditorSSRRenderer(_ref) {
|
|
|
374
385
|
"aria-describedby": divProps['aria-describedby'],
|
|
375
386
|
"data-editor-id": divProps['data-editor-id'],
|
|
376
387
|
"data-vc-ignore-if-no-layout-shift": true,
|
|
388
|
+
"data-ssr-placeholder": (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? 'editor-view' : undefined,
|
|
389
|
+
"data-ssr-placeholder-replace": (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? 'editor-view' : undefined,
|
|
377
390
|
"aria-multiline": true,
|
|
378
391
|
role: "textbox"
|
|
379
392
|
// @ts-expect-error - contenteditable is not exist in div attributes
|
|
@@ -4,6 +4,7 @@ import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
4
4
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { EventDispatcher, createDispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
6
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
|
|
8
9
|
// The copy of type from prosemirror-view.
|
|
9
10
|
// Probably, we need to fix this package exports and add `NodeViewConstructor` and `MarkViewConstructor` types here.
|
|
@@ -80,6 +81,14 @@ class SSREditorView {
|
|
|
80
81
|
someProp() {
|
|
81
82
|
return undefined;
|
|
82
83
|
}
|
|
84
|
+
serializeForClipboard(slice) {
|
|
85
|
+
// No-op in SSR - clipboard operations are not supported
|
|
86
|
+
return {
|
|
87
|
+
dom: document.createElement('div'),
|
|
88
|
+
text: '',
|
|
89
|
+
slice
|
|
90
|
+
};
|
|
91
|
+
}
|
|
83
92
|
constructor(place, props) {
|
|
84
93
|
this.state = props.state;
|
|
85
94
|
this.dom = document.createElement('div');
|
|
@@ -285,6 +294,8 @@ export function EditorSSRRenderer({
|
|
|
285
294
|
"aria-describedby": divProps['aria-describedby'],
|
|
286
295
|
"data-editor-id": divProps['data-editor-id'],
|
|
287
296
|
"data-vc-ignore-if-no-layout-shift": true,
|
|
297
|
+
"data-ssr-placeholder": expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? 'editor-view' : undefined,
|
|
298
|
+
"data-ssr-placeholder-replace": expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? 'editor-view' : undefined,
|
|
288
299
|
"aria-multiline": true,
|
|
289
300
|
role: "textbox"
|
|
290
301
|
// @ts-expect-error - contenteditable is not exist in div attributes
|
|
@@ -17,6 +17,7 @@ import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
17
17
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
18
18
|
import { EventDispatcher, createDispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
19
19
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
20
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
21
|
|
|
21
22
|
// The copy of type from prosemirror-view.
|
|
22
23
|
// Probably, we need to fix this package exports and add `NodeViewConstructor` and `MarkViewConstructor` types here.
|
|
@@ -139,6 +140,16 @@ var SSREditorView = /*#__PURE__*/function () {
|
|
|
139
140
|
value: function someProp() {
|
|
140
141
|
return undefined;
|
|
141
142
|
}
|
|
143
|
+
}, {
|
|
144
|
+
key: "serializeForClipboard",
|
|
145
|
+
value: function serializeForClipboard(slice) {
|
|
146
|
+
// No-op in SSR - clipboard operations are not supported
|
|
147
|
+
return {
|
|
148
|
+
dom: document.createElement('div'),
|
|
149
|
+
text: '',
|
|
150
|
+
slice: slice
|
|
151
|
+
};
|
|
152
|
+
}
|
|
142
153
|
}]);
|
|
143
154
|
}();
|
|
144
155
|
var SSREventDispatcher = /*#__PURE__*/function (_EventDispatcher) {
|
|
@@ -366,6 +377,8 @@ export function EditorSSRRenderer(_ref) {
|
|
|
366
377
|
"aria-describedby": divProps['aria-describedby'],
|
|
367
378
|
"data-editor-id": divProps['data-editor-id'],
|
|
368
379
|
"data-vc-ignore-if-no-layout-shift": true,
|
|
380
|
+
"data-ssr-placeholder": expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? 'editor-view' : undefined,
|
|
381
|
+
"data-ssr-placeholder-replace": expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? 'editor-view' : undefined,
|
|
369
382
|
"aria-multiline": true,
|
|
370
383
|
role: "textbox"
|
|
371
384
|
// @ts-expect-error - contenteditable is not exist in div attributes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-ssr-renderer",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "SSR Renderer based on Editor",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"atlassian": {
|
|
@@ -28,12 +28,13 @@
|
|
|
28
28
|
"atlaskit:src": "src/index.ts",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/adf-schema": "^51.5.0",
|
|
31
|
-
"@atlaskit/editor-prosemirror": "^7.
|
|
31
|
+
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
32
|
+
"@atlaskit/tmp-editor-statsig": "^21.0.0",
|
|
32
33
|
"@babel/runtime": "^7.0.0",
|
|
33
34
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
34
35
|
},
|
|
35
36
|
"peerDependencies": {
|
|
36
|
-
"@atlaskit/editor-common": "^111.
|
|
37
|
+
"@atlaskit/editor-common": "^111.11.0",
|
|
37
38
|
"react": "^18.2.0"
|
|
38
39
|
}
|
|
39
40
|
}
|