@atlaskit/editor-common 114.26.0 → 114.27.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 (45) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cjs/messages/insert-block.js +5 -0
  3. package/dist/cjs/messages/markdown-mode.js +100 -0
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/preset/plugin-injection-api.js +47 -0
  6. package/dist/cjs/styles/shared/table-cell-background-for-compiled.js +15 -0
  7. package/dist/cjs/styles/shared/tableCell.js +2 -2
  8. package/dist/cjs/type-ahead/messages.js +5 -0
  9. package/dist/cjs/ui/DropList/index.js +1 -1
  10. package/dist/es2019/messages/insert-block.js +5 -0
  11. package/dist/es2019/messages/markdown-mode.js +100 -0
  12. package/dist/es2019/monitoring/error.js +1 -1
  13. package/dist/es2019/preset/plugin-injection-api.js +33 -0
  14. package/dist/es2019/styles/shared/table-cell-background-for-compiled.js +10 -0
  15. package/dist/es2019/styles/shared/tableCell.js +1 -1
  16. package/dist/es2019/type-ahead/messages.js +5 -0
  17. package/dist/es2019/ui/DropList/index.js +1 -1
  18. package/dist/esm/messages/insert-block.js +5 -0
  19. package/dist/esm/messages/markdown-mode.js +100 -0
  20. package/dist/esm/monitoring/error.js +1 -1
  21. package/dist/esm/preset/plugin-injection-api.js +47 -0
  22. package/dist/esm/styles/shared/table-cell-background-for-compiled.js +10 -0
  23. package/dist/esm/styles/shared/tableCell.js +1 -1
  24. package/dist/esm/type-ahead/messages.js +5 -0
  25. package/dist/esm/ui/DropList/index.js +1 -1
  26. package/dist/types/messages/insert-block.d.ts +5 -0
  27. package/dist/types/messages/markdown-mode.d.ts +100 -0
  28. package/dist/types/preset/plugin-injection-api.d.ts +3 -0
  29. package/dist/types/styles/shared/table-cell-background-for-compiled.d.ts +8 -0
  30. package/dist/types/styles/shared/tableCell.d.ts +1 -0
  31. package/dist/types/type-ahead/messages.d.ts +41 -36
  32. package/dist/types/types/index.d.ts +1 -1
  33. package/dist/types/types/type-ahead.d.ts +7 -0
  34. package/dist/types/types/ui-components.d.ts +12 -0
  35. package/dist/types-ts4.5/messages/insert-block.d.ts +5 -0
  36. package/dist/types-ts4.5/messages/markdown-mode.d.ts +100 -0
  37. package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +3 -0
  38. package/dist/types-ts4.5/styles/shared/table-cell-background-for-compiled.d.ts +8 -0
  39. package/dist/types-ts4.5/styles/shared/tableCell.d.ts +1 -0
  40. package/dist/types-ts4.5/type-ahead/messages.d.ts +41 -36
  41. package/dist/types-ts4.5/types/index.d.ts +1 -1
  42. package/dist/types-ts4.5/types/type-ahead.d.ts +7 -0
  43. package/dist/types-ts4.5/types/ui-components.d.ts +12 -0
  44. package/package.json +7 -7
  45. package/table-cell-background-for-compiled/package.json +17 -0
