@atlaskit/editor-core 207.0.4 → 207.0.6
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 +18 -0
- package/dist/cjs/composable-editor/core-editor.js +9 -2
- package/dist/cjs/ui/Appearance/Chromeless.js +1 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -1
- package/dist/cjs/ui/ContentStyles/layout.js +2 -1
- package/dist/cjs/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js} +10 -10
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/core-editor.js +9 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -1
- package/dist/es2019/ui/ContentStyles/layout.js +2 -1
- package/dist/es2019/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js} +61 -14
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/core-editor.js +9 -2
- package/dist/esm/ui/Appearance/Chromeless.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -1
- package/dist/esm/ui/ContentStyles/layout.js +2 -1
- package/dist/esm/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js} +10 -10
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/core-editor.d.ts +5 -0
- package/dist/types/create-editor/create-universal-preset.d.ts +12 -1
- package/dist/types/presets/universal.d.ts +12 -1
- package/dist/types/presets/useUniversalPreset.d.ts +12 -1
- package/dist/types-ts4.5/composable-editor/core-editor.d.ts +5 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +13 -1
- package/dist/types-ts4.5/presets/universal.d.ts +13 -1
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +13 -1
- package/package.json +7 -13
- package/dist/cjs/composable-editor/core-performance-metrics.js +0 -109
- package/dist/es2019/composable-editor/core-performance-metrics.js +0 -92
- package/dist/esm/composable-editor/core-performance-metrics.js +0 -101
- package/dist/types/composable-editor/core-performance-metrics.d.ts +0 -4
- package/dist/types-ts4.5/composable-editor/core-performance-metrics.d.ts +0 -4
- /package/dist/types/ui/{EditorContentContainer.d.ts → EditorContentContainer/EditorContentContainer.d.ts} +0 -0
- /package/dist/types-ts4.5/ui/{EditorContentContainer.d.ts → EditorContentContainer/EditorContentContainer.d.ts} +0 -0
package/dist/esm/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js}
RENAMED
|
@@ -33,15 +33,15 @@ import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
|
33
33
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
34
34
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
35
35
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
36
|
-
import { InlineNodeViewSharedStyles } from '
|
|
37
|
-
import { codeBlockStyles } from '
|
|
38
|
-
import { dateStyles, dateVanillaStyles } from '
|
|
39
|
-
import { expandStyles } from '
|
|
40
|
-
import { extensionStyles } from '
|
|
41
|
-
import { mediaStyles } from '
|
|
42
|
-
import { panelStyles } from '
|
|
43
|
-
import { statusStyles, vanillaStatusStyles } from '
|
|
44
|
-
import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from '
|
|
36
|
+
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
37
|
+
import { codeBlockStyles } from '../ContentStyles/code-block';
|
|
38
|
+
import { dateStyles, dateVanillaStyles } from '../ContentStyles/date';
|
|
39
|
+
import { expandStyles } from '../ContentStyles/expand';
|
|
40
|
+
import { extensionStyles } from '../ContentStyles/extension';
|
|
41
|
+
import { mediaStyles } from '../ContentStyles/media';
|
|
42
|
+
import { panelStyles } from '../ContentStyles/panel';
|
|
43
|
+
import { statusStyles, vanillaStatusStyles } from '../ContentStyles/status';
|
|
44
|
+
import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from '../ContentStyles/tasks-and-decisions';
|
|
45
45
|
|
|
46
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
47
47
|
export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t}\n"])), linkSharedStyle());
|
|
@@ -346,7 +346,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
346
346
|
|
|
347
347
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
348
348
|
var contentStyles = function contentStyles() {
|
|
349
|
-
return css(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\
|
|
349
|
+
return css(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", ";\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n\t is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, whitespaceSharedStyles, paragraphSharedStyles(), listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, fg('editor_request_to_edit_task') ? null : css(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, editorExperiment('platform_editor_advanced_code_blocks', true) ? css(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, codeBlockStyles(), blocktypeStyles(), codeMarkSharedStyles(), textColorStyles, backgroundColorStyles(), listsStyles, ruleStyles(), mediaStyles(), fg('confluence_team_presence_scroll_to_pointer') ? telepointerStyle : telepointerStyleWithInitialOnly, gapCursorStyles, panelStyles(), mentionsStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
350
350
|
exposure: false
|
|
351
351
|
}) && vanillaMentionsStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
352
352
|
exposure: false
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "207.0.
|
|
2
|
+
export var version = "207.0.6";
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { EditorNextProps } from '../types/editor-props';
|
|
3
3
|
import { type WithAppearanceComponent } from '../types/with-appearance-component';
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param props
|
|
7
|
+
* @example
|
|
8
|
+
*/
|
|
4
9
|
export declare function CoreEditor(props: EditorNextProps & WithAppearanceComponent): jsx.JSX.Element;
|
|
5
10
|
export declare namespace CoreEditor {
|
|
6
11
|
var propTypes: {
|
|
@@ -347,7 +347,12 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
347
347
|
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
348
348
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
349
349
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
350
|
-
}, import("@atlaskit/editor-common/types").FeatureFlags
|
|
350
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
351
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
352
|
+
commands: {
|
|
353
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
354
|
+
};
|
|
355
|
+
}, undefined>>];
|
|
351
356
|
sharedState: {
|
|
352
357
|
copyButtonHoverNode: import("prosemirror-model").Node;
|
|
353
358
|
} | undefined;
|
|
@@ -359,6 +364,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
359
364
|
actions: import("@atlaskit/editor-plugins/selection").EditorSelectionAPI;
|
|
360
365
|
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
361
366
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
367
|
+
commands: {
|
|
368
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
369
|
+
};
|
|
362
370
|
}, undefined>>];
|
|
363
371
|
commands: {
|
|
364
372
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
@@ -1128,6 +1136,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
1128
1136
|
sharedState: import("@atlaskit/editor-plugins/composition").CompositionState;
|
|
1129
1137
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1130
1138
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1139
|
+
commands: {
|
|
1140
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
1141
|
+
};
|
|
1131
1142
|
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1132
1143
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
1133
1144
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"clipboard", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"paste", {
|
|
@@ -399,7 +399,12 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
399
399
|
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
400
400
|
pluginConfiguration: FeatureFlags;
|
|
401
401
|
sharedState: FeatureFlags;
|
|
402
|
-
}, FeatureFlags
|
|
402
|
+
}, FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
403
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
404
|
+
commands: {
|
|
405
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
406
|
+
};
|
|
407
|
+
}, undefined>>];
|
|
403
408
|
sharedState: {
|
|
404
409
|
copyButtonHoverNode: import("prosemirror-model").Node;
|
|
405
410
|
} | undefined;
|
|
@@ -411,6 +416,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
411
416
|
actions: import("@atlaskit/editor-plugins/selection").EditorSelectionAPI;
|
|
412
417
|
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
413
418
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
419
|
+
commands: {
|
|
420
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
421
|
+
};
|
|
414
422
|
}, undefined>>];
|
|
415
423
|
commands: {
|
|
416
424
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
@@ -1180,6 +1188,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
1180
1188
|
sharedState: import("@atlaskit/editor-plugins/composition").CompositionState;
|
|
1181
1189
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1182
1190
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1191
|
+
commands: {
|
|
1192
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
1193
|
+
};
|
|
1183
1194
|
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1184
1195
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
1185
1196
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"clipboard", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"paste", {
|
|
@@ -347,7 +347,12 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
347
347
|
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
348
348
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
349
349
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
350
|
-
}, import("@atlaskit/editor-common/types").FeatureFlags
|
|
350
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
351
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
352
|
+
commands: {
|
|
353
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
354
|
+
};
|
|
355
|
+
}, undefined>>];
|
|
351
356
|
sharedState: {
|
|
352
357
|
copyButtonHoverNode: import("prosemirror-model").Node;
|
|
353
358
|
} | undefined;
|
|
@@ -359,6 +364,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
359
364
|
actions: import("@atlaskit/editor-plugins/selection").EditorSelectionAPI;
|
|
360
365
|
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
361
366
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
367
|
+
commands: {
|
|
368
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
369
|
+
};
|
|
362
370
|
}, undefined>>];
|
|
363
371
|
commands: {
|
|
364
372
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
@@ -1128,6 +1136,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
1128
1136
|
sharedState: import("@atlaskit/editor-plugins/composition").CompositionState;
|
|
1129
1137
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1130
1138
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1139
|
+
commands: {
|
|
1140
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
1141
|
+
};
|
|
1131
1142
|
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1132
1143
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
1133
1144
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"clipboard", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"paste", {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { EditorNextProps } from '../types/editor-props';
|
|
3
3
|
import { type WithAppearanceComponent } from '../types/with-appearance-component';
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param props
|
|
7
|
+
* @example
|
|
8
|
+
*/
|
|
4
9
|
export declare function CoreEditor(props: EditorNextProps & WithAppearanceComponent): jsx.JSX.Element;
|
|
5
10
|
export declare namespace CoreEditor {
|
|
6
11
|
var propTypes: {
|
|
@@ -491,7 +491,13 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
491
491
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
492
492
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
493
493
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
494
|
-
}, import("@atlaskit/editor-common/types").FeatureFlags
|
|
494
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>,
|
|
495
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
496
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
497
|
+
commands: {
|
|
498
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
499
|
+
};
|
|
500
|
+
}, undefined>>
|
|
495
501
|
];
|
|
496
502
|
sharedState: {
|
|
497
503
|
copyButtonHoverNode: import("prosemirror-model").Node;
|
|
@@ -506,6 +512,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
506
512
|
dependencies: [
|
|
507
513
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
508
514
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
515
|
+
commands: {
|
|
516
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
517
|
+
};
|
|
509
518
|
}, undefined>>
|
|
510
519
|
];
|
|
511
520
|
commands: {
|
|
@@ -1414,6 +1423,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
1414
1423
|
}, undefined>,
|
|
1415
1424
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1416
1425
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1426
|
+
commands: {
|
|
1427
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
1428
|
+
};
|
|
1417
1429
|
}, undefined> | undefined,
|
|
1418
1430
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1419
1431
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
@@ -543,7 +543,13 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
543
543
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
544
544
|
pluginConfiguration: FeatureFlags;
|
|
545
545
|
sharedState: FeatureFlags;
|
|
546
|
-
}, FeatureFlags
|
|
546
|
+
}, FeatureFlags>>,
|
|
547
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
548
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
549
|
+
commands: {
|
|
550
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
551
|
+
};
|
|
552
|
+
}, undefined>>
|
|
547
553
|
];
|
|
548
554
|
sharedState: {
|
|
549
555
|
copyButtonHoverNode: import("prosemirror-model").Node;
|
|
@@ -558,6 +564,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
558
564
|
dependencies: [
|
|
559
565
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
560
566
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
567
|
+
commands: {
|
|
568
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
569
|
+
};
|
|
561
570
|
}, undefined>>
|
|
562
571
|
];
|
|
563
572
|
commands: {
|
|
@@ -1466,6 +1475,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
1466
1475
|
}, undefined>,
|
|
1467
1476
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1468
1477
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1478
|
+
commands: {
|
|
1479
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
1480
|
+
};
|
|
1469
1481
|
}, undefined> | undefined,
|
|
1470
1482
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1471
1483
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
@@ -491,7 +491,13 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
491
491
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
492
492
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
493
493
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
494
|
-
}, import("@atlaskit/editor-common/types").FeatureFlags
|
|
494
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>,
|
|
495
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
496
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
497
|
+
commands: {
|
|
498
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
499
|
+
};
|
|
500
|
+
}, undefined>>
|
|
495
501
|
];
|
|
496
502
|
sharedState: {
|
|
497
503
|
copyButtonHoverNode: import("prosemirror-model").Node;
|
|
@@ -506,6 +512,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
506
512
|
dependencies: [
|
|
507
513
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
508
514
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
515
|
+
commands: {
|
|
516
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
517
|
+
};
|
|
509
518
|
}, undefined>>
|
|
510
519
|
];
|
|
511
520
|
commands: {
|
|
@@ -1414,6 +1423,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
1414
1423
|
}, undefined>,
|
|
1415
1424
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1416
1425
|
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1426
|
+
commands: {
|
|
1427
|
+
handleInteraction: import("@atlaskit/editor-common/types").EditorCommand;
|
|
1428
|
+
};
|
|
1417
1429
|
}, undefined> | undefined,
|
|
1418
1430
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1419
1431
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "207.0.
|
|
3
|
+
"version": "207.0.6",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
45
45
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
46
46
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
|
-
"@atlaskit/button": "^23.
|
|
47
|
+
"@atlaskit/button": "^23.1.0",
|
|
48
48
|
"@atlaskit/css": "^0.10.0",
|
|
49
|
-
"@atlaskit/editor-common": "^105.
|
|
49
|
+
"@atlaskit/editor-common": "^105.6.0",
|
|
50
50
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
51
51
|
"@atlaskit/editor-performance-metrics": "^2.1.0",
|
|
52
52
|
"@atlaskit/editor-plugin-quick-insert": "^2.5.0",
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
55
55
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
56
56
|
"@atlaskit/emoji": "^69.2.0",
|
|
57
|
-
"@atlaskit/icon": "^26.
|
|
57
|
+
"@atlaskit/icon": "^26.1.0",
|
|
58
58
|
"@atlaskit/media-card": "^79.2.0",
|
|
59
59
|
"@atlaskit/mention": "^24.1.0",
|
|
60
60
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
61
61
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
62
|
-
"@atlaskit/react-ufo": "^3.
|
|
62
|
+
"@atlaskit/react-ufo": "^3.13.0",
|
|
63
63
|
"@atlaskit/task-decision": "^19.2.0",
|
|
64
64
|
"@atlaskit/tmp-editor-statsig": "^4.22.0",
|
|
65
|
-
"@atlaskit/tokens": "^4.
|
|
65
|
+
"@atlaskit/tokens": "^4.9.0",
|
|
66
66
|
"@atlaskit/tooltip": "^20.0.0",
|
|
67
67
|
"@atlaskit/width-detector": "^5.0.0",
|
|
68
68
|
"@babel/runtime": "^7.0.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@atlaskit/modal-dialog": "^14.2.0",
|
|
103
103
|
"@atlaskit/primitives": "^14.7.0",
|
|
104
104
|
"@atlaskit/renderer": "^118.1.0",
|
|
105
|
-
"@atlaskit/smart-card": "^38.
|
|
105
|
+
"@atlaskit/smart-card": "^38.2.0",
|
|
106
106
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
107
107
|
"@atlaskit/toggle": "^15.0.0",
|
|
108
108
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
@@ -156,12 +156,6 @@
|
|
|
156
156
|
"platform_editor_reduce_scroll_jump_on_editor_start": {
|
|
157
157
|
"type": "boolean"
|
|
158
158
|
},
|
|
159
|
-
"platform_editor_fe--performance_metrics": {
|
|
160
|
-
"type": "boolean"
|
|
161
|
-
},
|
|
162
|
-
"platform_editor_fe--ufo-bridge": {
|
|
163
|
-
"type": "boolean"
|
|
164
|
-
},
|
|
165
159
|
"platform_editor_fe--inp-metrics": {
|
|
166
160
|
"type": "boolean"
|
|
167
161
|
},
|
|
@@ -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
|
-
});
|