@atlaskit/editor-common 105.2.1 → 105.2.3

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 (58) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/analytics/types/enums.js +4 -0
  3. package/dist/cjs/analytics/types/offline-editing-event.js +5 -0
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/resizer/BreakoutResizer.js +13 -0
  6. package/dist/cjs/ui/DropList/index.js +1 -1
  7. package/dist/cjs/ui/MediaSingle/index.js +23 -1
  8. package/dist/cjs/ui/MediaSingle/styled.js +33 -2
  9. package/dist/cjs/user-preferences/hooks.js +5 -0
  10. package/dist/cjs/user-preferences/user-preferences-provider.js +21 -0
  11. package/dist/cjs/utils/imageLoader.js +62 -27
  12. package/dist/es2019/analytics/types/enums.js +4 -0
  13. package/dist/es2019/analytics/types/offline-editing-event.js +1 -0
  14. package/dist/es2019/monitoring/error.js +1 -1
  15. package/dist/es2019/resizer/BreakoutResizer.js +13 -0
  16. package/dist/es2019/ui/DropList/index.js +1 -1
  17. package/dist/es2019/ui/MediaSingle/index.js +23 -1
  18. package/dist/es2019/ui/MediaSingle/styled.js +33 -2
  19. package/dist/es2019/user-preferences/hooks.js +5 -0
  20. package/dist/es2019/user-preferences/user-preferences-provider.js +21 -0
  21. package/dist/es2019/utils/imageLoader.js +58 -25
  22. package/dist/esm/analytics/types/enums.js +4 -0
  23. package/dist/esm/analytics/types/offline-editing-event.js +1 -0
  24. package/dist/esm/monitoring/error.js +1 -1
  25. package/dist/esm/resizer/BreakoutResizer.js +13 -0
  26. package/dist/esm/ui/DropList/index.js +1 -1
  27. package/dist/esm/ui/MediaSingle/index.js +23 -1
  28. package/dist/esm/ui/MediaSingle/styled.js +33 -2
  29. package/dist/esm/user-preferences/hooks.js +5 -0
  30. package/dist/esm/user-preferences/user-preferences-provider.js +21 -0
  31. package/dist/esm/utils/imageLoader.js +62 -27
  32. package/dist/types/analytics/types/alignment-events.d.ts +1 -1
  33. package/dist/types/analytics/types/enums.d.ts +5 -1
  34. package/dist/types/analytics/types/events.d.ts +3 -2
  35. package/dist/types/analytics/types/offline-editing-event.d.ts +13 -0
  36. package/dist/types/card/MediaAndEmbedsToolbar/index.d.ts +1 -1
  37. package/dist/types/collab/index.d.ts +1 -0
  38. package/dist/types/resizer/BreakoutResizer.d.ts +14 -1
  39. package/dist/types/resizer/ResizerBreakoutModeLabel.d.ts +1 -1
  40. package/dist/types/ui/MediaSingle/index.d.ts +21 -0
  41. package/dist/types/ui/MediaSingle/styled.d.ts +32 -1
  42. package/dist/types/user-preferences/hooks.d.ts +5 -0
  43. package/dist/types/user-preferences/persistence-api.d.ts +1 -1
  44. package/dist/types/user-preferences/user-preferences-provider.d.ts +21 -2
  45. package/dist/types-ts4.5/analytics/types/alignment-events.d.ts +1 -1
  46. package/dist/types-ts4.5/analytics/types/enums.d.ts +5 -1
  47. package/dist/types-ts4.5/analytics/types/events.d.ts +3 -2
  48. package/dist/types-ts4.5/analytics/types/offline-editing-event.d.ts +13 -0
  49. package/dist/types-ts4.5/card/MediaAndEmbedsToolbar/index.d.ts +1 -1
  50. package/dist/types-ts4.5/collab/index.d.ts +1 -0
  51. package/dist/types-ts4.5/resizer/BreakoutResizer.d.ts +14 -1
  52. package/dist/types-ts4.5/resizer/ResizerBreakoutModeLabel.d.ts +1 -1
  53. package/dist/types-ts4.5/ui/MediaSingle/index.d.ts +21 -0
  54. package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +32 -1
  55. package/dist/types-ts4.5/user-preferences/hooks.d.ts +5 -0
  56. package/dist/types-ts4.5/user-preferences/persistence-api.d.ts +1 -1
  57. package/dist/types-ts4.5/user-preferences/user-preferences-provider.d.ts +21 -2
  58. package/package.json +9 -9
