@atlaskit/editor-core 193.2.1 → 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 (127) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +23 -3
  3. package/dist/cjs/nodeviews/index.js +1 -5
  4. package/dist/cjs/presets/universal.js +0 -1
  5. package/dist/cjs/types/browser.js +1 -5
  6. package/dist/cjs/types/dom-at-pos.js +1 -5
  7. package/dist/cjs/types/editor-appearance.js +1 -5
  8. package/dist/cjs/types/editor-plugin.js +1 -5
  9. package/dist/cjs/types/editor-react-context.js +1 -5
  10. package/dist/cjs/types/empty-state-handler.js +1 -5
  11. package/dist/cjs/types/extension-config.js +1 -5
  12. package/dist/cjs/types/feature-flags.js +1 -5
  13. package/dist/cjs/types/i18n.js +1 -5
  14. package/dist/cjs/types/index.js +1 -5
  15. package/dist/cjs/types/performance-tracking.js +1 -5
  16. package/dist/cjs/types/pm-config.js +1 -5
  17. package/dist/cjs/types/pm-plugin.js +1 -5
  18. package/dist/cjs/types/ui-components.js +1 -5
  19. package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +4 -5
  20. package/dist/cjs/ui/Addon/Dropdown/styles.js +9 -4
  21. package/dist/cjs/ui/Addon/DropdownItem/styles.js +15 -4
  22. package/dist/cjs/ui/Appearance/Chromeless.js +26 -6
  23. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +20 -14
  24. package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +66 -12
  25. package/dist/cjs/ui/AppearanceComponents/Mobile.js +15 -4
  26. package/dist/cjs/ui/ChromeCollapsed/styles.js +23 -4
  27. package/dist/cjs/ui/ContentStyles/date.js +1 -0
  28. package/dist/cjs/ui/ContentStyles/extension.js +1 -1
  29. package/dist/cjs/ui/ContentStyles/index.js +3 -0
  30. package/dist/cjs/ui/ContentStyles/layout.js +1 -0
  31. package/dist/cjs/ui/ContentStyles/media.js +1 -1
  32. package/dist/cjs/ui/ContentStyles/status.js +1 -0
  33. package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +1 -1
  34. package/dist/cjs/ui/ContextPanel/index.js +24 -8
  35. package/dist/cjs/ui/PluginSlot/index.js +4 -5
  36. package/dist/cjs/ui/Toolbar/ToolbarInner.js +7 -5
  37. package/dist/cjs/ui/WithFlash/index.js +7 -4
  38. package/dist/cjs/version-wrapper.js +1 -1
  39. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +23 -35
  40. package/dist/es2019/nodeviews/index.js +0 -1
  41. package/dist/es2019/presets/universal.js +0 -1
  42. package/dist/es2019/types/browser.js +0 -1
  43. package/dist/es2019/types/dom-at-pos.js +0 -1
  44. package/dist/es2019/types/editor-appearance.js +0 -1
  45. package/dist/es2019/types/editor-plugin.js +0 -1
  46. package/dist/es2019/types/editor-react-context.js +0 -1
  47. package/dist/es2019/types/empty-state-handler.js +0 -1
  48. package/dist/es2019/types/extension-config.js +0 -1
  49. package/dist/es2019/types/feature-flags.js +0 -1
  50. package/dist/es2019/types/i18n.js +0 -1
  51. package/dist/es2019/types/index.js +0 -1
  52. package/dist/es2019/types/performance-tracking.js +0 -1
  53. package/dist/es2019/types/pm-config.js +0 -1
  54. package/dist/es2019/types/pm-plugin.js +0 -1
  55. package/dist/es2019/types/ui-components.js +0 -1
  56. package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +3 -4
  57. package/dist/es2019/ui/Addon/Dropdown/styles.js +9 -9
  58. package/dist/es2019/ui/Addon/DropdownItem/styles.js +14 -15
  59. package/dist/es2019/ui/Appearance/Chromeless.js +23 -25
  60. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +16 -11
  61. package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +68 -81
  62. package/dist/es2019/ui/AppearanceComponents/Mobile.js +12 -13
  63. package/dist/es2019/ui/ChromeCollapsed/styles.js +21 -23
  64. package/dist/es2019/ui/ContentStyles/date.js +1 -0
  65. package/dist/es2019/ui/ContentStyles/expand.js +1 -2
  66. package/dist/es2019/ui/ContentStyles/extension.js +1 -1
  67. package/dist/es2019/ui/ContentStyles/index.js +5 -3
  68. package/dist/es2019/ui/ContentStyles/layout.js +2 -0
  69. package/dist/es2019/ui/ContentStyles/media.js +1 -1
  70. package/dist/es2019/ui/ContentStyles/status.js +2 -0
  71. package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +1 -1
  72. package/dist/es2019/ui/ContextPanel/index.js +23 -23
  73. package/dist/es2019/ui/PluginSlot/index.js +3 -3
  74. package/dist/es2019/ui/Toolbar/ToolbarInner.js +5 -6
  75. package/dist/es2019/ui/WithFlash/index.js +7 -4
  76. package/dist/es2019/version-wrapper.js +1 -1
  77. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +23 -3
  78. package/dist/esm/nodeviews/index.js +0 -1
  79. package/dist/esm/presets/universal.js +0 -1
  80. package/dist/esm/types/browser.js +0 -1
  81. package/dist/esm/types/dom-at-pos.js +0 -1
  82. package/dist/esm/types/editor-appearance.js +0 -1
  83. package/dist/esm/types/editor-plugin.js +0 -1
  84. package/dist/esm/types/editor-react-context.js +0 -1
  85. package/dist/esm/types/empty-state-handler.js +0 -1
  86. package/dist/esm/types/extension-config.js +0 -1
  87. package/dist/esm/types/feature-flags.js +0 -1
  88. package/dist/esm/types/i18n.js +0 -1
  89. package/dist/esm/types/index.js +0 -1
  90. package/dist/esm/types/performance-tracking.js +0 -1
  91. package/dist/esm/types/pm-config.js +0 -1
  92. package/dist/esm/types/pm-plugin.js +0 -1
  93. package/dist/esm/types/ui-components.js +0 -1
  94. package/dist/esm/ui/Addon/ClickAreaMobile/index.js +3 -3
  95. package/dist/esm/ui/Addon/Dropdown/styles.js +9 -3
  96. package/dist/esm/ui/Addon/DropdownItem/styles.js +15 -3
  97. package/dist/esm/ui/Appearance/Chromeless.js +25 -4
  98. package/dist/esm/ui/Appearance/Comment/Toolbar.js +20 -14
  99. package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +66 -12
  100. package/dist/esm/ui/AppearanceComponents/Mobile.js +13 -3
  101. package/dist/esm/ui/ChromeCollapsed/styles.js +23 -3
  102. package/dist/esm/ui/ContentStyles/date.js +1 -0
  103. package/dist/esm/ui/ContentStyles/expand.js +1 -2
  104. package/dist/esm/ui/ContentStyles/extension.js +1 -1
  105. package/dist/esm/ui/ContentStyles/index.js +5 -3
  106. package/dist/esm/ui/ContentStyles/layout.js +2 -0
  107. package/dist/esm/ui/ContentStyles/media.js +1 -1
  108. package/dist/esm/ui/ContentStyles/status.js +2 -0
  109. package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +1 -1
  110. package/dist/esm/ui/ContextPanel/index.js +23 -6
  111. package/dist/esm/ui/PluginSlot/index.js +3 -3
  112. package/dist/esm/ui/Toolbar/ToolbarInner.js +6 -3
  113. package/dist/esm/ui/WithFlash/index.js +7 -4
  114. package/dist/esm/version-wrapper.js +1 -1
  115. package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
  116. package/dist/types/create-editor/WithEditorView.d.ts +2 -2
  117. package/dist/types/create-editor/get-ui-component.d.ts +1 -1
  118. package/dist/types/types/extension-config.d.ts +0 -1
  119. package/dist/types/ui/Toolbar/Toolbar.d.ts +2 -2
  120. package/dist/types/ui/Toolbar/ToolbarWithSizeDetector.d.ts +2 -3
  121. package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +1 -1
  122. package/dist/types-ts4.5/create-editor/WithEditorView.d.ts +2 -2
  123. package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +1 -1
  124. package/dist/types-ts4.5/types/extension-config.d.ts +0 -1
  125. package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +2 -2
  126. package/dist/types-ts4.5/ui/Toolbar/ToolbarWithSizeDetector.d.ts +2 -3
  127. package/package.json +12 -8
