@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.
Files changed (82) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +23 -3
  3. package/dist/cjs/presets/universal.js +0 -1
  4. package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +4 -5
  5. package/dist/cjs/ui/Addon/Dropdown/styles.js +9 -4
  6. package/dist/cjs/ui/Addon/DropdownItem/styles.js +15 -4
  7. package/dist/cjs/ui/Appearance/Chromeless.js +26 -6
  8. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +20 -14
  9. package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +66 -12
  10. package/dist/cjs/ui/AppearanceComponents/Mobile.js +15 -4
  11. package/dist/cjs/ui/ChromeCollapsed/styles.js +23 -4
  12. package/dist/cjs/ui/ContentStyles/date.js +1 -0
  13. package/dist/cjs/ui/ContentStyles/extension.js +1 -1
  14. package/dist/cjs/ui/ContentStyles/index.js +3 -0
  15. package/dist/cjs/ui/ContentStyles/layout.js +1 -0
  16. package/dist/cjs/ui/ContentStyles/media.js +1 -1
  17. package/dist/cjs/ui/ContentStyles/status.js +1 -0
  18. package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +1 -1
  19. package/dist/cjs/ui/ContextPanel/index.js +24 -8
  20. package/dist/cjs/ui/PluginSlot/index.js +4 -5
  21. package/dist/cjs/ui/Toolbar/ToolbarInner.js +7 -5
  22. package/dist/cjs/ui/WithFlash/index.js +7 -4
  23. package/dist/cjs/version-wrapper.js +1 -1
  24. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +23 -35
  25. package/dist/es2019/presets/universal.js +0 -1
  26. package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +3 -4
  27. package/dist/es2019/ui/Addon/Dropdown/styles.js +9 -9
  28. package/dist/es2019/ui/Addon/DropdownItem/styles.js +14 -15
  29. package/dist/es2019/ui/Appearance/Chromeless.js +23 -25
  30. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +16 -11
  31. package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +68 -81
  32. package/dist/es2019/ui/AppearanceComponents/Mobile.js +12 -13
  33. package/dist/es2019/ui/ChromeCollapsed/styles.js +21 -23
  34. package/dist/es2019/ui/ContentStyles/date.js +1 -0
  35. package/dist/es2019/ui/ContentStyles/expand.js +1 -2
  36. package/dist/es2019/ui/ContentStyles/extension.js +1 -1
  37. package/dist/es2019/ui/ContentStyles/index.js +5 -3
  38. package/dist/es2019/ui/ContentStyles/layout.js +2 -0
  39. package/dist/es2019/ui/ContentStyles/media.js +1 -1
  40. package/dist/es2019/ui/ContentStyles/status.js +2 -0
  41. package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +1 -1
  42. package/dist/es2019/ui/ContextPanel/index.js +23 -23
  43. package/dist/es2019/ui/PluginSlot/index.js +3 -3
  44. package/dist/es2019/ui/Toolbar/ToolbarInner.js +5 -6
  45. package/dist/es2019/ui/WithFlash/index.js +7 -4
  46. package/dist/es2019/version-wrapper.js +1 -1
  47. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +23 -3
  48. package/dist/esm/presets/universal.js +0 -1
  49. package/dist/esm/ui/Addon/ClickAreaMobile/index.js +3 -3
  50. package/dist/esm/ui/Addon/Dropdown/styles.js +9 -3
  51. package/dist/esm/ui/Addon/DropdownItem/styles.js +15 -3
  52. package/dist/esm/ui/Appearance/Chromeless.js +25 -4
  53. package/dist/esm/ui/Appearance/Comment/Toolbar.js +20 -14
  54. package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +66 -12
  55. package/dist/esm/ui/AppearanceComponents/Mobile.js +13 -3
  56. package/dist/esm/ui/ChromeCollapsed/styles.js +23 -3
  57. package/dist/esm/ui/ContentStyles/date.js +1 -0
  58. package/dist/esm/ui/ContentStyles/expand.js +1 -2
  59. package/dist/esm/ui/ContentStyles/extension.js +1 -1
  60. package/dist/esm/ui/ContentStyles/index.js +5 -3
  61. package/dist/esm/ui/ContentStyles/layout.js +2 -0
  62. package/dist/esm/ui/ContentStyles/media.js +1 -1
  63. package/dist/esm/ui/ContentStyles/status.js +2 -0
  64. package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +1 -1
  65. package/dist/esm/ui/ContextPanel/index.js +23 -6
  66. package/dist/esm/ui/PluginSlot/index.js +3 -3
  67. package/dist/esm/ui/Toolbar/ToolbarInner.js +6 -3
  68. package/dist/esm/ui/WithFlash/index.js +7 -4
  69. package/dist/esm/version-wrapper.js +1 -1
  70. package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
  71. package/dist/types/create-editor/WithEditorView.d.ts +2 -2
  72. package/dist/types/create-editor/get-ui-component.d.ts +1 -1
  73. package/dist/types/types/extension-config.d.ts +0 -1
  74. package/dist/types/ui/Toolbar/Toolbar.d.ts +2 -2
  75. package/dist/types/ui/Toolbar/ToolbarWithSizeDetector.d.ts +2 -3
  76. package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +1 -1
  77. package/dist/types-ts4.5/create-editor/WithEditorView.d.ts +2 -2
  78. package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +1 -1
  79. package/dist/types-ts4.5/types/extension-config.d.ts +0 -1
  80. package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +2 -2
  81. package/dist/types-ts4.5/ui/Toolbar/ToolbarWithSizeDetector.d.ts +2 -3
  82. 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
