@atlaskit/editor-core 166.0.4 → 167.0.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 (489) hide show
  1. package/.eslintrc.js +46 -1
  2. package/CHANGELOG.md +87 -0
  3. package/dist/cjs/actions/index.js +26 -2
  4. package/dist/cjs/create-editor/ReactEditorView.js +2 -0
  5. package/dist/cjs/create-editor/create-plugins-list.js +1 -2
  6. package/dist/cjs/editor.js +5 -2
  7. package/dist/cjs/keymaps/index.js +5 -1
  8. package/dist/cjs/labs/next/ContentComponents.js +8 -4
  9. package/dist/cjs/labs/next/full-page.js +14 -8
  10. package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +7 -3
  11. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +3 -1
  12. package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +3 -1
  13. package/dist/cjs/plugins/analytics/types/enums.js +3 -0
  14. package/dist/cjs/plugins/base/index.js +8 -17
  15. package/dist/cjs/plugins/base/pm-plugins/better-type-history.js +3 -12
  16. package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +71 -16
  17. package/dist/cjs/plugins/block-type/commands/block-type.js +32 -22
  18. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +4 -2
  19. package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -11
  20. package/dist/cjs/plugins/card/styles.js +1 -1
  21. package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
  22. package/dist/cjs/plugins/code-block/actions.js +36 -2
  23. package/dist/cjs/plugins/code-block/nodeviews/code-block.js +70 -1
  24. package/dist/cjs/plugins/code-block/pm-plugins/actions.js +2 -1
  25. package/dist/cjs/plugins/code-block/pm-plugins/main.js +46 -8
  26. package/dist/cjs/plugins/code-block/styles.js +28 -24
  27. package/dist/cjs/plugins/collab-edit/styles.js +4 -2
  28. package/dist/cjs/plugins/collab-edit/ui/styles.js +4 -2
  29. package/dist/cjs/plugins/collab-edit/utils.js +1 -0
  30. package/dist/cjs/plugins/date/ui/DatePicker/index.js +3 -1
  31. package/dist/cjs/plugins/expand/ui/styles.js +16 -14
  32. package/dist/cjs/plugins/extension/commands.js +3 -2
  33. package/dist/cjs/plugins/extension/context-panel.js +21 -7
  34. package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +6 -4
  35. package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +3 -1
  36. package/dist/cjs/plugins/extension/ui/Extension/styles.js +7 -5
  37. package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -2
  38. package/dist/cjs/plugins/fake-text-cursor/styles.js +3 -1
  39. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
  40. package/dist/cjs/plugins/find-replace/styles.js +2 -6
  41. package/dist/cjs/plugins/find-replace/ui/styles.js +4 -2
  42. package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +3 -1
  43. package/dist/cjs/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +3 -1
  44. package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +3 -1
  45. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +6 -4
  46. package/dist/cjs/plugins/floating-toolbar/ui/styles.js +12 -10
  47. package/dist/cjs/plugins/grid/styles.js +3 -1
  48. package/dist/cjs/plugins/help-dialog/ui/styles.js +9 -7
  49. package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +23 -1
  50. package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +10 -1
  51. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -3
  52. package/dist/cjs/plugins/hyperlink/utils.js +53 -2
  53. package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +4 -2
  54. package/dist/cjs/plugins/layout/styles.js +1 -1
  55. package/dist/cjs/plugins/media/commands/helpers.js +10 -9
  56. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +23 -4
  57. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +6 -0
  58. package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -3
  59. package/dist/cjs/plugins/media/pm-plugins/main.js +1 -0
  60. package/dist/cjs/plugins/media/styles.js +1 -1
  61. package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +3 -1
  62. package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +4 -2
  63. package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +3 -1
  64. package/dist/cjs/plugins/mentions/styles.js +3 -1
  65. package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +3 -1
  66. package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +4 -2
  67. package/dist/cjs/plugins/panel/index.js +1 -0
  68. package/dist/cjs/plugins/panel/nodeviews/panel.js +4 -1
  69. package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +21 -3
  70. package/dist/cjs/plugins/paste/handlers.js +23 -0
  71. package/dist/cjs/plugins/paste/linkify-md-plugin.js +7 -0
  72. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +9 -1
  73. package/dist/cjs/plugins/paste/pm-plugins/main.js +27 -1
  74. package/dist/cjs/plugins/placeholder/index.js +15 -3
  75. package/dist/cjs/plugins/placeholder/styles.js +3 -1
  76. package/dist/cjs/plugins/placeholder-text/styles.js +3 -1
  77. package/dist/cjs/plugins/selection/gap-cursor/styles.js +1 -1
  78. package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
  79. package/dist/cjs/plugins/status/ui/statusPicker.js +3 -3
  80. package/dist/cjs/plugins/table/index.js +14 -4
  81. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +6 -6
  82. package/dist/cjs/plugins/table/nodeviews/table.js +9 -4
  83. package/dist/cjs/plugins/table/pm-plugins/main.js +1 -4
  84. package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +118 -0
  85. package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
  86. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
  87. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
  88. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
  89. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
  90. package/dist/cjs/plugins/table/transforms/column-width.js +1 -2
  91. package/dist/cjs/plugins/table/transforms/fix-tables.js +1 -3
  92. package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +4 -1
  93. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +3 -1
  94. package/dist/cjs/plugins/table/ui/common-styles.js +4 -2
  95. package/dist/cjs/plugins/table/ui/consts.js +14 -11
  96. package/dist/cjs/plugins/table/ui/ui-styles.js +17 -10
  97. package/dist/cjs/plugins/table/utils/decoration.js +3 -4
  98. package/dist/cjs/plugins/table/utils/paste.js +9 -9
  99. package/dist/cjs/plugins/type-ahead/index.js +4 -3
  100. package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +3 -1
  101. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +4 -4
  102. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +11 -9
  103. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +73 -3
  104. package/dist/cjs/plugins/unsupported-content/styles.js +1 -1
  105. package/dist/cjs/ui/Addon/Dropdown/styles.js +3 -1
  106. package/dist/cjs/ui/Addon/DropdownItem/styles.js +3 -1
  107. package/dist/cjs/ui/Appearance/Chromeless.js +2 -1
  108. package/dist/cjs/ui/Appearance/Comment/Comment.js +10 -3
  109. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -2
  110. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +5 -2
  111. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  112. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
  113. package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +6 -3
  114. package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -1
  115. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +21 -14
  116. package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
  117. package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +3 -1
  118. package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +3 -1
  119. package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +3 -1
  120. package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +3 -1
  121. package/dist/cjs/ui/ConfigPanel/Header.js +4 -2
  122. package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +4 -8
  123. package/dist/cjs/ui/ContentStyles/index.js +4 -2
  124. package/dist/cjs/ui/ContextPanel/index.js +3 -1
  125. package/dist/cjs/ui/DropdownMenu/index.js +5 -0
  126. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +6 -4
  127. package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +4 -2
  128. package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +4 -2
  129. package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
  130. package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +3 -1
  131. package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +3 -1
  132. package/dist/cjs/ui/ElementBrowser/constants.js +3 -1
  133. package/dist/cjs/ui/FloatingToolbar/styles.js +2 -2
  134. package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +5 -3
  135. package/dist/cjs/ui/PanelTextInput/styles.js +3 -1
  136. package/dist/cjs/ui/PluginSlot/index.js +7 -4
  137. package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
  138. package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -2
  139. package/dist/cjs/ui/ToolbarFeedback/styles.js +5 -3
  140. package/dist/cjs/ui/WithFlash/index.js +4 -2
  141. package/dist/cjs/ui/styles.js +6 -4
  142. package/dist/cjs/utils/document.js +62 -6
  143. package/dist/cjs/utils/filter/privacy-filter.js +2 -2
  144. package/dist/cjs/utils/step.js +17 -1
  145. package/dist/cjs/version-wrapper.js +1 -1
  146. package/dist/cjs/version.json +1 -1
  147. package/dist/es2019/actions/index.js +25 -1
  148. package/dist/es2019/create-editor/ReactEditorView.js +2 -0
  149. package/dist/es2019/create-editor/create-plugins-list.js +1 -2
  150. package/dist/es2019/editor.js +5 -2
  151. package/dist/es2019/keymaps/index.js +5 -1
  152. package/dist/es2019/labs/next/ContentComponents.js +7 -2
  153. package/dist/es2019/labs/next/full-page.js +11 -8
  154. package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +4 -3
  155. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +16 -4
  156. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
  157. package/dist/es2019/plugins/analytics/types/enums.js +3 -0
  158. package/dist/es2019/plugins/base/index.js +6 -15
  159. package/dist/es2019/plugins/base/pm-plugins/better-type-history.js +1 -11
  160. package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
  161. package/dist/es2019/plugins/block-type/commands/block-type.js +25 -16
  162. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
  163. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +6 -10
  164. package/dist/es2019/plugins/card/styles.js +1 -1
  165. package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
  166. package/dist/es2019/plugins/code-block/actions.js +32 -0
  167. package/dist/es2019/plugins/code-block/nodeviews/code-block.js +61 -1
  168. package/dist/es2019/plugins/code-block/pm-plugins/actions.js +2 -1
  169. package/dist/es2019/plugins/code-block/pm-plugins/main.js +37 -3
  170. package/dist/es2019/plugins/code-block/styles.js +30 -27
  171. package/dist/es2019/plugins/collab-edit/styles.js +3 -2
  172. package/dist/es2019/plugins/collab-edit/ui/styles.js +4 -3
  173. package/dist/es2019/plugins/collab-edit/utils.js +1 -0
  174. package/dist/es2019/plugins/date/ui/DatePicker/index.js +3 -2
  175. package/dist/es2019/plugins/expand/ui/styles.js +15 -14
  176. package/dist/es2019/plugins/extension/commands.js +3 -2
  177. package/dist/es2019/plugins/extension/context-panel.js +11 -3
  178. package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +5 -4
  179. package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
  180. package/dist/es2019/plugins/extension/ui/Extension/styles.js +7 -6
  181. package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -4
  182. package/dist/es2019/plugins/fake-text-cursor/styles.js +3 -2
  183. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
  184. package/dist/es2019/plugins/find-replace/styles.js +4 -4
  185. package/dist/es2019/plugins/find-replace/ui/styles.js +3 -2
  186. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
  187. package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
  188. package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +2 -1
  189. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +4 -4
  190. package/dist/es2019/plugins/floating-toolbar/ui/styles.js +11 -10
  191. package/dist/es2019/plugins/grid/styles.js +4 -2
  192. package/dist/es2019/plugins/help-dialog/ui/styles.js +10 -9
  193. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
  194. package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +9 -1
  195. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -4
  196. package/dist/es2019/plugins/hyperlink/utils.js +43 -2
  197. package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
  198. package/dist/es2019/plugins/layout/styles.js +10 -7
  199. package/dist/es2019/plugins/media/commands/helpers.js +6 -8
  200. package/dist/es2019/plugins/media/nodeviews/mediaInline.js +21 -5
  201. package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
  202. package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -4
  203. package/dist/es2019/plugins/media/pm-plugins/main.js +2 -0
  204. package/dist/es2019/plugins/media/styles.js +3 -3
  205. package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
  206. package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +4 -3
  207. package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +2 -1
  208. package/dist/es2019/plugins/mentions/styles.js +5 -4
  209. package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +2 -1
  210. package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +3 -2
  211. package/dist/es2019/plugins/panel/index.js +1 -0
  212. package/dist/es2019/plugins/panel/nodeviews/panel.js +4 -1
  213. package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +22 -4
  214. package/dist/es2019/plugins/paste/handlers.js +23 -0
  215. package/dist/es2019/plugins/paste/linkify-md-plugin.js +7 -1
  216. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +4 -1
  217. package/dist/es2019/plugins/paste/pm-plugins/main.js +27 -2
  218. package/dist/es2019/plugins/placeholder/index.js +12 -1
  219. package/dist/es2019/plugins/placeholder/styles.js +3 -1
  220. package/dist/es2019/plugins/placeholder-text/styles.js +5 -4
  221. package/dist/es2019/plugins/selection/gap-cursor/styles.js +9 -9
  222. package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
  223. package/dist/es2019/plugins/status/ui/statusPicker.js +3 -3
  224. package/dist/es2019/plugins/table/index.js +13 -4
  225. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +6 -6
  226. package/dist/es2019/plugins/table/nodeviews/table.js +6 -2
  227. package/dist/es2019/plugins/table/pm-plugins/main.js +1 -4
  228. package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +106 -0
  229. package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
  230. package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -4
  231. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +3 -7
  232. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
  233. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
  234. package/dist/es2019/plugins/table/transforms/column-width.js +1 -2
  235. package/dist/es2019/plugins/table/transforms/fix-tables.js +1 -3
  236. package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +4 -2
  237. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +4 -3
  238. package/dist/es2019/plugins/table/ui/common-styles.js +29 -27
  239. package/dist/es2019/plugins/table/ui/consts.js +15 -12
  240. package/dist/es2019/plugins/table/ui/ui-styles.js +28 -23
  241. package/dist/es2019/plugins/table/utils/decoration.js +1 -4
  242. package/dist/es2019/plugins/table/utils/paste.js +9 -9
  243. package/dist/es2019/plugins/type-ahead/index.js +4 -3
  244. package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +2 -1
  245. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +4 -4
  246. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
  247. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +64 -6
  248. package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
  249. package/dist/es2019/ui/Addon/Dropdown/styles.js +3 -2
  250. package/dist/es2019/ui/Addon/DropdownItem/styles.js +3 -2
  251. package/dist/es2019/ui/Appearance/Chromeless.js +2 -1
  252. package/dist/es2019/ui/Appearance/Comment/Comment.js +9 -4
  253. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +4 -2
  254. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +6 -2
  255. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  256. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
  257. package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +7 -3
  258. package/dist/es2019/ui/ChromeCollapsed/styles.js +4 -3
  259. package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +10 -2
  260. package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
  261. package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
  262. package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
  263. package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +2 -1
  264. package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +2 -1
  265. package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
  266. package/dist/es2019/ui/ConfigPanel/Header.js +3 -2
  267. package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +4 -3
  268. package/dist/es2019/ui/ContentStyles/index.js +3 -2
  269. package/dist/es2019/ui/ContextPanel/index.js +2 -1
  270. package/dist/es2019/ui/DropdownMenu/index.js +5 -0
  271. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +6 -3
  272. package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +3 -2
  273. package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +3 -2
  274. package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
  275. package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
  276. package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
  277. package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +2 -1
  278. package/dist/es2019/ui/ElementBrowser/constants.js +3 -1
  279. package/dist/es2019/ui/FloatingToolbar/styles.js +4 -4
  280. package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +4 -3
  281. package/dist/es2019/ui/PanelTextInput/styles.js +5 -5
  282. package/dist/es2019/ui/PluginSlot/index.js +7 -4
  283. package/dist/es2019/ui/Toolbar/ToolbarInner.js +2 -1
  284. package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
  285. package/dist/es2019/ui/ToolbarFeedback/styles.js +5 -4
  286. package/dist/es2019/ui/WithFlash/index.js +4 -3
  287. package/dist/es2019/ui/styles.js +10 -9
  288. package/dist/es2019/utils/document.js +58 -5
  289. package/dist/es2019/utils/filter/privacy-filter.js +1 -1
  290. package/dist/es2019/utils/step.js +12 -1
  291. package/dist/es2019/version-wrapper.js +1 -1
  292. package/dist/es2019/version.json +1 -1
  293. package/dist/esm/actions/index.js +26 -1
  294. package/dist/esm/create-editor/ReactEditorView.js +2 -0
  295. package/dist/esm/create-editor/create-plugins-list.js +1 -2
  296. package/dist/esm/editor.js +5 -2
  297. package/dist/esm/keymaps/index.js +5 -1
  298. package/dist/esm/labs/next/ContentComponents.js +8 -4
  299. package/dist/esm/labs/next/full-page.js +11 -8
  300. package/dist/esm/nodeviews/getInlineNodeViewProducer.js +4 -3
  301. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +3 -2
  302. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
  303. package/dist/esm/plugins/analytics/types/enums.js +3 -0
  304. package/dist/esm/plugins/base/index.js +8 -17
  305. package/dist/esm/plugins/base/pm-plugins/better-type-history.js +1 -11
  306. package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
  307. package/dist/esm/plugins/block-type/commands/block-type.js +31 -22
  308. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
  309. package/dist/esm/plugins/breakout/ui/LayoutButton.js +3 -5
  310. package/dist/esm/plugins/card/styles.js +1 -1
  311. package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
  312. package/dist/esm/plugins/code-block/actions.js +28 -0
  313. package/dist/esm/plugins/code-block/nodeviews/code-block.js +67 -1
  314. package/dist/esm/plugins/code-block/pm-plugins/actions.js +2 -1
  315. package/dist/esm/plugins/code-block/pm-plugins/main.js +39 -3
  316. package/dist/esm/plugins/code-block/styles.js +27 -23
  317. package/dist/esm/plugins/collab-edit/styles.js +3 -2
  318. package/dist/esm/plugins/collab-edit/ui/styles.js +3 -2
  319. package/dist/esm/plugins/collab-edit/utils.js +2 -0
  320. package/dist/esm/plugins/date/ui/DatePicker/index.js +2 -1
  321. package/dist/esm/plugins/expand/ui/styles.js +15 -14
  322. package/dist/esm/plugins/extension/commands.js +3 -2
  323. package/dist/esm/plugins/extension/context-panel.js +21 -7
  324. package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -4
  325. package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
  326. package/dist/esm/plugins/extension/ui/Extension/styles.js +6 -5
  327. package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +3 -2
  328. package/dist/esm/plugins/fake-text-cursor/styles.js +2 -1
  329. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
  330. package/dist/esm/plugins/find-replace/styles.js +3 -3
  331. package/dist/esm/plugins/find-replace/ui/styles.js +3 -2
  332. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
  333. package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
  334. package/dist/esm/plugins/floating-toolbar/ui/Separator.js +2 -1
  335. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +5 -4
  336. package/dist/esm/plugins/floating-toolbar/ui/styles.js +11 -10
  337. package/dist/esm/plugins/grid/styles.js +2 -1
  338. package/dist/esm/plugins/help-dialog/ui/styles.js +8 -7
  339. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
  340. package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +9 -1
  341. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +4 -3
  342. package/dist/esm/plugins/hyperlink/utils.js +44 -2
  343. package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +3 -2
  344. package/dist/esm/plugins/layout/styles.js +1 -1
  345. package/dist/esm/plugins/media/commands/helpers.js +6 -8
  346. package/dist/esm/plugins/media/nodeviews/mediaInline.js +22 -4
  347. package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
  348. package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +4 -3
  349. package/dist/esm/plugins/media/pm-plugins/main.js +2 -0
  350. package/dist/esm/plugins/media/styles.js +1 -1
  351. package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
  352. package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +3 -2
  353. package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +2 -1
  354. package/dist/esm/plugins/mentions/styles.js +2 -1
  355. package/dist/esm/plugins/mentions/ui/InviteItem/index.js +2 -1
  356. package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +3 -2
  357. package/dist/esm/plugins/panel/index.js +1 -0
  358. package/dist/esm/plugins/panel/nodeviews/panel.js +4 -1
  359. package/dist/esm/plugins/panel/pm-plugins/keymaps.js +22 -4
  360. package/dist/esm/plugins/paste/handlers.js +21 -0
  361. package/dist/esm/plugins/paste/linkify-md-plugin.js +7 -1
  362. package/dist/esm/plugins/paste/pm-plugins/analytics.js +6 -1
  363. package/dist/esm/plugins/paste/pm-plugins/main.js +27 -2
  364. package/dist/esm/plugins/placeholder/index.js +12 -1
  365. package/dist/esm/plugins/placeholder/styles.js +2 -1
  366. package/dist/esm/plugins/placeholder-text/styles.js +2 -1
  367. package/dist/esm/plugins/selection/gap-cursor/styles.js +1 -1
  368. package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
  369. package/dist/esm/plugins/status/ui/statusPicker.js +2 -2
  370. package/dist/esm/plugins/table/index.js +13 -4
  371. package/dist/esm/plugins/table/nodeviews/TableComponent.js +6 -6
  372. package/dist/esm/plugins/table/nodeviews/table.js +6 -2
  373. package/dist/esm/plugins/table/pm-plugins/main.js +1 -4
  374. package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +102 -0
  375. package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
  376. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
  377. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
  378. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
  379. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
  380. package/dist/esm/plugins/table/transforms/column-width.js +1 -2
  381. package/dist/esm/plugins/table/transforms/fix-tables.js +1 -3
  382. package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +3 -1
  383. package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +2 -1
  384. package/dist/esm/plugins/table/ui/common-styles.js +4 -2
  385. package/dist/esm/plugins/table/ui/consts.js +15 -12
  386. package/dist/esm/plugins/table/ui/ui-styles.js +15 -10
  387. package/dist/esm/plugins/table/utils/decoration.js +3 -4
  388. package/dist/esm/plugins/table/utils/paste.js +9 -9
  389. package/dist/esm/plugins/type-ahead/index.js +4 -3
  390. package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +2 -1
  391. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +4 -4
  392. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
  393. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +71 -5
  394. package/dist/esm/plugins/unsupported-content/styles.js +1 -1
  395. package/dist/esm/ui/Addon/Dropdown/styles.js +2 -1
  396. package/dist/esm/ui/Addon/DropdownItem/styles.js +2 -1
  397. package/dist/esm/ui/Appearance/Chromeless.js +2 -1
  398. package/dist/esm/ui/Appearance/Comment/Comment.js +10 -3
  399. package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -2
  400. package/dist/esm/ui/Appearance/FullPage/FullPage.js +6 -2
  401. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  402. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
  403. package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +5 -3
  404. package/dist/esm/ui/ChromeCollapsed/styles.js +1 -1
  405. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +21 -14
  406. package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
  407. package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
  408. package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
  409. package/dist/esm/ui/ConfigPanel/Fields/Expand.js +2 -1
  410. package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +2 -1
  411. package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
  412. package/dist/esm/ui/ConfigPanel/Header.js +3 -2
  413. package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +3 -2
  414. package/dist/esm/ui/ContentStyles/index.js +3 -2
  415. package/dist/esm/ui/ContextPanel/index.js +2 -1
  416. package/dist/esm/ui/DropdownMenu/index.js +5 -0
  417. package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -4
  418. package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +3 -2
  419. package/dist/esm/ui/ElementBrowser/components/CategoryList.js +3 -2
  420. package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +11 -5
  421. package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
  422. package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
  423. package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +2 -1
  424. package/dist/esm/ui/ElementBrowser/constants.js +3 -1
  425. package/dist/esm/ui/FloatingToolbar/styles.js +3 -3
  426. package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +4 -3
  427. package/dist/esm/ui/PanelTextInput/styles.js +4 -3
  428. package/dist/esm/ui/PluginSlot/index.js +7 -4
  429. package/dist/esm/ui/Toolbar/ToolbarInner.js +2 -1
  430. package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
  431. package/dist/esm/ui/ToolbarFeedback/styles.js +4 -3
  432. package/dist/esm/ui/WithFlash/index.js +3 -2
  433. package/dist/esm/ui/styles.js +5 -4
  434. package/dist/esm/utils/document.js +59 -5
  435. package/dist/esm/utils/filter/privacy-filter.js +1 -1
  436. package/dist/esm/utils/step.js +12 -1
  437. package/dist/esm/version-wrapper.js +1 -1
  438. package/dist/esm/version.json +1 -1
  439. package/dist/types/actions/index.d.ts +6 -0
  440. package/dist/types/labs/next/ContentComponents.d.ts +7 -1
  441. package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +1 -0
  442. package/dist/types/plugins/analytics/types/enums.d.ts +3 -0
  443. package/dist/types/plugins/analytics/types/general-events.d.ts +7 -1
  444. package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +1 -1
  445. package/dist/types/plugins/code-block/actions.d.ts +2 -0
  446. package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +2 -0
  447. package/dist/types/plugins/code-block/pm-plugins/actions.d.ts +1 -0
  448. package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +1 -0
  449. package/dist/types/plugins/extension/commands.d.ts +1 -1
  450. package/dist/types/plugins/extension/types.d.ts +1 -0
  451. package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
  452. package/dist/types/plugins/find-replace/styles.d.ts +0 -2
  453. package/dist/types/plugins/hyperlink/utils.d.ts +8 -0
  454. package/dist/types/plugins/media/commands/helpers.d.ts +2 -0
  455. package/dist/types/plugins/media/nodeviews/mediaNodeView/media.d.ts +1 -0
  456. package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -1
  457. package/dist/types/plugins/media/pm-plugins/types.d.ts +2 -1
  458. package/dist/types/plugins/paste/handlers.d.ts +1 -0
  459. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
  460. package/dist/types/plugins/table/commands/misc.d.ts +0 -1
  461. package/dist/types/plugins/table/index.d.ts +0 -1
  462. package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +1 -0
  463. package/dist/types/plugins/table/nodeviews/types.d.ts +0 -1
  464. package/dist/types/plugins/table/pm-plugins/main.d.ts +1 -1
  465. package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
  466. package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
  467. package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +1 -1
  468. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +1 -2
  469. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
  470. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -1
  471. package/dist/types/plugins/table/transforms/fix-tables.d.ts +0 -1
  472. package/dist/types/plugins/table/types.d.ts +0 -1
  473. package/dist/types/plugins/table/ui/consts.d.ts +9 -9
  474. package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +2 -0
  475. package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +4 -4
  476. package/dist/types/types/editor-appearance-component.d.ts +0 -1
  477. package/dist/types/types/editor-props.d.ts +4 -0
  478. package/dist/types/types/feature-flags.d.ts +8 -0
  479. package/dist/types/types/ui-components.d.ts +1 -0
  480. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -0
  481. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -0
  482. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +3 -2
  483. package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +3 -2
  484. package/dist/types/ui/PluginSlot/index.d.ts +1 -0
  485. package/dist/types/ui/Toolbar/toolbar-types.d.ts +1 -0
  486. package/dist/types/utils/document.d.ts +1 -0
  487. package/dist/types/utils/step.d.ts +1 -0
  488. package/docs/0-intro.tsx +12 -4
  489. package/package.json +20 -20
