@atlaskit/editor-core 197.1.0 → 197.1.2
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 +17 -0
- package/dist/cjs/composable-editor/BaseThemeWrapper.js +29 -0
- package/dist/cjs/composable-editor/editor-internal.js +12 -7
- package/dist/cjs/editor-appearances/ChromelessEditor.js +27 -0
- package/dist/cjs/editor-appearances/CommentEditor.js +27 -0
- package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +63 -67
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +6 -12
- package/dist/cjs/ui/CollapsedEditor/index.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper.js +24 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/BaseThemeWrapper.js +19 -0
- package/dist/es2019/composable-editor/editor-internal.js +11 -6
- package/dist/es2019/editor-appearances/ChromelessEditor.js +20 -0
- package/dist/es2019/editor-appearances/CommentEditor.js +20 -0
- package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +65 -67
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +6 -12
- package/dist/es2019/ui/CollapsedEditor/index.js +1 -1
- package/dist/es2019/ui/ContentStyles/index.js +13 -0
- package/dist/es2019/ui/IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper.js +14 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/BaseThemeWrapper.js +20 -0
- package/dist/esm/composable-editor/editor-internal.js +11 -6
- package/dist/esm/editor-appearances/ChromelessEditor.js +20 -0
- package/dist/esm/editor-appearances/CommentEditor.js +20 -0
- package/dist/esm/ui/Appearance/Comment/Comment.js +3 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +64 -68
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +6 -12
- package/dist/esm/ui/CollapsedEditor/index.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper.js +15 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/BaseThemeWrapper.d.ts +7 -0
- package/dist/types/editor-appearances/ChromelessEditor.d.ts +14 -0
- package/dist/types/editor-appearances/CommentEditor.d.ts +14 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -2
- package/dist/types/ui/IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper.d.ts +6 -0
- package/dist/types-ts4.5/composable-editor/BaseThemeWrapper.d.ts +7 -0
- package/dist/types-ts4.5/editor-appearances/ChromelessEditor.d.ts +14 -0
- package/dist/types-ts4.5/editor-appearances/CommentEditor.d.ts +14 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -2
- package/dist/types-ts4.5/ui/IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper.d.ts +6 -0
- package/package.json +7 -3
|
@@ -9,7 +9,7 @@ import React, { useImperativeHandle, useRef } from 'react';
|
|
|
9
9
|
import { jsx, useTheme } from '@emotion/react';
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
11
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
12
|
-
import { ContextPanelConsumer
|
|
12
|
+
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { ClickAreaBlock } from '../../Addon';
|
|
14
14
|
import ContextPanel from '../../ContextPanel';
|
|
15
15
|
import PluginSlot from '../../PluginSlot';
|
|
@@ -32,73 +32,71 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
32
32
|
return containerRef.current;
|
|
33
33
|
}
|
|
34
34
|
}), []);
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
ref: containerRef
|
|
53
|
-
}, jsx(ScrollContainer
|
|
54
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
55
|
-
, {
|
|
56
|
-
className: "fabric-editor-popup-scroll-parent",
|
|
57
|
-
featureFlags: props.featureFlags,
|
|
58
|
-
ref: scrollContainerRef
|
|
59
|
-
}, jsx(ClickAreaBlock, {
|
|
60
|
-
editorView: props.editorView,
|
|
61
|
-
editorDisabled: props.disabled
|
|
62
|
-
}, jsx("div", {
|
|
63
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
64
|
-
css: editorContentAreaStyle({
|
|
65
|
-
fullWidthMode,
|
|
66
|
-
layoutMaxWidth: theme.layoutMaxWidth,
|
|
67
|
-
containerWidth: width
|
|
68
|
-
}),
|
|
69
|
-
role: "region",
|
|
70
|
-
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
71
|
-
ref: contentAreaRef
|
|
72
|
-
}, jsx("div", {
|
|
73
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
74
|
-
css: editorContentGutterStyle()
|
|
35
|
+
return (
|
|
36
|
+
// Cleaned up with: platform_editor_context-panel_simplify_behaviour
|
|
37
|
+
jsx(ContextPanelConsumer, null, ({
|
|
38
|
+
positionedOverEditor
|
|
39
|
+
}) => {
|
|
40
|
+
var _contentAreaRef$curre;
|
|
41
|
+
return jsx("div", {
|
|
42
|
+
css: [
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
44
|
+
contentArea,
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
46
|
+
props.isEditorToolbarHidden && contentAreaHeightNoToolbar,
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
48
|
+
positionedOverEditor && positionedOverEditorStyle],
|
|
49
|
+
"data-testid": CONTENT_AREA_TEST_ID,
|
|
50
|
+
ref: containerRef
|
|
51
|
+
}, jsx(ScrollContainer
|
|
75
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
76
|
-
,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
53
|
+
, {
|
|
54
|
+
className: "fabric-editor-popup-scroll-parent",
|
|
55
|
+
featureFlags: props.featureFlags,
|
|
56
|
+
ref: scrollContainerRef
|
|
57
|
+
}, jsx(ClickAreaBlock, {
|
|
58
|
+
editorView: props.editorView,
|
|
59
|
+
editorDisabled: props.disabled
|
|
60
|
+
}, jsx("div", {
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
62
|
+
css: editorContentAreaStyle({
|
|
63
|
+
fullWidthMode,
|
|
64
|
+
layoutMaxWidth: theme.layoutMaxWidth
|
|
65
|
+
}),
|
|
66
|
+
role: "region",
|
|
67
|
+
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
68
|
+
ref: contentAreaRef
|
|
69
|
+
}, jsx("div", {
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
71
|
+
css: editorContentGutterStyle()
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
73
|
+
,
|
|
74
|
+
className: ['ak-editor-content-area', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
75
|
+
ref: contentAreaRef
|
|
76
|
+
}, !!props.customContentComponents && 'before' in props.customContentComponents ? props.customContentComponents.before : props.customContentComponents, jsx(PluginSlot, {
|
|
77
|
+
editorView: props.editorView,
|
|
78
|
+
editorActions: props.editorActions,
|
|
79
|
+
eventDispatcher: props.eventDispatcher,
|
|
80
|
+
providerFactory: props.providerFactory,
|
|
81
|
+
appearance: props.appearance,
|
|
82
|
+
items: props.contentComponents,
|
|
83
|
+
pluginHooks: props.pluginHooks,
|
|
84
|
+
contentArea: (_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 ? _contentAreaRef$curre : undefined,
|
|
85
|
+
popupsMountPoint: props.popupsMountPoint,
|
|
86
|
+
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
87
|
+
popupsScrollableElement: props.popupsScrollableElement,
|
|
88
|
+
disabled: !!props.disabled,
|
|
89
|
+
containerElement: scrollContainerRef.current,
|
|
90
|
+
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
91
|
+
wrapperElement: props.wrapperElement
|
|
92
|
+
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))), jsx("div", {
|
|
93
|
+
css: sidebarArea
|
|
94
|
+
}, props.contextPanel || jsx(ContextPanel, {
|
|
95
|
+
editorAPI: props.editorAPI,
|
|
96
|
+
visible: false
|
|
97
|
+
})));
|
|
98
|
+
})
|
|
99
|
+
);
|
|
102
100
|
});
|
|
103
101
|
export const FullPageContentArea = injectIntl(Content, {
|
|
104
102
|
forwardRef: true
|
|
@@ -99,13 +99,13 @@ export const editorContentAreaHideContainer = css({
|
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
/* Prevent horizontal scroll on page in full width mode */
|
|
102
|
-
const editorContentAreaContainerStyle =
|
|
102
|
+
const editorContentAreaContainerStyle = () => css({
|
|
103
103
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
104
104
|
'.fabric-editor--full-width-mode': {
|
|
105
105
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
106
|
-
'.code-block, .extension-container': {
|
|
106
|
+
'.code-block, .extension-container, .multiBodiedExtension--container': {
|
|
107
107
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
108
|
-
maxWidth:
|
|
108
|
+
maxWidth: `calc(100% - ${tableMarginFullWidthMode * 2}px)`
|
|
109
109
|
},
|
|
110
110
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
111
111
|
'.extension-container.inline': {
|
|
@@ -116,22 +116,16 @@ const editorContentAreaContainerStyle = containerWidth => css({
|
|
|
116
116
|
maxWidth: 'inherit'
|
|
117
117
|
},
|
|
118
118
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
119
|
-
'.multiBodiedExtension--container': {
|
|
120
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
121
|
-
maxWidth: `${containerWidth - getTotalPadding() - tableMarginFullWidthMode * 2}px`
|
|
122
|
-
},
|
|
123
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
124
119
|
'[data-layout-section]': {
|
|
125
120
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
126
|
-
maxWidth:
|
|
121
|
+
maxWidth: `calc(100% + ${akLayoutGutterOffset * 2}px)`
|
|
127
122
|
}
|
|
128
123
|
}
|
|
129
124
|
});
|
|
130
125
|
export const editorContentAreaStyle = ({
|
|
131
126
|
layoutMaxWidth,
|
|
132
|
-
fullWidthMode
|
|
133
|
-
|
|
134
|
-
}) => [editorContentArea, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth), containerWidth ? editorContentAreaContainerStyle(containerWidth) : editorContentAreaHideContainer];
|
|
127
|
+
fullWidthMode
|
|
128
|
+
}) => [editorContentArea, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth), editorContentAreaContainerStyle()];
|
|
135
129
|
const editorContentAreaWithLayoutWith = layoutMaxWidth => css({
|
|
136
130
|
// this restricts max width
|
|
137
131
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
|
|
4
3
|
import ChromeCollapsed from '../ChromeCollapsed';
|
|
4
|
+
import { IntlProviderIfMissingWrapper } from '../IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper';
|
|
5
5
|
export default class CollapsedEditor extends React.Component {
|
|
6
6
|
constructor(...args) {
|
|
7
7
|
super(...args);
|
|
@@ -249,6 +249,19 @@ const contentStyles = props => css`
|
|
|
249
249
|
text-align: center;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
+
// For FullPage only when inside a table
|
|
253
|
+
// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts
|
|
254
|
+
// In the "editorContentAreaContainerStyle" function
|
|
255
|
+
.fabric-editor--full-width-mode {
|
|
256
|
+
.pm-table-container {
|
|
257
|
+
.code-block,
|
|
258
|
+
.extension-container,
|
|
259
|
+
.multiBodiedExtension--container {
|
|
260
|
+
max-width: 100%;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
252
265
|
.pm-table-header-content-wrap :not(.fabric-editor-alignment),
|
|
253
266
|
.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,
|
|
254
267
|
.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { IntlContext, IntlProvider } from 'react-intl-next';
|
|
3
|
+
const useCheckIntlContext = () => useContext(IntlContext) === null;
|
|
4
|
+
export function IntlProviderIfMissingWrapper({
|
|
5
|
+
children
|
|
6
|
+
}) {
|
|
7
|
+
const missingIntlContext = useCheckIntlContext();
|
|
8
|
+
if (missingIntlContext) {
|
|
9
|
+
return /*#__PURE__*/React.createElement(IntlProvider, {
|
|
10
|
+
locale: "en"
|
|
11
|
+
}, children);
|
|
12
|
+
}
|
|
13
|
+
return children;
|
|
14
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "197.1.
|
|
2
|
+
export const version = "197.1.2";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
|
+
import { ThemeProvider } from '@emotion/react';
|
|
5
|
+
import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
// Default value from: `import { fontSize } from '@atlaskit/theme/constants';`
|
|
7
|
+
var defaultFontSize = 14;
|
|
8
|
+
export function BaseThemeWrapper(_ref) {
|
|
9
|
+
var baseFontSize = _ref.baseFontSize,
|
|
10
|
+
children = _ref.children;
|
|
11
|
+
var memoizedTheme = useMemo(function () {
|
|
12
|
+
return {
|
|
13
|
+
baseFontSize: baseFontSize || defaultFontSize,
|
|
14
|
+
layoutMaxWidth: akEditorDefaultLayoutWidth
|
|
15
|
+
};
|
|
16
|
+
}, [baseFontSize]);
|
|
17
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
18
|
+
theme: memoizedTheme
|
|
19
|
+
}, children);
|
|
20
|
+
}
|
|
@@ -13,7 +13,6 @@ import { Fragment, memo, useCallback } from 'react';
|
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
14
|
import { ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
15
15
|
import { usePortalProvider } from '@atlaskit/editor-common/portal';
|
|
16
|
-
import { BaseTheme, IntlProviderIfMissingWrapper, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
17
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
import ErrorBoundary from '../create-editor/ErrorBoundary';
|
|
19
18
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
@@ -21,9 +20,17 @@ import ReactEditorView from '../create-editor/ReactEditorView';
|
|
|
21
20
|
import { ContextAdapter } from '../nodeviews/context-adapter';
|
|
22
21
|
import { useSetPresetContext } from '../presets/context';
|
|
23
22
|
import EditorContext from '../ui/EditorContext';
|
|
23
|
+
import { IntlProviderIfMissingWrapper } from '../ui/IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper';
|
|
24
24
|
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
25
|
+
import { BaseThemeWrapper } from './BaseThemeWrapper';
|
|
25
26
|
import { useProviders } from './hooks/useProviders';
|
|
26
27
|
import { getBaseFontSize } from './utils/getBaseFontSize';
|
|
28
|
+
var editorContainerStyles = css({
|
|
29
|
+
position: 'relative',
|
|
30
|
+
width: '100%',
|
|
31
|
+
height: '100%'
|
|
32
|
+
});
|
|
33
|
+
|
|
27
34
|
/**
|
|
28
35
|
* EditorInternalComponent is used to capture the common component
|
|
29
36
|
* from the `render` method of `Editor` and share it with `EditorNext`.
|
|
@@ -78,10 +85,8 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
|
|
|
78
85
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
79
86
|
contextIdentifierProvider: props.contextIdentifierProvider,
|
|
80
87
|
featureFlags: featureFlags
|
|
81
|
-
}, jsx(
|
|
82
|
-
css:
|
|
83
|
-
height: '100%'
|
|
84
|
-
})
|
|
88
|
+
}, jsx("div", {
|
|
89
|
+
css: editorContainerStyles
|
|
85
90
|
}, jsx(EditorContext, {
|
|
86
91
|
editorActions: editorActions
|
|
87
92
|
}, jsx(ContextAdapter, null, jsx(IntlProviderIfMissingWrapper, null, jsx(Fragment, null, jsx(ReactEditorViewContextWrapper, {
|
|
@@ -103,7 +108,7 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
|
|
|
103
108
|
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
104
109
|
editorRef = _ref2.editorRef,
|
|
105
110
|
editorAPI = _ref2.editorAPI;
|
|
106
|
-
return jsx(
|
|
111
|
+
return jsx(BaseThemeWrapper, {
|
|
107
112
|
baseFontSize: getBaseFontSize(props.appearance)
|
|
108
113
|
}, jsx(AppearanceComponent, {
|
|
109
114
|
innerRef: editorRef,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CoreEditor } from '../composable-editor/core-editor';
|
|
4
|
+
import Chromeless from '../ui/Appearance/Chromeless';
|
|
5
|
+
/**
|
|
6
|
+
* Editor component based on `ComposableEditor` which sets the `appearance` to "chromeless".
|
|
7
|
+
*
|
|
8
|
+
* This has a performance benefit compared with `ComposableEditor` as it doesn't bundle unnecessary appearance code.
|
|
9
|
+
*
|
|
10
|
+
* Docs for `ComposableEditor` are also relevant: https://atlaskit.atlassian.com/packages/editor/editor-core
|
|
11
|
+
*
|
|
12
|
+
* @param props ChromelessEditorProps
|
|
13
|
+
* @returns Editor component
|
|
14
|
+
*/
|
|
15
|
+
export function ChromelessEditor(props) {
|
|
16
|
+
return /*#__PURE__*/React.createElement(CoreEditor, _extends({}, props, {
|
|
17
|
+
appearance: "chromeless",
|
|
18
|
+
AppearanceComponent: Chromeless
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CoreEditor } from '../composable-editor/core-editor';
|
|
4
|
+
import Comment from '../ui/Appearance/Comment';
|
|
5
|
+
/**
|
|
6
|
+
* Editor component based on `ComposableEditor` which sets the `appearance` to "comment".
|
|
7
|
+
*
|
|
8
|
+
* This has a performance benefit compared with `ComposableEditor` as it doesn't bundle unnecessary appearance code.
|
|
9
|
+
*
|
|
10
|
+
* Docs for `ComposableEditor` are also relevant: https://atlaskit.atlassian.com/packages/editor/editor-core
|
|
11
|
+
*
|
|
12
|
+
* @param props CommentEditorProps
|
|
13
|
+
* @returns Editor component
|
|
14
|
+
*/
|
|
15
|
+
export function CommentEditor(props) {
|
|
16
|
+
return /*#__PURE__*/React.createElement(CoreEditor, _extends({}, props, {
|
|
17
|
+
appearance: "comment",
|
|
18
|
+
AppearanceComponent: Comment
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
@@ -13,7 +13,7 @@ import ButtonGroup from '@atlaskit/button/button-group';
|
|
|
13
13
|
import Button from '@atlaskit/button/new';
|
|
14
14
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
15
15
|
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
16
|
-
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
16
|
+
import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
17
17
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
18
18
|
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
19
19
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
@@ -153,7 +153,7 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
153
153
|
}
|
|
154
154
|
return jsx(WithFlash, {
|
|
155
155
|
animate: maxContentSizeReached
|
|
156
|
-
}, jsx("div", {
|
|
156
|
+
}, jsx(WidthProvider, null, jsx("div", {
|
|
157
157
|
css: [commentEditorStyles,
|
|
158
158
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
159
159
|
css({
|
|
@@ -242,6 +242,6 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
242
242
|
style: {
|
|
243
243
|
flexGrow: 1
|
|
244
244
|
}
|
|
245
|
-
}), customSecondaryToolbarComponents));
|
|
245
|
+
}), customSecondaryToolbarComponents)));
|
|
246
246
|
};
|
|
247
247
|
CommentEditorWithIntl.displayName = 'CommentEditorAppearance';
|
|
@@ -9,7 +9,7 @@ import React, { useImperativeHandle, useRef } from 'react';
|
|
|
9
9
|
import { jsx, useTheme } from '@emotion/react';
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
11
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
12
|
-
import { ContextPanelConsumer
|
|
12
|
+
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { ClickAreaBlock } from '../../Addon';
|
|
14
14
|
import ContextPanel from '../../ContextPanel';
|
|
15
15
|
import PluginSlot from '../../PluginSlot';
|
|
@@ -34,74 +34,70 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}, []);
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
37
|
+
return (
|
|
38
|
+
// Cleaned up with: platform_editor_context-panel_simplify_behaviour
|
|
39
|
+
jsx(ContextPanelConsumer, null, function (_ref) {
|
|
40
|
+
var _contentAreaRef$curre;
|
|
41
|
+
var positionedOverEditor = _ref.positionedOverEditor;
|
|
42
|
+
return jsx("div", {
|
|
43
|
+
css: [
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
45
|
+
contentArea,
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
47
|
+
props.isEditorToolbarHidden && contentAreaHeightNoToolbar,
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
49
|
+
positionedOverEditor && positionedOverEditorStyle],
|
|
50
|
+
"data-testid": CONTENT_AREA_TEST_ID,
|
|
51
|
+
ref: containerRef
|
|
52
|
+
}, jsx(ScrollContainer
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
54
|
+
, {
|
|
55
|
+
className: "fabric-editor-popup-scroll-parent",
|
|
56
|
+
featureFlags: props.featureFlags,
|
|
57
|
+
ref: scrollContainerRef
|
|
58
|
+
}, jsx(ClickAreaBlock, {
|
|
59
|
+
editorView: props.editorView,
|
|
60
|
+
editorDisabled: props.disabled
|
|
61
|
+
}, jsx("div", {
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
63
|
+
css: editorContentAreaStyle({
|
|
64
|
+
fullWidthMode: fullWidthMode,
|
|
65
|
+
layoutMaxWidth: theme.layoutMaxWidth
|
|
66
|
+
}),
|
|
67
|
+
role: "region",
|
|
68
|
+
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
69
|
+
ref: contentAreaRef
|
|
70
|
+
}, jsx("div", {
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
72
|
+
css: editorContentGutterStyle()
|
|
55
73
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
56
|
-
,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
eventDispatcher: props.eventDispatcher,
|
|
84
|
-
providerFactory: props.providerFactory,
|
|
85
|
-
appearance: props.appearance,
|
|
86
|
-
items: props.contentComponents,
|
|
87
|
-
pluginHooks: props.pluginHooks,
|
|
88
|
-
contentArea: (_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 ? _contentAreaRef$curre : undefined,
|
|
89
|
-
popupsMountPoint: props.popupsMountPoint,
|
|
90
|
-
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
91
|
-
popupsScrollableElement: props.popupsScrollableElement,
|
|
92
|
-
disabled: !!props.disabled,
|
|
93
|
-
containerElement: scrollContainerRef.current,
|
|
94
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
95
|
-
wrapperElement: props.wrapperElement
|
|
96
|
-
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))), jsx("div", {
|
|
97
|
-
css: sidebarArea
|
|
98
|
-
}, props.contextPanel || jsx(ContextPanel, {
|
|
99
|
-
editorAPI: props.editorAPI,
|
|
100
|
-
visible: false
|
|
101
|
-
})));
|
|
102
|
-
})
|
|
103
|
-
);
|
|
104
|
-
});
|
|
74
|
+
,
|
|
75
|
+
className: ['ak-editor-content-area', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
76
|
+
ref: contentAreaRef
|
|
77
|
+
}, !!props.customContentComponents && 'before' in props.customContentComponents ? props.customContentComponents.before : props.customContentComponents, jsx(PluginSlot, {
|
|
78
|
+
editorView: props.editorView,
|
|
79
|
+
editorActions: props.editorActions,
|
|
80
|
+
eventDispatcher: props.eventDispatcher,
|
|
81
|
+
providerFactory: props.providerFactory,
|
|
82
|
+
appearance: props.appearance,
|
|
83
|
+
items: props.contentComponents,
|
|
84
|
+
pluginHooks: props.pluginHooks,
|
|
85
|
+
contentArea: (_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 ? _contentAreaRef$curre : undefined,
|
|
86
|
+
popupsMountPoint: props.popupsMountPoint,
|
|
87
|
+
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
88
|
+
popupsScrollableElement: props.popupsScrollableElement,
|
|
89
|
+
disabled: !!props.disabled,
|
|
90
|
+
containerElement: scrollContainerRef.current,
|
|
91
|
+
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
92
|
+
wrapperElement: props.wrapperElement
|
|
93
|
+
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))), jsx("div", {
|
|
94
|
+
css: sidebarArea
|
|
95
|
+
}, props.contextPanel || jsx(ContextPanel, {
|
|
96
|
+
editorAPI: props.editorAPI,
|
|
97
|
+
visible: false
|
|
98
|
+
})));
|
|
99
|
+
})
|
|
100
|
+
);
|
|
105
101
|
});
|
|
106
102
|
export var FullPageContentArea = injectIntl(Content, {
|
|
107
103
|
forwardRef: true
|
|
@@ -103,14 +103,14 @@ export var editorContentAreaHideContainer = css({
|
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
/* Prevent horizontal scroll on page in full width mode */
|
|
106
|
-
var editorContentAreaContainerStyle = function editorContentAreaContainerStyle(
|
|
106
|
+
var editorContentAreaContainerStyle = function editorContentAreaContainerStyle() {
|
|
107
107
|
return css({
|
|
108
108
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
109
109
|
'.fabric-editor--full-width-mode': {
|
|
110
110
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
111
|
-
'.code-block, .extension-container': {
|
|
111
|
+
'.code-block, .extension-container, .multiBodiedExtension--container': {
|
|
112
112
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
113
|
-
maxWidth: "
|
|
113
|
+
maxWidth: "calc(100% - ".concat(tableMarginFullWidthMode * 2, "px)")
|
|
114
114
|
},
|
|
115
115
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
116
116
|
'.extension-container.inline': {
|
|
@@ -121,23 +121,17 @@ var editorContentAreaContainerStyle = function editorContentAreaContainerStyle(c
|
|
|
121
121
|
maxWidth: 'inherit'
|
|
122
122
|
},
|
|
123
123
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
124
|
-
'.multiBodiedExtension--container': {
|
|
125
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
126
|
-
maxWidth: "".concat(containerWidth - getTotalPadding() - tableMarginFullWidthMode * 2, "px")
|
|
127
|
-
},
|
|
128
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
129
124
|
'[data-layout-section]': {
|
|
130
125
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
131
|
-
maxWidth: "".concat(
|
|
126
|
+
maxWidth: "calc(100% + ".concat(akLayoutGutterOffset * 2, "px)")
|
|
132
127
|
}
|
|
133
128
|
}
|
|
134
129
|
});
|
|
135
130
|
};
|
|
136
131
|
export var editorContentAreaStyle = function editorContentAreaStyle(_ref) {
|
|
137
132
|
var layoutMaxWidth = _ref.layoutMaxWidth,
|
|
138
|
-
fullWidthMode = _ref.fullWidthMode
|
|
139
|
-
|
|
140
|
-
return [editorContentArea, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth), containerWidth ? editorContentAreaContainerStyle(containerWidth) : editorContentAreaHideContainer];
|
|
133
|
+
fullWidthMode = _ref.fullWidthMode;
|
|
134
|
+
return [editorContentArea, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth), editorContentAreaContainerStyle()];
|
|
141
135
|
};
|
|
142
136
|
var editorContentAreaWithLayoutWith = function editorContentAreaWithLayoutWith(layoutMaxWidth) {
|
|
143
137
|
return css({
|
|
@@ -8,8 +8,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
|
|
12
11
|
import ChromeCollapsed from '../ChromeCollapsed';
|
|
12
|
+
import { IntlProviderIfMissingWrapper } from '../IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper';
|
|
13
13
|
var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
14
14
|
_inherits(CollapsedEditor, _React$Component);
|
|
15
15
|
var _super = _createSuper(CollapsedEditor);
|
|
@@ -68,7 +68,7 @@ export var placeholderStyles = css({
|
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
var contentStyles = function contentStyles(props) {
|
|
71
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\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[contenteditable='false'] .taskItemView-content-wrap {\n\t\tpointer-events: none;\n\t\topacity: 0.7;\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.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t", "\n\t", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\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 .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.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/* Link icon in the Atlaskit package\n is bigger than the others\n */\n\t.hyperlink-open-link {\n\t\tsvg {\n\t\t\tmax-width: 18px;\n\t\t}\n\t\t&[href] {\n\t\t\tpadding: 0 4px;\n\t\t}\n\t}\n"])), editorFontSize({
|
|
71
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\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[contenteditable='false'] .taskItemView-content-wrap {\n\t\tpointer-events: none;\n\t\topacity: 0.7;\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.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t", "\n\t", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\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 .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/* Link icon in the Atlaskit package\n is bigger than the others\n */\n\t.hyperlink-open-link {\n\t\tsvg {\n\t\t\tmax-width: 18px;\n\t\t}\n\t\t&[href] {\n\t\t\tpadding: 0 4px;\n\t\t}\n\t}\n"])), editorFontSize({
|
|
72
72
|
theme: props.theme
|
|
73
73
|
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(), blocktypeStyles(), codeMarkSharedStyles(), textColorStyles, backgroundColorStyles(), listsStyles, ruleStyles(), mediaStyles, layoutStyles(props.viewMode), telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(), mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(), findReplaceStyles, textHighlightStyle, taskDecisionStyles, statusStyles, annotationSharedStyles(), smartCardStyles(), smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, aiPanelStyles(props.colorMode), MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
74
74
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { IntlContext, IntlProvider } from 'react-intl-next';
|
|
3
|
+
var useCheckIntlContext = function useCheckIntlContext() {
|
|
4
|
+
return useContext(IntlContext) === null;
|
|
5
|
+
};
|
|
6
|
+
export function IntlProviderIfMissingWrapper(_ref) {
|
|
7
|
+
var children = _ref.children;
|
|
8
|
+
var missingIntlContext = useCheckIntlContext();
|
|
9
|
+
if (missingIntlContext) {
|
|
10
|
+
return /*#__PURE__*/React.createElement(IntlProvider, {
|
|
11
|
+
locale: "en"
|
|
12
|
+
}, children);
|
|
13
|
+
}
|
|
14
|
+
return children;
|
|
15
|
+
}
|