@atlaskit/editor-core 219.4.1 → 219.5.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 +32 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +11 -5
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +14 -50
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +198 -1
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +19 -14
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +11 -5
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +12 -47
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +198 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +21 -16
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +11 -5
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +14 -50
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +198 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +21 -16
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +11 -8
|
@@ -11,8 +11,10 @@ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
|
11
11
|
// TODO: add back tableSharedStyle when migrate table styles
|
|
12
12
|
// import { richMediaClassName, tableSharedStyle } from '@atlaskit/editor-common/styles';
|
|
13
13
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
14
|
-
import { AnnotationSharedClassNames, richMediaClassName, expandClassNames, SmartCardSharedCssClassName, CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
15
|
-
import {
|
|
14
|
+
import { AnnotationSharedClassNames, richMediaClassName, expandClassNames, SmartCardSharedCssClassName, CodeBlockSharedCssClassName, tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
15
|
+
import { tableCellBackgroundStyleOverrideForCompiled } from '@atlaskit/editor-common/table-cell-background-for-compiled';
|
|
16
|
+
import { akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize, akEditorGutterPaddingDynamic, akEditorTableNumberColumnWidth, editorFontSize } from '@atlaskit/editor-shared-styles';
|
|
17
|
+
import { overflowShadowForCompiled } from '@atlaskit/editor-shared-styles/overflow-shadow-for-compiled';
|
|
16
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
19
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
20
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
@@ -310,12 +312,14 @@ const editorContentStyles = {
|
|
|
310
312
|
syncBlockOverflowStyles: "",
|
|
311
313
|
syncBlockStyles: "",
|
|
312
314
|
syncBlockStylesBase: "",
|
|
313
|
-
tableCommentEditorStyles: "",
|
|
314
|
-
tableContainerStyles: "",
|
|
315
|
-
tableContentModeStyles: "",
|
|
316
|
-
tableEmptyRowStyles: "",
|
|
317
|
-
tableLayoutFixes: "",
|
|
318
|
-
tableLayoutFixesWithFontSize: "",
|
|
315
|
+
tableCommentEditorStyles: "_s9qz1mok _1quk1aqn _1tb2idpf _8vyeidpf _1igzolhs _ux48glyw _giavsm61 _axu71ibz",
|
|
316
|
+
tableContainerStyles: "_18ml1osq _9e5g1wug _uwd31osq _12wgusvi _nnhzewfl _1gbz1osq _10va1osq _lkzl1n9t _1mca1wug",
|
|
317
|
+
tableContentModeStyles: "_1lxan7od _11a2n7od _19iin7od _1vpzn7od _l6b9n7od _9v33vi1l _poet1ris _9loxvi1l _1dsv1wug _r83tvi1l _cbmx261p",
|
|
318
|
+
tableEmptyRowStyles: "_1rgmmh6f _u0mgmh6f",
|
|
319
|
+
tableLayoutFixes: "_1f5xidpf _28dsidpf _f30jidpf _jr291hrf",
|
|
320
|
+
tableLayoutFixesWithFontSize: "_1f5xidpf _156tidpf _f30jidpf _jr291hrf",
|
|
321
|
+
tableSharedStyle: "_ad1u99ee _9d0e7qp0 _1mml7qp0 _1u4a1ule _1w721ule _1gr6t94y _ihzat94y _zi6e1vmz _1uln1vmz _wqm3stnw _1o0wstnw _1aho1ejb _uqg71ejb _g971h2mm _fzt6usvi _1nd8idpf _1j1lidpf _e364idpf _7vb2pzf8 _5cdi6z83 _kc8l11ss _9vqg11ss _up97ia51 _jz731rb6 _13ax1rb6 _b7zl1rb6 _10kw1rb6 _1u451rb6 _1gep1rb6 _14oi1rb6 _3yki1rb6 _185t1rb6 _13heu2gc _1uj1u2gc _1ssuu2gc _lqdju2gc _1waku2gc _1nzzu2gc _7xl8ckbl _1jykckbl _1m6qckbl _sellckbl _11t9ckbl _866vckbl _1dlzi7a9 _irzhi7a9 _15t1i7a9 _1ivxi7a9 _16k4i7a9 _1vo6i7a9 _q0zvjp4b _1junjp4b _ixm7jp4b _17dpjp4b _dzhmjp4b _15pyjp4b _dj9oidpf _8zz2idpf _1hwbidpf _1lxyidpf _yqeuidpf _mzo1idpf _9ex2idpf _1805idpf _1iphidpf _qkm8idpf _17v9idpf _4p8kidpf _6o4midpf _1edridpf _5908idpf _1d63idpf _1j36idpf _hlqnidpf _gw0eutpp _1n42utpp _762vutpp _g62yutpp _1y9hutpp _bjiqutpp _5dtjutpp _dclrutpp _1j94utpp _5o16utpp _946yutpp _1kffutpp _13bnglyw _1ekgglyw _nvt3glyw _v91rcfaq _byukcfaq _4oczcfaq _17xf1j28 _6ggl1j28 _wxs41j28 _1h3k1j28 _1e811j28 _w9wp1j28 _3aim1n9t _xsax1n9t _1hz91n9t _vqlp1x4e _1a0i1x4e _m5f81x4e _12j81osq _135a1osq _vkob1osq _dujf1wug _jr3h1wug _1ei91wug _kq5rusvi _31x2usvi _pavrusvi _14jm1ntv _1rfm1ntv _100i1ntv _1ciasm61 _5gm1sm61 _t176sm61 _1az4vuon _1mdwvuon _9l08vuon _vrwbysee _nwuhysee _1qxuysee _go9a1e5h _ktc91e5h _lr001e5h _komfhp5a _1lj5hp5a _96m3hp5a _s2681tsb _15bz1tsb _1skp1tsb _iley2lzm _ay9u2lzm _8zqr2lzm _qxl3i8nm _3gtki8nm _1nu9i8nm _lezgi8nm _1574i8nm _1yd8i8nm _ywut18tx _cee918tx _17h918tx _1esgtoke _1q0atoke _4waqtoke _1syri8nm _pvtri8nm _12jli8nm _dbl6pzf8 _4e711hrf _1hy1bokp _1bxo1ea5",
|
|
322
|
+
tableSharedStyleBackgroundClipFix: "_m6yo1u8q _19il1u8q _10gj1u8q _tbd61u8q _12ly1u8q _1l071u8q",
|
|
319
323
|
taskItemCheckboxStyles: "",
|
|
320
324
|
taskItemStyles: "",
|
|
321
325
|
taskItemStylesWithBlockTaskItem: "",
|
|
@@ -356,6 +360,9 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
|
|
|
356
360
|
const isChromeless = appearance === 'chromeless';
|
|
357
361
|
const baseFontSize = getBaseFontSize(appearance, contentMode);
|
|
358
362
|
const isDense = !!baseFontSize && baseFontSize !== akEditorFullPageDefaultFontSize;
|
|
363
|
+
const tableOverflowShadow = overflowShadowForCompiled({
|
|
364
|
+
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
365
|
+
});
|
|
359
366
|
const style = editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
360
367
|
exposure: true
|
|
361
368
|
}) ? {
|
|
@@ -363,14 +370,16 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
|
|
|
363
370
|
theme: {
|
|
364
371
|
baseFontSize
|
|
365
372
|
}
|
|
366
|
-
})}px
|
|
373
|
+
})}px`,
|
|
374
|
+
'--ak-editor--table-overflow-shadow': tableOverflowShadow
|
|
367
375
|
} : {
|
|
368
376
|
'--ak-editor-base-font-size': `${editorFontSize({
|
|
369
377
|
theme: {
|
|
370
378
|
baseFontSize
|
|
371
379
|
}
|
|
372
380
|
})}px`,
|
|
373
|
-
'--ak-editor--large-gutter-padding': `${akEditorGutterPaddingDynamic()}px
|
|
381
|
+
'--ak-editor--large-gutter-padding': `${akEditorGutterPaddingDynamic()}px`,
|
|
382
|
+
'--ak-editor--table-overflow-shadow': tableOverflowShadow
|
|
374
383
|
};
|
|
375
384
|
const browser = getBrowserInfo();
|
|
376
385
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -438,11 +447,7 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
|
|
|
438
447
|
// : // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
439
448
|
// getDenseEmojiStyles(baseFontSize)
|
|
440
449
|
// : undefined,
|
|
441
|
-
editorContentStyles.panelViewStyles, editorContentStyles.mediaGroupStyles, editorContentStyles.mediaAlignmentStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) ? editorContentStyles.tableLayoutFixesWithFontSize : editorContentStyles.tableLayoutFixes, editorContentStyles.tableContainerStyles,
|
|
442
|
-
// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
|
|
443
|
-
// TODO: it was from "import { tableSharedStyle } from '@atlaskit/editor-common/styles';"
|
|
444
|
-
// tableSharedStyle(),
|
|
445
|
-
editorContentStyles.tableEmptyRowStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeStyles, editorContentStyles.hyperLinkFloatingToolbarStyles, editorContentStyles.selectionToolbarAnimationStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.blockquoteDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.textDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.listDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerDateStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.emojiDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mentionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.decisionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.statusDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerRuleStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mediaDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.nestedPanelDangerStyles, className]),
|
|
450
|
+
editorContentStyles.panelViewStyles, editorContentStyles.mediaGroupStyles, editorContentStyles.mediaAlignmentStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) ? editorContentStyles.tableLayoutFixesWithFontSize : editorContentStyles.tableLayoutFixes, editorContentStyles.tableContainerStyles, editorContentStyles.tableSharedStyle, (browser.gecko || browser.ie || browser.mac && browser.chrome) && editorContentStyles.tableSharedStyleBackgroundClipFix, editorContentStyles.tableEmptyRowStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeStyles, editorContentStyles.hyperLinkFloatingToolbarStyles, editorContentStyles.selectionToolbarAnimationStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.blockquoteDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.textDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.listDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerDateStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.emojiDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mentionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.decisionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.statusDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerRuleStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mediaDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.nestedPanelDangerStyles, className]),
|
|
446
451
|
ref: ref,
|
|
447
452
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
448
453
|
"data-testid": "editor-content-container"
|
|
@@ -451,5 +456,5 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
|
|
|
451
456
|
style: style,
|
|
452
457
|
tabIndex: isScrollable ? 0 : undefined,
|
|
453
458
|
role: isScrollable ? 'region' : undefined
|
|
454
|
-
}, children);
|
|
459
|
+
}, /*#__PURE__*/React.createElement("style", null, tableCellBackgroundStyleOverrideForCompiled), children);
|
|
455
460
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "219.
|
|
2
|
+
export const version = "219.5.0";
|
|
@@ -70,14 +70,20 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
70
70
|
var scrollContentContainerRef = useRef(null);
|
|
71
71
|
var showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
72
72
|
var editorAPI = props.editorAPI;
|
|
73
|
-
var state = useSharedPluginStateWithSelector(editorAPI, ['primaryToolbar', 'interaction', 'editorViewMode'], function (states) {
|
|
74
|
-
var _states$primaryToolba, _states$interactionSt, _states$editorViewMod;
|
|
73
|
+
var state = useSharedPluginStateWithSelector(editorAPI, ['primaryToolbar', 'interaction', 'editorViewMode', 'toolbar'], function (states) {
|
|
74
|
+
var _states$primaryToolba, _states$interactionSt, _states$editorViewMod, _states$toolbarState;
|
|
75
75
|
return {
|
|
76
76
|
primaryToolbarComponents: (_states$primaryToolba = states.primaryToolbarState) === null || _states$primaryToolba === void 0 ? void 0 : _states$primaryToolba.components,
|
|
77
77
|
interactionState: (_states$interactionSt = states.interactionState) === null || _states$interactionSt === void 0 ? void 0 : _states$interactionSt.interactionState,
|
|
78
|
-
editorViewMode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
|
|
78
|
+
editorViewMode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode,
|
|
79
|
+
contextualFormattingModeOverride: (_states$toolbarState = states.toolbarState) === null || _states$toolbarState === void 0 ? void 0 : _states$toolbarState.contextualFormattingModeOverride
|
|
79
80
|
};
|
|
80
81
|
});
|
|
82
|
+
// Markdown Mode forces `'always-pinned'` while in source / preview view
|
|
83
|
+
// (no PM selection to anchor a floating toolbar to). The user's docking
|
|
84
|
+
// pref alone is not enough to decide whether to mount the primary toolbar
|
|
85
|
+
// in that case — the override has to short-circuit the hide gate below.
|
|
86
|
+
var forcePrimaryToolbarPinned = state.contextualFormattingModeOverride === 'always-pinned' && fg('platform_editor_toolbar_mode_override');
|
|
81
87
|
var interactionState = state.interactionState;
|
|
82
88
|
var primaryToolbarState = getPrimaryToolbarComponents(editorAPI, state.primaryToolbarComponents);
|
|
83
89
|
var hasHadInteraction = interactionState !== 'hasNotHadInteraction';
|
|
@@ -120,14 +126,14 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
120
126
|
})) {
|
|
121
127
|
if (fg('platform_editor_use_preferences_plugin')) {
|
|
122
128
|
// need to check if the toolbarDockingPosition is set to 'none' or 'top'
|
|
123
|
-
if (toolbarDockingPosition === 'none') {
|
|
129
|
+
if (toolbarDockingPosition === 'none' && !forcePrimaryToolbarPinned) {
|
|
124
130
|
primaryToolbarComponents = [];
|
|
125
131
|
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
126
132
|
isEditorToolbarHidden = true;
|
|
127
133
|
}
|
|
128
134
|
}
|
|
129
135
|
} else {
|
|
130
|
-
if (toolbarDocking === 'none') {
|
|
136
|
+
if (toolbarDocking === 'none' && !forcePrimaryToolbarPinned) {
|
|
131
137
|
primaryToolbarComponents = [];
|
|
132
138
|
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
133
139
|
isEditorToolbarHidden = true;
|
|
@@ -5,8 +5,10 @@ import React, { useCallback } from 'react';
|
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/context-panel';
|
|
7
7
|
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
8
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
8
9
|
import { shouldShowPrimaryToolbar, TOOLBARS } from '@atlaskit/editor-common/toolbar';
|
|
9
10
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
13
|
import { isToolbar } from '../../../utils/toolbar';
|
|
12
14
|
import ExcludeFromHydration from '../../ExcludeFromHydration';
|
|
@@ -50,17 +52,6 @@ var SecondChildWrapper = function SecondChildWrapper(_ref3) {
|
|
|
50
52
|
className: ax([styles.secondChildWrapperOneLine])
|
|
51
53
|
}, children);
|
|
52
54
|
};
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Placeholder component that reserves the toolbar's space during hydration
|
|
56
|
-
* to prevent layout shift when the actual toolbar renders.
|
|
57
|
-
*/
|
|
58
|
-
var ToolbarPlaceholder = function ToolbarPlaceholder() {
|
|
59
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
60
|
-
"data-testid": "ak-editor-main-toolbar-placeholder",
|
|
61
|
-
className: ax([styles.toolbarPlaceholder])
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
55
|
var shouldShowToolbarContainer = function shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents) {
|
|
65
56
|
return !!toolbar || !!customPrimaryToolbarComponents;
|
|
66
57
|
};
|
|
@@ -75,7 +66,12 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
|
75
66
|
customPrimaryToolbarComponents = _ref4.customPrimaryToolbarComponents,
|
|
76
67
|
disabled = _ref4.disabled;
|
|
77
68
|
var components = editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar = editorAPI.toolbar) === null || _editorAPI$toolbar === void 0 ? void 0 : _editorAPI$toolbar.actions.getComponents();
|
|
78
|
-
var
|
|
69
|
+
var runtimeOverride = useSharedPluginStateWithSelector(editorAPI, ['toolbar'], function (states) {
|
|
70
|
+
var _states$toolbarState;
|
|
71
|
+
return (_states$toolbarState = states.toolbarState) === null || _states$toolbarState === void 0 ? void 0 : _states$toolbarState.contextualFormattingModeOverride;
|
|
72
|
+
});
|
|
73
|
+
var effectiveRuntimeOverride = runtimeOverride !== undefined && fg('platform_editor_toolbar_mode_override') ? runtimeOverride : undefined;
|
|
74
|
+
var contextualFormattingEnabled = effectiveRuntimeOverride !== null && effectiveRuntimeOverride !== void 0 ? effectiveRuntimeOverride : editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar2 = editorAPI.toolbar) === null || _editorAPI$toolbar2 === void 0 ? void 0 : _editorAPI$toolbar2.actions.contextualFormattingMode();
|
|
79
75
|
var intl = useIntl();
|
|
80
76
|
var toolbar = components === null || components === void 0 ? void 0 : components.find(function (component) {
|
|
81
77
|
return component.key === TOOLBARS.PRIMARY_TOOLBAR;
|
|
@@ -109,41 +105,9 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
|
109
105
|
if (!shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
|
|
110
106
|
return /*#__PURE__*/React.createElement(ToolbarPortal, null, null);
|
|
111
107
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
116
|
-
editorView: editorView,
|
|
117
|
-
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
118
|
-
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
119
|
-
handleEscape: handleEscape,
|
|
120
|
-
intl: intl
|
|
121
|
-
}, /*#__PURE__*/React.createElement(ToolbarPortal, null, /*#__PURE__*/React.createElement(MainToolbarWrapper, {
|
|
122
|
-
testId: "ak-editor-main-toolbar",
|
|
123
|
-
showKeyline: showKeyline || ContextPanelWidth > 0
|
|
124
|
-
}, beforeIcon && /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className: ax([styles.mainToolbarIconBefore, styles.mainToolbarIconBeforeNew])
|
|
126
|
-
}, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, /*#__PURE__*/React.createElement(ExcludeFromHydration, null, primaryToolbarDockingConfigEnabled && components && isToolbar(toolbar) && editorView && !isSSR() && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
127
|
-
toolbar: toolbar,
|
|
128
|
-
components: components,
|
|
129
|
-
editorView: editorView,
|
|
130
|
-
editorAPI: editorAPI,
|
|
131
|
-
popupsMountPoint: mountPoint,
|
|
132
|
-
editorAppearance: "full-page",
|
|
133
|
-
isDisabled: disabled
|
|
134
|
-
}))), /*#__PURE__*/React.createElement(SecondChildWrapper, null, /*#__PURE__*/React.createElement("div", {
|
|
135
|
-
className: ax([styles.customToolbarWrapperStyle])
|
|
136
|
-
}, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/React.createElement("div", {
|
|
137
|
-
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
138
|
-
className: ax([styles.beforePrimaryToolbarComponents])
|
|
139
|
-
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents)), /*#__PURE__*/React.createElement(ToolbarPortalMountPoint, null)))));
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, function (_ref7) {
|
|
143
|
-
var ContextPanelWidth = _ref7.width;
|
|
144
|
-
return /*#__PURE__*/React.createElement(ExcludeFromHydration, {
|
|
145
|
-
fallback: /*#__PURE__*/React.createElement(ToolbarPlaceholder, null)
|
|
146
|
-
}, /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
108
|
+
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, function (_ref6) {
|
|
109
|
+
var ContextPanelWidth = _ref6.width;
|
|
110
|
+
return /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
147
111
|
editorView: editorView,
|
|
148
112
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
149
113
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
@@ -154,7 +118,7 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
|
154
118
|
showKeyline: showKeyline || ContextPanelWidth > 0
|
|
155
119
|
}, beforeIcon && /*#__PURE__*/React.createElement("div", {
|
|
156
120
|
className: ax([styles.mainToolbarIconBefore, styles.mainToolbarIconBeforeNew])
|
|
157
|
-
}, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, primaryToolbarDockingConfigEnabled && components && isToolbar(toolbar) && editorView && !isSSR() && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
121
|
+
}, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, /*#__PURE__*/React.createElement(ExcludeFromHydration, null, primaryToolbarDockingConfigEnabled && components && isToolbar(toolbar) && editorView && !isSSR() && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
158
122
|
toolbar: toolbar,
|
|
159
123
|
components: components,
|
|
160
124
|
editorView: editorView,
|
|
@@ -162,11 +126,11 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
|
162
126
|
popupsMountPoint: mountPoint,
|
|
163
127
|
editorAppearance: "full-page",
|
|
164
128
|
isDisabled: disabled
|
|
165
|
-
})), /*#__PURE__*/React.createElement(SecondChildWrapper, null, /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
}))), /*#__PURE__*/React.createElement(SecondChildWrapper, null, /*#__PURE__*/React.createElement("div", {
|
|
166
130
|
className: ax([styles.customToolbarWrapperStyle])
|
|
167
131
|
}, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/React.createElement("div", {
|
|
168
132
|
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
169
133
|
className: ax([styles.beforePrimaryToolbarComponents])
|
|
170
|
-
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents)), /*#__PURE__*/React.createElement(ToolbarPortalMountPoint, null)))))
|
|
134
|
+
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents)), /*#__PURE__*/React.createElement(ToolbarPortalMountPoint, null)))));
|
|
171
135
|
});
|
|
172
136
|
};
|