@atlaskit/editor-common 106.0.0 → 106.0.2
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 +21 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/styled.js +2 -2
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +2 -2
- package/dist/cjs/utils/breakout.js +1 -2
- package/dist/cjs/utils/hyperlink.js +4 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/styled.js +2 -2
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +2 -2
- package/dist/es2019/utils/breakout.js +1 -2
- package/dist/es2019/utils/hyperlink.js +4 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/styled.js +2 -2
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +2 -2
- package/dist/esm/utils/breakout.js +1 -2
- package/dist/esm/utils/hyperlink.js +4 -1
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/analytics/types/general-events.d.ts +2 -2
- package/dist/types/analytics/types/inline-comment-events.d.ts +4 -1
- package/dist/types/node-width/index.d.ts +1 -1
- package/dist/types/ui/MediaSingle/styled.d.ts +1 -1
- package/dist/types/utils/breakout.d.ts +19 -4
- package/dist/types-ts4.5/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/general-events.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/inline-comment-events.d.ts +4 -1
- package/dist/types-ts4.5/node-width/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +1 -1
- package/dist/types-ts4.5/utils/breakout.d.ts +19 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 106.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#162493](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/162493)
|
|
8
|
+
[`e2fed6abf826b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e2fed6abf826b) -
|
|
9
|
+
Added some error reporting anayltics for the new annotation manager
|
|
10
|
+
- [#161848](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/161848)
|
|
11
|
+
[`d6626ea1a06a1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d6626ea1a06a1) -
|
|
12
|
+
[ux] ED-27701 Update canLinkBeCreatedInRange function to check if selection includes inlineCard
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 106.0.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#161914](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/161914)
|
|
20
|
+
[`b1a7ef0ae8d44`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b1a7ef0ae8d44) -
|
|
21
|
+
Switches text formatting options optimisation from FG to Experiment flag
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 106.0.0
|
|
4
25
|
|
|
5
26
|
### Major 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.0.
|
|
20
|
+
var packageVersion = "106.0.2";
|
|
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 = "106.0.
|
|
26
|
+
var packageVersion = "106.0.2";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -175,8 +175,8 @@ function isImageAligned(layout) {
|
|
|
175
175
|
* @returns Reduced CSS width value where px value given, or otherwise the original value
|
|
176
176
|
* @example
|
|
177
177
|
*/
|
|
178
|
-
|
|
179
|
-
//
|
|
178
|
+
|
|
179
|
+
// widthValue could be a string in px, rem or percentage, e.g. "800px", "100%", etc.
|
|
180
180
|
function roundToClosestEvenPxValue(widthValue) {
|
|
181
181
|
try {
|
|
182
182
|
if (widthValue.endsWith('px')) {
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.ToolbarArrowKeyNavigationProvider = exports.KeyDownHandlerContext = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
|
-
var
|
|
10
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
11
|
var _elementBrowser = require("../../element-browser");
|
|
12
12
|
var _messages = require("../../messages");
|
|
13
13
|
var _mediaInsert = require("../../messages/media-insert");
|
|
@@ -139,7 +139,7 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
|
|
|
139
139
|
handleTab: handleTabMemoized
|
|
140
140
|
};
|
|
141
141
|
}, [handleArrowLeftMemoized, handleArrowRightMemoized, handleTabMemoized]);
|
|
142
|
-
var submenuKeydownHandleContext = (0,
|
|
142
|
+
var submenuKeydownHandleContext = (0, _experiments.editorExperiment)('platform_editor_toolbar_rerender_optimization_exp', true) ? submenuKeydownHandleContextMemoized : submenuKeydownHandleContextRaw;
|
|
143
143
|
(0, _react.useLayoutEffect)(function () {
|
|
144
144
|
if (!wrapperRef.current || disableArrowKeyNavigation) {
|
|
145
145
|
return;
|
|
@@ -20,8 +20,7 @@ var _dom = require("./dom");
|
|
|
20
20
|
* TODO: Clean this up after: https://product-fabric.atlassian.net/browse/ED-8942
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
|
+
|
|
25
24
|
var breakoutConsts = exports.breakoutConsts = {
|
|
26
25
|
padding: _editorSharedStyles.akEditorBreakoutPadding,
|
|
27
26
|
defaultLayoutWidth: _editorSharedStyles.akEditorDefaultLayoutWidth,
|
|
@@ -14,6 +14,7 @@ exports.normalizeUrl = normalizeUrl;
|
|
|
14
14
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
15
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
16
16
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _enums = require("../analytics/types/enums");
|
|
18
19
|
var _shouldAutoLinkifyTld = require("./should-auto-linkify-tld");
|
|
19
20
|
var _slice = require("./slice");
|
|
@@ -219,9 +220,11 @@ var canLinkBeCreatedInRange = exports.canLinkBeCreatedInRange = function canLink
|
|
|
219
220
|
if ($from.parent.type.allowsMarkType(link)) {
|
|
220
221
|
var allowed = true;
|
|
221
222
|
state.doc.nodesBetween(from, to, function (node) {
|
|
223
|
+
var _state$schema$nodes$i;
|
|
224
|
+
var hasInlineCard = node.type.name === ((_state$schema$nodes$i = state.schema.nodes.inlineCard) === null || _state$schema$nodes$i === void 0 ? void 0 : _state$schema$nodes$i.name) && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_11');
|
|
222
225
|
allowed = allowed && !node.marks.some(function (m) {
|
|
223
226
|
return m.type.excludes(link);
|
|
224
|
-
});
|
|
227
|
+
}) && !hasInlineCard;
|
|
225
228
|
return allowed;
|
|
226
229
|
});
|
|
227
230
|
return allowed;
|
|
@@ -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.0.
|
|
4
|
+
const packageVersion = "106.0.2";
|
|
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 = "106.0.
|
|
16
|
+
const packageVersion = "106.0.2";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -153,8 +153,8 @@ function isImageAligned(layout) {
|
|
|
153
153
|
* @returns Reduced CSS width value where px value given, or otherwise the original value
|
|
154
154
|
* @example
|
|
155
155
|
*/
|
|
156
|
-
|
|
157
|
-
//
|
|
156
|
+
|
|
157
|
+
// widthValue could be a string in px, rem or percentage, e.g. "800px", "100%", etc.
|
|
158
158
|
export function roundToClosestEvenPxValue(widthValue) {
|
|
159
159
|
try {
|
|
160
160
|
if (widthValue.endsWith('px')) {
|
|
@@ -7,7 +7,7 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import {
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
11
|
import { ELEMENT_BROWSER_ID } from '../../element-browser';
|
|
12
12
|
import { fullPageMessages } from '../../messages';
|
|
13
13
|
import { mediaInsertMessages } from '../../messages/media-insert';
|
|
@@ -128,7 +128,7 @@ export const ToolbarArrowKeyNavigationProvider = ({
|
|
|
128
128
|
handleArrowRight: handleArrowRightMemoized,
|
|
129
129
|
handleTab: handleTabMemoized
|
|
130
130
|
}), [handleArrowLeftMemoized, handleArrowRightMemoized, handleTabMemoized]);
|
|
131
|
-
const submenuKeydownHandleContext =
|
|
131
|
+
const submenuKeydownHandleContext = editorExperiment('platform_editor_toolbar_rerender_optimization_exp', true) ? submenuKeydownHandleContextMemoized : submenuKeydownHandleContextRaw;
|
|
132
132
|
useLayoutEffect(() => {
|
|
133
133
|
if (!wrapperRef.current || disableArrowKeyNavigation) {
|
|
134
134
|
return;
|
|
@@ -10,8 +10,7 @@ import { parsePx } from './dom';
|
|
|
10
10
|
* TODO: Clean this up after: https://product-fabric.atlassian.net/browse/ED-8942
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
|
+
|
|
15
14
|
const breakoutConsts = {
|
|
16
15
|
padding: akEditorBreakoutPadding,
|
|
17
16
|
defaultLayoutWidth: akEditorDefaultLayoutWidth,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// If changes are made to this file, please make the same update in the linked file.
|
|
3
3
|
|
|
4
4
|
import { isSafeUrl, linkify, normalizeUrl as normaliseLinkHref } from '@atlaskit/adf-schema';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics/types/enums';
|
|
6
7
|
import { shouldAutoLinkifyMatch } from './should-auto-linkify-tld';
|
|
7
8
|
import { mapSlice } from './slice';
|
|
@@ -190,7 +191,9 @@ export const canLinkBeCreatedInRange = (from, to) => state => {
|
|
|
190
191
|
if ($from.parent.type.allowsMarkType(link)) {
|
|
191
192
|
let allowed = true;
|
|
192
193
|
state.doc.nodesBetween(from, to, node => {
|
|
193
|
-
|
|
194
|
+
var _state$schema$nodes$i;
|
|
195
|
+
const hasInlineCard = node.type.name === ((_state$schema$nodes$i = state.schema.nodes.inlineCard) === null || _state$schema$nodes$i === void 0 ? void 0 : _state$schema$nodes$i.name) && fg('platform_editor_controls_patch_11');
|
|
196
|
+
allowed = allowed && !node.marks.some(m => m.type.excludes(link)) && !hasInlineCard;
|
|
194
197
|
return allowed;
|
|
195
198
|
});
|
|
196
199
|
return allowed;
|
|
@@ -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.0.
|
|
10
|
+
var packageVersion = "106.0.2";
|
|
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 = "106.0.
|
|
23
|
+
var packageVersion = "106.0.2";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -165,8 +165,8 @@ function isImageAligned(layout) {
|
|
|
165
165
|
* @returns Reduced CSS width value where px value given, or otherwise the original value
|
|
166
166
|
* @example
|
|
167
167
|
*/
|
|
168
|
-
|
|
169
|
-
//
|
|
168
|
+
|
|
169
|
+
// widthValue could be a string in px, rem or percentage, e.g. "800px", "100%", etc.
|
|
170
170
|
export function roundToClosestEvenPxValue(widthValue) {
|
|
171
171
|
try {
|
|
172
172
|
if (widthValue.endsWith('px')) {
|
|
@@ -7,7 +7,7 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import {
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
11
|
import { ELEMENT_BROWSER_ID } from '../../element-browser';
|
|
12
12
|
import { fullPageMessages } from '../../messages';
|
|
13
13
|
import { mediaInsertMessages } from '../../messages/media-insert';
|
|
@@ -130,7 +130,7 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
|
|
|
130
130
|
handleTab: handleTabMemoized
|
|
131
131
|
};
|
|
132
132
|
}, [handleArrowLeftMemoized, handleArrowRightMemoized, handleTabMemoized]);
|
|
133
|
-
var submenuKeydownHandleContext =
|
|
133
|
+
var submenuKeydownHandleContext = editorExperiment('platform_editor_toolbar_rerender_optimization_exp', true) ? submenuKeydownHandleContextMemoized : submenuKeydownHandleContextRaw;
|
|
134
134
|
useLayoutEffect(function () {
|
|
135
135
|
if (!wrapperRef.current || disableArrowKeyNavigation) {
|
|
136
136
|
return;
|
|
@@ -10,8 +10,7 @@ import { parsePx } from './dom';
|
|
|
10
10
|
* TODO: Clean this up after: https://product-fabric.atlassian.net/browse/ED-8942
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
|
+
|
|
15
14
|
var breakoutConsts = {
|
|
16
15
|
padding: akEditorBreakoutPadding,
|
|
17
16
|
defaultLayoutWidth: akEditorDefaultLayoutWidth,
|
|
@@ -4,6 +4,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
4
4
|
// If changes are made to this file, please make the same update in the linked file.
|
|
5
5
|
|
|
6
6
|
import { isSafeUrl, linkify, normalizeUrl as normaliseLinkHref } from '@atlaskit/adf-schema';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics/types/enums';
|
|
8
9
|
import { shouldAutoLinkifyMatch } from './should-auto-linkify-tld';
|
|
9
10
|
import { mapSlice } from './slice';
|
|
@@ -208,9 +209,11 @@ export var canLinkBeCreatedInRange = function canLinkBeCreatedInRange(from, to)
|
|
|
208
209
|
if ($from.parent.type.allowsMarkType(link)) {
|
|
209
210
|
var allowed = true;
|
|
210
211
|
state.doc.nodesBetween(from, to, function (node) {
|
|
212
|
+
var _state$schema$nodes$i;
|
|
213
|
+
var hasInlineCard = node.type.name === ((_state$schema$nodes$i = state.schema.nodes.inlineCard) === null || _state$schema$nodes$i === void 0 ? void 0 : _state$schema$nodes$i.name) && fg('platform_editor_controls_patch_11');
|
|
211
214
|
allowed = allowed && !node.marks.some(function (m) {
|
|
212
215
|
return m.type.excludes(link);
|
|
213
|
-
});
|
|
216
|
+
}) && !hasInlineCard;
|
|
214
217
|
return allowed;
|
|
215
218
|
});
|
|
216
219
|
return allowed;
|
|
@@ -21,7 +21,7 @@ export type { CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPaylo
|
|
|
21
21
|
export type { TextColorShowPaletteToggleAEP, TextColorShowPaletteToggleAttr, } from './types/color-events';
|
|
22
22
|
export { GAP_CURSOR_POSITION, TARGET_SELECTION_SOURCE } from './types/extension-events';
|
|
23
23
|
export type { SelectionJson, ExtensionType, ExtensionEventPayload } from './types/extension-events';
|
|
24
|
-
export type { AnnotationActionType, AnnotationAEP, AnnotationAEPAttributes, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, } from './types/inline-comment-events';
|
|
24
|
+
export type { AnnotationActionType, AnnotationAEP, AnnotationAEPAttributes, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, AnnotationErrorAEP, } from './types/inline-comment-events';
|
|
25
25
|
export { RESOLVE_METHOD, VIEW_METHOD } from './types/inline-comment-events';
|
|
26
26
|
export { LAYOUT_TYPE, SMART_LINK_TYPE } from './types/node-events';
|
|
27
27
|
export type { NodeEventPayload } from './types/node-events';
|
|
@@ -3,7 +3,7 @@ import type { FeatureFlagKey } from '../../types/feature-flags';
|
|
|
3
3
|
import type { PropsDifference, ShallowPropsDifference } from '../../utils';
|
|
4
4
|
import type { SEVERITY } from '../../utils/analytics';
|
|
5
5
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
6
|
-
import type { AnnotationAEP } from './inline-comment-events';
|
|
6
|
+
import type { AnnotationAEP, AnnotationErrorAEP } from './inline-comment-events';
|
|
7
7
|
import type { OperationalAEP, OperationalAEPWithObjectId, TrackAEP, UIAEP } from './utils';
|
|
8
8
|
export declare enum PLATFORMS {
|
|
9
9
|
NATIVE = "mobileNative",
|
|
@@ -196,5 +196,5 @@ type CopyLinkToAnchorButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.COPY_LINK_TO_ANCHOR
|
|
|
196
196
|
extensionType?: string;
|
|
197
197
|
isLivePage?: boolean;
|
|
198
198
|
}>;
|
|
199
|
-
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | SingleColumLayoutDetectedAEP | CopyLinkToAnchorButtonAEP | DockedPrimaryToolbarRenderedAEP;
|
|
199
|
+
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | AnnotationErrorAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | SingleColumLayoutDetectedAEP | CopyLinkToAnchorButtonAEP | DockedPrimaryToolbarRenderedAEP;
|
|
200
200
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
2
|
-
import type { TrackAEP } from './utils';
|
|
2
|
+
import type { OperationalAEP, TrackAEP } from './utils';
|
|
3
3
|
export type AnnotationActionType = ACTION.INSERTED | ACTION.CLOSED | ACTION.EDITED | ACTION.DELETED | ACTION.OPENED | ACTION.RESOLVED | ACTION.VIEWED;
|
|
4
|
+
export type AnnotationErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, {
|
|
5
|
+
errorReason?: string;
|
|
6
|
+
}>;
|
|
4
7
|
export type AnnotationAEP = TrackAEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
|
|
5
8
|
export type AnnotationAEPAttributes = undefined | {} | AnnotationDraftAEPAttributes | AnnotationResolvedAEPAttributes;
|
|
6
9
|
export type AnnotationDraftAEPAttributes = {
|
|
@@ -10,6 +10,6 @@ export declare const layoutToWidth: {
|
|
|
10
10
|
* Calculates width of parent node of a nested node (inside layouts, extension)
|
|
11
11
|
* If current node selection is not nested will return undefined
|
|
12
12
|
*/
|
|
13
|
-
export declare const getParentNodeWidth: (pos: number | undefined, state: EditorState, containerWidth: EditorContainerWidth, isFullWidthModeEnabled?: boolean) =>
|
|
13
|
+
export declare const getParentNodeWidth: (pos: number | undefined, state: EditorState, containerWidth: EditorContainerWidth, isFullWidthModeEnabled?: boolean) => number | undefined;
|
|
14
14
|
export declare const getTableContainerWidth: (node?: PMNode) => number;
|
|
15
15
|
export declare const getTableWidthWithNumberColumn: (node: PMNode, offset: number) => number;
|
|
@@ -54,7 +54,7 @@ export declare function calcResizedWidth(layout: MediaSingleLayout, width: numbe
|
|
|
54
54
|
* @returns Reduced CSS width value where px value given, or otherwise the original value
|
|
55
55
|
* @example
|
|
56
56
|
*/
|
|
57
|
-
export declare function roundToClosestEvenPxValue(widthValue:
|
|
57
|
+
export declare function roundToClosestEvenPxValue(widthValue: string): string;
|
|
58
58
|
export interface MediaSingleWrapperProps {
|
|
59
59
|
containerWidth?: number;
|
|
60
60
|
fullWidthMode?: boolean;
|
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { BreakoutMode } from '../types/breakout';
|
|
3
|
+
import { mapBreakpointToLayoutMaxWidth } from '../ui/BaseTheme';
|
|
4
|
+
import { getBreakpoint } from '../ui/WidthProvider';
|
|
3
5
|
/**
|
|
4
6
|
* Variables required to construct a context for breakout ssr inline script.
|
|
5
7
|
*
|
|
6
8
|
* TODO: Clean this up after: https://product-fabric.atlassian.net/browse/ED-8942
|
|
7
9
|
*
|
|
8
10
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
type BreakoutConstsType = {
|
|
12
|
+
padding: number;
|
|
13
|
+
defaultLayoutWidth: number;
|
|
14
|
+
wideScaleRatio: number;
|
|
15
|
+
fullWidthLayoutWidth: number;
|
|
16
|
+
wideLayoutWidth: number;
|
|
17
|
+
mapBreakpointToLayoutMaxWidth: typeof mapBreakpointToLayoutMaxWidth;
|
|
18
|
+
getBreakpoint: typeof getBreakpoint;
|
|
19
|
+
calcBreakoutWidth: any;
|
|
20
|
+
calcBreakoutWithCustomWidth: (mode: 'full-width' | 'wide', width: number | null, editorContainerWidth: number) => string;
|
|
21
|
+
calcLineLength: () => number;
|
|
22
|
+
calcWideWidth: (containerWidth?: number, maxWidth?: number, fallback?: string, padding?: number) => string;
|
|
23
|
+
};
|
|
24
|
+
declare const breakoutConsts: BreakoutConstsType;
|
|
25
|
+
export declare const absoluteBreakoutWidth: (layout: 'full-width' | 'wide' | string, containerWidth: number) => number;
|
|
11
26
|
export { breakoutConsts };
|
|
12
|
-
export declare const calcWideWidth:
|
|
27
|
+
export declare const calcWideWidth: (containerWidth?: number, maxWidth?: number, fallback?: string, padding?: number) => string;
|
|
13
28
|
export declare const calcBreakoutWidth: any;
|
|
14
|
-
export declare const calcBreakoutWithCustomWidth:
|
|
29
|
+
export declare const calcBreakoutWithCustomWidth: (mode: 'full-width' | 'wide', width: number | null, editorContainerWidth: number) => string;
|
|
15
30
|
export declare function calculateBreakoutStyles({ mode, widthStateLineLength, widthStateWidth, }: {
|
|
16
31
|
mode: BreakoutMarkAttrs['mode'];
|
|
17
32
|
/**
|
|
@@ -21,7 +21,7 @@ export type { CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPaylo
|
|
|
21
21
|
export type { TextColorShowPaletteToggleAEP, TextColorShowPaletteToggleAttr, } from './types/color-events';
|
|
22
22
|
export { GAP_CURSOR_POSITION, TARGET_SELECTION_SOURCE } from './types/extension-events';
|
|
23
23
|
export type { SelectionJson, ExtensionType, ExtensionEventPayload } from './types/extension-events';
|
|
24
|
-
export type { AnnotationActionType, AnnotationAEP, AnnotationAEPAttributes, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, } from './types/inline-comment-events';
|
|
24
|
+
export type { AnnotationActionType, AnnotationAEP, AnnotationAEPAttributes, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, AnnotationErrorAEP, } from './types/inline-comment-events';
|
|
25
25
|
export { RESOLVE_METHOD, VIEW_METHOD } from './types/inline-comment-events';
|
|
26
26
|
export { LAYOUT_TYPE, SMART_LINK_TYPE } from './types/node-events';
|
|
27
27
|
export type { NodeEventPayload } from './types/node-events';
|
|
@@ -3,7 +3,7 @@ import type { FeatureFlagKey } from '../../types/feature-flags';
|
|
|
3
3
|
import type { PropsDifference, ShallowPropsDifference } from '../../utils';
|
|
4
4
|
import type { SEVERITY } from '../../utils/analytics';
|
|
5
5
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
6
|
-
import type { AnnotationAEP } from './inline-comment-events';
|
|
6
|
+
import type { AnnotationAEP, AnnotationErrorAEP } from './inline-comment-events';
|
|
7
7
|
import type { OperationalAEP, OperationalAEPWithObjectId, TrackAEP, UIAEP } from './utils';
|
|
8
8
|
export declare enum PLATFORMS {
|
|
9
9
|
NATIVE = "mobileNative",
|
|
@@ -196,5 +196,5 @@ type CopyLinkToAnchorButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.COPY_LINK_TO_ANCHOR
|
|
|
196
196
|
extensionType?: string;
|
|
197
197
|
isLivePage?: boolean;
|
|
198
198
|
}>;
|
|
199
|
-
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | SingleColumLayoutDetectedAEP | CopyLinkToAnchorButtonAEP | DockedPrimaryToolbarRenderedAEP;
|
|
199
|
+
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | AnnotationErrorAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | SingleColumLayoutDetectedAEP | CopyLinkToAnchorButtonAEP | DockedPrimaryToolbarRenderedAEP;
|
|
200
200
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
2
|
-
import type { TrackAEP } from './utils';
|
|
2
|
+
import type { OperationalAEP, TrackAEP } from './utils';
|
|
3
3
|
export type AnnotationActionType = ACTION.INSERTED | ACTION.CLOSED | ACTION.EDITED | ACTION.DELETED | ACTION.OPENED | ACTION.RESOLVED | ACTION.VIEWED;
|
|
4
|
+
export type AnnotationErrorAEP = OperationalAEP<ACTION.ERROR, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, {
|
|
5
|
+
errorReason?: string;
|
|
6
|
+
}>;
|
|
4
7
|
export type AnnotationAEP = TrackAEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
|
|
5
8
|
export type AnnotationAEPAttributes = undefined | {} | AnnotationDraftAEPAttributes | AnnotationResolvedAEPAttributes;
|
|
6
9
|
export type AnnotationDraftAEPAttributes = {
|
|
@@ -10,6 +10,6 @@ export declare const layoutToWidth: {
|
|
|
10
10
|
* Calculates width of parent node of a nested node (inside layouts, extension)
|
|
11
11
|
* If current node selection is not nested will return undefined
|
|
12
12
|
*/
|
|
13
|
-
export declare const getParentNodeWidth: (pos: number | undefined, state: EditorState, containerWidth: EditorContainerWidth, isFullWidthModeEnabled?: boolean) =>
|
|
13
|
+
export declare const getParentNodeWidth: (pos: number | undefined, state: EditorState, containerWidth: EditorContainerWidth, isFullWidthModeEnabled?: boolean) => number | undefined;
|
|
14
14
|
export declare const getTableContainerWidth: (node?: PMNode) => number;
|
|
15
15
|
export declare const getTableWidthWithNumberColumn: (node: PMNode, offset: number) => number;
|
|
@@ -54,7 +54,7 @@ export declare function calcResizedWidth(layout: MediaSingleLayout, width: numbe
|
|
|
54
54
|
* @returns Reduced CSS width value where px value given, or otherwise the original value
|
|
55
55
|
* @example
|
|
56
56
|
*/
|
|
57
|
-
export declare function roundToClosestEvenPxValue(widthValue:
|
|
57
|
+
export declare function roundToClosestEvenPxValue(widthValue: string): string;
|
|
58
58
|
export interface MediaSingleWrapperProps {
|
|
59
59
|
containerWidth?: number;
|
|
60
60
|
fullWidthMode?: boolean;
|
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { BreakoutMode } from '../types/breakout';
|
|
3
|
+
import { mapBreakpointToLayoutMaxWidth } from '../ui/BaseTheme';
|
|
4
|
+
import { getBreakpoint } from '../ui/WidthProvider';
|
|
3
5
|
/**
|
|
4
6
|
* Variables required to construct a context for breakout ssr inline script.
|
|
5
7
|
*
|
|
6
8
|
* TODO: Clean this up after: https://product-fabric.atlassian.net/browse/ED-8942
|
|
7
9
|
*
|
|
8
10
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
type BreakoutConstsType = {
|
|
12
|
+
padding: number;
|
|
13
|
+
defaultLayoutWidth: number;
|
|
14
|
+
wideScaleRatio: number;
|
|
15
|
+
fullWidthLayoutWidth: number;
|
|
16
|
+
wideLayoutWidth: number;
|
|
17
|
+
mapBreakpointToLayoutMaxWidth: typeof mapBreakpointToLayoutMaxWidth;
|
|
18
|
+
getBreakpoint: typeof getBreakpoint;
|
|
19
|
+
calcBreakoutWidth: any;
|
|
20
|
+
calcBreakoutWithCustomWidth: (mode: 'full-width' | 'wide', width: number | null, editorContainerWidth: number) => string;
|
|
21
|
+
calcLineLength: () => number;
|
|
22
|
+
calcWideWidth: (containerWidth?: number, maxWidth?: number, fallback?: string, padding?: number) => string;
|
|
23
|
+
};
|
|
24
|
+
declare const breakoutConsts: BreakoutConstsType;
|
|
25
|
+
export declare const absoluteBreakoutWidth: (layout: 'full-width' | 'wide' | string, containerWidth: number) => number;
|
|
11
26
|
export { breakoutConsts };
|
|
12
|
-
export declare const calcWideWidth:
|
|
27
|
+
export declare const calcWideWidth: (containerWidth?: number, maxWidth?: number, fallback?: string, padding?: number) => string;
|
|
13
28
|
export declare const calcBreakoutWidth: any;
|
|
14
|
-
export declare const calcBreakoutWithCustomWidth:
|
|
29
|
+
export declare const calcBreakoutWithCustomWidth: (mode: 'full-width' | 'wide', width: number | null, editorContainerWidth: number) => string;
|
|
15
30
|
export declare function calculateBreakoutStyles({ mode, widthStateLineLength, widthStateWidth, }: {
|
|
16
31
|
mode: BreakoutMarkAttrs['mode'];
|
|
17
32
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "106.0.
|
|
3
|
+
"version": "106.0.2",
|
|
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/"
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"@atlaskit/icon-object": "^7.1.0",
|
|
145
145
|
"@atlaskit/link": "^3.2.0",
|
|
146
146
|
"@atlaskit/link-datasource": "^4.11.0",
|
|
147
|
-
"@atlaskit/link-picker": "^3.
|
|
147
|
+
"@atlaskit/link-picker": "^3.5.0",
|
|
148
148
|
"@atlaskit/media-card": "^79.3.0",
|
|
149
149
|
"@atlaskit/media-client": "^33.3.0",
|
|
150
150
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"@atlaskit/task-decision": "^19.2.0",
|
|
170
170
|
"@atlaskit/textfield": "^8.0.0",
|
|
171
171
|
"@atlaskit/theme": "^18.0.0",
|
|
172
|
-
"@atlaskit/tmp-editor-statsig": "^5.
|
|
172
|
+
"@atlaskit/tmp-editor-statsig": "^5.5.0",
|
|
173
173
|
"@atlaskit/tokens": "^4.9.0",
|
|
174
174
|
"@atlaskit/tooltip": "^20.2.0",
|
|
175
175
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -391,10 +391,10 @@
|
|
|
391
391
|
"platform_editor_controls_patch_9": {
|
|
392
392
|
"type": "boolean"
|
|
393
393
|
},
|
|
394
|
-
"
|
|
394
|
+
"platform_editor_controls_patch_11": {
|
|
395
395
|
"type": "boolean"
|
|
396
396
|
},
|
|
397
|
-
"
|
|
397
|
+
"dst-a11y__replace-anchor-with-link__editor": {
|
|
398
398
|
"type": "boolean"
|
|
399
399
|
}
|
|
400
400
|
}
|