@ckeditor/ckeditor5-fullscreen 48.8.1-alpha.3 → 49.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/augmentation.d.ts +19 -19
  2. package/dist/fullscreen.d.ts +22 -22
  3. package/dist/fullscreencommand.d.ts +50 -50
  4. package/dist/fullscreenconfig.d.ts +73 -65
  5. package/dist/fullscreenediting.d.ts +24 -24
  6. package/dist/fullscreenui.d.ts +29 -30
  7. package/dist/handlers/abstracteditorhandler.d.ts +323 -285
  8. package/dist/handlers/classiceditorhandler.d.ts +19 -19
  9. package/dist/handlers/decouplededitorhandler.d.ts +21 -21
  10. package/dist/handlers/integrations/contextualballoon.d.ts +10 -0
  11. package/dist/index-content.css +3 -0
  12. package/dist/index-content.css.map +1 -0
  13. package/dist/index-editor.css +212 -197
  14. package/dist/index-editor.css.map +1 -0
  15. package/dist/index.css +101 -88
  16. package/dist/index.css.map +1 -1
  17. package/dist/index.d.ts +16 -14
  18. package/dist/index.js +1151 -1077
  19. package/dist/index.js.map +1 -1
  20. package/dist/translations/af.js +1 -1
  21. package/dist/translations/af.umd.js +5 -3
  22. package/dist/translations/ar.js +1 -1
  23. package/dist/translations/ar.umd.js +5 -3
  24. package/dist/translations/ast.js +1 -1
  25. package/dist/translations/ast.umd.js +5 -3
  26. package/dist/translations/az.js +1 -1
  27. package/dist/translations/az.umd.js +5 -3
  28. package/dist/translations/be.js +1 -1
  29. package/dist/translations/be.umd.js +5 -3
  30. package/dist/translations/bg.js +1 -1
  31. package/dist/translations/bg.umd.js +5 -3
  32. package/dist/translations/bn.js +1 -1
  33. package/dist/translations/bn.umd.js +5 -3
  34. package/dist/translations/bs.js +1 -1
  35. package/dist/translations/bs.umd.js +5 -3
  36. package/dist/translations/ca.js +1 -1
  37. package/dist/translations/ca.umd.js +5 -3
  38. package/dist/translations/cs.js +1 -1
  39. package/dist/translations/cs.umd.js +5 -3
  40. package/dist/translations/da.js +1 -1
  41. package/dist/translations/da.umd.js +5 -3
  42. package/dist/translations/de-ch.js +1 -1
  43. package/dist/translations/de-ch.umd.js +5 -3
  44. package/dist/translations/de.js +1 -1
  45. package/dist/translations/de.umd.js +5 -3
  46. package/dist/translations/el.js +1 -1
  47. package/dist/translations/el.umd.js +5 -3
  48. package/dist/translations/en-au.js +1 -1
  49. package/dist/translations/en-au.umd.js +5 -3
  50. package/dist/translations/en-gb.js +1 -1
  51. package/dist/translations/en-gb.umd.js +5 -3
  52. package/dist/translations/en.js +1 -1
  53. package/dist/translations/en.umd.js +5 -3
  54. package/dist/translations/eo.js +1 -1
  55. package/dist/translations/eo.umd.js +5 -3
  56. package/dist/translations/es-co.js +1 -1
  57. package/dist/translations/es-co.umd.js +5 -3
  58. package/dist/translations/es.js +1 -1
  59. package/dist/translations/es.umd.js +5 -3
  60. package/dist/translations/et.js +1 -1
  61. package/dist/translations/et.umd.js +5 -3
  62. package/dist/translations/eu.js +1 -1
  63. package/dist/translations/eu.umd.js +5 -3
  64. package/dist/translations/fa.js +1 -1
  65. package/dist/translations/fa.umd.js +5 -3
  66. package/dist/translations/fi.js +1 -1
  67. package/dist/translations/fi.umd.js +5 -3
  68. package/dist/translations/fr.js +1 -1
  69. package/dist/translations/fr.umd.js +5 -3
  70. package/dist/translations/gl.js +1 -1
  71. package/dist/translations/gl.umd.js +5 -3
  72. package/dist/translations/gu.js +1 -1
  73. package/dist/translations/gu.umd.js +5 -3
  74. package/dist/translations/he.js +1 -1
  75. package/dist/translations/he.umd.js +5 -3
  76. package/dist/translations/hi.js +1 -1
  77. package/dist/translations/hi.umd.js +5 -3
  78. package/dist/translations/hr.js +1 -1
  79. package/dist/translations/hr.umd.js +5 -3
  80. package/dist/translations/hu.js +1 -1
  81. package/dist/translations/hu.umd.js +5 -3
  82. package/dist/translations/hy.js +1 -1
  83. package/dist/translations/hy.umd.js +5 -3
  84. package/dist/translations/id.js +1 -1
  85. package/dist/translations/id.umd.js +5 -3
  86. package/dist/translations/it.js +1 -1
  87. package/dist/translations/it.umd.js +5 -3
  88. package/dist/translations/ja.js +1 -1
  89. package/dist/translations/ja.umd.js +5 -3
  90. package/dist/translations/jv.js +1 -1
  91. package/dist/translations/jv.umd.js +5 -3
  92. package/dist/translations/kk.js +1 -1
  93. package/dist/translations/kk.umd.js +5 -3
  94. package/dist/translations/km.js +1 -1
  95. package/dist/translations/km.umd.js +5 -3
  96. package/dist/translations/kn.js +1 -1
  97. package/dist/translations/kn.umd.js +5 -3
  98. package/dist/translations/ko.js +1 -1
  99. package/dist/translations/ko.umd.js +5 -3
  100. package/dist/translations/ku.js +1 -1
  101. package/dist/translations/ku.umd.js +5 -3
  102. package/dist/translations/lt.js +1 -1
  103. package/dist/translations/lt.umd.js +5 -3
  104. package/dist/translations/lv.js +1 -1
  105. package/dist/translations/lv.umd.js +5 -3
  106. package/dist/translations/ms.js +1 -1
  107. package/dist/translations/ms.umd.js +5 -3
  108. package/dist/translations/nb.js +1 -1
  109. package/dist/translations/nb.umd.js +5 -3
  110. package/dist/translations/ne.js +1 -1
  111. package/dist/translations/ne.umd.js +5 -3
  112. package/dist/translations/nl.js +1 -1
  113. package/dist/translations/nl.umd.js +5 -3
  114. package/dist/translations/no.js +1 -1
  115. package/dist/translations/no.umd.js +5 -3
  116. package/dist/translations/oc.js +1 -1
  117. package/dist/translations/oc.umd.js +5 -3
  118. package/dist/translations/pl.js +1 -1
  119. package/dist/translations/pl.umd.js +5 -3
  120. package/dist/translations/pt-br.js +1 -1
  121. package/dist/translations/pt-br.umd.js +5 -3
  122. package/dist/translations/pt.js +1 -1
  123. package/dist/translations/pt.umd.js +5 -3
  124. package/dist/translations/ro.js +1 -1
  125. package/dist/translations/ro.umd.js +5 -3
  126. package/dist/translations/ru.js +1 -1
  127. package/dist/translations/ru.umd.js +5 -3
  128. package/dist/translations/si.js +1 -1
  129. package/dist/translations/si.umd.js +5 -3
  130. package/dist/translations/sk.js +1 -1
  131. package/dist/translations/sk.umd.js +5 -3
  132. package/dist/translations/sl.js +1 -1
  133. package/dist/translations/sl.umd.js +5 -3
  134. package/dist/translations/sq.js +1 -1
  135. package/dist/translations/sq.umd.js +5 -3
  136. package/dist/translations/sr-latn.js +1 -1
  137. package/dist/translations/sr-latn.umd.js +5 -3
  138. package/dist/translations/sr.js +1 -1
  139. package/dist/translations/sr.umd.js +5 -3
  140. package/dist/translations/sv.js +1 -1
  141. package/dist/translations/sv.umd.js +5 -3
  142. package/dist/translations/th.js +1 -1
  143. package/dist/translations/th.umd.js +5 -3
  144. package/dist/translations/ti.js +1 -1
  145. package/dist/translations/ti.umd.js +5 -3
  146. package/dist/translations/tk.js +1 -1
  147. package/dist/translations/tk.umd.js +5 -3
  148. package/dist/translations/tr.js +1 -1
  149. package/dist/translations/tr.umd.js +5 -3
  150. package/dist/translations/tt.js +1 -1
  151. package/dist/translations/tt.umd.js +5 -3
  152. package/dist/translations/ug.js +1 -1
  153. package/dist/translations/ug.umd.js +5 -3
  154. package/dist/translations/uk.js +1 -1
  155. package/dist/translations/uk.umd.js +5 -3
  156. package/dist/translations/ur.js +1 -1
  157. package/dist/translations/ur.umd.js +5 -3
  158. package/dist/translations/uz.js +1 -1
  159. package/dist/translations/uz.umd.js +5 -3
  160. package/dist/translations/vi.js +1 -1
  161. package/dist/translations/vi.umd.js +5 -3
  162. package/dist/translations/zh-cn.js +1 -1
  163. package/dist/translations/zh-cn.umd.js +5 -3
  164. package/dist/translations/zh.js +1 -1
  165. package/dist/translations/zh.umd.js +5 -3
  166. package/package.json +7 -7