@@ -17,15 +17,17 @@ var _colors = require("@atlaskit/theme/colors");
17
17
 
18
18
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
19
19
 
20
+ var _tokens = require("@atlaskit/tokens");
21
+
20
22
  var _templateObject, _templateObject2, _templateObject3;
21
23
 
22
- var inviteTeamWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-radius: 50%;\n min-width: ", "px;\n margin-left: -", "px;\n"])), _colors.N20, (0, _constants.gridSize)() * 4, (0, _constants.gridSize)() / 2);
24
+ var inviteTeamWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-radius: 50%;\n min-width: ", "px;\n margin-left: -", "px;\n"])), (0, _tokens.token)('color.background.neutral', _colors.N20), (0, _constants.gridSize)() * 4, (0, _constants.gridSize)() / 2);
23
25
  exports.inviteTeamWrapper = inviteTeamWrapper;
24
26
  var avatarContainer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: ", "px;\n display: flex;\n align-items: center;\n\n // ED-13102: This is to override list styles that come from the\n // .wiki-content class in Confluence that should not apply within\n // the toolbar. Has to be extra specific to override.\n && > ul {\n list-style-type: none;\n }\n\n div:last-child button.invite-to-edit {\n border-radius: 50%;\n height: 32px;\n width: 32px;\n padding: 2px;\n }\n"])), (0, _constants.gridSize)());
