@atlaskit/editor-common 74.0.0 → 74.0.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 (214) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/analytics/package.json +2 -2
  3. package/card/package.json +2 -2
  4. package/collab/package.json +2 -2
  5. package/core-utils/package.json +2 -2
  6. package/dist/cjs/provider-helpers/combine-providers.js +1 -1
  7. package/dist/cjs/ui/DropList/index.js +1 -1
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/es2019/provider-helpers/combine-providers.js +1 -1
  10. package/dist/es2019/ui/DropList/index.js +1 -1
  11. package/dist/es2019/version.json +1 -1
  12. package/dist/esm/provider-helpers/combine-providers.js +1 -1
  13. package/dist/esm/ui/DropList/index.js +1 -1
  14. package/dist/esm/version.json +1 -1
  15. package/dist/types/__tests_external__/cases/fundamentals/test-cases/editor-is-present.d.ts +1 -1
  16. package/dist/types/__tests_external__/cases/fundamentals/test-cases/editor-typing.d.ts +1 -1
  17. package/dist/types/__tests_external__/page-objects/Editor.d.ts +2 -0
  18. package/dist/types/__tests_external__/page-objects/EditorSmartLink.d.ts +2 -0
  19. package/dist/types/__tests_external__/page-objects/Renderer.d.ts +2 -0
  20. package/dist/types/analytics/api.d.ts +1 -1
  21. package/dist/types/analytics/types/avatar.d.ts +2 -2
  22. package/dist/types/analytics/types/block.d.ts +3 -3
  23. package/dist/types/analytics/types/config-panel-events.d.ts +4 -4
  24. package/dist/types/analytics/types/cut-copy-events.d.ts +3 -3
  25. package/dist/types/analytics/types/date-events.d.ts +6 -6
  26. package/dist/types/analytics/types/dispatch-analytics-event.d.ts +1 -1
  27. package/dist/types/analytics/types/element-browser-events.d.ts +4 -4
  28. package/dist/types/analytics/types/events.d.ts +26 -26
  29. package/dist/types/analytics/types/experimental-events.d.ts +4 -4
  30. package/dist/types/analytics/types/extension-events.d.ts +5 -5
  31. package/dist/types/analytics/types/find-replace-events.d.ts +9 -9
  32. package/dist/types/analytics/types/format-events.d.ts +10 -10
  33. package/dist/types/analytics/types/general-events.d.ts +40 -40
  34. package/dist/types/analytics/types/inline-comment-events.d.ts +5 -5
  35. package/dist/types/analytics/types/insert-events.d.ts +23 -23
  36. package/dist/types/analytics/types/link-tool-bar-events.d.ts +14 -14
  37. package/dist/types/analytics/types/list-events.d.ts +11 -11
  38. package/dist/types/analytics/types/media-events.d.ts +12 -12
  39. package/dist/types/analytics/types/node-events.d.ts +11 -11
  40. package/dist/types/analytics/types/paste-events.d.ts +10 -10
  41. package/dist/types/analytics/types/performance-report.d.ts +1 -1
  42. package/dist/types/analytics/types/referentiality-events.d.ts +10 -10
  43. package/dist/types/analytics/types/selection-events.d.ts +6 -6
  44. package/dist/types/analytics/types/smart-links.d.ts +2 -2
  45. package/dist/types/analytics/types/substitute-events.d.ts +5 -5
  46. package/dist/types/analytics/types/table-events.d.ts +18 -18
  47. package/dist/types/analytics/types/toolbar-button.d.ts +2 -2
  48. package/dist/types/analytics/types/type-ahead.d.ts +8 -8
  49. package/dist/types/analytics/types/utils.d.ts +9 -9
  50. package/dist/types/card/utils.d.ts +2 -2
  51. package/dist/types/collab/types.d.ts +2 -2
  52. package/dist/types/event-dispatcher/index.d.ts +2 -2
  53. package/dist/types/extensions/combine-extension-providers.d.ts +1 -1
  54. package/dist/types/extensions/default-extension-provider.d.ts +1 -1
  55. package/dist/types/extensions/extension-handlers.d.ts +2 -2
  56. package/dist/types/extensions/manifest-helpers.d.ts +6 -5
  57. package/dist/types/extensions/module-helpers.d.ts +4 -4
  58. package/dist/types/extensions/types/extension-handler.d.ts +9 -9
  59. package/dist/types/extensions/types/extension-manifest-common.d.ts +4 -4
  60. package/dist/types/extensions/types/extension-manifest-toolbar-item.d.ts +11 -11
  61. package/dist/types/extensions/types/extension-manifest.d.ts +30 -30
  62. package/dist/types/extensions/types/extension-parameters.d.ts +2 -2
  63. package/dist/types/extensions/types/field-definitions.d.ts +12 -12
  64. package/dist/types/extensions/types/utils.d.ts +2 -2
  65. package/dist/types/hooks/useSharedPluginState.d.ts +2 -2
  66. package/dist/types/i18n/cs.d.ts +6 -6
  67. package/dist/types/i18n/da.d.ts +6 -6
  68. package/dist/types/i18n/de.d.ts +6 -6
  69. package/dist/types/i18n/en.d.ts +6 -6
  70. package/dist/types/i18n/en_GB.d.ts +6 -6
  71. package/dist/types/i18n/en_ZZ.d.ts +6 -6
  72. package/dist/types/i18n/es.d.ts +6 -6
  73. package/dist/types/i18n/et.d.ts +1 -1
  74. package/dist/types/i18n/fi.d.ts +6 -6
  75. package/dist/types/i18n/fr.d.ts +6 -6
  76. package/dist/types/i18n/hu.d.ts +6 -6
  77. package/dist/types/i18n/it.d.ts +6 -6
  78. package/dist/types/i18n/ja.d.ts +6 -6
  79. package/dist/types/i18n/ko.d.ts +6 -6
  80. package/dist/types/i18n/languages.d.ts +6 -6
  81. package/dist/types/i18n/nb.d.ts +6 -6
  82. package/dist/types/i18n/nl.d.ts +6 -6
  83. package/dist/types/i18n/pl.d.ts +6 -6
  84. package/dist/types/i18n/pt_BR.d.ts +6 -6
  85. package/dist/types/i18n/pt_PT.d.ts +1 -1
  86. package/dist/types/i18n/ru.d.ts +6 -6
  87. package/dist/types/i18n/sk.d.ts +1 -1
  88. package/dist/types/i18n/sv.d.ts +6 -6
  89. package/dist/types/i18n/th.d.ts +6 -6
  90. package/dist/types/i18n/tr.d.ts +6 -6
  91. package/dist/types/i18n/uk.d.ts +6 -6
  92. package/dist/types/i18n/vi.d.ts +6 -6
  93. package/dist/types/i18n/zh.d.ts +6 -6
  94. package/dist/types/i18n/zh_TW.d.ts +6 -6
  95. package/dist/types/node-width/index.d.ts +1 -1
  96. package/dist/types/normalize-feature-flags.d.ts +2 -2
  97. package/dist/types/preset/plugin-injection-api.d.ts +5 -5
  98. package/dist/types/provider-factory/autoformatting-provider.d.ts +3 -3
  99. package/dist/types/provider-factory/card-provider.d.ts +1 -1
  100. package/dist/types/provider-factory/image-upload-provider.d.ts +2 -2
  101. package/dist/types/provider-factory/macro-provider.d.ts +1 -1
  102. package/dist/types/provider-factory/media-provider.d.ts +1 -1
  103. package/dist/types/provider-factory/quick-insert-provider.d.ts +4 -4
  104. package/dist/types/provider-factory/search-provider.d.ts +1 -1
  105. package/dist/types/provider-factory/types.d.ts +3 -3
  106. package/dist/types/provider-factory/with-providers.d.ts +1 -1
  107. package/dist/types/provider-helpers/combine-providers.d.ts +4 -4
  108. package/dist/types/provider-helpers/promise-helpers.d.ts +2 -2
  109. package/dist/types/react-node-view/types.d.ts +6 -6
  110. package/dist/types/selection/gap-cursor/utils/is-ignored.d.ts +1 -1
  111. package/dist/types/selection/gap-cursor/utils/is-valid-target-node.d.ts +1 -1
  112. package/dist/types/selection/types.d.ts +1 -1
  113. package/dist/types/selection/utils.d.ts +2 -2
  114. package/dist/types/styles/shared/table.d.ts +1 -1
  115. package/dist/types/transforms/expand.d.ts +1 -1
  116. package/dist/types/types/annotation/emitter.d.ts +5 -5
  117. package/dist/types/types/annotation/index.d.ts +8 -8
  118. package/dist/types/types/collab.d.ts +2 -2
  119. package/dist/types/types/command.d.ts +3 -3
  120. package/dist/types/types/context-panel.d.ts +1 -1
  121. package/dist/types/types/copy-button.d.ts +2 -2
  122. package/dist/types/types/editor-actions.d.ts +2 -2
  123. package/dist/types/types/editor-appearance.d.ts +1 -1
  124. package/dist/types/types/editor-container-width.d.ts +2 -2
  125. package/dist/types/types/editor-plugin.d.ts +4 -4
  126. package/dist/types/types/editor-react-context.d.ts +1 -1
  127. package/dist/types/types/empty-state-handler.d.ts +2 -2
  128. package/dist/types/types/feature-flags.d.ts +3 -3
  129. package/dist/types/types/floating-toolbar.d.ts +26 -26
  130. package/dist/types/types/index.d.ts +1 -1
  131. package/dist/types/types/next-editor-plugin.d.ts +38 -38
  132. package/dist/types/types/plugin-factory.d.ts +3 -3
  133. package/dist/types/types/quick-insert.d.ts +5 -5
  134. package/dist/types/types/supported-browsers.d.ts +3 -3
  135. package/dist/types/types/toolbar.d.ts +2 -2
  136. package/dist/types/types/type-ahead.d.ts +7 -7
  137. package/dist/types/types/ui-components.d.ts +2 -2
  138. package/dist/types/ufo/experience-store.d.ts +2 -2
  139. package/dist/types/ui/BaseTheme/index.d.ts +2 -2
  140. package/dist/types/ui/Caption/index.d.ts +1 -1
  141. package/dist/types/ui/DropList/index.d.ts +1 -1
  142. package/dist/types/ui/ErrorBoundary/index.d.ts +1 -1
  143. package/dist/types/ui/EventHandlers/index.d.ts +5 -5
  144. package/dist/types/ui/Layer/index.d.ts +2 -2
  145. package/dist/types/ui/MediaSingle/index.d.ts +1 -1
  146. package/dist/types/ui/OverflowShadow/shadowObserver.d.ts +1 -1
  147. package/dist/types/ui/PortalProvider/index.d.ts +5 -5
  148. package/dist/types/ui/WidthProvider/index.d.ts +4 -4
  149. package/dist/types/ui/WithCreateAnalyticsEvent/index.d.ts +1 -1
  150. package/dist/types/ui/with-outer-listeners.d.ts +1 -1
  151. package/dist/types/ui-color/ColorPalette/Palettes/type.d.ts +2 -2
  152. package/dist/types/ui-menu/ArrowKeyNavigationProvider/types.d.ts +7 -7
  153. package/dist/types/ui-menu/ToolbarButton/index.d.ts +2 -2
  154. package/dist/types/ui-react/ReactEditorViewContext.d.ts +1 -1
  155. package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +2 -2
  156. package/dist/types/utils/analytics.d.ts +7 -7
  157. package/dist/types/utils/annotation/index.d.ts +1 -1
  158. package/dist/types/utils/browser-extensions.d.ts +6 -6
  159. package/dist/types/utils/collab.d.ts +1 -1
  160. package/dist/types/utils/compare-props.d.ts +8 -8
  161. package/dist/types/utils/compareNodes.d.ts +2 -2
  162. package/dist/types/utils/compose.d.ts +1 -1
  163. package/dist/types/utils/date.d.ts +1 -1
  164. package/dist/types/utils/dom.d.ts +1 -1
  165. package/dist/types/utils/error-reporter.d.ts +1 -1
  166. package/dist/types/utils/extension-handler.d.ts +2 -2
  167. package/dist/types/utils/imageLoader.d.ts +1 -1
  168. package/dist/types/utils/nodes.d.ts +2 -2
  169. package/dist/types/utils/performance/hooks/use-component-render-tracking/index.d.ts +3 -3
  170. package/dist/types/utils/plugin-state-factory.d.ts +3 -3
  171. package/dist/types/utils/profiler/render-count.d.ts +2 -2
  172. package/dist/types/utils/referentiality.d.ts +6 -6
  173. package/dist/types/utils/slice.d.ts +2 -2
  174. package/dist/types/utils/track-unsupported-content.d.ts +4 -4
  175. package/dist/types/utils/traversor.d.ts +1 -1
  176. package/dist/types/utils/types.d.ts +2 -2
  177. package/dist/types/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +2 -2
  178. package/dist/types/utils/validate-using-spec.d.ts +3 -3
  179. package/dist/types/utils/validator.d.ts +1 -1
  180. package/dist/types/with-plugin-state/index.d.ts +6 -6
  181. package/dist/types/with-plugin-state/types.d.ts +3 -3
  182. package/emoji/package.json +2 -2
  183. package/error-boundary/package.json +2 -2
  184. package/event-dispatcher/package.json +2 -2
  185. package/extensions/package.json +2 -2
  186. package/hooks/package.json +2 -2
  187. package/icons/package.json +2 -2
  188. package/in-product/package.json +2 -2
  189. package/keymaps/package.json +2 -2
  190. package/mention/package.json +2 -2
  191. package/messages/package.json +2 -2
  192. package/node-width/package.json +2 -2
  193. package/normalize-feature-flags/package.json +2 -2
  194. package/package.json +15 -7
  195. package/panel/package.json +2 -2
  196. package/portal-provider/package.json +2 -2
  197. package/preset/package.json +2 -2
  198. package/provider-factory/package.json +2 -2
  199. package/provider-helpers/package.json +2 -2
  200. package/react-node-view/package.json +2 -2
  201. package/safe-plugin/package.json +2 -2
  202. package/selection/package.json +2 -2
  203. package/styles/package.json +2 -2
  204. package/transforms/package.json +2 -2
  205. package/type-ahead/package.json +2 -2
  206. package/types/package.json +2 -2
  207. package/ufo/package.json +2 -2
  208. package/ui/package.json +2 -2
  209. package/ui-color/package.json +2 -2
  210. package/ui-menu/package.json +2 -2
  211. package/ui-react/package.json +2 -2
  212. package/utils/package.json +2 -2
  213. package/validator/package.json +2 -2
  214. package/with-plugin-state/package.json +2 -2
