@atlaskit/editor-core 182.0.2 → 182.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 (266) hide show
  1. package/.eslintrc.js +2 -0
  2. package/CHANGELOG.md +46 -0
  3. package/README.md +20 -0
  4. package/architecture/0001-record-architecture-decisions.md +25 -0
  5. package/architecture/0002-deep-equality-check-for-getsharedstate.md +67 -0
  6. package/architecture/0003-explicit-plugin-dependencies.md +291 -0
  7. package/dist/cjs/actions/index.js +17 -6
  8. package/dist/cjs/analytics-api/attach-payload-into-transaction.js +2 -1
  9. package/dist/cjs/create-editor/ErrorBoundary.js +1 -16
  10. package/dist/cjs/create-editor/ReactEditorViewInternal.js +3 -3
  11. package/dist/cjs/editor-next/editor-internal.js +2 -1
  12. package/dist/cjs/editor-next/index.js +5 -1
  13. package/dist/cjs/editor.js +9 -5
  14. package/dist/cjs/keymaps/index.js +12 -0
  15. package/dist/cjs/labs/next/internal/hooks/use-editor/index.js +5 -7
  16. package/dist/cjs/labs/next/presets/default.js +1 -2
  17. package/dist/cjs/plugins/card/index.js +16 -5
  18. package/dist/cjs/plugins/card/pm-plugins/actions.js +10 -1
  19. package/dist/cjs/plugins/card/pm-plugins/analytics/create-analytics-queue.js +48 -0
  20. package/dist/cjs/plugins/card/pm-plugins/analytics/events-from-tr.js +337 -0
  21. package/dist/cjs/plugins/card/pm-plugins/analytics/index.js +19 -0
  22. package/dist/cjs/plugins/card/pm-plugins/analytics/types.js +5 -0
  23. package/dist/cjs/plugins/card/pm-plugins/analytics/utils.js +139 -0
  24. package/dist/cjs/plugins/card/pm-plugins/doc.js +99 -22
  25. package/dist/cjs/plugins/card/pm-plugins/main.js +16 -10
  26. package/dist/cjs/plugins/card/pm-plugins/reducers.js +7 -0
  27. package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +3 -7
  28. package/dist/cjs/plugins/card/toolbar.js +18 -8
  29. package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +12 -8
  30. package/dist/cjs/plugins/card/ui/EditorSmartCardEventsNext.js +202 -0
  31. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +12 -4
  32. package/dist/cjs/plugins/card/utils.js +4 -2
  33. package/dist/cjs/plugins/extension/context-panel.js +3 -2
  34. package/dist/cjs/plugins/extension/index.js +4 -1
  35. package/dist/cjs/plugins/help-dialog/ui/index.js +29 -8
  36. package/dist/cjs/plugins/hyperlink/Toolbar.js +12 -2
  37. package/dist/cjs/plugins/hyperlink/commands.js +9 -5
  38. package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +4 -0
  39. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +2 -2
  40. package/dist/cjs/plugins/index.js +0 -7
  41. package/dist/cjs/plugins/insert-block/index.js +5 -1
  42. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +25 -23
  43. package/dist/cjs/plugins/media/index.js +9 -5
  44. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +7 -1
  45. package/dist/cjs/plugins/media/pm-plugins/main.js +5 -4
  46. package/dist/cjs/plugins/media/utils/media-single.js +1 -4
  47. package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +2 -1
  48. package/dist/cjs/plugins/paste/handlers.js +5 -5
  49. package/dist/cjs/plugins/paste/index.js +4 -2
  50. package/dist/cjs/plugins/paste/pm-plugins/main.js +6 -4
  51. package/dist/cjs/plugins/rule/commands.js +2 -2
  52. package/dist/cjs/plugins/rule/index.js +5 -4
  53. package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +6 -8
  54. package/dist/cjs/plugins/rule/pm-plugins/keymap.js +2 -2
  55. package/dist/cjs/plugins/text-color/index.js +5 -2
  56. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +3 -4
  57. package/dist/cjs/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +10 -0
  58. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -4
  59. package/dist/cjs/ui/ColorPalette/index.js +6 -0
  60. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +15 -10
  61. package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +3 -1
  62. package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +248 -17
  63. package/dist/cjs/ui/ConfigPanel/FormContent.js +12 -6
  64. package/dist/cjs/ui/ConfigPanel/utils.js +2 -12
  65. package/dist/cjs/ui/ContentStyles/index.js +2 -5
  66. package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +16 -8
  67. package/dist/cjs/utils/document.js +5 -3
  68. package/dist/cjs/version-wrapper.js +1 -1
  69. package/dist/cjs/version.json +1 -1
  70. package/dist/es2019/actions/index.js +10 -4
  71. package/dist/es2019/analytics-api/attach-payload-into-transaction.js +2 -1
  72. package/dist/es2019/create-editor/ErrorBoundary.js +1 -13
  73. package/dist/es2019/create-editor/ReactEditorViewInternal.js +2 -2
  74. package/dist/es2019/editor-next/editor-internal.js +2 -1
  75. package/dist/es2019/editor-next/index.js +5 -1
  76. package/dist/es2019/editor.js +5 -2
  77. package/dist/es2019/keymaps/index.js +1 -1
  78. package/dist/es2019/labs/next/internal/hooks/use-editor/index.js +4 -6
  79. package/dist/es2019/labs/next/presets/default.js +1 -2
  80. package/dist/es2019/plugins/card/index.js +15 -5
  81. package/dist/es2019/plugins/card/pm-plugins/actions.js +4 -0
  82. package/dist/es2019/plugins/card/pm-plugins/analytics/create-analytics-queue.js +38 -0
  83. package/dist/es2019/plugins/card/pm-plugins/analytics/events-from-tr.js +316 -0
  84. package/dist/es2019/plugins/card/pm-plugins/analytics/index.js +2 -0
  85. package/dist/es2019/plugins/card/pm-plugins/analytics/types.js +1 -0
  86. package/dist/es2019/plugins/card/pm-plugins/analytics/utils.js +124 -0
  87. package/dist/es2019/plugins/card/pm-plugins/doc.js +94 -20
  88. package/dist/es2019/plugins/card/pm-plugins/main.js +17 -8
  89. package/dist/es2019/plugins/card/pm-plugins/reducers.js +8 -0
  90. package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +3 -7
  91. package/dist/es2019/plugins/card/toolbar.js +16 -8
  92. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +13 -9
  93. package/dist/es2019/plugins/card/ui/EditorSmartCardEventsNext.js +180 -0
  94. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +11 -2
  95. package/dist/es2019/plugins/card/utils.js +6 -2
  96. package/dist/es2019/plugins/extension/context-panel.js +3 -2
  97. package/dist/es2019/plugins/extension/index.js +45 -41
  98. package/dist/es2019/plugins/help-dialog/ui/index.js +17 -1
  99. package/dist/es2019/plugins/hyperlink/Toolbar.js +13 -4
  100. package/dist/es2019/plugins/hyperlink/commands.js +9 -6
  101. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +4 -0
  102. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +2 -2
  103. package/dist/es2019/plugins/index.js +0 -1
  104. package/dist/es2019/plugins/insert-block/index.js +96 -91
  105. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -2
  106. package/dist/es2019/plugins/media/index.js +202 -198
  107. package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +9 -1
  108. package/dist/es2019/plugins/media/pm-plugins/main.js +5 -4
  109. package/dist/es2019/plugins/media/utils/media-single.js +1 -5
  110. package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +3 -2
  111. package/dist/es2019/plugins/paste/handlers.js +6 -6
  112. package/dist/es2019/plugins/paste/index.js +18 -14
  113. package/dist/es2019/plugins/paste/pm-plugins/main.js +7 -5
  114. package/dist/es2019/plugins/rule/commands.js +2 -2
  115. package/dist/es2019/plugins/rule/index.js +49 -46
  116. package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +6 -7
  117. package/dist/es2019/plugins/rule/pm-plugins/keymap.js +2 -2
  118. package/dist/es2019/plugins/text-color/index.js +49 -44
  119. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +3 -3
  120. package/dist/es2019/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +10 -0
  121. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +2 -4
  122. package/dist/es2019/ui/ColorPalette/index.js +2 -2
  123. package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +8 -4
  124. package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +3 -1
  125. package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +238 -13
  126. package/dist/es2019/ui/ConfigPanel/FormContent.js +12 -6
  127. package/dist/es2019/ui/ConfigPanel/utils.js +1 -11
  128. package/dist/es2019/ui/ContentStyles/index.js +2 -5
  129. package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +12 -10
  130. package/dist/es2019/utils/document.js +5 -3
  131. package/dist/es2019/version-wrapper.js +1 -1
  132. package/dist/es2019/version.json +1 -1
  133. package/dist/esm/actions/index.js +17 -6
  134. package/dist/esm/analytics-api/attach-payload-into-transaction.js +2 -1
  135. package/dist/esm/create-editor/ErrorBoundary.js +1 -16
  136. package/dist/esm/create-editor/ReactEditorViewInternal.js +2 -2
  137. package/dist/esm/editor-next/editor-internal.js +2 -1
  138. package/dist/esm/editor-next/index.js +5 -1
  139. package/dist/esm/editor.js +9 -5
  140. package/dist/esm/keymaps/index.js +1 -1
  141. package/dist/esm/labs/next/internal/hooks/use-editor/index.js +4 -6
  142. package/dist/esm/labs/next/presets/default.js +1 -2
  143. package/dist/esm/plugins/card/index.js +13 -5
  144. package/dist/esm/plugins/card/pm-plugins/actions.js +8 -0
  145. package/dist/esm/plugins/card/pm-plugins/analytics/create-analytics-queue.js +41 -0
  146. package/dist/esm/plugins/card/pm-plugins/analytics/events-from-tr.js +328 -0
  147. package/dist/esm/plugins/card/pm-plugins/analytics/index.js +2 -0
  148. package/dist/esm/plugins/card/pm-plugins/analytics/types.js +1 -0
  149. package/dist/esm/plugins/card/pm-plugins/analytics/utils.js +124 -0
  150. package/dist/esm/plugins/card/pm-plugins/doc.js +98 -22
  151. package/dist/esm/plugins/card/pm-plugins/main.js +16 -10
  152. package/dist/esm/plugins/card/pm-plugins/reducers.js +7 -0
  153. package/dist/esm/plugins/card/pm-plugins/util/resolve.js +3 -7
  154. package/dist/esm/plugins/card/toolbar.js +18 -8
  155. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +13 -9
  156. package/dist/esm/plugins/card/ui/EditorSmartCardEventsNext.js +191 -0
  157. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +12 -4
  158. package/dist/esm/plugins/card/utils.js +4 -2
  159. package/dist/esm/plugins/extension/context-panel.js +3 -2
  160. package/dist/esm/plugins/extension/index.js +4 -1
  161. package/dist/esm/plugins/help-dialog/ui/index.js +29 -8
  162. package/dist/esm/plugins/hyperlink/Toolbar.js +13 -3
  163. package/dist/esm/plugins/hyperlink/commands.js +9 -5
  164. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +4 -0
  165. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +2 -2
  166. package/dist/esm/plugins/index.js +0 -1
  167. package/dist/esm/plugins/insert-block/index.js +5 -1
  168. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +25 -23
  169. package/dist/esm/plugins/media/index.js +9 -5
  170. package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +7 -1
  171. package/dist/esm/plugins/media/pm-plugins/main.js +5 -4
  172. package/dist/esm/plugins/media/utils/media-single.js +1 -4
  173. package/dist/esm/plugins/panel/pm-plugins/keymaps.js +3 -2
  174. package/dist/esm/plugins/paste/handlers.js +6 -6
  175. package/dist/esm/plugins/paste/index.js +4 -2
  176. package/dist/esm/plugins/paste/pm-plugins/main.js +7 -5
  177. package/dist/esm/plugins/rule/commands.js +2 -2
  178. package/dist/esm/plugins/rule/index.js +5 -4
  179. package/dist/esm/plugins/rule/pm-plugins/input-rule.js +6 -8
  180. package/dist/esm/plugins/rule/pm-plugins/keymap.js +2 -2
  181. package/dist/esm/plugins/text-color/index.js +5 -2
  182. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +3 -4
  183. package/dist/esm/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +10 -0
  184. package/dist/esm/ui/Appearance/FullPage/FullPage.js +2 -4
  185. package/dist/esm/ui/ColorPalette/index.js +2 -2
  186. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +15 -10
  187. package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +3 -1
  188. package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +244 -19
  189. package/dist/esm/ui/ConfigPanel/FormContent.js +12 -6
  190. package/dist/esm/ui/ConfigPanel/utils.js +0 -10
  191. package/dist/esm/ui/ContentStyles/index.js +2 -5
  192. package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +16 -8
  193. package/dist/esm/utils/document.js +5 -3
  194. package/dist/esm/version-wrapper.js +1 -1
  195. package/dist/esm/version.json +1 -1
  196. package/dist/types/actions/index.d.ts +3 -2
  197. package/dist/types/create-editor/ErrorBoundary.d.ts +2 -2
  198. package/dist/types/editor-next/index.d.ts +1 -0
  199. package/dist/types/editor.d.ts +1 -0
  200. package/dist/types/keymaps/index.d.ts +1 -1
  201. package/dist/types/labs/next/internal/hooks/use-editor/index.d.ts +2 -1
  202. package/dist/types/labs/next/presets/cxhtml.d.ts +1 -5
  203. package/dist/types/labs/next/presets/default.d.ts +2 -10
  204. package/dist/types/labs/next/presets/mobile.d.ts +1 -5
  205. package/dist/types/plugins/card/pm-plugins/actions.d.ts +2 -1
  206. package/dist/types/plugins/card/pm-plugins/analytics/create-analytics-queue.d.ts +10 -0
  207. package/dist/types/plugins/card/pm-plugins/analytics/events-from-tr.d.ts +17 -0
  208. package/dist/types/plugins/card/pm-plugins/analytics/index.d.ts +2 -0
  209. package/dist/types/plugins/card/pm-plugins/analytics/types.d.ts +10 -0
  210. package/dist/types/plugins/card/pm-plugins/analytics/utils.d.ts +26 -0
  211. package/dist/types/plugins/card/pm-plugins/doc.d.ts +8 -7
  212. package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
  213. package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +2 -2
  214. package/dist/types/plugins/card/pm-plugins/util/state.d.ts +3 -0
  215. package/dist/types/plugins/card/types.d.ts +81 -7
  216. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +2 -1
  217. package/dist/types/plugins/card/ui/EditorSmartCardEventsNext.d.ts +18 -0
  218. package/dist/types/plugins/card/utils.d.ts +1 -1
  219. package/dist/types/plugins/extension/context-panel.d.ts +2 -1
  220. package/dist/types/plugins/extension/index.d.ts +2 -0
  221. package/dist/types/plugins/hyperlink/commands.d.ts +3 -2
  222. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +2 -1
  223. package/dist/types/plugins/index.d.ts +0 -1
  224. package/dist/types/plugins/insert-block/index.d.ts +2 -0
  225. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +2 -1
  226. package/dist/types/plugins/media/index.d.ts +2 -0
  227. package/dist/types/plugins/media/pm-plugins/main.d.ts +3 -2
  228. package/dist/types/plugins/media/utils/media-single.d.ts +1 -1
  229. package/dist/types/plugins/paste/index.d.ts +2 -0
  230. package/dist/types/plugins/paste/pm-plugins/main.d.ts +2 -1
  231. package/dist/types/plugins/rule/commands.d.ts +2 -1
  232. package/dist/types/plugins/rule/index.d.ts +5 -1
  233. package/dist/types/plugins/rule/pm-plugins/input-rule.d.ts +1 -1
  234. package/dist/types/plugins/rule/pm-plugins/keymap.d.ts +2 -1
  235. package/dist/types/plugins/text-color/index.d.ts +2 -0
  236. package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +2 -0
  237. package/dist/types/plugins/text-formatting/ui/Toolbar/toolbar-messages.d.ts +10 -0
  238. package/dist/types/types/editor-appearance-component.d.ts +1 -1
  239. package/dist/types/types/editor-props.d.ts +1 -0
  240. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +2 -0
  241. package/dist/types/ui/ColorPalette/index.d.ts +2 -2
  242. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +3 -1
  243. package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +3 -1
  244. package/dist/types/ui/ConfigPanel/Fields/ColorPicker.d.ts +12 -1
  245. package/dist/types/ui/ConfigPanel/FormContent.d.ts +2 -2
  246. package/dist/types/ui/ConfigPanel/types.d.ts +3 -0
  247. package/dist/types/ui/ConfigPanel/utils.d.ts +0 -1
  248. package/dist/types/ui/MediaAndEmbedsToolbar/index.d.ts +1 -1
  249. package/package.json +14 -13
  250. package/report.api.md +10 -0
  251. package/dist/cjs/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +0 -12
  252. package/dist/cjs/plugins/feature-flags-context/get-feature-flags.js +0 -11
  253. package/dist/cjs/plugins/feature-flags-context/index.js +0 -50
  254. package/dist/cjs/plugins/feature-flags-context/plugin-key.js +0 -9
  255. package/dist/es2019/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +0 -1
  256. package/dist/es2019/plugins/feature-flags-context/get-feature-flags.js +0 -2
  257. package/dist/es2019/plugins/feature-flags-context/index.js +0 -29
  258. package/dist/es2019/plugins/feature-flags-context/plugin-key.js +0 -2
  259. package/dist/esm/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +0 -1
  260. package/dist/esm/plugins/feature-flags-context/get-feature-flags.js +0 -4
  261. package/dist/esm/plugins/feature-flags-context/index.js +0 -40
  262. package/dist/esm/plugins/feature-flags-context/plugin-key.js +0 -2
  263. package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +0 -1
  264. package/dist/types/plugins/feature-flags-context/get-feature-flags.d.ts +0 -3
  265. package/dist/types/plugins/feature-flags-context/index.d.ts +0 -9
  266. package/dist/types/plugins/feature-flags-context/plugin-key.d.ts +0 -2