25
27
  exports.avatarContainer = avatarContainer;
26
28
 
27
29
  var badge = function badge(color) {
28
- return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n position: absolute;\n right: 1px;\n bottom: 1px;\n width: 13px;\n height: 13px;\n z-index: ", ";\n border-radius: 3px;\n background: ", ";\n color: #fff;\n font-size: ", ";\n line-height: 0;\n padding-top: 7px;\n text-align: center;\n box-shadow: 0 0 1px #fff;\n box-sizing: border-box;\n"])), _editorSharedStyles.akEditorSmallZIndex, color, (0, _editorSharedStyles.relativeFontSizeToBase16)(9));
30
+ return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n position: absolute;\n right: 1px;\n bottom: 1px;\n width: 13px;\n height: 13px;\n z-index: ", ";\n border-radius: 3px;\n background: ", ";\n color: ", ";\n font-size: ", ";\n line-height: 0;\n padding-top: 7px;\n text-align: center;\n box-shadow: 0 0 1px ", ";\n box-sizing: border-box;\n"])), _editorSharedStyles.akEditorSmallZIndex, color, (0, _tokens.token)('color.text.inverse', '#fff'), (0, _editorSharedStyles.relativeFontSizeToBase16)(9), (0, _tokens.token)('color.border.inverse', '#fff'));
29
31
  };
