@atlaskit/renderer 144.1.0 → 144.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,21 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 144.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 144.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`68ede3b9de2a6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/68ede3b9de2a6) -
14
+ Clean up experiment `platform_editor_defer_collapsed_expand_body`. A collapsed expand defers its
15
+ body and shows the body's text via `hidden="until-found"` for all readers now, and `nestedExpand`
16
+ always serializes through the expand props builder.
17
+ - Updated dependencies
18
+
3
19
  ## 144.1.0
4
20
 
5
21
  ### Minor Changes
@@ -17,7 +17,6 @@ var _validator = require("@atlaskit/editor-common/validator");
17
17
  var _model = require("@atlaskit/editor-prosemirror/model");
18
18
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
19
19
  var _expVal = require("@atlaskit/platform-feature-experiments/exp-val");
20
- var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
21
20
  var _fg = require("@atlaskit/platform-feature-flags/fg");
22
21
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
22
  var _expandBody = require("../ui/utils/expand-body");
@@ -279,12 +278,8 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
279
278
  case 'inlineCard':
280
279
  return this.getInlineCardProps(node, path);
281
280
  case 'expand':
282
- return this.getExpandProps(node, path);
283
281
  case 'nestedExpand':
284
- if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_defer_collapsed_expand_body')) {
285
- return this.getExpandProps(node, path);
286
- }
287
- return this.getProps(node, path);
282
+ return this.getExpandProps(node, path);
288
283
  case 'unsupportedBlock':
289
284
  case 'unsupportedInline':
290
285
  return this.getUnsupportedContentProps(node);
@@ -17,7 +17,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
17
17
  var _ui = require("@atlaskit/editor-common/ui");
18
18
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
19
19
  var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/core/chevron-right"));
20
- var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
21
20
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
22
21
  var _events = require("../analytics/events");
23
22
  var _activeHeaderIdProvider = require("./active-header-id-provider");
@@ -372,11 +371,10 @@ function Expand(_ref) {
372
371
  // when:
373
372
  // - the expand is open, or has been opened before, so the reader wants to see the content;
374
373
  // - no node was given, so this expand never opted into lazy loading;
375
- // - the experiment is off;
376
374
  // - the browser has no hidden="until-found", so the text would not be findable and standing it in
377
375
  // would gain nothing. While we still do not know, we assume the browser has it — assuming the
378
376
  // opposite would render the whole body on the first paint and lose the saving entirely.
379
- var revealed = expanded || hasBeenExpanded || !node || supportsHiddenUntilFound === false || !(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_defer_collapsed_expand_body');
377
+ var revealed = expanded || hasBeenExpanded || !node || supportsHiddenUntilFound === false;
380
378
  var expandBody = (0, _react.useMemo)(function () {
381
379
  return {
382
380
  revealed: revealed,
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
71
71
  var TABLE_INFO_TIMEOUT = 10000;
72
72
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
73
73
  var packageName = "@atlaskit/renderer";
74
- var packageVersion = "144.0.3";
74
+ var packageVersion = "144.1.1";
75
75
  var setAsQueryContainerStyles = (0, _react2.css)({
76
76
  containerName: 'ak-renderer-wrapper',
77
77
  containerType: 'inline-size'
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.withExpandBodyBlock = exports.useExpandBody = exports.mergeExpandBodyText = exports.ExpandBodyTable = exports.ExpandBodyProvider = exports.ExpandBodyBlock = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
- var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
10
9
  var _expandSearchText = require("./expand-search-text");
11
10
  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); }
12
11
  var ExpandBodyContext = /*#__PURE__*/(0, _react.createContext)(null);
@@ -51,9 +50,6 @@ var withExpandBodyBlock = exports.withExpandBodyBlock = function withExpandBodyB
51
50
  if (!parent || !(0, _expandSearchText.isExpandNode)(parent)) {
52
51
  return serialized;
53
52
  }
54
- if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_defer_collapsed_expand_body')) {
55
- return serialized;
56
- }
57
53
 
58
54
  // `serialized` is only null for a node the renderer has no component for, which a table is not.
59
55
  // Such a table falls through to the paths below, which do not reach into it.
@@ -6,7 +6,6 @@ import { getMarksByOrder, isSameMark } from '@atlaskit/editor-common/validator';
6
6
  import { MarkType } from '@atlaskit/editor-prosemirror/model';
7
7
  import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
8
8
  import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
9
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
10
9
  import { fg } from '@atlaskit/platform-feature-flags/fg';
11
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
12
11
  import { mergeExpandBodyText, withExpandBodyBlock } from '../ui/utils/expand-body';
@@ -262,12 +261,8 @@ export default class ReactSerializer {
262
261
  case 'inlineCard':
263
262
  return this.getInlineCardProps(node, path);
264
263
  case 'expand':
265
- return this.getExpandProps(node, path);
266
264
  case 'nestedExpand':
267
- if (isExperimentEnabled('platform_editor_defer_collapsed_expand_body')) {
268
- return this.getExpandProps(node, path);
269
- }
270
- return this.getProps(node, path);
265
+ return this.getExpandProps(node, path);
271
266
  case 'unsupportedBlock':
272
267
  case 'unsupportedInline':
273
268
  return this.getUnsupportedContentProps(node);
@@ -15,7 +15,6 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
15
15
  import { ExpandIconWrapper, ExpandLayoutWrapperWithRef, expandMessages, WidthProvider } from '@atlaskit/editor-common/ui';
16
16
  import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset } from '@atlaskit/editor-shared-styles';
17
17
  import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
18
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
19
18
  import Tooltip from '@atlaskit/tooltip/Tooltip';
20
19
  import { MODE, PLATFORM } from '../analytics/events';
21
20
  import { ActiveHeaderIdConsumer } from './active-header-id-provider';
@@ -350,11 +349,10 @@ function Expand({
350
349
  // when:
351
350
  // - the expand is open, or has been opened before, so the reader wants to see the content;
352
351
  // - no node was given, so this expand never opted into lazy loading;
353
- // - the experiment is off;
354
352
  // - the browser has no hidden="until-found", so the text would not be findable and standing it in
355
353
  // would gain nothing. While we still do not know, we assume the browser has it — assuming the
356
354
  // opposite would render the whole body on the first paint and lose the saving entirely.
357
- const revealed = expanded || hasBeenExpanded || !node || supportsHiddenUntilFound === false || !isExperimentEnabled('platform_editor_defer_collapsed_expand_body');
355
+ const revealed = expanded || hasBeenExpanded || !node || supportsHiddenUntilFound === false;
358
356
  const expandBody = useMemo(() => ({
359
357
  revealed,
360
358
  openWithAncestors,
@@ -56,7 +56,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  const TABLE_INFO_TIMEOUT = 10000;
57
57
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
58
58
  const packageName = "@atlaskit/renderer";
59
- const packageVersion = "144.0.3";
59
+ const packageVersion = "144.1.1";
60
60
  const setAsQueryContainerStyles = css({
61
61
  containerName: 'ak-renderer-wrapper',
62
62
  containerType: 'inline-size'
@@ -1,5 +1,4 @@
1
1
  import React, { createContext, isValidElement, useContext } from 'react';
2
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
3
2
  import { BLOCK_SEPARATOR, getBlockSearchText, getTableStandInParts, holdsRevealableContent, isExpandNode } from './expand-search-text';
4
3
  const ExpandBodyContext = /*#__PURE__*/createContext(null);
5
4
  export const ExpandBodyProvider = ExpandBodyContext.Provider;
@@ -42,9 +41,6 @@ export const withExpandBodyBlock = (node, ancestors, index, serialized) => {
42
41
  if (!parent || !isExpandNode(parent)) {
43
42
  return serialized;
44
43
  }
45
- if (!isExperimentEnabled('platform_editor_defer_collapsed_expand_body')) {
46
- return serialized;
47
- }
48
44
 
49
45
  // `serialized` is only null for a node the renderer has no component for, which a table is not.
50
46
  // Such a table falls through to the paths below, which do not reach into it.
@@ -13,7 +13,6 @@ import { getMarksByOrder, isSameMark } from '@atlaskit/editor-common/validator';
13
13
  import { MarkType } from '@atlaskit/editor-prosemirror/model';
14
14
  import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
15
15
  import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
16
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
17
16
  import { fg } from '@atlaskit/platform-feature-flags/fg';
18
17
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
19
18
  import { mergeExpandBodyText, withExpandBodyBlock } from '../ui/utils/expand-body';
@@ -272,12 +271,8 @@ var ReactSerializer = /*#__PURE__*/function () {
272
271
  case 'inlineCard':
273
272
  return this.getInlineCardProps(node, path);
274
273
  case 'expand':
275
- return this.getExpandProps(node, path);
276
274
  case 'nestedExpand':
277
- if (isExperimentEnabled('platform_editor_defer_collapsed_expand_body')) {
278
- return this.getExpandProps(node, path);
279
- }
280
- return this.getProps(node, path);
275
+ return this.getExpandProps(node, path);
281
276
  case 'unsupportedBlock':
282
277
  case 'unsupportedInline':
283
278
  return this.getUnsupportedContentProps(node);
@@ -16,7 +16,6 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
16
16
  import { ExpandIconWrapper, ExpandLayoutWrapperWithRef, expandMessages, WidthProvider } from '@atlaskit/editor-common/ui';
17
17
  import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset } from '@atlaskit/editor-shared-styles';
18
18
  import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
19
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
20
19
  import Tooltip from '@atlaskit/tooltip/Tooltip';
21
20
  import { MODE, PLATFORM } from '../analytics/events';
22
21
  import { ActiveHeaderIdConsumer } from './active-header-id-provider';
@@ -363,11 +362,10 @@ function Expand(_ref) {
363
362
  // when:
364
363
  // - the expand is open, or has been opened before, so the reader wants to see the content;
365
364
  // - no node was given, so this expand never opted into lazy loading;
366
- // - the experiment is off;
367
365
  // - the browser has no hidden="until-found", so the text would not be findable and standing it in
368
366
  // would gain nothing. While we still do not know, we assume the browser has it — assuming the
369
367
  // opposite would render the whole body on the first paint and lose the saving entirely.
370
- var revealed = expanded || hasBeenExpanded || !node || supportsHiddenUntilFound === false || !isExperimentEnabled('platform_editor_defer_collapsed_expand_body');
368
+ var revealed = expanded || hasBeenExpanded || !node || supportsHiddenUntilFound === false;
371
369
  var expandBody = useMemo(function () {
372
370
  return {
373
371
  revealed: revealed,
@@ -61,7 +61,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
61
61
  var TABLE_INFO_TIMEOUT = 10000;
62
62
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
63
63
  var packageName = "@atlaskit/renderer";
64
- var packageVersion = "144.0.3";
64
+ var packageVersion = "144.1.1";
65
65
  var setAsQueryContainerStyles = css({
66
66
  containerName: 'ak-renderer-wrapper',
67
67
  containerType: 'inline-size'
@@ -1,5 +1,4 @@
1
1
  import React, { createContext, isValidElement, useContext } from 'react';
2
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
3
2
  import { BLOCK_SEPARATOR, getBlockSearchText, getTableStandInParts, holdsRevealableContent, isExpandNode } from './expand-search-text';
4
3
  var ExpandBodyContext = /*#__PURE__*/createContext(null);
5
4
  export var ExpandBodyProvider = ExpandBodyContext.Provider;
@@ -43,9 +42,6 @@ export var withExpandBodyBlock = function withExpandBodyBlock(node, ancestors, i
43
42
  if (!parent || !isExpandNode(parent)) {
44
43
  return serialized;
45
44
  }
46
- if (!isExperimentEnabled('platform_editor_defer_collapsed_expand_body')) {
47
- return serialized;
48
- }
49
45
 
50
46
  // `serialized` is only null for a node the renderer has no component for, which a table is not.
51
47
  // Such a table falls through to the paths below, which do not reach into it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "144.1.0",
3
+ "version": "144.1.2",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -69,11 +69,11 @@
69
69
  "@atlaskit/pragmatic-drag-and-drop": "^4.0.0",
70
70
  "@atlaskit/react-compiler-gating": "^0.2.0",
71
71
  "@atlaskit/react-ufo": "^8.0.0",
72
- "@atlaskit/smart-card": "^46.0.0",
72
+ "@atlaskit/smart-card": "^46.1.0",
73
73
  "@atlaskit/status": "^5.12.0",
74
- "@atlaskit/task-decision": "^21.10.0",
74
+ "@atlaskit/task-decision": "^21.11.0",
75
75
  "@atlaskit/theme": "^28.2.0",
76
- "@atlaskit/tmp-editor-statsig": "^208.0.0",
76
+ "@atlaskit/tmp-editor-statsig": "^209.0.0",
77
77
  "@atlaskit/tokens": "^20.0.0",
78
78
  "@atlaskit/tooltip": "^24.3.0",
79
79
  "@atlaskit/visually-hidden": "^4.4.0",
@@ -88,7 +88,7 @@
88
88
  "uuid": "^11.1.1"
89
89
  },
90
90
  "peerDependencies": {
91
- "@atlaskit/editor-common": "^125.2.0",
91
+ "@atlaskit/editor-common": "^125.4.0",
92
92
  "@atlaskit/link-provider": "^6.0.0",
93
93
  "@atlaskit/media-core": "^39.0.0",
94
94
  "react": "^18.2.0 || ^19.2.0",
package/tsconfig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "./tsconfig.dev.json",
2
+ "extends": "./tsconfig.app.json",
3
3
  "compilerOptions": {
4
4
  "disableReferencedProjectLoad": true,
5
5
  "disableSolutionSearching": true