@atlaskit/editor-core 198.3.0 → 198.3.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/composable-editor/hooks/useEditorMeasuresConstructor.js +1 -16
  3. package/dist/cjs/composable-editor/hooks/useMeasureEditorMountTime.js +1 -1
  4. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
  5. package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +1 -1
  6. package/dist/cjs/version-wrapper.js +1 -1
  7. package/dist/es2019/composable-editor/hooks/useEditorMeasuresConstructor.js +1 -16
  8. package/dist/es2019/composable-editor/hooks/useMeasureEditorMountTime.js +1 -1
  9. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +1 -1
  10. package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +1 -1
  11. package/dist/es2019/version-wrapper.js +1 -1
  12. package/dist/esm/composable-editor/hooks/useEditorMeasuresConstructor.js +1 -16
  13. package/dist/esm/composable-editor/hooks/useMeasureEditorMountTime.js +1 -1
  14. package/dist/esm/ui/Appearance/Comment/Toolbar.js +1 -1
  15. package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +1 -1
  16. package/dist/esm/version-wrapper.js +1 -1
  17. package/dist/types/composable-editor/hooks/useEditorMeasuresConstructor.d.ts +1 -11
  18. package/dist/types/create-editor/create-universal-preset.d.ts +11 -0
  19. package/dist/types/presets/default.d.ts +10 -0
  20. package/dist/types/presets/universal.d.ts +11 -0
  21. package/dist/types/presets/useUniversalPreset.d.ts +11 -0
  22. package/dist/types-ts4.5/composable-editor/hooks/useEditorMeasuresConstructor.d.ts +1 -11
  23. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +11 -0
  24. package/dist/types-ts4.5/presets/default.d.ts +10 -0
  25. package/dist/types-ts4.5/presets/universal.d.ts +11 -0
  26. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +11 -0
  27. package/package.json +12 -8
  28. package/dist/cjs/composable-editor/utils/editorMeasureTTICallback.js +0 -45
  29. package/dist/es2019/composable-editor/utils/editorMeasureTTICallback.js +0 -41
  30. package/dist/esm/composable-editor/utils/editorMeasureTTICallback.js +0 -39
  31. package/dist/types/composable-editor/utils/editorMeasureTTICallback.d.ts +0 -5
  32. package/dist/types-ts4.5/composable-editor/utils/editorMeasureTTICallback.d.ts +0 -5
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = editorMeasureTTICallback;
7
- var _analytics = require("@atlaskit/editor-common/analytics");
8
- var _measureTti = require("@atlaskit/editor-common/performance/measure-tti");
9
- var _ufo = require("@atlaskit/editor-common/ufo");
10
- function editorMeasureTTICallback(tti, ttiFromInvocation, canceled, distortedDuration, performanceTracking, featureFlags, createAnalyticsEvent, experienceStore) {
11
- var _performanceTracking$;
12
- if (performanceTracking !== null && performanceTracking !== void 0 && (_performanceTracking$ = performanceTracking.ttiTracking) !== null && _performanceTracking$ !== void 0 && _performanceTracking$.enabled && createAnalyticsEvent) {
13
- var _ttiTracking;
14
- var ttiEvent = {
15
- payload: {
16
- action: _analytics.ACTION.EDITOR_TTI,
17
- actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
18
- attributes: {
19
- tti: tti,
20
- ttiFromInvocation: ttiFromInvocation,
21
- canceled: canceled,
22
- distortedDuration: distortedDuration
23
- },
24
- eventType: _analytics.EVENT_TYPE.OPERATIONAL
25
- }
26
- };
27
- if ((_ttiTracking = performanceTracking.ttiTracking) !== null && _ttiTracking !== void 0 && _ttiTracking.trackSeverity) {
28
- var _ttiTracking2 = performanceTracking.ttiTracking,
29
- ttiSeverityNormalThreshold = _ttiTracking2.ttiSeverityNormalThreshold,
30
- ttiSeverityDegradedThreshold = _ttiTracking2.ttiSeverityDegradedThreshold,
31
- ttiFromInvocationSeverityNormalThreshold = _ttiTracking2.ttiFromInvocationSeverityNormalThreshold,
32
- ttiFromInvocationSeverityDegradedThreshold = _ttiTracking2.ttiFromInvocationSeverityDegradedThreshold;
33
- var _getTTISeverity = (0, _measureTti.getTTISeverity)(tti, ttiFromInvocation, ttiSeverityNormalThreshold, ttiSeverityDegradedThreshold, ttiFromInvocationSeverityNormalThreshold, ttiFromInvocationSeverityDegradedThreshold),
34
- ttiSeverity = _getTTISeverity.ttiSeverity,
35
- ttiFromInvocationSeverity = _getTTISeverity.ttiFromInvocationSeverity;
36
- ttiEvent.payload.attributes.ttiSeverity = ttiSeverity;
37
- ttiEvent.payload.attributes.ttiFromInvocationSeverity = ttiFromInvocationSeverity;
38
- }
39
- (0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)(ttiEvent);
40
- }
41
- if (featureFlags !== null && featureFlags !== void 0 && featureFlags.ufo) {
42
- experienceStore === null || experienceStore === void 0 || experienceStore.mark(_ufo.EditorExperience.loadEditor, _analytics.ACTION.EDITOR_TTI, tti);
43
- experienceStore === null || experienceStore === void 0 || experienceStore.success(_ufo.EditorExperience.loadEditor);
44
- }
45
- }
@@ -1,41 +0,0 @@
1
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
- import { getTTISeverity } from '@atlaskit/editor-common/performance/measure-tti';
3
- import { EditorExperience } from '@atlaskit/editor-common/ufo';
4
- export default function editorMeasureTTICallback(tti, ttiFromInvocation, canceled, distortedDuration, performanceTracking, featureFlags, createAnalyticsEvent, experienceStore) {
5
- var _performanceTracking$;
6
- if (performanceTracking !== null && performanceTracking !== void 0 && (_performanceTracking$ = performanceTracking.ttiTracking) !== null && _performanceTracking$ !== void 0 && _performanceTracking$.enabled && createAnalyticsEvent) {
7
- var _ttiTracking;
8
- const ttiEvent = {
9
- payload: {
10
- action: ACTION.EDITOR_TTI,
11
- actionSubject: ACTION_SUBJECT.EDITOR,
12
- attributes: {
13
- tti,
14
- ttiFromInvocation,
15
- canceled,
16
- distortedDuration
17
- },
18
- eventType: EVENT_TYPE.OPERATIONAL
19
- }
20
- };
21
- if ((_ttiTracking = performanceTracking.ttiTracking) !== null && _ttiTracking !== void 0 && _ttiTracking.trackSeverity) {
22
- const {
23
- ttiSeverityNormalThreshold,
24
- ttiSeverityDegradedThreshold,
25
- ttiFromInvocationSeverityNormalThreshold,
26
- ttiFromInvocationSeverityDegradedThreshold
27
- } = performanceTracking.ttiTracking;
28
- const {
29
- ttiSeverity,
30
- ttiFromInvocationSeverity
31
- } = getTTISeverity(tti, ttiFromInvocation, ttiSeverityNormalThreshold, ttiSeverityDegradedThreshold, ttiFromInvocationSeverityNormalThreshold, ttiFromInvocationSeverityDegradedThreshold);
32
- ttiEvent.payload.attributes.ttiSeverity = ttiSeverity;
33
- ttiEvent.payload.attributes.ttiFromInvocationSeverity = ttiFromInvocationSeverity;
34
- }
35
- fireAnalyticsEvent(createAnalyticsEvent)(ttiEvent);
36
- }
37
- if (featureFlags !== null && featureFlags !== void 0 && featureFlags.ufo) {
38
- experienceStore === null || experienceStore === void 0 ? void 0 : experienceStore.mark(EditorExperience.loadEditor, ACTION.EDITOR_TTI, tti);
39
- experienceStore === null || experienceStore === void 0 ? void 0 : experienceStore.success(EditorExperience.loadEditor);
40
- }
41
- }
@@ -1,39 +0,0 @@
1
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
- import { getTTISeverity } from '@atlaskit/editor-common/performance/measure-tti';
3
- import { EditorExperience } from '@atlaskit/editor-common/ufo';
4
- export default function editorMeasureTTICallback(tti, ttiFromInvocation, canceled, distortedDuration, performanceTracking, featureFlags, createAnalyticsEvent, experienceStore) {
5
- var _performanceTracking$;
6
- if (performanceTracking !== null && performanceTracking !== void 0 && (_performanceTracking$ = performanceTracking.ttiTracking) !== null && _performanceTracking$ !== void 0 && _performanceTracking$.enabled && createAnalyticsEvent) {
7
- var _ttiTracking;
8
- var ttiEvent = {
9
- payload: {
10
- action: ACTION.EDITOR_TTI,
11
- actionSubject: ACTION_SUBJECT.EDITOR,
12
- attributes: {
13
- tti: tti,
14
- ttiFromInvocation: ttiFromInvocation,
15
- canceled: canceled,
16
- distortedDuration: distortedDuration
17
- },
18
- eventType: EVENT_TYPE.OPERATIONAL
19
- }
20
- };
21
- if ((_ttiTracking = performanceTracking.ttiTracking) !== null && _ttiTracking !== void 0 && _ttiTracking.trackSeverity) {
22
- var _ttiTracking2 = performanceTracking.ttiTracking,
23
- ttiSeverityNormalThreshold = _ttiTracking2.ttiSeverityNormalThreshold,
24
- ttiSeverityDegradedThreshold = _ttiTracking2.ttiSeverityDegradedThreshold,
25
- ttiFromInvocationSeverityNormalThreshold = _ttiTracking2.ttiFromInvocationSeverityNormalThreshold,
26
- ttiFromInvocationSeverityDegradedThreshold = _ttiTracking2.ttiFromInvocationSeverityDegradedThreshold;
27
- var _getTTISeverity = getTTISeverity(tti, ttiFromInvocation, ttiSeverityNormalThreshold, ttiSeverityDegradedThreshold, ttiFromInvocationSeverityNormalThreshold, ttiFromInvocationSeverityDegradedThreshold),
28
- ttiSeverity = _getTTISeverity.ttiSeverity,
29
- ttiFromInvocationSeverity = _getTTISeverity.ttiFromInvocationSeverity;
30
- ttiEvent.payload.attributes.ttiSeverity = ttiSeverity;
31
- ttiEvent.payload.attributes.ttiFromInvocationSeverity = ttiFromInvocationSeverity;
32
- }
33
- fireAnalyticsEvent(createAnalyticsEvent)(ttiEvent);
34
- }
35
- if (featureFlags !== null && featureFlags !== void 0 && featureFlags.ufo) {
36
- experienceStore === null || experienceStore === void 0 || experienceStore.mark(EditorExperience.loadEditor, ACTION.EDITOR_TTI, tti);
37
- experienceStore === null || experienceStore === void 0 || experienceStore.success(EditorExperience.loadEditor);
38
- }
39
- }
@@ -1,5 +0,0 @@
1
- import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
2
- import type { ExperienceStore } from '@atlaskit/editor-common/ufo';
3
- import type { EditorProps } from '../../types/editor-props';
4
- import type { PerformanceTracking } from '../../types/performance-tracking';
5
- export default function editorMeasureTTICallback(tti: number, ttiFromInvocation: number, canceled: boolean, distortedDuration: boolean, performanceTracking: PerformanceTracking | undefined, featureFlags: EditorProps['featureFlags'], createAnalyticsEvent?: CreateUIAnalyticsEvent, experienceStore?: ExperienceStore): void;
@@ -1,5 +0,0 @@
1
- import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
2
- import type { ExperienceStore } from '@atlaskit/editor-common/ufo';
3
- import type { EditorProps } from '../../types/editor-props';
4
- import type { PerformanceTracking } from '../../types/performance-tracking';
5
- export default function editorMeasureTTICallback(tti: number, ttiFromInvocation: number, canceled: boolean, distortedDuration: boolean, performanceTracking: PerformanceTracking | undefined, featureFlags: EditorProps['featureFlags'], createAnalyticsEvent?: CreateUIAnalyticsEvent, experienceStore?: ExperienceStore): void;