@atlaskit/editor-common 105.2.2 → 105.2.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 (40) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/monitoring/error.js +1 -1
  3. package/dist/cjs/resizer/BreakoutResizer.js +13 -0
  4. package/dist/cjs/ui/DropList/index.js +1 -1
  5. package/dist/cjs/user-preferences/hooks.js +5 -0
  6. package/dist/cjs/user-preferences/user-preferences-provider.js +21 -0
  7. package/dist/cjs/utils/imageLoader.js +62 -27
  8. package/dist/es2019/monitoring/error.js +1 -1
  9. package/dist/es2019/resizer/BreakoutResizer.js +13 -0
  10. package/dist/es2019/ui/DropList/index.js +1 -1
  11. package/dist/es2019/user-preferences/hooks.js +5 -0
  12. package/dist/es2019/user-preferences/user-preferences-provider.js +21 -0
  13. package/dist/es2019/utils/imageLoader.js +58 -25
  14. package/dist/esm/monitoring/error.js +1 -1
  15. package/dist/esm/resizer/BreakoutResizer.js +13 -0
  16. package/dist/esm/ui/DropList/index.js +1 -1
  17. package/dist/esm/user-preferences/hooks.js +5 -0
  18. package/dist/esm/user-preferences/user-preferences-provider.js +21 -0
  19. package/dist/esm/utils/imageLoader.js +62 -27
  20. package/dist/types/analytics/types/alignment-events.d.ts +1 -1
  21. package/dist/types/analytics/types/events.d.ts +1 -1
  22. package/dist/types/card/MediaAndEmbedsToolbar/index.d.ts +1 -1
  23. package/dist/types/collab/index.d.ts +1 -0
  24. package/dist/types/resizer/BreakoutResizer.d.ts +14 -1
  25. package/dist/types/resizer/ResizerBreakoutModeLabel.d.ts +1 -1
  26. package/dist/types/types/text-formatting.d.ts +1 -0
  27. package/dist/types/user-preferences/hooks.d.ts +5 -0
  28. package/dist/types/user-preferences/persistence-api.d.ts +1 -1
  29. package/dist/types/user-preferences/user-preferences-provider.d.ts +21 -2
  30. package/dist/types-ts4.5/analytics/types/alignment-events.d.ts +1 -1
  31. package/dist/types-ts4.5/analytics/types/events.d.ts +1 -1
  32. package/dist/types-ts4.5/card/MediaAndEmbedsToolbar/index.d.ts +1 -1
  33. package/dist/types-ts4.5/collab/index.d.ts +1 -0
  34. package/dist/types-ts4.5/resizer/BreakoutResizer.d.ts +14 -1
  35. package/dist/types-ts4.5/resizer/ResizerBreakoutModeLabel.d.ts +1 -1
  36. package/dist/types-ts4.5/types/text-formatting.d.ts +1 -0
  37. package/dist/types-ts4.5/user-preferences/hooks.d.ts +5 -0
  38. package/dist/types-ts4.5/user-preferences/persistence-api.d.ts +1 -1
  39. package/dist/types-ts4.5/user-preferences/user-preferences-provider.d.ts +21 -2
  40. package/package.json +10 -10
@@ -6,11 +6,15 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  import _regeneratorRuntime from "@babel/runtime/regenerator";
9
+ /**
10
+ *
11
+ */
9
12
  export var UserPreferencesProvider = /*#__PURE__*/function () {
10
13
  /**
11
14
  * @param persistenceAPI - The persistence API to use for loading and updating user preferences
12
15
  * @param defaultPreferences - The default user preferences to use
13
16
  * @param initialUserPreferences - The initial user preferences to use (optional)
17
+ * @example
14
18
  */
15
19
  function UserPreferencesProvider(persistenceAPI, defaultPreferences) {
16
20
  var _this$persistenceAPI$, _this$persistenceAPI;
@@ -28,6 +32,10 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
28
32
  this.loadPreferences();
29
33
  }
30
34
  }