@@ -1,102 +1,107 @@
1
1
  export declare const typeAheadListMessages: {
2
- typeAheadPopupLabel: {
3
- id: string;
2
+ descriptionLabel: {
4
3
  defaultMessage: string;
5
4
  description: string;
6
- };
7
- quickInsertPopupLabel: {
8
5
  id: string;
9
- defaultMessage: string;
10
- description: string;
11
6
  };
12
- quickInsertInputLabel: {
13
- id: string;
7
+ emojiInputLabel: {
14
8
  defaultMessage: string;
15
9
  description: string;
16
- };
17
- quickInsertInputPlaceholderLabel: {
18
10
  id: string;
11
+ };
12
+ emojiListItemLabel: {
19
13
  defaultMessage: string;
20
14
  description: string;
15
+ id: string;
21
16
  };
22
17
  emojiPopupLabel: {
23
- id: string;
24
18
  defaultMessage: string;
25
19
  description: string;
20
+ id: string;
26
21
  };
27
- emojiInputLabel: {
22
+ emptySearchResults: {
23
+ defaultMessage: string;
24
+ description: string;
28
25
  id: string;
26
+ };
27
+ emptySearchResultsSuggestion: {
29
28
  defaultMessage: string;
30
29
  description: string;
30
+ id: string;
31
31
  };
32
- mentionPopupLabel: {
32
+ emptySearchResultsSuggestionNew: {
33
+ defaultMessage: string;
34
+ description: string;
33
35
  id: string;
36
+ };
37
+ inputQueryAssistiveLabel: {
34
38
  defaultMessage: string;
35
39
  description: string;
40
+ id: string;
36
41
  };
37
42
  mentionInputLabel: {
43
+ defaultMessage: string;
44
+ description: string;
38
45
  id: string;
46
+ };
47
+ mentionPopupLabel: {
39
48
  defaultMessage: string;
40
49
  description: string;
50
+ id: string;
41
51
  };
42
52
  metionListItemLabel: {
43
- id: string;
44
53
  defaultMessage: string;
45
54
  description: string;
46
- };
47
- emojiListItemLabel: {
48
55
  id: string;
56
+ };
57
+ noSearchResultsLabel: {
49
58
  defaultMessage: string;
50
59
  description: string;
51
- };
52
- inputQueryAssistiveLabel: {
53
60
  id: string;
61
+ };
62
+ quickInsertInputLabel: {
54
63
  defaultMessage: string;
55
64
  description: string;
56
- };
57
- searchResultsLabel: {
58
65
  id: string;
66
+ };
67
+ quickInsertInputPlaceholderLabel: {
59
68
  defaultMessage: string;
60
69
  description: string;
61
- };
62
- noSearchResultsLabel: {
63
70
  id: string;
71
+ };
72
+ quickInsertPopupLabel: {
64
73
  defaultMessage: string;
65
74
  description: string;
66
- };
67
- descriptionLabel: {
68
75
  id: string;
76
+ };
77
+ searchResultsLabel: {
69
78
  defaultMessage: string;
70
79
  description: string;
80
+ id: string;
71
81
  };
72
82
  shortcutLabel: {
73
- id: string;
74
83
  defaultMessage: string;
75
84
  description: string;
76
- };
77
- typeAheadErrorFallbackHeading: {
78
85
  id: string;
79
- defaultMessage: string;
80
- description: string;
81
86
  };
82
87
  typeAheadErrorFallbackDesc: {
83
- id: string;
84
88
  defaultMessage: string;
85
89
  description: string;
86
- };
87
- viewAllInserts: {
88
90
  id: string;
91
+ };
92
+ typeAheadErrorFallbackHeading: {
89
93
  defaultMessage: string;
90
94
  description: string;
91
- };
92
- emptySearchResults: {
93
95
  id: string;
96
+ };
97
+ typeAheadPopupLabel: {
94
98
  defaultMessage: string;
95
99
  description: string;
96
- };
97
- emptySearchResultsSuggestion: {
98
100
  id: string;
101
+ };
102
+ viewAllInserts: {
99
103
  defaultMessage: string;
100
104
  description: string;
105
+ id: string;
101
106
  };
102
107
  };
@@ -19,7 +19,7 @@ export type { ContextPanelHandler } from './context-panel';
19
19
  export type { EditorAppearance, EditorContentMode } from './editor-appearance';
20
20
  export type { ToolbarUiComponentFactoryParams, ToolbarUIComponentFactory } from './toolbar';
21
21
  export { ToolbarSize, ToolbarWidths, ToolbarWidthsNext, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext, } from './toolbar';
22
- export type { UiComponentFactoryParams, UIComponentFactory, ReactHookFactory, } from './ui-components';
22
+ export type { UiComponentFactoryParams, UIComponentFactory, ReactHookFactory, NamedReactHookFactory, } from './ui-components';
23
23
  export type { EditorReactContext } from './editor-react-context';
24
24
  export type { PMPluginFactoryParams, PMPluginFactory, PMPlugin } from './plugin-factory';
25
25
  export type { NodeConfig, MarkConfig, NodeViewConfig } from './prosemirror-config';
@@ -65,6 +65,13 @@ export type TypeAheadHandler = {
65
65
  }) => void;
66
66
  /** Handler returns typeahead item based on query. Used to find which item to insert. */
67
67
  forceSelect?: TypeAheadForceSelect;
68
+ /**
69
+ * Optional handler that returns an item (Ask Rovo) to display in the typeahead's
70
+ * empty-results state.
71
+ */
72
+ getEmptyItem?: (props: {
73
+ editorState: EditorState;
74
+ }) => TypeAheadItem | undefined;
68
75
  getHighlight?: (state: EditorState) => JSX.Element | null;
69
76
  /** Handler returns an array of TypeAheadItem based on query to be displayed in the TypeAhead */
70
77
  getItems: (props: {
@@ -22,4 +22,16 @@ export type UiComponentFactoryParams = {
22
22
  export type UIComponentFactory = (params: UiComponentFactoryParams) => React.ReactElement<any> | null;
23
23
  export type ReactHookFactory = (params: Pick<UiComponentFactoryParams, 'editorView' | 'containerElement'> & {
24
24
  editorView: EditorView;
25
+ pluginName?: string;
25
26
  }) => void;
27
+ /**
28
+ * A `ReactHookFactory` annotated with the name of the plugin that owns it.
29
+ * `processPluginsList` wraps each plugin's `usePluginHook` with `.bind(null)`
30
+ * and assigns `pluginName`, so the original plugin function reference is
31
+ * never mutated. `MountPluginHooks` reads `pluginName` to derive a stable
32
+ * React `key` per plugin instead of relying on array index, which would
33
+ * violate the Rules of Hooks across reconfigures that change the plugin set.
34
+ */
35
+ export type NamedReactHookFactory = ReactHookFactory & {
36
+ pluginName?: string;
37
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "114.26.0",
3
+ "version": "114.27.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@atlaskit/activity-provider": "^2.5.0",
40
- "@atlaskit/adf-schema": "^52.9.0",
40
+ "@atlaskit/adf-schema": "^52.10.0",
41
41
  "@atlaskit/adf-utils": "^19.29.0",
42
42
  "@atlaskit/afm-i18n-platform-editor-editor-common": "2.18.0",
43
43
  "@atlaskit/analytics-listeners": "^10.0.0",
@@ -57,8 +57,8 @@
57
57
  "@atlaskit/editor-tables": "^2.9.0",
58
58
  "@atlaskit/editor-toolbar": "^1.0.0",
59
59
  "@atlaskit/editor-toolbar-model": "^0.4.0",
60
- "@atlaskit/emoji": "^70.4.0",
61
- "@atlaskit/icon": "^34.4.0",
60
+ "@atlaskit/emoji": "^70.5.0",
61
+ "@atlaskit/icon": "^34.5.0",
62
62
  "@atlaskit/link": "^3.4.0",
63
63
  "@atlaskit/link-datasource": "^5.2.0",
64
64
  "@atlaskit/link-picker": "^5.1.0",
@@ -79,16 +79,16 @@
79
79
  "@atlaskit/primitives": "^19.0.0",
80
80
  "@atlaskit/profilecard": "^25.4.0",
81
81
  "@atlaskit/prosemirror-history": "^0.2.0",
82
- "@atlaskit/react-ufo": "^5.19.0",
82
+ "@atlaskit/react-ufo": "^5.20.0",
83
83
  "@atlaskit/section-message": "^8.12.0",
84
84
  "@atlaskit/smart-card": "^44.9.0",
85
85
  "@atlaskit/smart-user-picker": "^10.0.0",
86
86
  "@atlaskit/spinner": "^19.1.0",
87
87
  "@atlaskit/task-decision": "^20.0.0",
88
88
  "@atlaskit/textfield": "^8.3.0",
89
- "@atlaskit/tmp-editor-statsig": "^77.2.0",
89
+ "@atlaskit/tmp-editor-statsig": "^78.0.0",
90
90
  "@atlaskit/tokens": "^13.0.0",
91
- "@atlaskit/tooltip": "^22.0.0",
91
+ "@atlaskit/tooltip": "^22.1.0",
92
92
  "@atlaskit/width-detector": "^5.1.0",
93
93
  "@babel/runtime": "^7.0.0",
94
94
  "@compiled/react": "^0.20.0",
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/table-cell-background-for-compiled",
3
+ "main": "../dist/cjs/styles/shared/table-cell-background-for-compiled.js",
4
+ "module": "../dist/esm/styles/shared/table-cell-background-for-compiled.js",
5
+ "module:es2019": "../dist/es2019/styles/shared/table-cell-background-for-compiled.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/styles/shared/table-cell-background-for-compiled.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../dist/types-ts4.5/styles/shared/table-cell-background-for-compiled.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }