@atlaskit/editor-core 167.0.3 → 169.1.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 (193) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/cjs/create-editor/create-plugins-list.js +7 -0
  3. package/dist/cjs/plugins/analytics/types/toolbar-button.js +2 -0
  4. package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +2 -2
  5. package/dist/cjs/plugins/breakout/index.js +7 -0
  6. package/dist/cjs/plugins/breakout/ui/LayoutButton.js +3 -1
  7. package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +6 -1
  8. package/dist/cjs/plugins/card/styles.js +4 -2
  9. package/dist/cjs/plugins/card/toolbar.js +6 -1
  10. package/dist/cjs/plugins/code-block/styles.js +17 -41
  11. package/dist/cjs/plugins/code-block/ui/class-names.js +5 -2
  12. package/dist/cjs/plugins/collab-edit/index.js +2 -2
  13. package/dist/cjs/plugins/collab-edit/provider/channel.js +2 -2
  14. package/dist/cjs/plugins/copy-button/commands.js +85 -0
  15. package/dist/cjs/plugins/copy-button/index.js +27 -0
  16. package/dist/cjs/plugins/copy-button/pm-plugins/main.js +38 -0
  17. package/dist/cjs/plugins/copy-button/pm-plugins/plugin-key.js +11 -0
  18. package/dist/cjs/plugins/copy-button/utils.js +51 -0
  19. package/dist/cjs/plugins/extension/context-panel.js +2 -2
  20. package/dist/cjs/plugins/extension/pm-plugins/main.js +2 -2
  21. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
  22. package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +2 -2
  23. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
  24. package/dist/cjs/plugins/indentation/messages.js +23 -0
  25. package/dist/cjs/plugins/index.js +16 -0
  26. package/dist/cjs/plugins/list/index.js +0 -43
  27. package/dist/cjs/plugins/macro/actions.js +2 -2
  28. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +2 -2
  29. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
  30. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  31. package/dist/cjs/plugins/panel/toolbar.js +10 -2
  32. package/dist/cjs/plugins/table/commands/hover.js +2 -2
  33. package/dist/cjs/plugins/table/toolbar.js +5 -1
  34. package/dist/cjs/plugins/table/utils/decoration.js +5 -1
  35. package/dist/cjs/plugins/toolbar-lists-indentation/index.js +65 -0
  36. package/dist/cjs/plugins/toolbar-lists-indentation/types.js +5 -0
  37. package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +122 -0
  38. package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +173 -0
  39. package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +58 -0
  40. package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +48 -0
  41. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +4 -5
  42. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +17 -51
  43. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +2 -2
  44. package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -2
  45. package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +2 -2
  46. package/dist/cjs/ui/ConfigPanel/transformers.js +2 -2
  47. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +12 -39
  48. package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +31 -87
  49. package/dist/cjs/utils/clipboard.js +67 -2
  50. package/dist/cjs/version-wrapper.js +1 -1
  51. package/dist/cjs/version.json +1 -1
  52. package/dist/es2019/create-editor/create-plugins-list.js +8 -1
  53. package/dist/es2019/plugins/analytics/types/toolbar-button.js +2 -0
  54. package/dist/es2019/plugins/breakout/index.js +7 -0
  55. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +3 -1
  56. package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +6 -1
  57. package/dist/es2019/plugins/card/styles.js +5 -0
  58. package/dist/es2019/plugins/card/toolbar.js +5 -1
  59. package/dist/es2019/plugins/code-block/styles.js +18 -95
  60. package/dist/es2019/plugins/code-block/ui/class-names.js +3 -2
  61. package/dist/es2019/plugins/copy-button/commands.js +64 -0
  62. package/dist/es2019/plugins/copy-button/index.js +15 -0
  63. package/dist/es2019/plugins/copy-button/pm-plugins/main.js +28 -0
  64. package/dist/es2019/plugins/copy-button/pm-plugins/plugin-key.js +2 -0
  65. package/dist/es2019/plugins/copy-button/utils.js +29 -0
  66. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
  67. package/dist/es2019/plugins/indentation/messages.js +14 -0
  68. package/dist/es2019/plugins/index.js +3 -1
  69. package/dist/es2019/plugins/list/index.js +1 -44
  70. package/dist/es2019/plugins/panel/toolbar.js +9 -2
  71. package/dist/es2019/plugins/table/commands/hover.js +2 -2
  72. package/dist/es2019/plugins/table/toolbar.js +5 -2
  73. package/dist/es2019/plugins/table/utils/decoration.js +5 -1
  74. package/dist/es2019/plugins/toolbar-lists-indentation/index.js +53 -0
  75. package/dist/es2019/plugins/toolbar-lists-indentation/types.js +1 -0
  76. package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +94 -0
  77. package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +149 -0
  78. package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +49 -0
  79. package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +35 -0
  80. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +11 -10
  81. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +17 -48
  82. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +10 -30
  83. package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +34 -93
  84. package/dist/es2019/utils/clipboard.js +26 -0
  85. package/dist/es2019/version-wrapper.js +1 -1
  86. package/dist/es2019/version.json +1 -1
  87. package/dist/esm/actions/index.js +1 -1
  88. package/dist/esm/create-editor/ErrorBoundary.js +1 -1
  89. package/dist/esm/create-editor/create-plugins-list.js +8 -1
  90. package/dist/esm/editor.js +2 -1
  91. package/dist/esm/plugins/analytics/types/toolbar-button.js +2 -0
  92. package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +1 -1
  93. package/dist/esm/plugins/breakout/index.js +7 -0
  94. package/dist/esm/plugins/breakout/ui/LayoutButton.js +3 -1
  95. package/dist/esm/plugins/card/pm-plugins/util/resolve.js +6 -1
  96. package/dist/esm/plugins/card/styles.js +2 -1
  97. package/dist/esm/plugins/card/toolbar.js +5 -1
  98. package/dist/esm/plugins/code-block/styles.js +16 -35
  99. package/dist/esm/plugins/code-block/ui/class-names.js +3 -2
  100. package/dist/esm/plugins/collab-edit/index.js +1 -1
  101. package/dist/esm/plugins/collab-edit/provider/channel.js +1 -1
  102. package/dist/esm/plugins/copy-button/commands.js +66 -0
  103. package/dist/esm/plugins/copy-button/index.js +17 -0
  104. package/dist/esm/plugins/copy-button/pm-plugins/main.js +26 -0
  105. package/dist/esm/plugins/copy-button/pm-plugins/plugin-key.js +2 -0
  106. package/dist/esm/plugins/copy-button/utils.js +31 -0
  107. package/dist/esm/plugins/custom-autoformat/doc.js +1 -1
  108. package/dist/esm/plugins/custom-autoformat/index.js +1 -1
  109. package/dist/esm/plugins/extension/actions.js +1 -1
  110. package/dist/esm/plugins/extension/context-panel.js +1 -1
  111. package/dist/esm/plugins/extension/pm-plugins/main.js +1 -1
  112. package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +1 -1
  113. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
  114. package/dist/esm/plugins/feedback-dialog/index.js +1 -1
  115. package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +1 -1
  116. package/dist/esm/plugins/find-replace/utils/batch-decorations.js +1 -1
  117. package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -1
  118. package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -1
  119. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -1
  120. package/dist/esm/plugins/image-upload/pm-plugins/main.js +1 -1
  121. package/dist/esm/plugins/indentation/messages.js +14 -0
  122. package/dist/esm/plugins/index.js +3 -1
  123. package/dist/esm/plugins/list/index.js +1 -41
  124. package/dist/esm/plugins/macro/actions.js +1 -1
  125. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +1 -1
  126. package/dist/esm/plugins/media/nodeviews/mediaInline.js +2 -1
  127. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
  128. package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +1 -1
  129. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
  130. package/dist/esm/plugins/media/picker-facade.js +1 -1
  131. package/dist/esm/plugins/media/pm-plugins/main.js +1 -1
  132. package/dist/esm/plugins/media/toolbar/utils.js +1 -1
  133. package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -1
  134. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +1 -1
  135. package/dist/esm/plugins/media/utils/check-media-type.js +1 -1
  136. package/dist/esm/plugins/panel/toolbar.js +9 -2
  137. package/dist/esm/plugins/paste/handlers.js +1 -1
  138. package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
  139. package/dist/esm/plugins/quick-insert/index.js +1 -1
  140. package/dist/esm/plugins/table/commands/hover.js +2 -2
  141. package/dist/esm/plugins/table/toolbar.js +5 -2
  142. package/dist/esm/plugins/table/utils/decoration.js +5 -1
  143. package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +1 -1
  144. package/dist/esm/plugins/toolbar-lists-indentation/index.js +51 -0
  145. package/dist/esm/plugins/toolbar-lists-indentation/types.js +1 -0
  146. package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +96 -0
  147. package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +153 -0
  148. package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +47 -0
  149. package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +39 -0
  150. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +6 -8
  151. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +18 -51
  152. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +1 -1
  153. package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +1 -1
  154. package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +1 -1
  155. package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +1 -1
  156. package/dist/esm/ui/ConfigPanel/transformers.js +1 -1
  157. package/dist/esm/ui/ElementBrowser/InsertMenu.js +12 -35
  158. package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +31 -89
  159. package/dist/esm/ui/LinkSearch/index.js +1 -1
  160. package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
  161. package/dist/esm/utils/action.js +1 -1
  162. package/dist/esm/utils/clipboard.js +56 -1
  163. package/dist/esm/utils/extensions.js +1 -1
  164. package/dist/esm/version-wrapper.js +1 -1
  165. package/dist/esm/version.json +1 -1
  166. package/dist/types/plugins/analytics/types/toolbar-button.d.ts +3 -1
  167. package/dist/types/plugins/card/styles.d.ts +1 -0
  168. package/dist/types/plugins/copy-button/commands.d.ts +4 -0
  169. package/dist/types/plugins/copy-button/index.d.ts +3 -0
  170. package/dist/types/plugins/copy-button/pm-plugins/main.d.ts +3 -0
  171. package/dist/types/plugins/copy-button/pm-plugins/plugin-key.d.ts +2 -0
  172. package/dist/types/plugins/copy-button/utils.d.ts +7 -0
  173. package/dist/types/plugins/indentation/messages.d.ts +12 -0
  174. package/dist/types/plugins/index.d.ts +2 -0
  175. package/dist/types/plugins/panel/toolbar.d.ts +1 -1
  176. package/dist/types/plugins/table/commands/hover.d.ts +1 -1
  177. package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
  178. package/dist/types/plugins/text-formatting/utils.d.ts +1 -1
  179. package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +5 -0
  180. package/dist/types/plugins/toolbar-lists-indentation/types.d.ts +16 -0
  181. package/dist/types/plugins/toolbar-lists-indentation/ui/Toolbar.d.ts +4 -0
  182. package/dist/types/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.d.ts +9 -0
  183. package/dist/types/plugins/{list/ui/ToolbarLists → toolbar-lists-indentation/ui}/index.d.ts +4 -10
  184. package/dist/types/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +6 -0
  185. package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -25
  186. package/dist/types/types/feature-flags.d.ts +18 -0
  187. package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +11 -0
  188. package/dist/types/utils/clipboard.d.ts +1 -0
  189. package/package.json +25 -25
  190. package/report.api.md +6747 -0
  191. package/dist/cjs/plugins/list/ui/ToolbarLists/index.js +0 -266
  192. package/dist/es2019/plugins/list/ui/ToolbarLists/index.js +0 -220
  193. package/dist/esm/plugins/list/ui/ToolbarLists/index.js +0 -241
