@atlaskit/renderer 148.0.4 → 148.1.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 +15 -0
- package/dist/cjs/entry-points/expand-body.js +12 -0
- package/dist/cjs/ui/Expand.js +10 -0
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/entry-points/expand-body.js +3 -0
- package/dist/es2019/ui/Expand.js +10 -0
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/entry-points/expand-body.js +3 -0
- package/dist/esm/ui/Expand.js +10 -0
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/entry-points/expand-body.d.ts +2 -0
- package/dist/types/ui/utils/expand-body.d.ts +5 -3
- package/expand-body/package.json +10 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 148.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`f115a893c63dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f115a893c63dd) -
|
|
8
|
+
Exports `ExpandBodyProvider` (`@atlaskit/renderer/expand-body`), so a product can provide the
|
|
9
|
+
outermost expand body itself. Expands under it share one `revealedByFind` set, so they come back
|
|
10
|
+
as browser find left them when the product remounts them, such as when it replaces a lightly
|
|
11
|
+
rendered subtree with its full render. Under `cc_light_mode_table_virtualization`, the set also
|
|
12
|
+
records expands the reader opens and closes, so they come back as the reader left them too.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 148.0.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ExpandBodyProvider", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _expandBody.ExpandBodyProvider;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _expandBody = require("../ui/utils/expand-body");
|
package/dist/cjs/ui/Expand.js
CHANGED
|
@@ -17,6 +17,7 @@ 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");
|
|
20
21
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
21
22
|
var _events = require("../analytics/events");
|
|
22
23
|
var _activeHeaderIdProvider = require("./active-header-id-provider");
|
|
@@ -403,10 +404,19 @@ function Expand(_ref) {
|
|
|
403
404
|
e.preventDefault();
|
|
404
405
|
e.stopPropagation();
|
|
405
406
|
fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent);
|
|
407
|
+
// Recorded so a product remounting this expand under its own body gets it back as the
|
|
408
|
+
// reader left it.
|
|
409
|
+
var recordsToggle = node !== undefined && (0, _isExperimentEnabled.isExperimentEnabled)('cc_light_mode_table_virtualization');
|
|
406
410
|
if (expanded) {
|
|
407
411
|
setExpanded(false);
|
|
412
|
+
if (recordsToggle) {
|
|
413
|
+
revealedByFind.delete(node);
|
|
414
|
+
}
|
|
408
415
|
} else {
|
|
409
416
|
openBody();
|
|
417
|
+
if (recordsToggle) {
|
|
418
|
+
revealedByFind.add(node);
|
|
419
|
+
}
|
|
410
420
|
}
|
|
411
421
|
e.persist();
|
|
412
422
|
// @ts-ignore detail doesn't exist on type
|
|
@@ -72,7 +72,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
72
72
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
73
73
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
74
74
|
var packageName = "@atlaskit/renderer";
|
|
75
|
-
var packageVersion = "148.0.
|
|
75
|
+
var packageVersion = "148.0.4";
|
|
76
76
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
77
77
|
containerName: 'ak-renderer-wrapper',
|
|
78
78
|
containerType: 'inline-size'
|
package/dist/es2019/ui/Expand.js
CHANGED
|
@@ -15,6 +15,7 @@ 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';
|
|
18
19
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
19
20
|
import { MODE, PLATFORM } from '../analytics/events';
|
|
20
21
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
@@ -379,10 +380,19 @@ function Expand({
|
|
|
379
380
|
e.preventDefault();
|
|
380
381
|
e.stopPropagation();
|
|
381
382
|
fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent);
|
|
383
|
+
// Recorded so a product remounting this expand under its own body gets it back as the
|
|
384
|
+
// reader left it.
|
|
385
|
+
const recordsToggle = node !== undefined && isExperimentEnabled('cc_light_mode_table_virtualization');
|
|
382
386
|
if (expanded) {
|
|
383
387
|
setExpanded(false);
|
|
388
|
+
if (recordsToggle) {
|
|
389
|
+
revealedByFind.delete(node);
|
|
390
|
+
}
|
|
384
391
|
} else {
|
|
385
392
|
openBody();
|
|
393
|
+
if (recordsToggle) {
|
|
394
|
+
revealedByFind.add(node);
|
|
395
|
+
}
|
|
386
396
|
}
|
|
387
397
|
e.persist();
|
|
388
398
|
// @ts-ignore detail doesn't exist on type
|
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "148.0.
|
|
60
|
+
const packageVersion = "148.0.4";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -16,6 +16,7 @@ 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';
|
|
19
20
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
20
21
|
import { MODE, PLATFORM } from '../analytics/events';
|
|
21
22
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
@@ -394,10 +395,19 @@ function Expand(_ref) {
|
|
|
394
395
|
e.preventDefault();
|
|
395
396
|
e.stopPropagation();
|
|
396
397
|
fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent);
|
|
398
|
+
// Recorded so a product remounting this expand under its own body gets it back as the
|
|
399
|
+
// reader left it.
|
|
400
|
+
var recordsToggle = node !== undefined && isExperimentEnabled('cc_light_mode_table_virtualization');
|
|
397
401
|
if (expanded) {
|
|
398
402
|
setExpanded(false);
|
|
403
|
+
if (recordsToggle) {
|
|
404
|
+
revealedByFind.delete(node);
|
|
405
|
+
}
|
|
399
406
|
} else {
|
|
400
407
|
openBody();
|
|
408
|
+
if (recordsToggle) {
|
|
409
|
+
revealedByFind.add(node);
|
|
410
|
+
}
|
|
401
411
|
}
|
|
402
412
|
e.persist();
|
|
403
413
|
// @ts-ignore detail doesn't exist on type
|
|
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
62
62
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
63
63
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "148.0.
|
|
65
|
+
var packageVersion = "148.0.4";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Provider, ReactNode } from 'react';
|
|
2
2
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
type ExpandBody = {
|
|
3
|
+
export type ExpandBody = {
|
|
4
4
|
/**
|
|
5
5
|
* Opens this expand, then asks the expand above it to do the same.
|
|
6
6
|
*
|
|
@@ -20,11 +20,13 @@ type ExpandBody = {
|
|
|
20
20
|
*/
|
|
21
21
|
revealed: boolean;
|
|
22
22
|
/**
|
|
23
|
-
* The expands browser find has opened. One set is shared by a whole chain of
|
|
23
|
+
* The expands browser find or the reader has opened. One set is shared by a whole chain of
|
|
24
|
+
* expands, and by every expand under a body a product provides itself.
|
|
24
25
|
*
|
|
25
26
|
* A table standing in for itself does swap out what it renders, and a nested expand in one of its
|
|
26
27
|
* rows is rebuilt when it does. This is how that expand knows to come back open rather than
|
|
27
|
-
* closed over the match the reader was just taken to.
|
|
28
|
+
* closed over the match the reader was just taken to. A product that remounts what is under its
|
|
29
|
+
* own body gets its expands back the same way.
|
|
28
30
|
*/
|
|
29
31
|
revealedByFind: WeakSet<PMNode>;
|
|
30
32
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/renderer/expand-body",
|
|
3
|
+
"main": "../dist/cjs/entry-points/expand-body.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/expand-body.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/expand-body.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-points/expand-body.d.ts"
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "148.0
|
|
3
|
+
"version": "148.1.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@atlaskit/status": "^5.13.0",
|
|
74
74
|
"@atlaskit/task-decision": "^21.12.0",
|
|
75
75
|
"@atlaskit/theme": "^28.2.0",
|
|
76
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
76
|
+
"@atlaskit/tmp-editor-statsig": "^227.0.0",
|
|
77
77
|
"@atlaskit/tokens": "^20.3.0",
|
|
78
78
|
"@atlaskit/tooltip": "^24.4.0",
|
|
79
79
|
"@atlaskit/visually-hidden": "^4.4.0",
|