@atlaskit/editor-core 226.4.3 → 226.6.1
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 +43 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-products/tsconfig.json +0 -3
- package/dist/cjs/composable-editor/core-editor.js +2 -9
- package/dist/cjs/presets/universal.js +7 -5
- package/dist/cjs/ui/Appearance/Comment/Comment-compiled.compiled.css +0 -1
- package/dist/cjs/ui/Appearance/Comment/Comment-compiled.js +1 -3
- package/dist/cjs/ui/Appearance/Comment/Comment-emotion.js +1 -21
- package/dist/cjs/ui/Appearance/Comment/FixedToolbar-compiled.compiled.css +1 -2
- package/dist/cjs/ui/Appearance/Comment/FixedToolbar-compiled.js +1 -4
- package/dist/cjs/ui/Appearance/Comment/FixedToolbar-emotion.js +1 -6
- package/dist/cjs/ui/Appearance/Comment/StickyToolbar-compiled.compiled.css +0 -1
- package/dist/cjs/ui/Appearance/Comment/StickyToolbar-compiled.js +1 -4
- package/dist/cjs/ui/Appearance/Comment/StickyToolbar-emotion.js +1 -6
- package/dist/cjs/ui/EditorContentContainer/styles/vanillaTooltipStyles.js +2 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/core-editor.js +3 -10
- package/dist/es2019/presets/universal.js +10 -4
- package/dist/es2019/ui/Appearance/Comment/Comment-compiled.compiled.css +0 -1
- package/dist/es2019/ui/Appearance/Comment/Comment-compiled.js +1 -3
- package/dist/es2019/ui/Appearance/Comment/Comment-emotion.js +1 -21
- package/dist/es2019/ui/Appearance/Comment/FixedToolbar-compiled.compiled.css +1 -2
- package/dist/es2019/ui/Appearance/Comment/FixedToolbar-compiled.js +1 -4
- package/dist/es2019/ui/Appearance/Comment/FixedToolbar-emotion.js +1 -6
- package/dist/es2019/ui/Appearance/Comment/StickyToolbar-compiled.compiled.css +0 -1
- package/dist/es2019/ui/Appearance/Comment/StickyToolbar-compiled.js +1 -4
- package/dist/es2019/ui/Appearance/Comment/StickyToolbar-emotion.js +1 -6
- package/dist/es2019/ui/EditorContentContainer/styles/vanillaTooltipStyles.js +2 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/core-editor.js +3 -10
- package/dist/esm/presets/universal.js +7 -5
- package/dist/esm/ui/Appearance/Comment/Comment-compiled.compiled.css +0 -1
- package/dist/esm/ui/Appearance/Comment/Comment-compiled.js +1 -3
- package/dist/esm/ui/Appearance/Comment/Comment-emotion.js +1 -21
- package/dist/esm/ui/Appearance/Comment/FixedToolbar-compiled.compiled.css +1 -2
- package/dist/esm/ui/Appearance/Comment/FixedToolbar-compiled.js +1 -4
- package/dist/esm/ui/Appearance/Comment/FixedToolbar-emotion.js +1 -6
- package/dist/esm/ui/Appearance/Comment/StickyToolbar-compiled.compiled.css +0 -1
- package/dist/esm/ui/Appearance/Comment/StickyToolbar-compiled.js +1 -4
- package/dist/esm/ui/Appearance/Comment/StickyToolbar-emotion.js +1 -6
- package/dist/esm/ui/EditorContentContainer/styles/vanillaTooltipStyles.js +2 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/presets/universal.d.ts +4 -0
- package/dist/types/ui/EditorContentContainer/styles/vanillaTooltipStyles.d.ts +2 -1
- package/package.json +6 -7
- package/dist/cjs/composable-editor/editor-inp-metrics.js +0 -76
- package/dist/es2019/composable-editor/editor-inp-metrics.js +0 -67
- package/dist/esm/composable-editor/editor-inp-metrics.js +0 -69
- package/dist/types/composable-editor/editor-inp-metrics.d.ts +0 -7
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
14
|
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
17
15
|
const mainToolbarWrapperStyleNew = css({
|
|
18
16
|
position: 'relative',
|
|
@@ -70,9 +68,6 @@ const mainToolbarWrapperStylesVisualRefresh = css({
|
|
|
70
68
|
maxWidth: '100%'
|
|
71
69
|
}
|
|
72
70
|
});
|
|
73
|
-
const mainToolbarWithRadiusStyle = css({
|
|
74
|
-
borderRadius: `${"var(--ds-radius-small, 3px)"} ${"var(--ds-radius-small, 3px)"} 0 0`
|
|
75
|
-
});
|
|
76
71
|
const mainToolbarRadius = css({
|
|
77
72
|
borderRadius: `${"var(--ds-radius-medium, 6px)"} ${"var(--ds-radius-medium, 6px)"} 0 0`
|
|
78
73
|
});
|
|
@@ -86,6 +81,6 @@ const editorModernisationToolbarStyle = css({
|
|
|
86
81
|
export const FixedToolbarEmotion = props =>
|
|
87
82
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
88
83
|
jsx("div", {
|
|
89
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding,
|
|
84
|
+
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding, mainToolbarRadius, props.isEditorModernisationEnabled && editorModernisationToolbarStyle],
|
|
90
85
|
"data-testid": "ak-editor-main-toolbar"
|
|
91
86
|
}, props.children);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
._2rko12c2{border-radius:var(--ds-radius-medium,6px) var(--ds-radius-medium,6px) 0 0}
|
|
2
2
|
._2rko15b0{border-radius:var(--ds-radius-xlarge,9pt) var(--ds-radius-xlarge,9pt) 0 0}
|
|
3
|
-
._2rko1cku{border-radius:var(--ds-radius-small,3px) var(--ds-radius-small,3px) 0 0}
|
|
4
3
|
._v56416gf{transition:box-shadow .2s ease-in-out}._10ytglyw.show-keyline{box-shadow:none}
|
|
5
4
|
._10ytl2q5.show-keyline{box-shadow:0 2px 0 0 var(--ds-background-accent-gray-subtlest,#f0f1f2)}
|
|
6
5
|
._16qsglyw{box-shadow:none}
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
import "./StickyToolbar-compiled.compiled.css";
|
|
9
9
|
import { ax, ix } from "@compiled/react/runtime";
|
|
10
10
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
11
|
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
14
12
|
const akEditorMenuZIndex = 500;
|
|
15
13
|
const akEditorToolbarKeylineHeight = 2;
|
|
@@ -18,7 +16,6 @@ const stickyToolbarCompiledStyles = {
|
|
|
18
16
|
mainToolbarWithPadding: "_ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc",
|
|
19
17
|
mainToolbarTwoLine: "_1uq61sxn _cnpmh9n0 _1djy1txw _17mgesu3 _1q27esu3 _16ec1txw",
|
|
20
18
|
mainToolbarWrapperVisualRefresh: "_3pwj1osq",
|
|
21
|
-
mainToolbarWithRadius: "_2rko1cku",
|
|
22
19
|
mainToolbarRadius: "_2rko12c2",
|
|
23
20
|
editorModernisationToolbar: "_2rko15b0 _10ytglyw",
|
|
24
21
|
stickyToolbarWrapper: "_v56416gf _kqsw1if8 _n3tdu2gc _1pbybfng _10ytl2q5"
|
|
@@ -46,6 +43,6 @@ export const StickyToolbarCompiled = props => {
|
|
|
46
43
|
"data-testid": "ak-editor-main-toolbar"
|
|
47
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
48
45
|
,
|
|
49
|
-
className: ax([stickyToolbarCompiledStyles.mainToolbarWrapper, props.twoLineEditorToolbar && stickyToolbarCompiledStyles.mainToolbarTwoLine, stickyToolbarCompiledStyles.mainToolbarWrapperVisualRefresh, stickyToolbarCompiledStyles.stickyToolbarWrapper, props.isNewToolbarEnabled && stickyToolbarCompiledStyles.mainToolbarWithPadding,
|
|
46
|
+
className: ax([stickyToolbarCompiledStyles.mainToolbarWrapper, props.twoLineEditorToolbar && stickyToolbarCompiledStyles.mainToolbarTwoLine, stickyToolbarCompiledStyles.mainToolbarWrapperVisualRefresh, stickyToolbarCompiledStyles.stickyToolbarWrapper, props.isNewToolbarEnabled && stickyToolbarCompiledStyles.mainToolbarWithPadding, stickyToolbarCompiledStyles.mainToolbarRadius, props.isEditorModernisationEnabled && stickyToolbarCompiledStyles.editorModernisationToolbar, 'show-keyline'])
|
|
50
47
|
}, props.children);
|
|
51
48
|
};
|
|
@@ -13,8 +13,6 @@ import { useEffect, useState } from 'react';
|
|
|
13
13
|
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
16
|
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
19
17
|
const akEditorMenuZIndex = 500;
|
|
20
18
|
const akEditorToolbarKeylineHeight = 2;
|
|
@@ -72,9 +70,6 @@ const mainToolbarWrapperStylesVisualRefresh = css({
|
|
|
72
70
|
maxWidth: '100%'
|
|
73
71
|
}
|
|
74
72
|
});
|
|
75
|
-
const mainToolbarWithRadiusStyle = css({
|
|
76
|
-
borderRadius: `${"var(--ds-radius-small, 3px)"} ${"var(--ds-radius-small, 3px)"} 0 0`
|
|
77
|
-
});
|
|
78
73
|
const mainToolbarRadius = css({
|
|
79
74
|
borderRadius: `${"var(--ds-radius-medium, 6px)"} ${"var(--ds-radius-medium, 6px)"} 0 0`
|
|
80
75
|
});
|
|
@@ -115,7 +110,7 @@ export const StickyToolbarEmotion = props => {
|
|
|
115
110
|
return (
|
|
116
111
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
117
112
|
jsx("div", {
|
|
118
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithPadding,
|
|
113
|
+
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithPadding, mainToolbarRadius, props.isEditorModernisationEnabled && editorModernisationToolbarStyle]
|
|
119
114
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- top is computed dynamically from externalToolbarRef height / offsetTop and cannot be a static css value
|
|
120
115
|
,
|
|
121
116
|
style: wrapperStyle,
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
/**
|
|
6
6
|
* Default look for tooltips created by `VanillaTooltip` (`editor-common/vanilla-tooltip`).
|
|
7
|
-
* Opt in
|
|
7
|
+
* Opt in with `VANILLA_TOOLTIP_DEFAULT_CLASS`. Spelt out here because the selector has to stay
|
|
8
|
+
* statically analysable, so rename in step with that constant.
|
|
8
9
|
*
|
|
9
10
|
* The tooltip is a `[popover]`: the browser paints it in the top layer but leaves it in the
|
|
10
11
|
* DOM, so this descendant selector still matches. `VanillaTooltip` sets `opacity`,
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import React, { useCallback, useMemo, useRef
|
|
5
|
+
import React, { useCallback, useMemo, useRef } from 'react';
|
|
6
6
|
import isEqual from 'lodash/isEqual';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
8
8
|
import { v4 as uuid } from 'uuid';
|
|
@@ -16,7 +16,6 @@ import { useEditorContext } from '../ui/EditorContext';
|
|
|
16
16
|
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
|
|
17
17
|
import measurements from '../utils/performance/measure-enum';
|
|
18
18
|
import { name, version } from '../version-wrapper';
|
|
19
|
-
import { EditorINPMetrics } from './editor-inp-metrics';
|
|
20
19
|
import { EditorInternal } from './editor-internal';
|
|
21
20
|
import useMeasureEditorMountTime from './hooks/useMeasureEditorMountTime';
|
|
22
21
|
// Ignored via go/ees005
|
|
@@ -43,7 +42,6 @@ function Editor(passedProps) {
|
|
|
43
42
|
var editorActions = editorContext.editorActions || editorActionsPlaceholderInstance;
|
|
44
43
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
45
44
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
46
|
-
var editorViewRef = useRef(null);
|
|
47
45
|
var getFeatureFlagsFromRef = useCallback(function () {
|
|
48
46
|
var _propsRef$current$col, _propsRef$current$col2;
|
|
49
47
|
return _objectSpread(_objectSpread({}, createFeatureFlagsFromProps(propsRef.current.featureFlags)), {}, {
|
|
@@ -55,7 +53,6 @@ function Editor(passedProps) {
|
|
|
55
53
|
contextIdentifierProvider = _propsRef$current.contextIdentifierProvider,
|
|
56
54
|
onEditorReady = _propsRef$current.onEditorReady,
|
|
57
55
|
featureFlags = _propsRef$current.featureFlags;
|
|
58
|
-
editorViewRef.current = instance.view;
|
|
59
56
|
editorActions._privateRegisterEditor(instance.view, instance.eventDispatcher, instance.transformer, getFeatureFlagsFromRef);
|
|
60
57
|
if (onEditorReady) {
|
|
61
58
|
startMeasure(measurements.ON_EDITOR_READY_CALLBACK);
|
|
@@ -68,7 +65,6 @@ function Editor(passedProps) {
|
|
|
68
65
|
}, [editorActions, createAnalyticsEvent, getFeatureFlagsFromRef, propsRef]);
|
|
69
66
|
var onEditorDestroyed = useCallback(function (_instance) {
|
|
70
67
|
var onDestroy = propsRef.current.onDestroy;
|
|
71
|
-
editorViewRef.current = null;
|
|
72
68
|
editorActions._privateUnregisterEditor();
|
|
73
69
|
if (onDestroy) {
|
|
74
70
|
onDestroy();
|
|
@@ -82,10 +78,7 @@ function Editor(passedProps) {
|
|
|
82
78
|
onSaveFromProps(view);
|
|
83
79
|
}
|
|
84
80
|
}, [onSaveFromProps]);
|
|
85
|
-
|
|
86
|
-
return /*#__PURE__*/React.createElement(Fragment, null, isFullPageAppearance ? /*#__PURE__*/React.createElement(EditorINPMetrics, {
|
|
87
|
-
editorViewRef: editorViewRef
|
|
88
|
-
}) : null, /*#__PURE__*/React.createElement(EditorInternal, {
|
|
81
|
+
return /*#__PURE__*/React.createElement(EditorInternal, {
|
|
89
82
|
props: props,
|
|
90
83
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
91
84
|
preset: props.preset,
|
|
@@ -95,7 +88,7 @@ function Editor(passedProps) {
|
|
|
95
88
|
onEditorDestroyed: onEditorDestroyed,
|
|
96
89
|
providerFactory: providerFactory,
|
|
97
90
|
AppearanceComponent: props.AppearanceComponent
|
|
98
|
-
})
|
|
91
|
+
});
|
|
99
92
|
}
|
|
100
93
|
var useMemoEditorFeatureFlags = function useMemoEditorFeatureFlags(featureFlags) {
|
|
101
94
|
var ffRef = useRef(featureFlags);
|
|
@@ -76,7 +76,7 @@ import { createDefaultPreset } from './default';
|
|
|
76
76
|
* @returns a full featured preset configured according to the provided props - basis for create-plugins-list
|
|
77
77
|
*/
|
|
78
78
|
export default function createUniversalPresetInternal(_ref) {
|
|
79
|
-
var _initialPluginConfigu, _initialPluginConfigu2, _initialPluginConfigu3, _initialPluginConfigu4, _initialPluginConfigu5, _initialPluginConfigu6, _featureFlags$lpLinkP, _initialPluginConfigu7, _initialPluginConfigu8, _initialPluginConfigu9, _initialPluginConfigu0, _initialPluginConfigu1,
|
|
79
|
+
var _initialPluginConfigu, _initialPluginConfigu2, _initialPluginConfigu3, _initialPluginConfigu4, _initialPluginConfigu5, _initialPluginConfigu6, _featureFlags$lpLinkP, _initialPluginConfigu7, _initialPluginConfigu8, _initialPluginConfigu9, _initialPluginConfigu0, _initialPluginConfigu1, _props$media, _props$media2, _props$media3, _props$media4, _props$media5, _props$media6, _props$media7, _props$mention$insert, _props$mention, _props$mention2, _props$mention3, _props$collabEdit$EXP, _props$collabEdit, _props$linking, _props$linking2, _featureFlags$lpLinkP2, _props$linking3, _props$primaryToolbar;
|
|
80
80
|
var appearance = _ref.appearance,
|
|
81
81
|
props = _ref.props,
|
|
82
82
|
featureFlags = _ref.featureFlags,
|
|
@@ -103,6 +103,7 @@ export default function createUniversalPresetInternal(_ref) {
|
|
|
103
103
|
lpLinkPicker: (_featureFlags$lpLinkP = featureFlags.lpLinkPicker) !== null && _featureFlags$lpLinkP !== void 0 ? _featureFlags$lpLinkP : false
|
|
104
104
|
}, props.hyperlinkOptions),
|
|
105
105
|
__livePage: props.__livePage,
|
|
106
|
+
quickInsert: _objectSpread(_objectSpread({}, props.quickInsert), initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.quickInsertPlugin),
|
|
106
107
|
toolbar: initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.toolbarPlugin
|
|
107
108
|
}));
|
|
108
109
|
var statusMenuDisabled = !props.allowStatus ? true : _typeof(props.allowStatus) === 'object' ? Boolean(props.allowStatus.menuDisabled) : false;
|
|
@@ -112,10 +113,11 @@ export default function createUniversalPresetInternal(_ref) {
|
|
|
112
113
|
}
|
|
113
114
|
return false;
|
|
114
115
|
};
|
|
115
|
-
var finalPreset = defaultPreset.add(ufoPlugin).add(dataConsumerPlugin).add(accessibilityUtilsPlugin).add(contentInsertionPlugin).add(batchAttributeUpdatesPlugin).maybeAdd([blockControlsPlugin, {
|
|
116
|
-
quickInsertButtonEnabled:
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
var finalPreset = defaultPreset.add(ufoPlugin).add(dataConsumerPlugin).add(accessibilityUtilsPlugin).add(contentInsertionPlugin).add(batchAttributeUpdatesPlugin).maybeAdd([blockControlsPlugin, _objectSpread(_objectSpread({}, (initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu7 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu7 === void 0 ? void 0 : _initialPluginConfigu7.quickInsertButtonEnabled) !== undefined ? {
|
|
117
|
+
quickInsertButtonEnabled: initialPluginConfiguration.blockControlsPlugin.quickInsertButtonEnabled
|
|
118
|
+
} : {}), {}, {
|
|
119
|
+
rightSideControlsEnabled: (_initialPluginConfigu8 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu9 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu9 === void 0 ? void 0 : _initialPluginConfigu9.rightSideControlsEnabled) !== null && _initialPluginConfigu8 !== void 0 ? _initialPluginConfigu8 : false
|
|
120
|
+
})], Boolean((_initialPluginConfigu0 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu1 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu1 === void 0 ? void 0 : _initialPluginConfigu1.enabled) !== null && _initialPluginConfigu0 !== void 0 ? _initialPluginConfigu0 : false)).maybeAdd([breakoutPlugin, {
|
|
119
121
|
allowBreakoutButton: appearance === 'full-page',
|
|
120
122
|
appearance: appearance
|
|
121
123
|
}], Boolean(props.allowBreakout && (isFullPage || appearance === 'max' && (expValEqualsNoExposure('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEqualsNoExposure('confluence_max_width_content_appearance', 'isEnabled', true))))).maybeAdd(alignmentPlugin, Boolean(props.allowTextAlignment)).maybeAdd([textColorPlugin, props.allowTextColor], Boolean(props.allowTextColor)).add(listPlugin).maybeAdd(rulePlugin, Boolean(props.allowRule)).maybeAdd([expandPlugin, {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
._19itno8c{border:var(--ds-border-width,1px) solid var(--ds-border-input,#8c8f97)}
|
|
2
2
|
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
3
|
-
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
4
3
|
._2rkopb1k{border-radius:var(--ds-radius-xlarge,9pt)}._13dfutpp .less-margin>.ProseMirror{margin-top:var(--ds-space-150,9pt)}
|
|
5
4
|
._16jlkb7n{flex-grow:1}
|
|
6
5
|
._18m91wug{overflow-y:auto}
|
|
@@ -21,7 +21,6 @@ import messages from '@atlaskit/editor-common/messages';
|
|
|
21
21
|
import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
22
22
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
23
23
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
24
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
25
24
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
26
25
|
// Ignored via go/ees005
|
|
27
26
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -35,7 +34,6 @@ import WithFlash from '../../WithFlash';
|
|
|
35
34
|
import { CommentToolbar } from './CommentToolbar';
|
|
36
35
|
import { MainToolbar } from './Toolbar';
|
|
37
36
|
var commentEditorCompiledStyles = {
|
|
38
|
-
commentEditorOld: "_19itno8c _2rkofajl _1e0c1txw _2lx21bp4 _1ul9clpc _4t3i1wug _bfhk1j9a _vchhusvi _p12f1kw7 _slp31hna _13dfutpp _gzr8u2gc _ghozu2gc _oafwu2gc",
|
|
39
37
|
commentEditor: "_19itno8c _2rko1qi0 _1e0c1txw _2lx21bp4 _1ul9clpc _4t3i1wug _bfhk1j9a _vchhusvi _p12f1kw7 _slp31hna _13dfutpp _gzr8u2gc _ghozu2gc _oafwu2gc",
|
|
40
38
|
modernisedEditor: "_2rkopb1k",
|
|
41
39
|
secondaryToolbar: "_vchhusvi _1bahesu3 _4cvr1h6o _1e0c1txw _ca0qutpp _u5f3v77o _n3tdutpp _19bvv77o",
|
|
@@ -157,7 +155,7 @@ export var CommentEditorWithIntlCompiled = function CommentEditorWithIntlCompile
|
|
|
157
155
|
style: wrapperStyle
|
|
158
156
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
159
157
|
,
|
|
160
|
-
className: ax([
|
|
158
|
+
className: ax([commentEditorCompiledStyles.commentEditor, isEditorModernisationEnabled && commentEditorCompiledStyles.modernisedEditor, "akEditor"]),
|
|
161
159
|
ref: wrapperElementRef
|
|
162
160
|
}, /*#__PURE__*/React.createElement(MainToolbar, {
|
|
163
161
|
isEditorModernisationEnabled: isEditorModernisationEnabled,
|
|
@@ -24,7 +24,6 @@ import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
24
24
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
25
25
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
26
26
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
27
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
28
27
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
29
28
|
// Ignored via go/ees005
|
|
30
29
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -38,25 +37,6 @@ import WithFlash from '../../WithFlash';
|
|
|
38
37
|
import { CommentToolbar } from './CommentToolbar';
|
|
39
38
|
import { MainToolbar } from './Toolbar';
|
|
40
39
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
41
|
-
|
|
42
|
-
// Remove when platform_editor_comment_editor_border_radius is cleaned up
|
|
43
|
-
var commentEditorStylesOld = css({
|
|
44
|
-
display: 'flex',
|
|
45
|
-
flexDirection: 'column',
|
|
46
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
47
|
-
'.less-margin > .ProseMirror': {
|
|
48
|
-
margin: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)")
|
|
49
|
-
},
|
|
50
|
-
minWidth: '272px',
|
|
51
|
-
height: 'auto',
|
|
52
|
-
backgroundColor: "var(--ds-background-input, #FFFFFF)",
|
|
53
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-input, #8C8F97)"),
|
|
54
|
-
boxSizing: 'border-box',
|
|
55
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
56
|
-
borderRadius: "var(--ds-radius-small, 3px)",
|
|
57
|
-
maxWidth: 'inherit',
|
|
58
|
-
wordWrap: 'break-word'
|
|
59
|
-
});
|
|
60
40
|
var commentEditorStyles = css({
|
|
61
41
|
display: 'flex',
|
|
62
42
|
flexDirection: 'column',
|
|
@@ -228,7 +208,7 @@ export var CommentEditorWithIntlEmotion = function CommentEditorWithIntlEmotion(
|
|
|
228
208
|
return jsx(WithFlash, {
|
|
229
209
|
animate: maxContentSizeReached
|
|
230
210
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
231
|
-
css: [
|
|
211
|
+
css: [commentEditorStyles, isEditorModernisationEnabled && modernisedEditorStyles,
|
|
232
212
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
233
213
|
css({
|
|
234
214
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
._2rko12c2{border-radius:var(--ds-radius-medium,6px) var(--ds-radius-medium,6px) 0 0}
|
|
2
|
-
._2rko15b0{border-radius:var(--ds-radius-xlarge,9pt) var(--ds-radius-xlarge,9pt) 0 0}
|
|
3
|
-
._2rko1cku{border-radius:var(--ds-radius-small,3px) var(--ds-radius-small,3px) 0 0}._10ytglyw.show-keyline{box-shadow:none}
|
|
2
|
+
._2rko15b0{border-radius:var(--ds-radius-xlarge,9pt) var(--ds-radius-xlarge,9pt) 0 0}._10ytglyw.show-keyline{box-shadow:none}
|
|
4
3
|
._16qsglyw{box-shadow:none}
|
|
5
4
|
._19bvu2gc{padding-left:var(--ds-space-100,8px)}
|
|
6
5
|
._19bvv47k{padding-left:var(--ds-space-250,20px)}
|
|
@@ -8,21 +8,18 @@
|
|
|
8
8
|
import "./FixedToolbar-compiled.compiled.css";
|
|
9
9
|
import { ax, ix } from "@compiled/react/runtime";
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
11
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
14
12
|
var fixedToolbarCompiledStyles = {
|
|
15
13
|
mainToolbarWrapper: "_kqswh2mm _4cvr1h6o _ca0qu2gc _u5f3u2gc _n3tdidpf _19bvv47k _1e0c1txw _4t3i1wug _bfhkvuon _16qsglyw _1khpidpf _lg5oidpf _1cuzidpf",
|
|
16
14
|
mainToolbarWithoutLeftPadding: "_ca0qu2gc _u5f3u2gc _n3tdidpf _19bvu2gc",
|
|
17
15
|
mainToolbarTwoLine: "_1uq61sxn _cnpmh9n0 _1djy1txw _17mgesu3 _1q27esu3 _16ec1txw",
|
|
18
16
|
mainToolbarWrapperVisualRefresh: "_3pwj1osq",
|
|
19
|
-
mainToolbarWithRadius: "_2rko1cku",
|
|
20
17
|
mainToolbarRadius: "_2rko12c2",
|
|
21
18
|
editorModernisationToolbar: "_2rko15b0 _10ytglyw"
|
|
22
19
|
};
|
|
23
20
|
export var FixedToolbarCompiled = function FixedToolbarCompiled(props) {
|
|
24
21
|
return /*#__PURE__*/React.createElement("div", {
|
|
25
22
|
"data-testid": "ak-editor-main-toolbar",
|
|
26
|
-
className: ax([fixedToolbarCompiledStyles.mainToolbarWrapper, props.twoLineEditorToolbar && fixedToolbarCompiledStyles.mainToolbarTwoLine, fixedToolbarCompiledStyles.mainToolbarWrapperVisualRefresh, props.isNewToolbarEnabled && fixedToolbarCompiledStyles.mainToolbarWithoutLeftPadding,
|
|
23
|
+
className: ax([fixedToolbarCompiledStyles.mainToolbarWrapper, props.twoLineEditorToolbar && fixedToolbarCompiledStyles.mainToolbarTwoLine, fixedToolbarCompiledStyles.mainToolbarWrapperVisualRefresh, props.isNewToolbarEnabled && fixedToolbarCompiledStyles.mainToolbarWithoutLeftPadding, fixedToolbarCompiledStyles.mainToolbarRadius, props.isEditorModernisationEnabled && fixedToolbarCompiledStyles.editorModernisationToolbar])
|
|
27
24
|
}, props.children);
|
|
28
25
|
};
|
|
@@ -12,8 +12,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
12
12
|
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
|
|
14
14
|
import { css, jsx } from '@emotion/react';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
15
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
18
16
|
var mainToolbarWrapperStyleNew = css({
|
|
19
17
|
position: 'relative',
|
|
@@ -62,9 +60,6 @@ var mainToolbarWrapperStylesVisualRefresh = css({
|
|
|
62
60
|
maxWidth: '100%'
|
|
63
61
|
}
|
|
64
62
|
});
|
|
65
|
-
var mainToolbarWithRadiusStyle = css({
|
|
66
|
-
borderRadius: "var(--ds-radius-small, 3px)".concat(" ", "var(--ds-radius-small, 3px)", " 0 0")
|
|
67
|
-
});
|
|
68
63
|
var mainToolbarRadius = css({
|
|
69
64
|
borderRadius: "var(--ds-radius-medium, 6px)".concat(" ", "var(--ds-radius-medium, 6px)", " 0 0")
|
|
70
65
|
});
|
|
@@ -79,7 +74,7 @@ export var FixedToolbarEmotion = function FixedToolbarEmotion(props) {
|
|
|
79
74
|
return (
|
|
80
75
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
81
76
|
jsx("div", {
|
|
82
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding,
|
|
77
|
+
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding, mainToolbarRadius, props.isEditorModernisationEnabled && editorModernisationToolbarStyle],
|
|
83
78
|
"data-testid": "ak-editor-main-toolbar"
|
|
84
79
|
}, props.children)
|
|
85
80
|
);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
._2rko12c2{border-radius:var(--ds-radius-medium,6px) var(--ds-radius-medium,6px) 0 0}
|
|
2
2
|
._2rko15b0{border-radius:var(--ds-radius-xlarge,9pt) var(--ds-radius-xlarge,9pt) 0 0}
|
|
3
|
-
._2rko1cku{border-radius:var(--ds-radius-small,3px) var(--ds-radius-small,3px) 0 0}
|
|
4
3
|
._v56416gf{transition:box-shadow .2s ease-in-out}._10ytglyw.show-keyline{box-shadow:none}
|
|
5
4
|
._10ytl2q5.show-keyline{box-shadow:0 2px 0 0 var(--ds-background-accent-gray-subtlest,#f0f1f2)}
|
|
6
5
|
._16qsglyw{box-shadow:none}
|
|
@@ -10,8 +10,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
13
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
16
14
|
var akEditorMenuZIndex = 500;
|
|
17
15
|
var akEditorToolbarKeylineHeight = 2;
|
|
@@ -20,7 +18,6 @@ var stickyToolbarCompiledStyles = {
|
|
|
20
18
|
mainToolbarWithPadding: "_ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc",
|
|
21
19
|
mainToolbarTwoLine: "_1uq61sxn _cnpmh9n0 _1djy1txw _17mgesu3 _1q27esu3 _16ec1txw",
|
|
22
20
|
mainToolbarWrapperVisualRefresh: "_3pwj1osq",
|
|
23
|
-
mainToolbarWithRadius: "_2rko1cku",
|
|
24
21
|
mainToolbarRadius: "_2rko12c2",
|
|
25
22
|
editorModernisationToolbar: "_2rko15b0 _10ytglyw",
|
|
26
23
|
stickyToolbarWrapper: "_v56416gf _kqsw1if8 _n3tdu2gc _1pbybfng _10ytl2q5"
|
|
@@ -53,6 +50,6 @@ export var StickyToolbarCompiled = function StickyToolbarCompiled(props) {
|
|
|
53
50
|
"data-testid": "ak-editor-main-toolbar"
|
|
54
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
55
52
|
,
|
|
56
|
-
className: ax([stickyToolbarCompiledStyles.mainToolbarWrapper, props.twoLineEditorToolbar && stickyToolbarCompiledStyles.mainToolbarTwoLine, stickyToolbarCompiledStyles.mainToolbarWrapperVisualRefresh, stickyToolbarCompiledStyles.stickyToolbarWrapper, props.isNewToolbarEnabled && stickyToolbarCompiledStyles.mainToolbarWithPadding,
|
|
53
|
+
className: ax([stickyToolbarCompiledStyles.mainToolbarWrapper, props.twoLineEditorToolbar && stickyToolbarCompiledStyles.mainToolbarTwoLine, stickyToolbarCompiledStyles.mainToolbarWrapperVisualRefresh, stickyToolbarCompiledStyles.stickyToolbarWrapper, props.isNewToolbarEnabled && stickyToolbarCompiledStyles.mainToolbarWithPadding, stickyToolbarCompiledStyles.mainToolbarRadius, props.isEditorModernisationEnabled && stickyToolbarCompiledStyles.editorModernisationToolbar, 'show-keyline'])
|
|
57
54
|
}, props.children);
|
|
58
55
|
};
|
|
@@ -15,8 +15,6 @@ import { useEffect, useState } from 'react';
|
|
|
15
15
|
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
|
|
17
17
|
import { css, jsx } from '@emotion/react';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
18
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
21
19
|
var akEditorMenuZIndex = 500;
|
|
22
20
|
var akEditorToolbarKeylineHeight = 2;
|
|
@@ -65,9 +63,6 @@ var mainToolbarWrapperStylesVisualRefresh = css({
|
|
|
65
63
|
maxWidth: '100%'
|
|
66
64
|
}
|
|
67
65
|
});
|
|
68
|
-
var mainToolbarWithRadiusStyle = css({
|
|
69
|
-
borderRadius: "var(--ds-radius-small, 3px)".concat(" ", "var(--ds-radius-small, 3px)", " 0 0")
|
|
70
|
-
});
|
|
71
66
|
var mainToolbarRadius = css({
|
|
72
67
|
borderRadius: "var(--ds-radius-medium, 6px)".concat(" ", "var(--ds-radius-medium, 6px)", " 0 0")
|
|
73
68
|
});
|
|
@@ -111,7 +106,7 @@ export var StickyToolbarEmotion = function StickyToolbarEmotion(props) {
|
|
|
111
106
|
return (
|
|
112
107
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
113
108
|
jsx("div", {
|
|
114
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithPadding,
|
|
109
|
+
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithPadding, mainToolbarRadius, props.isEditorModernisationEnabled && editorModernisationToolbarStyle]
|
|
115
110
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- top is computed dynamically from externalToolbarRef height / offsetTop and cannot be a static css value
|
|
116
111
|
,
|
|
117
112
|
style: wrapperStyle,
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
/**
|
|
6
6
|
* Default look for tooltips created by `VanillaTooltip` (`editor-common/vanilla-tooltip`).
|
|
7
|
-
* Opt in
|
|
7
|
+
* Opt in with `VANILLA_TOOLTIP_DEFAULT_CLASS`. Spelt out here because the selector has to stay
|
|
8
|
+
* statically analysable, so rename in step with that constant.
|
|
8
9
|
*
|
|
9
10
|
* The tooltip is a `[popover]`: the browser paints it in the top layer but leaves it in the
|
|
10
11
|
* DOM, so this descendant selector still matches. `VanillaTooltip` sets `opacity`,
|
|
@@ -16,6 +16,7 @@ export type UniversalPresetProps = DefaultPresetPluginOptions & EditorSharedProp
|
|
|
16
16
|
export type InitialPluginConfiguration = {
|
|
17
17
|
blockControlsPlugin?: {
|
|
18
18
|
enabled?: boolean;
|
|
19
|
+
/** @deprecated Use `quickInsertPlugin.blockControlButtonEnabled` instead. */
|
|
19
20
|
quickInsertButtonEnabled?: boolean;
|
|
20
21
|
rightSideControlsEnabled?: boolean;
|
|
21
22
|
};
|
|
@@ -46,6 +47,9 @@ export type InitialPluginConfiguration = {
|
|
|
46
47
|
type: 'added' | 'deleted';
|
|
47
48
|
}[]) => void;
|
|
48
49
|
};
|
|
50
|
+
quickInsertPlugin?: {
|
|
51
|
+
blockControlButtonEnabled?: boolean;
|
|
52
|
+
};
|
|
49
53
|
tasksAndDecisionsPlugin?: {
|
|
50
54
|
allowBlockTaskItem?: boolean;
|
|
51
55
|
hasEditPermission?: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { SerializedStyles } from '@emotion/react';
|
|
2
2
|
/**
|
|
3
3
|
* Default look for tooltips created by `VanillaTooltip` (`editor-common/vanilla-tooltip`).
|
|
4
|
-
* Opt in
|
|
4
|
+
* Opt in with `VANILLA_TOOLTIP_DEFAULT_CLASS`. Spelt out here because the selector has to stay
|
|
5
|
+
* statically analysable, so rename in step with that constant.
|
|
5
6
|
*
|
|
6
7
|
* The tooltip is a `[popover]`: the browser paints it in the top layer but leaves it in the
|
|
7
8
|
* DOM, so this descendant selector still matches. `VanillaTooltip` sets `opacity`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "226.
|
|
3
|
+
"version": "226.6.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,10 +46,9 @@
|
|
|
46
46
|
"@atlaskit/button": "^25.3.0",
|
|
47
47
|
"@atlaskit/css": "^1.1.0",
|
|
48
48
|
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
49
|
-
"@atlaskit/editor-performance-metrics": "^3.2.0",
|
|
50
49
|
"@atlaskit/editor-plugin-block-menu": "^15.1.0",
|
|
51
50
|
"@atlaskit/editor-plugin-connectivity": "^16.0.0",
|
|
52
|
-
"@atlaskit/editor-plugin-quick-insert": "^16.
|
|
51
|
+
"@atlaskit/editor-plugin-quick-insert": "^16.3.0",
|
|
53
52
|
"@atlaskit/editor-plugin-selection-extension": "^19.1.0",
|
|
54
53
|
"@atlaskit/editor-plugin-user-preferences": "^14.0.0",
|
|
55
54
|
"@atlaskit/editor-plugins": "^16.1.0",
|
|
@@ -58,7 +57,7 @@
|
|
|
58
57
|
"@atlaskit/editor-ssr-renderer": "^11.0.0",
|
|
59
58
|
"@atlaskit/editor-toolbar": "^2.6.0",
|
|
60
59
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
61
|
-
"@atlaskit/emoji": "^72.
|
|
60
|
+
"@atlaskit/emoji": "^72.3.0",
|
|
62
61
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
63
62
|
"@atlaskit/heading": "^7.2.0",
|
|
64
63
|
"@atlaskit/icon": "^37.6.0",
|
|
@@ -74,7 +73,7 @@
|
|
|
74
73
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
75
74
|
"@atlaskit/react-ufo": "^7.8.0",
|
|
76
75
|
"@atlaskit/task-decision": "^21.9.0",
|
|
77
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
76
|
+
"@atlaskit/tmp-editor-statsig": "^176.0.0",
|
|
78
77
|
"@atlaskit/tokens": "^16.11.0",
|
|
79
78
|
"@atlaskit/tooltip": "^24.3.0",
|
|
80
79
|
"@atlaskit/width-detector": "^7.2.0",
|
|
@@ -92,7 +91,7 @@
|
|
|
92
91
|
"uuid": "^11.1.1"
|
|
93
92
|
},
|
|
94
93
|
"peerDependencies": {
|
|
95
|
-
"@atlaskit/editor-common": "^120.
|
|
94
|
+
"@atlaskit/editor-common": "^120.16.0",
|
|
96
95
|
"@atlaskit/link-provider": "^5.5.0",
|
|
97
96
|
"@atlaskit/media-core": "^38.2.0",
|
|
98
97
|
"react": "^18.2.0",
|
|
@@ -168,7 +167,7 @@
|
|
|
168
167
|
"@atlassian/editor-rovo-bridge": "^14.1.0",
|
|
169
168
|
"@atlassian/experiment-test-utils": "^0.2.0",
|
|
170
169
|
"@atlassian/feature-flags-test-utils": "^1.3.0",
|
|
171
|
-
"@atlassian/search-client": "^2.
|
|
170
|
+
"@atlassian/search-client": "^2.21.0",
|
|
172
171
|
"@atlassian/search-provider": "^17.1.0",
|
|
173
172
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
174
173
|
"@atlassian/testing-library": "^0.11.0",
|
|
@@ -1,76 +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.EditorINPMetrics = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
10
|
-
var _useAnalyticsEvents = require("@atlaskit/analytics-next/useAnalyticsEvents");
|
|
11
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
|
-
var _inp = require("@atlaskit/editor-performance-metrics/inp");
|
|
13
|
-
var _interactionMetrics = require("@atlaskit/react-ufo/interaction-metrics");
|
|
14
|
-
var _getEditorDomSize = require("../utils/getEditorDomSize");
|
|
15
|
-
var EditorINPMetrics = exports.EditorINPMetrics = function EditorINPMetrics(_ref) {
|
|
16
|
-
var editorViewRef = _ref.editorViewRef;
|
|
17
|
-
var analyticsEvents = (0, _useAnalyticsEvents.useAnalyticsEvents)();
|
|
18
|
-
|
|
19
|
-
// onMount lifecycle hook
|
|
20
|
-
(0, _react.useEffect)(function () {
|
|
21
|
-
var cleanupFn;
|
|
22
|
-
var cleanupIdleCallback = createIdleCallback(function () {
|
|
23
|
-
cleanupFn = (0, _inp.setupINPTracking)(function (_ref2) {
|
|
24
|
-
var value = _ref2.value;
|
|
25
|
-
var interaction = (0, _interactionMetrics.getActiveInteraction)();
|
|
26
|
-
var ufoName = interaction === null || interaction === void 0 ? void 0 : interaction.ufoName;
|
|
27
|
-
var editorView = editorViewRef.current;
|
|
28
|
-
var editorDomSize = editorView ? (0, _getEditorDomSize.getEditorDomSize)(editorView) : undefined;
|
|
29
|
-
sendAnalytics(analyticsEvents.createAnalyticsEvent, value, ufoName, editorDomSize);
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// Cleanup function that will be called when the component unmounts
|
|
34
|
-
return function () {
|
|
35
|
-
var _cleanupFn;
|
|
36
|
-
cleanupIdleCallback();
|
|
37
|
-
(_cleanupFn = cleanupFn) === null || _cleanupFn === void 0 || _cleanupFn();
|
|
38
|
-
};
|
|
39
|
-
// Using hook as mount lifecycle hook.
|
|
40
|
-
// We do not need to set dependency on analyticsEvents since we are using the analyticsEvents object reference
|
|
41
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42
|
-
}, []);
|
|
43
|
-
|
|
44
|
-
// This component doesn't render anything
|
|
45
|
-
return null;
|
|
46
|
-
};
|
|
47
|
-
var sendAnalytics = (0, _debounce.default)(function (createAnalyticsEvent, value, ufoName, editorDomSize) {
|
|
48
|
-
(0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)({
|
|
49
|
-
payload: {
|
|
50
|
-
// @ts-expect-error Temporary data
|
|
51
|
-
action: 'inp',
|
|
52
|
-
actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
|
|
53
|
-
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
54
|
-
attributes: {
|
|
55
|
-
inp: value,
|
|
56
|
-
ufoName: ufoName,
|
|
57
|
-
editorDomSize: editorDomSize
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}, 1000, {
|
|
62
|
-
trailing: true
|
|
63
|
-
});
|
|
64
|
-
var createIdleCallback = function createIdleCallback(callback) {
|
|
65
|
-
if (typeof window.requestIdleCallback === 'function') {
|
|
66
|
-
var _id = window.requestIdleCallback(callback);
|
|
67
|
-
return function () {
|
|
68
|
-
return window.cancelIdleCallback(_id);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
// Fallback to setTimeout with 0 delay if requestIdleCallback is not available
|
|
72
|
-
var id = window.setTimeout(callback, 0);
|
|
73
|
-
return function () {
|
|
74
|
-
return window.clearTimeout(id);
|
|
75
|
-
};
|
|
76
|
-
};
|