@@ -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;
@@ -83,6 +83,8 @@ export declare enum ACTION {
83
83
  MATCHED = "matched",
84
84
  MEDIA_LINK_TRANSFORMED = "mediaLinkTransformed",
85
85
  NODE_CONTENT_SANITIZED = "nodeContentSanitized",
86
+ OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR = "offlineStorageTooManyRetriesError",
87
+ OFFLINE_STORAGE_STEPS_DATABASE_ERROR = "offlineStorageStepsDatabaseError",
86
88
  OPENED = "opened",
87
89
  OUTDENTED = "outdented",
88
90
  PASTED = "pasted",
@@ -303,7 +305,8 @@ export declare enum ACTION_SUBJECT {
303
305
  EDITOR_PLUGIN_SELECTION_EXTENSION = "editorPluginSelectionExtension",
304
306
  AI_DEFINITIONS = "aiDefinitions",
305
307
  USER_PREFERENCES = "userPreferences",
306
- ALIGNMENT = "alignment"
308
+ ALIGNMENT = "alignment",
309
+ OFFLINE_EDITING = "offlineEditing"
307
310
  }
308
311
  export declare enum ACTION_SUBJECT_ID {
309
312
  ACTION = "action",
@@ -391,6 +394,7 @@ export declare enum ACTION_SUBJECT_ID {
391
394
  NESTED_EXPAND = "nestedExpand",
392
395
  NODE = "node",
393
396
  OPEN_LINK = "openLink",
397
+ OFFLINE_EDITING = "offlineEditing",
394
398
  PANEL = "panel",
395
399
  PASTE_BLOCK_CARD = "blockCard",
396
400
  PASTE_BLOCKQUOTE = "blockQuote",
@@ -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';
@@ -39,6 +39,7 @@ import { type MentionEventPayload } from './mention-events';
39
39
  import type { MoveContentEventPayload } from './move-content-events';
40
40
  import { type NestedTableActionsEventPayload } from './nested-table-events';
41
41
  import type { NodeEventPayload } from './node-events';
42
+ import type { OfflineEditingEventPayload } from './offline-editing-event';
42
43
  import type { PasteEventPayload } from './paste-events';
43
44
  import type { ReferentialityEventPayload } from './referentiality-events';
44
45
  import type { SelectionEventPayload } from './selection-events';
@@ -59,7 +60,7 @@ export type SimplifiedNode = {
59
60
  marks?: string[];
60
61
  content?: SimplifiedNode[];
61
62
  };
62
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP;
63
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload;
63
64
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
64
65
  previousColor: string;
65
66
  newColor: string;
@@ -0,0 +1,13 @@
1
+ import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
2
+ import type { TrackAEP } from './utils';
3
+ type OfflineEditingAEP = TrackAEP<ACTION.OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR | ACTION.OFFLINE_STORAGE_STEPS_DATABASE_ERROR, ACTION_SUBJECT.OFFLINE_EDITING, ACTION_SUBJECT_ID.OFFLINE_EDITING, {
4
+ errorMessage?: string;
5
+ version?: number;
6
+ stepsCount?: number;
7
+ status?: string;
8
+ retryCount?: number;
9
+ retrySource?: string;
10
+ healthy?: boolean;
11
+ }, undefined>;
12
+ export type OfflineEditingEventPayload = OfflineEditingAEP;
13
+ export {};
@@ -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
  };
@@ -31,4 +31,25 @@ export interface Props {
31
31
  dataAttributes?: Record<string, any>;
32
32
  editorAppearance?: EditorAppearance;
33
33
  }
34
+ /**
35
+ * MediaSingle
36
+ * @param root0
37
+ * @param root0.layout
38
+ * @param root0.width
39
+ * @param root0.height
40
+ * @param root0.containerWidth
41
+ * @param root0.isLoading
42
+ * @param root0.pctWidth
43
+ * @param root0.size
44
+ * @param root0.className
45
+ * @param root0.children
46
+ * @param root0.nodeType
47
+ * @param root0.fullWidthMode
48
+ * @param root0.lineLength
49
+ * @param root0.hasFallbackContainer
50
+ * @param root0.handleMediaSingleRef
51
+ * @param root0.isInsideOfInlineExtension
52
+ * @param root0.dataAttributes
53
+ * @example
54
+ */
34
55
  export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, dataAttributes, }: Props): jsx.JSX.Element;