@@ -4,93 +4,80 @@ export const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
4
4
  const toolbarLineHeight = 56;
5
5
 
6
6
  // box-shadow is overriden by the mainToolbar
7
- const mainToolbarWithKeyline = css`
8
- box-shadow: 0 ${akEditorToolbarKeylineHeight}px 0 0
9
- ${"var(--ds-background-accent-gray-subtlest, #F1F2F4)"};
10
- `;
11
- const mainToolbarTwoLineStyle = css`
12
- @media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px) {
13
- flex-wrap: wrap;
14
- height: calc(${toolbarLineHeight}px * 2);
7
+ const mainToolbarWithKeyline = css({
8
+ boxShadow: `0 ${akEditorToolbarKeylineHeight}px 0 0 ${"var(--ds-background-accent-gray-subtlest, #F1F2F4)"}`
9
+ });
10
+ const mainToolbarTwoLineStyle = css({
11
+ [`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
12
+ flexWrap: 'wrap',
13
+ height: `calc(${toolbarLineHeight}px * 2)`
15
14
  }
16
- `;
17
- const mainToolbar = css`
18
- position: relative;
19
- align-items: center;
20
- box-shadow: none;
21
- transition: box-shadow 200ms ${akEditorSwoopCubicBezier};
22
- z-index: ${akEditorFloatingDialogZIndex};
23
- display: flex;
24
- height: ${toolbarLineHeight}px;
25
- flex-shrink: 0;
26
- // TODO: https://product-fabric.atlassian.net/browse/DSP-4456
27
- background-color: ${"var(--ds-surface, white)"};
28
-
29
- & object {
30
- height: 0 !important;
31
- }
32
-
33
- @media (max-width: ${akEditorMobileMaxWidth}px) {
34
- display: grid;
35
- height: calc(${toolbarLineHeight}px * 2);
15
+ });
16
+ const mainToolbar = css({
17
+ position: 'relative',
18
+ alignItems: 'center',
19
+ boxShadow: 'none',
20
+ transition: `box-shadow 200ms ${akEditorSwoopCubicBezier}`,
21
+ zIndex: akEditorFloatingDialogZIndex,
22
+ display: 'flex',
23
+ height: `${toolbarLineHeight}px`,
24
+ flexShrink: 0,
25
+ backgroundColor: "var(--ds-surface, white)",
26
+ '& object': {
27
+ height: '0 !important'
28
+ },
29
+ [`@media (max-width: ${akEditorMobileMaxWidth}px)`]: {
30
+ display: 'grid',
31
+ height: `calc(${toolbarLineHeight}px * 2)`
36
32
  }
37
- `;
33
+ });
38
34
  export const mainToolbarStyle = (showKeyline, twoLineEditorToolbar) => [mainToolbar, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle];
39
- export const mainToolbarIconBeforeStyle = css`
40
- margin: ${"var(--ds-space-200, 16px)"};
41
- height: ${"var(--ds-space-400, 32px)"};
42
- width: ${"var(--ds-space-400, 32px)"};
43
- @media (max-width: ${akEditorMobileMaxWidth}px) {
44
- grid-column: 1;
45
- grid-row: 1;
35
+ export const mainToolbarIconBeforeStyle = css({
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: ${akEditorMobileMaxWidth}px)`]: {
40
+ gridColumn: 1,
41
+ gridRow: 1
46
42
  }
47
- `;
48
- const mainToolbarFirstChild = css`
49
- display: flex;
50
- flex-grow: 1;
51
-
52
- @media (max-width: ${akEditorMobileMaxWidth}px) {
53
- grid-column: 1;
54
- grid-row: 1;
43
+ });
44
+ const mainToolbarFirstChild = css({
45
+ display: 'flex',
46
+ flexGrow: 1,
47
+ [`@media (max-width: ${akEditorMobileMaxWidth}px)`]: {
48
+ gridColumn: 1,
49
+ gridRow: 1
55
50
  }
56
- `;
57
- const mainToolbarFirstChildTowLine = css`
58
- @media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px) {
59
- flex: 1 1 100%;
60
- height: ${toolbarLineHeight}px;
61
- justify-content: flex-end;
62
- // ED-10241: We add fit-content to ensure that MainToolbar does not
63
- // shrink more than the size of its contents. This will prevent the
64
- // find/replace icon from being overlapped during a confluence
65
- // publish operation
66
- min-width: fit-content;
51
+ });
52
+ const mainToolbarFirstChildTowLine = css({
53
+ [`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
54
+ flex: '1 1 100%',
55
+ height: `${toolbarLineHeight}px`,
56
+ justifyContent: 'flex-end',
57
+ minWidth: 'fit-content'
67
58
  }
68
- `;
59
+ });
69
60
  export const mainToolbarFirstChildStyle = twoLineEditorToolbar => [mainToolbarFirstChild, twoLineEditorToolbar && mainToolbarFirstChildTowLine];
70
- const mainToolbarSecondChild = css`
71
- // ED-10241: We add fit-content to ensure that MainToolbar does not
72
- // shrink more than the size of its contents. This will prevent the
73
- // find/replace icon from being overlapped during a confluence
74
- // publish operation
75
- min-width: fit-content;
76
- `;
77
- const mainToolbarSecondChildTwoLine = css`
78
- @media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px) {
79
- display: flex;
80
- flex-grow: 1;
81
- flex: 1 1 100%;
82
- margin: auto;
83
- height: ${toolbarLineHeight}px;
84
- min-width: 0;
61
+ const mainToolbarSecondChild = css({
62
+ minWidth: 'fit-content'
63
+ });
64
+ const mainToolbarSecondChildTwoLine = css({
65
+ [`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
66
+ display: 'flex',
67
+ flexGrow: 1,
68
+ flex: '1 1 100%',
69
+ margin: 'auto',
70
+ height: `${toolbarLineHeight}px`,
71
+ minWidth: 0
85
72
  }
86
- `;
73
+ });
87
74
  export const mainToolbarSecondChildStyle = twoLineEditorToolbar => [mainToolbarSecondChild, twoLineEditorToolbar && mainToolbarSecondChildTwoLine];
88
- export const nonCustomToolbarWrapperStyle = css`
89
- align-items: center;
90
- display: flex;
91
- flex-grow: 1;
92
- `;
93
- export const customToolbarWrapperStyle = css`
94
- align-items: center;
95
- display: flex;
96
- `;
75
+ export const nonCustomToolbarWrapperStyle = css({
76
+ alignItems: 'center',
77
+ display: 'flex',
78
+ flexGrow: 1
79
+ });
80
+ export const customToolbarWrapperStyle = css({
81
+ alignItems: 'center',
82
+ display: 'flex'
83
+ });
@@ -12,20 +12,19 @@ import WithFlash from '../WithFlash';
12
12
 
13
13
  // Copied from packages/editor/editor-mobile-bridge/src/editor/editor-plugins/mobile-dimensions/types.ts
14
14
 
15
- const mobileEditor = css`
16
- min-height: 30px;
17
- width: 100%;
18
- max-width: inherit;
19
- box-sizing: border-box;
20
- word-wrap: break-word;
21
-
22
- div > .ProseMirror {
23
- outline: none;
24
- white-space: pre-wrap;
25
- padding: 0;
26
- margin: 0;
15
+ const 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
27
26
  }
28
- `;
27
+ });
29
28
  const ContentArea = createEditorContentStyle();
30
29
  ContentArea.displayName = 'ContentArea';
31
30
  export const MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance({
@@ -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.1";
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));
@@ -1 +0,0 @@
1
- export {};
@@ -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
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -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
+ });