@@ -0,0 +1,49 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { onItemActivated } from './onItemActivated';
4
+ import { ToolbarDropdown } from './ToolbarDropdown';
5
+ import { Toolbar } from './Toolbar';
6
+ export default function ToolbarListsIndentation(props) {
7
+ const {
8
+ disabled,
9
+ isSmall,
10
+ isReducedSpacing,
11
+ bulletListActive,
12
+ bulletListDisabled,
13
+ orderedListActive,
14
+ orderedListDisabled,
15
+ showIndentationButtons,
16
+ popupsMountPoint,
17
+ popupsBoundariesElement,
18
+ popupsScrollableElement
19
+ } = props;
20
+
21
+ if (isSmall) {
22
+ return jsx(ToolbarDropdown, {
23
+ editorView: props.editorView,
24
+ isReducedSpacing: isReducedSpacing,
25
+ popupsMountPoint: popupsMountPoint,
26
+ popupsBoundariesElement: popupsBoundariesElement,
27
+ popupsScrollableElement: popupsScrollableElement,
28
+ bulletListActive: bulletListActive,
29
+ bulletListDisabled: bulletListDisabled,
30
+ showIndentationButtons: showIndentationButtons,
31
+ orderedListActive: orderedListActive,
32
+ orderedListDisabled: orderedListDisabled,
33
+ disabled: disabled,
34
+ onItemActivated: onItemActivated
35
+ });
36
+ }
37
+
38
+ return jsx(Toolbar, {
39
+ editorView: props.editorView,
40
+ isReducedSpacing: isReducedSpacing,
41
+ bulletListActive: bulletListActive,
42
+ bulletListDisabled: bulletListDisabled,
43
+ showIndentationButtons: showIndentationButtons,
44
+ orderedListActive: orderedListActive,
45
+ orderedListDisabled: orderedListDisabled,
46
+ disabled: disabled,
47
+ onItemActivated: onItemActivated
48
+ });
49
+ }
@@ -0,0 +1,35 @@
1
+ import { toggleBulletList, toggleOrderedList } from '../../list/commands';
2
+ import { INPUT_METHOD } from '../../analytics';
3
+ export function onItemActivated({
4
+ buttonName,
5
+ editorView
6
+ }) {
7
+ switch (buttonName) {
8
+ case 'bullet_list':
9
+ toggleBulletList(editorView, INPUT_METHOD.TOOLBAR);
10
+ break;
11
+
12
+ case 'ordered_list':
13
+ toggleOrderedList(editorView, INPUT_METHOD.TOOLBAR);
14
+ break;
15
+
16
+ case 'indent':
17
+ editorView.someProp('handleKeyDown', handleKeyDown => handleKeyDown(editorView, new KeyboardEvent('keydown', {
18
+ bubbles: true,
19
+ cancelable: true,
20
+ key: 'Tab',
21
+ code: 'Tab'
22
+ })));
23
+ break;
24
+
25
+ case 'outdent':
26
+ editorView.someProp('handleKeyDown', handleKeyDown => handleKeyDown(editorView, new KeyboardEvent('keydown', {
27
+ bubbles: true,
28
+ cancelable: true,
29
+ shiftKey: true,
30
+ key: 'Tab',
31
+ code: 'Tab'
32
+ })));
33
+ break;
34
+ }
35
+ }
@@ -1,9 +1,8 @@
1
1
  /** @jsx jsx */
