@atlaskit/editor-core 191.6.0 → 191.7.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 (82) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/afm-cc/tsconfig.json +1 -211
  3. package/dist/cjs/composable-editor/editor-internal.js +4 -0
  4. package/dist/cjs/composable-editor/editor.js +2 -2
  5. package/dist/cjs/composable-editor/hooks/useProviders.js +57 -0
  6. package/dist/cjs/labs-next.js +1 -1
  7. package/dist/cjs/presets/default.js +35 -32
  8. package/dist/cjs/presets/universal.js +70 -70
  9. package/dist/cjs/test-utils.js +2 -2
  10. package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
  11. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
  12. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
  13. package/dist/cjs/ui/ContentStyles/expand.js +1 -1
  14. package/dist/cjs/ui/ContentStyles/index.js +5 -5
  15. package/dist/cjs/ui/ContentStyles/layout.js +2 -2
  16. package/dist/cjs/ui/ToolbarFeedback/index.js +6 -7
  17. package/dist/cjs/ui/WithHelpTrigger/index.js +2 -2
  18. package/dist/cjs/version-wrapper.js +1 -1
  19. package/dist/es2019/composable-editor/editor-internal.js +4 -0
  20. package/dist/es2019/composable-editor/editor.js +1 -1
  21. package/dist/es2019/composable-editor/hooks/useProviders.js +28 -0
  22. package/dist/es2019/index.js +2 -2
  23. package/dist/es2019/labs-next.js +1 -1
  24. package/dist/es2019/presets/default.js +32 -29
  25. package/dist/es2019/presets/universal.js +45 -45
  26. package/dist/es2019/test-utils.js +1 -1
  27. package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
  28. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
  29. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
  30. package/dist/es2019/ui/ContentStyles/expand.js +2 -2
  31. package/dist/es2019/ui/ContentStyles/index.js +5 -5
  32. package/dist/es2019/ui/ContentStyles/layout.js +2 -2
  33. package/dist/es2019/ui/ToolbarFeedback/index.js +2 -3
  34. package/dist/es2019/ui/WithHelpTrigger/index.js +1 -1
  35. package/dist/es2019/version-wrapper.js +1 -1
  36. package/dist/esm/composable-editor/editor-internal.js +4 -0
  37. package/dist/esm/composable-editor/editor.js +1 -1
  38. package/dist/esm/composable-editor/hooks/useProviders.js +50 -0
  39. package/dist/esm/index.js +2 -2
  40. package/dist/esm/labs-next.js +1 -1
  41. package/dist/esm/presets/default.js +32 -29
  42. package/dist/esm/presets/universal.js +45 -45
  43. package/dist/esm/test-utils.js +1 -1
  44. package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
  45. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
  46. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
  47. package/dist/esm/ui/ContentStyles/expand.js +2 -2
  48. package/dist/esm/ui/ContentStyles/index.js +5 -5
  49. package/dist/esm/ui/ContentStyles/layout.js +2 -2
  50. package/dist/esm/ui/ToolbarFeedback/index.js +6 -7
  51. package/dist/esm/ui/WithHelpTrigger/index.js +1 -1
  52. package/dist/esm/version-wrapper.js +1 -1
  53. package/dist/types/composable-editor/hooks/useProviders.d.ts +14 -0
  54. package/dist/types/create-editor/create-plugins-list.d.ts +3 -4
  55. package/dist/types/create-editor/create-preset.d.ts +235 -63
  56. package/dist/types/index.d.ts +4 -4
  57. package/dist/types/labs-next.d.ts +1 -1
  58. package/dist/types/presets/default.d.ts +908 -758
  59. package/dist/types/presets/universal.d.ts +433 -262
  60. package/dist/types/presets/useUniversalPreset.d.ts +235 -63
  61. package/dist/types/types/editor-props.d.ts +12 -12
  62. package/dist/types/ui/ContextPanel/index.d.ts +1 -1
  63. package/dist/types/utils/action.d.ts +2 -2
  64. package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +14 -0
  65. package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +3 -4
  66. package/dist/types-ts4.5/create-editor/create-preset.d.ts +255 -56
  67. package/dist/types-ts4.5/index.d.ts +4 -4
  68. package/dist/types-ts4.5/labs-next.d.ts +1 -1
  69. package/dist/types-ts4.5/presets/default.d.ts +930 -756
  70. package/dist/types-ts4.5/presets/universal.d.ts +453 -255
  71. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +255 -56
  72. package/dist/types-ts4.5/types/editor-props.d.ts +12 -12
  73. package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +1 -1
  74. package/dist/types-ts4.5/utils/action.d.ts +2 -2
  75. package/docs/0-intro.tsx +5 -5
  76. package/package.json +17 -150
  77. package/tsconfig.json +196 -166
  78. package/dist/cjs/presets/types.js +0 -5
  79. package/dist/es2019/presets/types.js +0 -1
  80. package/dist/esm/presets/types.js +0 -1
  81. package/dist/types/presets/types.d.ts +0 -6
  82. package/dist/types-ts4.5/presets/types.d.ts +0 -6
