@atlaskit/editor-common 116.16.0 → 116.17.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 +19 -0
- package/dist/cjs/code-block/index.js +2 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/preset/plugin-injection-api.js +6 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/code-block/index.js +2 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/preset/plugin-injection-api.js +6 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/code-block/index.js +2 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/preset/plugin-injection-api.js +6 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/sync-block-events.d.ts +25 -0
- package/dist/types/preset/plugin-injection-api.d.ts +1 -0
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 116.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`426eef1e61679`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/426eef1e61679) -
|
|
8
|
+
Add failure `reason`, HTTP `statusCode` and `benign` attributes to synced block fetch/subscribe
|
|
9
|
+
operational error analytics, so fetch failures can be broken down by cause (benign source-gone /
|
|
10
|
+
permission-denied vs genuine system failures) instead of regex-matching free text. Gated behind
|
|
11
|
+
`platform_editor_blocks_patch_3`; gate-off behaviour is unchanged.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`eb16de0d842fa`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eb16de0d842fa) -
|
|
16
|
+
Reconcile editor plugin APIs during gated preset reconfiguration so Markdown mode layout and
|
|
17
|
+
styling update correctly when converting between Markdown and live doc views.
|
|
18
|
+
- [`e20d01fe3d044`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e20d01fe3d044) -
|
|
19
|
+
Clean up platform_editor_add_code_block_localid now that code block local IDs are fully enabled.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 116.16.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -22,8 +22,8 @@ var codeBlockWrappedStates = exports.codeBlockWrappedStates = new WeakMap();
|
|
|
22
22
|
var getDefaultCodeBlockAttrs = exports.getDefaultCodeBlockAttrs = function getDefaultCodeBlockAttrs(attrs) {
|
|
23
23
|
var _attrs$localId;
|
|
24
24
|
var localId = (_attrs$localId = attrs === null || attrs === void 0 ? void 0 : attrs.localId) !== null && _attrs$localId !== void 0 ? _attrs$localId :
|
|
25
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
26
|
-
(0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_code_block_language_detection_flow')
|
|
25
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
26
|
+
(0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_code_block_language_detection_flow') ? _adfSchema.uuid.generate() : undefined;
|
|
27
27
|
var attrsWithLocalId = localId ? _objectSpread(_objectSpread({}, attrs), {}, {
|
|
28
28
|
localId: localId
|
|
29
29
|
}) : attrs;
|
|
@@ -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 = "116.
|
|
31
|
+
var packageVersion = "116.16.0";
|
|
32
32
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
33
33
|
// Remove URL as it has UGC
|
|
34
34
|
// Ignored via go/ees007
|
|
@@ -309,6 +309,12 @@ var EditorPluginInjectionAPI = exports.EditorPluginInjectionAPI = /*#__PURE__*/f
|
|
|
309
309
|
fireAnalyticsEvent = _ref6.fireAnalyticsEvent,
|
|
310
310
|
appearance = _ref6.appearance;
|
|
311
311
|
(0, _classCallCheck2.default)(this, EditorPluginInjectionAPI);
|
|
312
|
+
// Internal helper for preset reconfiguration. Some consumers memoize plugin
|
|
313
|
+
// APIs by the top-level proxy identity, so callers must invalidate that proxy
|
|
314
|
+
// when the registered plugin set changes.
|
|
315
|
+
(0, _defineProperty2.default)(this, "invalidateAPI", function () {
|
|
316
|
+
editorAPICache.delete(_this2);
|
|
317
|
+
});
|
|
312
318
|
(0, _defineProperty2.default)(this, "onEditorViewUpdated", function (_ref7) {
|
|
313
319
|
var newEditorState = _ref7.newEditorState,
|
|
314
320
|
oldEditorState = _ref7.oldEditorState;
|
|
@@ -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 = "116.
|
|
27
|
+
var packageVersion = "116.16.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -12,8 +12,8 @@ export const codeBlockWrappedStates = new WeakMap();
|
|
|
12
12
|
export const getDefaultCodeBlockAttrs = attrs => {
|
|
13
13
|
var _attrs$localId;
|
|
14
14
|
const localId = (_attrs$localId = attrs === null || attrs === void 0 ? void 0 : attrs.localId) !== null && _attrs$localId !== void 0 ? _attrs$localId :
|
|
15
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
16
|
-
expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_language_detection_flow')
|
|
15
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
16
|
+
expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_language_detection_flow') ? uuid.generate() : undefined;
|
|
17
17
|
const attrsWithLocalId = localId ? {
|
|
18
18
|
...attrs,
|
|
19
19
|
localId
|
|
@@ -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 = "116.
|
|
17
|
+
const packageVersion = "116.16.0";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -224,6 +224,12 @@ export class EditorPluginInjectionAPI {
|
|
|
224
224
|
fireAnalyticsEvent,
|
|
225
225
|
appearance
|
|
226
226
|
}) {
|
|
227
|
+
// Internal helper for preset reconfiguration. Some consumers memoize plugin
|
|
228
|
+
// APIs by the top-level proxy identity, so callers must invalidate that proxy
|
|
229
|
+
// when the registered plugin set changes.
|
|
230
|
+
_defineProperty(this, "invalidateAPI", () => {
|
|
231
|
+
editorAPICache.delete(this);
|
|
232
|
+
});
|
|
227
233
|
_defineProperty(this, "onEditorViewUpdated", ({
|
|
228
234
|
newEditorState,
|
|
229
235
|
oldEditorState
|
|
@@ -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 = "116.
|
|
17
|
+
const packageVersion = "116.16.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -16,8 +16,8 @@ export var codeBlockWrappedStates = new WeakMap();
|
|
|
16
16
|
export var getDefaultCodeBlockAttrs = function getDefaultCodeBlockAttrs(attrs) {
|
|
17
17
|
var _attrs$localId;
|
|
18
18
|
var localId = (_attrs$localId = attrs === null || attrs === void 0 ? void 0 : attrs.localId) !== null && _attrs$localId !== void 0 ? _attrs$localId :
|
|
19
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
20
|
-
expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_language_detection_flow')
|
|
19
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
20
|
+
expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_language_detection_flow') ? uuid.generate() : undefined;
|
|
21
21
|
var attrsWithLocalId = localId ? _objectSpread(_objectSpread({}, attrs), {}, {
|
|
22
22
|
localId: localId
|
|
23
23
|
}) : attrs;
|
|
@@ -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 = "116.
|
|
23
|
+
var packageVersion = "116.16.0";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -295,6 +295,12 @@ export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
|
|
|
295
295
|
fireAnalyticsEvent = _ref6.fireAnalyticsEvent,
|
|
296
296
|
appearance = _ref6.appearance;
|
|
297
297
|
_classCallCheck(this, EditorPluginInjectionAPI);
|
|
298
|
+
// Internal helper for preset reconfiguration. Some consumers memoize plugin
|
|
299
|
+
// APIs by the top-level proxy identity, so callers must invalidate that proxy
|
|
300
|
+
// when the registered plugin set changes.
|
|
301
|
+
_defineProperty(this, "invalidateAPI", function () {
|
|
302
|
+
editorAPICache.delete(_this2);
|
|
303
|
+
});
|
|
298
304
|
_defineProperty(this, "onEditorViewUpdated", function (_ref7) {
|
|
299
305
|
var newEditorState = _ref7.newEditorState,
|
|
300
306
|
oldEditorState = _ref7.oldEditorState;
|
|
@@ -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 = "116.
|
|
24
|
+
var packageVersion = "116.16.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -3,6 +3,17 @@ import type { ExperienceEventPayload } from './experience-events';
|
|
|
3
3
|
import type { InsertSourceSyncedBlockPayload } from './insert-events';
|
|
4
4
|
import type { PasteSource } from './paste-events';
|
|
5
5
|
import type { OperationalAEP, TrackAEP } from './utils';
|
|
6
|
+
/**
|
|
7
|
+
* Categorical failure reason emitted on synced-block operational error events.
|
|
8
|
+
*
|
|
9
|
+
* The write path (EDITOR-7796) emits the {@link SyncBlockError} enum values plus
|
|
10
|
+
* `'unknown'`. The fetch/subscribe read path (EDITOR-7862) additionally emits
|
|
11
|
+
* read-path-specific buckets (benign source-state transitions, permission outcomes,
|
|
12
|
+
* WebSocket lifecycle, and client-side readiness). Kept as a string union here so the
|
|
13
|
+
* analytics event schema is the single source of truth and the provider package can map
|
|
14
|
+
* to it without `editor-common` depending on the provider.
|
|
15
|
+
*/
|
|
16
|
+
export type SyncedBlockErrorReasonAttribute = 'errored' | 'not_found' | 'forbidden' | 'invalid_request' | 'rate_limited' | 'conflict' | 'server_error' | 'invalid_content' | 'offline' | 'unpublished' | 'aborted' | 'entity_not_found' | 'unknown' | 'source_deleted' | 'source_unpublished' | 'source_unsynced' | 'source_not_found' | 'permission_denied' | 'unauthenticated' | 'websocket_drop' | 'websocket_exhausted' | 'network' | 'data_provider_not_ready';
|
|
6
17
|
type SyncedBlockErrorAttributes = {
|
|
7
18
|
error: string;
|
|
8
19
|
resourceId?: string;
|
|
@@ -11,6 +22,20 @@ type SyncedBlockErrorAttributes = {
|
|
|
11
22
|
* Always optional because batch / subscription init paths fire without a `resourceId`.
|
|
12
23
|
*/
|
|
13
24
|
sourceProduct?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Categorical failure cause for dashboard grouping. Only emitted when the
|
|
27
|
+
* `platform_editor_blocks_patch_3` gate is enabled (EDITOR-7796 / EDITOR-7862).
|
|
28
|
+
*/
|
|
29
|
+
reason?: SyncedBlockErrorReasonAttribute;
|
|
30
|
+
/** Backend HTTP status code when the failure came from a `BlockError`. */
|
|
31
|
+
statusCode?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the failure reason is a benign/working-as-designed outcome (e.g. the source
|
|
34
|
+
* was intentionally deleted/unpublished, or permission denied) rather than a genuine
|
|
35
|
+
* system failure. Lets the dashboard compute a true error rate without free-text regex.
|
|
36
|
+
* Only emitted on fetch/subscribe error events when the gate is enabled (EDITOR-7862).
|
|
37
|
+
*/
|
|
38
|
+
benign?: boolean;
|
|
14
39
|
};
|
|
15
40
|
type SyncedBlockSuccessAttributes = {
|
|
16
41
|
blockInstanceId?: string;
|
|
@@ -58,6 +58,7 @@ export declare class EditorPluginInjectionAPI implements PluginInjectionAPIDefin
|
|
|
58
58
|
}>;
|
|
59
59
|
private createAPI;
|
|
60
60
|
api(): GenericAPIWithCore;
|
|
61
|
+
invalidateAPI: () => void;
|
|
61
62
|
onEditorViewUpdated: ({ newEditorState, oldEditorState }: EditorStateDiff) => void;
|
|
62
63
|
onEditorPluginInitialized: (plugin: NextEditorPluginInitializedType) => void;
|
|
63
64
|
retainPlugins: (keptPluginNames: ReadonlySet<string>) => string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "116.
|
|
3
|
+
"version": "116.17.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/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^12.1.0",
|
|
38
38
|
"@atlaskit/atlassian-context": "^1.0.0",
|
|
39
39
|
"@atlaskit/browser-apis": "^1.1.0",
|
|
40
|
-
"@atlaskit/button": "^24.
|
|
40
|
+
"@atlaskit/button": "^24.3.0",
|
|
41
41
|
"@atlaskit/codemod-utils": "^5.0.0",
|
|
42
42
|
"@atlaskit/css": "^1.0.0",
|
|
43
43
|
"@atlaskit/custom-steps": "^1.0.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@atlaskit/onboarding": "^15.1.0",
|
|
69
69
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
70
70
|
"@atlaskit/platform-feature-flags-react": "^1.1.0",
|
|
71
|
-
"@atlaskit/primitives": "^20.
|
|
71
|
+
"@atlaskit/primitives": "^20.2.0",
|
|
72
72
|
"@atlaskit/profilecard": "^26.4.0",
|
|
73
73
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
74
74
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"@atlaskit/task-decision": "^21.4.0",
|
|
81
81
|
"@atlaskit/teams-app-config": "^2.1.0",
|
|
82
82
|
"@atlaskit/textfield": "^9.1.0",
|
|
83
|
-
"@atlaskit/tmp-editor-statsig": "^114.
|
|
84
|
-
"@atlaskit/tokens": "^15.
|
|
83
|
+
"@atlaskit/tmp-editor-statsig": "^114.4.0",
|
|
84
|
+
"@atlaskit/tokens": "^15.2.0",
|
|
85
85
|
"@atlaskit/tooltip": "^23.1.0",
|
|
86
86
|
"@atlaskit/width-detector": "^6.1.0",
|
|
87
87
|
"@babel/runtime": "^7.0.0",
|
|
@@ -260,9 +260,6 @@
|
|
|
260
260
|
"platform_editor_ai_selection_local_ids": {
|
|
261
261
|
"type": "boolean"
|
|
262
262
|
},
|
|
263
|
-
"platform_editor_add_code_block_localid": {
|
|
264
|
-
"type": "boolean"
|
|
265
|
-
},
|
|
266
263
|
"platform_editor_code_block_language_detection_flow": {
|
|
267
264
|
"type": "boolean"
|
|
268
265
|
}
|