30
32
 
31
33
  exports.badge = badge;
@@ -29,6 +29,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
29
29
 
30
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
31
 
32
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
32
33
  var colors = [themeColors.R100, themeColors.R300, themeColors.R500, themeColors.Y100, themeColors.Y300, themeColors.Y500, themeColors.G100, themeColors.G300, themeColors.G500, themeColors.T100, themeColors.T300, themeColors.T500, themeColors.B100, themeColors.B300, themeColors.B500, themeColors.P100, themeColors.P300, themeColors.P500, themeColors.N70, themeColors.N200, themeColors.N800].map(function (solid) {
33
34
  return {
34
35
  solid: solid,
@@ -41,6 +41,8 @@ var _constants = require("@atlaskit/theme/constants");
41
41
 
42
42
  var _colors = require("@atlaskit/theme/colors");
43
43
 
44
+ var _tokens = require("@atlaskit/tokens");
45
+
44
46
  var _withOuterListeners = _interopRequireDefault(require("../../../../ui/with-outer-listeners"));
45
47
 
46
48
  var _enums = require("../../../analytics/types/enums");
@@ -56,7 +58,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
56
58
  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; } }
57
59
 
58
60
  var PopupWithListeners = (0, _withOuterListeners.default)(_ui.Popup);
59
- var popupContentWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 2px;\n border-radius: ", "px;\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n background-color: ", ";\n"])), (0, _constants.borderRadius)(), _colors.N60A, _colors.N60A, _colors.N0);
61
+ var popupContentWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 2px;\n border-radius: ", "px;\n box-shadow: ", ";\n background-color: ", ";\n"])), (0, _constants.borderRadius)(), (0, _tokens.token)('elevation.shadow.overlay', "0 4px 8px -2px ".concat(_colors.N60A, ", 0 0 1px ").concat(_colors.N60A)), (0, _tokens.token)('elevation.surface.overlay', _colors.N0));
60
62
 
61
63
  var DatePicker = /*#__PURE__*/function (_React$Component) {
62
64
  (0, _inherits2.default)(DatePicker, _React$Component);
@@ -17,6 +17,8 @@ var _constants = require("@atlaskit/theme/constants");
17
17
 
18
18
  var _colors = require("@atlaskit/theme/colors");
19
19
 
20
+ var _tokens = require("@atlaskit/tokens");
21
+
20
22
  var _ui = require("@atlaskit/editor-common/ui");
21
23
 
22
24
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
@@ -28,35 +30,35 @@ var _classNames = require("./class-names");
28
30
  var _templateObject, _templateObject2;
29
31
 
30
32
  var EXPAND_SELECTED_BACKGROUND = (0, _components.themed)({
31
- light: 'rgba(255, 255, 255, 0.6)',
32
- dark: 'rgba(9, 10, 11, 0.29)'
33
+ light: (0, _tokens.token)('color.background.neutral.subtle', 'rgba(255, 255, 255, 0.6)'),
34
+ dark: (0, _tokens.token)('color.background.neutral.subtle', 'rgba(9, 10, 11, 0.29)')
33
35
  });
34
36
 
35
37
  var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR(props) {
36
38
  return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (0, _components.themed)({
37
- light: _colors.N80A,
38
- dark: '#d9dde3'
39
+ light: (0, _tokens.token)('color.icon.subtle', _colors.N80A),
40
+ dark: (0, _tokens.token)('color.icon.subtle', '#d9dde3')
39
41
  })(props));
40
42
  };
41
43
 
42
44
  var ACTIVE_STATE_BACKGROUND_COLOR = (0, _components.themed)({
43
- dark: "#0C294F4B"
45
+ dark: (0, _tokens.token)('color.blanket.selected', "#0C294F4B")
44
46
  });
45
47
  var ACTIVE_STATE_BORDER = (0, _components.themed)({
46
- dark: "1px solid #4794ff4B"
48
+ dark: "1px solid ".concat((0, _tokens.token)('color.border.selected', "#4794ff4B"))
47
49
  });
48
50
  var ACTIVE_STATE_BORDER_RADIUS = (0, _components.themed)({
49
51
  dark: '3px'
50
52
  });
51
53
  var DANGER_STATE_BACKGROUND_COLOR = (0, _components.themed)({
52
- light: _colors.R50,
53
- dark: '#441C13'
54
+ light: (0, _tokens.token)('color.background.danger', _colors.R50),
55
+ dark: (0, _tokens.token)('color.background.danger', '#441C13')
54
56
  });
55
57
  var DANGER_STATE_BORDER = (0, _components.themed)({
56
- dark: "1px solid ".concat(_colors.R200)
58
+ dark: "1px solid ".concat((0, _tokens.token)('color.border.danger', _colors.R200))
57
59
  });
58
60
  var DANGER_STATE_BORDER_COLOR = (0, _components.themed)({
59
- light: _colors.R300
61
+ light: (0, _tokens.token)('color.border.danger', _colors.R300)
60
62
  });
61
63
  var DANGER_STATE_BORDER_RADIUS = (0, _components.themed)({
62
64
  dark: '3px'
@@ -70,11 +72,11 @@ var expandStyles = function expandStyles(props) {
70
72
  expanded: false,
71
73
  focused: false
72
74
  })(props), _classNames.expandClassNames.titleInput, _ui.sharedExpandStyles.titleInputStyles(props), _classNames.expandClassNames.titleContainer, _ui.sharedExpandStyles.titleContainerStyles(props), _classNames.expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND(props), (0, _components.themed)({
73
- light: _colors.N40A,
74
- dark: _colors.DN50
75
+ light: (0, _tokens.token)('color.border', _colors.N40A),
76
+ dark: (0, _tokens.token)('color.border', _colors.DN50)
75
77
  })(props), _classNames.expandClassNames.content, (0, _constants.gridSize)(), _classNames.expandClassNames.inputContainer, _classNames.expandClassNames.prefix, _classNames.expandClassNames.expanded, _classNames.expandClassNames.prefix, _classNames.expandClassNames.expanded, _classNames.expandClassNames.iconContainer, EXPAND_ICON_COLOR(props), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _components.themed)({
76
- light: _colors.N50A,
77
- dark: _colors.DN50
78
+ light: (0, _tokens.token)('color.border', _colors.N50A),
79
+ dark: (0, _tokens.token)('color.border', _colors.DN50)
78
80
  })(props), EXPAND_SELECTED_BACKGROUND(props));