@@ -9,18 +9,18 @@ import type { AllEditorPresetPluginTypes, FeedbackInfo, LinkingOptions, QuickIns
9
9
  import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
10
10
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
11
11
  import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
12
- import type { AnnotationProviders } from '@atlaskit/editor-plugin-annotation';
13
- import type { BlockTypePluginOptions } from '@atlaskit/editor-plugin-block-type';
14
- import type { CodeBlockOptions } from '@atlaskit/editor-plugin-code-block';
15
- import type { DatePluginConfig } from '@atlaskit/editor-plugin-date';
16
- import type { FindReplaceOptions } from '@atlaskit/editor-plugin-find-replace';
17
- import type { LayoutPluginOptions } from '@atlaskit/editor-plugin-layout';
18
- import type { MediaOptions, MediaState } from '@atlaskit/editor-plugin-media/types';
19
- import type { MentionPluginConfig } from '@atlaskit/editor-plugin-mentions';
20
- import type { PanelPluginConfig } from '@atlaskit/editor-plugin-panel';
21
- import type { PlaceholderTextOptions } from '@atlaskit/editor-plugin-placeholder-text';
22
- import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugin-table/types';
23
- import type { TextColorPluginConfig } from '@atlaskit/editor-plugin-text-color';
12
+ import type { AnnotationProviders } from '@atlaskit/editor-plugins/annotation';
13
+ import type { BlockTypePluginOptions } from '@atlaskit/editor-plugins/block-type';
14
+ import type { CodeBlockOptions } from '@atlaskit/editor-plugins/code-block';
15
+ import type { DatePluginConfig } from '@atlaskit/editor-plugins/date';
16
+ import type { FindReplaceOptions } from '@atlaskit/editor-plugins/find-replace';
17
+ import type { LayoutPluginOptions } from '@atlaskit/editor-plugins/layout';
18
+ import type { MediaOptions, MediaState } from '@atlaskit/editor-plugins/media/types';
19
+ import type { MentionPluginConfig } from '@atlaskit/editor-plugins/mentions';
20
+ import type { PanelPluginConfig } from '@atlaskit/editor-plugins/panel';
21
+ import type { PlaceholderTextOptions } from '@atlaskit/editor-plugins/placeholder-text';
22
+ import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugins/table/types';
23
+ import type { TextColorPluginConfig } from '@atlaskit/editor-plugins/text-color';
24
24
  import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
25
25
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
26
26
  import type { MentionProvider } from '@atlaskit/mention/resource';
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
5
- import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
5
+ import type { WidthPluginState } from '@atlaskit/editor-plugins/width';
6
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  export type Props = {
8
8
  visible: boolean;
@@ -1,6 +1,6 @@
1
1
  import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
2
- import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
3
- import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
2
+ import type { ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
3
+ import type { ExtensionPlugin } from '@atlaskit/editor-plugins/extension';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  export declare function __temporaryFixForConfigPanel(editorView: EditorView, api: PublicPluginAPI<[
6
6
  OptionalPlugin<ExtensionPlugin>,
@@ -0,0 +1,14 @@
1
+ import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
2
+ interface UseProvidersProps {
3
+ contextIdentifierProvider: Promise<ContextIdentifierProvider> | undefined;
4
+ }
5
+ /**
6
+ * This hook is used to replace the old approach of using the `providerFactory`.
7
+ *
8
+ * Because plugins can't update their initial configuration, this hook listens to changes
9
+ * and calls a command to push the update to the plugins shared state.
10
+ *
11
+ * In the future ideally consumers implement this behaviour themselves.
12
+ */
13
+ export declare const useProviders: ({ contextIdentifierProvider, }: UseProvidersProps) => void;
14
+ export {};
@@ -1,12 +1,11 @@
1
1
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import type { EditorPluginInjectionAPI, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
3
- import type { ScrollGutterPluginOptions } from '@atlaskit/editor-plugin-base';
4
- import type { DefaultPresetPluginOptions } from '../presets/default';
5
- import type { EditorPresetProps } from '../presets/types';
3
+ import type { ScrollGutterPluginOptions } from '@atlaskit/editor-plugins/base';
4
+ import type { DefaultPresetPluginOptions } from '../../src/presets/default';
6
5
  import type { EditorPlugin, EditorProps } from '../types';
7
6
  import type { EditorPluginFeatureProps } from '../types/editor-props';
8
7
  export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
9
- export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
8
+ export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): DefaultPresetPluginOptions & EditorPluginFeatureProps;
10
9
  /**
11
10
  * Maps EditorProps to EditorPlugins
12
11
  *