@atlaskit/editor-common 110.10.3 → 110.10.4
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 +12 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/toolbar/context.js +4 -2
- package/dist/cjs/toolbar-flag-check.js +1 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/toolbar/context.js +4 -2
- package/dist/es2019/toolbar-flag-check.js +1 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/toolbar/context.js +4 -2
- package/dist/esm/toolbar-flag-check.js +1 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/block-menu-events.d.ts +21 -3
- package/dist/types/analytics/types/enums.d.ts +2 -1
- package/dist/types/analytics/types/events.d.ts +3 -3
- package/dist/types/toolbar/context.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/block-menu-events.d.ts +21 -3
- package/dist/types-ts4.5/analytics/types/enums.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/events.d.ts +3 -3
- package/dist/types-ts4.5/toolbar/context.d.ts +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 110.10.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`14b9e966da4dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/14b9e966da4dd) -
|
|
8
|
+
[ux] ED-29517 Toolbar and offline banner is overlapping
|
|
9
|
+
- [`ef001bf65d48f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef001bf65d48f) -
|
|
10
|
+
Remove usage of `platform_editor_toolbar_aifc` inside editor packages - instead rely on checking
|
|
11
|
+
for new toolbar plugin option, make `enableNewToolbarExperience` mandatory for consumers to opt in
|
|
12
|
+
to new toolbar experience
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 110.10.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -517,6 +517,7 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
|
|
|
517
517
|
ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN"] = "editorPluginSelectionExtensionDropdown";
|
|
518
518
|
ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM"] = "editorPluginSelectionExtensionItem";
|
|
519
519
|
ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT"] = "editorPluginSelectionExtensionComponent";
|
|
520
|
+
ACTION_SUBJECT_ID["TRANSFORM"] = "transform";
|
|
520
521
|
return ACTION_SUBJECT_ID;
|
|
521
522
|
}({});
|
|
522
523
|
var FLOATING_CONTROLS_TITLE = exports.FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "110.10.
|
|
19
|
+
var packageVersion = "110.10.3";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -29,13 +29,15 @@ var EditorToolbarProvider = exports.EditorToolbarProvider = function EditorToolb
|
|
|
29
29
|
editorView = _ref.editorView,
|
|
30
30
|
editorAppearance = _ref.editorAppearance,
|
|
31
31
|
editorViewMode = _ref.editorViewMode,
|
|
32
|
-
editorToolbarDockingPreference = _ref.editorToolbarDockingPreference
|
|
32
|
+
editorToolbarDockingPreference = _ref.editorToolbarDockingPreference,
|
|
33
|
+
isOffline = _ref.isOffline;
|
|
33
34
|
return /*#__PURE__*/_react.default.createElement(EditorToolbarContext.Provider, {
|
|
34
35
|
value: {
|
|
35
36
|
editorView: editorView,
|
|
36
37
|
editorAppearance: editorAppearance,
|
|
37
38
|
editorViewMode: editorViewMode,
|
|
38
|
-
editorToolbarDockingPreference: editorToolbarDockingPreference
|
|
39
|
+
editorToolbarDockingPreference: editorToolbarDockingPreference,
|
|
40
|
+
isOffline: isOffline
|
|
39
41
|
}
|
|
40
42
|
}, children);
|
|
41
43
|
};
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.areToolbarFlagsEnabled = void 0;
|
|
7
7
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
8
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
9
8
|
var areToolbarFlagsEnabled = exports.areToolbarFlagsEnabled = function areToolbarFlagsEnabled(isNewToolbarEnabled) {
|
|
10
|
-
return Boolean((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1') || isNewToolbarEnabled
|
|
9
|
+
return Boolean((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1') || isNewToolbarEnabled);
|
|
11
10
|
};
|
|
@@ -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 = "110.10.
|
|
27
|
+
var packageVersion = "110.10.3";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -511,6 +511,7 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
511
511
|
ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN"] = "editorPluginSelectionExtensionDropdown";
|
|
512
512
|
ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM"] = "editorPluginSelectionExtensionItem";
|
|
513
513
|
ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT"] = "editorPluginSelectionExtensionComponent";
|
|
514
|
+
ACTION_SUBJECT_ID["TRANSFORM"] = "transform";
|
|
514
515
|
return ACTION_SUBJECT_ID;
|
|
515
516
|
}({});
|
|
516
517
|
export let FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
|
|
@@ -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 = "110.10.
|
|
4
|
+
const packageVersion = "110.10.3";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -21,14 +21,16 @@ export const EditorToolbarProvider = ({
|
|
|
21
21
|
editorView,
|
|
22
22
|
editorAppearance,
|
|
23
23
|
editorViewMode,
|
|
24
|
-
editorToolbarDockingPreference
|
|
24
|
+
editorToolbarDockingPreference,
|
|
25
|
+
isOffline
|
|
25
26
|
}) => {
|
|
26
27
|
return /*#__PURE__*/React.createElement(EditorToolbarContext.Provider, {
|
|
27
28
|
value: {
|
|
28
29
|
editorView,
|
|
29
30
|
editorAppearance,
|
|
30
31
|
editorViewMode,
|
|
31
|
-
editorToolbarDockingPreference
|
|
32
|
+
editorToolbarDockingPreference,
|
|
33
|
+
isOffline
|
|
32
34
|
}
|
|
33
35
|
}, children);
|
|
34
36
|
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
2
|
-
|
|
3
|
-
export const areToolbarFlagsEnabled = isNewToolbarEnabled => Boolean(expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') || isNewToolbarEnabled && editorExperiment('platform_editor_toolbar_aifc', true));
|
|
2
|
+
export const areToolbarFlagsEnabled = isNewToolbarEnabled => Boolean(expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') || isNewToolbarEnabled);
|
|
@@ -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 = "110.10.
|
|
17
|
+
const packageVersion = "110.10.3";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -511,6 +511,7 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
511
511
|
ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN"] = "editorPluginSelectionExtensionDropdown";
|
|
512
512
|
ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM"] = "editorPluginSelectionExtensionItem";
|
|
513
513
|
ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT"] = "editorPluginSelectionExtensionComponent";
|
|
514
|
+
ACTION_SUBJECT_ID["TRANSFORM"] = "transform";
|
|
514
515
|
return ACTION_SUBJECT_ID;
|
|
515
516
|
}({});
|
|
516
517
|
export var FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
|
|
@@ -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 = "110.10.
|
|
10
|
+
var packageVersion = "110.10.3";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -21,13 +21,15 @@ export var EditorToolbarProvider = function EditorToolbarProvider(_ref) {
|
|
|
21
21
|
editorView = _ref.editorView,
|
|
22
22
|
editorAppearance = _ref.editorAppearance,
|
|
23
23
|
editorViewMode = _ref.editorViewMode,
|
|
24
|
-
editorToolbarDockingPreference = _ref.editorToolbarDockingPreference
|
|
24
|
+
editorToolbarDockingPreference = _ref.editorToolbarDockingPreference,
|
|
25
|
+
isOffline = _ref.isOffline;
|
|
25
26
|
return /*#__PURE__*/React.createElement(EditorToolbarContext.Provider, {
|
|
26
27
|
value: {
|
|
27
28
|
editorView: editorView,
|
|
28
29
|
editorAppearance: editorAppearance,
|
|
29
30
|
editorViewMode: editorViewMode,
|
|
30
|
-
editorToolbarDockingPreference: editorToolbarDockingPreference
|
|
31
|
+
editorToolbarDockingPreference: editorToolbarDockingPreference,
|
|
32
|
+
isOffline: isOffline
|
|
31
33
|
}
|
|
32
34
|
}, children);
|
|
33
35
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
2
|
export var areToolbarFlagsEnabled = function areToolbarFlagsEnabled(isNewToolbarEnabled) {
|
|
4
|
-
return Boolean(expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') || isNewToolbarEnabled
|
|
3
|
+
return Boolean(expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') || isNewToolbarEnabled);
|
|
5
4
|
};
|
|
@@ -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 = "110.10.
|
|
24
|
+
var packageVersion = "110.10.3";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ACTION, ACTION_SUBJECT, INPUT_METHOD } from './enums';
|
|
2
|
-
import type { UIAEP, TrackAEP } from './utils';
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
2
|
+
import type { UIAEP, TrackAEP, OperationalAEP, SELECTION_TYPE } from './utils';
|
|
3
3
|
export type BlockMenuOpenedAEP = UIAEP<ACTION.OPENED, ACTION_SUBJECT.BLOCK_MENU, undefined, {
|
|
4
4
|
inputMethod: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
|
|
5
5
|
}, undefined>;
|
|
@@ -15,5 +15,23 @@ interface ElementConvertedAttr {
|
|
|
15
15
|
triggeredFrom: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
|
|
16
16
|
}
|
|
17
17
|
type ElementConvertedAEP = TrackAEP<ACTION.CONVERTED, ACTION_SUBJECT.ELEMENT, undefined, ElementConvertedAttr, undefined>;
|
|
18
|
-
|
|
18
|
+
type SelectionJson = {
|
|
19
|
+
anchor?: number;
|
|
20
|
+
head?: number;
|
|
21
|
+
pos?: number;
|
|
22
|
+
type: SELECTION_TYPE;
|
|
23
|
+
};
|
|
24
|
+
interface ElementTransformErrorAttr {
|
|
25
|
+
docSize: number;
|
|
26
|
+
error: string;
|
|
27
|
+
errorStack?: string;
|
|
28
|
+
from: string;
|
|
29
|
+
inputMethod: INPUT_METHOD.BLOCK_MENU;
|
|
30
|
+
position: number;
|
|
31
|
+
selection: SelectionJson;
|
|
32
|
+
to: string;
|
|
33
|
+
triggeredFrom: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
|
|
34
|
+
}
|
|
35
|
+
export type ElementTransformErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.ELEMENT, ACTION_SUBJECT_ID.TRANSFORM, ElementTransformErrorAttr>;
|
|
36
|
+
export type BlockMenuEventPayload = BlockMenuOpenedAEP | BlockMenuItemClickedAEP | ElementConvertedAEP | ElementTransformErrorAEP;
|
|
19
37
|
export {};
|
|
@@ -502,7 +502,8 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
502
502
|
SELECTION_TOOLBAR = "selectionToolbar",
|
|
503
503
|
EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN = "editorPluginSelectionExtensionDropdown",
|
|
504
504
|
EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM = "editorPluginSelectionExtensionItem",
|
|
505
|
-
EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT = "editorPluginSelectionExtensionComponent"
|
|
505
|
+
EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT = "editorPluginSelectionExtensionComponent",
|
|
506
|
+
TRANSFORM = "transform"
|
|
506
507
|
}
|
|
507
508
|
export declare enum FLOATING_CONTROLS_TITLE {
|
|
508
509
|
CODE_BLOCK = "codeBlockFloatingControls",
|
|
@@ -13,7 +13,7 @@ import type { AIStreamingEventPayload } from './ai-streaming';
|
|
|
13
13
|
import type { AIUnifiedEventPayload } from './ai-unified-events';
|
|
14
14
|
import type { AlignmentEventPayload } from './alignment-events';
|
|
15
15
|
import type { AvatarEventPayload } from './avatar';
|
|
16
|
-
import type { BlockMenuEventPayload } from './block-menu-events';
|
|
16
|
+
import type { BlockMenuEventPayload, ElementTransformErrorAEP } from './block-menu-events';
|
|
17
17
|
import type { BreakoutEventPayload } from './breakout-events';
|
|
18
18
|
import type { TextColorEventPayload } from './color-events';
|
|
19
19
|
import type { ConfigPanelEventPayload } from './config-panel-events';
|
|
@@ -156,7 +156,7 @@ export type ErrorEventAttributes = {
|
|
|
156
156
|
outdatedBrowser?: boolean;
|
|
157
157
|
product?: string;
|
|
158
158
|
};
|
|
159
|
-
type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON | ACTION_SUBJECT.PLUGIN_SLOT | ACTION_SUBJECT.REACT_NODE_VIEW | ACTION_SUBJECT.TABLES_PLUGIN | ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN | ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID | FLOATING_CONTROLS_TITLE, ErrorEventAttributes>;
|
|
159
|
+
type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON | ACTION_SUBJECT.PLUGIN_SLOT | ACTION_SUBJECT.REACT_NODE_VIEW | ACTION_SUBJECT.TABLES_PLUGIN | ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN | ACTION_SUBJECT.EDITOR | ACTION_SUBJECT.BLOCK_MENU, ACTION_SUBJECT_ID | FLOATING_CONTROLS_TITLE, ErrorEventAttributes>;
|
|
160
160
|
type ComponentCrashAdditionalInfoErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED_ADDITIONAL_INFORMATION, ACTION_SUBJECT.EDITOR, undefined, {
|
|
161
161
|
errorId: string;
|
|
162
162
|
}>;
|
|
@@ -164,7 +164,7 @@ type SmartLinkErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.SMART_LIN
|
|
|
164
164
|
error: string;
|
|
165
165
|
errorStack?: string;
|
|
166
166
|
}>;
|
|
167
|
-
export type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | InvalidDocumentEncounteredAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | PickerErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP | SmartLinkErrorAEP;
|
|
167
|
+
export type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | InvalidDocumentEncounteredAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | PickerErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP | SmartLinkErrorAEP | ElementTransformErrorAEP;
|
|
168
168
|
export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
|
|
169
169
|
export type FireAnalyticsCallback = <T>(payload: FireAnalyticsEventPayload<T>) => void | undefined;
|
|
170
170
|
export type FireAnalyticsEvent = (createAnalyticsEvent?: CreateUIAnalyticsEvent, options?: FireAnalyticsEventOptions) => FireAnalyticsCallback;
|
|
@@ -7,6 +7,7 @@ export type EditorToolbarContextType = {
|
|
|
7
7
|
editorToolbarDockingPreference?: ToolbarDocking;
|
|
8
8
|
editorView: EditorView | null;
|
|
9
9
|
editorViewMode?: 'edit' | 'view';
|
|
10
|
+
isOffline?: boolean;
|
|
10
11
|
};
|
|
11
12
|
/**
|
|
12
13
|
* Access editor specific config and state within a toolbar component
|
|
@@ -15,5 +16,5 @@ export declare const useEditorToolbar: () => EditorToolbarContextType;
|
|
|
15
16
|
type EditorToolbarProviderProps = {
|
|
16
17
|
children: React.ReactNode;
|
|
17
18
|
} & EditorToolbarContextType;
|
|
18
|
-
export declare const EditorToolbarProvider: ({ children, editorView, editorAppearance, editorViewMode, editorToolbarDockingPreference, }: EditorToolbarProviderProps) => React.JSX.Element;
|
|
19
|
+
export declare const EditorToolbarProvider: ({ children, editorView, editorAppearance, editorViewMode, editorToolbarDockingPreference, isOffline, }: EditorToolbarProviderProps) => React.JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ACTION, ACTION_SUBJECT, INPUT_METHOD } from './enums';
|
|
2
|
-
import type { UIAEP, TrackAEP } from './utils';
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
2
|
+
import type { UIAEP, TrackAEP, OperationalAEP, SELECTION_TYPE } from './utils';
|
|
3
3
|
export type BlockMenuOpenedAEP = UIAEP<ACTION.OPENED, ACTION_SUBJECT.BLOCK_MENU, undefined, {
|
|
4
4
|
inputMethod: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
|
|
5
5
|
}, undefined>;
|
|
@@ -15,5 +15,23 @@ interface ElementConvertedAttr {
|
|
|
15
15
|
triggeredFrom: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
|
|
16
16
|
}
|
|
17
17
|
type ElementConvertedAEP = TrackAEP<ACTION.CONVERTED, ACTION_SUBJECT.ELEMENT, undefined, ElementConvertedAttr, undefined>;
|
|
18
|
-
|
|
18
|
+
type SelectionJson = {
|
|
19
|
+
anchor?: number;
|
|
20
|
+
head?: number;
|
|
21
|
+
pos?: number;
|
|
22
|
+
type: SELECTION_TYPE;
|
|
23
|
+
};
|
|
24
|
+
interface ElementTransformErrorAttr {
|
|
25
|
+
docSize: number;
|
|
26
|
+
error: string;
|
|
27
|
+
errorStack?: string;
|
|
28
|
+
from: string;
|
|
29
|
+
inputMethod: INPUT_METHOD.BLOCK_MENU;
|
|
30
|
+
position: number;
|
|
31
|
+
selection: SelectionJson;
|
|
32
|
+
to: string;
|
|
33
|
+
triggeredFrom: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
|
|
34
|
+
}
|
|
35
|
+
export type ElementTransformErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.ELEMENT, ACTION_SUBJECT_ID.TRANSFORM, ElementTransformErrorAttr>;
|
|
36
|
+
export type BlockMenuEventPayload = BlockMenuOpenedAEP | BlockMenuItemClickedAEP | ElementConvertedAEP | ElementTransformErrorAEP;
|
|
19
37
|
export {};
|
|
@@ -502,7 +502,8 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
502
502
|
SELECTION_TOOLBAR = "selectionToolbar",
|
|
503
503
|
EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN = "editorPluginSelectionExtensionDropdown",
|
|
504
504
|
EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM = "editorPluginSelectionExtensionItem",
|
|
505
|
-
EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT = "editorPluginSelectionExtensionComponent"
|
|
505
|
+
EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT = "editorPluginSelectionExtensionComponent",
|
|
506
|
+
TRANSFORM = "transform"
|
|
506
507
|
}
|
|
507
508
|
export declare enum FLOATING_CONTROLS_TITLE {
|
|
508
509
|
CODE_BLOCK = "codeBlockFloatingControls",
|
|
@@ -13,7 +13,7 @@ import type { AIStreamingEventPayload } from './ai-streaming';
|
|
|
13
13
|
import type { AIUnifiedEventPayload } from './ai-unified-events';
|
|
14
14
|
import type { AlignmentEventPayload } from './alignment-events';
|
|
15
15
|
import type { AvatarEventPayload } from './avatar';
|
|
16
|
-
import type { BlockMenuEventPayload } from './block-menu-events';
|
|
16
|
+
import type { BlockMenuEventPayload, ElementTransformErrorAEP } from './block-menu-events';
|
|
17
17
|
import type { BreakoutEventPayload } from './breakout-events';
|
|
18
18
|
import type { TextColorEventPayload } from './color-events';
|
|
19
19
|
import type { ConfigPanelEventPayload } from './config-panel-events';
|
|
@@ -156,7 +156,7 @@ export type ErrorEventAttributes = {
|
|
|
156
156
|
outdatedBrowser?: boolean;
|
|
157
157
|
product?: string;
|
|
158
158
|
};
|
|
159
|
-
type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON | ACTION_SUBJECT.PLUGIN_SLOT | ACTION_SUBJECT.REACT_NODE_VIEW | ACTION_SUBJECT.TABLES_PLUGIN | ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN | ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID | FLOATING_CONTROLS_TITLE, ErrorEventAttributes>;
|
|
159
|
+
type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON | ACTION_SUBJECT.PLUGIN_SLOT | ACTION_SUBJECT.REACT_NODE_VIEW | ACTION_SUBJECT.TABLES_PLUGIN | ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN | ACTION_SUBJECT.EDITOR | ACTION_SUBJECT.BLOCK_MENU, ACTION_SUBJECT_ID | FLOATING_CONTROLS_TITLE, ErrorEventAttributes>;
|
|
160
160
|
type ComponentCrashAdditionalInfoErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED_ADDITIONAL_INFORMATION, ACTION_SUBJECT.EDITOR, undefined, {
|
|
161
161
|
errorId: string;
|
|
162
162
|
}>;
|
|
@@ -164,7 +164,7 @@ type SmartLinkErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.SMART_LIN
|
|
|
164
164
|
error: string;
|
|
165
165
|
errorStack?: string;
|
|
166
166
|
}>;
|
|
167
|
-
export type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | InvalidDocumentEncounteredAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | PickerErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP | SmartLinkErrorAEP;
|
|
167
|
+
export type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | InvalidDocumentEncounteredAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | PickerErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP | SmartLinkErrorAEP | ElementTransformErrorAEP;
|
|
168
168
|
export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
|
|
169
169
|
export type FireAnalyticsCallback = <T>(payload: FireAnalyticsEventPayload<T>) => void | undefined;
|
|
170
170
|
export type FireAnalyticsEvent = (createAnalyticsEvent?: CreateUIAnalyticsEvent, options?: FireAnalyticsEventOptions) => FireAnalyticsCallback;
|
|
@@ -7,6 +7,7 @@ export type EditorToolbarContextType = {
|
|
|
7
7
|
editorToolbarDockingPreference?: ToolbarDocking;
|
|
8
8
|
editorView: EditorView | null;
|
|
9
9
|
editorViewMode?: 'edit' | 'view';
|
|
10
|
+
isOffline?: boolean;
|
|
10
11
|
};
|
|
11
12
|
/**
|
|
12
13
|
* Access editor specific config and state within a toolbar component
|
|
@@ -15,5 +16,5 @@ export declare const useEditorToolbar: () => EditorToolbarContextType;
|
|
|
15
16
|
type EditorToolbarProviderProps = {
|
|
16
17
|
children: React.ReactNode;
|
|
17
18
|
} & EditorToolbarContextType;
|
|
18
|
-
export declare const EditorToolbarProvider: ({ children, editorView, editorAppearance, editorViewMode, editorToolbarDockingPreference, }: EditorToolbarProviderProps) => React.JSX.Element;
|
|
19
|
+
export declare const EditorToolbarProvider: ({ children, editorView, editorAppearance, editorViewMode, editorToolbarDockingPreference, isOffline, }: EditorToolbarProviderProps) => React.JSX.Element;
|
|
19
20
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "110.10.
|
|
3
|
+
"version": "110.10.4",
|
|
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/"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/editor-json-transformer": "^8.30.0",
|
|
47
47
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
48
48
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
49
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
49
|
+
"@atlaskit/editor-shared-styles": "^3.7.0",
|
|
50
50
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
51
51
|
"@atlaskit/editor-toolbar": "^0.15.0",
|
|
52
52
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|