- /* Normal .className gets overridden by input[type=text] hence this hack to produce input.className */
7
- input& {
8
- background-color: ${"var(--ds-background-input, white)"};
9
- border: 1px solid ${`var(--ds-border-input, ${akEditorSubtleAccent})`};
10
- border-radius: ${borderRadius()}px;
11
- box-sizing: border-box;
12
- height: 40px;
13
- padding-left: ${"var(--ds-space-250, 20px)"};
14
- padding-top: ${"var(--ds-space-150, 12px)"};
15
- padding-bottom: ${"var(--ds-space-150, 12px)"};
16
- font-size: ${relativeFontSizeToBase16(14)};
17
- width: 100%;
18
- font-weight: 400;
19
- line-height: 1.42857142857143;
20
- letter-spacing: -0.005em;
21
- color: ${`var(--ds-text-subtlest, ${N300})`};
22
-
23
- &:hover {
24
- background-color: ${"var(--ds-background-input-hovered, white)"};
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: ${akEditorContextPanelWidth}px;
56
- height: 100%;
57
- transition: width ${ANIM_SPEED_MS}ms ${akEditorSwoopCubicBezier};
58
- overflow: hidden;
59
- box-shadow: inset 2px 0 0 0 ${`var(--ds-border, ${N30})`};
60
- `;
61
- export const content = css`
62
- transition: width 600ms ${akEditorSwoopCubicBezier};
63
- box-sizing: border-box;
64
- padding: ${"var(--ds-space-200, 16px)"} ${"var(--ds-space-200, 16px)"} 0px;
65
- width: ${akEditorContextPanelWidth}px;
66
- height: 100%;
67
- overflow-y: auto;
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
- @media (max-width: ${akEditorMobileMaxWidth}px) {
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 jsx("div", {
47
- css: animate ? flashWrapperAnimated : flashWrapper,
48
- className: this.toggle ? '-flash' : ''
49
- }, children);
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.6";
2
+ export const version = "193.3.0";
@@ -1,5 +1,5 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
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(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n display: inline;\n user-select: all;\n /* Collapses zero width spaces inside the inline node view\n to prevent the node from line breaking too early.\n */\n white-space: nowrap;\n /* Then reset to the Editor default so we don't interfere\n with any component styling. */\n & > *:not(.zeroWidthSpaceContainer) {\n white-space: pre-wrap;\n }\n // Prevent visually hidden assistive text from being selected.\n & > .assistive {\n user-select: none;\n }\n }\n /** Remove browser deafult selections style. This prevents\n unexpected visual artefacts in Safari when navigating\n with the keyboard or making range selections. */\n &.ua-safari {\n .", " {\n ::selection,\n *::selection {\n background: transparent;\n }\n }\n }\n\n &.ua-chrome .", " > span {\n user-select: none;\n }\n\n .", "AddZeroWidthSpace {\n ::after {\n content: '", "';\n }\n }\n"])), inlineNodeViewClassname, inlineNodeViewClassname, inlineNodeViewClassname, inlineNodeViewClassname, ZERO_WIDTH_SPACE);
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(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 100%;\n ", ";\n"])), isExpanded && minHeight ? "min-height: ".concat(minHeight, "px") : '');
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(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n box-sizing: border-box;\n padding: ", " 0;\n"])), "var(--ds-surface-overlay, white)", borderRadius(), "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"), "var(--ds-space-050, 4px)");
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(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n padding: ", " ", "\n ", " ", ";\n color: ", ";\n > span {\n display: flex;\n margin-right: ", ";\n }\n &:hover {\n background-color: ", ";\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-400, 32px)", "var(--ds-space-100, 8px)", "var(--ds-space-150, 12px)", "var(--ds-text, ".concat(N800, ")"), "var(--ds-space-100, 8px)", "var(--ds-background-neutral-subtle-hovered, ".concat(N20, ")"));
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(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 20px;\n height: auto;\n\n overflow-x: hidden;\n overflow-y: auto;\n ", ";\n max-width: inherit;\n box-sizing: border-box;\n word-wrap: break-word;\n\n div > .ProseMirror {\n outline: none;\n white-space: pre-wrap;\n padding: 0;\n margin: 0;\n\n & > :last-child {\n padding-bottom: 0.5em;\n }\n }\n"])), scrollbarStyles);
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(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n max-height: ", "px;\n "])), maxHeight), css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), minHeight)],
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 jsx("div", {
39
- css: [mainToolbarWrapperStyle(props.twoLineEditorToolbar), stickyToolbarWrapperStyle]
40
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
41
- ,
42
- style: {
43
- top: "".concat(top, "px")
44
- },
45
- "data-testid": "ak-editor-main-toolbar",
46
- className: 'show-keyline'
47
- }, props.children);
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 jsx("div", {
51
- css: mainToolbarWrapperStyle(props.twoLineEditorToolbar),
52
- "data-testid": "ak-editor-main-toolbar"
53
- }, props.children);
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 _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
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(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-shadow: 0 ", "px 0 0\n ", ";\n"])), akEditorToolbarKeylineHeight, "var(--ds-background-accent-gray-subtlest, #F1F2F4)");
10
- var mainToolbarTwoLineStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n @media (max-width: ", "px) {\n flex-wrap: wrap;\n height: calc(", "px * 2);\n }\n"])), MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, toolbarLineHeight);
11
- var mainToolbar = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n box-shadow: none;\n transition: box-shadow 200ms ", ";\n z-index: ", ";\n display: flex;\n height: ", "px;\n flex-shrink: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4456\n background-color: ", ";\n\n & object {\n height: 0 !important;\n }\n\n @media (max-width: ", "px) {\n display: grid;\n height: calc(", "px * 2);\n }\n"])), akEditorSwoopCubicBezier, akEditorFloatingDialogZIndex, toolbarLineHeight, "var(--ds-surface, white)", akEditorMobileMaxWidth, toolbarLineHeight);
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(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: ", ";\n height: ", ";\n width: ", ";\n @media (max-width: ", "px) {\n grid-column: 1;\n grid-row: 1;\n }\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-400, 32px)", "var(--ds-space-400, 32px)", akEditorMobileMaxWidth);
16
- var mainToolbarFirstChild = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-grow: 1;\n\n @media (max-width: ", "px) {\n grid-column: 1;\n grid-row: 1;\n }\n"])), akEditorMobileMaxWidth);
17
- var mainToolbarFirstChildTowLine = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n @media (max-width: ", "px) {\n flex: 1 1 100%;\n height: ", "px;\n justify-content: flex-end;\n // ED-10241: We add fit-content to ensure that MainToolbar does not\n // shrink more than the size of its contents. This will prevent the\n // find/replace icon from being overlapped during a confluence\n // publish operation\n min-width: fit-content;\n }\n"])), MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, toolbarLineHeight);
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(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n // ED-10241: We add fit-content to ensure that MainToolbar does not\n // shrink more than the size of its contents. This will prevent the\n // find/replace icon from being overlapped during a confluence\n // publish operation\n min-width: fit-content;\n"])));
22
- var mainToolbarSecondChildTwoLine = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n @media (max-width: ", "px) {\n display: flex;\n flex-grow: 1;\n flex: 1 1 100%;\n margin: auto;\n height: ", "px;\n min-width: 0;\n }\n"])), MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, toolbarLineHeight);
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(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n flex-grow: 1;\n"])));
27
- export var customToolbarWrapperStyle = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n"])));
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(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-height: 30px;\n width: 100%;\n max-width: inherit;\n box-sizing: border-box;\n word-wrap: break-word;\n\n div > .ProseMirror {\n outline: none;\n white-space: pre-wrap;\n padding: 0;\n margin: 0;\n }\n"])));
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) {