2
2
  import React, { useMemo, useEffect, useRef, useCallback, useLayoutEffect } from 'react';
3
- import { jsx, css } from '@emotion/react'; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
4
-
5
- import { ItemGroup } from '@atlaskit/item';
6
- import { ICON_HEIGHT, itemTheme, ITEM_PADDING } from './TypeAheadListItem';
3
+ import { jsx, css } from '@emotion/react';
4
+ import { MenuGroup } from '@atlaskit/menu';
5
+ import { ICON_HEIGHT, ITEM_PADDING } from './TypeAheadListItem';
7
6
  import { VariableSizeList as List } from 'react-window';
8
7
  import { ResizeObserverProvider } from './hooks/use-resize-observer';
9
8
  import { useDynamicListHeightCalculation } from './hooks/use-dynamic-list-height-calculation';
@@ -100,12 +99,11 @@ const TypeAheadListComponent = /*#__PURE__*/React.memo(({
100
99
 
101
100
  const estimatedHeight = items.length * LIST_ITEM_ESTIMATED_HEIGHT;
102
101
  const height = Math.min(typeof renderedListHeight === 'number' ? renderedListHeight : estimatedHeight, fitHeight);
103
- return jsx(ItemGroup, {
102
+ return jsx(MenuGroup, {
104
103
  role: "listbox",
105
104
  "aria-live": "polite",
106
105
  "aria-label": intl.formatMessage(typeAheadListMessages.typeAheadResultLabel),
107
- "aria-relevant": "additions removals",
108
- theme: itemTheme
106
+ "aria-relevant": "additions removals"
109
107
  }, jsx(ResizeObserverProvider, null, jsx(UpdateListItemHeightContext.Provider, {
110
108
  value: setListItemHeight
111
109
  }, jsx(ListItemActionsContext.Provider, {
@@ -125,9 +123,12 @@ const TypeAheadListComponent = /*#__PURE__*/React.memo(({
125
123
  height: height,
126
124
  overscanCount: 3,
127
125
  css: css`
128
- // temporary solution before we migrated off dst/item
129
- & span[class^='ItemParts__Before'] {
130
- margin-right: 12px;
126
+ button {
127
+ padding: 12px 12px 11px;
128
+
129
+ span:last-child span:last-child {
130
+ white-space: normal;
131
+ }
131
132
  }
132
133
  `
133
134
  }, DynamicHeightListItem))))));
@@ -1,11 +1,10 @@
1
1
  /** @jsx jsx */
2
2
  import React, { useCallback, useMemo, useRef, useLayoutEffect } from 'react';
3
3
  import { css, jsx } from '@emotion/react';
4
- import { text as colorsText, N200, N20, DN70, N800, DN600, DN300 } from '@atlaskit/theme/colors';
4
+ import { DN600, N200, N800 } from '@atlaskit/theme/colors';
5
5
  import { themed } from '@atlaskit/theme/components';
6
- import { borderRadius } from '@atlaskit/theme/constants'; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
7
-
8
- import Item, { itemThemeNamespace } from '@atlaskit/item';
6
+ import { borderRadius } from '@atlaskit/theme/constants';
7
+ import { ButtonItem } from '@atlaskit/menu';
9
8
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
10
9
  import IconFallback from '../../quick-insert/assets/fallback';
11
10
  import { shortcutStyle } from '../../../ui/styles';
@@ -14,41 +13,6 @@ import { token } from '@atlaskit/tokens';
14
13
  export const ICON_HEIGHT = 40;
15
14
  export const ICON_WIDTH = 40;
16
15
  export const ITEM_PADDING = 12;
17
- export const itemTheme = {
18
- [itemThemeNamespace]: {
19
- padding: {
20
- default: {
21
- bottom: ITEM_PADDING,
22
- left: ITEM_PADDING,
23
- right: ITEM_PADDING,
24
- top: ITEM_PADDING
25
- }
26
- },
27
- beforeItemSpacing: {
28
- default: () => ITEM_PADDING
29
- },
30
- borderRadius: () => 0,
31
- hover: {
32
- // background: colors.transparent, transparent is not a thing
33
- text: colorsText,
34
- secondaryText: token('color.text.subtlest', N200)
35
- },
36
- selected: {
37
- background: themed({
38
- light: token('color.background.neutral.subtle.hovered', N20),
39
- dark: token('color.background.neutral.subtle.hovered', DN70)
40
- }),
41
- text: themed({
42
- light: token('color.text', N800),
43
- dark: token('color.text', DN600)
44
- }),
45
- secondaryText: themed({
46
- light: token('color.text.subtlest', N200),
47
- dark: token('color.text.subtlest', DN300)
48
- })
49
- }
50
- }
51
- };
52
16
  export const itemIcon = css`
53
17
  width: ${ICON_WIDTH}px;
54
18
  height: ${ICON_HEIGHT}px;
@@ -73,14 +37,20 @@ const itemBody = css`
73
37
  justify-content: space-between;
74
38
  line-height: 1.4;
75
39
  `;
76
- const itemText = css`
40
+
41
+ const itemText = theme => css`
77
42
  white-space: initial;
43
+ color: ${themed({
44
+ light: token('color.text', N800),
45
+ dark: token('color.text', DN600)
46
+ })(theme)};
78
47
  .item-description {
79
48
  font-size: ${relativeFontSizeToBase16(11.67)};
80
49
  color: ${token('color.text.subtlest', N200)};
81
50
  margin-top: 4px;
82
51
  }
83
52
  `;
53
+
84
54
  const itemAfter = css`
85
55
  flex: 0 0 auto;
86
56
  `;
@@ -162,26 +132,25 @@ export const TypeAheadListItem = ({
162
132
  return customItem;
163
133
  }
164
134
 
165
- return jsx(Item, {
135
+ return jsx("span", {
136
+ onMouseMove: onMouseMove
137
+ }, jsx(ButtonItem, {
166
138
  onClick: insertSelectedItem,
167
- onMouseMove: onMouseMove,
168
- elemBefore: elementIcon,
139
+ iconBefore: elementIcon,
169
140
  isSelected: isSelected,
170
141
  "aria-selected": isSelected,
171
142
  "aria-label": item.title,
172
143
  role: "option",
173
- theme: itemTheme
144
+ description: item.description
174
145
  }, jsx("div", {
175
146
  css: itemBody
176
147
  }, jsx("div", {
177
148
  css: itemText
178
149
  }, jsx("div", {
179
150
  className: "item-title"
180
- }, item.title), item.description && jsx("div", {
181
- className: "item-description"
182
- }, item.description)), jsx("div", {
151
+ }, item.title)), jsx("div", {
183
152
  css: itemAfter
184
153
  }, item.keyshortcut && jsx("div", {
185
154
  css: shortcutStyle
186
- }, item.keyshortcut))));
155
+ }, item.keyshortcut)))));
187
156
  };
@@ -1,10 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
- import React, { useState, useCallback } from 'react';
4
+ import { useState, useCallback } from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
7
- import Item, { itemThemeNamespace } from '@atlaskit/item'; // AFP-2532 TODO: Fix automatic suppressions below
6
+ import { Section, ButtonItem } from '@atlaskit/menu'; // AFP-2532 TODO: Fix automatic suppressions below
8
7
  // eslint-disable-next-line @atlassian/tangerine/import/entry-points
9
8
 
10
9
  import { borderRadius, gridSize } from '@atlaskit/theme';
@@ -94,26 +93,19 @@ const InsertMenu = ({
94
93
  const ViewMore = ({
95
94
  item
96
95
  }) => {
97
- const onKeyPress = useCallback(e => {
98
- const SPACE_KEY = 32;
99
- const ENTER_KEY = 13;
100
-
101
- if (e.which === ENTER_KEY || e.which === SPACE_KEY) {
102
- // @ts-ignore We manually transformed "view more" to a quickInsert item
103
- // action would always toggle the ModalElementBrowser
104
- item.action();
105
- }
106
- }, [item]);
107
- return jsx(Item, {
96
+ return jsx(Section, {
97
+ hasSeparator: true
98
+ }, jsx(ButtonItem, {
108
99
  onClick: item.action,
109
- elemBefore: jsx("div", {
100
+ iconBefore: jsx("div", {
110
101
  css: itemBefore
111
102
  }, item.icon()),
112
103
  "aria-describedby": item.title,
113
104
  "data-testid": "view-more-elements-item",
114
- onKeyPress: onKeyPress,
115
- theme: viewMoreItemTheme
116
- }, item.title);
105
+ css: css`
106
+ padding: 0px 12px;
107
+ `
108
+ }, item.title));
117
109
  };
118
110
 
119
111
  const getSvgIconForItem = ({
@@ -173,18 +165,6 @@ const itemBefore = css`
173
165
  align-items: center;
174
166
  margin-right: ${gridSize() / 2}px;
175
167
  `;
176
- const PADDING_LEFT = 14;
177
- const HEIGHT = 40;
178
- const viewMoreItemTheme = {
179
- [itemThemeNamespace]: {
180
- padding: {
181
- default: {
182
- left: PADDING_LEFT
183
- }
184
- },
185
- height: HEIGHT
186
- }
187
- };
188
168
  const flexWrapperStyles = css`
189
169
  display: flex;
190
170
  flex: 1;
@@ -3,12 +3,10 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  /** @jsx jsx */
4
4
  import React, { Fragment, memo, useCallback, useEffect, useMemo } from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
- import memoizeOne from 'memoize-one';
7
6
  import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
8
7
  import { Collection } from 'react-virtualized/dist/commonjs/Collection';
9
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
10
- import Item from '@atlaskit/item';
11
- import { B100, N20, N200 } from '@atlaskit/theme/colors';
8
+ import { ButtonItem } from '@atlaskit/menu';
9
+ import { B100, N200 } from '@atlaskit/theme/colors';
12
10
  import Tooltip from '@atlaskit/tooltip';
13
11
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
14
12
  import { token } from '@atlaskit/tokens';
@@ -17,7 +15,7 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../..
17
15
  import IconFallback from '../../../../plugins/quick-insert/assets/fallback';
18
16
  import { itemIcon } from '../../../../plugins/type-ahead/ui/TypeAheadListItem';
19
17
  import { shortcutStyle } from '../../../styles';
20
- import { ELEMENT_ITEM_HEIGHT, ELEMENT_LIST_PADDING, GRID_SIZE, SCROLLBAR_THUMB_COLOR, SCROLLBAR_TRACK_COLOR, SCROLLBAR_WIDTH } from '../../constants';
18
+ import { ELEMENT_LIST_PADDING, SCROLLBAR_THUMB_COLOR, SCROLLBAR_TRACK_COLOR, SCROLLBAR_WIDTH } from '../../constants';
21
19
  import useContainerWidth from '../../hooks/use-container-width';
22
20
  import useFocus from '../../hooks/use-focus';
23
21
  import { Modes } from '../../types';
@@ -114,44 +112,9 @@ function ElementList({
114
112
  })))));
115
113
  }
116
114
 
117
- const getStyles = memoizeOne(mode => {
118
- return { ...(mode === Modes.full && {
119
- '-ms-flex': 'auto',
120
- position: 'relative',
121
- boxSizing: 'border-box'
122
- }),
123
- height: {
124
- default: ELEMENT_ITEM_HEIGHT
125
- },
126
- padding: {
127
- default: {
128
- top: GRID_SIZE * 1.5,
129
- right: GRID_SIZE * 1.5,
130
- bottom: GRID_SIZE * 1.5,
131
- left: GRID_SIZE * 1.5
132
- }
133
- },
134
- borderRadius: GRID_SIZE / 2,
135
- // TODO: apply a different background for when a selected item is hovered.
136
- // Not possible due to current implementation of @atlaskit/item component.
137
- selected: {
138
- background: token('color.background.selected', N20)
139
- },
140
- hover: {
141
- background: token('color.background.neutral.subtle.hovered', 'rgb(244, 245, 247)')
142
- },
143
- active: {
144
- background: token('color.background.neutral.subtle.pressed', 'rgb(244, 245, 247)')
145
- },
146
- beforeItemSpacing: {
147
- default: GRID_SIZE * 1.5
148
- }
149
- };
150
- });
151
115
  const MemoizedElementItem = /*#__PURE__*/memo(ElementItem);
152
116
  MemoizedElementItem.displayName = 'MemoizedElementItem';
153
-
154
- function ElementItem({
117
+ export function ElementItem({
155
118
  inlineMode,
156
119
  selected,
157
120
  item,
@@ -161,9 +124,6 @@ function ElementItem({
161
124
  setFocusedItemIndex
162
125
  }) {
163
126
  const ref = useFocus(focus);
164
- const theme = useMemo(() => ({
165
- '@atlaskit-shared-theme/item': getStyles(inlineMode ? 'inline' : 'full')
166
- }), [inlineMode]);
167
127
  /**
168
128
  * Note: props.onSelectItem(item) is not called here as the StatelessElementBrowser's
169
129
  * useEffect would trigger it on selectedItemIndex change. (Line 106-110)
@@ -175,33 +135,29 @@ function ElementItem({
175
135
  e.stopPropagation();
176
136
  setFocusedItemIndex(index);
177
137
 
178
- if (inlineMode) {
179
- onInsertItem(item);
180
- }
181
- }, [index, inlineMode, item, onInsertItem, setFocusedItemIndex]);
182
- const onDoubleClick = useCallback(e => {
183
- if (inlineMode) {
184
- return;
185
- }
138
+ switch (e.nativeEvent.detail) {
139
+ case 0:
140
+ onInsertItem(item);
141
+ break;
186
142
 
187
- e.preventDefault();
188
- e.stopPropagation();
189
- setFocusedItemIndex(index);
190
- onInsertItem(item);
191
- }, [inlineMode, setFocusedItemIndex, index, onInsertItem, item]); // After tabbing we wanna select the item on enter/space key press from item level,
192
- // preventing the default top level component behavior.
143
+ case 1:
144
+ if (inlineMode) {
145
+ onInsertItem(item);
146
+ }
147
+
148
+ break;
193
149
 
194
- const onKeyPress = useCallback(e => {
195
- const SPACE_KEY = 32;
196
- const ENTER_KEY = 13;
150
+ case 2:
151
+ if (!inlineMode) {
152
+ onInsertItem(item);
153
+ }
197
154
 
198
- if (e.which === ENTER_KEY || e.which === SPACE_KEY) {
199
- e.preventDefault();
200
- e.stopPropagation();
201
- setFocusedItemIndex(index);
202
- onInsertItem(item);
155
+ break;
156
+
157
+ default:
158
+ return;
203
159
  }
204
- }, [index, item, onInsertItem, setFocusedItemIndex]);
160
+ }, [index, inlineMode, item, onInsertItem, setFocusedItemIndex]);
205
161
  const {
206
162
  icon,
207
163
  title,
@@ -211,35 +167,28 @@ function ElementItem({
211
167
  return jsx(Tooltip, {
212
168
  content: description,
213
169
  testId: `element-item-tooltip-${index}`
214
- }, jsx(Item, {
170
+ }, jsx(ButtonItem, {
215
171
  onClick: onClick,
216
- onDoubleClick: onDoubleClick,
217
- elemBefore: jsx(ElementBefore, {
172
+ iconBefore: jsx(ElementBefore, {
218
173
  icon: icon,
219
174
  title: title
220
175
  }),
221
176
  isSelected: selected,
222
177
  "aria-describedby": title,
223
- innerRef: ref,
224
- onKeyPress: onKeyPress,
225
- "data-testid": `element-item-${index}`,
226
- tabIndex: 0,
227
- style: inlineMode ? null : itemStyleOverrides,
228
- theme: theme
178
+ ref: ref,
179
+ testId: `element-item-${index}`
229
180
  }, jsx(ItemContent, {
181
+ style: inlineMode ? null : itemStyleOverrides,
182
+ tabIndex: 0,
230
183
  title: title,
231
184
  description: description,
232
185
  keyshortcut: keyshortcut
233
186
  })));
234
187
  }
235
188
  /**
236
- * Some properties (specified in 'BaseItem' packages/design-system/item/src/styled/Item.js) cannot be changed with
237
- * ThemeProvider as they are of higher specificity.
238
- *
239
189
  * Inline mode should use the existing Align-items:center value.
240
190
  */
241
191
 
242
-
243
192
  const itemStyleOverrides = {
244
193
  alignItems: 'flex-start'
245
194
  };
@@ -308,21 +257,13 @@ const elementItemsWrapper = css`
308
257
  padding-bottom: 4px;
309
258
  }
310
259
  }
311
-
312
- // temporary solution before we migrated off dst/item
313
- & span[class^='ItemParts__Before'] {
314
- margin-right: 12px;
315
- }
316
260
  `;
317
261
  const elementItemWrapper = css`
318
- /**
319
- * Since we are using "Item" component's content itself for description,
320
- * the height of description overflows the parent container padding/margin.
321
- * manually setting it to take 100% of parent.
322
- */
323
- span {
324
- span:nth-of-type(2) {
325
- max-height: 100%;
262
+ div {
263
+ button {
264
+ height: 75px;
265
+ align-items: flex-start;
266
+ padding: 12px 12px 11px;
326
267
  }
327
268
  }
328
269
  `;
@@ -1,3 +1,4 @@
1
+ import * as clipboard from 'clipboard-polyfill';
1
2
  export function checkClipboardTypes(type, item) {
2
3
  const isDOMStringList = t => !t.indexOf && !!t.contains;
3
4
 
@@ -35,4 +36,29 @@ export const copyToClipboard = async textToCopy => {
35
36
  } else {
36
37
  throw new Error('Clipboard api is not supported');
37
38
  }
39
+ };
40
+ export const copyHTMLToClipboard = async htmlToCopy => {
41
+ // @ts-ignore
42
+ if (isClipboardApiSupported() && typeof ClipboardItem !== 'undefined') {
43
+ try {
44
+ const blobInput = new Blob([htmlToCopy], {
45
+ type: 'text/html'
46
+ }); // @ts-ignore
47
+
48
+ const data = [new ClipboardItem({
49
+ 'text/html': blobInput
50
+ })]; // @ts-ignore
51
+
52
+ navigator.clipboard.write(data);
53
+ } catch (error) {
54
+ throw new Error('Clipboard api is not supported');
55
+ }
56
+ } else {
57
+ // At the time of development, Firefox doesn't support ClipboardItem API
58
+ // Hence of use of this polyfill
59
+ const Clipboard = clipboard;
60
+ const dt = new Clipboard.DT();
61
+ dt.setData('text/html', htmlToCopy);
62
+ Clipboard.write(dt);
63
+ }
38
64
  };
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "167.0.3";
2
+ export const version = "169.1.0";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "167.0.3",
3
+ "version": "169.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,8 +1,8 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
5
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  import { Node } from 'prosemirror-model';
7
7
  import { TextSelection, NodeSelection } from 'prosemirror-state';
8
8
  import { findParentNode } from 'prosemirror-utils';
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
 
11
11
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
12
 
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
5
5
 
6
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
7
 
8
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tablesPlugin, tasksAndDecisionsPlugin, textColorPlugin, cardPlugin, gridPlugin, statusPlugin, alignmentPlugin, indentationPlugin, analyticsPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, contextPanelPlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
8
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tablesPlugin, tasksAndDecisionsPlugin, textColorPlugin, cardPlugin, gridPlugin, statusPlugin, alignmentPlugin, indentationPlugin, analyticsPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, contextPanelPlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin } from '../plugins';
9
9
  import { isFullPage as fullPageCheck } from '../utils/is-full-page';
10
10
  import { GUTTER_SIZE_MOBILE_IN_PX } from '../plugins/base/pm-plugins/scroll-gutter';
11
11
  import { createFeatureFlagsFromProps } from '../plugins/feature-flags-context/feature-flags-from-props';
@@ -363,6 +363,9 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
363
363
  } // UI only plugins
364
364
 
365
365
 
366
+ preset.add([toolbarListsIndentationPlugin, {
367
+ showIndentationButtons: !!featureFlags.indentationButtonsInTheToolbar
368
+ }]);
366
369
  preset.add([insertBlockPlugin, {
367
370
  allowTables: !!props.allowTables,
368
371
  allowExpand: isExpandInsertionEnabled(props),
@@ -415,6 +418,10 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
415
418
  }]);
416
419
  }
417
420
 
421
+ if (featureFlags.floatingToolbarCopyButton) {
422
+ preset.add(copyButtonPlugin);
423
+ }
424
+
418
425
  var excludes = new Set();
419
426
 
420
427
  if (!isCodeBlockAllowed({
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -15,6 +14,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
15
14
 
16
15
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
16
 
17
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
18
+
18
19
  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); }; }
19
20
 
20
21
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -14,4 +14,6 @@ export var TOOLBAR_ACTION_SUBJECT_ID;
14
14
  TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_ITALIC"] = "italic";
15
15
  TOOLBAR_ACTION_SUBJECT_ID["UNDO"] = "undo";
16
16
  TOOLBAR_ACTION_SUBJECT_ID["REDO"] = "redo";
17
+ TOOLBAR_ACTION_SUBJECT_ID["INDENT"] = "indent";
18
+ TOOLBAR_ACTION_SUBJECT_ID["OUTDENT"] = "outdent";
17
19
  })(TOOLBAR_ACTION_SUBJECT_ID || (TOOLBAR_ACTION_SUBJECT_ID = {}));
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import { RESOLVE_METHOD } from './../../analytics/types/inline-comment-events';
5
5
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
6
  import { AnnotationTypes } from '@atlaskit/adf-schema';
@@ -25,6 +25,13 @@ var BreakoutView = /*#__PURE__*/function () {
25
25
  _classCallCheck(this, BreakoutView);
26
26
 
27
27
  _defineProperty(this, "updateWidth", function (widthState) {
28
+ // we skip updating the width of breakout nodes if the editorView dom
29
+ // element was hidden (to avoid breakout width and button thrashing
30
+ // when an editor is hidden, re-rendered and unhidden).
31
+ if (widthState.width === 0) {
32
+ return;
33
+ }
34
+
28
35
  var width = calcBreakoutWidth(_this.node.attrs.mode, widthState.width);
29
36
  var newStyle = "width: ".concat(width, "; ");
30
37
  var lineLength = widthState.lineLength;