@atlaskit/editor-common 105.11.0 → 105.11.1
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 +10 -0
- package/dist/cjs/annotation/index.js +6 -0
- package/dist/cjs/doc-utils/editor-use-only.js +3 -14
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/annotation/index.js +6 -0
- package/dist/es2019/doc-utils/editor-use-only.js +3 -14
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/annotation/index.js +6 -0
- package/dist/esm/doc-utils/editor-use-only.js +3 -14
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/annotation/index.d.ts +9 -1
- package/dist/types-ts4.5/annotation/index.d.ts +9 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 105.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#157348](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/157348)
|
|
8
|
+
[`2745ba38d05fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2745ba38d05fd) -
|
|
9
|
+
Implemented the new manager set selection and hover APIs. This will allow anyone with access to
|
|
10
|
+
the annotations manager the ability to control when/what annotation is selected/hovered.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 105.11.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
@@ -44,6 +44,12 @@ var AnnotationUpdateEmitter = exports.AnnotationUpdateEmitter = /*#__PURE__*/fun
|
|
|
44
44
|
/*
|
|
45
45
|
* This is the public interface for the AnnotationManager. It provides methods for interacting with the manager.
|
|
46
46
|
*/
|
|
47
|
+
/**
|
|
48
|
+
* This is a factory method which creates a new instance of the AnnotationManager.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* const annotationManager: AnnotationManager = createAnnotationManager();
|
|
52
|
+
*/
|
|
47
53
|
function createAnnotationManager() {
|
|
48
54
|
return new _manager.SharedAnnotationManager();
|
|
49
55
|
}
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.createEditorUseOnlyNotice = createEditorUseOnlyNotice;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _sectionMessage = _interopRequireDefault(require("@atlaskit/section-message"));
|
|
12
11
|
/* eslint-disable @atlaskit/design-system/use-primitives-text */
|
|
13
12
|
|
|
@@ -17,26 +16,16 @@ function AlternativePackagesMessage(_ref) {
|
|
|
17
16
|
return null;
|
|
18
17
|
}
|
|
19
18
|
if (alternatePackages.length === 1) {
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement("p", null, "Consider using",
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("p", null, "Consider using ", /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
21
20
|
href: alternatePackages[0].link
|
|
22
|
-
}, alternatePackages[0].name)
|
|
23
|
-
/*#__PURE__*/
|
|
24
|
-
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
25
|
-
_react.default.createElement("a", {
|
|
26
|
-
href: alternatePackages[0].link
|
|
27
|
-
}, alternatePackages[0].name), "instead.");
|
|
21
|
+
}, alternatePackages[0].name), ' ', "instead.");
|
|
28
22
|
}
|
|
29
23
|
return /*#__PURE__*/_react.default.createElement("p", null, "Consider using one of these packages instead:", /*#__PURE__*/_react.default.createElement("ul", null, alternatePackages.map(function (p) {
|
|
30
24
|
return (
|
|
31
25
|
/*#__PURE__*/
|
|
32
26
|
// Ignored via go/ees005
|
|
33
27
|
// eslint-disable-next-line react/jsx-key
|
|
34
|
-
_react.default.createElement("li", null,
|
|
35
|
-
href: p.link
|
|
36
|
-
}, p.name) :
|
|
37
|
-
/*#__PURE__*/
|
|
38
|
-
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
39
|
-
_react.default.createElement("a", {
|
|
28
|
+
_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
40
29
|
href: p.link
|
|
41
30
|
}, p.name))
|
|
42
31
|
);
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "105.11.
|
|
20
|
+
var packageVersion = "105.11.1";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// Ignored via go/ees007
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "105.11.
|
|
26
|
+
var packageVersion = "105.11.1";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -25,6 +25,12 @@ export class AnnotationUpdateEmitter extends EventEmitter {
|
|
|
25
25
|
* This is the public interface for the AnnotationManager. It provides methods for interacting with the manager.
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* This is a factory method which creates a new instance of the AnnotationManager.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* const annotationManager: AnnotationManager = createAnnotationManager();
|
|
33
|
+
*/
|
|
28
34
|
export function createAnnotationManager() {
|
|
29
35
|
return new SharedAnnotationManager();
|
|
30
36
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/use-primitives-text */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Link from '@atlaskit/link';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import SectionMessage from '@atlaskit/section-message';
|
|
6
5
|
function AlternativePackagesMessage({
|
|
7
6
|
alternatePackages
|
|
@@ -10,25 +9,15 @@ function AlternativePackagesMessage({
|
|
|
10
9
|
return null;
|
|
11
10
|
}
|
|
12
11
|
if (alternatePackages.length === 1) {
|
|
13
|
-
return /*#__PURE__*/React.createElement("p", null, "Consider using",
|
|
12
|
+
return /*#__PURE__*/React.createElement("p", null, "Consider using ", /*#__PURE__*/React.createElement(Link, {
|
|
14
13
|
href: alternatePackages[0].link
|
|
15
|
-
}, alternatePackages[0].name)
|
|
16
|
-
/*#__PURE__*/
|
|
17
|
-
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
18
|
-
React.createElement("a", {
|
|
19
|
-
href: alternatePackages[0].link
|
|
20
|
-
}, alternatePackages[0].name), "instead.");
|
|
14
|
+
}, alternatePackages[0].name), ' ', "instead.");
|
|
21
15
|
}
|
|
22
16
|
return /*#__PURE__*/React.createElement("p", null, "Consider using one of these packages instead:", /*#__PURE__*/React.createElement("ul", null, alternatePackages.map(p =>
|
|
23
17
|
/*#__PURE__*/
|
|
24
18
|
// Ignored via go/ees005
|
|
25
19
|
// eslint-disable-next-line react/jsx-key
|
|
26
|
-
React.createElement("li", null,
|
|
27
|
-
href: p.link
|
|
28
|
-
}, p.name) :
|
|
29
|
-
/*#__PURE__*/
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
31
|
-
React.createElement("a", {
|
|
20
|
+
React.createElement("li", null, /*#__PURE__*/React.createElement(Link, {
|
|
32
21
|
href: p.link
|
|
33
22
|
}, p.name)))));
|
|
34
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "105.11.
|
|
4
|
+
const packageVersion = "105.11.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "105.11.
|
|
16
|
+
const packageVersion = "105.11.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -44,6 +44,12 @@ export var AnnotationUpdateEmitter = /*#__PURE__*/function (_EventEmitter) {
|
|
|
44
44
|
* This is the public interface for the AnnotationManager. It provides methods for interacting with the manager.
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* This is a factory method which creates a new instance of the AnnotationManager.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* const annotationManager: AnnotationManager = createAnnotationManager();
|
|
52
|
+
*/
|
|
47
53
|
export function createAnnotationManager() {
|
|
48
54
|
return new SharedAnnotationManager();
|
|
49
55
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/use-primitives-text */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Link from '@atlaskit/link';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import SectionMessage from '@atlaskit/section-message';
|
|
6
5
|
function AlternativePackagesMessage(_ref) {
|
|
7
6
|
var alternatePackages = _ref.alternatePackages;
|
|
@@ -9,26 +8,16 @@ function AlternativePackagesMessage(_ref) {
|
|
|
9
8
|
return null;
|
|
10
9
|
}
|
|
11
10
|
if (alternatePackages.length === 1) {
|
|
12
|
-
return /*#__PURE__*/React.createElement("p", null, "Consider using",
|
|
11
|
+
return /*#__PURE__*/React.createElement("p", null, "Consider using ", /*#__PURE__*/React.createElement(Link, {
|
|
13
12
|
href: alternatePackages[0].link
|
|
14
|
-
}, alternatePackages[0].name)
|
|
15
|
-
/*#__PURE__*/
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
17
|
-
React.createElement("a", {
|
|
18
|
-
href: alternatePackages[0].link
|
|
19
|
-
}, alternatePackages[0].name), "instead.");
|
|
13
|
+
}, alternatePackages[0].name), ' ', "instead.");
|
|
20
14
|
}
|
|
21
15
|
return /*#__PURE__*/React.createElement("p", null, "Consider using one of these packages instead:", /*#__PURE__*/React.createElement("ul", null, alternatePackages.map(function (p) {
|
|
22
16
|
return (
|
|
23
17
|
/*#__PURE__*/
|
|
24
18
|
// Ignored via go/ees005
|
|
25
19
|
// eslint-disable-next-line react/jsx-key
|
|
26
|
-
React.createElement("li", null,
|
|
27
|
-
href: p.link
|
|
28
|
-
}, p.name) :
|
|
29
|
-
/*#__PURE__*/
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/no-html-anchor
|
|
31
|
-
React.createElement("a", {
|
|
20
|
+
React.createElement("li", null, /*#__PURE__*/React.createElement(Link, {
|
|
32
21
|
href: p.link
|
|
33
22
|
}, p.name))
|
|
34
23
|
);
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "105.11.
|
|
10
|
+
var packageVersion = "105.11.1";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "105.11.
|
|
23
|
+
var packageVersion = "105.11.1";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -91,7 +91,7 @@ export type ClearAnnotationResult = {
|
|
|
91
91
|
};
|
|
92
92
|
export type SelectAnnotationResult = {
|
|
93
93
|
success: false;
|
|
94
|
-
reason: ManagerFailureReasons | 'id-not-valid';
|
|
94
|
+
reason: ManagerFailureReasons | 'id-not-valid' | 'draft-in-progress';
|
|
95
95
|
} | {
|
|
96
96
|
success: true;
|
|
97
97
|
isSelected: boolean;
|
|
@@ -154,6 +154,8 @@ export type AnnotationManager = AnnotationManagerMethods & {
|
|
|
154
154
|
emit(event: {
|
|
155
155
|
name: 'draftAnnotationStarted';
|
|
156
156
|
data: AnnotationDraftStartedData;
|
|
157
|
+
} | {
|
|
158
|
+
name: 'draftAnnotationCleared';
|
|
157
159
|
} | {
|
|
158
160
|
name: 'annotationSelectionChanged';
|
|
159
161
|
data: AnnotationSelectedChangeData;
|
|
@@ -171,5 +173,11 @@ export type AnnotationManager = AnnotationManagerMethods & {
|
|
|
171
173
|
*/
|
|
172
174
|
unhook<H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H]): AnnotationManager;
|
|
173
175
|
};
|
|
176
|
+
/**
|
|
177
|
+
* This is a factory method which creates a new instance of the AnnotationManager.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* const annotationManager: AnnotationManager = createAnnotationManager();
|
|
181
|
+
*/
|
|
174
182
|
export declare function createAnnotationManager(): AnnotationManager;
|
|
175
183
|
export {};
|
|
@@ -91,7 +91,7 @@ export type ClearAnnotationResult = {
|
|
|
91
91
|
};
|
|
92
92
|
export type SelectAnnotationResult = {
|
|
93
93
|
success: false;
|
|
94
|
-
reason: ManagerFailureReasons | 'id-not-valid';
|
|
94
|
+
reason: ManagerFailureReasons | 'id-not-valid' | 'draft-in-progress';
|
|
95
95
|
} | {
|
|
96
96
|
success: true;
|
|
97
97
|
isSelected: boolean;
|
|
@@ -154,6 +154,8 @@ export type AnnotationManager = AnnotationManagerMethods & {
|
|
|
154
154
|
emit(event: {
|
|
155
155
|
name: 'draftAnnotationStarted';
|
|
156
156
|
data: AnnotationDraftStartedData;
|
|
157
|
+
} | {
|
|
158
|
+
name: 'draftAnnotationCleared';
|
|
157
159
|
} | {
|
|
158
160
|
name: 'annotationSelectionChanged';
|
|
159
161
|
data: AnnotationSelectedChangeData;
|
|
@@ -171,5 +173,11 @@ export type AnnotationManager = AnnotationManagerMethods & {
|
|
|
171
173
|
*/
|
|
172
174
|
unhook<H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H]): AnnotationManager;
|
|
173
175
|
};
|
|
176
|
+
/**
|
|
177
|
+
* This is a factory method which creates a new instance of the AnnotationManager.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* const annotationManager: AnnotationManager = createAnnotationManager();
|
|
181
|
+
*/
|
|
174
182
|
export declare function createAnnotationManager(): AnnotationManager;
|
|
175
183
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "105.11.
|
|
3
|
+
"version": "105.11.1",
|
|
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/"
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"@atlaskit/theme": "^18.0.0",
|
|
172
172
|
"@atlaskit/tmp-editor-statsig": "^5.1.0",
|
|
173
173
|
"@atlaskit/tokens": "^4.9.0",
|
|
174
|
-
"@atlaskit/tooltip": "^20.
|
|
174
|
+
"@atlaskit/tooltip": "^20.1.0",
|
|
175
175
|
"@atlaskit/width-detector": "^5.0.0",
|
|
176
176
|
"@babel/runtime": "^7.0.0",
|
|
177
177
|
"@compiled/react": "^0.18.3",
|