@atlaskit/editor-core 220.0.3 → 220.1.1

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 (243) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/codemods/createRenameVariableTransform.ts +17 -0
  3. package/codemods/findImportFromPackage.ts +54 -0
  4. package/codemods/migrates/createJSXRenameVariableToNestedKeyTransform.ts +43 -0
  5. package/codemods/migrates/createUpdateEditorToMigrationComponent.ts +25 -0
  6. package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +1 -1
  7. package/codemods/migrates/remove-config-panel-width-prop.ts +1 -1
  8. package/codemods/migrates/rename-editor-to-editor-migration-component.ts +1 -22
  9. package/codemods/migrates/rename-smartlinks-prop.ts +1 -40
  10. package/codemods/migrates/rename-unsafe-allowUndoRedoButtons-prop.ts +1 -1
  11. package/codemods/migrates/rename-unsafe-cards-prop.ts +1 -1
  12. package/codemods/utils.ts +0 -67
  13. package/dist/cjs/actions/isEmptyParagraph.js +12 -0
  14. package/dist/cjs/actions/temp-is-empty-document.js +2 -9
  15. package/dist/cjs/composable-editor/BaseThemeWrapper.js +24 -5
  16. package/dist/cjs/composable-editor/editor-internal-compiled.js +5 -1
  17. package/dist/cjs/composable-editor/editor-internal-emotion.js +6 -2
  18. package/dist/cjs/composable-editor/editor-internal.js +11 -2
  19. package/dist/cjs/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
  20. package/dist/cjs/create-editor/ReactEditorView.js +6 -4
  21. package/dist/cjs/create-editor/addMetadataAttributes.js +36 -0
  22. package/dist/cjs/create-editor/create-editor.js +0 -62
  23. package/dist/cjs/create-editor/create-plugins-list.js +2 -15
  24. package/dist/cjs/create-editor/create-schema.js +4 -35
  25. package/dist/cjs/create-editor/createErrorReporter.js +14 -0
  26. package/dist/cjs/create-editor/createPMPlugins.js +39 -0
  27. package/dist/cjs/create-editor/fixExcludes.js +22 -0
  28. package/dist/cjs/create-editor/getScrollGutterOptions.js +19 -0
  29. package/dist/cjs/create-editor/sortByRank.js +9 -0
  30. package/dist/cjs/entry-points/test-utils.js +4 -2
  31. package/dist/cjs/isElementBySelectorInDocument.js +15 -0
  32. package/dist/cjs/setTextSelection.js +12 -0
  33. package/dist/cjs/test-utils.js +1 -18
  34. package/dist/cjs/ui/Addon/checkForModal.js +25 -0
  35. package/dist/cjs/ui/Addon/click-area-helper.js +5 -52
  36. package/dist/cjs/ui/Addon/outsideProsemirrorEditorClickHandler.js +35 -0
  37. package/dist/cjs/ui/Appearance/Chromeless.js +4 -16
  38. package/dist/cjs/ui/Appearance/ChromelessEditorContainer.js +19 -0
  39. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +13 -0
  40. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
  41. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +5 -2
  42. package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +2 -15
  43. package/dist/cjs/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +13 -0
  44. package/dist/cjs/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +13 -0
  45. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +15 -21
  46. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +12 -17
  47. package/dist/cjs/ui/EditorContentContainer/styles/mentions.js +19 -0
  48. package/dist/cjs/utils/combineQuickInsertProviders.js +16 -0
  49. package/dist/cjs/utils/extensions.js +0 -11
  50. package/dist/cjs/utils/getNodesVisibleInViewport.js +3 -12
  51. package/dist/cjs/utils/isNodeVisible.js +15 -0
  52. package/dist/cjs/utils/prepare-quick-insert-provider.js +2 -1
  53. package/dist/cjs/utils/validNode.js +14 -0
  54. package/dist/cjs/utils/validateNodes.js +3 -11
  55. package/dist/cjs/version-wrapper.js +1 -1
  56. package/dist/es2019/actions/isEmptyParagraph.js +6 -0
  57. package/dist/es2019/actions/temp-is-empty-document.js +1 -6
  58. package/dist/es2019/composable-editor/BaseThemeWrapper.js +19 -3
  59. package/dist/es2019/composable-editor/editor-internal-compiled.js +5 -1
  60. package/dist/es2019/composable-editor/editor-internal-emotion.js +6 -2
  61. package/dist/es2019/composable-editor/editor-internal.js +11 -2
  62. package/dist/es2019/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
  63. package/dist/es2019/create-editor/ReactEditorView.js +3 -1
  64. package/dist/es2019/create-editor/addMetadataAttributes.js +29 -0
  65. package/dist/es2019/create-editor/create-editor.js +0 -53
  66. package/dist/es2019/create-editor/create-plugins-list.js +1 -13
  67. package/dist/es2019/create-editor/create-schema.js +2 -31
  68. package/dist/es2019/create-editor/createErrorReporter.js +8 -0
  69. package/dist/es2019/create-editor/createPMPlugins.js +30 -0
  70. package/dist/es2019/create-editor/fixExcludes.js +12 -0
  71. package/dist/es2019/create-editor/getScrollGutterOptions.js +13 -0
  72. package/dist/es2019/create-editor/sortByRank.js +3 -0
  73. package/dist/es2019/entry-points/test-utils.js +3 -1
  74. package/dist/es2019/isElementBySelectorInDocument.js +9 -0
  75. package/dist/es2019/setTextSelection.js +8 -0
  76. package/dist/es2019/test-utils.js +0 -18
  77. package/dist/es2019/ui/Addon/checkForModal.js +19 -0
  78. package/dist/es2019/ui/Addon/click-area-helper.js +2 -53
  79. package/dist/es2019/ui/Addon/outsideProsemirrorEditorClickHandler.js +33 -0
  80. package/dist/es2019/ui/Appearance/Chromeless.js +2 -12
  81. package/dist/es2019/ui/Appearance/ChromelessEditorContainer.js +12 -0
  82. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +5 -0
  83. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
  84. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +4 -1
  85. package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +1 -8
  86. package/dist/es2019/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +5 -0
  87. package/dist/es2019/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +5 -0
  88. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +14 -19
  89. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +17 -14
  90. package/dist/es2019/ui/EditorContentContainer/styles/mentions.js +19 -0
  91. package/dist/es2019/utils/combineQuickInsertProviders.js +11 -0
  92. package/dist/es2019/utils/extensions.js +0 -11
  93. package/dist/es2019/utils/getNodesVisibleInViewport.js +1 -9
  94. package/dist/es2019/utils/isNodeVisible.js +9 -0
  95. package/dist/es2019/utils/prepare-quick-insert-provider.js +2 -1
  96. package/dist/es2019/utils/validNode.js +8 -0
  97. package/dist/es2019/utils/validateNodes.js +1 -8
  98. package/dist/es2019/version-wrapper.js +1 -1
  99. package/dist/esm/actions/isEmptyParagraph.js +6 -0
  100. package/dist/esm/actions/temp-is-empty-document.js +1 -6
  101. package/dist/esm/composable-editor/BaseThemeWrapper.js +23 -4
  102. package/dist/esm/composable-editor/editor-internal-compiled.js +5 -1
  103. package/dist/esm/composable-editor/editor-internal-emotion.js +6 -2
  104. package/dist/esm/composable-editor/editor-internal.js +11 -2
  105. package/dist/esm/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
  106. package/dist/esm/create-editor/ReactEditorView.js +3 -1
  107. package/dist/esm/create-editor/addMetadataAttributes.js +29 -0
  108. package/dist/esm/create-editor/create-editor.js +0 -58
  109. package/dist/esm/create-editor/create-plugins-list.js +1 -13
  110. package/dist/esm/create-editor/create-schema.js +2 -31
  111. package/dist/esm/create-editor/createErrorReporter.js +8 -0
  112. package/dist/esm/create-editor/createPMPlugins.js +32 -0
  113. package/dist/esm/create-editor/fixExcludes.js +16 -0
  114. package/dist/esm/create-editor/getScrollGutterOptions.js +13 -0
  115. package/dist/esm/create-editor/sortByRank.js +3 -0
  116. package/dist/esm/entry-points/test-utils.js +3 -1
  117. package/dist/esm/isElementBySelectorInDocument.js +9 -0
  118. package/dist/esm/setTextSelection.js +6 -0
  119. package/dist/esm/test-utils.js +0 -16
  120. package/dist/esm/ui/Addon/checkForModal.js +19 -0
  121. package/dist/esm/ui/Addon/click-area-helper.js +2 -49
  122. package/dist/esm/ui/Addon/outsideProsemirrorEditorClickHandler.js +29 -0
  123. package/dist/esm/ui/Appearance/Chromeless.js +2 -14
  124. package/dist/esm/ui/Appearance/ChromelessEditorContainer.js +14 -0
  125. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +7 -0
  126. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
  127. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +4 -1
  128. package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +1 -14
  129. package/dist/esm/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +7 -0
  130. package/dist/esm/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +7 -0
  131. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +18 -21
  132. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +11 -11
  133. package/dist/esm/ui/EditorContentContainer/styles/mentions.js +19 -0
  134. package/dist/esm/utils/combineQuickInsertProviders.js +10 -0
  135. package/dist/esm/utils/extensions.js +0 -10
  136. package/dist/esm/utils/getNodesVisibleInViewport.js +1 -9
  137. package/dist/esm/utils/isNodeVisible.js +9 -0
  138. package/dist/esm/utils/prepare-quick-insert-provider.js +2 -1
  139. package/dist/esm/utils/validNode.js +8 -0
  140. package/dist/esm/utils/validateNodes.js +1 -8
  141. package/dist/esm/version-wrapper.js +1 -1
  142. package/dist/types/actions/isEmptyParagraph.d.ts +5 -0
  143. package/dist/types/actions/temp-is-empty-document.d.ts +0 -4
  144. package/dist/types/composable-editor/BaseThemeWrapper.d.ts +1 -1
  145. package/dist/types/composable-editor/editor-internal-compiled.d.ts +2 -1
  146. package/dist/types/composable-editor/editor-internal-emotion.d.ts +2 -1
  147. package/dist/types/composable-editor/editor-internal.d.ts +1 -1
  148. package/dist/types/create-editor/ReactEditorView.d.ts +2 -2
  149. package/dist/types/create-editor/addMetadataAttributes.d.ts +16 -0
  150. package/dist/types/create-editor/create-editor.d.ts +1 -17
  151. package/dist/types/create-editor/create-plugins-list.d.ts +1 -4
  152. package/dist/types/create-editor/create-schema.d.ts +0 -15
  153. package/dist/types/create-editor/create-universal-preset.d.ts +1 -1
  154. package/dist/types/create-editor/createErrorReporter.d.ts +3 -0
  155. package/dist/types/create-editor/createPMPlugins.d.ts +3 -0
  156. package/dist/types/create-editor/fixExcludes.d.ts +6 -0
  157. package/dist/types/create-editor/get-ui-component.d.ts +1 -1
  158. package/dist/types/create-editor/getScrollGutterOptions.d.ts +3 -0
  159. package/dist/types/create-editor/sortByRank.d.ts +5 -0
  160. package/dist/types/editor.d.ts +1 -1
  161. package/dist/types/entry-points/editor.d.ts +10 -1
  162. package/dist/types/entry-points/test-utils.d.ts +5 -2
  163. package/dist/types/index.d.ts +3 -1
  164. package/dist/types/isElementBySelectorInDocument.d.ts +7 -0
  165. package/dist/types/presets/universal.d.ts +1 -2
  166. package/dist/types/setTextSelection.d.ts +2 -0
  167. package/dist/types/test-utils.d.ts +1 -10
  168. package/dist/types/types/with-appearance-component.d.ts +1 -1
  169. package/dist/types/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +1 -1
  170. package/dist/types/ui/Addon/checkForModal.d.ts +10 -0
  171. package/dist/types/ui/Addon/click-area-helper.d.ts +0 -11
  172. package/dist/types/ui/Addon/outsideProsemirrorEditorClickHandler.d.ts +2 -0
  173. package/dist/types/ui/Appearance/Chromeless.d.ts +2 -10
  174. package/dist/types/ui/Appearance/ChromelessEditorContainer.d.ts +9 -0
  175. package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -1
  176. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +4 -0
  177. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
  178. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
  179. package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -1
  180. package/dist/types/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +1 -1
  181. package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -10
  182. package/dist/types/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +4 -0
  183. package/dist/types/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +4 -0
  184. package/dist/types/utils/combineQuickInsertProviders.d.ts +2 -0
  185. package/dist/types/utils/extensions.d.ts +0 -1
  186. package/dist/types/utils/getNodesVisibleInViewport.d.ts +0 -5
  187. package/dist/types/utils/isNodeVisible.d.ts +5 -0
  188. package/dist/types/utils/validNode.d.ts +2 -0
  189. package/dist/types/utils/validateNodes.d.ts +0 -1
  190. package/dist/types-ts4.5/actions/isEmptyParagraph.d.ts +5 -0
  191. package/dist/types-ts4.5/actions/temp-is-empty-document.d.ts +0 -4
  192. package/dist/types-ts4.5/composable-editor/BaseThemeWrapper.d.ts +1 -1
  193. package/dist/types-ts4.5/composable-editor/editor-internal-compiled.d.ts +2 -1
  194. package/dist/types-ts4.5/composable-editor/editor-internal-emotion.d.ts +2 -1
  195. package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +1 -1
  196. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +2 -2
  197. package/dist/types-ts4.5/create-editor/addMetadataAttributes.d.ts +16 -0
  198. package/dist/types-ts4.5/create-editor/create-editor.d.ts +1 -17
  199. package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +1 -4
  200. package/dist/types-ts4.5/create-editor/create-schema.d.ts +0 -15
  201. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +1 -1
  202. package/dist/types-ts4.5/create-editor/createErrorReporter.d.ts +3 -0
  203. package/dist/types-ts4.5/create-editor/createPMPlugins.d.ts +3 -0
  204. package/dist/types-ts4.5/create-editor/fixExcludes.d.ts +6 -0
  205. package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +1 -1
  206. package/dist/types-ts4.5/create-editor/getScrollGutterOptions.d.ts +3 -0
  207. package/dist/types-ts4.5/create-editor/sortByRank.d.ts +5 -0
  208. package/dist/types-ts4.5/editor.d.ts +1 -1
  209. package/dist/types-ts4.5/entry-points/editor.d.ts +10 -1
  210. package/dist/types-ts4.5/entry-points/test-utils.d.ts +5 -2
  211. package/dist/types-ts4.5/index.d.ts +3 -1
  212. package/dist/types-ts4.5/isElementBySelectorInDocument.d.ts +7 -0
  213. package/dist/types-ts4.5/presets/universal.d.ts +1 -2
  214. package/dist/types-ts4.5/setTextSelection.d.ts +2 -0
  215. package/dist/types-ts4.5/test-utils.d.ts +1 -10
  216. package/dist/types-ts4.5/types/with-appearance-component.d.ts +1 -1
  217. package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +1 -1
  218. package/dist/types-ts4.5/ui/Addon/checkForModal.d.ts +10 -0
  219. package/dist/types-ts4.5/ui/Addon/click-area-helper.d.ts +0 -11
  220. package/dist/types-ts4.5/ui/Addon/outsideProsemirrorEditorClickHandler.d.ts +2 -0
  221. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +2 -10
  222. package/dist/types-ts4.5/ui/Appearance/ChromelessEditorContainer.d.ts +9 -0
  223. package/dist/types-ts4.5/ui/Appearance/Comment/Comment.d.ts +1 -1
  224. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +4 -0
  225. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
  226. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
  227. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -1
  228. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +1 -1
  229. package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbar.d.ts +0 -10
  230. package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +4 -0
  231. package/dist/types-ts4.5/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +4 -0
  232. package/dist/types-ts4.5/utils/combineQuickInsertProviders.d.ts +2 -0
  233. package/dist/types-ts4.5/utils/extensions.d.ts +0 -1
  234. package/dist/types-ts4.5/utils/getNodesVisibleInViewport.d.ts +0 -5
  235. package/dist/types-ts4.5/utils/isNodeVisible.d.ts +5 -0
  236. package/dist/types-ts4.5/utils/validNode.d.ts +2 -0
  237. package/dist/types-ts4.5/utils/validateNodes.d.ts +0 -1
  238. package/package.json +16 -16
  239. package/dist/cjs/types/index.js +0 -1
  240. package/dist/es2019/types/index.js +0 -0
  241. package/dist/esm/types/index.js +0 -0
  242. package/dist/types/types/index.d.ts +0 -9
  243. package/dist/types-ts4.5/types/index.d.ts +0 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,88 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 220.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4c44277d90774`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4c44277d90774) -
8
+ depreciate theme in editor
9
+ - Updated dependencies
10
+
11
+ ## 220.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`971e92e232624`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/971e92e232624) -
16
+ Added a new `DISABLED` visual variant for mention chips so rendering surfaces (such as the editor
17
+ mentions plugin) can render a chip in a non-interactive disabled state with an explanatory
18
+ tooltip. Includes optional `MentionProvider` hooks that let consumers drive the disabled state
19
+ reactively and observe mention deletions.
20
+
21
+ **`@atlaskit/mention`**
22
+ - New `MentionType.DISABLED` enum value and matching style on `PrimitiveMention`.
23
+ - New optional `isDisabled` and `disabledTooltip` props on the React `<Mention>` component. When
24
+ `isDisabled` is set the chip becomes non-clickable, exposes `aria-disabled="true"`, remains
25
+ keyboard-focusable (`tabindex="0"`), and — when `disabledTooltip` is also set — is wrapped in an
26
+ ADS `<Tooltip>` whose content is mirrored into `aria-label` for screen readers.
27
+ - New `MentionDisabledState` (`{ disabled: boolean; tooltip?: string }`) and
28
+ `MentionDisabledStateInput` (`{ id: string }`) types, re-exported from `@atlaskit/mention` and
29
+ `@atlaskit/mention/resource`.
30
+ - New optional `MentionResource` config option `getMentionDisabledState` (forwarded by
31
+ `ContextMentionResource`) that surfaces through three new optional methods on the
32
+ `MentionProvider` interface:
33
+ - `getMentionDisabledState?(mention)` — predicate the editor calls to determine whether a chip
34
+ should render disabled.
35
+ - `subscribeToDisabledStateChanges?(listener)` — lets the editor re-evaluate the predicate when
36
+ the consumer's inputs change.
37
+ - `notifyMentionDestroyed?(mention)` — lets the consumer observe chip removals (e.g. to update
38
+ its source of truth).
39
+
40
+ All three methods are optional so existing `MentionProvider` implementations continue to compile
41
+ and behave identically.
42
+
43
+ **`@atlaskit/editor-plugin-mentions` + `@atlaskit/editor-core`**
44
+ - The mention `NodeView` now reads `MentionProvider.getMentionDisabledState?.({ id })` on every
45
+ state update and re-evaluates whenever `subscribeToDisabledStateChanges` notifies. When the
46
+ predicate returns `{ disabled: true }` the chip gets a new `.mention-disabled` class,
47
+ `aria-disabled="true"`, and an ADS `<Tooltip>` (anchored to the chip via `portalProviderAPI`)
48
+ carrying the `tooltip` text. The chip remains keyboard-focusable.
49
+ - The mention `NodeView.destroy()` calls `notifyMentionDestroyed?.({ id })` on the subscribed
50
+ provider so consumers can react to chip removals without depending on the editor's `onChange`.
51
+ - Added a matching `.editor-mention-primitive.mention-disabled` style in `@atlaskit/editor-core`
52
+ so the new class renders correctly inside the editor content container.
53
+ - Providers that don't implement the new optional methods are entirely unaffected.
54
+
55
+ **`@atlassian/conversation-assistant`, `@atlassian/conversation-assistant-widget` (chat store)**
56
+ - New `addSelectedAgentId({ conversationId, agentId })` action — append-only, no-dedup push onto
57
+ the conversation's `selectedAgentIds` history. Each call adds exactly one entry; duplicates are
58
+ preserved so the history is a 1-to-1 log of every agent chip currently in the editor.
59
+ - New `removeSelectedAgentId({ conversationId, agentId })` action — removes the **rightmost**
60
+ occurrence of an id (preserving order of other entries) for use when a single agent chip is
61
+ deleted from the editor.
62
+ - `setSelectedAgentIds` retains its wholesale-replace semantics (unchanged externally).
63
+ - The picker callback in `chat-input-refresh` is now wired to `addSelectedAgentId`; chip-deletion
64
+ is wired to `removeSelectedAgentId`. The active agent is always `selectedAgentIds.at(-1)`.
65
+
66
+ **`@atlassian/conversation-assistant-chat-prompt-input`**
67
+ - `useChatMentionResource` accepts new options `getSelectedAgentIds`, `disabledAgentTooltip`, and
68
+ `onAgentMentionDestroyed` that wire the new `MentionProvider` capabilities described above.
69
+ - `withAgentSupport` extended with the same options, plus a `notifyMentionDestroyed`
70
+ implementation that forwards to the consumer when a known agent chip is destroyed (sourced from
71
+ the editor `NodeView` rather than from `onChange`, which is not reliably called on every chat
72
+ surface).
73
+ - `<RovoChatPromptInput>` exposes new optional `selectedAgentIds`, `disabledAgentTooltip`, and
74
+ `onAgentMentionDeleted` props for consumers that want to drive the disabled-agent chip state
75
+ from their own store.
76
+
77
+ **`@atlassian/conversation-assistant-store`**
78
+ - JSDoc on the `selectedAgentIds` conversation field updated to document the new append-only /
79
+ rightmost-remove semantics and the canonical read pattern (`.at(-1)` for the active agent). No
80
+ runtime or type-shape change.
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies
85
+
3
86
  ## 220.0.3
4
87
 
5
88
  ### Patch Changes
@@ -0,0 +1,17 @@
1
+ import type { default as core } from 'jscodeshift';
2
+ import type { Collection } from 'jscodeshift/src/Collection';
3
+
4
+ /**
5
+ * Renames a variable with the given name.
6
+ *
7
+ * @param from String
8
+ * @param toName String
9
+ */
10
+ export const createRenameVariableTransform = (from: string, toName: string) => {
11
+ return (j: core.JSCodeshift, source: Collection<unknown>): void => {
12
+ source.find(j.Identifier, { name: from }).forEach((x) => {
13
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
14
+ x.replace(j.identifier(toName));
15
+ });
16
+ };
17
+ };
@@ -0,0 +1,54 @@
1
+ import type { default as core } from 'jscodeshift';
2
+ import type { Collection } from 'jscodeshift/src/Collection';
3
+
4
+ /**
5
+ * Finds import from a particular path/package matching a particular name.
6
+ * Also deals with the case where import is renamed (ie. `import { X as Y } from 'Z';`)
7
+ *
8
+ * @param j
9
+ * @param source The source collection.
10
+ * @param pkg The path or package it came from.
11
+ * @param importName The import identifier.
12
+ * @returns String[] Array of result names which match the specified importName
13
+ */
14
+ export const findImportFromPackage = (
15
+ j: core.JSCodeshift,
16
+ source: Collection<unknown>,
17
+ pkg: string,
18
+ importName: string,
19
+ ): string[] => {
20
+ // Find regular or renamed imports
21
+ return (
22
+ source
23
+ // find all import statements which import from the given package
24
+ .find(j.ImportDeclaration, {
25
+ source: {
26
+ value: pkg,
27
+ },
28
+ })
29
+ // narrow down to imports related to 'component'
30
+ .filter(
31
+ (importDeclaration) =>
32
+ j(importDeclaration).find(j.ImportSpecifier, {
33
+ imported: {
34
+ type: 'Identifier',
35
+ name: importName,
36
+ },
37
+ }).length > 0,
38
+ )
39
+ .nodes()
40
+ .map((importDeclaration): string => {
41
+ const importSpecifier = j(importDeclaration)
42
+ .find(j.ImportSpecifier, {
43
+ imported: {
44
+ type: 'Identifier',
45
+ name: importName,
46
+ },
47
+ })
48
+ .nodes()[0];
49
+
50
+ return importSpecifier.local?.name || '';
51
+ })
52
+ .filter((name) => Boolean(name))
53
+ );
54
+ };
@@ -0,0 +1,43 @@
1
+ import type core from 'jscodeshift';
2
+ import type { Collection } from 'jscodeshift/src/Collection';
3
+
4
+ /**
5
+ * Renames a JSX attribute with the given name to be a key
6
+ * within the JSX attribute toObjectName of the name toObjectKey.
7
+ *
8
+ * @param from String
9
+ * @param toObjectName String
10
+ * @param toObjectKey String
11
+ */
12
+ export const createJSXRenameVariableToNestedKeyTransform = (
13
+ from: string,
14
+ toObjectName: string,
15
+ toObjectKey: string,
16
+ ) => {
17
+ return (j: core.JSCodeshift, source: Collection<unknown>): void => {
18
+ source
19
+ .find(j.JSXAttribute, { name: { type: 'JSXIdentifier', name: from } })
20
+ .forEach((fromAttribute) => {
21
+ // is there an existing destination prop
22
+ const isExistingAttribute =
23
+ source.find(j.JSXAttribute, {
24
+ name: { type: 'JSXIdentifier', name: toObjectName },
25
+ }).length !== 0;
26
+
27
+ if (
28
+ !isExistingAttribute &&
29
+ fromAttribute.node.value?.type === 'JSXExpressionContainer' &&
30
+ fromAttribute.node.value.expression.type === 'ObjectExpression'
31
+ ) {
32
+ const existingProperties = fromAttribute.node.value.expression.properties;
33
+ const newObject = j.objectExpression([
34
+ j.property('init', j.identifier(toObjectKey), j.objectExpression(existingProperties)),
35
+ ]);
36
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
37
+ fromAttribute.replace(
38
+ j.jsxAttribute(j.jsxIdentifier(toObjectName), j.jsxExpressionContainer(newObject)),
39
+ );
40
+ }
41
+ });
42
+ };
43
+ };
@@ -0,0 +1,25 @@
1
+ import type core from 'jscodeshift';
2
+ import type { Collection } from 'jscodeshift/src/Collection';
3
+
4
+ /**
5
+ * Generate a codemod to move component from Editor to
6
+ * EditorMigrationComponent
7
+ * Ref: ED-16826
8
+ */
9
+ export const createUpdateEditorToMigrationComponent = (pkg: string, component: string) => {
10
+ return (j: core.JSCodeshift, source: Collection<unknown>): void => {
11
+ source
12
+ .find(j.ImportDeclaration, { source: { value: pkg } })
13
+ .filter(
14
+ (path) =>
15
+ j(path).find(j.ImportSpecifier, {
16
+ imported: { type: 'Identifier', name: component },
17
+ }).length > 0,
18
+ )
19
+ .find(j.ImportSpecifier)
20
+ .filter((path) => path.node.imported.name === component)
21
+ .replaceWith((currentImport) =>
22
+ j.importSpecifier(j.identifier('EditorMigrationComponent'), currentImport.node.local),
23
+ );
24
+ };
25
+ };
@@ -1,7 +1,7 @@
1
1
  import type core from 'jscodeshift';
2
2
  import type { Collection } from 'jscodeshift/src/Collection';
3
3
 
4
- import { findImportFromPackage } from '../utils';
4
+ import { findImportFromPackage } from '../findImportFromPackage';
5
5
  /**
6
6
  * Generate a codemod to remove `allowMoreTextColors` field
7
7
  * from `allowTextColor` Editor prop.
@@ -1,7 +1,7 @@
1
1
  import type core from 'jscodeshift';
2
2
  import type { Collection } from 'jscodeshift/src/Collection';
3
3
 
4
- import { findImportFromPackage } from '../utils';
4
+ import { findImportFromPackage } from '../findImportFromPackage';
5
5
 
6
6
  const createRemoveComponentPropTransform = (pkg: string, component: string, propName: string) => {
7
7
  return (j: core.JSCodeshift, source: Collection<unknown>): void => {
@@ -1,28 +1,7 @@
1
1
  import type core from 'jscodeshift';
2
2
  import type { Collection } from 'jscodeshift/src/Collection';
3
3
 
4
- /**
5
- * Generate a codemod to move component from Editor to
6
- * EditorMigrationComponent
7
- * Ref: ED-16826
8
- */
9
- export const createUpdateEditorToMigrationComponent = (pkg: string, component: string) => {
10
- return (j: core.JSCodeshift, source: Collection<unknown>): void => {
11
- source
12
- .find(j.ImportDeclaration, { source: { value: pkg } })
13
- .filter(
14
- (path) =>
15
- j(path).find(j.ImportSpecifier, {
16
- imported: { type: 'Identifier', name: component },
17
- }).length > 0,
18
- )
19
- .find(j.ImportSpecifier)
20
- .filter((path) => path.node.imported.name === component)
21
- .replaceWith((currentImport) =>
22
- j.importSpecifier(j.identifier('EditorMigrationComponent'), currentImport.node.local),
23
- );
24
- };
25
- };
4
+ import { createUpdateEditorToMigrationComponent } from './createUpdateEditorToMigrationComponent';
26
5
 
27
6
  export const renameEditorToMigrationComponent: (
28
7
  j: core.JSCodeshift,
@@ -1,46 +1,7 @@
1
1
  import type core from 'jscodeshift';
2
2
  import type { Collection } from 'jscodeshift/src/Collection';
3
3
 
4
- /**
5
- * Renames a JSX attribute with the given name to be a key
6
- * within the JSX attribute toObjectName of the name toObjectKey.
7
- *
8
- * @param from String
9
- * @param toObjectName String
10
- * @param toObjectKey String
11
- */
12
- export const createJSXRenameVariableToNestedKeyTransform = (
13
- from: string,
14
- toObjectName: string,
15
- toObjectKey: string,
16
- ) => {
17
- return (j: core.JSCodeshift, source: Collection<unknown>): void => {
18
- source
19
- .find(j.JSXAttribute, { name: { type: 'JSXIdentifier', name: from } })
20
- .forEach((fromAttribute) => {
21
- // is there an existing destination prop
22
- const isExistingAttribute =
23
- source.find(j.JSXAttribute, {
24
- name: { type: 'JSXIdentifier', name: toObjectName },
25
- }).length !== 0;
26
-
27
- if (
28
- !isExistingAttribute &&
29
- fromAttribute.node.value?.type === 'JSXExpressionContainer' &&
30
- fromAttribute.node.value.expression.type === 'ObjectExpression'
31
- ) {
32
- const existingProperties = fromAttribute.node.value.expression.properties;
33
- const newObject = j.objectExpression([
34
- j.property('init', j.identifier(toObjectKey), j.objectExpression(existingProperties)),
35
- ]);
36
- // eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
37
- fromAttribute.replace(
38
- j.jsxAttribute(j.jsxIdentifier(toObjectName), j.jsxExpressionContainer(newObject)),
39
- );
40
- }
41
- });
42
- };
43
- };
4
+ import { createJSXRenameVariableToNestedKeyTransform } from './createJSXRenameVariableToNestedKeyTransform';
44
5
 
45
6
  export const renameSmartLinksProp: (j: core.JSCodeshift, source: Collection<unknown>) => void =
46
7
  createJSXRenameVariableToNestedKeyTransform('smartLinks', 'linking', 'smartLinks');
@@ -1,7 +1,7 @@
1
1
  import type { JSCodeshift } from 'jscodeshift';
2
2
  import type { Collection } from 'jscodeshift/src/Collection';
3
3
 
4
- import { createRenameVariableTransform } from '../utils';
4
+ import { createRenameVariableTransform } from '../createRenameVariableTransform';
5
5
 
6
6
  export const renameUnsafeAllowUndoRedoButtonsProp: (
7
7
  j: JSCodeshift,
@@ -1,7 +1,7 @@
1
1
  import type { JSCodeshift } from 'jscodeshift';
2
2
  import type { Collection } from 'jscodeshift/src/Collection';
3
3
 
4
- import { createRenameVariableTransform } from '../utils';
4
+ import { createRenameVariableTransform } from '../createRenameVariableTransform';
5
5
 
6
6
  export const renameUnsafeCardProp: (j: JSCodeshift, source: Collection<unknown>) => void =
7
7
  createRenameVariableTransform('UNSAFE_cards', 'smartLinks');
package/codemods/utils.ts CHANGED
@@ -36,70 +36,3 @@ export const createTransformer =
36
36
 
37
37
  return source.toSource(options.printOptions || { quote: 'single' });
38
38
  };
39
-
40
- /**
41
- * Finds import from a particular path/package matching a particular name.
42
- * Also deals with the case where import is renamed (ie. `import { X as Y } from 'Z';`)
43
- *
44
- * @param j
45
- * @param source The source collection.
46
- * @param pkg The path or package it came from.
47
- * @param importName The import identifier.
48
- * @returns String[] Array of result names which match the specified importName
49
- */
50
- export const findImportFromPackage = (
51
- j: core.JSCodeshift,
52
- source: Collection<unknown>,
53
- pkg: string,
54
- importName: string,
55
- ): string[] => {
56
- // Find regular or renamed imports
57
- return (
58
- source
59
- // find all import statements which import from the given package
60
- .find(j.ImportDeclaration, {
61
- source: {
62
- value: pkg,
63
- },
64
- })
65
- // narrow down to imports related to 'component'
66
- .filter(
67
- (importDeclaration) =>
68
- j(importDeclaration).find(j.ImportSpecifier, {
69
- imported: {
70
- type: 'Identifier',
71
- name: importName,
72
- },
73
- }).length > 0,
74
- )
75
- .nodes()
76
- .map((importDeclaration): string => {
77
- const importSpecifier = j(importDeclaration)
78
- .find(j.ImportSpecifier, {
79
- imported: {
80
- type: 'Identifier',
81
- name: importName,
82
- },
83
- })
84
- .nodes()[0];
85
-
86
- return importSpecifier.local?.name || '';
87
- })
88
- .filter((name) => Boolean(name))
89
- );
90
- };
91
-
92
- /**
93
- * Renames a variable with the given name.
94
- *
95
- * @param from String
96
- * @param toName String
97
- */
98
- export const createRenameVariableTransform = (from: string, toName: string) => {
99
- return (j: core.JSCodeshift, source: Collection<unknown>): void => {
100
- source.find(j.Identifier, { name: from }).forEach((x) => {
101
- // eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
102
- x.replace(j.identifier(toName));
103
- });
104
- };
105
- };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isEmptyParagraph = isEmptyParagraph;
7
+ /**
8
+ * Checks if node is an empty paragraph.
9
+ */
10
+ function isEmptyParagraph(node) {
11
+ return !!node && node.type.name === 'paragraph' && !node.childCount;
12
+ }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isEmptyDocument = isEmptyDocument;
7
- exports.isEmptyParagraph = isEmptyParagraph;
7
+ var _isEmptyParagraph = require("./isEmptyParagraph");
8
8
  /**
9
9
  * Temporary file which extracts function from `editor-common`.
10
10
  *
@@ -12,13 +12,6 @@ exports.isEmptyParagraph = isEmptyParagraph;
12
12
  * help decouple it from editor-common
13
13
  */
14
14
 
15
- /**
16
- * Checks if node is an empty paragraph.
17
- */
18
- function isEmptyParagraph(node) {
19
- return !!node && node.type.name === 'paragraph' && !node.childCount;
20
- }
21
-
22
15
  /**
23
16
  * Checks if a node looks like an empty document
24
17
  */
@@ -27,5 +20,5 @@ function isEmptyDocument(node) {
27
20
  if (node.childCount !== 1 || !nodeChild) {
28
21
  return false;
29
22
  }
30
- return isEmptyParagraph(nodeChild);
23
+ return (0, _isEmptyParagraph.isEmptyParagraph)(nodeChild);
31
24
  }
@@ -4,18 +4,31 @@ var _typeof = require("@babel/runtime/helpers/typeof");
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.BaseThemeWrapper = BaseThemeWrapper;
7
+ exports.BaseThemeWrapper = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _react2 = require("@emotion/react");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
12
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
13
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
12
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
15
 
14
16
  // Default value from: `import { fontSize } from '@atlaskit/theme/constants';`
15
17
  var defaultFontSize = 14;
16
- function BaseThemeWrapper(_ref) {
17
- var baseFontSize = _ref.baseFontSize,
18
- children = _ref.children;
18
+
19
+ // No-op variant used when the static-css experiment is enabled. Editor consumers
20
+ // no longer read theme.baseFontSize / theme.layoutMaxWidth via Emotion's useTheme(),
21
+ // so no <ThemeProvider> is required in the React tree.
22
+ var BaseThemeWrapperNoop = function BaseThemeWrapperNoop(_ref) {
23
+ var children = _ref.children;
24
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
25
+ };
26
+
27
+ // Legacy variant keeping the original Emotion <ThemeProvider> behaviour for
28
+ // callers that still rely on theme.baseFontSize / theme.layoutMaxWidth.
29
+ var BaseThemeWrapperLegacy = function BaseThemeWrapperLegacy(_ref2) {
30
+ var baseFontSize = _ref2.baseFontSize,
31
+ children = _ref2.children;
19
32
  var memoizedTheme = (0, _react.useMemo)(function () {
20
33
  return {
21
34
  baseFontSize: baseFontSize || defaultFontSize,
@@ -25,4 +38,10 @@ function BaseThemeWrapper(_ref) {
25
38
  return /*#__PURE__*/_react.default.createElement(_react2.ThemeProvider, {
26
39
  theme: memoizedTheme
27
40
  }, children);
28
- }
41
+ };
42
+
43
+ // Gated at module load — when the experiment is enabled, this becomes a no-op
44
+ // wrapper; otherwise it preserves today's Emotion <ThemeProvider> behaviour.
45
+ var BaseThemeWrapper = exports.BaseThemeWrapper = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
46
+ return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
47
+ }, BaseThemeWrapperNoop, BaseThemeWrapperLegacy);
@@ -20,8 +20,12 @@ var editorContainerCompiledStyles = {
20
20
  root: "_kqswh2mm _1bsb1osq _4t3i1osq"
21
21
  };
22
22
  var EditorInternalContainerCompiled = exports.EditorInternalContainerCompiled = function EditorInternalContainerCompiled(_ref) {
23
- var children = _ref.children;
23
+ var children = _ref.children,
24
+ fontSize = _ref.fontSize;
24
25
  return /*#__PURE__*/React.createElement("div", {
26
+ style: {
27
+ '--ak-editor-base-font-size': "".concat(fontSize, "px")
28
+ },
25
29
  className: (0, _runtime.ax)([editorContainerCompiledStyles.root])
26
30
  }, children);
27
31
  };
@@ -24,8 +24,12 @@ var editorContainerEmotionStyles = (0, _react.css)({
24
24
  height: '100%'
25
25
  });
26
26
  var EditorInternalContainerEmotion = exports.EditorInternalContainerEmotion = function EditorInternalContainerEmotion(_ref) {
27
- var children = _ref.children;
27
+ var children = _ref.children,
28
+ fontSize = _ref.fontSize;
28
29
  return (0, _react.jsx)("div", {
29
- css: editorContainerEmotionStyles
30
+ css: editorContainerEmotionStyles,
31
+ style: {
32
+ '--ak-editor-base-font-size': "".concat(fontSize, "px")
33
+ }
30
34
  }, children);
31
35
  };
@@ -11,6 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var _analytics = require("@atlaskit/editor-common/analytics");
13
13
  var _portal = require("@atlaskit/editor-common/portal");
14
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
16
17
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -67,6 +68,12 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
67
68
  nodeViewPortalProviderAPI = _usePortalProvider4[0],
68
69
  NodeViewPortalRenderer = _usePortalProvider4[1];
69
70
  var propsToIgnore = (0, _expValEquals.expValEquals)('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? DEFAULT_VALUE_PROP_TO_IGNORE : ['defaultValue'];
71
+ var baseFontSize = (0, _getBaseFontSize.getBaseFontSize)(props.appearance, props.contentMode);
72
+ var fontSize = (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true) || (0, _expValEquals.expValEquals)('platform_editor_core_static_css', 'isEnabled', true) ? (0, _editorSharedStyles.editorFontSize)({
73
+ theme: {
74
+ baseFontSize: baseFontSize
75
+ }
76
+ }) : undefined;
70
77
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, renderTrackingEnabled && /*#__PURE__*/_react.default.createElement(_RenderTracking.RenderTracking, {
71
78
  componentProps: props,
72
79
  action: _analytics.ACTION.RE_RENDERED,
@@ -79,7 +86,9 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
79
86
  createAnalyticsEvent: createAnalyticsEvent,
80
87
  contextIdentifierProvider: props.contextIdentifierProvider,
81
88
  featureFlags: featureFlags
82
- }, /*#__PURE__*/_react.default.createElement(EditorInternalContainerMigration, null, /*#__PURE__*/_react.default.createElement(_EditorContext.default, {
89
+ }, /*#__PURE__*/_react.default.createElement(EditorInternalContainerMigration, {
90
+ fontSize: fontSize
91
+ }, /*#__PURE__*/_react.default.createElement(_EditorContext.default, {
83
92
  editorActions: editorActions
84
93
  }, /*#__PURE__*/_react.default.createElement(_IntlProviderIfMissingWrapper.IntlProviderIfMissingWrapper, null, /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_ReactEditorView.default, {
85
94
  editorProps: overriddenEditorProps,
@@ -103,7 +112,7 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
103
112
  editorRef = _ref2.editorRef,
104
113
  editorAPI = _ref2.editorAPI;
105
114
  return /*#__PURE__*/_react.default.createElement(_BaseThemeWrapper.BaseThemeWrapper, {
106
- baseFontSize: (0, _getBaseFontSize.getBaseFontSize)(props.appearance, props.contentMode)
115
+ baseFontSize: baseFontSize
107
116
  }, /*#__PURE__*/_react.default.createElement(AppearanceComponent, {
108
117
  innerRef: editorRef,
109
118
  editorAPI: editorAPI
@@ -13,6 +13,7 @@ var _findChangedNodesFromTransaction = require("../../utils/findChangedNodesFrom
13
13
  var _saferTransactions = require("../../utils/performance/safer-transactions");
14
14
  var _trackTransactions = require("../../utils/performance/track-transactions");
15
15
  var _validateNodes = require("../../utils/validateNodes");
16
+ var _validNode = require("../../utils/validNode");
16
17
  var useDispatchTransaction = exports.useDispatchTransaction = function useDispatchTransaction(_ref) {
17
18
  var onChange = _ref.onChange,
18
19
  dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
@@ -69,7 +70,7 @@ var useDispatchTransaction = exports.useDispatchTransaction = function useDispat
69
70
  }
70
71
  if (!changedNodesValid) {
71
72
  var invalidNodes = nodes.filter(function (node) {
72
- return !(0, _validateNodes.validNode)(node);
73
+ return !(0, _validNode.validNode)(node);
73
74
  }).map(function (node) {
74
75
  return (0, _coreUtils.getDocStructure)(node, {
75
76
  compact: true
@@ -50,6 +50,8 @@ var _consts = require("./consts");
50
50
  var _createEditor = require("./create-editor");
51
51
  var _createPluginsList = _interopRequireDefault(require("./create-plugins-list"));
52
52
  var _createSchema = require("./create-schema");
53
+ var _createErrorReporter = require("./createErrorReporter");
54
+ var _createPMPlugins = require("./createPMPlugins");
53
55
  var _filterPluginsForReconfigure = require("./filter-plugins-for-reconfigure");
54
56
  var _messages = require("./messages");
55
57
  var _focusEditorElement = require("./ReactEditorView/focusEditorElement");
@@ -151,7 +153,7 @@ function ReactEditorView(props) {
151
153
  return (0, _eventDispatcher.createDispatch)(eventDispatcher);
152
154
  }, [eventDispatcher]);
153
155
  var errorReporter = (0, _react.useMemo)(function () {
154
- return (0, _createEditor.createErrorReporter)(errorReporterHandler);
156
+ return (0, _createErrorReporter.createErrorReporter)(errorReporterHandler);
155
157
  }, [errorReporterHandler]);
156
158
  var handleAnalyticsEvent = (0, _react.useCallback)(function (payload) {
157
159
  (0, _analytics.fireAnalyticsEvent)(props.createAnalyticsEvent)(payload);
@@ -213,7 +215,7 @@ function ReactEditorView(props) {
213
215
  schema = (0, _createSchema.createSchema)(config.current);
214
216
  }
215
217
  var contentTransformerProvider = options.props.editorProps.contentTransformerProvider;
216
- var plugins = (0, _createEditor.createPMPlugins)({
218
+ var plugins = (0, _createPMPlugins.createPMPlugins)({
217
219
  schema: schema,
218
220
  dispatch: dispatch,
219
221
  errorReporter: errorReporter,
@@ -511,7 +513,7 @@ function ReactEditorView(props) {
511
513
  // Old selection's positions / node types may not map onto the new schema.
512
514
  newSelection = _state2.Selection.atStart(newDoc);
513
515
  }
514
- var plugins = (0, _createEditor.createPMPlugins)({
516
+ var plugins = (0, _createPMPlugins.createPMPlugins)({
515
517
  schema: newSchema,
516
518
  dispatch: dispatch,
517
519
  errorReporter: errorReporter,
@@ -534,7 +536,7 @@ function ReactEditorView(props) {
534
536
  plugins: plugins
535
537
  });
536
538
  } else {
537
- var _plugins = (0, _createEditor.createPMPlugins)({
539
+ var _plugins = (0, _createPMPlugins.createPMPlugins)({
538
540
  schema: state.schema,
539
541
  dispatch: dispatch,
540
542
  errorReporter: errorReporter,