35
+
36
+ /**
37
+ *
38
+ */
31
39
  return _createClass(UserPreferencesProvider, [{
32
40
  key: "isInitialized",
33
41
  get: function get() {
@@ -38,6 +46,7 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
38
46
  * This method fetches the latest user preferences
39
47
  * @returns a promise that resolves with the user preferences, or rejects if error occurs
40
48
  * @throws Error if there is an error loading user preferences
49
+ * @example
41
50
  */
42
51
  }, {
43
52
  key: "loadPreferences",
@@ -69,6 +78,7 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
69
78
  * @param value
70
79
  * @returns a promise that resolves when the user preference is updated
71
80
  * @throws Error if there is an error updating user preferences
81
+ * @example
72
82
  */
73
83
  )
74
84
  }, {
@@ -99,6 +109,7 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
99
109
  * get a user preference, Note that this function is a not async function,
100
110
  * meaning that consumers should prefetch the user preference and make it available initially
101
111
  * @param key
112
+ * @example
102
113
  */
103
114
  )
104
115
  }, {
@@ -109,6 +120,7 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
109
120
 
110
121
  /**
111
122
  * get all user preferences
123
+ * @example
112
124
  */
113
125
  }, {
114
126
  key: "getPreferences",
@@ -118,7 +130,9 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
118
130
 
119
131
  /**
120
132
  * This method fetches the latest user preferences
133
+ * @param onUpdate
121
134
  * @returns a function to unsubscribe from the updates
135
+ * @example
122
136
  */
123
137
  }, {
124
138
  key: "onUpdate",
@@ -139,6 +153,7 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
139
153
  * setting the default user preferences will also trigger an update
140
154
  * This is useful when the default user preferences dynamically based on the context
141
155
  * @param preferences
156
+ * @example
142
157
  */
143
158
  }, {
144
159
  key: "setDefaultPreferences",
@@ -161,6 +176,11 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
161
176
  this.initialized = true;
162
177
  }
163
178
  }
