@atlaskit/editor-core 207.0.5 → 207.0.7

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 (48) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/composable-editor/core-editor.js +9 -2
  3. package/dist/cjs/create-editor/ReactEditorView.js +3 -2
  4. package/dist/cjs/ui/Appearance/Chromeless.js +1 -1
  5. package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
  6. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -1
  7. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
  8. package/dist/cjs/ui/ContentStyles/layout.js +1 -1
  9. package/dist/cjs/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js} +10 -10
  10. package/dist/cjs/version-wrapper.js +1 -1
  11. package/dist/es2019/composable-editor/core-editor.js +9 -2
  12. package/dist/es2019/create-editor/ReactEditorView.js +3 -2
  13. package/dist/es2019/ui/Appearance/Chromeless.js +1 -1
  14. package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
  15. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +2 -1
  16. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
  17. package/dist/es2019/ui/ContentStyles/layout.js +1 -2
  18. package/dist/es2019/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js} +59 -12
  19. package/dist/es2019/version-wrapper.js +1 -1
  20. package/dist/esm/composable-editor/core-editor.js +9 -2
  21. package/dist/esm/create-editor/ReactEditorView.js +3 -2
  22. package/dist/esm/ui/Appearance/Chromeless.js +1 -1
  23. package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
  24. package/dist/esm/ui/Appearance/FullPage/FullPage.js +2 -1
  25. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
  26. package/dist/esm/ui/ContentStyles/layout.js +1 -1
  27. package/dist/esm/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js} +10 -10
  28. package/dist/esm/version-wrapper.js +1 -1
  29. package/dist/types/composable-editor/core-editor.d.ts +5 -0
  30. package/dist/types/create-editor/create-universal-preset.d.ts +23 -3
  31. package/dist/types/presets/universal.d.ts +23 -3
  32. package/dist/types/presets/useUniversalPreset.d.ts +23 -3
  33. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
  34. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
  35. package/dist/types-ts4.5/composable-editor/core-editor.d.ts +5 -0
  36. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +24 -3
  37. package/dist/types-ts4.5/presets/universal.d.ts +24 -3
  38. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +24 -3
  39. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
  40. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
  41. package/package.json +12 -19
  42. package/dist/cjs/composable-editor/core-performance-metrics.js +0 -109
  43. package/dist/es2019/composable-editor/core-performance-metrics.js +0 -92
  44. package/dist/esm/composable-editor/core-performance-metrics.js +0 -101
  45. package/dist/types/composable-editor/core-performance-metrics.d.ts +0 -4
  46. package/dist/types-ts4.5/composable-editor/core-performance-metrics.d.ts +0 -4
  47. /package/dist/types/ui/{EditorContentContainer.d.ts → EditorContentContainer/EditorContentContainer.d.ts} +0 -0
  48. /package/dist/types-ts4.5/ui/{EditorContentContainer.d.ts → EditorContentContainer/EditorContentContainer.d.ts} +0 -0