@@ -9,11 +9,11 @@ import type { ProviderFactory } from '../provider-factory';
9
9
  import type { PaletteColor } from '../ui-color/ColorPalette/Palettes/type';
10
10
  import type { Command } from './command';
11
11
  import type { MarkOptions, NodeOptions } from './copy-button';
12
- export interface RenderOptionsPropsT<T> {
12
+ export interface RenderOptionsPropsT<T extends {}> {
13
13
  hide: () => void;
14
14
  dispatchCommand: (command: T) => void;
15
15
  }
16
- export interface DropdownOptionT<T> {
16
+ export interface DropdownOptionT<T extends {}> {
17
17
  id?: string;
18
18
  title: string;
19
19
  onClick: T;
@@ -31,12 +31,12 @@ export interface DropdownOptionT<T> {
31
31
  tooltip?: string;
32
32
  elemAfter?: React.ReactNode;
33
33
  }
34
- export declare type DropdownOptions<T> = Array<DropdownOptionT<T>> | {
34
+ export type DropdownOptions<T extends {}> = Array<DropdownOptionT<T>> | {
35
35
  render: (props: RenderOptionsPropsT<T>) => React.ReactElement<any> | null;
36
36
  height: number;
37
37
  width: number;
38
38
  };
39
- export interface SelectOption<T = unknown> {
39
+ export interface SelectOption<T extends {} = {}> {
40
40
  value: string;
41
41
  label: string;
42
42
  selected?: boolean;
@@ -44,19 +44,19 @@ export interface SelectOption<T = unknown> {
44
44
  hidden?: boolean;
45
45
  data?: T;
46
46
  }
47
- export declare type ButtonAppearance = 'subtle' | 'danger';
48
- export declare type Icon = React.ComponentType<{
47
+ export type ButtonAppearance = 'subtle' | 'danger';
48
+ export type Icon = React.ComponentType<{
49
49
  label: string;
50
50
  }>;
51
- export declare type RenderOptionsProps = RenderOptionsPropsT<Command>;
52
- export declare type AlignType = 'left' | 'center' | 'right';
51
+ export type RenderOptionsProps = RenderOptionsPropsT<Command>;
52
+ export type AlignType = 'left' | 'center' | 'right';
53
53
  interface Position {
54
54
  top?: number;
55
55
  right?: number;
56
56
  bottom?: number;
57
57
  left?: number;
58
58
  }
59
- export declare type ConfirmDialogChildInfo = {
59
+ export type ConfirmDialogChildInfo = {
60
60
  id: string;
61
61
  name: string | null;
62
62
  amount: number;
@@ -72,7 +72,7 @@ export interface ConfirmDialogOptions {
72
72
  getChildrenInfo?: () => ConfirmDialogChildInfo[];
73
73
  onConfirm?: (...args: any[]) => Command;
74
74
  }
75
- export declare type ConfirmationDialogProps = {
75
+ export type ConfirmationDialogProps = {
76
76
  onConfirm: (isCheck?: boolean) => void;
77
77
  /**
78
78
  * onClose is called every time when the dialog is closed.
@@ -83,12 +83,12 @@ export declare type ConfirmationDialogProps = {
83
83
  options?: ConfirmDialogOptions;
84
84
  testId?: string;
85
85
  };
86
- export declare type FloatingToolbarCopyButton = {
86
+ export type FloatingToolbarCopyButton = {
87
87
  type: 'copy-button';
88
88
  items: Array<FloatingToolbarSeparator | MarkOptions | NodeOptions>;
89
89
  hidden?: boolean;
90
90
  };
91
- export declare type FloatingToolbarButton<T> = {
91
+ export type FloatingToolbarButton<T extends {}> = {
92
92
  id?: string;
93
93
  type: 'button';
94
94
  title: string;
@@ -117,7 +117,7 @@ export declare type FloatingToolbarButton<T> = {
117
117
  tabIndex?: number | null | undefined;
118
118
  focusEditoronEnter?: boolean;
119
119
  };
120
- export declare type FloatingToolbarInput<T> = {
120
+ export type FloatingToolbarInput<T extends {}> = {
121
121
  id: string;
122
122
  type: 'input';
123
123
  title?: string;
@@ -128,7 +128,7 @@ export declare type FloatingToolbarInput<T> = {
128
128
  placeholder?: string;
129
129
  hidden?: boolean;
130
130
  };
131
- export declare type FloatingToolbarCustom<T> = {
131
+ export type FloatingToolbarCustom<T extends {}> = {
132
132
  type: 'custom';
133
133
  /**
134
134
  * By default -- the floating toolbar supports navigating between
@@ -145,7 +145,7 @@ export declare type FloatingToolbarCustom<T> = {
145
145
  render: (view?: EditorView, idx?: number, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => React.ComponentClass | React.SFC | React.ReactElement<any> | null;
146
146
  hidden?: boolean;
147
147
  };
148
- declare type FloatingToolbarSelectBase<T, V = SelectOption> = {
148
+ type FloatingToolbarSelectBase<T extends {}, V = SelectOption> = {
149
149
  id: string;
150
150
  type: 'select';
151
151
  selectType: 'list' | 'emoji' | 'date' | 'color';
@@ -158,27 +158,27 @@ declare type FloatingToolbarSelectBase<T, V = SelectOption> = {
158
158
  onChange: (selected: V) => T;
159
159
  filterOption?: ((option: V, rawInput: string) => boolean) | null;
160
160
  };
161
- export declare type FloatingToolbarListPicker<T> = FloatingToolbarSelectBase<T> & {
161
+ export type FloatingToolbarListPicker<T extends {}> = FloatingToolbarSelectBase<T> & {
162
162
  selectType: 'list';
163
163
  };
164
- export declare type FloatingToolbarColorPicker<T> = FloatingToolbarSelectBase<T, PaletteColor> & {
164
+ export type FloatingToolbarColorPicker<T extends {}> = FloatingToolbarSelectBase<T, PaletteColor> & {
165
165
  selectType: 'color';
166
166
  };
167
- export declare type FloatingToolbarEmojiPicker<T> = FloatingToolbarSelectBase<T, EmojiId> & {
167
+ export type FloatingToolbarEmojiPicker<T extends {}> = FloatingToolbarSelectBase<T, EmojiId> & {
168
168
  selectType: 'emoji';
169
169
  selected?: boolean;
170
170
  options: never[];
171
171
  };
172
- export declare type FloatingToolbarDatePicker<T> = FloatingToolbarSelectBase<T, number> & {
172
+ export type FloatingToolbarDatePicker<T extends {}> = FloatingToolbarSelectBase<T, number> & {
173
173
  selectType: 'date';
174
174
  options: never[];
175
175
  };
176
- export declare type FloatingToolbarSelect<T> = FloatingToolbarEmojiPicker<T> | FloatingToolbarColorPicker<T> | FloatingToolbarListPicker<T> | FloatingToolbarDatePicker<T>;
177
- export declare type FloatingToolbarSeparator = {
176
+ export type FloatingToolbarSelect<T extends {}> = FloatingToolbarEmojiPicker<T> | FloatingToolbarColorPicker<T> | FloatingToolbarListPicker<T> | FloatingToolbarDatePicker<T>;
177
+ export type FloatingToolbarSeparator = {
178
178
  type: 'separator';
179
179
  hidden?: boolean;
180
180
  };
181
- export declare type FloatingToolbarDropdown<T> = {
181
+ export type FloatingToolbarDropdown<T extends {}> = {
182
182
  testId?: string;
183
183
  id?: string;
184
184
  type: 'dropdown';
@@ -192,7 +192,7 @@ export declare type FloatingToolbarDropdown<T> = {
192
192
  dropdownWidth?: number;
193
193
  showSelected?: boolean;
194
194
  };
195
- declare type FloatingToolbarExtensionsPlaceholder = {
195
+ type FloatingToolbarExtensionsPlaceholder = {
196
196
  type: 'extensions-placeholder';
197
197
  hidden?: boolean;
198
198
  separator?: 'start' | 'end' | 'both';
@@ -206,8 +206,8 @@ declare type FloatingToolbarExtensionsPlaceholder = {
206
206
  * This type is restricted with the items that can be used for fallback.
207
207
  * Make sure that this type is not a FloatingToolbarCustom type.
208
208
  */
209
- export declare type FloatingToolbarFallbackItem<T> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarSeparator;
210
- export declare type FloatingToolbarItem<T> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarCustom<T> | FloatingToolbarSeparator | FloatingToolbarExtensionsPlaceholder;
209
+ export type FloatingToolbarFallbackItem<T extends {}> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarSeparator;
210
+ export type FloatingToolbarItem<T extends {}> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarCustom<T> | FloatingToolbarSeparator | FloatingToolbarExtensionsPlaceholder;
211
211
  export interface FloatingToolbarConfig {
212
212
  /** Used for the ariaLabel on the <Popup /> component */
213
213
  title: string;
@@ -249,5 +249,5 @@ export interface FloatingToolbarConfig {
249
249
  focusTrap?: boolean;
250
250
  preventPopupOverflow?: boolean;
251
251
  }
252
- export declare type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
252
+ export type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
253
253
  export {};
@@ -30,6 +30,6 @@ export type { PMPluginFactoryParams, PMPluginFactory, PMPlugin, } from './plugin
30
30
  export type { NodeConfig, MarkConfig, NodeViewConfig, } from './prosemirror-config';
31
31
  export type { PluginsOptions, EditorPlugin, getPosHandler, getPosHandlerNode, } from './editor-plugin';
32
32
  export type { NextEditorPlugin, AllEditorPresetPluginTypes, PluginDependenciesAPI, ExtractPluginNameFromAllBuilderPlugins, SafePresetCheck, DefaultEditorPlugin, OptionalPlugin, PluginInjectionAPI, CreatePluginDependenciesAPI, NextEditorPluginMetadata, ExtractInjectionAPI, } from './next-editor-plugin';
33
- export declare type IconProps = {
33
+ export type IconProps = {
34
34
  label?: string;
35
35
  };
@@ -6,56 +6,56 @@
6
6
  */
7
7
  import type { EditorState } from 'prosemirror-state';
8
8
  import type { EditorPlugin } from './editor-plugin';
9
- declare type IsAny<T> = 0 extends 1 & T ? true : false;
10
- declare type PickSharedStatePropertyName<Metadata extends NextEditorPluginMetadata> = IsAny<Metadata> extends true ? never : ExtractSharedStateFromMetadata<Metadata> extends never ? never : 'getSharedState';
11
- declare type WithSharedState<Metadata extends NextEditorPluginMetadata> = {
9
+ type IsAny<T> = 0 extends 1 & T ? true : false;
10
+ type PickSharedStatePropertyName<Metadata extends NextEditorPluginMetadata> = IsAny<Metadata> extends true ? never : ExtractSharedStateFromMetadata<Metadata> extends never ? never : 'getSharedState';
11
+ type WithSharedState<Metadata extends NextEditorPluginMetadata> = {
12
12
  [Property in keyof Pick<Metadata, 'sharedState'> as PickSharedStatePropertyName<Metadata>]: (editorState: EditorState | undefined) => ExtractSharedStateFromMetadata<Metadata>;
13
13
  };
14
- declare type PickActionsPropertyName<Metadata extends NextEditorPluginMetadata> = IsAny<Metadata> extends true ? never : ExtractActionsFromMetadata<Metadata> extends never ? never : 'actions';
15
- declare type WithActions<Metadata extends NextEditorPluginMetadata> = {
14
+ type PickActionsPropertyName<Metadata extends NextEditorPluginMetadata> = IsAny<Metadata> extends true ? never : ExtractActionsFromMetadata<Metadata> extends never ? never : 'actions';
15
+ type WithActions<Metadata extends NextEditorPluginMetadata> = {
16
16
  [Property in keyof Pick<Metadata, 'actions'> as PickActionsPropertyName<Metadata>]: ExtractActionsFromMetadata<Metadata>;
17
17
  };
18
- export declare type DefaultEditorPlugin<Name extends string, Metadata extends NextEditorPluginMetadata> = EditorPlugin & WithSharedState<Metadata> & WithActions<Metadata> & {
18
+ export type DefaultEditorPlugin<Name extends string, Metadata extends NextEditorPluginMetadata> = EditorPlugin & WithSharedState<Metadata> & WithActions<Metadata> & {
19
19
  name: Name;
20
20
  };
21
- declare type MaybeAction = ((...agrs: any) => any) | ((...agrs: any) => void);
22
- declare type NextEditorPluginActions = Record<string, MaybeAction>;
21
+ type MaybeAction = ((...agrs: any) => any) | ((...agrs: any) => void);
22
+ type NextEditorPluginActions = Record<string, MaybeAction>;
23
23
  export interface NextEditorPluginMetadata {
24
24
  readonly sharedState?: any;
25
25
  readonly pluginConfiguration?: any;
26
26
  readonly dependencies?: DependencyPlugin[];
27
27
  readonly actions?: NextEditorPluginActions;
28
28
  }
29
- export declare type PluginInjectionAPI<Name extends string, Metadata extends NextEditorPluginMetadata> = {
29
+ export type PluginInjectionAPI<Name extends string, Metadata extends NextEditorPluginMetadata> = {
30
30
  dependencies: CreatePluginDependenciesAPI<[
31
31
  NextEditorPlugin<Name, Metadata>,
32
32
  ...ExtractPluginDependenciesFromMetadata<Metadata>
33
33
  ]>;
34
34
  };
35
- declare type NextEditorPluginFunctionDefinition<Name extends string, Metadata extends NextEditorPluginMetadata, Configuration> = (config: Configuration, api?: PluginInjectionAPI<Name, Metadata>) => DefaultEditorPlugin<Name, Metadata>;
36
- declare type NextEditorPluginFunctionOptionalConfigDefinition<Name extends string, Metadata extends NextEditorPluginMetadata, Configuration = undefined> = (config?: Configuration, api?: PluginInjectionAPI<Name, Metadata>) => DefaultEditorPlugin<Name, Metadata>;
37
- declare type OptionalPrivateProperty = {
35
+ type NextEditorPluginFunctionDefinition<Name extends string, Metadata extends NextEditorPluginMetadata, Configuration> = (config: Configuration, api?: PluginInjectionAPI<Name, Metadata>) => DefaultEditorPlugin<Name, Metadata>;
36
+ type NextEditorPluginFunctionOptionalConfigDefinition<Name extends string, Metadata extends NextEditorPluginMetadata, Configuration = undefined> = (config?: Configuration, api?: PluginInjectionAPI<Name, Metadata>) => DefaultEditorPlugin<Name, Metadata>;
37
+ type OptionalPrivateProperty = {
38
38
  __optionalPluginType: true;
39
39
  };
40
- export declare type OptionalPlugin<EditorPlugin extends NextEditorPlugin<any, any>> = EditorPlugin & OptionalPrivateProperty;
41
- declare type DependencyPlugin = OptionalPlugin<NextEditorPlugin<any, any>> | NextEditorPlugin<any, any>;
42
- export declare type NextEditorPlugin<Name extends string, Metadata extends NextEditorPluginMetadata = {}> = Metadata extends NextEditorPluginMetadata ? 'pluginConfiguration' extends keyof Metadata ? undefined extends Metadata['pluginConfiguration'] ? NextEditorPluginFunctionOptionalConfigDefinition<Name, Metadata, Metadata['pluginConfiguration']> : NextEditorPluginFunctionDefinition<Name, Metadata, Metadata['pluginConfiguration']> : NextEditorPluginFunctionOptionalConfigDefinition<Name, Metadata> : never;
43
- declare type FilterOptionalPlugins<T extends DependencyPlugin[]> = T extends [
40
+ export type OptionalPlugin<EditorPlugin extends NextEditorPlugin<any, any>> = EditorPlugin & OptionalPrivateProperty;
41
+ type DependencyPlugin = OptionalPlugin<NextEditorPlugin<any, any>> | NextEditorPlugin<any, any>;
42
+ export type NextEditorPlugin<Name extends string, Metadata extends NextEditorPluginMetadata = {}> = Metadata extends NextEditorPluginMetadata ? 'pluginConfiguration' extends keyof Metadata ? undefined extends Metadata['pluginConfiguration'] ? NextEditorPluginFunctionOptionalConfigDefinition<Name, Metadata, Metadata['pluginConfiguration']> : NextEditorPluginFunctionDefinition<Name, Metadata, Metadata['pluginConfiguration']> : NextEditorPluginFunctionOptionalConfigDefinition<Name, Metadata> : never;
43
+ type FilterOptionalPlugins<T extends DependencyPlugin[]> = T extends [
44
44
  infer Head,
45
45
  ...infer Tail
46
46
  ] ? Tail extends DependencyPlugin[] ? Head extends OptionalPlugin<NextEditorPlugin<any, any>> ? FilterOptionalPlugins<Tail> : [Head, ...FilterOptionalPlugins<Tail>] : T : T;
47
- declare type ExtractPluginDependenciesFromMetadataWithoutOptionals<Metadata extends NextEditorPluginMetadata> = Metadata['dependencies'] extends DependencyPlugin[] ? FilterOptionalPlugins<Metadata['dependencies']> : [];
48
- declare type ExtractPluginDependenciesFromMetadata<Metadata> = 'dependencies' extends keyof Metadata ? Metadata['dependencies'] extends DependencyPlugin[] ? Exclude<Metadata['dependencies'], undefined> : [] : [];
49
- declare type ExtractSharedStateFromMetadata<Metadata> = 'sharedState' extends keyof Metadata ? Metadata['sharedState'] : never;
50
- declare type ExtractActionsFromMetadata<Metadata> = 'actions' extends keyof Metadata ? Metadata['actions'] : never;
51
- declare type ExtractPluginConfigurationFromMetadata<Metadata> = 'pluginConfiguration' extends keyof Metadata ? Metadata['pluginConfiguration'] : never;
52
- export declare type ExtractPluginDependencies<Plugin> = Plugin extends NextEditorPlugin<any, any> ? Plugin extends (config: any, api: any) => DefaultEditorPlugin<any, infer Metadata> ? ExtractPluginDependenciesFromMetadataWithoutOptionals<Metadata> : never : never;
53
- declare type ExtractPluginConfiguration<Plugin> = Plugin extends NextEditorPlugin<any, any> ? Plugin extends (config: any, api: any) => DefaultEditorPlugin<any, infer Metadata> ? ExtractPluginConfigurationFromMetadata<Metadata> : never : never;
54
- export declare type ExtractPluginSharedState<Plugin> = Plugin extends NextEditorPlugin<any, any> ? Plugin extends (config: any, api: any) => DefaultEditorPlugin<any, infer Metadata> ? ExtractSharedStateFromMetadata<Metadata> : never : never;
55
- declare type ExtractPluginActions<Plugin> = Plugin extends NextEditorPlugin<any, any> ? Plugin extends (config: any, api: any) => DefaultEditorPlugin<any, infer Metadata> ? ExtractActionsFromMetadata<Metadata> : never : never;
56
- declare type ExtractPluginName<Plugin> = Plugin extends NextEditorPlugin<any, any> ? Plugin extends (...args: any) => DefaultEditorPlugin<infer PluginName, any> ? PluginName : never : never;
57
- declare type Unsubscribe = () => void;
58
- export declare type PluginDependenciesAPI<Plugin extends NextEditorPlugin<any, any>> = {
47
+ type ExtractPluginDependenciesFromMetadataWithoutOptionals<Metadata extends NextEditorPluginMetadata> = Metadata['dependencies'] extends DependencyPlugin[] ? FilterOptionalPlugins<Metadata['dependencies']> : [];
48
+ type ExtractPluginDependenciesFromMetadata<Metadata> = 'dependencies' extends keyof Metadata ? Metadata['dependencies'] extends DependencyPlugin[] ? Exclude<Metadata['dependencies'], undefined> : [] : [];
49
+ type ExtractSharedStateFromMetadata<Metadata> = 'sharedState' extends keyof Metadata ? Metadata['sharedState'] : never;
50
+ type ExtractActionsFromMetadata<Metadata> = 'actions' extends keyof Metadata ? Metadata['actions'] : never;
51
+ type ExtractPluginConfigurationFromMetadata<Metadata> = 'pluginConfiguration' extends keyof Metadata ? Metadata['pluginConfiguration'] : never;
52
+ export type ExtractPluginDependencies<Plugin> = Plugin extends NextEditorPlugin<any, any> ? Plugin extends (config: any, api: any) => DefaultEditorPlugin<any, infer Metadata> ? ExtractPluginDependenciesFromMetadataWithoutOptionals<Metadata> : never : never;
53
+ type ExtractPluginConfiguration<Plugin> = Plugin extends NextEditorPlugin<any, any> ? Plugin extends (config: any, api: any) => DefaultEditorPlugin<any, infer Metadata> ? ExtractPluginConfigurationFromMetadata<Metadata> : never : never;
54
+ export type ExtractPluginSharedState<Plugin> = Plugin extends NextEditorPlugin<any, any> ? Plugin extends (config: any, api: any) => DefaultEditorPlugin<any, infer Metadata> ? ExtractSharedStateFromMetadata<Metadata> : never : never;
55
+ type ExtractPluginActions<Plugin> = Plugin extends NextEditorPlugin<any, any> ? Plugin extends (config: any, api: any) => DefaultEditorPlugin<any, infer Metadata> ? ExtractActionsFromMetadata<Metadata> : never : never;
56
+ type ExtractPluginName<Plugin> = Plugin extends NextEditorPlugin<any, any> ? Plugin extends (...args: any) => DefaultEditorPlugin<infer PluginName, any> ? PluginName : never : never;
57
+ type Unsubscribe = () => void;
58
+ export type PluginDependenciesAPI<Plugin extends NextEditorPlugin<any, any>> = {
59
59
  sharedState: {
60
60
  currentState: () => ExtractPluginSharedState<Plugin> | undefined;
61
61
  onChange: (sub: (props: {
@@ -65,13 +65,13 @@ export declare type PluginDependenciesAPI<Plugin extends NextEditorPlugin<any, a
65
65
  };
66
66
  actions: ExtractPluginActions<Plugin>;
67
67
  };
68
- export declare type CreatePluginDependenciesAPI<PluginList extends NextEditorPlugin<any, any>[]> = {
68
+ export type CreatePluginDependenciesAPI<PluginList extends NextEditorPlugin<any, any>[]> = {
69
69
  [Plugin in PluginList[number] as `${ExtractPluginName<Plugin>}`]: Plugin extends OptionalPlugin<NextEditorPlugin<any, any>> ? PluginDependenciesAPI<Plugin> | undefined : Plugin extends NextEditorPlugin<any, any> ? PluginDependenciesAPI<Plugin> : never;
70
70
  };
71
- export declare type PluginAsArray<Plugin> = undefined extends ExtractPluginConfiguration<Plugin> ? [Plugin, ExtractPluginConfiguration<Plugin>?] : [Plugin, ExtractPluginConfiguration<Plugin>];
72
- export declare type AllEditorPresetPluginTypes = PluginAsArray<any> | NextEditorPlugin<any, any>;
73
- declare type ExtractNextEditorPlugin<Plugin> = Plugin extends PluginAsArray<any> ? Plugin[0] : never;
74
- export declare type VerifyPluginDependencies<Plugin, PluginsStack extends AllEditorPresetPluginTypes[]> = ExtractPluginDependencies<Plugin> extends [] ? Plugin extends PluginAsArray<any> | NextEditorPlugin<any, any> ? Plugin : never :
71
+ export type PluginAsArray<Plugin> = undefined extends ExtractPluginConfiguration<Plugin> ? [Plugin, ExtractPluginConfiguration<Plugin>?] : [Plugin, ExtractPluginConfiguration<Plugin>];
72
+ export type AllEditorPresetPluginTypes = PluginAsArray<any> | NextEditorPlugin<any, any>;
73
+ type ExtractNextEditorPlugin<Plugin> = Plugin extends PluginAsArray<any> ? Plugin[0] : never;
74
+ export type VerifyPluginDependencies<Plugin, PluginsStack extends AllEditorPresetPluginTypes[]> = ExtractPluginDependencies<Plugin> extends [] ? Plugin extends PluginAsArray<any> | NextEditorPlugin<any, any> ? Plugin : never :
75
75
  /**
76
76
  * case 1: We're looking for its dependent plugins indexed on `AllEditorPresetPluginTypes`
77
77
  */
@@ -85,11 +85,11 @@ ExtractPluginDependencies<Plugin>[number] extends (ExtractPluginDependencies<Plu
85
85
  /**
86
86
  * Used to check if a plugin being added can be added to a Preset/builder
87
87
  */
88
- export declare type SafePresetCheck<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends Plugin & VerifyPluginDependencies<Plugin, StackPlugins> ? Plugin extends NextEditorPlugin<any, any> ? CheckBasicPlugin<Plugin> : never : never;
89
- declare type CheckTupleRequirements<Plugin, Config, ArrayType> = unknown extends Config ? Plugin | ArrayType : undefined extends Config ? Plugin | ArrayType : [
88
+ export type SafePresetCheck<Plugin, StackPlugins extends AllEditorPresetPluginTypes[]> = Plugin extends Plugin & VerifyPluginDependencies<Plugin, StackPlugins> ? Plugin extends NextEditorPlugin<any, any> ? CheckBasicPlugin<Plugin> : never : never;
89
+ type CheckTupleRequirements<Plugin, Config, ArrayType> = unknown extends Config ? Plugin | ArrayType : undefined extends Config ? Plugin | ArrayType : [
90
90
  Config
91
91
  ] extends [never] ? Plugin : ArrayType;
92
- declare type CheckBasicPlugin<Plugin> = Plugin extends (args: any, api: any) => EditorPlugin ? CheckTupleRequirements<Plugin, ExtractPluginConfiguration<Plugin>, PluginAsArray<Plugin>> : never;
93
- export declare type ExtractPluginNameFromAllBuilderPlugins<Plugin extends AllEditorPresetPluginTypes> = Plugin extends Array<any> ? Plugin extends [infer MaybePlugin, ...any] ? MaybePlugin extends NextEditorPlugin<any, any> ? ExtractPluginName<MaybePlugin> : never : never : Plugin extends NextEditorPlugin<any, any> ? ExtractPluginName<Plugin> : never;
94
- export declare type ExtractInjectionAPI<Plugin> = Plugin extends NextEditorPlugin<infer Name, infer Metadata> ? PluginInjectionAPI<Name, Metadata> : never;
92
+ type CheckBasicPlugin<Plugin> = Plugin extends (args: any, api: any) => EditorPlugin ? CheckTupleRequirements<Plugin, ExtractPluginConfiguration<Plugin>, PluginAsArray<Plugin>> : never;
93
+ export type ExtractPluginNameFromAllBuilderPlugins<Plugin extends AllEditorPresetPluginTypes> = Plugin extends Array<any> ? Plugin extends [infer MaybePlugin, ...any] ? MaybePlugin extends NextEditorPlugin<any, any> ? ExtractPluginName<MaybePlugin> : never : never : Plugin extends NextEditorPlugin<any, any> ? ExtractPluginName<Plugin> : never;
94
+ export type ExtractInjectionAPI<Plugin> = Plugin extends NextEditorPlugin<infer Name, infer Metadata> ? PluginInjectionAPI<Name, Metadata> : never;
95
95
  export {};
@@ -8,7 +8,7 @@ import type { PortalProviderAPI } from '../ui/PortalProvider';
8
8
  import type { ErrorReporter } from '../utils';
9
9
  import type { EditorReactContext } from './editor-react-context';
10
10
  import type { FeatureFlags } from './feature-flags';
11
- export declare type PMPluginFactoryParams = {
11
+ export type PMPluginFactoryParams = {
12
12
  schema: Schema;
13
13
  dispatch: Dispatch;
14
14
  eventDispatcher: EventDispatcher;
@@ -20,8 +20,8 @@ export declare type PMPluginFactoryParams = {
20
20
  featureFlags: FeatureFlags;
21
21
  getIntl: () => IntlShape;
22
22
  };
23
- export declare type PMPluginFactory = (params: PMPluginFactoryParams) => SafePlugin | undefined;
24
- export declare type PMPlugin = {
23
+ export type PMPluginFactory = (params: PMPluginFactoryParams) => SafePlugin | undefined;
24
+ export type PMPlugin = {
25
25
  name: string;
26
26
  plugin: PMPluginFactory;
27
27
  };
@@ -2,21 +2,21 @@ import { IntlShape } from 'react-intl-next';
2
2
  import type { QuickInsertItem, QuickInsertProvider } from '../provider-factory';
3
3
  import type { EmptyStateHandler } from './empty-state-handler';
4
4
  export type { QuickInsertActionInsert, QuickInsertItem, QuickInsertProvider, } from '../provider-factory';
5
- export declare type QuickInsertOptions = boolean | {
5
+ export type QuickInsertOptions = boolean | {
6
6
  provider: Promise<QuickInsertProvider>;
7
7
  };
8
- export declare type QuickInsertHandler = Array<QuickInsertItem> | ((intl: IntlShape) => Array<QuickInsertItem>);
9
- export declare type IconProps = {
8
+ export type QuickInsertHandler = Array<QuickInsertItem> | ((intl: IntlShape) => Array<QuickInsertItem>);
9
+ export type IconProps = {
10
10
  label?: string;
11
11
  };
12
- export declare type QuickInsertPluginState = {
12
+ export type QuickInsertPluginState = {
13
13
  isElementBrowserModalOpen: boolean;
14
14
  lazyDefaultItems: () => QuickInsertItem[];
15
15
  providedItems?: QuickInsertItem[];
16
16
  provider?: QuickInsertProvider;
17
17
  emptyStateHandler?: EmptyStateHandler;
18
18
  };
19
- export declare type QuickInsertPluginStateKeys = keyof QuickInsertPluginState;
19
+ export type QuickInsertPluginStateKeys = keyof QuickInsertPluginState;
20
20
  export interface QuickInsertPluginOptions {
21
21
  headless?: boolean;
22
22
  disableDefaultItems?: boolean;
@@ -1,10 +1,10 @@
1
1
  declare const SupportedBrowsers: readonly ["ie", "gecko", "chrome", "safari"];
2
- export declare type Browsers = (typeof SupportedBrowsers)[number];
3
- export declare type Range = {
2
+ export type Browsers = (typeof SupportedBrowsers)[number];
3
+ export type Range = {
4
4
  minimum: number;
5
5
  maximum?: number;
6
6
  };
7
- export declare type DisableSpellcheckByBrowser = {
7
+ export type DisableSpellcheckByBrowser = {
8
8
  [b in Browsers]?: Range;
9
9
  };
10
10
  export {};
@@ -22,9 +22,9 @@ export declare enum ToolbarWidthsFullPage {
22
22
  M = 490,
23
23
  S = 410
24
24
  }
25
- export declare type ToolbarUiComponentFactoryParams = UiComponentFactoryParams & {
25
+ export type ToolbarUiComponentFactoryParams = UiComponentFactoryParams & {
26
26
  toolbarSize: ToolbarSize;
27
27
  isToolbarReducedSpacing: boolean;
28
28
  isLastItem?: boolean;
29
29
  };
30
- export declare type ToolbarUIComponentFactory = (params: ToolbarUiComponentFactoryParams) => React.ReactElement<any> | null;
30
+ export type ToolbarUIComponentFactory = (params: ToolbarUiComponentFactoryParams) => React.ReactElement<any> | null;
@@ -3,7 +3,7 @@ import { Fragment, Node as PMNode } from 'prosemirror-model';
3
3
  import { EditorState, Transaction } from 'prosemirror-state';
4
4
  import type { TypeAheadPayload } from '../analytics/types/type-ahead';
5
5
  import type { SelectItemMode, TypeAheadAvailableNodes } from '../type-ahead';
6
- declare type TypeAheadForceSelectProps = {
6
+ type TypeAheadForceSelectProps = {
7
7
  query: string;
8
8
  items: Array<TypeAheadItem>;
9
9
  editorState: EditorState;
@@ -16,21 +16,21 @@ export interface TypeAheadStats {
16
16
  arrowDown: number;
17
17
  };
18
18
  }
19
- export declare type TypeAheadItemRenderProps = {
19
+ export type TypeAheadItemRenderProps = {
20
20
  onClick: () => void;
21
21
  onHover: () => void;
22
22
  isSelected: boolean;
23
23
  };
24
- export declare type TypeAheadInsert = (node?: PMNode | Object | string | Fragment, opts?: {
24
+ export type TypeAheadInsert = (node?: PMNode | Object | string | Fragment, opts?: {
25
25
  selectInlineNode?: boolean;
26
26
  }) => Transaction;
27
- export declare type TypeAheadSelectItem = (state: EditorState, item: TypeAheadItem, insert: TypeAheadInsert, meta: {
27
+ export type TypeAheadSelectItem = (state: EditorState, item: TypeAheadItem, insert: TypeAheadInsert, meta: {
28
28
  mode: SelectItemMode;
29
29
  stats: TypeAheadStats;
30
30
  query: string;
31
31
  sourceListItem: Array<TypeAheadItem>;
32
32
  }) => Transaction | false;
33
- export declare type TypeAheadItem = {
33
+ export type TypeAheadItem = {
34
34
  title: string;
35
35
  description?: string;
36
36
  keyshortcut?: string;
@@ -39,8 +39,8 @@ export declare type TypeAheadItem = {
39
39
  render?: (props: TypeAheadItemRenderProps) => React.ReactElement<TypeAheadItemRenderProps> | null;
40
40
  [key: string]: any;
41
41
  };
42
- export declare type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
43
- export declare type TypeAheadHandler = {
42
+ export type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
43
+ export type TypeAheadHandler = {
44
44
  id: TypeAheadAvailableNodes;
45
45
  /** Pattern that will trigger the TypeAhead */
46
46
  trigger: string;
@@ -5,7 +5,7 @@ import type { EventDispatcher } from '../event-dispatcher';
5
5
  import type { ProviderFactory } from '../provider-factory';
6
6
  import type { EditorActionsOptions } from './editor-actions';
7
7
  import type { EditorAppearance } from './editor-appearance';
8
- export declare type UiComponentFactoryParams = {
8
+ export type UiComponentFactoryParams = {
9
9
  editorView: EditorView;
10
10
  editorActions: EditorActionsOptions;
11
11
  eventDispatcher: EventDispatcher;
@@ -19,4 +19,4 @@ export declare type UiComponentFactoryParams = {
19
19
  disabled: boolean;
20
20
  wrapperElement: HTMLElement | null;
21
21
  };
22
- export declare type UIComponentFactory = (params: UiComponentFactoryParams) => React.ReactElement<any> | null;
22
+ export type UIComponentFactory = (params: UiComponentFactoryParams) => React.ReactElement<any> | null;
@@ -9,8 +9,8 @@ export declare enum EditorExperience {
9
9
  editSession = "editSession"
10
10
  }
11
11
  export declare const RELIABILITY_INTERVAL = 30000;
12
- declare type TypeOfEditorExperience = typeof EditorExperience;
13
- declare type ValueOfEditorExperience = TypeOfEditorExperience[keyof TypeOfEditorExperience];
12
+ type TypeOfEditorExperience = typeof EditorExperience;
13
+ type ValueOfEditorExperience = TypeOfEditorExperience[keyof TypeOfEditorExperience];
14
14
  export declare class ExperienceStore {
15
15
  private static stores;
16
16
  private experiences;
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import { Breakpoints } from '../WidthProvider';
3
3
  export declare function mapBreakpointToLayoutMaxWidth(breakpoint: Breakpoints): 760 | 680;
4
- declare type BaseThemeWrapperProps = {
4
+ type BaseThemeWrapperProps = {
5
5
  breakpoint: Breakpoints;
6
6
  children: React.ReactNode;
7
7
  baseFontSize?: number;
8
8
  };
9
9
  export declare function BaseThemeWrapper({ baseFontSize, children, }: BaseThemeWrapperProps): JSX.Element;
10
- declare type BaseThemeProps = {
10
+ type BaseThemeProps = {
11
11
  children: React.ReactNode;
12
12
  baseFontSize?: number;
13
13
  };
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import { WrappedComponentProps } from 'react-intl-next';
5
- declare type Props = {
5
+ type Props = {
6
6
  selected?: boolean;
7
7
  hasContent?: boolean;
8
8
  children?: React.ReactNode;
@@ -12,7 +12,7 @@ interface Props extends WithAnalyticsEventsProps {
12
12
  children?: ReactNode;
13
13
  id?: string;
14
14
  }
15
- export declare type OpenChangedEvent = {
15
+ export type OpenChangedEvent = {
16
16
  isOpen: boolean;
17
17
  event: MouseEvent | KeyboardEvent;
18
18
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ACTION, DispatchAnalyticsEvent, ErrorEventPayload } from '../../analytics';
3
- declare type ErrorCrashPayload = Extract<ErrorEventPayload, {
3
+ type ErrorCrashPayload = Extract<ErrorEventPayload, {
4
4
  action: ACTION.EDITOR_CRASHED;
5
5
  }>;
6
6
  interface ErrorBoundaryProps {
@@ -5,11 +5,11 @@ export interface CardSurroundings {
5
5
  collectionName: string;
6
6
  list: Identifier[];
7
7
  }
8
- export declare type MentionEventHandler = (mentionId: string, text: string, event?: SyntheticEvent<HTMLSpanElement>) => void;
9
- export declare type CardEventClickHandler = (result: CardEvent | InlineCardEvent, surroundings?: CardSurroundings, analyticsEvent?: any) => void;
10
- export declare type LinkEventClickHandler = (event: SyntheticEvent<HTMLAnchorElement>, url?: string) => void;
11
- export declare type SmartCardEventClickHandler = (event: SyntheticEvent<HTMLAnchorElement>, url?: string) => void;
12
- export declare type OnUnhandledClickHandler = (event: React.MouseEvent) => void;
8
+ export type MentionEventHandler = (mentionId: string, text: string, event?: SyntheticEvent<HTMLSpanElement>) => void;
9
+ export type CardEventClickHandler = (result: CardEvent | InlineCardEvent, surroundings?: CardSurroundings, analyticsEvent?: any) => void;
10
+ export type LinkEventClickHandler = (event: SyntheticEvent<HTMLAnchorElement>, url?: string) => void;
11
+ export type SmartCardEventClickHandler = (event: SyntheticEvent<HTMLAnchorElement>, url?: string) => void;
12
+ export type OnUnhandledClickHandler = (event: React.MouseEvent) => void;
13
13
  export interface MentionEventHandlers {
14
14
  onClick?: MentionEventHandler;
15
15
  onMouseEnter?: MentionEventHandler;
@@ -1,12 +1,12 @@
1
1
  import { Component, ReactNode } from 'react';
2
2
  import { Data } from 'popper.js';
3
- export declare type Props = {
3
+ export type Props = {
4
4
  content: ReactNode | null;
5
5
  offset: string;
6
6
  position: string;
7
7
  onPositioned: () => void;
8
8
  };
9
- export declare type State = {
9
+ export type State = {
10
10
  hasExtractedStyles: boolean;
11
11
  position?: string;
12
12
  transform?: string;
@@ -20,5 +20,5 @@ export interface Props {
20
20
  hasFallbackContainer?: boolean;
21
21
  handleMediaSingleRef?: React.RefObject<HTMLDivElement>;
22
22
  }
23
- export declare const shouldAddDefaultWrappedWidth: (layout: RichMediaLayout, width?: number | undefined, lineLength?: number | undefined) => boolean | 0 | undefined;
23
+ export declare const shouldAddDefaultWrappedWidth: (layout: RichMediaLayout, width?: number, lineLength?: number) => boolean | 0 | undefined;
24
24
  export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, className, children: propsChildren, nodeType, fullWidthMode, lineLength, hasFallbackContainer, handleMediaSingleRef, }: Props): jsx.JSX.Element;
@@ -2,7 +2,7 @@ export declare enum ShadowKeys {
2
2
  SHOW_LEFT_SHADOW = "showLeftShadow",
3
3
  SHOW_RIGHT_SHADOW = "showRightShadow"
4
4
  }
5
- export declare type ShadowsStates = {
5
+ export type ShadowsStates = {
6
6
  [ShadowKey in ShadowKeys]: boolean;
7
7
  };
8
8
  export declare const shadowObserverClassNames: {
@@ -3,17 +3,17 @@ import { IntlShape, WrappedComponentProps } from 'react-intl-next';
3
3
  import type { ThemeModes } from '@atlaskit/theme/types';
4
4
  import { FireAnalyticsCallback } from '../../analytics';
5
5
  import { EventDispatcher } from '../../event-dispatcher';
6
- export declare type BasePortalProviderProps = {
6
+ export type BasePortalProviderProps = {
7
7
  render: (portalProviderAPI: PortalProviderAPI) => React.ReactChild | JSX.Element | null;
8
8
  onAnalyticsEvent?: FireAnalyticsCallback;
9
9
  useAnalyticsContext?: boolean;
10
10
  themeMode?: ThemeModes;
11
11
  } & WrappedComponentProps;
12
- export declare type Portals = Map<HTMLElement, React.ReactChild>;
13
- export declare type PortalRendererState = {
12
+ export type Portals = Map<HTMLElement, React.ReactChild>;
13
+ export type PortalRendererState = {
14
14
  portals: Portals;
15
15
  };
16
- declare type MountedPortal = {
16
+ type MountedPortal = {
17
17
  children: () => React.ReactChild | null;
18
18
  hasAnalyticsContext: boolean;
19
19
  hasIntlContext: boolean;
@@ -37,7 +37,7 @@ export declare class PortalProviderAPI extends EventDispatcher {
37
37
  export declare const PortalProvider: React.FC<import("react-intl-next").WithIntlProps<BasePortalProviderProps>> & {
38
38
  WrappedComponent: React.ComponentType<BasePortalProviderProps>;
39
39
  };
40
- declare type PortalProviderWithThemeProvidersProps = Omit<BasePortalProviderProps, 'intl' | 'themeMode'>;
40
+ type PortalProviderWithThemeProvidersProps = Omit<BasePortalProviderProps, 'intl' | 'themeMode'>;
41
41
  export declare const PortalProviderWithThemeProviders: ({ onAnalyticsEvent, useAnalyticsContext, render, }: PortalProviderWithThemeProvidersProps) => JSX.Element;
42
42
  export declare class PortalRenderer extends React.Component<{
43
43
  portalProviderAPI: PortalProviderAPI;
@@ -1,8 +1,8 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- export declare type Breakpoints = 'S' | 'M' | 'L';
5
- export declare type WidthConsumerContext = {
4
+ export type Breakpoints = 'S' | 'M' | 'L';
5
+ export type WidthConsumerContext = {
6
6
  width: number;
7
7
  breakpoint: Breakpoints;
8
8
  };
@@ -10,10 +10,10 @@ export declare function getBreakpoint(width?: number): Breakpoints;
10
10
  export declare function createWidthContext(width?: number): WidthConsumerContext;
11
11
  export declare const WidthContext: React.Context<WidthConsumerContext>;
12
12
  declare const Consumer: React.Consumer<WidthConsumerContext>;
13
- export declare type WidthProviderState = {
13
+ export type WidthProviderState = {
14
14
  width?: number;
15
15
  };
16
- declare type WidthProviderProps = {
16
+ type WidthProviderProps = {
17
17
  className?: string;
18
18
  };
19
19
  export declare class WidthProvider extends React.Component<WidthProviderProps, WidthProviderState> {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- export declare type Props = {
3
+ export type Props = {
4
4
  render: (createAnalyticsEvent?: CreateUIAnalyticsEvent) => React.ReactNode;
5
5
  };
6
6
  export declare const WithCreateAnalyticsEvent: React.ComponentType<Props>;
@@ -1,5 +1,5 @@
1
1
  import { ComponentClass, StatelessComponent } from 'react';
2
- declare type SimpleEventHandler<T> = (event: T) => void;
2
+ type SimpleEventHandler<T> = (event: T) => void;
3
3
  export interface WithOutsideClickProps {
4
4
  handleClickOutside?: SimpleEventHandler<MouseEvent>;
5
5
  handleEscapeKeydown?: SimpleEventHandler<KeyboardEvent>;