@atlaskit/editor-common 119.14.0 → 119.15.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 +20 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/vanilla-tooltip/index.js +13 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/vanilla-tooltip/index.js +13 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/vanilla-tooltip/index.js +13 -1
- package/dist/types/vanilla-tooltip/index.d.ts +13 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 119.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5ce0f8e29f818`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5ce0f8e29f818) -
|
|
8
|
+
EDITOR-8535
|
|
9
|
+
|
|
10
|
+
Added `UnsupportedBlockNodeView` to `@atlaskit/editor-plugin-unsupported-content`, switching the
|
|
11
|
+
`unsupportedBlock` and `confluenceUnsupportedBlock` node views to vanilla DOM under the
|
|
12
|
+
`platform_editor_vanilla_node_views_phase1` experiment. Also added vanilla unsupported block CSS
|
|
13
|
+
to `@atlaskit/editor-core`'s `EditorContentContainer`.
|
|
14
|
+
|
|
15
|
+
`VanillaTooltip` accepts an optional `onShow` callback, called once the tooltip has become visible
|
|
16
|
+
after its delay has elapsed. It is not called when the pointer leaves beforehand, matching the
|
|
17
|
+
`onShow` semantics of `@atlaskit/tooltip`.
|
|
18
|
+
|
|
19
|
+
`VanillaTooltip.destroy()` now cancels any pending show/hide timeout. Previously a pending timeout
|
|
20
|
+
could run after destruction, writing styles to detached DOM and invoking callbacks for an owner
|
|
21
|
+
that no longer exists.
|
|
22
|
+
|
|
3
23
|
## 119.14.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
28
28
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
29
29
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
30
30
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
31
|
-
var packageVersion = "119.
|
|
31
|
+
var packageVersion = "119.14.0";
|
|
32
32
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
33
33
|
// Remove URL as it has UGC
|
|
34
34
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "119.
|
|
27
|
+
var packageVersion = "119.14.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -58,12 +58,20 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
58
58
|
* where ancestor CSS selectors cannot reach it.
|
|
59
59
|
*/
|
|
60
60
|
styles = arguments.length > 5 ? arguments[5] : undefined;
|
|
61
|
+
var
|
|
62
|
+
/**
|
|
63
|
+
* Called when the tooltip has become visible, after `timeout` has elapsed.
|
|
64
|
+
* Not called when the pointer leaves before the tooltip is shown, matching
|
|
65
|
+
* the `onShow` semantics of "@atlaskit/tooltip".
|
|
66
|
+
*/
|
|
67
|
+
onShow = arguments.length > 6 ? arguments[6] : undefined;
|
|
61
68
|
(0, _classCallCheck2.default)(this, VanillaTooltip);
|
|
62
69
|
(0, _defineProperty2.default)(this, "listeners", []);
|
|
63
70
|
(0, _defineProperty2.default)(this, "shouldHidePopover", false);
|
|
64
71
|
(0, _defineProperty2.default)(this, "isDisplayed", false);
|
|
65
72
|
this.button = button;
|
|
66
73
|
this.timeout = timeout;
|
|
74
|
+
this.onShow = onShow;
|
|
67
75
|
var tooltip = document.createElement('span');
|
|
68
76
|
tooltip.role = 'tooltip';
|
|
69
77
|
tooltip.popover = 'hint';
|
|
@@ -126,6 +134,9 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
126
134
|
key: "destroy",
|
|
127
135
|
value: function destroy() {
|
|
128
136
|
var _this$popperInstance;
|
|
137
|
+
// Cancels any pending show/hide, which would otherwise run against detached DOM and
|
|
138
|
+
// invoke `onShow` after the owner has gone away.
|
|
139
|
+
clearTimeout(this.currentTimeoutId);
|
|
129
140
|
(_this$popperInstance = this.popperInstance) === null || _this$popperInstance === void 0 || _this$popperInstance.destroy();
|
|
130
141
|
this.listeners.forEach(function (listener) {
|
|
131
142
|
listener();
|
|
@@ -180,7 +191,7 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
180
191
|
|
|
181
192
|
// Enable the event listeners
|
|
182
193
|
this.currentTimeoutId = setTimeout(function () {
|
|
183
|
-
var _this3$popperInstance;
|
|
194
|
+
var _this3$popperInstance, _this3$onShow;
|
|
184
195
|
_this3.tooltip.style.opacity = '1';
|
|
185
196
|
_this3.tooltip.style.visibility = 'visible';
|
|
186
197
|
(_this3$popperInstance = _this3.popperInstance) === null || _this3$popperInstance === void 0 || _this3$popperInstance.setOptions(function (options) {
|
|
@@ -192,6 +203,7 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
192
203
|
});
|
|
193
204
|
});
|
|
194
205
|
_this3.isDisplayed = true;
|
|
206
|
+
(_this3$onShow = _this3.onShow) === null || _this3$onShow === void 0 || _this3$onShow.call(_this3);
|
|
195
207
|
}, this.timeout);
|
|
196
208
|
}
|
|
197
209
|
}]);
|
|
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
14
14
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
15
15
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
16
16
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
17
|
-
const packageVersion = "119.
|
|
17
|
+
const packageVersion = "119.14.0";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "119.
|
|
17
|
+
const packageVersion = "119.14.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -43,12 +43,19 @@ export class VanillaTooltip {
|
|
|
43
43
|
* Useful when the tooltip is rendered in the browser's top layer (via Popover API),
|
|
44
44
|
* where ancestor CSS selectors cannot reach it.
|
|
45
45
|
*/
|
|
46
|
-
styles
|
|
46
|
+
styles,
|
|
47
|
+
/**
|
|
48
|
+
* Called when the tooltip has become visible, after `timeout` has elapsed.
|
|
49
|
+
* Not called when the pointer leaves before the tooltip is shown, matching
|
|
50
|
+
* the `onShow` semantics of "@atlaskit/tooltip".
|
|
51
|
+
*/
|
|
52
|
+
onShow) {
|
|
47
53
|
_defineProperty(this, "listeners", []);
|
|
48
54
|
_defineProperty(this, "shouldHidePopover", false);
|
|
49
55
|
_defineProperty(this, "isDisplayed", false);
|
|
50
56
|
this.button = button;
|
|
51
57
|
this.timeout = timeout;
|
|
58
|
+
this.onShow = onShow;
|
|
52
59
|
const tooltip = document.createElement('span');
|
|
53
60
|
tooltip.role = 'tooltip';
|
|
54
61
|
tooltip.popover = 'hint';
|
|
@@ -103,6 +110,9 @@ export class VanillaTooltip {
|
|
|
103
110
|
}
|
|
104
111
|
destroy() {
|
|
105
112
|
var _this$popperInstance;
|
|
113
|
+
// Cancels any pending show/hide, which would otherwise run against detached DOM and
|
|
114
|
+
// invoke `onShow` after the owner has gone away.
|
|
115
|
+
clearTimeout(this.currentTimeoutId);
|
|
106
116
|
(_this$popperInstance = this.popperInstance) === null || _this$popperInstance === void 0 ? void 0 : _this$popperInstance.destroy();
|
|
107
117
|
this.listeners.forEach(listener => {
|
|
108
118
|
listener();
|
|
@@ -149,7 +159,7 @@ export class VanillaTooltip {
|
|
|
149
159
|
|
|
150
160
|
// Enable the event listeners
|
|
151
161
|
this.currentTimeoutId = setTimeout(() => {
|
|
152
|
-
var _this$popperInstance3;
|
|
162
|
+
var _this$popperInstance3, _this$onShow;
|
|
153
163
|
this.tooltip.style.opacity = '1';
|
|
154
164
|
this.tooltip.style.visibility = 'visible';
|
|
155
165
|
(_this$popperInstance3 = this.popperInstance) === null || _this$popperInstance3 === void 0 ? void 0 : _this$popperInstance3.setOptions(options => ({
|
|
@@ -160,6 +170,7 @@ export class VanillaTooltip {
|
|
|
160
170
|
}]
|
|
161
171
|
}));
|
|
162
172
|
this.isDisplayed = true;
|
|
173
|
+
(_this$onShow = this.onShow) === null || _this$onShow === void 0 ? void 0 : _this$onShow.call(this);
|
|
163
174
|
}, this.timeout);
|
|
164
175
|
}
|
|
165
176
|
}
|
|
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
20
20
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
21
21
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
22
22
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
23
|
-
var packageVersion = "119.
|
|
23
|
+
var packageVersion = "119.14.0";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "119.
|
|
24
|
+
var packageVersion = "119.14.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -51,12 +51,20 @@ export var VanillaTooltip = /*#__PURE__*/function () {
|
|
|
51
51
|
* where ancestor CSS selectors cannot reach it.
|
|
52
52
|
*/
|
|
53
53
|
styles = arguments.length > 5 ? arguments[5] : undefined;
|
|
54
|
+
var
|
|
55
|
+
/**
|
|
56
|
+
* Called when the tooltip has become visible, after `timeout` has elapsed.
|
|
57
|
+
* Not called when the pointer leaves before the tooltip is shown, matching
|
|
58
|
+
* the `onShow` semantics of "@atlaskit/tooltip".
|
|
59
|
+
*/
|
|
60
|
+
onShow = arguments.length > 6 ? arguments[6] : undefined;
|
|
54
61
|
_classCallCheck(this, VanillaTooltip);
|
|
55
62
|
_defineProperty(this, "listeners", []);
|
|
56
63
|
_defineProperty(this, "shouldHidePopover", false);
|
|
57
64
|
_defineProperty(this, "isDisplayed", false);
|
|
58
65
|
this.button = button;
|
|
59
66
|
this.timeout = timeout;
|
|
67
|
+
this.onShow = onShow;
|
|
60
68
|
var tooltip = document.createElement('span');
|
|
61
69
|
tooltip.role = 'tooltip';
|
|
62
70
|
tooltip.popover = 'hint';
|
|
@@ -119,6 +127,9 @@ export var VanillaTooltip = /*#__PURE__*/function () {
|
|
|
119
127
|
key: "destroy",
|
|
120
128
|
value: function destroy() {
|
|
121
129
|
var _this$popperInstance;
|
|
130
|
+
// Cancels any pending show/hide, which would otherwise run against detached DOM and
|
|
131
|
+
// invoke `onShow` after the owner has gone away.
|
|
132
|
+
clearTimeout(this.currentTimeoutId);
|
|
122
133
|
(_this$popperInstance = this.popperInstance) === null || _this$popperInstance === void 0 || _this$popperInstance.destroy();
|
|
123
134
|
this.listeners.forEach(function (listener) {
|
|
124
135
|
listener();
|
|
@@ -173,7 +184,7 @@ export var VanillaTooltip = /*#__PURE__*/function () {
|
|
|
173
184
|
|
|
174
185
|
// Enable the event listeners
|
|
175
186
|
this.currentTimeoutId = setTimeout(function () {
|
|
176
|
-
var _this3$popperInstance;
|
|
187
|
+
var _this3$popperInstance, _this3$onShow;
|
|
177
188
|
_this3.tooltip.style.opacity = '1';
|
|
178
189
|
_this3.tooltip.style.visibility = 'visible';
|
|
179
190
|
(_this3$popperInstance = _this3.popperInstance) === null || _this3$popperInstance === void 0 || _this3$popperInstance.setOptions(function (options) {
|
|
@@ -185,6 +196,7 @@ export var VanillaTooltip = /*#__PURE__*/function () {
|
|
|
185
196
|
});
|
|
186
197
|
});
|
|
187
198
|
_this3.isDisplayed = true;
|
|
199
|
+
(_this3$onShow = _this3.onShow) === null || _this3$onShow === void 0 || _this3$onShow.call(_this3);
|
|
188
200
|
}, this.timeout);
|
|
189
201
|
}
|
|
190
202
|
}]);
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
export declare class VanillaTooltip {
|
|
8
8
|
private button;
|
|
9
9
|
private timeout;
|
|
10
|
+
/**
|
|
11
|
+
* Called when the tooltip has become visible, after `timeout` has elapsed.
|
|
12
|
+
* Not called when the pointer leaves before the tooltip is shown, matching
|
|
13
|
+
* the `onShow` semantics of "@atlaskit/tooltip".
|
|
14
|
+
*/
|
|
15
|
+
private onShow?;
|
|
10
16
|
private popperInstance;
|
|
11
17
|
private listeners;
|
|
12
18
|
private currentTimeoutId;
|
|
@@ -27,7 +33,13 @@ export declare class VanillaTooltip {
|
|
|
27
33
|
* Useful when the tooltip is rendered in the browser's top layer (via Popover API),
|
|
28
34
|
* where ancestor CSS selectors cannot reach it.
|
|
29
35
|
*/
|
|
30
|
-
styles?: Record<string, string
|
|
36
|
+
styles?: Record<string, string>,
|
|
37
|
+
/**
|
|
38
|
+
* Called when the tooltip has become visible, after `timeout` has elapsed.
|
|
39
|
+
* Not called when the pointer leaves before the tooltip is shown, matching
|
|
40
|
+
* the `onShow` semantics of "@atlaskit/tooltip".
|
|
41
|
+
*/
|
|
42
|
+
onShow?: (() => void) | undefined);
|
|
31
43
|
private createPopperInstance;
|
|
32
44
|
destroy(): void;
|
|
33
45
|
private hide;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "119.
|
|
3
|
+
"version": "119.15.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@atlaskit/media-common": "^14.5.0",
|
|
63
63
|
"@atlaskit/media-file-preview": "^1.2.0",
|
|
64
64
|
"@atlaskit/media-picker": "^72.3.0",
|
|
65
|
-
"@atlaskit/media-ui": "^30.
|
|
65
|
+
"@atlaskit/media-ui": "^30.13.0",
|
|
66
66
|
"@atlaskit/media-viewer": "^54.6.0",
|
|
67
67
|
"@atlaskit/mention": "^27.18.0",
|
|
68
68
|
"@atlaskit/menu": "^10.1.0",
|