@@ -1,109 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.EditorUFOBridge = exports.EditorPerformanceMetrics = void 0;
8
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
- var _react = require("react");
10
- var _react2 = require("@emotion/react");
11
- var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
12
- var _analytics = require("@atlaskit/editor-common/analytics");
13
- var _react3 = require("@atlaskit/editor-performance-metrics/react");
14
- var _loadHold = _interopRequireDefault(require("@atlaskit/react-ufo/load-hold"));
15
- /**
16
- * @jsxRuntime classic
17
- * @jsx jsx
18
- */
19
-
20
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
-
22
- var EditorUFOBridge = exports.EditorUFOBridge = /*#__PURE__*/(0, _react.memo)(function () {
23
- var _useState = (0, _react.useState)(true),
24
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
25
- hold = _useState2[0],
26
- setHold = _useState2[1];
27
- var onTTAI = (0, _react.useCallback)(function () {
28
- setHold(false);
29
- }, []);
30
- return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_loadHold.default, {
31
- name: "editor-core",
32
- hold: hold
33
- }), (0, _react2.jsx)(_react3.PerformanceMetrics, {
34
- onTTAI: onTTAI
35
- }));
36
- });
37
- var EditorPerformanceMetrics = exports.EditorPerformanceMetrics = /*#__PURE__*/(0, _react.memo)(function () {
38
- var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
39
- createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
40
- var _useState3 = (0, _react.useState)(null),
41
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
42
- ttai = _useState4[0],
43
- setTTAI = _useState4[1];
44
- var _useState5 = (0, _react.useState)(null),
45
- _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
46
- ttvc = _useState6[0],
47
- setTTVC = _useState6[1];
48
- var _useState7 = (0, _react.useState)(null),
49
- _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
50
- latency = _useState8[0],
51
- setUserLatency = _useState8[1];
52
- var ttvcSentRef = (0, _react.useRef)(false);
53
- var latencySentRef = (0, _react.useRef)(false);
54
- var handleAnalyticsEvent = (0, _react.useCallback)(function (data) {
55
- (0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)(data);
56
- }, [createAnalyticsEvent]);
57
- var onTTAI = (0, _react.useCallback)(function (_ref) {
58
- var idleAt = _ref.idleAt;
59
- setTTAI(idleAt);
60
- }, []);
61
- var onTTVC = (0, _react.useCallback)(function (_ref2) {
62
- var ttvc = _ref2.ttvc;
63
- setTTVC(ttvc);
64
- }, []);
65
- var onUserLatency = (0, _react.useCallback)(function (_ref3) {
66
- var latency = _ref3.latency;
67
- setUserLatency(latency);
68
- }, []);
69
- (0, _react.useEffect)(function () {
70
- if (!ttai || !ttvc || ttvcSentRef.current) {
71
- return;
72
- }
73
- ttvcSentRef.current = true;
74
- handleAnalyticsEvent({
75
- payload: {
76
- // @ts-expect-error Temporary data - let's not extend the public analytics enum
77
- action: 'ttvc',
78
- actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
79
- eventType: _analytics.EVENT_TYPE.OPERATIONAL,
80
- attributes: {
81
- ttvc: ttvc,
82
- ttai: ttai
83
- }
84
- }
85
- });
86
- }, [handleAnalyticsEvent, ttai, ttvc]);
87
- (0, _react.useEffect)(function () {
88
- if (!latency || latencySentRef.current) {
89
- return;
90
- }
91
- latencySentRef.current = true;
92
- handleAnalyticsEvent({
93
- payload: {
94
- // @ts-expect-error Temporary data - let's not extend the public analytics enum
95
- action: 'latency',
96
- actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
97
- eventType: _analytics.EVENT_TYPE.OPERATIONAL,
98
- attributes: {
99
- latency: latency
100
- }
101
- }
102
- });
103
- }, [handleAnalyticsEvent, latency]);
104
- return (0, _react2.jsx)(_react3.PerformanceMetrics, {
105
- onTTAI: onTTAI,
106
- onTTVC: onTTVC,
107
- onUserLatency: onUserLatency
108
- });
109
- });
@@ -1,92 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { useEffect, useCallback, useState, useRef, Fragment, memo } from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { jsx } from '@emotion/react';
9
- import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
10
- import { ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
11
- import { PerformanceMetrics } from '@atlaskit/editor-performance-metrics/react';
12
- import UFOLoadHold from '@atlaskit/react-ufo/load-hold';
13
- export const EditorUFOBridge = /*#__PURE__*/memo(() => {
14
- const [hold, setHold] = useState(true);
15
- const onTTAI = useCallback(() => {
16
- setHold(false);
17
- }, []);
18
- return jsx(Fragment, null, jsx(UFOLoadHold, {
19
- name: "editor-core",
20
- hold: hold
21
- }), jsx(PerformanceMetrics, {
22
- onTTAI: onTTAI
23
- }));
24
- });
25
- export const EditorPerformanceMetrics = /*#__PURE__*/memo(() => {
26
- const {
27
- createAnalyticsEvent
28
- } = useAnalyticsEvents();
29
- const [ttai, setTTAI] = useState(null);
30
- const [ttvc, setTTVC] = useState(null);
31
- const [latency, setUserLatency] = useState(null);
32
- const ttvcSentRef = useRef(false);
33
- const latencySentRef = useRef(false);
34
- const handleAnalyticsEvent = useCallback(data => {
35
- fireAnalyticsEvent(createAnalyticsEvent)(data);
36
- }, [createAnalyticsEvent]);
37
- const onTTAI = useCallback(({
38
- idleAt
39
- }) => {
40
- setTTAI(idleAt);
41
- }, []);
42
- const onTTVC = useCallback(({
43
- ttvc
44
- }) => {
45
- setTTVC(ttvc);
46
- }, []);
47
- const onUserLatency = useCallback(({
48
- latency
49
- }) => {
50
- setUserLatency(latency);
51
- }, []);
52
- useEffect(() => {
53
- if (!ttai || !ttvc || ttvcSentRef.current) {
54
- return;
55
- }
56
- ttvcSentRef.current = true;
57
- handleAnalyticsEvent({
58
- payload: {
59
- // @ts-expect-error Temporary data - let's not extend the public analytics enum
60
- action: 'ttvc',
61
- actionSubject: ACTION_SUBJECT.EDITOR,
62
- eventType: EVENT_TYPE.OPERATIONAL,
63
- attributes: {
64
- ttvc,
65
- ttai
66
- }
67
- }
68
- });
69
- }, [handleAnalyticsEvent, ttai, ttvc]);
70
- useEffect(() => {
71
- if (!latency || latencySentRef.current) {
72
- return;
73
- }
74
- latencySentRef.current = true;
75
- handleAnalyticsEvent({
76
- payload: {
77
- // @ts-expect-error Temporary data - let's not extend the public analytics enum
78
- action: 'latency',
79
- actionSubject: ACTION_SUBJECT.EDITOR,
80
- eventType: EVENT_TYPE.OPERATIONAL,
81
- attributes: {
82
- latency
83
- }
84
- }
85
- });
86
- }, [handleAnalyticsEvent, latency]);
87
- return jsx(PerformanceMetrics, {
88
- onTTAI: onTTAI,
89
- onTTVC: onTTVC,
90
- onUserLatency: onUserLatency
91
- });
92
- });
@@ -1,101 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
- import { useEffect, useCallback, useState, useRef, Fragment, memo } from 'react';
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { jsx } from '@emotion/react';
10
- import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
11
- import { ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
12
- import { PerformanceMetrics } from '@atlaskit/editor-performance-metrics/react';
13
- import UFOLoadHold from '@atlaskit/react-ufo/load-hold';
14
- export var EditorUFOBridge = /*#__PURE__*/memo(function () {
15
- var _useState = useState(true),
16
- _useState2 = _slicedToArray(_useState, 2),
17
- hold = _useState2[0],
18
- setHold = _useState2[1];
19
- var onTTAI = useCallback(function () {
20
- setHold(false);
21
- }, []);
22
- return jsx(Fragment, null, jsx(UFOLoadHold, {
23
- name: "editor-core",
24
- hold: hold
25
- }), jsx(PerformanceMetrics, {
26
- onTTAI: onTTAI
27
- }));
28
- });
29
- export var EditorPerformanceMetrics = /*#__PURE__*/memo(function () {
30
- var _useAnalyticsEvents = useAnalyticsEvents(),
31
- createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
32
- var _useState3 = useState(null),
33
- _useState4 = _slicedToArray(_useState3, 2),
34
- ttai = _useState4[0],
35
- setTTAI = _useState4[1];
36
- var _useState5 = useState(null),
37
- _useState6 = _slicedToArray(_useState5, 2),
38
- ttvc = _useState6[0],
39
- setTTVC = _useState6[1];
40
- var _useState7 = useState(null),
41
- _useState8 = _slicedToArray(_useState7, 2),
42
- latency = _useState8[0],
43
- setUserLatency = _useState8[1];
44
- var ttvcSentRef = useRef(false);
45
- var latencySentRef = useRef(false);
46
- var handleAnalyticsEvent = useCallback(function (data) {
47
- fireAnalyticsEvent(createAnalyticsEvent)(data);
48
- }, [createAnalyticsEvent]);
49
- var onTTAI = useCallback(function (_ref) {
50
- var idleAt = _ref.idleAt;
51
- setTTAI(idleAt);
52
- }, []);
53
- var onTTVC = useCallback(function (_ref2) {
54
- var ttvc = _ref2.ttvc;
55
- setTTVC(ttvc);
56
- }, []);
57
- var onUserLatency = useCallback(function (_ref3) {
58
- var latency = _ref3.latency;
59
- setUserLatency(latency);
60
- }, []);
61
- useEffect(function () {
62
- if (!ttai || !ttvc || ttvcSentRef.current) {
63
- return;
64
- }
65
- ttvcSentRef.current = true;
66
- handleAnalyticsEvent({
67
- payload: {
68
- // @ts-expect-error Temporary data - let's not extend the public analytics enum
69
- action: 'ttvc',
70
- actionSubject: ACTION_SUBJECT.EDITOR,
71
- eventType: EVENT_TYPE.OPERATIONAL,
72
- attributes: {
73
- ttvc: ttvc,
74
- ttai: ttai
75
- }
76
- }
77
- });
78
- }, [handleAnalyticsEvent, ttai, ttvc]);
79
- useEffect(function () {
80
- if (!latency || latencySentRef.current) {
81
- return;
82
- }
83
- latencySentRef.current = true;
84
- handleAnalyticsEvent({
85
- payload: {
86
- // @ts-expect-error Temporary data - let's not extend the public analytics enum
87
- action: 'latency',
88
- actionSubject: ACTION_SUBJECT.EDITOR,
89
- eventType: EVENT_TYPE.OPERATIONAL,
90
- attributes: {
91
- latency: latency
92
- }
93
- }
94
- });
95
- }, [handleAnalyticsEvent, latency]);
96
- return jsx(PerformanceMetrics, {
97
- onTTAI: onTTAI,
98
- onTTVC: onTTVC,
99
- onUserLatency: onUserLatency
100
- });
101
- });
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
- export declare const EditorUFOBridge: import("react").MemoExoticComponent<() => jsx.JSX.Element>;
4
- export declare const EditorPerformanceMetrics: import("react").MemoExoticComponent<() => jsx.JSX.Element>;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
- export declare const EditorUFOBridge: import("react").MemoExoticComponent<() => jsx.JSX.Element>;
4
- export declare const EditorPerformanceMetrics: import("react").MemoExoticComponent<() => jsx.JSX.Element>;