179
+
180
+ /**
181
+ *
182
+ * @example
183
+ */
164
184
  }, {
165
185
  key: "notifyUserPreferencesUpdated",
166
186
  value: function notifyUserPreferencesUpdated() {
@@ -175,6 +195,7 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
175
195
  * with the user preferences and filtering out any undefined or null values
176
196
  * to avoid overwriting default preferences with null values
177
197
  * @returns true if the user preferences were updated, false otherwise
198
+ * @example
178
199
  */
179
200
  }, {
180
201
  key: "resolveUserPreferences",
@@ -43,10 +43,20 @@ export var withImageLoaderOld = function withImageLoaderOld(Wrapped) {
43
43
  _inherits(WithImageLoader, _Component);
44
44
  return _createClass(WithImageLoader, [{
45
45
  key: "componentDidMount",
46
- value: function componentDidMount() {
46
+ value:
47
+ /**
48
+ *
49
+ * @example
50
+ */
51
+ function componentDidMount() {
47
52
  this.fetchImage(this.props);
48
53
  }
49
54
 
55
+ /**
56
+ *
57
+ * @param nextProps
58
+ * @example
59
+ */
50
60
  // Ignored via go/ees005
51
61
  // eslint-disable-next-line react/no-unsafe
52
62
  }, {
@@ -59,19 +69,33 @@ export var withImageLoaderOld = function withImageLoaderOld(Wrapped) {
59
69
  this.fetchImage(nextProps);
60
70
  }
61
71
  }
72
+
73
+ /**
74
+ *
75
+ * @example
76
+ */
62
77
  }, {
63
78
  key: "componentWillUnmount",
64
79
  value: function componentWillUnmount() {
65
80
  if (this.img) {
66
- // Ignored via go/ees005
67
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
68
- this.img.removeEventListener('load', this.onLoad);
69
- // Ignored via go/ees005
70
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
71
- this.img.removeEventListener('error', this.onError);
72
- this.img = null;
81
+ if (!process.env.REACT_SSR) {
82
+ // Ignored via go/ees005
83
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
84
+ this.img.removeEventListener('load', this.onLoad);
85
+ // Ignored via go/ees005
86
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
87
+ this.img.removeEventListener('error', this.onError);
88
+ this.img = null;
89
+ }
73
90
  }
74
91
  }
92
+
93
+ /**
94
+ *
95
+ * @param root0
96
+ * @param root0.url
97
+ * @example
98
+ */
75
99
  }, {
76
100
  key: "fetchImage",
77
101
  value: function fetchImage(_ref) {
@@ -79,19 +103,26 @@ export var withImageLoaderOld = function withImageLoaderOld(Wrapped) {
79
103
  if (url) {
80
104
  if (!this.img) {
81
105
  this.img = new Image();
82
- // Ignored via go/ees005
83
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
84
- this.img.addEventListener('load', this.onLoad);
85
- // Ignored via go/ees005
86
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
87
- this.img.addEventListener('error', this.onError);
106
+ if (!process.env.REACT_SSR) {
107
+ // Ignored via go/ees005
108
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
109
+ this.img.addEventListener('load', this.onLoad);
110
+ // Ignored via go/ees005
111
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
112
+ this.img.addEventListener('error', this.onError);
113
+ }
88
114
  }
89
115
  this.img.src = url;
90
116
  }
91
117
  }
92
118
  }, {
93
119
  key: "render",
94
- value: function render() {
120
+ value:
121
+ /**
122
+ *
123
+ * @example
124
+ */
125
+ function render() {
95
126
  var imageStatus = this.state.imageStatus;
96
127
  // Ignored via go/ees005
97
128
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -153,12 +184,14 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
153
184
  key: "componentWillUnmount",
154
185
  value: function componentWillUnmount() {
155
186
  if (this.img) {
156
- // Ignored via go/ees005
157
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
158
- this.img.removeEventListener('load', this.onLoad);
159
- // Ignored via go/ees005
160
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
161
- this.img.removeEventListener('error', this.onError);
187
+ if (!process.env.REACT_SSR) {
188
+ // Ignored via go/ees005
189
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
190
+ this.img.removeEventListener('load', this.onLoad);
191
+ // Ignored via go/ees005
192
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
193
+ this.img.removeEventListener('error', this.onError);
194
+ }
162
195
  this.img = null;
163
196
  }
164
197
  }
@@ -169,12 +202,14 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
169
202
  if (url) {
170
203
  if (!this.img) {
171
204
  this.img = new Image();
172
- // Ignored via go/ees005
173
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
174
- this.img.addEventListener('load', this.onLoad);
175
- // Ignored via go/ees005
176
- // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
177
- this.img.addEventListener('error', this.onError);
205
+ if (!process.env.REACT_SSR) {
206
+ // Ignored via go/ees005
207
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
208
+ this.img.addEventListener('load', this.onLoad);
209
+ // Ignored via go/ees005
210
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
211
+ this.img.addEventListener('error', this.onError);
212
+ }
178
213
  }
179
214
  this.img.src = url;
180
215
  }
@@ -1,5 +1,5 @@
1
1
  import { ACTION, ACTION_SUBJECT, INPUT_METHOD, ACTION_SUBJECT_ID } from './enums';
2
- import { TrackAEP } from './utils';
2
+ import { type TrackAEP } from './utils';
3
3
  type AlignmentUpdatedAEP = TrackAEP<ACTION.UPDATED, ACTION_SUBJECT.ALIGNMENT, ACTION_SUBJECT_ID, {
4
4
  alignmentType?: 'start' | 'end' | 'center';
5
5
  inputMethod?: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT;
@@ -11,7 +11,7 @@ import type { AIEventPayload } from './ai-events';
11
11
  import type { AIInlineSuggestionPayload } from './ai-inline-suggestion-events';
12
12
  import type { AIProactiveEventPayload } from './ai-proactive-events';
13
13
  import type { AIUnifiedEventPayload } from './ai-unified-events';
14
- import { AlignmentEventPayload } from './alignment-events';
14
+ import type { AlignmentEventPayload } from './alignment-events';
15
15
  import type { AvatarEventPayload } from './avatar';
16
16
  import { type BreakoutEventPayload } from './breakout-events';
17
17
  import type { TextColorEventPayload } from './color-events';
@@ -3,7 +3,7 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
3
3
  import type { NodeType } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
5
  import type { EditorAnalyticsAPI } from '../../analytics';
6
- import { Keymap } from '../../keymaps';
6
+ import { type Keymap } from '../../keymaps';
7
7
  import type { Command, EditorContainerWidth, FloatingToolbarItem, Icon, NextEditorPlugin, PluginDependenciesAPI } from '../../types';
8
8
  type WidthPluginType = NextEditorPlugin<'width', {
9
9
  sharedState: EditorContainerWidth | undefined;
@@ -380,6 +380,7 @@ export interface CollabParticipant {
380
380
  isGuest?: boolean;
381
381
  presenceId?: string;
382
382
  presenceActivity?: PresenceActivity;
383
+ isHydrated?: boolean;
383
384
  }
384
385
  export type ProviderParticipant = CollabParticipant & {
385
386
  userId: string;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { EditorAnalyticsAPI } from '../analytics';
4
- import { GuidelineConfig } from '../guideline';
4
+ import { type GuidelineConfig } from '../guideline';
5
5
  import { type EditorContainerWidth, type getPosHandlerNode } from '../types';
6
6
  type BreakoutSupportedNodes = 'layoutSection' | 'expand' | 'codeBlock';
7
7
  export declare const ignoreResizerMutations: (mutation: MutationRecord | {
@@ -26,6 +26,19 @@ type BreakoutResizerProps = {
26
26
  * correct ADF support.
27
27
  *
28
28
  * use experiment platform_editor_advanced_layouts
29
+ * @param root0
30
+ * @param root0.editorView
31
+ * @param root0.nodeType
32
+ * @param root0.getPos
33
+ * @param root0.getRef
34
+ * @param root0.disabled
35
+ * @param root0.getEditorWidth
36
+ * @param root0.parentRef
37
+ * @param root0.displayGuidelines
38
+ * @param root0.editorAnalyticsApi
39
+ * @param root0.displayGapCursor
40
+ * @param root0.onResizeStart
41
+ * @example
29
42
  */
30
43
  declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, displayGuidelines, editorAnalyticsApi, displayGapCursor, onResizeStart, }: BreakoutResizerProps) => React.JSX.Element;
31
44
  export { BreakoutResizer };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { BreakoutMode } from '../types';
2
+ import type { BreakoutMode } from '../types';
3
3
  type props = {
4
4
  layout: BreakoutMode;
5
5
  };
@@ -15,6 +15,7 @@ export interface TextFormattingOptions {
15
15
  responsiveToolbarMenu?: boolean;
16
16
  }
17
17
  export interface TextFormattingState {
18
+ isInitialised: boolean;
18
19
  emActive?: boolean;
19
20
  emDisabled?: boolean;
20
21
  emHidden?: boolean;
@@ -1,4 +1,9 @@
1
1
  import { UserPreferencesProvider } from './user-preferences-provider';
2
+ /**
3
+ *
4
+ * @param userPreferencesProvider
5
+ * @example
6
+ */
2
7
  export declare function useResolvedUserPreferences(userPreferencesProvider: UserPreferencesProvider): {
3
8
  resolvedUserPreferences: import("./user-preferences").ResolvedUserPreferences<import("./user-preferences").UserPreferences>;
4
9
  };
@@ -1,4 +1,4 @@
1
- import { UserPreferences } from './user-preferences';
1
+ import { type UserPreferences } from './user-preferences';
2
2
  export type PersistenceAPI = {
3
3
  /**
4
4
  * Loads the user preferences
@@ -1,6 +1,9 @@
1
- import { PersistenceAPI } from './persistence-api';
2
- import { ResolvedUserPreferences, UserPreferences } from './user-preferences';
1
+ import { type PersistenceAPI } from './persistence-api';
2
+ import { type ResolvedUserPreferences, type UserPreferences } from './user-preferences';
3
3
  type UpdateCallback = (userPreferences: UserPreferences) => void;
4
+ /**
5
+ *
6
+ */
4
7
  export declare class UserPreferencesProvider {
5
8
  private callbacks;
6
9
  private userPreferences;
@@ -12,13 +15,18 @@ export declare class UserPreferencesProvider {
12
15
  * @param persistenceAPI - The persistence API to use for loading and updating user preferences
13
16
  * @param defaultPreferences - The default user preferences to use
14
17
  * @param initialUserPreferences - The initial user preferences to use (optional)
18
+ * @example
15
19
  */
16
20
  constructor(persistenceAPI: PersistenceAPI, defaultPreferences: ResolvedUserPreferences);
21
+ /**
22
+ *
23
+ */
17
24
  get isInitialized(): boolean;
18
25
  /**
19
26
  * This method fetches the latest user preferences
20
27
  * @returns a promise that resolves with the user preferences, or rejects if error occurs
21
28
  * @throws Error if there is an error loading user preferences
29
+ * @example
22
30
  */
23
31
  loadPreferences(): Promise<void>;
24
32
  /**
@@ -27,21 +35,26 @@ export declare class UserPreferencesProvider {
27
35
  * @param value
28
36
  * @returns a promise that resolves when the user preference is updated
29
37
  * @throws Error if there is an error updating user preferences
38
+ * @example
30
39
  */
31
40
  updatePreference<K extends keyof UserPreferences>(key: K, value: UserPreferences[K]): Promise<void>;
32
41
  /**
33
42
  * get a user preference, Note that this function is a not async function,
34
43
  * meaning that consumers should prefetch the user preference and make it available initially
35
44
  * @param key
45
+ * @example
36
46
  */
37
47
  getPreference<K extends keyof ResolvedUserPreferences>(key: K): ResolvedUserPreferences[K];
38
48
  /**
39
49
  * get all user preferences
50
+ * @example
40
51
  */
41
52
  getPreferences(): ResolvedUserPreferences;
42
53
  /**
43
54
  * This method fetches the latest user preferences
55
+ * @param onUpdate
44
56
  * @returns a function to unsubscribe from the updates
57
+ * @example
45
58
  */
46
59
  onUpdate(onUpdate: UpdateCallback): () => void;
47
60
  /**
@@ -49,15 +62,21 @@ export declare class UserPreferencesProvider {
49
62
  * setting the default user preferences will also trigger an update
50
63
  * This is useful when the default user preferences dynamically based on the context
51
64
  * @param preferences
65
+ * @example
52
66
  */
53
67
  setDefaultPreferences(preferences: ResolvedUserPreferences): void;
54
68
  private setUserPreferences;
69
+ /**
70
+ *
71
+ * @example
72
+ */
55
73
  notifyUserPreferencesUpdated(): void;
56
74
  /**
57
75
  * This method resolves the user preferences by merging the default preferences
58
76
  * with the user preferences and filtering out any undefined or null values
59
77
  * to avoid overwriting default preferences with null values
60
78
  * @returns true if the user preferences were updated, false otherwise
79
+ * @example
61
80
  */
62
81
  private resolveUserPreferences;
63
82
  }
@@ -1,5 +1,5 @@
1
1
  import { ACTION, ACTION_SUBJECT, INPUT_METHOD, ACTION_SUBJECT_ID } from './enums';
2
- import { TrackAEP } from './utils';
2
+ import { type TrackAEP } from './utils';
3
3
  type AlignmentUpdatedAEP = TrackAEP<ACTION.UPDATED, ACTION_SUBJECT.ALIGNMENT, ACTION_SUBJECT_ID, {
4
4
  alignmentType?: 'start' | 'end' | 'center';
5
5
  inputMethod?: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT;
@@ -11,7 +11,7 @@ import type { AIEventPayload } from './ai-events';
11
11
  import type { AIInlineSuggestionPayload } from './ai-inline-suggestion-events';
12
12
  import type { AIProactiveEventPayload } from './ai-proactive-events';
13
13
  import type { AIUnifiedEventPayload } from './ai-unified-events';
14
- import { AlignmentEventPayload } from './alignment-events';
14
+ import type { AlignmentEventPayload } from './alignment-events';
15
15
  import type { AvatarEventPayload } from './avatar';
16
16
  import { type BreakoutEventPayload } from './breakout-events';
17
17
  import type { TextColorEventPayload } from './color-events';
@@ -3,7 +3,7 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
3
3
  import type { NodeType } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
5
  import type { EditorAnalyticsAPI } from '../../analytics';
6
- import { Keymap } from '../../keymaps';
6
+ import { type Keymap } from '../../keymaps';
7
7
  import type { Command, EditorContainerWidth, FloatingToolbarItem, Icon, NextEditorPlugin, PluginDependenciesAPI } from '../../types';
8
8
  type WidthPluginType = NextEditorPlugin<'width', {
9
9
  sharedState: EditorContainerWidth | undefined;
@@ -380,6 +380,7 @@ export interface CollabParticipant {
380
380
  isGuest?: boolean;
381
381
  presenceId?: string;
382
382
  presenceActivity?: PresenceActivity;
383
+ isHydrated?: boolean;
383
384
  }
384
385
  export type ProviderParticipant = CollabParticipant & {
385
386
  userId: string;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  import type { EditorAnalyticsAPI } from '../analytics';
4
- import { GuidelineConfig } from '../guideline';
4
+ import { type GuidelineConfig } from '../guideline';
5
5
  import { type EditorContainerWidth, type getPosHandlerNode } from '../types';
6
6
  type BreakoutSupportedNodes = 'layoutSection' | 'expand' | 'codeBlock';
7
7
  export declare const ignoreResizerMutations: (mutation: MutationRecord | {
@@ -26,6 +26,19 @@ type BreakoutResizerProps = {
26
26
  * correct ADF support.
27
27
  *
28
28
  * use experiment platform_editor_advanced_layouts
29
+ * @param root0
30
+ * @param root0.editorView
31
+ * @param root0.nodeType
32
+ * @param root0.getPos
33
+ * @param root0.getRef
34
+ * @param root0.disabled
35
+ * @param root0.getEditorWidth
36
+ * @param root0.parentRef
37
+ * @param root0.displayGuidelines
38
+ * @param root0.editorAnalyticsApi
39
+ * @param root0.displayGapCursor
40
+ * @param root0.onResizeStart
41
+ * @example
29
42
  */
30
43
  declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, displayGuidelines, editorAnalyticsApi, displayGapCursor, onResizeStart, }: BreakoutResizerProps) => React.JSX.Element;
31
44
  export { BreakoutResizer };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { BreakoutMode } from '../types';
2
+ import type { BreakoutMode } from '../types';
3
3
  type props = {
4
4
  layout: BreakoutMode;
5
5
  };
@@ -15,6 +15,7 @@ export interface TextFormattingOptions {
15
15
  responsiveToolbarMenu?: boolean;
16
16
  }
17
17
  export interface TextFormattingState {
18
+ isInitialised: boolean;
18
19
  emActive?: boolean;
19
20
  emDisabled?: boolean;
20
21
  emHidden?: boolean;
@@ -1,4 +1,9 @@
1
1
  import { UserPreferencesProvider } from './user-preferences-provider';
2
+ /**
3
+ *
4
+ * @param userPreferencesProvider
5
+ * @example
6
+ */
2
7
  export declare function useResolvedUserPreferences(userPreferencesProvider: UserPreferencesProvider): {
3
8
  resolvedUserPreferences: import("./user-preferences").ResolvedUserPreferences<import("./user-preferences").UserPreferences>;
4
9
  };
@@ -1,4 +1,4 @@
1
- import { UserPreferences } from './user-preferences';
1
+ import { type UserPreferences } from './user-preferences';
2
2
  export type PersistenceAPI = {
3
3
  /**
4
4
  * Loads the user preferences
@@ -1,6 +1,9 @@
1
- import { PersistenceAPI } from './persistence-api';
2
- import { ResolvedUserPreferences, UserPreferences } from './user-preferences';
1
+ import { type PersistenceAPI } from './persistence-api';
2
+ import { type ResolvedUserPreferences, type UserPreferences } from './user-preferences';
3
3
  type UpdateCallback = (userPreferences: UserPreferences) => void;
4
+ /**
5
+ *
6
+ */
4
7
  export declare class UserPreferencesProvider {
5
8
  private callbacks;
6
9
  private userPreferences;
@@ -12,13 +15,18 @@ export declare class UserPreferencesProvider {
12
15
  * @param persistenceAPI - The persistence API to use for loading and updating user preferences
13
16
  * @param defaultPreferences - The default user preferences to use
14
17
  * @param initialUserPreferences - The initial user preferences to use (optional)
18
+ * @example
15
19
  */
16
20
  constructor(persistenceAPI: PersistenceAPI, defaultPreferences: ResolvedUserPreferences);
21
+ /**
22
+ *
23
+ */
17
24
  get isInitialized(): boolean;
18
25
  /**
19
26
  * This method fetches the latest user preferences
20
27
  * @returns a promise that resolves with the user preferences, or rejects if error occurs
21
28
  * @throws Error if there is an error loading user preferences
29
+ * @example
22
30
  */
23
31
  loadPreferences(): Promise<void>;
24
32
  /**
@@ -27,21 +35,26 @@ export declare class UserPreferencesProvider {
27
35
  * @param value
28
36
  * @returns a promise that resolves when the user preference is updated
29
37
  * @throws Error if there is an error updating user preferences
38
+ * @example
30
39
  */
31
40
  updatePreference<K extends keyof UserPreferences>(key: K, value: UserPreferences[K]): Promise<void>;
32
41
  /**
33
42
  * get a user preference, Note that this function is a not async function,
34
43
  * meaning that consumers should prefetch the user preference and make it available initially
35
44
  * @param key
45
+ * @example
36
46
  */
37
47
  getPreference<K extends keyof ResolvedUserPreferences>(key: K): ResolvedUserPreferences[K];
38
48
  /**
39
49
  * get all user preferences
50
+ * @example
40
51
  */
41
52
  getPreferences(): ResolvedUserPreferences;
42
53
  /**
43
54
  * This method fetches the latest user preferences
55
+ * @param onUpdate
44
56
  * @returns a function to unsubscribe from the updates
57
+ * @example
45
58
  */
46
59
  onUpdate(onUpdate: UpdateCallback): () => void;
47
60
  /**
@@ -49,15 +62,21 @@ export declare class UserPreferencesProvider {
49
62
  * setting the default user preferences will also trigger an update
50
63
  * This is useful when the default user preferences dynamically based on the context
51
64
  * @param preferences
65
+ * @example
52
66
  */
53
67
  setDefaultPreferences(preferences: ResolvedUserPreferences): void;
54
68
  private setUserPreferences;
69
+ /**
70
+ *
71
+ * @example
72
+ */
55
73
  notifyUserPreferencesUpdated(): void;
56
74
  /**
57
75
  * This method resolves the user preferences by merging the default preferences
58
76
  * with the user preferences and filtering out any undefined or null values
59
77
  * to avoid overwriting default preferences with null values
60
78
  * @returns true if the user preferences were updated, false otherwise
79
+ * @example
61
80
  */
62
81
  private resolveUserPreferences;
63
82
  }