@@ -12,6 +12,13 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
12
12
  * If an image has not been resized using the pctWidth attribute,
13
13
  * then an image in wide or full-width can not be wider than the image's
14
14
  * original width.
15
+ * @param layout
16
+ * @param width
17
+ * @param containerWidth
18
+ * @param fullWidthMode
19
+ * @param isResized
20
+ * @param isInsideOfInlineExtension
21
+ * @example
15
22
  */
16
23
  export declare function calcLegacyWidth(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean, isInsideOfInlineExtension?: boolean): string;
17
24
  /**
@@ -20,6 +27,12 @@ export declare function calcLegacyWidth(layout: MediaSingleLayout, width: number
20
27
  * If an image has not been resized using the pctWidth attribute,
21
28
  * then an image in wide or full-width can not be wider than the image's
22
29
  * original width.
30
+ * @param layout
31
+ * @param width
32
+ * @param containerWidth
33
+ * @param fullWidthMode
34
+ * @param isResized
35
+ * @example
23
36
  */
24
37
  export declare function calcLegacyWidthForInline(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean): string;
25
38
  /**
@@ -27,6 +40,10 @@ export declare function calcLegacyWidthForInline(layout: MediaSingleLayout, widt
27
40
  *
28
41
  * Wide and full-width images are always that size (960px and 100%); there is
29
42
  * no distinction between max-width and width.
43
+ * @param layout
44
+ * @param width
45
+ * @param containerWidth
46
+ * @example
30
47
  */
31
48
  export declare function calcResizedWidth(layout: MediaSingleLayout, width: number, containerWidth?: number): any;
32
49
  /**
@@ -35,6 +52,7 @@ export declare function calcResizedWidth(layout: MediaSingleLayout, width: numbe
35
52
  *
36
53
  * @param widthValue CSS width value to be rounded
37
54
  * @returns Reduced CSS width value where px value given, or otherwise the original value
55
+ * @example
38
56
  */
39
57
  export declare function roundToClosestEvenPxValue(widthValue: any): any;
