@atlaskit/renderer 134.0.2 → 134.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 +9 -0
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/hooks/useScrollToBlock.js +10 -15
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/hooks/useScrollToBlock.js +10 -15
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/hooks/useScrollToBlock.js +10 -15
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 134.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`72f7cec91a1d4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/72f7cec91a1d4) -
|
|
8
|
+
Remove the `platform_editor_block_menu_v2_patch_4` feature flag. Block menu local-id lookups now
|
|
9
|
+
always scope the query to the provided container.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 134.0.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -73,7 +73,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
73
73
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
74
74
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
75
75
|
var packageName = "@atlaskit/renderer";
|
|
76
|
-
var packageVersion = "134.0.
|
|
76
|
+
var packageVersion = "134.0.2";
|
|
77
77
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
78
78
|
containerName: 'ak-renderer-wrapper',
|
|
79
79
|
containerType: 'inline-size'
|
|
@@ -7,7 +7,6 @@ exports.useScrollToBlock = void 0;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _browserApis = require("@atlaskit/browser-apis");
|
|
9
9
|
var _blockMenu = require("@atlaskit/editor-common/block-menu");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _useStableScroll2 = require("./useStableScroll");
|
|
12
11
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
13
12
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -121,20 +120,16 @@ var useScrollToBlock = exports.useScrollToBlock = function useScrollToBlock(cont
|
|
|
121
120
|
// Element found and all parent expands are open! Use the utility to scroll.
|
|
122
121
|
// (This will handle any final edge cases and do the actual scrolling).
|
|
123
122
|
// Capture cleanup function to cancel pending timeouts.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
});
|
|
135
|
-
} else {
|
|
136
|
-
cancelExpandAndScroll = (0, _blockMenu.expandAllParentsThenScroll)(element);
|
|
137
|
-
}
|
|
123
|
+
cancelExpandAndScroll = (0, _blockMenu.expandAllParentsThenScroll)(element, 0, function (el) {
|
|
124
|
+
if (scrollToBlock) {
|
|
125
|
+
scrollToBlock(el);
|
|
126
|
+
} else {
|
|
127
|
+
el.scrollIntoView({
|
|
128
|
+
behavior: 'smooth',
|
|
129
|
+
block: 'start'
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
});
|
|
138
133
|
return true;
|
|
139
134
|
};
|
|
140
135
|
var performScroll = function performScroll() {
|
|
@@ -59,7 +59,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
59
59
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
60
60
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
61
61
|
const packageName = "@atlaskit/renderer";
|
|
62
|
-
const packageVersion = "134.0.
|
|
62
|
+
const packageVersion = "134.0.2";
|
|
63
63
|
const setAsQueryContainerStyles = css({
|
|
64
64
|
containerName: 'ak-renderer-wrapper',
|
|
65
65
|
containerType: 'inline-size'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
3
3
|
import { DEFAULT_BLOCK_LINK_HASH_PREFIX, expandAllParentsThenScroll, expandElement, isExpandCollapsed, findNodeWithExpandParents, getLocalIdSelector } from '@atlaskit/editor-common/block-menu';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { useStableScroll } from './useStableScroll';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -107,20 +106,16 @@ export const useScrollToBlock = (containerRef, adfDoc, scrollToBlock) => {
|
|
|
107
106
|
// Element found and all parent expands are open! Use the utility to scroll.
|
|
108
107
|
// (This will handle any final edge cases and do the actual scrolling).
|
|
109
108
|
// Capture cleanup function to cancel pending timeouts.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
});
|
|
121
|
-
} else {
|
|
122
|
-
cancelExpandAndScroll = expandAllParentsThenScroll(element);
|
|
123
|
-
}
|
|
109
|
+
cancelExpandAndScroll = expandAllParentsThenScroll(element, 0, el => {
|
|
110
|
+
if (scrollToBlock) {
|
|
111
|
+
scrollToBlock(el);
|
|
112
|
+
} else {
|
|
113
|
+
el.scrollIntoView({
|
|
114
|
+
behavior: 'smooth',
|
|
115
|
+
block: 'start'
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
});
|
|
124
119
|
return true;
|
|
125
120
|
};
|
|
126
121
|
const performScroll = () => {
|
|
@@ -64,7 +64,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
64
64
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
65
65
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
66
66
|
var packageName = "@atlaskit/renderer";
|
|
67
|
-
var packageVersion = "134.0.
|
|
67
|
+
var packageVersion = "134.0.2";
|
|
68
68
|
var setAsQueryContainerStyles = css({
|
|
69
69
|
containerName: 'ak-renderer-wrapper',
|
|
70
70
|
containerType: 'inline-size'
|
|
@@ -4,7 +4,6 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
4
4
|
import { useEffect } from 'react';
|
|
5
5
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
6
6
|
import { DEFAULT_BLOCK_LINK_HASH_PREFIX, expandAllParentsThenScroll, expandElement, isExpandCollapsed, findNodeWithExpandParents, getLocalIdSelector } from '@atlaskit/editor-common/block-menu';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { useStableScroll } from './useStableScroll';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -116,20 +115,16 @@ export var useScrollToBlock = function useScrollToBlock(containerRef, adfDoc, sc
|
|
|
116
115
|
// Element found and all parent expands are open! Use the utility to scroll.
|
|
117
116
|
// (This will handle any final edge cases and do the actual scrolling).
|
|
118
117
|
// Capture cleanup function to cancel pending timeouts.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
});
|
|
130
|
-
} else {
|
|
131
|
-
cancelExpandAndScroll = expandAllParentsThenScroll(element);
|
|
132
|
-
}
|
|
118
|
+
cancelExpandAndScroll = expandAllParentsThenScroll(element, 0, function (el) {
|
|
119
|
+
if (scrollToBlock) {
|
|
120
|
+
scrollToBlock(el);
|
|
121
|
+
} else {
|
|
122
|
+
el.scrollIntoView({
|
|
123
|
+
behavior: 'smooth',
|
|
124
|
+
block: 'start'
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
133
128
|
return true;
|
|
134
129
|
};
|
|
135
130
|
var performScroll = function performScroll() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "134.0.
|
|
3
|
+
"version": "134.0.3",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/status": "^5.8.0",
|
|
70
70
|
"@atlaskit/task-decision": "^21.8.0",
|
|
71
71
|
"@atlaskit/theme": "^26.1.0",
|
|
72
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
72
|
+
"@atlaskit/tmp-editor-statsig": "^139.0.0",
|
|
73
73
|
"@atlaskit/tokens": "^16.3.0",
|
|
74
74
|
"@atlaskit/tooltip": "^24.0.0",
|
|
75
75
|
"@atlaskit/visually-hidden": "^4.2.0",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@af/integration-testing": "workspace:^",
|
|
96
96
|
"@af/visual-regression": "workspace:^",
|
|
97
97
|
"@atlaskit/analytics-gas-types": "^6.0.0",
|
|
98
|
-
"@atlaskit/checkbox": "^
|
|
98
|
+
"@atlaskit/checkbox": "^19.0.0",
|
|
99
99
|
"@atlaskit/editor-card-provider": "^7.1.0",
|
|
100
100
|
"@atlaskit/link-provider": "^5.3.0",
|
|
101
101
|
"@atlaskit/link-test-helpers": "^11.0.0",
|
|
@@ -245,9 +245,6 @@
|
|
|
245
245
|
"platform_editor_video_caption_commit": {
|
|
246
246
|
"type": "boolean"
|
|
247
247
|
},
|
|
248
|
-
"platform_editor_block_menu_v2_patch_4": {
|
|
249
|
-
"type": "boolean"
|
|
250
|
-
},
|
|
251
248
|
"platform-dst-lozenge-tag-badge-visual-uplifts": {
|
|
252
249
|
"type": "boolean"
|
|
253
250
|
},
|