@atlaskit/editor-core 193.2.6 → 193.3.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 +11 -0
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +23 -3
- package/dist/cjs/presets/universal.js +0 -1
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +4 -5
- package/dist/cjs/ui/Addon/Dropdown/styles.js +9 -4
- package/dist/cjs/ui/Addon/DropdownItem/styles.js +15 -4
- package/dist/cjs/ui/Appearance/Chromeless.js +26 -6
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +20 -14
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +66 -12
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +15 -4
- package/dist/cjs/ui/ChromeCollapsed/styles.js +23 -4
- package/dist/cjs/ui/ContentStyles/date.js +1 -0
- package/dist/cjs/ui/ContentStyles/extension.js +1 -1
- package/dist/cjs/ui/ContentStyles/index.js +3 -0
- package/dist/cjs/ui/ContentStyles/layout.js +1 -0
- package/dist/cjs/ui/ContentStyles/media.js +1 -1
- package/dist/cjs/ui/ContentStyles/status.js +1 -0
- package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/cjs/ui/ContextPanel/index.js +24 -8
- package/dist/cjs/ui/PluginSlot/index.js +4 -5
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +7 -5
- package/dist/cjs/ui/WithFlash/index.js +7 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +23 -35
- package/dist/es2019/presets/universal.js +0 -1
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +3 -4
- package/dist/es2019/ui/Addon/Dropdown/styles.js +9 -9
- package/dist/es2019/ui/Addon/DropdownItem/styles.js +14 -15
- package/dist/es2019/ui/Appearance/Chromeless.js +23 -25
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +16 -11
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +68 -81
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +12 -13
- package/dist/es2019/ui/ChromeCollapsed/styles.js +21 -23
- package/dist/es2019/ui/ContentStyles/date.js +1 -0
- package/dist/es2019/ui/ContentStyles/expand.js +1 -2
- package/dist/es2019/ui/ContentStyles/extension.js +1 -1
- package/dist/es2019/ui/ContentStyles/index.js +5 -3
- package/dist/es2019/ui/ContentStyles/layout.js +2 -0
- package/dist/es2019/ui/ContentStyles/media.js +1 -1
- package/dist/es2019/ui/ContentStyles/status.js +2 -0
- package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/es2019/ui/ContextPanel/index.js +23 -23
- package/dist/es2019/ui/PluginSlot/index.js +3 -3
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +5 -6
- package/dist/es2019/ui/WithFlash/index.js +7 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +23 -3
- package/dist/esm/presets/universal.js +0 -1
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +3 -3
- package/dist/esm/ui/Addon/Dropdown/styles.js +9 -3
- package/dist/esm/ui/Addon/DropdownItem/styles.js +15 -3
- package/dist/esm/ui/Appearance/Chromeless.js +25 -4
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +20 -14
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +66 -12
- package/dist/esm/ui/AppearanceComponents/Mobile.js +13 -3
- package/dist/esm/ui/ChromeCollapsed/styles.js +23 -3
- package/dist/esm/ui/ContentStyles/date.js +1 -0
- package/dist/esm/ui/ContentStyles/expand.js +1 -2
- package/dist/esm/ui/ContentStyles/extension.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +5 -3
- package/dist/esm/ui/ContentStyles/layout.js +2 -0
- package/dist/esm/ui/ContentStyles/media.js +1 -1
- package/dist/esm/ui/ContentStyles/status.js +2 -0
- package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/esm/ui/ContextPanel/index.js +23 -6
- package/dist/esm/ui/PluginSlot/index.js +3 -3
- package/dist/esm/ui/Toolbar/ToolbarInner.js +6 -3
- package/dist/esm/ui/WithFlash/index.js +7 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types/create-editor/WithEditorView.d.ts +2 -2
- package/dist/types/create-editor/get-ui-component.d.ts +1 -1
- package/dist/types/types/extension-config.d.ts +0 -1
- package/dist/types/ui/Toolbar/Toolbar.d.ts +2 -2
- package/dist/types/ui/Toolbar/ToolbarWithSizeDetector.d.ts +2 -3
- package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/WithEditorView.d.ts +2 -2
- package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +1 -1
- package/dist/types-ts4.5/types/extension-config.d.ts +0 -1
- package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +2 -2
- package/dist/types-ts4.5/ui/Toolbar/ToolbarWithSizeDetector.d.ts +2 -3
- package/package.json +6 -6
|
@@ -2,28 +2,26 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { akEditorSubtleAccent, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { N300, N50 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
5
|
-
export const inputStyle = css
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
border-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
border-color: ${`var(--ds-border-input, ${N50})`};
|
|
26
|
-
cursor: text;
|
|
5
|
+
export const inputStyle = css({
|
|
6
|
+
'input&': {
|
|
7
|
+
backgroundColor: "var(--ds-background-input, white)",
|
|
8
|
+
border: `1px solid ${`var(--ds-border-input, ${akEditorSubtleAccent})`}`,
|
|
9
|
+
borderRadius: `${borderRadius()}px`,
|
|
10
|
+
boxSizing: 'border-box',
|
|
11
|
+
height: '40px',
|
|
12
|
+
paddingLeft: "var(--ds-space-250, 20px)",
|
|
13
|
+
paddingTop: "var(--ds-space-150, 12px)",
|
|
14
|
+
paddingBottom: "var(--ds-space-150, 12px)",
|
|
15
|
+
fontSize: relativeFontSizeToBase16(14),
|
|
16
|
+
width: '100%',
|
|
17
|
+
fontWeight: 400,
|
|
18
|
+
lineHeight: 1.42857142857143,
|
|
19
|
+
letterSpacing: '-0.005em',
|
|
20
|
+
color: `var(--ds-text-subtlest, ${N300})`,
|
|
21
|
+
'&:hover': {
|
|
22
|
+
backgroundColor: "var(--ds-background-input-hovered, white)",
|
|
23
|
+
borderColor: `var(--ds-border-input, ${N50})`,
|
|
24
|
+
cursor: 'text'
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
|
-
|
|
27
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
4
5
|
export const dateStyles = css`
|
|
5
6
|
.${DateSharedCssClassName.DATE_CONTAINER} {
|
|
6
7
|
.${DateSharedCssClassName.DATE_WRAPPER} {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
3
|
-
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
2
|
+
import { BreakoutCssClassName, expandClassNames } from '@atlaskit/editor-common/styles';
|
|
4
3
|
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
5
4
|
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
5
|
import { N100A, N40A, N50A, R300, R50 } from '@atlaskit/theme/colors';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
3
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
3
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/no-exported-css -- Needs manual remediation
|
|
4
4
|
export const extensionStyles = css`
|
|
5
5
|
.multiBodiedExtensionView-content-wrap {
|
|
6
6
|
&.danger > span > .multiBodiedExtension--container {
|
|
@@ -6,9 +6,7 @@ import { telepointerStyle } from '@atlaskit/editor-common/collab';
|
|
|
6
6
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
7
7
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
8
8
|
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
9
|
-
import { annotationSharedStyles, blockMarksSharedStyles, codeBlockInListSafariFix, dateSharedStyle, embedCardStyles, gridStyles, indentationSharedStyles, listsSharedStyles, paragraphSharedStyles, resizerStyles, shadowSharedStyle, SmartCardSharedCssClassName, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
10
|
-
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
11
|
-
import { codeMarkSharedStyles, linkSharedStyle, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
9
|
+
import { annotationSharedStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, gridStyles, indentationSharedStyles, linkSharedStyle, listsSharedStyles, MediaSharedClassNames, paragraphSharedStyles, resizerStyles, ruleSharedStyles, shadowSharedStyle, SmartCardSharedCssClassName, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
12
10
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
13
11
|
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
14
12
|
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
@@ -27,6 +25,8 @@ import { mediaStyles } from './media';
|
|
|
27
25
|
import { panelStyles } from './panel';
|
|
28
26
|
import { statusStyles } from './status';
|
|
29
27
|
import { taskDecisionStyles } from './tasks-and-decisions';
|
|
28
|
+
|
|
29
|
+
// eslint-disable-next-line @atlaskit/design-system/no-exported-css
|
|
30
30
|
export const linkStyles = css`
|
|
31
31
|
.ProseMirror {
|
|
32
32
|
${linkSharedStyle}
|
|
@@ -120,6 +120,8 @@ const emojiStyles = css`
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
`;
|
|
123
|
+
|
|
124
|
+
// eslint-disable-next-line @atlaskit/design-system/no-exported-css
|
|
123
125
|
export const placeholderStyles = css({
|
|
124
126
|
'.ProseMirror .placeholder-decoration': {
|
|
125
127
|
color: `var(--ds-text-subtlest, ${N200})`,
|
|
@@ -5,6 +5,8 @@ import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/cons
|
|
|
5
5
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { N80A, N90A } from '@atlaskit/theme/colors';
|
|
7
7
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
8
10
|
export const layoutStyles = css`
|
|
9
11
|
.ProseMirror {
|
|
10
12
|
${columnLayoutSharedStyle} [data-layout-section] {
|
|
@@ -4,7 +4,7 @@ import { mediaSingleSharedStyle, richMediaClassName } from '@atlaskit/editor-com
|
|
|
4
4
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorSelectedBorderBoldSize, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
6
6
|
import { B200, N60, Y500 } from '@atlaskit/theme/colors';
|
|
7
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
7
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/no-exported-css -- Needs manual remediation
|
|
8
8
|
export const mediaStyles = css`
|
|
9
9
|
.ProseMirror {
|
|
10
10
|
${mediaSingleSharedStyle} & [layout='full-width'] .${richMediaClassName},
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { StatusSharedCssClassName, TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
4
6
|
export const statusStyles = css`
|
|
5
7
|
.${TableSharedCssClassName.TABLE_CELL_WRAPPER},
|
|
6
8
|
.${TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation due to `getSelectionStyles`
|
|
4
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/no-exported-css -- Needs manual remediation due to `getSelectionStyles`
|
|
5
5
|
export const taskDecisionStyles = css`
|
|
6
6
|
[data-decision-wrapper] {
|
|
7
7
|
cursor: pointer;
|
|
@@ -17,11 +17,11 @@ const EDITOR_WIDTH = akEditorDefaultLayoutWidth + akEditorBreakoutPadding;
|
|
|
17
17
|
const WIDE_EDITOR_WIDTH = akEditorWideLayoutWidth + akEditorBreakoutPadding;
|
|
18
18
|
const FULLWIDTH_MODE = 'full-width';
|
|
19
19
|
const WIDE_MODE = 'wide';
|
|
20
|
-
const absolutePanelStyles = css
|
|
21
|
-
position: absolute
|
|
22
|
-
right: 0
|
|
23
|
-
height: calc(100% - ${ATLASSIAN_NAVIGATION_HEIGHT})
|
|
24
|
-
|
|
20
|
+
const absolutePanelStyles = css({
|
|
21
|
+
position: 'absolute',
|
|
22
|
+
right: 0,
|
|
23
|
+
height: `calc(100% - ${ATLASSIAN_NAVIGATION_HEIGHT})`
|
|
24
|
+
});
|
|
25
25
|
const checkTableExistsInDoc = editorView => {
|
|
26
26
|
const tableNodeSchema = editorView.state.schema.nodes.table;
|
|
27
27
|
let findResult = findChildrenByType(editorView.state.doc, tableNodeSchema);
|
|
@@ -48,24 +48,24 @@ export const shouldPanelBePositionedOverEditor = (editorWidth, panelWidth, edito
|
|
|
48
48
|
return editorNotFullWidth && (hasSpaceForPanel || hasSpaceForWideBreakoutsAndPanel) && !isTableInDoc;
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
const panelHidden = css
|
|
52
|
-
width: 0
|
|
53
|
-
|
|
54
|
-
export const panel = css
|
|
55
|
-
width:
|
|
56
|
-
height: 100
|
|
57
|
-
transition: width ${ANIM_SPEED_MS}ms ${akEditorSwoopCubicBezier}
|
|
58
|
-
overflow: hidden
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
export const content = css
|
|
62
|
-
transition: width 600ms ${akEditorSwoopCubicBezier}
|
|
63
|
-
|
|
64
|
-
padding:
|
|
65
|
-
width:
|
|
66
|
-
height: 100
|
|
67
|
-
|
|
68
|
-
|
|
51
|
+
const panelHidden = css({
|
|
52
|
+
width: 0
|
|
53
|
+
});
|
|
54
|
+
export const panel = css({
|
|
55
|
+
width: `${akEditorContextPanelWidth}px`,
|
|
56
|
+
height: '100%',
|
|
57
|
+
transition: `width ${ANIM_SPEED_MS}ms ${akEditorSwoopCubicBezier}`,
|
|
58
|
+
overflow: 'hidden',
|
|
59
|
+
boxShadow: `inset 2px 0 0 0 ${`var(--ds-border, ${N30})`}`
|
|
60
|
+
});
|
|
61
|
+
export const content = css({
|
|
62
|
+
transition: `width 600ms ${akEditorSwoopCubicBezier}`,
|
|
63
|
+
boxSizing: 'border-box',
|
|
64
|
+
padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-200, 16px)"} 0px`,
|
|
65
|
+
width: `${akEditorContextPanelWidth}px`,
|
|
66
|
+
height: '100%',
|
|
67
|
+
overflowY: 'auto'
|
|
68
|
+
});
|
|
69
69
|
export class SwappableContentArea extends React.PureComponent {
|
|
70
70
|
constructor(...args) {
|
|
71
71
|
super(...args);
|
|
@@ -6,9 +6,9 @@ import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
|
6
6
|
import { whichTransitionEvent } from '../../utils';
|
|
7
7
|
import { ErrorBoundary } from '../ErrorBoundary';
|
|
8
8
|
import { MountPluginHooks } from './mount-plugin-hooks';
|
|
9
|
-
const pluginsComponentsWrapper = css
|
|
10
|
-
display: flex
|
|
11
|
-
|
|
9
|
+
const pluginsComponentsWrapper = css({
|
|
10
|
+
display: 'flex'
|
|
11
|
+
});
|
|
12
12
|
export default class PluginSlot extends React.Component {
|
|
13
13
|
constructor(...args) {
|
|
14
14
|
super(...args);
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
const toolbarComponentsWrapper = css
|
|
6
|
-
display: flex
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
justify-content: space-between;
|
|
5
|
+
const toolbarComponentsWrapper = css({
|
|
6
|
+
display: 'flex',
|
|
7
|
+
[`@media (max-width: ${akEditorMobileMaxWidth}px)`]: {
|
|
8
|
+
justifyContent: 'space-between'
|
|
10
9
|
}
|
|
11
|
-
|
|
10
|
+
});
|
|
12
11
|
export class ToolbarInner extends React.Component {
|
|
13
12
|
shouldComponentUpdate(nextProps) {
|
|
14
13
|
return nextProps.toolbarSize !== this.props.toolbarSize || nextProps.disabled !== this.props.disabled || nextProps.popupsMountPoint === this.props.popupsMountPoint || nextProps.popupsBoundariesElement === this.props.popupsBoundariesElement || nextProps.popupsScrollableElement === this.props.popupsScrollableElement || nextProps.isReducedSpacing !== this.props.isToolbarReducedSpacing;
|
|
@@ -43,9 +43,12 @@ export default class WithFlash extends React.Component {
|
|
|
43
43
|
children
|
|
44
44
|
} = this.props;
|
|
45
45
|
this.toggle = animate && !this.toggle;
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
return (
|
|
47
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
48
|
+
jsx("div", {
|
|
49
|
+
css: animate ? flashWrapperAnimated : flashWrapper,
|
|
50
|
+
className: this.toggle ? '-flash' : ''
|
|
51
|
+
}, children)
|
|
52
|
+
);
|
|
50
53
|
}
|
|
51
54
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "193.
|
|
2
|
+
export const version = "193.3.0";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
var _css;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { inlineNodeViewClassname } from '@atlaskit/editor-common/react-node-view';
|
|
5
5
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
@@ -7,4 +7,24 @@ import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
|
7
7
|
// For reasoning behind styles, see comments in:
|
|
8
8
|
// ./getInlineNodeViewProducer -> portalChildren()
|
|
9
9
|
|
|
10
|
-
export var InlineNodeViewSharedStyles = css(
|
|
10
|
+
export var InlineNodeViewSharedStyles = css((_css = {}, _defineProperty(_css, ".".concat(inlineNodeViewClassname), {
|
|
11
|
+
display: 'inline',
|
|
12
|
+
userSelect: 'all',
|
|
13
|
+
whiteSpace: 'nowrap',
|
|
14
|
+
'& > *:not(.zeroWidthSpaceContainer)': {
|
|
15
|
+
whiteSpace: 'pre-wrap'
|
|
16
|
+
},
|
|
17
|
+
'& > .assistive': {
|
|
18
|
+
userSelect: 'none'
|
|
19
|
+
}
|
|
20
|
+
}), _defineProperty(_css, '&.ua-safari', _defineProperty({}, ".".concat(inlineNodeViewClassname), {
|
|
21
|
+
'::selection, *::selection': {
|
|
22
|
+
background: 'transparent'
|
|
23
|
+
}
|
|
24
|
+
})), _defineProperty(_css, "&.ua-chrome .".concat(inlineNodeViewClassname, " > span"), {
|
|
25
|
+
userSelect: 'none'
|
|
26
|
+
}), _defineProperty(_css, ".".concat(inlineNodeViewClassname, "AddZeroWidthSpace"), {
|
|
27
|
+
'::after': {
|
|
28
|
+
content: "'".concat(ZERO_WIDTH_SPACE, "'")
|
|
29
|
+
}
|
|
30
|
+
}), _css));
|
|
@@ -147,7 +147,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
147
147
|
allowCustomPanelEdit: _typeof(props.allowPanel) === 'object' ? props.allowPanel.allowCustomPanelEdit : false
|
|
148
148
|
}], Boolean(props.allowPanel)).maybeAdd(contextPanelPlugin, Boolean(isFullPage)).maybeAdd([extensionPlugin, {
|
|
149
149
|
breakoutEnabled: appearance === 'full-page' && (_typeof(props.allowExtension) === 'object' ? props.allowExtension.allowBreakout : true) !== false,
|
|
150
|
-
allowAutoSave: _typeof(props.allowExtension) === 'object' ? props.allowExtension.allowAutoSave : false,
|
|
151
150
|
extensionHandlers: props.extensionHandlers,
|
|
152
151
|
useLongPressSelection: false,
|
|
153
152
|
appearance: appearance
|
|
@@ -5,8 +5,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
9
|
-
var _templateObject;
|
|
10
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); }; }
|
|
11
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
10
|
/** @jsx jsx */
|
|
@@ -22,7 +20,9 @@ import { clickAreaClickHandler } from '../click-area-helper';
|
|
|
22
20
|
var clickWrapper = function clickWrapper(_ref) {
|
|
23
21
|
var isExpanded = _ref.isExpanded,
|
|
24
22
|
minHeight = _ref.minHeight;
|
|
25
|
-
return css(
|
|
23
|
+
return css({
|
|
24
|
+
height: '100%'
|
|
25
|
+
}, isExpanded && minHeight ? "min-height: ".concat(minHeight, "px") : '');
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* Click Area is responsible for improving UX by ensuring the user
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { N60A } from '@atlaskit/theme/colors';
|
|
5
3
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
|
-
export var dropdown = css(
|
|
4
|
+
export var dropdown = css({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
flexDirection: 'column',
|
|
7
|
+
background: "var(--ds-surface-overlay, white)",
|
|
8
|
+
borderRadius: "".concat(borderRadius(), "px"),
|
|
9
|
+
boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"),
|
|
10
|
+
boxSizing: 'border-box',
|
|
11
|
+
padding: "var(--ds-space-050, 4px)".concat(" 0")
|
|
12
|
+
});
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { N20, N800 } from '@atlaskit/theme/colors';
|
|
5
|
-
export var dropdownItem = css(
|
|
3
|
+
export var dropdownItem = css({
|
|
4
|
+
display: 'flex',
|
|
5
|
+
alignItems: 'center',
|
|
6
|
+
cursor: 'pointer',
|
|
7
|
+
textDecoration: 'none',
|
|
8
|
+
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-400, 32px)", " ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-150, 12px)"),
|
|
9
|
+
color: "var(--ds-text, ".concat(N800, ")"),
|
|
10
|
+
'> span': {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
marginRight: "var(--ds-space-100, 8px)"
|
|
13
|
+
},
|
|
14
|
+
'&:hover': {
|
|
15
|
+
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(N20, ")")
|
|
16
|
+
}
|
|
17
|
+
});
|
|
@@ -5,8 +5,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
10
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); }; }
|
|
11
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
10
|
/** @jsx jsx */
|
|
@@ -18,7 +16,26 @@ import { createEditorContentStyle } from '../ContentStyles';
|
|
|
18
16
|
import PluginSlot from '../PluginSlot';
|
|
19
17
|
import { scrollbarStyles } from '../styles';
|
|
20
18
|
import WithFlash from '../WithFlash';
|
|
21
|
-
var chromelessEditor = css(
|
|
19
|
+
var chromelessEditor = css({
|
|
20
|
+
lineHeight: '20px',
|
|
21
|
+
height: 'auto',
|
|
22
|
+
overflowX: 'hidden',
|
|
23
|
+
overflowY: 'auto'
|
|
24
|
+
}, scrollbarStyles, {
|
|
25
|
+
maxWidth: 'inherit',
|
|
26
|
+
boxSizing: 'border-box',
|
|
27
|
+
wordWrap: 'break-word',
|
|
28
|
+
'div > .ProseMirror': {
|
|
29
|
+
outline: 'none',
|
|
30
|
+
whiteSpace: 'pre-wrap',
|
|
31
|
+
padding: 0,
|
|
32
|
+
margin: 0,
|
|
33
|
+
'& > :last-child': {
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
35
|
+
paddingBottom: '0.5em'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
22
39
|
var ContentArea = createEditorContentStyle();
|
|
23
40
|
ContentArea.displayName = 'ContentArea';
|
|
24
41
|
var Editor = /*#__PURE__*/function (_React$Component) {
|
|
@@ -57,7 +74,11 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
57
74
|
return jsx(WithFlash, {
|
|
58
75
|
animate: maxContentSizeReached
|
|
59
76
|
}, jsx("div", {
|
|
60
|
-
css: [chromelessEditor, maxHeight && css(
|
|
77
|
+
css: [chromelessEditor, maxHeight && css({
|
|
78
|
+
maxHeight: "".concat(maxHeight, "px")
|
|
79
|
+
}), css({
|
|
80
|
+
minHeight: "".concat(minHeight, "px")
|
|
81
|
+
})],
|
|
61
82
|
"data-testid": "chromeless-editor",
|
|
62
83
|
ref: function ref(_ref2) {
|
|
63
84
|
return _this.containerElement = _ref2;
|
|
@@ -35,22 +35,28 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
35
35
|
setTop(props.offsetTop || 0);
|
|
36
36
|
}
|
|
37
37
|
}, [props.externalToolbarRef, props.offsetTop]);
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
return (
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
40
|
+
jsx("div", {
|
|
41
|
+
css: [mainToolbarWrapperStyle(props.twoLineEditorToolbar), stickyToolbarWrapperStyle]
|
|
42
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
43
|
+
,
|
|
44
|
+
style: {
|
|
45
|
+
top: "".concat(top, "px")
|
|
46
|
+
},
|
|
47
|
+
"data-testid": "ak-editor-main-toolbar",
|
|
48
|
+
className: 'show-keyline'
|
|
49
|
+
}, props.children)
|
|
50
|
+
);
|
|
48
51
|
};
|
|
49
52
|
var FixedToolbar = function FixedToolbar(props) {
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
53
|
+
return (
|
|
54
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
55
|
+
jsx("div", {
|
|
56
|
+
css: mainToolbarWrapperStyle(props.twoLineEditorToolbar),
|
|
57
|
+
"data-testid": "ak-editor-main-toolbar"
|
|
58
|
+
}, props.children)
|
|
59
|
+
);
|
|
54
60
|
};
|
|
55
61
|
|
|
56
62
|
/**
|
|
@@ -1,27 +1,81 @@
|
|
|
1
|
-
import
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import { css } from '@emotion/react';
|
|
4
3
|
import { akEditorFloatingDialogZIndex, akEditorMobileMaxWidth, akEditorSwoopCubicBezier, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
|
|
5
4
|
export var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
6
5
|
var toolbarLineHeight = 56;
|
|
7
6
|
|
|
8
7
|
// box-shadow is overriden by the mainToolbar
|
|
9
|
-
var mainToolbarWithKeyline = css(
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var mainToolbarWithKeyline = css({
|
|
9
|
+
boxShadow: "0 ".concat(akEditorToolbarKeylineHeight, "px 0 0 ", "var(--ds-background-accent-gray-subtlest, #F1F2F4)")
|
|
10
|
+
});
|
|
11
|
+
var mainToolbarTwoLineStyle = css(_defineProperty({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
12
|
+
flexWrap: 'wrap',
|
|
13
|
+
height: "calc(".concat(toolbarLineHeight, "px * 2)")
|
|
14
|
+
}));
|
|
15
|
+
var mainToolbar = css(_defineProperty({
|
|
16
|
+
position: 'relative',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
boxShadow: 'none',
|
|
19
|
+
transition: "box-shadow 200ms ".concat(akEditorSwoopCubicBezier),
|
|
20
|
+
zIndex: akEditorFloatingDialogZIndex,
|
|
21
|
+
display: 'flex',
|
|
22
|
+
height: "".concat(toolbarLineHeight, "px"),
|
|
23
|
+
flexShrink: 0,
|
|
24
|
+
backgroundColor: "var(--ds-surface, white)",
|
|
25
|
+
'& object': {
|
|
26
|
+
height: '0 !important'
|
|
27
|
+
}
|
|
28
|
+
}, "@media (max-width: ".concat(akEditorMobileMaxWidth, "px)"), {
|
|
29
|
+
display: 'grid',
|
|
30
|
+
height: "calc(".concat(toolbarLineHeight, "px * 2)")
|
|
31
|
+
}));
|
|
12
32
|
export var mainToolbarStyle = function mainToolbarStyle(showKeyline, twoLineEditorToolbar) {
|
|
13
33
|
return [mainToolbar, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle];
|
|
14
34
|
};
|
|
15
|
-
export var mainToolbarIconBeforeStyle = css(
|
|
16
|
-
|
|
17
|
-
|
|
35
|
+
export var mainToolbarIconBeforeStyle = css(_defineProperty({
|
|
36
|
+
margin: "var(--ds-space-200, 16px)",
|
|
37
|
+
height: "var(--ds-space-400, 32px)",
|
|
38
|
+
width: "var(--ds-space-400, 32px)"
|
|
39
|
+
}, "@media (max-width: ".concat(akEditorMobileMaxWidth, "px)"), {
|
|
40
|
+
gridColumn: 1,
|
|
41
|
+
gridRow: 1
|
|
42
|
+
}));
|
|
43
|
+
var mainToolbarFirstChild = css(_defineProperty({
|
|
44
|
+
display: 'flex',
|
|
45
|
+
flexGrow: 1
|
|
46
|
+
}, "@media (max-width: ".concat(akEditorMobileMaxWidth, "px)"), {
|
|
47
|
+
gridColumn: 1,
|
|
48
|
+
gridRow: 1
|
|
49
|
+
}));
|
|
50
|
+
var mainToolbarFirstChildTowLine = css(_defineProperty({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
51
|
+
flex: '1 1 100%',
|
|
52
|
+
height: "".concat(toolbarLineHeight, "px"),
|
|
53
|
+
justifyContent: 'flex-end',
|
|
54
|
+
minWidth: 'fit-content'
|
|
55
|
+
}));
|
|
18
56
|
export var mainToolbarFirstChildStyle = function mainToolbarFirstChildStyle(twoLineEditorToolbar) {
|
|
19
57
|
return [mainToolbarFirstChild, twoLineEditorToolbar && mainToolbarFirstChildTowLine];
|
|
20
58
|
};
|
|
21
|
-
var mainToolbarSecondChild = css(
|
|
22
|
-
|
|
59
|
+
var mainToolbarSecondChild = css({
|
|
60
|
+
minWidth: 'fit-content'
|
|
61
|
+
});
|
|
62
|
+
var mainToolbarSecondChildTwoLine = css(_defineProperty({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
63
|
+
display: 'flex',
|
|
64
|
+
flexGrow: 1,
|
|
65
|
+
flex: '1 1 100%',
|
|
66
|
+
margin: 'auto',
|
|
67
|
+
height: "".concat(toolbarLineHeight, "px"),
|
|
68
|
+
minWidth: 0
|
|
69
|
+
}));
|
|
23
70
|
export var mainToolbarSecondChildStyle = function mainToolbarSecondChildStyle(twoLineEditorToolbar) {
|
|
24
71
|
return [mainToolbarSecondChild, twoLineEditorToolbar && mainToolbarSecondChildTwoLine];
|
|
25
72
|
};
|
|
26
|
-
export var nonCustomToolbarWrapperStyle = css(
|
|
27
|
-
|
|
73
|
+
export var nonCustomToolbarWrapperStyle = css({
|
|
74
|
+
alignItems: 'center',
|
|
75
|
+
display: 'flex',
|
|
76
|
+
flexGrow: 1
|
|
77
|
+
});
|
|
78
|
+
export var customToolbarWrapperStyle = css({
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
display: 'flex'
|
|
81
|
+
});
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import React, { forwardRef, useCallback } from 'react';
|
|
5
3
|
import { css, jsx } from '@emotion/react';
|
|
@@ -14,7 +12,19 @@ import WithFlash from '../WithFlash';
|
|
|
14
12
|
|
|
15
13
|
// Copied from packages/editor/editor-mobile-bridge/src/editor/editor-plugins/mobile-dimensions/types.ts
|
|
16
14
|
|
|
17
|
-
var mobileEditor = css(
|
|
15
|
+
var mobileEditor = css({
|
|
16
|
+
minHeight: '30px',
|
|
17
|
+
width: '100%',
|
|
18
|
+
maxWidth: 'inherit',
|
|
19
|
+
boxSizing: 'border-box',
|
|
20
|
+
wordWrap: 'break-word',
|
|
21
|
+
'div > .ProseMirror': {
|
|
22
|
+
outline: 'none',
|
|
23
|
+
whiteSpace: 'pre-wrap',
|
|
24
|
+
padding: 0,
|
|
25
|
+
margin: 0
|
|
26
|
+
}
|
|
27
|
+
});
|
|
18
28
|
var ContentArea = createEditorContentStyle();
|
|
19
29
|
ContentArea.displayName = 'ContentArea';
|
|
20
30
|
export var MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance(_ref, ref) {
|