@@ -7,15 +7,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
7
7
  import { jsx, css } from '@emotion/react';
8
8
  import { Fragment } from 'react';
9
9
  import { Field } from '@atlaskit/form';
10
+ import { hexToEditorTableChartsPaletteColor } from '@atlaskit/editor-palette';
10
11
  import { DEFAULT_BORDER_COLOR } from '../../../ui/ColorPalette/Palettes/common';
11
- import { isValidHex } from '../utils';
12
12
  import { validate as _validate } from '../utils';
13
13
  import { gridSize } from '@atlaskit/theme/constants';
14
14
  import { requiredIndicator } from './common/RequiredIndicator';
15
15
  import { headingSizes } from '@atlaskit/theme/typography';
16
16
  import FieldMessages from '../FieldMessages';
17
17
  import ColorPickerButton from '../../ColorPickerButton';
18
-
18
+ import { chartsColorPaletteTooltipMessages } from '../../../ui/ColorPalette';
19
19
  /*
20
20
  NOTE: color used here are not yet in atlaskit code
21
21
  this is part of extended color pack from ADG, which is yet to be release
@@ -24,7 +24,7 @@ import ColorPickerButton from '../../ColorPickerButton';
24
24
  Colour sequence source: https://product-fabric.atlassian.net/browse/ED-12650?focusedCommentId=204875
25
25
  */