40
58
  export interface MediaSingleWrapperProps {
@@ -54,12 +72,25 @@ export interface MediaSingleWrapperProps {
54
72
  isExtendedResizeExperienceOn?: boolean;
55
73
  isNestedNode?: boolean;
56
74
  isInsideOfInlineExtension?: boolean;
75
+ nodeType?: string;
57
76
  }
58
77
  /**
59
78
  * Can't use `.attrs` to handle highly dynamic styles because we are still
60
79
  * supporting `styled-components` v1.
80
+ * @param root0
81
+ * @param root0.containerWidth
82
+ * @param root0.fullWidthMode
83
+ * @param root0.isResized
84
+ * @param root0.layout
85
+ * @param root0.mediaSingleWidth
86
+ * @param root0.width
87
+ * @param root0.isExtendedResizeExperienceOn
88
+ * @param root0.isNestedNode
89
+ * @param root0.isInsideOfInlineExtension
90
+ * @param root0.nodeType
91
+ * @example
61
92
  */
62
- export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
93
+ export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, nodeType, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
63
94
  export interface MediaWrapperProps {
64
95
  paddingBottom?: string;
65
96
  height?: number;
@@ -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;
@@ -83,6 +83,8 @@ export declare enum ACTION {
83
83
  MATCHED = "matched",
84
84
  MEDIA_LINK_TRANSFORMED = "mediaLinkTransformed",
85
85
  NODE_CONTENT_SANITIZED = "nodeContentSanitized",
86
+ OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR = "offlineStorageTooManyRetriesError",
87
+ OFFLINE_STORAGE_STEPS_DATABASE_ERROR = "offlineStorageStepsDatabaseError",
86
88
  OPENED = "opened",
87
89
  OUTDENTED = "outdented",
88
90
  PASTED = "pasted",
@@ -303,7 +305,8 @@ export declare enum ACTION_SUBJECT {
303
305
  EDITOR_PLUGIN_SELECTION_EXTENSION = "editorPluginSelectionExtension",
304
306
  AI_DEFINITIONS = "aiDefinitions",
305
307
  USER_PREFERENCES = "userPreferences",
306
- ALIGNMENT = "alignment"
308
+ ALIGNMENT = "alignment",
309
+ OFFLINE_EDITING = "offlineEditing"
307
310
  }
308
311
  export declare enum ACTION_SUBJECT_ID {
309
312
  ACTION = "action",
@@ -391,6 +394,7 @@ export declare enum ACTION_SUBJECT_ID {
391
394
  NESTED_EXPAND = "nestedExpand",
392
395
  NODE = "node",
393
396
  OPEN_LINK = "openLink",
397
+ OFFLINE_EDITING = "offlineEditing",
394
398
  PANEL = "panel",
395
399
  PASTE_BLOCK_CARD = "blockCard",
396
400
  PASTE_BLOCKQUOTE = "blockQuote",
@@ -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';
@@ -39,6 +39,7 @@ import { type MentionEventPayload } from './mention-events';
39
39
  import type { MoveContentEventPayload } from './move-content-events';
40
40
  import { type NestedTableActionsEventPayload } from './nested-table-events';
41
41
  import type { NodeEventPayload } from './node-events';
42
+ import type { OfflineEditingEventPayload } from './offline-editing-event';
42
43
  import type { PasteEventPayload } from './paste-events';
43
44
  import type { ReferentialityEventPayload } from './referentiality-events';
44
45
  import type { SelectionEventPayload } from './selection-events';
@@ -59,7 +60,7 @@ export type SimplifiedNode = {
59
60
  marks?: string[];
60
61
  content?: SimplifiedNode[];
61
62
  };
62
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP;
63
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload;
63
64
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
64
65
  previousColor: string;
65
66
  newColor: string;
@@ -0,0 +1,13 @@
1
+ import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
2
+ import type { TrackAEP } from './utils';
3
+ type OfflineEditingAEP = TrackAEP<ACTION.OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR | ACTION.OFFLINE_STORAGE_STEPS_DATABASE_ERROR, ACTION_SUBJECT.OFFLINE_EDITING, ACTION_SUBJECT_ID.OFFLINE_EDITING, {
4
+ errorMessage?: string;
5
+ version?: number;
6
+ stepsCount?: number;
7
+ status?: string;
8
+ retryCount?: number;
9
+ retrySource?: string;
10
+ healthy?: boolean;
11
+ }, undefined>;
12
+ export type OfflineEditingEventPayload = OfflineEditingAEP;
13
+ export {};
@@ -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
  };
@@ -31,4 +31,25 @@ export interface Props {
31
31
  dataAttributes?: Record<string, any>;
32
32
  editorAppearance?: EditorAppearance;
33
33
  }
34
+ /**
35
+ * MediaSingle
36
+ * @param root0
37
+ * @param root0.layout
38
+ * @param root0.width
39
+ * @param root0.height
40
+ * @param root0.containerWidth
41
+ * @param root0.isLoading
42
+ * @param root0.pctWidth
43
+ * @param root0.size
44
+ * @param root0.className
45
+ * @param root0.children
46
+ * @param root0.nodeType
47
+ * @param root0.fullWidthMode
48
+ * @param root0.lineLength
49
+ * @param root0.hasFallbackContainer
50
+ * @param root0.handleMediaSingleRef
51
+ * @param root0.isInsideOfInlineExtension
52
+ * @param root0.dataAttributes
53
+ * @example
54
+ */
34
55
  export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, dataAttributes, }: Props): jsx.JSX.Element;
@@ -12,6 +12,13 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
12
12
  * If an image has not been resized using the pctWidth attribute,
13
13
  * then an image in wide or full-width can not be wider than the image's
14
14
  * original width.
15
+ * @param layout
16
+ * @param width
17
+ * @param containerWidth
18
+ * @param fullWidthMode
19
+ * @param isResized
20
+ * @param isInsideOfInlineExtension
21
+ * @example
15
22
  */
16
23
  export declare function calcLegacyWidth(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean, isInsideOfInlineExtension?: boolean): string;
17
24
  /**
@@ -20,6 +27,12 @@ export declare function calcLegacyWidth(layout: MediaSingleLayout, width: number
20
27
  * If an image has not been resized using the pctWidth attribute,
21
28
  * then an image in wide or full-width can not be wider than the image's
22
29
  * original width.
30
+ * @param layout
31
+ * @param width
32
+ * @param containerWidth
33
+ * @param fullWidthMode
34
+ * @param isResized
35
+ * @example
23
36
  */
24
37
  export declare function calcLegacyWidthForInline(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean): string;
25
38
  /**
@@ -27,6 +40,10 @@ export declare function calcLegacyWidthForInline(layout: MediaSingleLayout, widt
27
40
  *
28
41
  * Wide and full-width images are always that size (960px and 100%); there is
29
42
  * no distinction between max-width and width.
43
+ * @param layout
44
+ * @param width
45
+ * @param containerWidth
46
+ * @example
30
47
  */
31
48
  export declare function calcResizedWidth(layout: MediaSingleLayout, width: number, containerWidth?: number): any;
32
49
  /**
@@ -35,6 +52,7 @@ export declare function calcResizedWidth(layout: MediaSingleLayout, width: numbe
35
52
  *
36
53
  * @param widthValue CSS width value to be rounded
37
54
  * @returns Reduced CSS width value where px value given, or otherwise the original value
55
+ * @example
38
56
  */
39
57
  export declare function roundToClosestEvenPxValue(widthValue: any): any;
40
58
  export interface MediaSingleWrapperProps {
@@ -54,12 +72,25 @@ export interface MediaSingleWrapperProps {
54
72
  isExtendedResizeExperienceOn?: boolean;
55
73
  isNestedNode?: boolean;
56
74
  isInsideOfInlineExtension?: boolean;
75
+ nodeType?: string;
57
76
  }
58
77
  /**
59
78
  * Can't use `.attrs` to handle highly dynamic styles because we are still
60
79
  * supporting `styled-components` v1.
80
+ * @param root0
81
+ * @param root0.containerWidth
82
+ * @param root0.fullWidthMode
83
+ * @param root0.isResized
84
+ * @param root0.layout
85
+ * @param root0.mediaSingleWidth
86
+ * @param root0.width
87
+ * @param root0.isExtendedResizeExperienceOn
88
+ * @param root0.isNestedNode
89
+ * @param root0.isInsideOfInlineExtension
90
+ * @param root0.nodeType
91
+ * @example
61
92
  */
62
- export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
93
+ export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, nodeType, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
63
94
  export interface MediaWrapperProps {
64
95
  paddingBottom?: string;
65
96
  height?: number;
@@ -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