@atlaskit/editor-ssr-renderer 2.1.1 → 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,11 @@
1
1
  # @atlaskit/editor-ssr-renderer
2
2
 
3
+ ## 2.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 2.1.1
4
10
 
5
11
  ### Patch 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; }
@@ -384,6 +385,8 @@ function EditorSSRRenderer(_ref) {
384
385
  "aria-describedby": divProps['aria-describedby'],
385
386
  "data-editor-id": divProps['data-editor-id'],
386
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,
387
390
  "aria-multiline": true,
388
391
  role: "textbox"
389
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.
@@ -293,6 +294,8 @@ export function EditorSSRRenderer({
293
294
  "aria-describedby": divProps['aria-describedby'],
294
295
  "data-editor-id": divProps['data-editor-id'],
295
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,
296
299
  "aria-multiline": true,
297
300
  role: "textbox"
298
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.
@@ -376,6 +377,8 @@ export function EditorSSRRenderer(_ref) {
376
377
  "aria-describedby": divProps['aria-describedby'],
377
378
  "data-editor-id": divProps['data-editor-id'],
378
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,
379
382
  "aria-multiline": true,
380
383
  role: "textbox"
381
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.1",
3
+ "version": "2.1.2",
4
4
  "description": "SSR Renderer based on Editor",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "atlassian": {
@@ -29,6 +29,7 @@
29
29
  "dependencies": {
30
30
  "@atlaskit/adf-schema": "^51.5.0",
31
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
  },