26
26
 
27
- var colorPalette = [{
27
+ export var colorPalette = [{
28
28
  label: 'Light Blue',
29
29
  value: '#7AB2FFFF'
30
30
  },
@@ -131,29 +131,253 @@ var colorPalette = [{
131
131
  border: DEFAULT_BORDER_COLOR
132
132
  });
133
133
  });
134
+
135
+ /**
136
+ * Extended chart colors.
137
+ * Decided here https://product-fabric.atlassian.net/wiki/spaces/EUXQ/pages/3477245015/Tokenising+table+charts+color
138
+ */
139
+ export var extendedColorPalette = [{
140
+ label: 'Darker Blue',
141
+ value: '#003884'
142
+ },
143
+ // 1000
144
+ {
145
+ label: 'Darker Teal',
146
+ value: '#206B74'
147
+ },
148
+ // 1000
149
+ {
150
+ label: 'Darker Green',
151
+ value: '#055C3F'
152
+ },
153
+ // 1000
154
+ {
155
+ label: 'Darker Yellow',
156
+ value: '#946104'
157
+ },
158
+ // 1000
159
+ {
160
+ label: 'Darker Orange',
161
+ value: '#974F0C'
162
+ },
163
+ // 1000
164
+ {
165
+ label: 'Darker Red',
166
+ value: '#A32000'
167
+ },
168
+ // 1000
169
+ {
170
+ label: 'Darker Magenta',
171
+ value: '#943D73'
172
+ },
173
+ // 1000
174
+ {
175
+ label: 'Darker Purple',
176
+ value: '#44368B'
177
+ },
178
+ // 1000
179
+ {
180
+ label: 'Darker Gray',
181
+ value: '#44546F'
182
+ },
183
+ // 1000
184
+
185
+ {
186
+ label: 'Dark Blue',
187
+ value: '#0055CC'
188
+ },
189
+ // 800
190
+ {
191
+ label: 'Dark Teal',
192
+ value: '#1D7F8C'
193
+ },
194
+ // 800
195
+ {
196
+ label: 'Dark Green',
197
+ value: '#177D52'
198
+ },
199
+ // 800
200
+ {
201
+ label: 'Dark Yellow',
202
+ value: '#FF9D00'
203
+ },
204
+ // 800
205
+ {
206
+ label: 'Dark Orange',
207
+ value: '#B65C02'
208
+ },
209
+ // 800
210
+ {
211
+ label: 'Dark Red',
212
+ value: '#D32D03'
213
+ },
214
+ // 800
215
+ {
216
+ label: 'Dark Magenta',
217
+ value: '#CD519D'
218
+ },
219
+ // 800
220
+ {
221
+ label: 'Dark Purple',
222
+ value: '#5A43D0'
223
+ },
224
+ // 800
225
+ {
226
+ label: 'Dark Gray',
227
+ value: '#758195'
228
+ },
229
+ // 800
230
+
231
+ {
232
+ label: 'Blue',
233
+ value: '#247FFF'
234
+ },
235
+ // 600
236
+ {
237
+ label: 'Teal',
238
+ value: '#1D9AAA'
239
+ },
240
+ // 600
241
+ {
242
+ label: 'Green',
243
+ value: '#23A971'
244
+ },
245
+ // 600
246
+ {
247
+ label: 'Yellow',
248
+ value: '#FFBE33'
249
+ },
250
+ // 600
251
+ {
252
+ label: 'Orange',
253
+ value: '#D97008'
254
+ },
255
+ // 600
256
+ {
257
+ label: 'Red',
258
+ value: '#FC552C'
259
+ },
260
+ // 600
261
+ {
262
+ label: 'Magenta',
263
+ value: '#DA62AC'
264
+ },
265
+ // 600
266
+ {
267
+ label: 'Purple',
268
+ value: '#8B77EE'
269
+ },
270
+ // 600
271
+ {
272
+ label: 'Gray',
273
+ value: '#8590A2'
274
+ },
275
+ // 600
276
+
277
+ {
278
+ label: 'Light Blue',
279
+ value: '#7AB2FF'
280
+ },
281
+ // 400
282
+ {
283
+ label: 'Light Teal',
284
+ value: '#60C6D2'
285
+ },
286
+ // 400
287
+ {
288
+ label: 'Light Green',
289
+ value: '#6BE1B0'
290
+ },
291
+ // 400
292
+ {
293
+ label: 'Light Yellow',
294
+ value: '#FFDB57'
295
+ },
296
+ // 400
297
+ {
298
+ label: 'Light Orange',
299
+ value: '#FAA53D'
300
+ },
301
+ // 400
302
+ {
303
+ label: 'Light Red',
304
+ value: '#FF8F73'
305
+ },
306
+ // 400
307
+ {
308
+ label: 'Light Magenta',
309
+ value: '#E774BB'
310
+ },
311
+ // 400
312
+ {
313
+ label: 'Light Purple',
314
+ value: '#B5A7FB'
315
+ },
316
+ // 400
317
+ {
318
+ label: 'Light Gray',
319
+ value: '#8993A5'
320
+ } // 400
321
+ ].map(function (color) {
322
+ return _objectSpread(_objectSpread({}, color), {}, {
323
+ border: DEFAULT_BORDER_COLOR
324
+ });
325
+ });
134
326
  var colorPickerWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: ", "px;\n padding-right: ", "px;\n"])), 4 * gridSize(), gridSize());
135
327
  var colorPickerLabel = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n margin-top: 0;\n"])), headingSizes.h400.size);
328
+ export var EXPANDED_COLOR_PICKER_COLUMNS = 9;
329
+ export var ORIGINAL_COLOR_PICKER_COLUMNS = 5;
136
330
  var ColorPicker = function ColorPicker(props) {
137
331
  var name = props.name,
138
332
  title = props.title,
139
333
  currentColor = props.currentColor,
140
- colorPalette = props.colorPalette,
141
334
  onChange = props.onChange,
142
- onFieldChange = props.onFieldChange;
335
+ onFieldChange = props.onFieldChange,
336
+ featureFlags = props.featureFlags;
143
337
  var onColorChange = function onColorChange(color) {
144
338
  var colorValue = color.value;
145
- if (!isValidHex(colorValue)) {
146
- throw new Error('invalid hex value');
147
- }
148
339
  onChange(colorValue);
149
340
  onFieldChange(name, currentColor !== colorValue);
150
341
  };
151
- return jsx(ColorPickerButton, {
342
+ var _ref = featureFlags !== null && featureFlags !== void 0 ? featureFlags : {
343
+ useSomewhatSemanticTextColorNames: false,
344
+ expandedChartColors: false
345
+ },
346
+ useSomewhatSemanticTextColorNames = _ref.useSomewhatSemanticTextColorNames,
347
+ expandedChartColors = _ref.expandedChartColors;
348
+ return expandedChartColors ? jsx(ColorPickerButton, {
349
+ title: title
350
+ // Original color palette had hex code with alpha channel.
351
+ // However, alpha channel was always FF, and it was not used
352
+ // Expanded color palette does not have alpha channel, so
353
+ // removing last two characters from hex code with alpha here.
354
+ ,
355
+ currentColor: currentColor.substring(0, 7),
356
+ onChange: onColorChange,
357
+ colorPalette: extendedColorPalette,
358
+ hexToPaletteColor: hexToEditorTableChartsPaletteColor,
359
+ paletteColorTooltipMessages: chartsColorPaletteTooltipMessages
360
+ // We did not want to create new FF or update
361
+ // useSomewhatSemanticTextColorNames name
362
+ // because it is temporary and require extra work.
363
+ // So even though it says text color names,
364
+ // we are going to use for all color pickers
365
+ // such as text, background and table charts.
366
+ ,
367
+ showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames,
368
+ cols: EXPANDED_COLOR_PICKER_COLUMNS,
369
+ alignX: "right",
370
+ placement: "ConfigPanel",
371
+ size: {
372
+ width: 3 * gridSize(),
373
+ height: 3 * gridSize()
374
+ }
375
+ }) : jsx(ColorPickerButton, {
152
376
  title: title,
153
377
  currentColor: currentColor,
154
378
  onChange: onColorChange,
155
379
  colorPalette: colorPalette,
156
- cols: 5,
380
+ cols: ORIGINAL_COLOR_PICKER_COLUMNS,
157
381
  alignX: "right",
158
382
  placement: "ConfigPanel",
159
383
  size: {
@@ -162,10 +386,11 @@ var ColorPicker = function ColorPicker(props) {
162
386
  }
163
387
  });
164
388
  };
165
- var ColorPickerField = function ColorPickerField(_ref) {
166
- var name = _ref.name,
167
- field = _ref.field,
168
- onFieldChange = _ref.onFieldChange;
389
+ var ColorPickerField = function ColorPickerField(_ref2) {
390
+ var name = _ref2.name,
391
+ field = _ref2.field,
392
+ onFieldChange = _ref2.onFieldChange,
393
+ featureFlags = _ref2.featureFlags;
169
394
  var label = field.label,
170
395
  defaultValue = field.defaultValue,
171
396
  isRequired = field.isRequired;
@@ -176,9 +401,9 @@ var ColorPickerField = function ColorPickerField(_ref) {
176
401
  validate: function validate(value) {
177
402
  return _validate(field, value || '');
178
403
  }
179
- }, function (_ref2) {
180
- var fieldProps = _ref2.fieldProps,
181
- error = _ref2.error;
404
+ }, function (_ref3) {
405
+ var fieldProps = _ref3.fieldProps,
406
+ error = _ref3.error;
182
407
  return jsx(Fragment, null, jsx("div", {
183
408
  css: colorPickerWrapper
184
409
  }, jsx("label", {
@@ -190,9 +415,9 @@ var ColorPickerField = function ColorPickerField(_ref) {
190
415
  name: name,
191
416
  title: label,
192
417
  currentColor: fieldProps.value,
193
- colorPalette: colorPalette,
194
418
  onChange: fieldProps.onChange,
195
- onFieldChange: onFieldChange
419
+ onFieldChange: onFieldChange,
420
+ featureFlags: featureFlags
196
421
  })), error && jsx(FieldMessages, {
197
422
  error: error,
198
423
  description: ""
@@ -26,7 +26,8 @@ export function FieldComponent(_ref) {
26
26
  parentName = _ref.parentName,
27
27
  extensionManifest = _ref.extensionManifest,
28
28
  firstVisibleFieldName = _ref.firstVisibleFieldName,
29
- onFieldChange = _ref.onFieldChange;
29
+ onFieldChange = _ref.onFieldChange,
30
+ featureFlags = _ref.featureFlags;
30
31
  var _field = field,
31
32
  name = _field.name,
32
33
  type = _field.type;
@@ -67,7 +68,8 @@ export function FieldComponent(_ref) {
67
68
  return /*#__PURE__*/React.createElement(ColorPicker, {
68
69
  name: parentedName,
69
70
  field: field,
70
- onFieldChange: onFieldChange
71
+ onFieldChange: onFieldChange,
72
+ featureFlags: featureFlags
71
73
  });
72
74
  case 'date':
73
75
  return /*#__PURE__*/React.createElement(Date, {
@@ -136,7 +138,8 @@ export function FieldComponent(_ref) {
136
138
  fields: field.fields,
137
139
  parameters: resolvedParameters,
138
140
  onFieldChange: onFieldChange,
139
- extensionManifest: extensionManifest
141
+ extensionManifest: extensionManifest,
142
+ featureFlags: featureFlags
140
143
  }));
141
144
  }
142
145
  case 'tab-group':
@@ -153,7 +156,8 @@ export function FieldComponent(_ref) {
153
156
  fields: tabField.fields,
154
157
  parameters: tabParameters,
155
158
  onFieldChange: onFieldChange,
156
- extensionManifest: extensionManifest
159
+ extensionManifest: extensionManifest,
160
+ featureFlags: featureFlags
157
161
  });
158
162
  };
159
163
  return /*#__PURE__*/React.createElement(TabGroup, {
@@ -185,7 +189,8 @@ export default function FormContent(_ref3) {
185
189
  onClickRemove = _ref3.onClickRemove,
186
190
  onFieldChange = _ref3.onFieldChange,
187
191
  firstVisibleFieldName = _ref3.firstVisibleFieldName,
188
- contextIdentifierProvider = _ref3.contextIdentifierProvider;
192
+ contextIdentifierProvider = _ref3.contextIdentifierProvider,
193
+ featureFlags = _ref3.featureFlags;
189
194
  return /*#__PURE__*/React.createElement(FormErrorBoundary, {
190
195
  contextIdentifierProvider: contextIdentifierProvider,
191
196
  extensionKey: extensionManifest.key,
@@ -197,7 +202,8 @@ export default function FormContent(_ref3) {
197
202
  parentName: parentName,
198
203
  extensionManifest: extensionManifest,
199
204
  firstVisibleFieldName: firstVisibleFieldName,
200
- onFieldChange: onFieldChange
205
+ onFieldChange: onFieldChange,
206
+ featureFlags: featureFlags
201
207
  });
202
208
 
203
209
  // only to be supported by String fields at this time
@@ -47,14 +47,4 @@ export var isDuplicateField = function isDuplicateField(key) {
47
47
  };
48
48
  export var getNameFromDuplicateField = function getNameFromDuplicateField(key) {
49
49
  return key.replace(duplicateFieldRegex, '');
50
- };
51
-
52
- /*
53
- ColorPickerButton only accepts 8 digit hex alpha values, for example:
54
- #123fffaa (8 digits, hex alpha)
55
- */
56
-
57
- export var isValidHex = function isValidHex(color) {
58
- var hexRegexPattern = new RegExp('^#([a-fA-F0-9]{8})$');
59
- return hexRegexPattern.test(color);
60
50
  };
@@ -33,7 +33,6 @@ import { statusStyles } from '../../plugins/status/styles';
33
33
  import { smartCardStyles } from '../../plugins/card/styles';
34
34
  import { dateStyles } from '../../plugins/date/styles';
35
35
  import { embedCardStyles } from '../../plugins/card/ui/styled';
36
- import { useFeatureFlags } from '../../plugins/feature-flags-context';
37
36
  import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
38
37
  var contentStyles = function contentStyles(props) {
39
38
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
@@ -42,16 +41,14 @@ var contentStyles = function contentStyles(props) {
42
41
  };
43
42
  export var createEditorContentStyle = function createEditorContentStyle(styles) {
44
43
  return /*#__PURE__*/React.forwardRef(function (props, ref) {
45
- var featureFlags = useFeatureFlags();
46
44
  var className = props.className,
47
45
  children = props.children;
48
46
  var theme = useTheme();
49
47
  var memoizedStyle = useMemo(function () {
50
48
  return contentStyles({
51
- theme: theme,
52
- featureFlags: featureFlags
49
+ theme: theme
53
50
  });
54
- }, [theme, featureFlags]);
51
+ }, [theme]);
55
52
  return jsx("div", {
56
53
  className: className,
57
54
  ref: ref,
@@ -119,19 +119,27 @@ var shouldHideLayoutToolbar = function shouldHideLayoutToolbar(selection, _ref2,
119
119
  return hasParentNodeOfType([nodes.bodiedExtension, nodes.listItem, nodes.expand, nodes.nestedExpand].concat(_toConsumableArray(allowResizingInTables ? [] : [nodes.table])).filter(Boolean))(selection);
120
120
  };
121
121
  var buildLayoutButtons = function buildLayoutButtons(state, intl, nodeType, allowResizing, allowResizingInTables) {
122
+ var allowWrapping = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
123
+ var allowAlignment = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
122
124
  var selection = state.selection;
123
125
  if (!(selection instanceof NodeSelection) || !selection.node || !nodeType || shouldHideLayoutToolbar(selection, state.schema, allowResizingInTables)) {
124
126
  return [];
125
127
  }
126
128
  var layout = selection.node.attrs.layout;
127
- var toolbarItems = [].concat(_toConsumableArray(mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType)), [{
129
+ var alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType) : [];
130
+ var wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType) : [];
131
+ var breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType) : [];
132
+ var items = [].concat(_toConsumableArray(alignmentToolbarItems), _toConsumableArray(getSeparatorBetweenAlignmentAndWrapping(allowAlignment, allowWrapping)), _toConsumableArray(wrappingToolbarItems), _toConsumableArray(getSeparatorBeforeBreakoutItems(allowAlignment, allowWrapping, allowResizing)), _toConsumableArray(breakOutToolbarItems));
133
+ return items;
134
+ };
135
+ var getSeparatorBetweenAlignmentAndWrapping = function getSeparatorBetweenAlignmentAndWrapping(allowAlignment, allowWrapping) {
136
+ return allowAlignment && allowWrapping ? [{
128
137
  type: 'separator'
129
- }], _toConsumableArray(mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType)));
130
- if (!allowResizing) {
131
- toolbarItems = toolbarItems.concat([{
132
- type: 'separator'
133
- }].concat(_toConsumableArray(mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType))));
134
- }
135
- return toolbarItems;
138
+ }] : [];
139
+ };
140
+ var getSeparatorBeforeBreakoutItems = function getSeparatorBeforeBreakoutItems(allowAlignment, allowWrapping, allowResizing) {
141
+ return !allowResizing && (allowAlignment || allowWrapping) ? [{
142
+ type: 'separator'
143
+ }] : [];
136
144
  };
137
145
  export default buildLayoutButtons;
@@ -300,10 +300,12 @@ var maySanitizePrivateContent = function maySanitizePrivateContent(entity, provi
300
300
  export var getStepRange = function getStepRange(transaction) {
301
301
  var from = -1;
302
302
  var to = -1;
303
- transaction.steps.forEach(function (step) {
304
- step.getMap().forEach(function (_oldStart, _oldEnd, newStart, newEnd) {
303
+ transaction.mapping.maps.forEach(function (stepMap, index) {
304
+ stepMap.forEach(function (oldStart, oldEnd) {
305
+ var newStart = transaction.mapping.slice(index).map(oldStart, -1);
306
+ var newEnd = transaction.mapping.slice(index).map(oldEnd);
305
307
  from = newStart < from || from === -1 ? newStart : from;
306
- to = newEnd < to || to === -1 ? newEnd : to;
308
+ to = newEnd > to || to === -1 ? newEnd : to;
307
309
  });
308
310
  });
309
311
  if (from !== -1) {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "182.0.2";
2
+ export var version = "182.1.0";
3
3
  export var nextMajorVersion = function 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": "182.0.2",
3
+ "version": "182.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -2,7 +2,7 @@ import { Node } from 'prosemirror-model';
2
2
  import { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue } from '@atlaskit/editor-common/types';
3
3
  import { AnalyticsEventPayload } from '@atlaskit/analytics-next/AnalyticsEvent';
4
4
  import { ResolvedEditorState } from '@atlaskit/editor-common/collab';
5
- import { Transformer } from '@atlaskit/editor-common/types';
5
+ import type { FeatureFlags, Transformer } from '@atlaskit/editor-common/types';
6
6
  import { EditorView } from 'prosemirror-view';
7
7
  import { EventDispatcher } from '../event-dispatcher';
8
8
  export default class EditorActions<T = any> implements EditorActionsOptions<T> {
@@ -14,7 +14,8 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
14
14
  static from<T>(view: EditorView, eventDispatcher: EventDispatcher, transformer?: Transformer<T>): EditorActions<T>;
15
15
  _privateGetEditorView(): EditorView | undefined;
16
16
  _privateGetEventDispatcher(): EventDispatcher | undefined;
17
- _privateRegisterEditor(editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer<T>): void;
17
+ private getFeatureFlags;
18
+ _privateRegisterEditor(editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer<T>, getFeatureFlags?: () => FeatureFlags): void;
18
19
  _privateUnregisterEditor(): void;
19
20
  _privateSubscribe(cb: ContextUpdateHandler): void;
20
21
  _privateUnsubscribe(cb: ContextUpdateHandler): void;
@@ -11,6 +11,7 @@ export declare type ErrorBoundaryProps = {
11
11
  editorView?: EditorView;
12
12
  rethrow?: boolean;
13
13
  children: React.ReactNode;
14
+ featureFlags: FeatureFlags;
14
15
  };
15
16
  export declare type ErrorBoundaryState = {
16
17
  error?: Error;
@@ -19,6 +20,7 @@ declare type AnalyticsErrorBoundaryErrorInfo = {
19
20
  componentStack: string;
20
21
  };
21
22
  export declare class ErrorBoundaryWithEditorView extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
23
+ featureFlags: FeatureFlags;
22
24
  browserExtensions?: UserBrowserExtensionResults;
23
25
  experienceStore?: ExperienceStore;
24
26
  static defaultProps: {
@@ -27,8 +29,6 @@ export declare class ErrorBoundaryWithEditorView extends React.Component<ErrorBo
27
29
  state: {
28
30
  error: undefined;
29
31
  };
30
- private getFeatureFlags;
31
- get featureFlags(): FeatureFlags;
32
32
  constructor(props: ErrorBoundaryProps);
33
33
  private sendErrorData;
34
34
  private getProductName;
@@ -28,6 +28,7 @@ export default class EditorNext extends React.Component<EditorNextProps> {
28
28
  private handleSave;
29
29
  private handleAnalyticsEvent;
30
30
  private registerEditorForActions;
31
+ private getFeatureFlags;
31
32
  private unregisterEditorFromActions;
32
33
  private getExperienceStore;
33
34
  render(): jsx.JSX.Element;
@@ -133,6 +133,7 @@ export default class Editor extends React.Component<EditorProps, ProviderFactory
133
133
  * and need to find a workaround.
134
134
  */
135
135
  registerEditorForActions(editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer<string>): void;
136
+ private getFeatureFlags;
136
137
  /**
137
138
  * @private
138
139
  * @deprecated - Do not override this at all, this is an antipattern.
@@ -1,2 +1,2 @@
1
- export { addAltText, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, cut, copy, paste, altPaste, find, alignLeft, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP, } from '@atlaskit/editor-common/keymaps';
1
+ export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, cut, copy, paste, altPaste, find, alignLeft, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP, } from '@atlaskit/editor-common/keymaps';
2
2
  export type { Keymap } from '@atlaskit/editor-common/keymaps';
@@ -1,10 +1,11 @@
1
1
  import EditorActions from '../../../../../actions';
2
2
  import { EditorSharedConfig } from '../../context/shared-config';
3
3
  import { CreateEditorParams } from './create-editor';
4
+ import { FeatureFlags } from '@atlaskit/editor-common/types';
4
5
  export declare function useEditor(config: CreateEditorParams & {
5
6
  editorActions?: EditorActions;
6
7
  }): [EditorSharedConfig | null, (ref: HTMLDivElement | null) => void];
7
8
  /**
8
9
  * Handles editor component unmount
9
10
  */
10
- export declare function useHandleEditorLifecycle(editorSharedConfig: EditorSharedConfig | null): void;
11
+ export declare function useHandleEditorLifecycle(editorSharedConfig: EditorSharedConfig | null, featureFlags: FeatureFlags): void;
@@ -8,7 +8,7 @@ export declare type EditorPresetCXHTMLProps = {
8
8
  mentionProvider?: Promise<MentionProvider>;
9
9
  mediaProvider?: Promise<MediaProvider>;
10
10
  } & EditorPresetProps;
11
- export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeholder, featureFlags, }: EditorPresetCXHTMLProps): import("@atlaskit/editor-common/preset").EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "featureFlagsContext", "selection", "codeBlock"], [(config: import("../../../plugins/code-block/types").CodeBlockOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"codeBlock", {
11
+ export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeholder, featureFlags, }: EditorPresetCXHTMLProps): import("@atlaskit/editor-common/preset").EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "selection", "codeBlock"], [(config: import("../../../plugins/code-block/types").CodeBlockOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"codeBlock", {
12
12
  pluginConfiguration: import("../../../plugins/code-block/types").CodeBlockOptions;
13
13
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"codeBlock", {
14
14
  pluginConfiguration: import("../../../plugins/code-block/types").CodeBlockOptions;
@@ -16,10 +16,6 @@ export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeh
16
16
  pluginConfiguration: import("../../../plugins/selection/types").SelectionPluginOptions | undefined;
17
17
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"selection", {
18
18
  pluginConfiguration: import("../../../plugins/selection/types").SelectionPluginOptions | undefined;
19
- }>, (config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlagsContext", {
20
- pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
21
- }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"featureFlagsContext", {
22
- pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
23
19
  }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"floatingToolbar", {
24
20
  dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
25
21
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
@@ -34,7 +34,7 @@ export declare type DefaultPresetPluginOptions = {
34
34
  * Note: The order that presets are added determines
35
35
  * their placement in the editor toolbar
36
36
  */
37
- export declare function createDefaultPreset(options: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "featureFlagsContext", "selection", "codeBlock"], [(config: CodeBlockOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"codeBlock", {
37
+ export declare function createDefaultPreset(options: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "selection", "codeBlock"], [(config: CodeBlockOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"codeBlock", {
38
38
  pluginConfiguration: CodeBlockOptions;
39
39
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"codeBlock", {
40
40
  pluginConfiguration: CodeBlockOptions;
@@ -42,10 +42,6 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
42
42
  pluginConfiguration: SelectionPluginOptions | undefined;
43
43
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"selection", {
44
44
  pluginConfiguration: SelectionPluginOptions | undefined;
45
- }>, (config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlagsContext", {
46
- pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
47
- }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"featureFlagsContext", {
48
- pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
49
45
  }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"floatingToolbar", {
50
46
  dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
51
47
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
@@ -101,7 +97,7 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
101
97
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
102
98
  }>];
103
99
  }>, ...import("@atlaskit/editor-common/types").AllEditorPresetPluginTypes[]]>;
104
- export declare function useDefaultPreset(props: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "featureFlagsContext", "selection", "codeBlock"], [(config: CodeBlockOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"codeBlock", {
100
+ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPresetPluginOptions): EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "selection", "codeBlock"], [(config: CodeBlockOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"codeBlock", {
105
101
  pluginConfiguration: CodeBlockOptions;
106
102
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"codeBlock", {
107
103
  pluginConfiguration: CodeBlockOptions;
@@ -109,10 +105,6 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
109
105
  pluginConfiguration: SelectionPluginOptions | undefined;
110
106
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"selection", {
111
107
  pluginConfiguration: SelectionPluginOptions | undefined;
112
- }>, (config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlagsContext", {
113
- pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
114
- }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"featureFlagsContext", {
115
- pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
116
108
  }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"floatingToolbar", {
117
109
  dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
118
110
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;