@atlaskit/editor-core 203.7.2 → 203.7.4

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 (166) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +2 -0
  3. package/codemods/__tests__/remove-config-panel-width-prop.ts +2 -0
  4. package/codemods/__tests__/rename-editor-to-editor-migration-component.ts +2 -0
  5. package/codemods/__tests__/rename-smartlinks-prop.ts +2 -0
  6. package/codemods/__tests__/rename-unsafe-allowUndoRedoButtons-prop.ts +2 -0
  7. package/codemods/__tests__/rename-unsafe-cards-prop.ts +2 -0
  8. package/codemods/utils.ts +2 -0
  9. package/dist/cjs/CollapsedEditor/index.js +4 -1
  10. package/dist/cjs/actions/index.js +7 -0
  11. package/dist/cjs/composable-editor/composable-editor.js +4 -0
  12. package/dist/cjs/composable-editor/core-editor.js +6 -1
  13. package/dist/cjs/composable-editor/editor-internal.js +13 -2
  14. package/dist/cjs/composable-editor/hooks/useProviderFactory.js +6 -1
  15. package/dist/cjs/composable-editor/utils/handleProviders.js +2 -0
  16. package/dist/cjs/create-editor/ErrorBoundary.js +2 -0
  17. package/dist/cjs/create-editor/ReactEditorView.js +8 -1
  18. package/dist/cjs/create-editor/WithEditorView.js +8 -3
  19. package/dist/cjs/create-editor/create-editor.js +2 -0
  20. package/dist/cjs/create-editor/feature-flags-from-props.js +2 -0
  21. package/dist/cjs/editor-appearances/ChromelessEditor.js +2 -0
  22. package/dist/cjs/editor-appearances/CommentEditor.js +2 -0
  23. package/dist/cjs/editor-appearances/FullPageEditor.js +4 -1
  24. package/dist/cjs/editor-appearances/FullWidthEditor.js +2 -0
  25. package/dist/cjs/editor.js +4 -0
  26. package/dist/cjs/test-utils.js +2 -0
  27. package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +2 -0
  28. package/dist/cjs/ui/Addon/Dropdown/index.js +2 -0
  29. package/dist/cjs/ui/Addon/click-area-helper.js +13 -2
  30. package/dist/cjs/ui/Appearance/Chromeless.js +2 -0
  31. package/dist/cjs/ui/Appearance/Comment/Comment.js +15 -3
  32. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -1
  33. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +12 -3
  34. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +3 -0
  35. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +4 -0
  36. package/dist/cjs/ui/ChromeCollapsed/index.js +2 -0
  37. package/dist/cjs/ui/CollapsedEditor/index.js +2 -0
  38. package/dist/cjs/ui/ContentStyles/status.js +13 -2
  39. package/dist/cjs/ui/ContextPanel/index.js +10 -4
  40. package/dist/cjs/ui/EditorContext/index.js +11 -0
  41. package/dist/cjs/ui/ErrorBoundary/index.js +2 -0
  42. package/dist/cjs/ui/PluginSlot/index.js +10 -0
  43. package/dist/cjs/ui/PluginSlot/mount-plugin-hooks.js +4 -1
  44. package/dist/cjs/ui/Toolbar/ToolbarInner.js +5 -0
  45. package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +8 -2
  46. package/dist/cjs/ui/WithEditorActions/index.js +11 -1
  47. package/dist/cjs/ui/WithFlash/index.js +2 -0
  48. package/dist/cjs/ui/WithHelpTrigger/index.js +4 -0
  49. package/dist/cjs/utils/extensions.js +5 -1
  50. package/dist/cjs/utils/findChangedNodesFromTransaction.js +2 -0
  51. package/dist/cjs/utils/outdatedBrowsers.js +21 -1
  52. package/dist/cjs/utils/prepare-quick-insert-provider.js +2 -0
  53. package/dist/cjs/version-wrapper.js +1 -1
  54. package/dist/es2019/CollapsedEditor/index.js +6 -0
  55. package/dist/es2019/actions/index.js +8 -0
  56. package/dist/es2019/composable-editor/composable-editor.js +4 -0
  57. package/dist/es2019/composable-editor/core-editor.js +6 -1
  58. package/dist/es2019/composable-editor/editor-internal.js +13 -2
  59. package/dist/es2019/composable-editor/hooks/useProviderFactory.js +6 -1
  60. package/dist/es2019/composable-editor/utils/handleProviders.js +2 -0
  61. package/dist/es2019/create-editor/ErrorBoundary.js +2 -0
  62. package/dist/es2019/create-editor/ReactEditorView.js +6 -0
  63. package/dist/es2019/create-editor/WithEditorView.js +8 -3
  64. package/dist/es2019/create-editor/create-editor.js +2 -0
  65. package/dist/es2019/create-editor/feature-flags-from-props.js +2 -0
  66. package/dist/es2019/editor-appearances/ChromelessEditor.js +2 -0
  67. package/dist/es2019/editor-appearances/CommentEditor.js +2 -0
  68. package/dist/es2019/editor-appearances/FullPageEditor.js +4 -1
  69. package/dist/es2019/editor-appearances/FullWidthEditor.js +2 -0
  70. package/dist/es2019/editor.js +4 -0
  71. package/dist/es2019/test-utils.js +2 -0
  72. package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +2 -0
  73. package/dist/es2019/ui/Addon/Dropdown/index.js +2 -0
  74. package/dist/es2019/ui/Addon/click-area-helper.js +13 -2
  75. package/dist/es2019/ui/Appearance/Chromeless.js +2 -0
  76. package/dist/es2019/ui/Appearance/Comment/Comment.js +14 -3
  77. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +4 -1
  78. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +12 -3
  79. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -0
  80. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +4 -0
  81. package/dist/es2019/ui/ChromeCollapsed/index.js +3 -2
  82. package/dist/es2019/ui/CollapsedEditor/index.js +2 -0
  83. package/dist/es2019/ui/ContentStyles/status.js +23 -5
  84. package/dist/es2019/ui/ContextPanel/index.js +10 -4
  85. package/dist/es2019/ui/EditorContext/index.js +11 -0
  86. package/dist/es2019/ui/ErrorBoundary/index.js +2 -0
  87. package/dist/es2019/ui/PluginSlot/index.js +10 -0
  88. package/dist/es2019/ui/PluginSlot/mount-plugin-hooks.js +4 -1
  89. package/dist/es2019/ui/Toolbar/ToolbarInner.js +5 -0
  90. package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +8 -2
  91. package/dist/es2019/ui/WithEditorActions/index.js +12 -0
  92. package/dist/es2019/ui/WithFlash/index.js +2 -0
  93. package/dist/es2019/ui/WithHelpTrigger/index.js +4 -0
  94. package/dist/es2019/utils/extensions.js +6 -0
  95. package/dist/es2019/utils/findChangedNodesFromTransaction.js +2 -0
  96. package/dist/es2019/utils/outdatedBrowsers.js +21 -1
  97. package/dist/es2019/utils/prepare-quick-insert-provider.js +2 -0
  98. package/dist/es2019/version-wrapper.js +1 -1
  99. package/dist/esm/CollapsedEditor/index.js +6 -0
  100. package/dist/esm/actions/index.js +7 -0
  101. package/dist/esm/composable-editor/composable-editor.js +4 -0
  102. package/dist/esm/composable-editor/core-editor.js +6 -1
  103. package/dist/esm/composable-editor/editor-internal.js +13 -2
  104. package/dist/esm/composable-editor/hooks/useProviderFactory.js +6 -1
  105. package/dist/esm/composable-editor/utils/handleProviders.js +2 -0
  106. package/dist/esm/create-editor/ErrorBoundary.js +2 -0
  107. package/dist/esm/create-editor/ReactEditorView.js +8 -1
  108. package/dist/esm/create-editor/WithEditorView.js +8 -3
  109. package/dist/esm/create-editor/create-editor.js +2 -0
  110. package/dist/esm/create-editor/feature-flags-from-props.js +2 -0
  111. package/dist/esm/editor-appearances/ChromelessEditor.js +2 -0
  112. package/dist/esm/editor-appearances/CommentEditor.js +2 -0
  113. package/dist/esm/editor-appearances/FullPageEditor.js +4 -1
  114. package/dist/esm/editor-appearances/FullWidthEditor.js +2 -0
  115. package/dist/esm/editor.js +4 -0
  116. package/dist/esm/test-utils.js +2 -0
  117. package/dist/esm/ui/Addon/ClickAreaMobile/index.js +2 -0
  118. package/dist/esm/ui/Addon/Dropdown/index.js +2 -0
  119. package/dist/esm/ui/Addon/click-area-helper.js +13 -2
  120. package/dist/esm/ui/Appearance/Chromeless.js +2 -0
  121. package/dist/esm/ui/Appearance/Comment/Comment.js +14 -3
  122. package/dist/esm/ui/Appearance/Comment/Toolbar.js +4 -1
  123. package/dist/esm/ui/Appearance/FullPage/FullPage.js +12 -3
  124. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -0
  125. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +4 -0
  126. package/dist/esm/ui/ChromeCollapsed/index.js +3 -2
  127. package/dist/esm/ui/CollapsedEditor/index.js +2 -0
  128. package/dist/esm/ui/ContentStyles/status.js +15 -4
  129. package/dist/esm/ui/ContextPanel/index.js +10 -4
  130. package/dist/esm/ui/EditorContext/index.js +11 -0
  131. package/dist/esm/ui/ErrorBoundary/index.js +2 -0
  132. package/dist/esm/ui/PluginSlot/index.js +10 -0
  133. package/dist/esm/ui/PluginSlot/mount-plugin-hooks.js +4 -1
  134. package/dist/esm/ui/Toolbar/ToolbarInner.js +5 -0
  135. package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +8 -2
  136. package/dist/esm/ui/WithEditorActions/index.js +11 -1
  137. package/dist/esm/ui/WithFlash/index.js +2 -0
  138. package/dist/esm/ui/WithHelpTrigger/index.js +4 -0
  139. package/dist/esm/utils/extensions.js +6 -0
  140. package/dist/esm/utils/findChangedNodesFromTransaction.js +2 -0
  141. package/dist/esm/utils/outdatedBrowsers.js +21 -1
  142. package/dist/esm/utils/prepare-quick-insert-provider.js +2 -0
  143. package/dist/esm/version-wrapper.js +1 -1
  144. package/dist/types/create-editor/ReactEditorView.d.ts +1 -1
  145. package/dist/types/create-editor/create-universal-preset.d.ts +1825 -1825
  146. package/dist/types/create-editor/get-plugins.d.ts +2 -2
  147. package/dist/types/presets/default.d.ts +476 -476
  148. package/dist/types/presets/universal.d.ts +1394 -1394
  149. package/dist/types/presets/useUniversalPreset.d.ts +2032 -2032
  150. package/dist/types/ui/CollapsedEditor/index.d.ts +1 -2
  151. package/dist/types/ui/EditorContext/index.d.ts +2 -2
  152. package/dist/types/ui/WithEditorActions/index.d.ts +1 -1
  153. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +1 -1
  154. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +1823 -1823
  155. package/dist/types-ts4.5/create-editor/get-plugins.d.ts +2 -2
  156. package/dist/types-ts4.5/presets/default.d.ts +476 -476
  157. package/dist/types-ts4.5/presets/universal.d.ts +1394 -1394
  158. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +2030 -2030
  159. package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +1 -2
  160. package/dist/types-ts4.5/ui/EditorContext/index.d.ts +2 -2
  161. package/dist/types-ts4.5/ui/WithEditorActions/index.d.ts +1 -1
  162. package/docs/0-intro.tsx +6 -0
  163. package/docs/1-legacy-editor.tsx +6 -0
  164. package/docs/4-annotations.tsx +2 -0
  165. package/package.json +12 -8
  166. package/tsconfig.json +0 -1
