@atlaskit/editor-common 106.1.0 → 106.1.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 +8 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/resizer/useBreakoutGuidelines.js +3 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/resizer/useBreakoutGuidelines.js +3 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/resizer/useBreakoutGuidelines.js +3 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/annotation/index.d.ts +7 -3
- package/dist/types/types/annotation/index.d.ts +2 -2
- package/dist/types-ts4.5/annotation/index.d.ts +7 -3
- package/dist/types-ts4.5/types/annotation/index.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 106.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#158451](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158451)
|
|
8
|
+
[`b1235f9180ac5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b1235f9180ac5) -
|
|
9
|
+
EDITOR-586 - Implement Select Annotation APIs for Renderer and integrate with CCFE
|
|
10
|
+
|
|
3
11
|
## 106.1.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -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 = "106.1.
|
|
20
|
+
var packageVersion = "106.1.1";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// Ignored via go/ees007
|
|
@@ -118,7 +118,9 @@ function useBreakoutGuidelines(getEditorWidth, isResizing) {
|
|
|
118
118
|
setCurrentLayout('center');
|
|
119
119
|
} else if (wide && Math.abs(newWidth - wide) < SNAP_GAP / 2) {
|
|
120
120
|
setCurrentLayout('wide');
|
|
121
|
-
} else if (fullWidth && (
|
|
121
|
+
} else if (fullWidth && (
|
|
122
|
+
// we only allow snap from one side, so we don't use Math.abs here
|
|
123
|
+
fullWidth + _editorSharedStyles.akEditorGutterPadding - newWidth < SNAP_GAP / 2 || newWidth >= fullWidth)) {
|
|
122
124
|
setCurrentLayout('full-width');
|
|
123
125
|
} else {
|
|
124
126
|
setCurrentLayout(null);
|
|
@@ -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 = "106.1.
|
|
26
|
+
var packageVersion = "106.1.1";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -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 = "106.1.
|
|
4
|
+
const packageVersion = "106.1.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -101,7 +101,9 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing, dynamicFullWid
|
|
|
101
101
|
setCurrentLayout('center');
|
|
102
102
|
} else if (wide && Math.abs(newWidth - wide) < SNAP_GAP / 2) {
|
|
103
103
|
setCurrentLayout('wide');
|
|
104
|
-
} else if (fullWidth && (
|
|
104
|
+
} else if (fullWidth && (
|
|
105
|
+
// we only allow snap from one side, so we don't use Math.abs here
|
|
106
|
+
fullWidth + akEditorGutterPadding - newWidth < SNAP_GAP / 2 || newWidth >= fullWidth)) {
|
|
105
107
|
setCurrentLayout('full-width');
|
|
106
108
|
} else {
|
|
107
109
|
setCurrentLayout(null);
|
|
@@ -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 = "106.1.
|
|
16
|
+
const packageVersion = "106.1.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -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 = "106.1.
|
|
10
|
+
var packageVersion = "106.1.1";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -110,7 +110,9 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing) {
|
|
|
110
110
|
setCurrentLayout('center');
|
|
111
111
|
} else if (wide && Math.abs(newWidth - wide) < SNAP_GAP / 2) {
|
|
112
112
|
setCurrentLayout('wide');
|
|
113
|
-
} else if (fullWidth && (
|
|
113
|
+
} else if (fullWidth && (
|
|
114
|
+
// we only allow snap from one side, so we don't use Math.abs here
|
|
115
|
+
fullWidth + akEditorGutterPadding - newWidth < SNAP_GAP / 2 || newWidth >= fullWidth)) {
|
|
114
116
|
setCurrentLayout('full-width');
|
|
115
117
|
} else {
|
|
116
118
|
setCurrentLayout(null);
|
|
@@ -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 = "106.1.
|
|
23
|
+
var packageVersion = "106.1.1";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
5
|
import type { AnnotationId } from '@atlaskit/adf-schema';
|
|
6
6
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
7
|
-
import type { AddNodeMarkStep, AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
7
|
+
import type { AddNodeMarkStep, AddMarkStep, RemoveNodeMarkStep, RemoveMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
8
8
|
export type UpdateEvent = 'create' | 'delete' | 'resolve' | 'unresolve' | 'setselectedannotation' | 'sethoveredannotation' | 'removehoveredannotation' | 'closeinlinecomment';
|
|
9
9
|
export type VisibilityEvent = 'setvisibility';
|
|
10
10
|
type AnnotationCallback = (params: string) => void;
|
|
@@ -27,6 +27,10 @@ export type ActionResult = {
|
|
|
27
27
|
inlineNodeTypes?: string[];
|
|
28
28
|
targetNodeType?: string;
|
|
29
29
|
} & AnnotationByMatches;
|
|
30
|
+
export type ClearAnnotationActionResult = {
|
|
31
|
+
step: RemoveMarkStep | RemoveNodeMarkStep;
|
|
32
|
+
doc: JSONDocNode;
|
|
33
|
+
};
|
|
30
34
|
export type AnnotationDraftStartedData = {
|
|
31
35
|
targetElement: HTMLElement | undefined;
|
|
32
36
|
/**
|
|
@@ -84,10 +88,10 @@ export type GetDraftResult = {
|
|
|
84
88
|
} & AnnotationDraftStartedData);
|
|
85
89
|
export type ClearAnnotationResult = {
|
|
86
90
|
success: false;
|
|
87
|
-
reason: ManagerFailureReasons | 'id-not-valid';
|
|
91
|
+
reason: ManagerFailureReasons | 'id-not-valid' | 'clear-failed';
|
|
88
92
|
} | {
|
|
89
93
|
success: true;
|
|
90
|
-
actionResult:
|
|
94
|
+
actionResult: ClearAnnotationActionResult | undefined;
|
|
91
95
|
};
|
|
92
96
|
export type SelectAnnotationResult = {
|
|
93
97
|
success: false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
3
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
|
-
import type { AddNodeMarkStep, AddMarkStep,
|
|
4
|
+
import type { AddNodeMarkStep, AddMarkStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
5
5
|
import type { AnnotationManager } from '../../annotation';
|
|
6
6
|
import type { AnnotationState, AnnotationUpdateEmitter } from './emitter';
|
|
7
7
|
export type AnnotationByMatches = {
|
|
@@ -12,7 +12,7 @@ export type AnnotationByMatches = {
|
|
|
12
12
|
isAnnotationAllowed?: boolean;
|
|
13
13
|
};
|
|
14
14
|
type ActionResult = {
|
|
15
|
-
step:
|
|
15
|
+
step: RemoveMarkStep | RemoveNodeMarkStep;
|
|
16
16
|
doc: JSONDocNode;
|
|
17
17
|
} | false;
|
|
18
18
|
export type AnnotationActionResult = ({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
5
|
import type { AnnotationId } from '@atlaskit/adf-schema';
|
|
6
6
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
7
|
-
import type { AddNodeMarkStep, AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
7
|
+
import type { AddNodeMarkStep, AddMarkStep, RemoveNodeMarkStep, RemoveMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
8
8
|
export type UpdateEvent = 'create' | 'delete' | 'resolve' | 'unresolve' | 'setselectedannotation' | 'sethoveredannotation' | 'removehoveredannotation' | 'closeinlinecomment';
|
|
9
9
|
export type VisibilityEvent = 'setvisibility';
|
|
10
10
|
type AnnotationCallback = (params: string) => void;
|
|
@@ -27,6 +27,10 @@ export type ActionResult = {
|
|
|
27
27
|
inlineNodeTypes?: string[];
|
|
28
28
|
targetNodeType?: string;
|
|
29
29
|
} & AnnotationByMatches;
|
|
30
|
+
export type ClearAnnotationActionResult = {
|
|
31
|
+
step: RemoveMarkStep | RemoveNodeMarkStep;
|
|
32
|
+
doc: JSONDocNode;
|
|
33
|
+
};
|
|
30
34
|
export type AnnotationDraftStartedData = {
|
|
31
35
|
targetElement: HTMLElement | undefined;
|
|
32
36
|
/**
|
|
@@ -84,10 +88,10 @@ export type GetDraftResult = {
|
|
|
84
88
|
} & AnnotationDraftStartedData);
|
|
85
89
|
export type ClearAnnotationResult = {
|
|
86
90
|
success: false;
|
|
87
|
-
reason: ManagerFailureReasons | 'id-not-valid';
|
|
91
|
+
reason: ManagerFailureReasons | 'id-not-valid' | 'clear-failed';
|
|
88
92
|
} | {
|
|
89
93
|
success: true;
|
|
90
|
-
actionResult:
|
|
94
|
+
actionResult: ClearAnnotationActionResult | undefined;
|
|
91
95
|
};
|
|
92
96
|
export type SelectAnnotationResult = {
|
|
93
97
|
success: false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
3
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
|
-
import type { AddNodeMarkStep, AddMarkStep,
|
|
4
|
+
import type { AddNodeMarkStep, AddMarkStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
5
5
|
import type { AnnotationManager } from '../../annotation';
|
|
6
6
|
import type { AnnotationState, AnnotationUpdateEmitter } from './emitter';
|
|
7
7
|
export type AnnotationByMatches = {
|
|
@@ -12,7 +12,7 @@ export type AnnotationByMatches = {
|
|
|
12
12
|
isAnnotationAllowed?: boolean;
|
|
13
13
|
};
|
|
14
14
|
type ActionResult = {
|
|
15
|
-
step:
|
|
15
|
+
step: RemoveMarkStep | RemoveNodeMarkStep;
|
|
16
16
|
doc: JSONDocNode;
|
|
17
17
|
} | false;
|
|
18
18
|
export type AnnotationActionResult = ({
|
package/package.json
CHANGED