@atlaskit/editor-core 207.19.6 → 207.21.0
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 +46 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/afm-post-office/tsconfig.json +3 -0
- package/dist/cjs/create-editor/ReactEditorView/useDispatchTransaction.js +4 -1
- package/dist/cjs/create-editor/ReactEditorView.js +8 -2
- package/dist/cjs/i18n/sl.js +19 -0
- package/dist/cjs/i18n/sr_RS.js +19 -0
- package/dist/cjs/presets/default.js +8 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +24 -4
- package/dist/cjs/ui/ContentStyles/index.js +2 -2
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +3 -1
- package/dist/cjs/ui/EditorContentContainer/styles/resizerStyles.js +15 -1
- package/dist/cjs/ui/EditorContentContainer/styles/telepointerStyles.js +28 -0
- package/dist/cjs/ui/Toolbar/getPrimaryToolbarComponents.js +21 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView/useDispatchTransaction.js +4 -1
- package/dist/es2019/create-editor/ReactEditorView.js +8 -2
- package/dist/es2019/i18n/sl.js +13 -0
- package/dist/es2019/i18n/sr_RS.js +13 -0
- package/dist/es2019/presets/default.js +6 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +24 -4
- package/dist/es2019/ui/ContentStyles/index.js +2 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +4 -2
- package/dist/es2019/ui/EditorContentContainer/styles/resizerStyles.js +14 -0
- package/dist/es2019/ui/EditorContentContainer/styles/telepointerStyles.js +28 -0
- package/dist/es2019/ui/Toolbar/getPrimaryToolbarComponents.js +16 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView/useDispatchTransaction.js +4 -1
- package/dist/esm/create-editor/ReactEditorView.js +8 -2
- package/dist/esm/i18n/sl.js +13 -0
- package/dist/esm/i18n/sr_RS.js +13 -0
- package/dist/esm/presets/default.js +8 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +3 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +24 -4
- package/dist/esm/ui/ContentStyles/index.js +3 -3
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +4 -2
- package/dist/esm/ui/EditorContentContainer/styles/resizerStyles.js +14 -0
- package/dist/esm/ui/EditorContentContainer/styles/telepointerStyles.js +28 -0
- package/dist/esm/ui/Toolbar/getPrimaryToolbarComponents.js +16 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +125 -11
- package/dist/types/i18n/sl.d.ts +12 -0
- package/dist/types/i18n/sr_RS.d.ts +12 -0
- package/dist/types/presets/default-preset-type.d.ts +2 -0
- package/dist/types/presets/universal.d.ts +125 -11
- package/dist/types/presets/useUniversalPreset.d.ts +125 -11
- package/dist/types/ts-hack.d.ts +1 -1
- package/dist/types/types/editor-onchange.d.ts +10 -0
- package/dist/types/ui/Appearance/Chromeless.d.ts +1 -1
- package/dist/types/ui/EditorContentContainer/styles/resizerStyles.d.ts +1 -0
- package/dist/types/ui/Toolbar/getPrimaryToolbarComponents.d.ts +5 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +154 -9
- package/dist/types-ts4.5/i18n/sl.d.ts +12 -0
- package/dist/types-ts4.5/i18n/sr_RS.d.ts +12 -0
- package/dist/types-ts4.5/presets/default-preset-type.d.ts +2 -0
- package/dist/types-ts4.5/presets/universal.d.ts +154 -9
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +154 -9
- package/dist/types-ts4.5/ts-hack.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-onchange.d.ts +10 -0
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/resizerStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/Toolbar/getPrimaryToolbarComponents.d.ts +7 -0
- package/package.json +20 -11
|
@@ -12,6 +12,7 @@ import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
12
12
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
|
+
import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
|
|
15
16
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
16
17
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
17
18
|
import { getEditorViewMode } from './getEditorViewModeSync';
|
|
@@ -77,9 +78,10 @@ export const FullPageEditor = props => {
|
|
|
77
78
|
const editorAPI = props.editorAPI;
|
|
78
79
|
const {
|
|
79
80
|
editorViewModeState,
|
|
80
|
-
primaryToolbarState,
|
|
81
|
+
primaryToolbarState: primaryToolbarHookState,
|
|
81
82
|
interactionState
|
|
82
83
|
} = useFullPageEditorPluginsStates(editorAPI);
|
|
84
|
+
const primaryToolbarState = getPrimaryToolbarComponents(editorAPI, primaryToolbarHookState === null || primaryToolbarHookState === void 0 ? void 0 : primaryToolbarHookState.components);
|
|
83
85
|
const viewMode = getEditorViewMode(editorViewModeState, props.preset);
|
|
84
86
|
|
|
85
87
|
// Remove all this logic when platform_editor_interaction_api_refactor is cleaned up
|
|
@@ -94,8 +96,18 @@ export const FullPageEditor = props => {
|
|
|
94
96
|
} else {
|
|
95
97
|
hasHadInteraction = interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction;
|
|
96
98
|
}
|
|
97
|
-
let toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking'
|
|
98
|
-
|
|
99
|
+
let toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking', {
|
|
100
|
+
disabled: fg('platform_editor_use_preferences_plugin')
|
|
101
|
+
});
|
|
102
|
+
let toolbarDockingPref = useSharedPluginStateSelector(editorAPI, 'userPreferences.preferences.toolbarDockingPosition', {
|
|
103
|
+
disabled: !fg('platform_editor_use_preferences_plugin')
|
|
104
|
+
});
|
|
105
|
+
if (fg('platform_editor_use_preferences_plugin')) {
|
|
106
|
+
if (!toolbarDockingPref) {
|
|
107
|
+
var _editorAPI$userPrefer, _editorAPI$userPrefer2;
|
|
108
|
+
toolbarDockingPref = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$userPrefer = editorAPI.userPreferences) === null || _editorAPI$userPrefer === void 0 ? void 0 : (_editorAPI$userPrefer2 = _editorAPI$userPrefer.sharedState.currentState()) === null || _editorAPI$userPrefer2 === void 0 ? void 0 : _editorAPI$userPrefer2.preferences.toolbarDockingPosition;
|
|
109
|
+
}
|
|
110
|
+
} else if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
99
111
|
var _editorAPI$selectionT, _editorAPI$selectionT2, _editorAPI$selectionT3;
|
|
100
112
|
// This is a workaround for the rendering issue with the selection toolbar
|
|
101
113
|
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
@@ -114,7 +126,15 @@ export const FullPageEditor = props => {
|
|
|
114
126
|
if (editorExperiment('platform_editor_controls', 'variant1', {
|
|
115
127
|
exposure: true
|
|
116
128
|
})) {
|
|
117
|
-
if (fg('
|
|
129
|
+
if (fg('platform_editor_use_preferences_plugin')) {
|
|
130
|
+
// need to check if the toolbarDockingPref is set to 'none' or 'top'
|
|
131
|
+
if (toolbarDockingPref === 'none') {
|
|
132
|
+
primaryToolbarComponents = [];
|
|
133
|
+
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
134
|
+
isEditorToolbarHidden = true;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
} else if (fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
118
138
|
if (toolbarDocking === 'none') {
|
|
119
139
|
primaryToolbarComponents = [];
|
|
120
140
|
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
@@ -17,7 +17,7 @@ import { EmojiSharedCssClassName, defaultEmojiHeight } from '@atlaskit/editor-co
|
|
|
17
17
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
18
18
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
19
19
|
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
20
|
-
import { CodeBlockSharedCssClassName, MediaSharedClassNames, SmartCardSharedCssClassName, annotationSharedStyles, backgroundColorStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, linkSharedStyle, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, pragmaticResizerStylesForTooltip, ruleSharedStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
20
|
+
import { CodeBlockSharedCssClassName, MediaSharedClassNames, SmartCardSharedCssClassName, annotationSharedStyles, backgroundColorStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, linkSharedStyle, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip, ruleSharedStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
21
21
|
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
22
22
|
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
23
23
|
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
@@ -443,6 +443,7 @@ const legacyContentStyles = props => css`
|
|
|
443
443
|
${unsupportedStyles}
|
|
444
444
|
${resizerStyles}
|
|
445
445
|
${pragmaticResizerStyles()}
|
|
446
|
+
${pragmaticStylesLayoutFirstNodeResizeHandleFix()}
|
|
446
447
|
${pragmaticResizerStylesForTooltip()}
|
|
447
448
|
${aiPanelStyles(props.colorMode)}
|
|
448
449
|
${firstBlockNodeStylesNew}
|
|
@@ -45,7 +45,7 @@ import { mentionsStyles, vanillaMentionsStyles, vanillaMentionsSelectionStyles }
|
|
|
45
45
|
import { panelStyles, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix, panelViewStyles } from './styles/panelStyles';
|
|
46
46
|
import { paragraphStylesOld, paragraphStylesUGCModernized, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
|
|
47
47
|
import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderWrapStyles } from './styles/placeholderStyles';
|
|
48
|
-
import { resizerStyles, pragmaticResizerStyles, pragmaticResizerStylesForTooltip } from './styles/resizerStyles';
|
|
48
|
+
import { resizerStyles, pragmaticResizerStyles, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip } from './styles/resizerStyles';
|
|
49
49
|
import { ruleStyles } from './styles/rule';
|
|
50
50
|
import { scrollbarStyles } from './styles/scrollbarStyles';
|
|
51
51
|
import { hideCursorWhenHideSelectionStyles, hideSelectionStyles, selectedNodeStyles } from './styles/selectionStyles';
|
|
@@ -273,7 +273,9 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
273
273
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
274
274
|
browser.safari && listsStylesSafariFix, editorExperiment('platform_editor_breakout_resizing', true) &&
|
|
275
275
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
276
|
-
pragmaticResizerStyles, editorExperiment('platform_editor_breakout_resizing', true) && fg('platform_editor_breakout_resizing_hello_release') &&
|
|
276
|
+
pragmaticResizerStyles, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_breakout_resizing', true) && fg('platform_editor_breakout_resizing_hello_release') &&
|
|
277
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
278
|
+
pragmaticStylesLayoutFirstNodeResizeHandleFix, editorExperiment('platform_editor_breakout_resizing', true) && fg('platform_editor_breakout_resizing_hello_release') &&
|
|
277
279
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
278
280
|
pragmaticResizerStylesForTooltip,
|
|
279
281
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -232,6 +232,20 @@ export const pragmaticResizerStylesForTooltip = css({
|
|
|
232
232
|
}
|
|
233
233
|
});
|
|
234
234
|
|
|
235
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
236
|
+
export const pragmaticStylesLayoutFirstNodeResizeHandleFix = css({
|
|
237
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
238
|
+
'.fabric-editor-breakout-mark': {
|
|
239
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
240
|
+
'&:has([data-prosemirror-node-name="layoutSection"].first-node-in-document)': {
|
|
241
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
242
|
+
'> .pm-breakout-resize-handle-container': {
|
|
243
|
+
height: 'calc(100% - 8px)'
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
|
|
235
249
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
236
250
|
export const pragmaticResizerStyles = css({
|
|
237
251
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -26,6 +26,26 @@ const pulseOut = keyframes({
|
|
|
26
26
|
opacity: 0
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
+
const pulseInDuringTr = keyframes({
|
|
30
|
+
'0%, 95%': {
|
|
31
|
+
transform: 'scaleX(1)',
|
|
32
|
+
opacity: 1
|
|
33
|
+
},
|
|
34
|
+
'100%': {
|
|
35
|
+
transform: 'scaleX(0)',
|
|
36
|
+
opacity: 0
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const pulseOutDuringTr = keyframes({
|
|
40
|
+
'100%': {
|
|
41
|
+
transform: 'scaleX(1)',
|
|
42
|
+
opacity: 1
|
|
43
|
+
},
|
|
44
|
+
'0%, 90%': {
|
|
45
|
+
transform: 'scaleX(0)',
|
|
46
|
+
opacity: 0
|
|
47
|
+
}
|
|
48
|
+
});
|
|
29
49
|
export const telepointerColorAndCommonStyle = css({
|
|
30
50
|
'.ProseMirror .telepointer': {
|
|
31
51
|
position: 'relative',
|
|
@@ -167,6 +187,14 @@ export const telepointerStyle = css({
|
|
|
167
187
|
animation: `${pulseIn} 2s ease-in-out`
|
|
168
188
|
}
|
|
169
189
|
},
|
|
190
|
+
'&.telepointer-pulse-during-tr': {
|
|
191
|
+
'.telepointer-initial': {
|
|
192
|
+
animation: `${pulseOutDuringTr} 7500ms ease-in-out`
|
|
193
|
+
},
|
|
194
|
+
'.telepointer-fullname': {
|
|
195
|
+
animation: `${pulseInDuringTr} 7500ms ease-in-out`
|
|
196
|
+
}
|
|
197
|
+
},
|
|
170
198
|
'&:hover': {
|
|
171
199
|
'.telepointer-initial': {
|
|
172
200
|
opacity: 0,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
|
|
3
|
+
// Primary toolbar doesn't actually use plugin state so the state selector doesn't update as intended
|
|
4
|
+
// We need a proper API to deal with non-prosemirror based state in plugins but until then we can retrieve
|
|
5
|
+
// the latest
|
|
6
|
+
export const getPrimaryToolbarComponents = (editorAPI, components) => {
|
|
7
|
+
if (fg('platform_editor_setup_editorapi_sync')) {
|
|
8
|
+
var _editorAPI$primaryToo, _editorAPI$primaryToo2;
|
|
9
|
+
return {
|
|
10
|
+
components: components !== null && components !== void 0 ? components : editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$primaryToo = editorAPI.primaryToolbar) === null || _editorAPI$primaryToo === void 0 ? void 0 : (_editorAPI$primaryToo2 = _editorAPI$primaryToo.sharedState.currentState()) === null || _editorAPI$primaryToo2 === void 0 ? void 0 : _editorAPI$primaryToo2.components
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
components
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "207.
|
|
2
|
+
export const version = "207.20.1";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef } from 'react';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
|
|
3
4
|
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
4
5
|
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
5
6
|
import { findChangedNodesFromTransaction } from '../../utils/findChangedNodesFromTransaction';
|
|
@@ -51,9 +52,11 @@ export var useDispatchTransaction = function useDispatchTransaction(_ref) {
|
|
|
51
52
|
});
|
|
52
53
|
if (onChangeRef.current && transaction.docChanged) {
|
|
53
54
|
var source = transaction.getMeta('isRemote') ? 'remote' : 'local';
|
|
55
|
+
var isDirtyChange = isDirtyTransaction(transaction);
|
|
54
56
|
startMeasure(EVENT_NAME_ON_CHANGE);
|
|
55
57
|
onChangeRef.current(view, {
|
|
56
|
-
source: source
|
|
58
|
+
source: source,
|
|
59
|
+
isDirtyChange: isDirtyChange
|
|
57
60
|
});
|
|
58
61
|
stopMeasure(EVENT_NAME_ON_CHANGE);
|
|
59
62
|
}
|
|
@@ -107,7 +107,9 @@ export function ReactEditorView(props) {
|
|
|
107
107
|
fireAnalyticsEvent: handleAnalyticsEvent
|
|
108
108
|
}));
|
|
109
109
|
useLayoutEffect(function () {
|
|
110
|
-
|
|
110
|
+
if (!fg('platform_editor_setup_editorapi_sync')) {
|
|
111
|
+
setEditorAPI(pluginInjectionAPI.current.api());
|
|
112
|
+
}
|
|
111
113
|
}, []);
|
|
112
114
|
var createEditorState = useCallback(function (options) {
|
|
113
115
|
var _api$editorViewMode;
|
|
@@ -135,6 +137,9 @@ export function ReactEditorView(props) {
|
|
|
135
137
|
} else {
|
|
136
138
|
config.current = processPluginsList(createPluginsList(options.props.preset, props.editorProps, pluginInjectionAPI.current));
|
|
137
139
|
schema = createSchema(config.current);
|
|
140
|
+
if (fg('platform_editor_setup_editorapi_sync')) {
|
|
141
|
+
setEditorAPI(pluginInjectionAPI.current.api());
|
|
142
|
+
}
|
|
138
143
|
}
|
|
139
144
|
var contentTransformerProvider = options.props.editorProps.contentTransformerProvider;
|
|
140
145
|
var plugins = createPMPlugins({
|
|
@@ -243,7 +248,8 @@ export function ReactEditorView(props) {
|
|
|
243
248
|
});
|
|
244
249
|
viewRef.current.updateState(newEditorState);
|
|
245
250
|
(_props$editorProps$on = (_props$editorProps2 = props.editorProps).onChange) === null || _props$editorProps$on === void 0 || _props$editorProps$on.call(_props$editorProps2, viewRef.current, {
|
|
246
|
-
source: 'local'
|
|
251
|
+
source: 'local',
|
|
252
|
+
isDirtyChange: false
|
|
247
253
|
});
|
|
248
254
|
}, [blur, createEditorState, props]);
|
|
249
255
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* prettier-ignore */
|
|
2
|
+
/**
|
|
3
|
+
* NOTE:
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically generated by Traduki 2.0.
|
|
6
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
7
|
+
*/
|
|
8
|
+
//Slovenian (Slovenia) [sl-SI]
|
|
9
|
+
export default {
|
|
10
|
+
'fabric.editor.chromeCollapsedPlaceholder': 'Vnesite nekaj …',
|
|
11
|
+
'fabric.editor.editorAssistiveLabel': 'Glavno področje za vsebino; začnite tipkati, da vnesete besedilo.',
|
|
12
|
+
'fabric.editor.headingLink.toolbarHelpTitle': 'Odpri pogovorno okno pomoči'
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* prettier-ignore */
|
|
2
|
+
/**
|
|
3
|
+
* NOTE:
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically generated by Traduki 2.0.
|
|
6
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
7
|
+
*/
|
|
8
|
+
//Serbian (Serbia) [sr-RS]
|
|
9
|
+
export default {
|
|
10
|
+
'fabric.editor.chromeCollapsedPlaceholder': 'Unesite tekst…',
|
|
11
|
+
'fabric.editor.editorAssistiveLabel': 'Glavna oblast za sadržaj, počnite da unosite tekst.',
|
|
12
|
+
'fabric.editor.headingLink.toolbarHelpTitle': 'Otvori dijalog pomoći'
|
|
13
|
+
};
|
|
@@ -4,6 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
// #region Imports
|
|
5
5
|
|
|
6
6
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
7
|
+
import { userPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
|
7
8
|
import { analyticsPlugin } from '@atlaskit/editor-plugins/analytics';
|
|
8
9
|
import { basePlugin } from '@atlaskit/editor-plugins/base';
|
|
9
10
|
import { betterTypeHistoryPlugin } from '@atlaskit/editor-plugins/better-type-history';
|
|
@@ -54,7 +55,13 @@ export function createDefaultPreset(options) {
|
|
|
54
55
|
performanceTracking: options.performanceTracking
|
|
55
56
|
}], Boolean(options.allowAnalyticsGASV3)).add(betterTypeHistoryPlugin).add([pastePlugin, _objectSpread(_objectSpread({}, options === null || options === void 0 ? void 0 : options.paste), {}, {
|
|
56
57
|
isFullPage: isFullPage
|
|
57
|
-
})]).add(clipboardPlugin).add(focusPlugin).maybeAdd(
|
|
58
|
+
})]).add(clipboardPlugin).add(focusPlugin).maybeAdd([userPreferencesPlugin, {
|
|
59
|
+
initialUserPreferences: {
|
|
60
|
+
toolbarDockingPosition: isFullPage ? 'none' : 'top'
|
|
61
|
+
}
|
|
62
|
+
}], function () {
|
|
63
|
+
return fg('platform_editor_use_preferences_plugin');
|
|
64
|
+
}).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) ? fg('platform_editor_no_cursor_on_live_doc_init') : expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
58
65
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
59
66
|
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).add([primaryToolbarPlugin, {
|
|
60
67
|
contextualFormattingEnabled: isFullPage
|
|
@@ -28,6 +28,7 @@ import { contentComponentClickWrapper } from '../../Addon/ClickAreaBlock/content
|
|
|
28
28
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
29
29
|
import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
|
|
30
30
|
import PluginSlot from '../../PluginSlot';
|
|
31
|
+
import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
|
|
31
32
|
import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
|
|
32
33
|
import WithFlash from '../../WithFlash';
|
|
33
34
|
import { MainToolbar, mainToolbarCustomComponentsSlotStyle } from './Toolbar';
|
|
@@ -105,8 +106,9 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
105
106
|
var editorAPI = props.editorAPI;
|
|
106
107
|
var _useCommentEditorPlug = useCommentEditorPluginsStates(editorAPI),
|
|
107
108
|
maxContentSizeState = _useCommentEditorPlug.maxContentSizeState,
|
|
108
|
-
|
|
109
|
+
primaryToolbarHookState = _useCommentEditorPlug.primaryToolbarState,
|
|
109
110
|
editorViewModeState = _useCommentEditorPlug.editorViewModeState;
|
|
111
|
+
var primaryToolbarState = getPrimaryToolbarComponents(editorAPI, primaryToolbarHookState === null || primaryToolbarHookState === void 0 ? void 0 : primaryToolbarHookState.components);
|
|
110
112
|
var _useSharedPluginState = useSharedPluginState(editorAPI, ['media']),
|
|
111
113
|
mediaState = _useSharedPluginState.mediaState;
|
|
112
114
|
var intl = useIntl();
|
|
@@ -13,6 +13,7 @@ import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
13
13
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
|
+
import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
|
|
16
17
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
17
18
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
18
19
|
import { getEditorViewMode } from './getEditorViewModeSync';
|
|
@@ -85,8 +86,9 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
85
86
|
var editorAPI = props.editorAPI;
|
|
86
87
|
var _useFullPageEditorPlu = useFullPageEditorPluginsStates(editorAPI),
|
|
87
88
|
editorViewModeState = _useFullPageEditorPlu.editorViewModeState,
|
|
88
|
-
|
|
89
|
+
primaryToolbarHookState = _useFullPageEditorPlu.primaryToolbarState,
|
|
89
90
|
interactionState = _useFullPageEditorPlu.interactionState;
|
|
91
|
+
var primaryToolbarState = getPrimaryToolbarComponents(editorAPI, primaryToolbarHookState === null || primaryToolbarHookState === void 0 ? void 0 : primaryToolbarHookState.components);
|
|
90
92
|
var viewMode = getEditorViewMode(editorViewModeState, props.preset);
|
|
91
93
|
|
|
92
94
|
// Remove all this logic when platform_editor_interaction_api_refactor is cleaned up
|
|
@@ -101,8 +103,18 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
101
103
|
} else {
|
|
102
104
|
hasHadInteraction = interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction;
|
|
103
105
|
}
|
|
104
|
-
var toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking'
|
|
105
|
-
|
|
106
|
+
var toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking', {
|
|
107
|
+
disabled: fg('platform_editor_use_preferences_plugin')
|
|
108
|
+
});
|
|
109
|
+
var toolbarDockingPref = useSharedPluginStateSelector(editorAPI, 'userPreferences.preferences.toolbarDockingPosition', {
|
|
110
|
+
disabled: !fg('platform_editor_use_preferences_plugin')
|
|
111
|
+
});
|
|
112
|
+
if (fg('platform_editor_use_preferences_plugin')) {
|
|
113
|
+
if (!toolbarDockingPref) {
|
|
114
|
+
var _editorAPI$userPrefer;
|
|
115
|
+
toolbarDockingPref = editorAPI === null || editorAPI === void 0 || (_editorAPI$userPrefer = editorAPI.userPreferences) === null || _editorAPI$userPrefer === void 0 || (_editorAPI$userPrefer = _editorAPI$userPrefer.sharedState.currentState()) === null || _editorAPI$userPrefer === void 0 ? void 0 : _editorAPI$userPrefer.preferences.toolbarDockingPosition;
|
|
116
|
+
}
|
|
117
|
+
} else if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
106
118
|
var _editorAPI$selectionT, _editorAPI$selectionT2;
|
|
107
119
|
// This is a workaround for the rendering issue with the selection toolbar
|
|
108
120
|
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
@@ -119,7 +131,15 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
119
131
|
if (editorExperiment('platform_editor_controls', 'variant1', {
|
|
120
132
|
exposure: true
|
|
121
133
|
})) {
|
|
122
|
-
if (fg('
|
|
134
|
+
if (fg('platform_editor_use_preferences_plugin')) {
|
|
135
|
+
// need to check if the toolbarDockingPref is set to 'none' or 'top'
|
|
136
|
+
if (toolbarDockingPref === 'none') {
|
|
137
|
+
primaryToolbarComponents = [];
|
|
138
|
+
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
139
|
+
isEditorToolbarHidden = true;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
} else if (fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
123
143
|
if (toolbarDocking === 'none') {
|
|
124
144
|
primaryToolbarComponents = [];
|
|
125
145
|
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
@@ -19,7 +19,7 @@ import { EmojiSharedCssClassName, defaultEmojiHeight } from '@atlaskit/editor-co
|
|
|
19
19
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
20
20
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
21
21
|
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
22
|
-
import { CodeBlockSharedCssClassName, MediaSharedClassNames, SmartCardSharedCssClassName, annotationSharedStyles, backgroundColorStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, linkSharedStyle, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, pragmaticResizerStylesForTooltip, ruleSharedStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
22
|
+
import { CodeBlockSharedCssClassName, MediaSharedClassNames, SmartCardSharedCssClassName, annotationSharedStyles, backgroundColorStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, linkSharedStyle, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip, ruleSharedStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
23
23
|
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
24
24
|
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
25
25
|
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
@@ -145,7 +145,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
145
145
|
// Under editor experiment platform_editor_core_static_emotion
|
|
146
146
|
// If you are making changes to this file, please make sure to update in EditorContentContainer.tsx as well
|
|
147
147
|
var legacyContentStyles = function legacyContentStyles(props) {
|
|
148
|
-
return css(_templateObject9 || (_templateObject9 = _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: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\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\t", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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 is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, editorFontSize({
|
|
148
|
+
return css(_templateObject9 || (_templateObject9 = _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: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\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\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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 is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, editorFontSize({
|
|
149
149
|
theme: props.theme
|
|
150
150
|
}), whitespaceSharedStyles, paragraphSharedStyles(props.typographyTheme), listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject0 || (_templateObject0 = _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(_templateObject1 || (_templateObject1 = _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)", fg('platform_editor_fix_floating_toolbar_focus') ? firstFloatingToolbarButtonStyles : null, placeholderTextStyles, placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, codeBlockStyles(), blocktypeStyles(props.typographyTheme), codeMarkSharedStyles(), textColorStyles, backgroundColorStyles(), listsStyles, ruleStyles(), mediaStyles(), layoutStyles(props.viewMode), fg('confluence_team_presence_scroll_to_pointer') ? telepointerStyle : telepointerStyleWithInitialOnly, gapCursorStyles, panelStyles(), mentionsStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
151
151
|
exposure: false
|
|
@@ -161,7 +161,7 @@ var legacyContentStyles = function legacyContentStyles(props) {
|
|
|
161
161
|
exposure: false
|
|
162
162
|
}) && fg('platform-visual-refresh-icons') && vanillaDecisionIconWithVisualRefresh, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
163
163
|
exposure: false
|
|
164
|
-
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null, annotationSharedStyles(), smartCardStyles(), fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles, editorExperiment('platform_editor_vanilla_dom', true) ? dateVanillaStyles : null, dateStyles, embedCardStyles(), unsupportedStyles, resizerStyles, pragmaticResizerStyles(), pragmaticResizerStylesForTooltip(), aiPanelStyles(props.colorMode), firstBlockNodeStylesNew, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !fg('platform-visual-refresh-icons') ? css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
|
|
164
|
+
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null, annotationSharedStyles(), smartCardStyles(), fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles, editorExperiment('platform_editor_vanilla_dom', true) ? dateVanillaStyles : null, dateStyles, embedCardStyles(), unsupportedStyles, resizerStyles, pragmaticResizerStyles(), pragmaticStylesLayoutFirstNodeResizeHandleFix(), pragmaticResizerStylesForTooltip(), aiPanelStyles(props.colorMode), firstBlockNodeStylesNew, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !fg('platform-visual-refresh-icons') ? css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
|
|
165
165
|
};
|
|
166
166
|
var listLayoutShiftFix = css({
|
|
167
167
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -45,7 +45,7 @@ import { mentionsStyles, vanillaMentionsStyles, vanillaMentionsSelectionStyles }
|
|
|
45
45
|
import { panelStyles, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix, panelViewStyles } from './styles/panelStyles';
|
|
46
46
|
import { paragraphStylesOld, paragraphStylesUGCModernized, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
|
|
47
47
|
import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderWrapStyles } from './styles/placeholderStyles';
|
|
48
|
-
import { resizerStyles, pragmaticResizerStyles, pragmaticResizerStylesForTooltip } from './styles/resizerStyles';
|
|
48
|
+
import { resizerStyles, pragmaticResizerStyles, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip } from './styles/resizerStyles';
|
|
49
49
|
import { ruleStyles } from './styles/rule';
|
|
50
50
|
import { scrollbarStyles } from './styles/scrollbarStyles';
|
|
51
51
|
import { hideCursorWhenHideSelectionStyles, hideSelectionStyles, selectedNodeStyles } from './styles/selectionStyles';
|
|
@@ -270,7 +270,9 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
270
270
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
271
271
|
browser.safari && listsStylesSafariFix, editorExperiment('platform_editor_breakout_resizing', true) &&
|
|
272
272
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
273
|
-
pragmaticResizerStyles, editorExperiment('platform_editor_breakout_resizing', true) && fg('platform_editor_breakout_resizing_hello_release') &&
|
|
273
|
+
pragmaticResizerStyles, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_breakout_resizing', true) && fg('platform_editor_breakout_resizing_hello_release') &&
|
|
274
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
275
|
+
pragmaticStylesLayoutFirstNodeResizeHandleFix, editorExperiment('platform_editor_breakout_resizing', true) && fg('platform_editor_breakout_resizing_hello_release') &&
|
|
274
276
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
275
277
|
pragmaticResizerStylesForTooltip,
|
|
276
278
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -179,6 +179,20 @@ export var pragmaticResizerStylesForTooltip = css({
|
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
|
|
182
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
183
|
+
export var pragmaticStylesLayoutFirstNodeResizeHandleFix = css({
|
|
184
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
185
|
+
'.fabric-editor-breakout-mark': {
|
|
186
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
187
|
+
'&:has([data-prosemirror-node-name="layoutSection"].first-node-in-document)': {
|
|
188
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
189
|
+
'> .pm-breakout-resize-handle-container': {
|
|
190
|
+
height: 'calc(100% - 8px)'
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
182
196
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
183
197
|
export var pragmaticResizerStyles = css({
|
|
184
198
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -26,6 +26,26 @@ var pulseOut = keyframes({
|
|
|
26
26
|
opacity: 0
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
+
var pulseInDuringTr = keyframes({
|
|
30
|
+
'0%, 95%': {
|
|
31
|
+
transform: 'scaleX(1)',
|
|
32
|
+
opacity: 1
|
|
33
|
+
},
|
|
34
|
+
'100%': {
|
|
35
|
+
transform: 'scaleX(0)',
|
|
36
|
+
opacity: 0
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
var pulseOutDuringTr = keyframes({
|
|
40
|
+
'100%': {
|
|
41
|
+
transform: 'scaleX(1)',
|
|
42
|
+
opacity: 1
|
|
43
|
+
},
|
|
44
|
+
'0%, 90%': {
|
|
45
|
+
transform: 'scaleX(0)',
|
|
46
|
+
opacity: 0
|
|
47
|
+
}
|
|
48
|
+
});
|
|
29
49
|
export var telepointerColorAndCommonStyle = css({
|
|
30
50
|
'.ProseMirror .telepointer': {
|
|
31
51
|
position: 'relative',
|
|
@@ -167,6 +187,14 @@ export var telepointerStyle = css({
|
|
|
167
187
|
animation: "".concat(pulseIn, " 2s ease-in-out")
|
|
168
188
|
}
|
|
169
189
|
},
|
|
190
|
+
'&.telepointer-pulse-during-tr': {
|
|
191
|
+
'.telepointer-initial': {
|
|
192
|
+
animation: "".concat(pulseOutDuringTr, " 7500ms ease-in-out")
|
|
193
|
+
},
|
|
194
|
+
'.telepointer-fullname': {
|
|
195
|
+
animation: "".concat(pulseInDuringTr, " 7500ms ease-in-out")
|
|
196
|
+
}
|
|
197
|
+
},
|
|
170
198
|
'&:hover': {
|
|
171
199
|
'.telepointer-initial': {
|
|
172
200
|
opacity: 0,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
|
|
3
|
+
// Primary toolbar doesn't actually use plugin state so the state selector doesn't update as intended
|
|
4
|
+
// We need a proper API to deal with non-prosemirror based state in plugins but until then we can retrieve
|
|
5
|
+
// the latest
|
|
6
|
+
export var getPrimaryToolbarComponents = function getPrimaryToolbarComponents(editorAPI, components) {
|
|
7
|
+
if (fg('platform_editor_setup_editorapi_sync')) {
|
|
8
|
+
var _editorAPI$primaryToo;
|
|
9
|
+
return {
|
|
10
|
+
components: components !== null && components !== void 0 ? components : editorAPI === null || editorAPI === void 0 || (_editorAPI$primaryToo = editorAPI.primaryToolbar) === null || _editorAPI$primaryToo === void 0 || (_editorAPI$primaryToo = _editorAPI$primaryToo.sharedState.currentState()) === null || _editorAPI$primaryToo === void 0 ? void 0 : _editorAPI$primaryToo.components
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
components: components
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "207.
|
|
2
|
+
export var version = "207.20.1";
|