@@ -8,8 +8,7 @@ export interface Props {
8
8
  onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
9
9
  onExpand?: () => void;
10
10
  }
11
- export interface State {
12
- }
11
+ export type State = Object;
13
12
  export default class CollapsedEditor extends React.Component<Props, State> {
14
13
  editorComponent?: Editor;
15
14
  previouslyExpanded?: boolean;
@@ -6,11 +6,11 @@ type EditorContextInternal = {
6
6
  };
7
7
  export type EditorContextProps = React.PropsWithChildren<EditorContextInternal>;
8
8
  export declare const useEditorContext: () => EditorContextProps;
9
- export declare class LegacyEditorContext extends React.Component<EditorContextProps, {}> {
9
+ export declare class LegacyEditorContext extends React.Component<EditorContextProps, Object> {
10
10
  constructor(props: EditorContextProps);
11
11
  render(): JSX.Element;
12
12
  }
13
- export default class LegacyEditorContextOld extends React.Component<EditorContextProps, {}> {
13
+ export default class LegacyEditorContextOld extends React.Component<EditorContextProps, Object> {
14
14
  static childContextTypes: {
15
15
  editorActions: PropTypes.Requireable<object>;
16
16
  };
@@ -3,7 +3,7 @@ import type EditorActions from '../../actions';
3
3
  export interface WithEditorActionsProps {
4
4
  render(actions: EditorActions): React.ReactElement | null;
5
5
  }
6
- export default class WithEditorActions extends React.Component<WithEditorActionsProps, {}> {
6
+ export default class WithEditorActions extends React.Component<WithEditorActionsProps, Object> {
7
7
  constructor(props: WithEditorActionsProps);
8
8
  render(): JSX.Element;
9
9
  }
package/docs/0-intro.tsx CHANGED
@@ -389,8 +389,12 @@ function EditorInternal() {
389
389
  ${(
390
390
  <Example
391
391
  packageName="@atlaskit/editor-core/composable-editor"
392
+ // Ignored via go/ees005
393
+ // eslint-disable-next-line import/no-commonjs
392
394
  Component={require('../examples/1-basic-composable-editor').default}
393
395
  title="Basic"
396
+ // Ignored via go/ees005
397
+ // eslint-disable-next-line import/no-commonjs
394
398
  source={require('!!raw-loader!../examples/1-basic-composable-editor')}
395
399
  />
396
400
  )}
@@ -399,6 +403,8 @@ ${(
399
403
  <Props
400
404
  shouldCollapseProps
401
405
  heading="Props"
406
+ // Ignored via go/ees005
407
+ // eslint-disable-next-line import/no-commonjs
402
408
  props={require('!!extract-react-types-loader!../src/composable-editor/composable-editor')}
403
409
  />
404
410
  )}
@@ -252,8 +252,12 @@ ${code`
252
252
  ${(
253
253
  <Example
254
254
  packageName="@atlaskit/editor-core"
255
+ // Ignored via go/ees005
256
+ // eslint-disable-next-line import/no-commonjs
255
257
  Component={require('../examples/1-basic-composable-editor').default}
256
258
  title="Basic"
259
+ // Ignored via go/ees005
260
+ // eslint-disable-next-line import/no-commonjs
257
261
  source={require('!!raw-loader!../examples/1-basic-composable-editor')}
258
262
  />
259
263
  )}
@@ -262,6 +266,8 @@ ${(
262
266
  <Props
263
267
  shouldCollapseProps
264
268
  heading="Props"
269
+ // Ignored via go/ees005
270
+ // eslint-disable-next-line import/no-commonjs
265
271
  props={require('!!extract-react-types-loader!../src/editor')}
266
272
  />
267
273
  )}
@@ -174,6 +174,8 @@ const inlineCommentEditor = (adf: Object, onChange?: (editorView: EditorView) =>
174
174
  <Editor appearance="chromeless" defaultValue={adf} onChange={onChange} />
175
175
  );
176
176
 
177
+ // Ignored via go/ees005
178
+ // eslint-disable-next-line @repo/internal/react/no-class-components
177
179
  class SplitExample extends React.Component<{ initialAdf: object }> {
178
180
  state = {
179
181
  adf: this.props.initialAdf,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "203.7.2",
3
+ "version": "203.7.4",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,15 +43,15 @@
43
43
  "@atlaskit/analytics-next": "^10.2.0",
44
44
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
45
45
  "@atlaskit/button": "^20.3.0",
46
- "@atlaskit/editor-common": "^97.0.0",
46
+ "@atlaskit/editor-common": "^97.2.0",
47
47
  "@atlaskit/editor-json-transformer": "^8.21.0",
48
48
  "@atlaskit/editor-plugin-quick-insert": "1.8.1",
49
- "@atlaskit/editor-plugins": "^5.9.0",
49
+ "@atlaskit/editor-plugins": "^6.0.0",
50
50
  "@atlaskit/editor-prosemirror": "6.2.1",
51
51
  "@atlaskit/editor-shared-styles": "^3.2.0",
52
52
  "@atlaskit/emoji": "^67.11.0",
53
53
  "@atlaskit/icon": "^23.1.0",
54
- "@atlaskit/media-card": "^78.16.0",
54
+ "@atlaskit/media-card": "^78.17.0",
55
55
  "@atlaskit/mention": "^23.4.0",
56
56
  "@atlaskit/platform-feature-flags": "^0.3.0",
57
57
  "@atlaskit/task-decision": "^17.11.0",
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/adf-utils": "^19.14.0",
85
85
  "@atlaskit/analytics-listeners": "^8.13.0",
86
86
  "@atlaskit/collab-provider": "10.3.1",
87
- "@atlaskit/editor-plugin-annotation": "1.26.6",
87
+ "@atlaskit/editor-plugin-annotation": "1.26.7",
88
88
  "@atlaskit/editor-plugin-card": "^4.5.0",
89
89
  "@atlaskit/editor-plugin-list": "^3.9.0",
90
90
  "@atlaskit/editor-plugin-paste": "^2.0.0",
@@ -95,15 +95,15 @@
95
95
  "@atlaskit/media-test-helpers": "^34.7.0",
96
96
  "@atlaskit/modal-dialog": "^12.18.0",
97
97
  "@atlaskit/primitives": "^13.3.0",
98
- "@atlaskit/renderer": "^112.7.0",
99
- "@atlaskit/smart-card": "^32.8.0",
98
+ "@atlaskit/renderer": "^112.8.0",
99
+ "@atlaskit/smart-card": "^33.1.0",
100
100
  "@atlaskit/synchrony-test-helpers": "^3.0.0",
101
101
  "@atlaskit/toggle": "^14.0.0",
102
102
  "@atlaskit/util-data-test": "^17.13.0",
103
103
  "@atlaskit/visual-regression": "*",
104
104
  "@atlassian/adf-schema-json": "^1.22.0",
105
105
  "@atlassian/feature-flags-test-utils": "*",
106
- "@atlassian/search-provider": "3.0.15",
106
+ "@atlassian/search-provider": "3.0.17",
107
107
  "@emotion/jest": "^11.8.0",
108
108
  "@storybook/addon-knobs": "^6.4.0",
109
109
  "@testing-library/react": "^12.1.5",
@@ -396,6 +396,10 @@
396
396
  "platform_editor_advanced_layouts_a11y": {
397
397
  "type": "boolean",
398
398
  "referenceOnly": true
399
+ },
400
+ "platform_editor_floating_toolbar_padding_fix": {
401
+ "type": "boolean",
402
+ "referenceOnly": true
399
403
  }
400
404
  },
401
405
  "stricter": {
package/tsconfig.json CHANGED
@@ -12,6 +12,5 @@
12
12
  "./playwright/**/*.ts"
13
13
  ],
14
14
  "compilerOptions": {
15
- "baseUrl": "./"
16
15
  }
17
16
  }