79
81
  };
80
82
 
@@ -52,11 +52,12 @@ var clearEditingContext = (0, _pluginFactory.createCommand)({
52
52
  }, _transforms.applyChange);
53
53
  exports.clearEditingContext = clearEditingContext;
54
54
 
55
- var forceAutoSave = function forceAutoSave(value) {
55
+ var forceAutoSave = function forceAutoSave(resolve, reject) {
56
56
  return (0, _pluginFactory.createCommand)({
57
57
  type: 'UPDATE_STATE',
58
58
  data: {
59
- autoSaveResolve: value
59
+ autoSaveResolve: resolve,
60
+ autoSaveReject: reject
60
61
  }
61
62
  }, _transforms.applyChange);
62
63
  };
@@ -64,6 +64,7 @@ var getContextPanel = function getContextPanel(allowAutoSave) {
64
64
 
65
65
  var extensionState = (0, _main.getPluginState)(state);
66
66
  var autoSaveResolve = extensionState.autoSaveResolve,
67
+ autoSaveReject = extensionState.autoSaveReject,
67
68
  showContextPanel = extensionState.showContextPanel,
68
69
  extensionProvider = extensionState.extensionProvider,
69
70
  processParametersBefore = extensionState.processParametersBefore,
@@ -106,6 +107,7 @@ var getContextPanel = function getContextPanel(allowAutoSave) {
106
107
  extensionProvider: extensionProvider,
107
108
  autoSave: allowAutoSave,
108
109
  autoSaveTrigger: autoSaveResolve,
110
+ autoSaveReject: autoSaveReject,
109
111
  onChange: /*#__PURE__*/function () {
110
112
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(updatedParameters) {
111
113
  return _regenerator.default.wrap(function _callee$(_context) {
@@ -144,24 +146,36 @@ var getContextPanel = function getContextPanel(allowAutoSave) {
144
146
  switch (_context2.prev = _context2.next) {
145
147
  case 0:
146
148
  if (!allowAutoSave) {
147
- _context2.next = 3;
149
+ _context2.next = 9;
148
150
  break;
149
151
  }
150
152
 
151
- _context2.next = 3;
152
- return new Promise(function (resolve) {
153
- (0, _commands.forceAutoSave)(resolve)(editorView.state, editorView.dispatch);
153
+ _context2.prev = 1;
154
+ _context2.next = 4;
155
+ return new Promise(function (resolve, reject) {
156
+ (0, _commands.forceAutoSave)(resolve, reject)(editorView.state, editorView.dispatch);
154
157
  });
155
158
 
156
- case 3:
159
+ case 4:
160
+ _context2.next = 9;
161
+ break;
162
+
163
+ case 6:
164
+ _context2.prev = 6;
165
+ _context2.t0 = _context2["catch"](1);
166
+ // Even if the save failed, we should proceed with closing the panel
167
+ // eslint-disable-next-line no-console
168
+ console.error("Autosave failed with error", _context2.t0);
169
+
170
+ case 9:
157
171
  (0, _commands.clearEditingContext)(editorView.state, editorView.dispatch);
158
172
 
159
- case 4:
173
+ case 10:
160
174
  case "end":
161
175
  return _context2.stop();
162
176
  }
163
177
  }
164
- }, _callee2);
178
+ }, _callee2, null, [[1, 6]]);
165
179
  }))
166
180
  });
167
181
  }
@@ -19,6 +19,8 @@ var _colors = require("@atlaskit/theme/colors");
19
19
 
20
20
  var _styles = require("../styles");
21
21
 
22
+ var _tokens = require("@atlaskit/tokens");
23
+
22
24
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
23
25
 
24
26
  var dataConsumerSelector = '[data-mark-type="dataConsumer"]';
@@ -35,11 +37,11 @@ exports.header = header;
35
37
 
36
38
  var content = function content(theme) {
37
39
  return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px;\n background: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n cursor: initial;\n"])), _styles.padding, (0, _components.themed)({
38
- light: 'white',
39
- dark: _colors.DN30
40
+ light: (0, _tokens.token)('elevation.surface', 'white'),
41
+ dark: (0, _tokens.token)('elevation.surface', _colors.DN30)
40
42
  })(theme), (0, _components.themed)({
41
- dark: _colors.DN900
42
- })(theme), _colors.N30, (0, _constants.borderRadius)());
43
+ dark: (0, _tokens.token)('color.text', _colors.DN900)
44
+ })(theme), (0, _tokens.token)('color.border', _colors.N30), (0, _constants.borderRadius)());
43
45
  };
44
46
 
45
47
  exports.content = content;
@@ -15,10 +15,12 @@ var _constants = require("@atlaskit/theme/constants");
15
15
 