@@ -1,289 +1,327 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import { type EventInfo } from '@ckeditor/ckeditor5-utils';
6
- import type { ElementApi, Editor, EditorConfig } from '@ckeditor/ckeditor5-core';
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import type { ElementApi, Editor, EditorConfig } from "@ckeditor/ckeditor5-core";
7
6
  /**
8
- * The abstract editor type handler.
9
- *
10
- * This class defines some actions and behaviors that are applied when fullscreen mode is toggled, and which are common
11
- * regardless of the editor type. Then, specific classes like `ClassicEditorHandler` or `DecoupledEditorHandler`
12
- * extend this class with actions specific for these editor types.
13
- *
14
- * Extend this class to provide fullscreen mode handling for unsupported editor types,
15
- * or if you wish to heavily customize the default behavior.
16
- *
17
- * The only method that is necessary to provide when extending this class is {@link #defaultOnEnter}. However, make sure to
18
- * familiarize yourself with the below full list of actions taken by `FullscreenAbstractEditorHandler` to understand
19
- * what is covered by default, and what should be provided by you.
20
- *
21
- * When entering the fullscreen mode, the {@link #enable} method is called. It creates the properly styled container
22
- * and handles the editor features that need it, in the following order:
23
- *
24
- * 1. Saves the scroll positions of all ancestors of the editable element to restore them after leaving the fullscreen mode.
25
- * 2. Executes the {@link #defaultOnEnter} method to move the proper editor UI elements to the fullscreen mode.
26
- * **If you extend the abstract handler, you should override this method** to move the elements that are specific to your editor type, like:
27
- * editable, toolbar, menu bar.
28
- * Use {@link #moveToFullscreen} method for this purpose to ensure they are automatically cleaned up after leaving the fullscreen mode.
29
- * 3. Adds proper classes to the `<body>` and `<html>` elements to block page scrolling, adjust `z-index` etc.
30
- *
31
- * Steps 4-12 are only executed if the corresponding features are used.
32
- *
33
- * 4. If presence list is used, moves it to the fullscreen mode container.
34
- * 5. If document outline is used, moves it to the fullscreen mode.
35
- * 6. If pagination is used, adjusts it's configuration for the changed view.
36
- * 7. If annotations are used, moves them to the fullscreen mode.
37
- * 8. If revision history is used, overrides the callbacks to show the revision viewer in the fullscreen mode.
38
- * 9. If AI Tabs is used, moves it to the fullscreen mode.
39
- * 10. If source editing and document outline are both used, registers a callback hiding the document outline header in source editing mode.
40
- * 11. Changes the position of some dialogs to utilize the empty space on the right side of the editable element.
41
- * 12. If custom container is used, hides all other elements in it to ensure they don't create an empty unscrollable space.
42
- *
43
- * Then finally:
44
- *
45
- * 13. Adjusts the visibility of the left and right sidebars based on the available space.
46
- * 14. Sets up a resize observer to adjust the visibility of the left and right sidebars dynamically.
47
- * 15. Executes the configured {@link module:fullscreen/fullscreenconfig~FullscreenConfig#onEnterCallback
48
- * `config.fullscreen.onEnterCallback`} function.
49
- * By default, it returns the fullscreen mode container element so it can be further customized.
50
- *
51
- * When leaving the fullscreen mode, the {@link #disable} method is called. It does the following:
52
- *
53
- * 1. Execute the configured {@link module:fullscreen/fullscreenconfig~FullscreenConfig#onLeaveCallback
54
- * `config.fullscreen.onLeaveCallback`} function.
55
- * 2. Remove the classes added to the `<body>` and `<html>` elements.
56
- * 3. If document outline is used, restore its default container.
57
- * 4. If annotations are used, restore their original state (UI, filters etc).
58
- * 5. If revision history is used, restore the original callbacks.
59
- * 7. If AI Tabs is used, restore it to the original state.
60
- * 8. If source editing and document outline are both used, restore the document outline header.
61
- * 9. Restore all moved elements to their original place.
62
- * 10. Destroy the fullscreen mode container.
63
- * 11. If the editor has a toolbar, switch its behavior to the one configured in the
64
- * {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} property.
65
- * 12. Restore the scroll positions of all ancestors of the editable element.
66
- * 13. If pagination is used, restore its default configuration.
67
- * 14. Restore default dialogs positions.
68
- *
69
- * This class is exported to allow for custom extensions.
70
- */
7
+ * The abstract editor type handler.
8
+ *
9
+ * This class defines some actions and behaviors that are applied when fullscreen mode is toggled, and which are common
10
+ * regardless of the editor type. Then, specific classes like `ClassicEditorHandler` or `DecoupledEditorHandler`
11
+ * extend this class with actions specific for these editor types.
12
+ *
13
+ * Extend this class to provide fullscreen mode handling for unsupported editor types,
14
+ * or if you wish to heavily customize the default behavior.
15
+ *
16
+ * The only method that is necessary to provide when extending this class is {@link #defaultOnEnter}. However, make sure to
17
+ * familiarize yourself with the below full list of actions taken by `FullscreenAbstractEditorHandler` to understand
18
+ * what is covered by default, and what should be provided by you.
19
+ *
20
+ * When entering the fullscreen mode, the {@link #enable} method is called. It creates the properly styled container
21
+ * and handles the editor features that need it, in the following order:
22
+ *
23
+ * 1. Saves the scroll positions of all ancestors of the editable element to restore them after leaving the fullscreen mode.
24
+ * 2. Executes the {@link #defaultOnEnter} method to move the proper editor UI elements to the fullscreen mode.
25
+ * **If you extend the abstract handler, you should override this method** to move the elements that are specific to your editor type, like:
26
+ * editable, toolbar, menu bar.
27
+ * Use {@link #moveToFullscreen} method for this purpose to ensure they are automatically cleaned up after leaving the fullscreen mode.
28
+ * 3. Adds proper classes to the `<body>` and `<html>` elements to block page scrolling, adjust `z-index` etc.
29
+ *
30
+ * Steps 4-12 are only executed if the corresponding features are used.
31
+ *
32
+ * 4. If presence list is used, moves it to the fullscreen mode container.
33
+ * 5. If document outline is used, moves it to the fullscreen mode.
34
+ * 6. If pagination is used, adjusts it's configuration for the changed view.
35
+ * 7. If annotations are used, moves them to the fullscreen mode.
36
+ * 8. If revision history is used, overrides the callbacks to show the revision viewer in the fullscreen mode.
37
+ * 9. If AI Tabs is used, moves it to the fullscreen mode.
38
+ * 10. If source editing and document outline are both used, registers a callback hiding the document outline header in source editing mode.
39
+ * 11. Changes the position of some dialogs to utilize the empty space on the right side of the editable element.
40
+ * 12. If custom container is used, hides all other elements in it to ensure they don't create an empty unscrollable space.
41
+ *
42
+ * Then finally:
43
+ *
44
+ * 13. Adjusts the visibility of the left and right sidebars based on the available space.
45
+ * 14. Sets up a resize observer to adjust the visibility of the left and right sidebars dynamically.
46
+ * 15. Executes the configured {@link module:fullscreen/fullscreenconfig~FullscreenConfig#onEnterCallback
47
+ * `config.fullscreen.onEnterCallback`} function.
48
+ * By default, it returns the fullscreen mode container element so it can be further customized.
49
+ *
50
+ * When leaving the fullscreen mode, the {@link #disable} method is called. It does the following:
51
+ *
52
+ * 1. Execute the configured {@link module:fullscreen/fullscreenconfig~FullscreenConfig#onLeaveCallback
53
+ * `config.fullscreen.onLeaveCallback`} function.
54
+ * 2. Remove the classes added to the `<body>` and `<html>` elements.
55
+ * 3. If document outline is used, restore its default container.
56
+ * 4. If annotations are used, restore their original state (UI, filters etc).
57
+ * 5. If revision history is used, restore the original callbacks.
58
+ * 7. If AI Tabs is used, restore it to the original state.
59
+ * 8. If source editing and document outline are both used, restore the document outline header.
60
+ * 9. Restore all moved elements to their original place.
61
+ * 10. Destroy the fullscreen mode container.
62
+ * 11. If the editor has a toolbar, switch its behavior to the one configured in the
63
+ * {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} property.
64
+ * 12. Restore the scroll positions of all ancestors of the editable element.
65
+ * 13. If pagination is used, restore its default configuration.
66
+ * 14. Restore default dialogs positions.
67
+ *
68
+ * This class is exported to allow for custom extensions.
69
+ */
71
70
  export declare class FullscreenAbstractEditorHandler {
72
- /**
73
- * Maps placeholder names to placeholder elements and moved elements.
74
- */
75
- private _placeholderMap;
76
- /**
77
- * The wrapper element that holds the fullscreen mode layout.
78
- */
79
- private _wrapper;
80
- /**
81
- * The document object in which the editor is located.
82
- */
83
- private _document;
84
- /**
85
- * Data of the annotations UIs that were active before entering the fullscreen mode.
86
- */
87
- private _annotationsUIsData;
88
- /**
89
- * The pagination body collection that is used in the fullscreen mode.
90
- * If we don't move pagination lines to the fullscreen container, they won't be visible.
91
- */
92
- private _paginationBodyCollection;
93
- /**
94
- * Whether the left sidebar collapse button is created.
95
- */
96
- private _hasLeftCollapseButton;
97
- /**
98
- * The button that toggles the visibility of the left sidebar.
99
- */
100
- private _collapseLeftSidebarButton;
101
- /**
102
- * The resize observer that is used to adjust the visibility of the left and right sidebars dynamically.
103
- */
104
- private _resizeObserver;
105
- /**
106
- * The width of the expanded left and right sidebars in the fullscreen mode. Necessary for logic checking if they should be visible.
107
- */
108
- private _sidebarsWidths;
109
- /**
110
- * Whether the left sidebar should be kept hidden even if there is enough space for it. It's set to `true` when user
111
- * collapses the left sidebar with a button. Behavior is reset when exiting the fullscreen mode.
112
- */
113
- private _keepLeftSidebarHidden;
114
- /**
115
- * Temporary flag used to ignore the first automatic layout adjustment logic when user collapses the left sidebar with a button.
116
- * It is then immediately set back to `false`.
117
- */
118
- private _forceShowLeftSidebar;
119
- /**
120
- * A callback that hides the document outline header when the source editing mode is enabled.
121
- * Document outline element itself is hidden by source editing plugin.
122
- */
123
- private _sourceEditingCallback;
124
- /**
125
- * A map of elements that were hidden when entering the fullscreen mode.
126
- * It is used to restore their previous visibility when leaving the fullscreen mode and avoid showing elements
127
- * that were hidden before entering the fullscreen mode.
128
- */
129
- private _hiddenElements;
130
- /**
131
- * A map matching the ancestors of the editable element with their scroll positions before entering fullscreen mode.
132
- */
133
- private _savedAncestorsScrollPositions;
134
- /**
135
- * A callback that shows the revision viewer, stored to restore the original one after exiting the fullscreen mode.
136
- */
137
- protected _showRevisionViewerCallback: ((config?: EditorConfig) => Promise<any>) | null;
138
- /**
139
- * A callback that closes the revision viewer, stored to restore the original one after exiting the fullscreen mode.
140
- */
141
- protected _closeRevisionViewerCallback: ((viewerEditor?: any) => Promise<unknown>) | null;
142
- /**
143
- * An editor instance. It should be set by the particular editor type handler.
144
- */
145
- protected _editor: Editor & Partial<ElementApi>;
146
- /**
147
- * A map of AI Tabs data that were set before entering the fullscreen mode.
148
- */
149
- private _aiTabsData;
150
- /**
151
- * @inheritDoc
152
- */
153
- constructor(editor: Editor);
154
- /**
155
- * Moves the given element to the fullscreen mode container, leaving a placeholder in its place.
156
- */
157
- moveToFullscreen(elementToMove: HTMLElement, placeholderName: string): void;
158
- /**
159
- * Returns a single moved element to its original place.
160
- */
161
- restoreMovedElementLocation(placeholderName: string): void;
162
- /**
163
- * Returns the fullscreen mode container element.
164
- */
165
- getWrapper(): HTMLElement;
166
- /**
167
- * Enables the fullscreen mode. It executes the editor-specific enable handler and then the configured callback.
168
- */
169
- enable(): void;
170
- /**
171
- * Disables the fullscreen mode by restoring all moved elements and destroying the fullscreen container.
172
- */
173
- disable(): void;
174
- /**
175
- * @inheritDoc
176
- */
177
- destroy(): void;
178
- /**
179
- * A function that moves the editor UI elements to the fullscreen mode. It should be set by the particular editor type handler.
180
- *
181
- * Returns the fullscreen mode container element so it can be further customized via
182
- * `fullscreen.onEnterCallback` configuration property.
183
- */
184
- defaultOnEnter(): HTMLElement;
185
- /**
186
- * Destroys the fullscreen mode container.
187
- */
188
- private _destroyContainer;
189
- /**
190
- * Checks if the PresenceListUI plugin is available and moves its elements to fullscreen mode.
191
- */
192
- private _generatePresenceListContainer;
193
- /**
194
- * Checks if the DocumentOutlineUI plugin is available and moves its elements to fullscreen mode.
195
- */
196
- private _generateDocumentOutlineContainer;
197
- /**
198
- * Restores the default value of documentOutlineContainer, which is modified in fullscreen mode.
199
- */
200
- private _restoreDocumentOutlineDefaultContainer;
201
- private _generateCollapseButton;
202
- /**
203
- * Stores the current state of the annotations UIs to restore it when leaving fullscreen mode and switches the UI to the wide sidebar.
204
- */
205
- private _overrideAnnotationsUIs;
206
- /**
207
- * Restores the saved state of the annotations UIs.
208
- */
209
- private _restoreAnnotationsUIs;
210
- /**
211
- * Modifies the revision history viewer callbacks to display the viewer in the fullscreen mode.
212
- */
213
- private _overrideRevisionHistoryCallbacks;
214
- /**
215
- * Resets the revision history viewer callbacks to their original values.
216
- */
217
- private _restoreRevisionHistoryCallbacks;
218
- /**
219
- * Adds an event listener when the dialog opens to adjust its position in fullscreen mode,
220
- * utilizing the empty space on the right side of the editable element.
221
- */
222
- private _registerFullscreenDialogPositionAdjustments;
223
- /**
224
- * Removes an event listener that adjusts the dialog's position in fullscreen mode.
225
- */
226
- private _unregisterFullscreenDialogPositionAdjustments;
227
- /**
228
- * Stores a bound reference to the _updateDialogPosition method, allowing it to be attached and detached from change event.
229
- */
230
- updateDialogPositionCallback: (_evt: EventInfo, _name: string, isOpen: boolean) => void;
231
- /**
232
- * If dialog is open, adjust its positioning.
233
- */
234
- private _updateDialogPosition;
235
- /**
236
- * Adjusts the dialog position to utilize the empty space on the right side of the editable.
237
- * The new dialog position should be on the right side of the fullscreen view with a 30px margin.
238
- * Only dialogs with the position set to "editor-top-side" should have their position changed.
239
- */
240
- private _setNewDialogPosition;
241
- /**
242
- * Saves the scroll positions of all ancestors of the given element.
243
- */
244
- private _saveAncestorsScrollPositions;
245
- /**
246
- * Stores the current state of the AI Tabs and moves it to the fullscreen mode.
247
- */
248
- private _handleAITabsTransfer;
249
- /**
250
- * Checks the transition event to see if it's changing the width of the AI tabs and if so, adjusts the visible fullscreen mode elements.
251
- */
252
- private _handleAISidebarTransitions;
253
- /**
254
- * Restores the state of the AI Tabs to the original values.
255
- */
256
- private _restoreAITabs;
257
- /**
258
- * Adjusts the visibility of the left and right sidebars based on the available space.
259
- */
260
- private _adjustVisibleElements;
261
- /**
262
- * Switches the annotations UI to the requested one.
263
- */
264
- private _switchAnnotationsUI;
265
- /**
266
- * Sets up a resize observer to adjust the visibility of the left and right sidebars dynamically.
267
- */
268
- private _setupResizeObserver;
269
- /**
270
- * Hides the left sidebar. Works only if there is anything to hide.
271
- */
272
- private _hideLeftSidebar;
273
- /**
274
- * Shows the left sidebar. Works only if there is anything to show.
275
- */
276
- private _showLeftSidebar;
277
- /**
278
- * Hides the right sidebar. Works only if there is anything to hide.
279
- */
280
- private _hideRightSidebar;
281
- /**
282
- * Shows the right sidebar. Works only if there is anything to show.
283
- */
284
- private _showRightSidebar;
285
- /**
286
- * Handler for AI tabs `transitionend`; must be the same reference in `addEventListener` / `removeEventListener`.
287
- */
288
- private _aiTabsTransitionEndCallback;
71
+ /**
72
+ * Maps placeholder names to placeholder elements and moved elements.
73
+ */
74
+ private _placeholderMap;
75
+ /**
76
+ * The wrapper element that holds the fullscreen mode layout.
77
+ */
78
+ private _wrapper;
79
+ /**
80
+ * The document object in which the editor is located.
81
+ */
82
+ private _document;
83
+ /**
84
+ * The element or shadow root the {@link #_wrapper} is mounted in – not to be confused with the *root* that
85
+ * wrapper ends up living in, which is what the editor's own overlay layer is mounted in. Resolved when the
86
+ * wrapper is created and reused until it is destroyed – see {@link #_getWrapperMountTarget}.
87
+ */
88
+ private _wrapperMountTarget;
89
+ /**
90
+ * Whether the fullscreen mode covers the viewport, which is the case unless the integrator provided a
91
+ * `fullscreen.container` other than the mount target that would be resolved anyway. It decides both the
92
+ * positioning of the wrapper and the page scroll blocking, and cannot be derived from the position of the
93
+ * wrapper in the DOM: mounted in a shadow root, it is not a child of the `<body>` element either way.
94
+ * Resolved together with {@link #_wrapperMountTarget}.
95
+ */
96
+ private _coversViewport;
97
+ /**
98
+ * The host of the shadow root the fullscreen mode is mounted in, when it was marked with the `ck-fullscreen`
99
+ * class next to the `<body>` element. `null` for a mount target in the light DOM, which needs no marking.
100
+ */
101
+ private _markedHostElement;
102
+ /**
103
+ * Data of the annotations UIs that were active before entering the fullscreen mode.
104
+ */
105
+ private _annotationsUIsData;
106
+ /**
107
+ * The pagination body collection that is used in the fullscreen mode.
108
+ * If we don't move pagination lines to the fullscreen wrapper, they won't be visible.
109
+ */
110
+ private _paginationBodyCollection;
111
+ /**
112
+ * Whether the left sidebar collapse button is created.
113
+ */
114
+ private _hasLeftCollapseButton;
115
+ /**
116
+ * The button that toggles the visibility of the left sidebar.
117
+ */
118
+ private _collapseLeftSidebarButton;
119
+ /**
120
+ * The resize observer that is used to adjust the visibility of the left and right sidebars dynamically.
121
+ */
122
+ private _resizeObserver;
123
+ /**
124
+ * The width of the expanded left and right sidebars in the fullscreen mode. Necessary for logic checking if they should be visible.
125
+ */
126
+ private _sidebarsWidths;
127
+ /**
128
+ * Whether the left sidebar should be kept hidden even if there is enough space for it. It's set to `true` when user
129
+ * collapses the left sidebar with a button. Behavior is reset when exiting the fullscreen mode.
130
+ */
131
+ private _keepLeftSidebarHidden;
132
+ /**
133
+ * Temporary flag used to ignore the first automatic layout adjustment logic when user collapses the left sidebar with a button.
134
+ * It is then immediately set back to `false`.
135
+ */
136
+ private _forceShowLeftSidebar;
137
+ /**
138
+ * A cleanup function returned by `registerFullscreenBalloonOffsetCorrection`.
139
+ */
140
+ private _disableContextualBalloonPositionHandler;
141
+ /**
142
+ * A callback that hides the document outline header when the source editing mode is enabled.
143
+ * Document outline element itself is hidden by source editing plugin.
144
+ */
145
+ private _sourceEditingCallback;
146
+ /**
147
+ * A map of elements that were hidden when entering the fullscreen mode.
148
+ * It is used to restore their previous visibility when leaving the fullscreen mode and avoid showing elements
149
+ * that were hidden before entering the fullscreen mode.
150
+ */
151
+ private _hiddenElements;
152
+ /**
153
+ * A map matching the ancestors of the editable element with their scroll positions before entering fullscreen mode.
154
+ */
155
+ private _savedAncestorsScrollPositions;
156
+ /**
157
+ * A callback that shows the revision viewer, stored to restore the original one after exiting the fullscreen mode.
158
+ */
159
+ protected _showRevisionViewerCallback: ((config?: EditorConfig) => Promise<any>) | null;
160
+ /**
161
+ * A callback that closes the revision viewer, stored to restore the original one after exiting the fullscreen mode.
162
+ */
163
+ protected _closeRevisionViewerCallback: ((viewerEditor?: any) => Promise<unknown>) | null;
164
+ /**
165
+ * An editor instance. It should be set by the particular editor type handler.
166
+ */
167
+ protected _editor: Editor & Partial<ElementApi>;
168
+ /**
169
+ * A map of AI Tabs data that were set before entering the fullscreen mode.
170
+ */
171
+ private _aiTabsData;
172
+ /**
173
+ * @inheritDoc
174
+ */
175
+ constructor(editor: Editor);
176
+ /**
177
+ * Returns the element or shadow root the fullscreen mode is mounted in: the configured `fullscreen.container`,
178
+ * otherwise the shared `ui.overlayContainer`, otherwise the root the editor lives in (so that the editor UI moved
179
+ * to the fullscreen mode keeps the styles adopted by that root).
180
+ *
181
+ * The root is resolved from the editable element when the wrapper is created rather than from the source element
182
+ * in the constructor: an editor may still be detached then (a decoupled editor is often inserted into the
183
+ * document – possibly into a shadow root – only after it has been created), and a detached node has no root to
184
+ * resolve.
185
+ */
186
+ private _getWrapperMountTarget;
187
+ /**
188
+ * Moves the given element to the fullscreen mode container, leaving a placeholder in its place.
189
+ */
190
+ moveToFullscreen(elementToMove: HTMLElement, placeholderName: string): void;
191
+ /**
192
+ * Returns a single moved element to its original place.
193
+ */
194
+ restoreMovedElementLocation(placeholderName: string): void;
195
+ /**
196
+ * Returns the fullscreen mode wrapper element.
197
+ */
198
+ getWrapper(): HTMLElement;
199
+ /**
200
+ * Enables the fullscreen mode. It executes the editor-specific enable handler and then the configured callback.
201
+ */
202
+ enable(): void;
203
+ /**
204
+ * Disables the fullscreen mode by restoring all moved elements and destroying the fullscreen container.
205
+ */
206
+ disable(): void;
207
+ /**
208
+ * @inheritDoc
209
+ */
210
+ destroy(): void;
211
+ /**
212
+ * Removes the `ck-fullscreen` class from the element it was added to next to the `<body>` and `<html>` elements.
213
+ * The element is remembered instead of being resolved again, because the wrapper's mount target is forgotten before this runs.
214
+ */
215
+ private _unmarkHostElement;
216
+ /**
217
+ * A function that moves the editor UI elements to the fullscreen mode. It should be set by the particular editor type handler.
218
+ *
219
+ * Returns the fullscreen mode wrapper element so it can be further customized via
220
+ * `fullscreen.onEnterCallback` configuration property.
221
+ */
222
+ defaultOnEnter(): HTMLElement;
223
+ /**
224
+ * Destroys the fullscreen mode wrapper.
225
+ */
226
+ private _destroyWrapper;
227
+ /**
228
+ * Checks if the PresenceListUI plugin is available and moves its elements to fullscreen mode.
229
+ */
230
+ private _generatePresenceListContainer;
231
+ /**
232
+ * Checks if the DocumentOutlineUI plugin is available and moves its elements to fullscreen mode.
233
+ */
234
+ private _generateDocumentOutlineContainer;
235
+ /**
236
+ * Restores the default value of documentOutlineContainer, which is modified in fullscreen mode.
237
+ */
238
+ private _restoreDocumentOutlineDefaultContainer;
239
+ private _generateCollapseButton;
240
+ /**
241
+ * Stores the current state of the annotations UIs to restore it when leaving fullscreen mode and switches the UI to the wide sidebar.
242
+ */
243
+ private _overrideAnnotationsUIs;
244
+ /**
245
+ * Restores the saved state of the annotations UIs.
246
+ */
247
+ private _restoreAnnotationsUIs;
248
+ /**
249
+ * Modifies the revision history viewer callbacks to display the viewer in the fullscreen mode.
250
+ */
251
+ private _overrideRevisionHistoryCallbacks;
252
+ /**
253
+ * Resets the revision history viewer callbacks to their original values.
254
+ */
255
+ private _restoreRevisionHistoryCallbacks;
256
+ /**
257
+ * Adds an event listener when the dialog opens to adjust its position in fullscreen mode,
258
+ * utilizing the empty space on the right side of the editable element.
259
+ */
260
+ private _registerFullscreenDialogPositionAdjustments;
261
+ /**
262
+ * Removes an event listener that adjusts the dialog's position in fullscreen mode.
263
+ */
264
+ private _unregisterFullscreenDialogPositionAdjustments;
265
+ /**
266
+ * Stores a bound reference to the _updateDialogPosition method, allowing it to be attached and detached from change event.
267
+ */
268
+ updateDialogPositionCallback: typeof this._updateDialogPosition;
269
+ /**
270
+ * If dialog is open, adjust its positioning.
271
+ */
272
+ private _updateDialogPosition;
273
+ /**
274
+ * Adjusts the dialog position to utilize the empty space on the right side of the editable.
275
+ * The new dialog position should be on the right side of the fullscreen view with a 30px margin.
276
+ * Only dialogs with the position set to "editor-top-side" should have their position changed.
277
+ */
278
+ private _setNewDialogPosition;
279
+ /**
280
+ * Saves the scroll positions of all ancestors of the given element.
281
+ */
282
+ private _saveAncestorsScrollPositions;
283
+ /**
284
+ * Stores the current state of the AI Tabs and moves it to the fullscreen mode.
285
+ */
286
+ private _handleAITabsTransfer;
287
+ /**
288
+ * Checks the transition event to see if it's changing the width of the AI tabs and if so, adjusts the visible fullscreen mode elements.
289
+ */
290
+ private _handleAISidebarTransitions;
291
+ /**
292
+ * Restores the state of the AI Tabs to the original values.
293
+ */
294
+ private _restoreAITabs;
295
+ /**
296
+ * Adjusts the visibility of the left and right sidebars based on the available space.
297
+ */
298
+ private _adjustVisibleElements;
299
+ /**
300
+ * Switches the annotations UI to the requested one.
301
+ */
302
+ private _switchAnnotationsUI;
303
+ /**
304
+ * Sets up a resize observer to adjust the visibility of the left and right sidebars dynamically.
305
+ */
306
+ private _setupResizeObserver;
307
+ /**
308
+ * Hides the left sidebar. Works only if there is anything to hide.
309
+ */
310
+ private _hideLeftSidebar;
311
+ /**
312
+ * Shows the left sidebar. Works only if there is anything to show.
313
+ */
314
+ private _showLeftSidebar;
315
+ /**
316
+ * Hides the right sidebar. Works only if there is anything to hide.
317
+ */
318
+ private _hideRightSidebar;
319
+ /**
320
+ * Shows the right sidebar. Works only if there is anything to show.
321
+ */
322
+ private _showRightSidebar;
323
+ /**
324
+ * Handler for AI tabs `transitionend`; must be the same reference in `addEventListener` / `removeEventListener`.
325
+ */
326
+ private _aiTabsTransitionEndCallback;
289
327
  }