16
16
  var _styles = require("../styles");
17
17
 
18
+ var _tokens = require("@atlaskit/tokens");
19
+
18
20
  var _templateObject;
19
21
 
20
22
  var wrapperStyle = function wrapperStyle(theme) {
21
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n\n cursor: pointer;\n display: inline-flex;\n margin: 1px;\n\n > img {\n border-radius: ", "px;\n }\n\n &::after,\n &::before {\n vertical-align: text-top;\n display: inline-block;\n width: 1px;\n content: '';\n }\n\n &.with-children {\n padding: 0;\n background: white;\n }\n"])), (0, _styles.wrapperDefault)(theme), (0, _constants.borderRadius)());
23
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n\n cursor: pointer;\n display: inline-flex;\n margin: 1px;\n\n > img {\n border-radius: ", "px;\n }\n\n &::after,\n &::before {\n vertical-align: text-top;\n display: inline-block;\n width: 1px;\n content: '';\n }\n\n &.with-children {\n padding: 0;\n background: ", ";\n }\n"])), (0, _styles.wrapperDefault)(theme), (0, _constants.borderRadius)(), (0, _tokens.token)('color.background.neutral.subtle', 'white'));
22
24
  };
23
25
 
24
26
  exports.wrapperStyle = wrapperStyle;
@@ -19,6 +19,8 @@ var _colors = require("@atlaskit/theme/colors");
19
19
 
20
20
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
21
21
 
22
+ var _tokens = require("@atlaskit/tokens");
23
+
22
24
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
23
25
 
24
26
  var padding = (0, _constants.gridSize)();
@@ -28,11 +30,11 @@ exports.BODIED_EXT_PADDING = BODIED_EXT_PADDING;
28
30
 
29
31
  var wrapperDefault = function wrapperDefault(theme) {
30
32
  return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n position: relative;\n vertical-align: middle;\n font-size: ", ";\n\n .ProseMirror-selectednode > span > & > .extension-overlay {\n box-shadow: inset 0px 0px 0px 2px ", ";\n opacity: 1;\n }\n\n &.with-overlay {\n .extension-overlay {\n background: ", ";\n color: transparent;\n }\n\n &:hover .extension-overlay {\n opacity: 1;\n }\n }\n"])), (0, _components.themed)({
31
- light: _colors.N20,
32
- dark: _colors.DN50
33
+ light: (0, _tokens.token)('color.background.neutral', _colors.N20),
34
+ dark: (0, _tokens.token)('color.background.neutral', _colors.DN50)
33
35
  })(theme), (0, _constants.borderRadius)(), (0, _components.themed)({
34
- dark: _colors.DN700
35
- })(theme), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), _colors.B200, _colors.N20A);
36
+ dark: (0, _tokens.token)('color.text', _colors.DN700)
37
+ })(theme), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _tokens.token)('color.border.selected', _colors.B200), (0, _tokens.token)('color.background.neutral.hovered', _colors.N20A));
36
38
  };
37
39
 
38
40
  exports.wrapperDefault = wrapperDefault;
@@ -40,7 +42,7 @@ var overlay = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _tagge
40
42
  exports.overlay = overlay;
41
43
  var placeholderFallback = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n\n & > img {\n margin: 0 4px;\n }\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: placeholder-fallback;\n"])));
42
44
  exports.placeholderFallback = placeholderFallback;
43
- var placeholderFallbackParams = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n max-width: 200px;\n margin-left: 5px;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])), _colors.N70);
45
+ var placeholderFallbackParams = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n max-width: 200px;\n margin-left: 5px;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])), (0, _tokens.token)('color.text.subtlest', _colors.N70));
44
46
  exports.placeholderFallbackParams = placeholderFallbackParams;
45
47
  var styledImage = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-height: 16px;\n max-width: 16px;\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: lozenge-image;\n"])));
46
48
  exports.styledImage = styledImage;
@@ -23,12 +23,14 @@ var _reactIntlNext = require("react-intl-next");
23
23
 
24
24
  var _messages = require("./messages");
25
25
 
26
+ var _tokens = require("@atlaskit/tokens");
27
+
26
28
  var _templateObject, _templateObject2, _templateObject3;
27
29
 
28
30
  var noop = function noop() {};
29
31
 
30
32
  var saveIndicatorWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n"])));
31
- var saveIndicatorContent = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n width: 256px;\n bottom: 20px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 6px 12px;\n\n background: ", ";\n\n /* E300 */\n box-shadow: 0px 8px 12px rgba(9, 30, 66, 0.15),\n 0px 0px 1px rgba(9, 30, 66, 0.31);\n border-radius: 16px;\n"])), _colors.N0);
33
+ var saveIndicatorContent = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n width: 256px;\n bottom: 20px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 6px 12px;\n\n background: ", ";\n\n /* E300 */\n box-shadow: ", ";\n border-radius: 16px;\n"])), (0, _tokens.token)('elevation.surface.overlay', _colors.N0), (0, _tokens.token)('elevation.shadow.overlay', "0px 8px 12px rgba(9, 30, 66, 0.15), 0px 0px 1px rgba(9, 30, 66, 0.31)"));
32
34
  var saveIndicatorText = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 6px;\n"])));
33
35
 
34
36
  var SaveIndicator = function SaveIndicator(_ref) {
@@ -69,7 +71,7 @@ var SaveIndicator = function SaveIndicator(_ref) {
69
71
  "data-testid": "save-indicator-content"
70
72
  }, (0, _react2.jsx)(_checkCircle.default, {
71
73
  label: "Saving",
72
- primaryColor: _colors.G300,
74
+ primaryColor: (0, _tokens.token)('color.icon.success', _colors.G300),
73
75
  size: "small"
74
76
  }), (0, _react2.jsx)("span", {
75
77
  css: saveIndicatorText
@@ -13,7 +13,9 @@ var _react = require("@emotion/react");
13
13
 
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
 
16
+ var _tokens = require("@atlaskit/tokens");
17
+
16
18
  var _templateObject;
17
19
 
18
- var fakeCursorStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .ProseMirror-fake-text-cursor {\n display: inline;\n pointer-events: none;\n position: relative;\n }\n\n .ProseMirror-fake-text-cursor::after {\n content: '';\n display: inline;\n top: 0;\n position: absolute;\n border-right: 1px solid rgba(0, 0, 0, 0.4);\n }\n\n .ProseMirror-fake-text-selection {\n display: inline;\n pointer-events: none;\n position: relative;\n background-color: ", ";\n }\n }\n"])), _colors.B75);
20
+ var fakeCursorStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .ProseMirror-fake-text-cursor {\n display: inline;\n pointer-events: none;\n position: relative;\n }\n\n .ProseMirror-fake-text-cursor::after {\n content: '';\n display: inline;\n top: 0;\n position: absolute;\n border-right: 1px solid ", ";\n }\n\n .ProseMirror-fake-text-selection {\n display: inline;\n pointer-events: none;\n position: relative;\n background-color: ", ";\n }\n }\n"])), (0, _tokens.token)('color.border', 'rgba(0, 0, 0, 0.4)'), (0, _tokens.token)('color.background.selected', _colors.B75));
19
21
  exports.fakeCursorStyles = fakeCursorStyles;
@@ -30,7 +30,7 @@ var safeNumberFeatureFlag = function safeNumberFeatureFlag(value) {
30
30
 
31
31
 
32
32
  function createFeatureFlagsFromProps(props) {
33
- var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$featureFlags9, _props$featureFlags10, _props$allowTables5, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$collabEdit, _props$collabEdit2, _props$featureFlags34, _props$featureFlags35;
33
+ var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$featureFlags9, _props$featureFlags10, _props$allowTables5, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$collabEdit, _props$collabEdit2, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37;
34
34
 
35
35
  var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(props.featureFlags);
36
36
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
@@ -67,6 +67,7 @@ function createFeatureFlagsFromProps(props) {
67
67
  maxUnsafeChromeSpellcheckingVersion: safeNumberFeatureFlag((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.maxUnsafeChromeSpellcheckingVersion),
68
68
  useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
69
69
  chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
70
- viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined
70
+ viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined,
71
+ showHoverPreview: Boolean(typeof ((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36.showHoverPreview) === 'boolean' ? !!((_props$featureFlags37 = props.featureFlags) !== null && _props$featureFlags37 !== void 0 && _props$featureFlags37.showHoverPreview) : false)
71
72
  });
72
73
  }
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.selectedSearchMatchClass = exports.selectedSearchMatchBgColour = exports.searchMatchClass = exports.searchMatchBgColour = exports.findReplaceStyles = void 0;
8
+ exports.selectedSearchMatchClass = exports.searchMatchClass = exports.findReplaceStyles = void 0;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
11
 
@@ -15,13 +15,9 @@ var _colors = require("@atlaskit/theme/colors");
15
15
 
16
16
  var _templateObject;
17
17
 
18
- var searchMatchBgColour = _colors.B75;
19
- exports.searchMatchBgColour = searchMatchBgColour;
20
- var selectedSearchMatchBgColour = _colors.B200;
21
- exports.selectedSearchMatchBgColour = selectedSearchMatchBgColour;
22
18
  var searchMatchClass = 'search-match';
23
19
  exports.searchMatchClass = searchMatchClass;
24
20
  var selectedSearchMatchClass = 'selected-search-match';
25
21
  exports.selectedSearchMatchClass = selectedSearchMatchClass;
26
- var findReplaceStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n background-color: ", ";\n }\n\n .", " {\n background-color: ", ";\n color: white;\n }\n"])), searchMatchClass, searchMatchBgColour, selectedSearchMatchClass, selectedSearchMatchBgColour);
22
+ var findReplaceStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n background-color: ", ";\n }\n\n .", " {\n background-color: ", ";\n color: white;\n }\n"])), searchMatchClass, _colors.B75, selectedSearchMatchClass, _colors.B200);
27
23
  exports.findReplaceStyles = findReplaceStyles;
@@ -13,6 +13,8 @@ var _react = require("@emotion/react");
13
13
 
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
 
16
+ var _tokens = require("@atlaskit/tokens");
17
+
16
18
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
19
 
18
20
  var _templateObject;
@@ -24,7 +26,7 @@ exports.replaceSectionButtonStyles = replaceSectionButtonStyles;
24
26
  var ruleStyles = (0, _react.css)({
25
27
  width: '100%',
26
28
  border: 'none',
27
- backgroundColor: "".concat(_colors.N30A),
29
+ backgroundColor: "".concat((0, _tokens.token)('color.border', _colors.N30A)),
28
30
  margin: '4px 0px',
29
31
  height: '1px',
30
32
  borderRadius: '1px'
@@ -41,7 +43,7 @@ exports.wrapperStyles = wrapperStyles;
41
43
  var sectionWrapperStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n\n & > * {\n display: inline-flex;\n height: 32px;\n flex: 0 0 auto;\n }\n\n & > [data-ds--text-field--container] {\n display: flex;\n flex: 1 1 auto;\n }\n"])));
42
44
  exports.sectionWrapperStyles = sectionWrapperStyles;
43
45
  var countStyles = (0, _react.css)({
44
- color: "".concat(_colors.N60),
46
+ color: "".concat((0, _tokens.token)('color.text.subtlest', _colors.N60)),
45
47
  fontSize: "".concat((0, _editorSharedStyles.relativeFontSizeToBase16)(12)),
46
48
  flex: '0 0 auto',
47
49
  justifyContent: 'center',
@@ -41,6 +41,8 @@ var _reactIntlNext = require("react-intl-next");
41
41
 
42
42
  var _messages = _interopRequireDefault(require("./messages"));
43
43
 
44
+ var _tokens = require("@atlaskit/tokens");
45
+
44
46
  var _templateObject, _templateObject2;
45
47
 
46
48
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -140,7 +142,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
140
142
 
141
143
  if (selected !== undefined) {
142
144
  return selected ? (0, _react.jsx)(_done.default, {
143
- primaryColor: _colors.B400,
145
+ primaryColor: (0, _tokens.token)('color.icon.selected', _colors.B400),
144
146
  size: "small",
145
147
  label: intl.formatMessage(_messages.default.confirmModalOK)
146
148
  }) : (0, _react.jsx)("span", {
@@ -9,6 +9,8 @@ exports.default = EditorEmojiAddIcon;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
+ var _tokens = require("@atlaskit/tokens");
13
+
12
14
  function EditorEmojiAddIcon() {
13
15
  return /*#__PURE__*/_react.default.createElement("svg", {
14
16
  width: 24,
@@ -19,7 +21,7 @@ function EditorEmojiAddIcon() {
19
21
  }, /*#__PURE__*/_react.default.createElement("rect", {
20
22
  width: 24,
21
23
  height: 24,
22
- fill: "white",
24
+ fill: (0, _tokens.token)('color.background.neutral.subtle', 'white'),
23
25
  fillOpacity: "0.01"
24
26
  }), /*#__PURE__*/_react.default.createElement("path", {
25
27
  fillRule: "evenodd",
@@ -13,9 +13,11 @@ var _react = require("@emotion/react");
13
13
 
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
 
16
+ var _tokens = require("@atlaskit/tokens");
17
+
16
18
  var _templateObject;
17
19
 
18
- var separator = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n width: 1px;\n height: 20px;\n margin: 0 4px;\n align-self: center;\n"])), _colors.N30);
20
+ var separator = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n width: 1px;\n height: 20px;\n margin: 0 4px;\n align-self: center;\n"])), (0, _tokens.token)('color.border', _colors.N30));
19
21
 
20
22
  var _default = function _default() {
21
23
  return (0, _react.jsx)("div", {
@@ -61,6 +61,8 @@ var _reactIntlNext = require("react-intl-next");
61
61
 
62
62
  var _messages = _interopRequireDefault(require("./messages"));
63
63
 
64
+ var _tokens = require("@atlaskit/tokens");
65
+
64
66
  var _templateObject, _templateObject2;
65
67
 
66
68
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -74,10 +76,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
74
76
  var akGridSize = (0, _constants.gridSize)();
75
77
 
76
78
  var toolbarContainer = function toolbarContainer(theme) {
77
- return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: 0 0 1px rgba(9, 30, 66, 0.31),\n 0 4px 8px -2px rgba(9, 30, 66, 0.25);\n padding: ", "px ", "px;\n display: flex;\n line-height: 1;\n box-sizing: border-box;\n\n & > div {\n align-items: center;\n }\n"])), (0, _components.themed)({
78
- light: 'white',
79
- dark: _colors.DN70
80
- })(theme), (0, _constants.borderRadius)(), akGridSize / 2, akGridSize);
79
+ return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n padding: ", "px ", "px;\n display: flex;\n line-height: 1;\n box-sizing: border-box;\n\n & > div {\n align-items: center;\n }\n"])), (0, _components.themed)({
80
+ light: (0, _tokens.token)('elevation.surface.overlay', 'white'),
81
+ dark: (0, _tokens.token)('elevation.surface.overlay', _colors.DN70)
82
+ })(theme), (0, _constants.borderRadius)(), (0, _tokens.token)('elevation.shadow.overlay', "0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)"), akGridSize / 2, akGridSize);
81
83
  };
82
84
 
83
85
  var toolbarContainerLeftPadding = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: ", "px;\n"])), akGridSize / 2);
@@ -11,6 +11,8 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
11
11
 
12
12
  var _adfSchema = require("@atlaskit/adf-schema");
13
13
 
14
+ var _tokens = require("@atlaskit/tokens");
15
+
14
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
17
 
16
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -22,28 +24,28 @@ var background = {
22
24
  dark: 'inherit'
23
25
  },
24
26
  hover: {
25
- light: colors.N30A,
26
- dark: colors.N30A
27
+ light: (0, _tokens.token)('color.background.neutral.subtle.hovered', colors.N30A),
28
+ dark: (0, _tokens.token)('color.background.neutral.subtle.hovered', colors.N30A)
27
29
  },
28
30
  active: {
29
- light: (0, _adfSchema.hexToRgba)(colors.B75, 0.6),
30
- dark: (0, _adfSchema.hexToRgba)(colors.B75, 0.6)
31
+ light: (0, _tokens.token)('color.background.neutral.pressed', "".concat((0, _adfSchema.hexToRgba)(colors.B75, 0.6))),
32
+ dark: (0, _tokens.token)('color.background.neutral.pressed', "".concat((0, _adfSchema.hexToRgba)(colors.B75, 0.6)))
31
33
  }
32
34
  }
33
35
  };
34
36
  var color = {
35
37
  danger: {
36
38
  default: {
37
- light: colors.N400,
38
- dark: colors.DN400
39
+ light: (0, _tokens.token)('color.icon', colors.N400),
40
+ dark: (0, _tokens.token)('color.icon', colors.DN400)
39
41
  },
40
42
  hover: {
41
- light: colors.R400,
42
- dark: colors.R400
43
+ light: (0, _tokens.token)('color.icon.danger', colors.R400),
44
+ dark: (0, _tokens.token)('color.icon.danger', colors.R400)
43
45
  },
44
46
  active: {
45
- light: colors.R400,
46
- dark: colors.R400
47
+ light: (0, _tokens.token)('color.icon.danger', colors.R400),
48
+ dark: (0, _tokens.token)('color.icon.danger', colors.R400)
47
49
  }
48
50
  }
49
51
  };
@@ -15,9 +15,11 @@ var _colors = require("@atlaskit/theme/colors");
15
15
 
16
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
17
 
18
+ var _tokens = require("@atlaskit/tokens");
19
+
18
20
  var _templateObject;
19
21
 
20
22
  var GRID_GUTTER = 12;
21
23
  exports.GRID_GUTTER = GRID_GUTTER;
22
- var gridStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .gridParent {\n width: calc(100% + ", "px);\n margin-left: -", "px;\n margin-right: -", "px;\n transform: scale(1);\n z-index: ", ";\n }\n\n .gridContainer {\n position: fixed;\n height: 100vh;\n width: 100%;\n pointer-events: none;\n }\n\n .gridLine {\n border-left: 1px solid ", ";\n display: inline-block;\n box-sizing: border-box;\n height: 100%;\n margin-left: -1px;\n\n transition: border-color 0.15s linear;\n z-index: 0;\n }\n\n .highlight {\n border-left: 1px solid ", ";\n }\n"])), GRID_GUTTER * 2, GRID_GUTTER, GRID_GUTTER, _editorSharedStyles.akEditorGridLineZIndex, _colors.N30A, _colors.B200);
24
+ var gridStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .gridParent {\n width: calc(100% + ", "px);\n margin-left: -", "px;\n margin-right: -", "px;\n transform: scale(1);\n z-index: ", ";\n }\n\n .gridContainer {\n position: fixed;\n height: 100vh;\n width: 100%;\n pointer-events: none;\n }\n\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4352\n .gridLine {\n border-left: 1px solid ", ";\n display: inline-block;\n box-sizing: border-box;\n height: 100%;\n margin-left: -1px;\n\n transition: border-color 0.15s linear;\n z-index: 0;\n }\n\n .highlight {\n border-left: 1px solid ", ";\n }\n"])), GRID_GUTTER * 2, GRID_GUTTER, GRID_GUTTER, _editorSharedStyles.akEditorGridLineZIndex, (0, _tokens.token)('color.border', _colors.N30A), (0, _tokens.token)('color.border.focused', _colors.B200));
23
25
  exports.gridStyles = gridStyles;
@@ -19,19 +19,21 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
19
19
 
20
20
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
21
21
 
22
+ var _tokens = require("@atlaskit/tokens");
23
+
22
24
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
23
25
 
24
26
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
27
 
26
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
29
 
28
- var header = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n z-index: ", ";\n min-height: 24px;\n padding: 20px 40px;\n font-size: ", ";\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-shadow: 'none';\n color: ", ";\n background-color: ", ";\n border-radius: ", "px;\n"])), _editorSharedStyles.akEditorUnitZIndex, (0, _editorSharedStyles.relativeFontSizeToBase16)(24), colors.N400, colors.N0, (0, _constants.borderRadius)());
30
+ var header = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n z-index: ", ";\n min-height: 24px;\n padding: 20px 40px;\n font-size: ", ";\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-shadow: 'none';\n color: ", ";\n background-color: ", ";\n border-radius: ", "px;\n"])), _editorSharedStyles.akEditorUnitZIndex, (0, _editorSharedStyles.relativeFontSizeToBase16)(24), (0, _tokens.token)('color.text', colors.N400), (0, _tokens.token)('color.background.neutral.subtle', colors.N0), (0, _constants.borderRadius)());
29
31
  exports.header = header;
30
- var footer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n z-index: ", ";\n font-size: ", ";\n line-height: 20px;\n color: ", ";\n padding: 24px;\n text-align: right;\n box-shadow: 'none';\n"])), _editorSharedStyles.akEditorUnitZIndex, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), colors.N300);
32
+ var footer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n z-index: ", ";\n font-size: ", ";\n line-height: 20px;\n color: ", ";\n padding: 24px;\n text-align: right;\n box-shadow: 'none';\n"])), _editorSharedStyles.akEditorUnitZIndex, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), (0, _tokens.token)('color.text.subtlest', colors.N300));
31
33
  exports.footer = footer;
32
- var contentWrapper = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: 18px 20px;\n border-bottom-right-radius: ", "px;\n overflow: auto;\n position: relative;\n color: ", ";\n background-color: ", ";\n"])), (0, _constants.borderRadius)(), colors.N400, colors.N0);
34
+ var contentWrapper = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: 18px 20px;\n border-bottom-right-radius: ", "px;\n overflow: auto;\n position: relative;\n color: ", ";\n background-color: ", ";\n"])), (0, _constants.borderRadius)(), (0, _tokens.token)('color.text.subtle', colors.N400), (0, _tokens.token)('color.background.neutral.subtle', colors.N0));
33
35
  exports.contentWrapper = contentWrapper;
34
- var line = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n background: #fff;\n content: '';\n display: block;\n height: 2px;\n left: 0;\n position: absolute;\n top: 0;\n right: 0;\n width: 100%;\n min-width: 604px;\n"])));
36
+ var line = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n content: '';\n display: block;\n height: 2px;\n left: 0;\n position: absolute;\n top: 0;\n right: 0;\n width: 100%;\n min-width: 604px;\n"])), (0, _tokens.token)('color.background.neutral.subtle', '#fff'));
35
37
  exports.line = line;
36
38
  var content = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n min-width: 524px;\n width: 100%;\n position: relative;\n display: flex;\n justify-content: space-between;\n"])));
37
39
  exports.content = content;
@@ -43,9 +45,9 @@ var row = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTem
43
45
  exports.row = row;
44
46
  var title = (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", ";\n font-weight: 400;\n"])), (0, _editorSharedStyles.relativeFontSizeToBase16)(18));
45
47
  exports.title = title;
46
- var codeSm = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n width: 24px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n text-align: center;\n"])), colors.N20, (0, _constants.borderRadius)());
48
+ var codeSm = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n width: 24px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n text-align: center;\n"])), (0, _tokens.token)('color.background.neutral', colors.N20), (0, _constants.borderRadius)());
47
49
  exports.codeSm = codeSm;
48
- var codeMd = (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n width: 50px;\n text-align: center;\n"])), colors.N20, (0, _constants.borderRadius)());
50
+ var codeMd = (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n width: 50px;\n text-align: center;\n"])), (0, _tokens.token)('color.background.neutral', colors.N20), (0, _constants.borderRadius)());
49
51
  exports.codeMd = codeMd;
50
- var codeLg = (0, _react.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n padding: 0 10px;\n text-align: center;\n"])), colors.N20, (0, _constants.borderRadius)());
52
+ var codeLg = (0, _react.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n padding: 0 10px;\n text-align: center;\n"])), (0, _tokens.token)('color.background.neutral', colors.N20), (0, _constants.borderRadius)());
51
53
  exports.codeLg = codeLg;