suneditor 3.0.0-beta.2 → 3.0.0-beta.20

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 (177) hide show
  1. package/CONTRIBUTING.md +186 -184
  2. package/LICENSE +21 -21
  3. package/README.md +157 -180
  4. package/dist/suneditor.min.css +1 -1
  5. package/dist/suneditor.min.js +1 -1
  6. package/package.json +126 -123
  7. package/src/assets/design/color.css +131 -121
  8. package/src/assets/design/index.css +3 -3
  9. package/src/assets/design/size.css +37 -35
  10. package/src/assets/design/typography.css +37 -37
  11. package/src/assets/icons/defaultIcons.js +247 -232
  12. package/src/assets/suneditor-contents.css +779 -778
  13. package/src/assets/suneditor.css +43 -35
  14. package/src/core/base/eventHandlers/handler_toolbar.js +135 -135
  15. package/src/core/base/eventHandlers/handler_ww_clipboard.js +56 -56
  16. package/src/core/base/eventHandlers/handler_ww_dragDrop.js +115 -113
  17. package/src/core/base/eventHandlers/handler_ww_key_input.js +1200 -1200
  18. package/src/core/base/eventHandlers/handler_ww_mouse.js +194 -194
  19. package/src/core/base/eventManager.js +1550 -1484
  20. package/src/core/base/history.js +355 -355
  21. package/src/core/class/char.js +163 -162
  22. package/src/core/class/component.js +856 -842
  23. package/src/core/class/format.js +3433 -3422
  24. package/src/core/class/html.js +1927 -1890
  25. package/src/core/class/menu.js +357 -346
  26. package/src/core/class/nodeTransform.js +424 -424
  27. package/src/core/class/offset.js +858 -891
  28. package/src/core/class/selection.js +710 -620
  29. package/src/core/class/shortcuts.js +98 -98
  30. package/src/core/class/toolbar.js +438 -430
  31. package/src/core/class/ui.js +424 -422
  32. package/src/core/class/viewer.js +750 -750
  33. package/src/core/editor.js +1810 -1708
  34. package/src/core/section/actives.js +268 -241
  35. package/src/core/section/constructor.js +1348 -1661
  36. package/src/core/section/context.js +102 -102
  37. package/src/core/section/documentType.js +582 -561
  38. package/src/core/section/options.js +367 -0
  39. package/src/core/util/instanceCheck.js +59 -0
  40. package/src/editorInjector/_classes.js +36 -36
  41. package/src/editorInjector/_core.js +92 -92
  42. package/src/editorInjector/index.js +75 -75
  43. package/src/events.js +634 -622
  44. package/src/helper/clipboard.js +59 -59
  45. package/src/helper/converter.js +586 -564
  46. package/src/helper/dom/domCheck.js +304 -304
  47. package/src/helper/dom/domQuery.js +677 -669
  48. package/src/helper/dom/domUtils.js +618 -557
  49. package/src/helper/dom/index.js +12 -12
  50. package/src/helper/env.js +249 -240
  51. package/src/helper/index.js +25 -25
  52. package/src/helper/keyCodeMap.js +183 -183
  53. package/src/helper/numbers.js +72 -72
  54. package/src/helper/unicode.js +47 -47
  55. package/src/langs/ckb.js +231 -231
  56. package/src/langs/cs.js +231 -231
  57. package/src/langs/da.js +231 -231
  58. package/src/langs/de.js +231 -231
  59. package/src/langs/en.js +230 -230
  60. package/src/langs/es.js +231 -231
  61. package/src/langs/fa.js +231 -231
  62. package/src/langs/fr.js +231 -231
  63. package/src/langs/he.js +231 -231
  64. package/src/langs/hu.js +230 -230
  65. package/src/langs/index.js +28 -28
  66. package/src/langs/it.js +231 -231
  67. package/src/langs/ja.js +230 -230
  68. package/src/langs/km.js +230 -230
  69. package/src/langs/ko.js +230 -230
  70. package/src/langs/lv.js +231 -231
  71. package/src/langs/nl.js +231 -231
  72. package/src/langs/pl.js +231 -231
  73. package/src/langs/pt_br.js +231 -231
  74. package/src/langs/ro.js +231 -231
  75. package/src/langs/ru.js +231 -231
  76. package/src/langs/se.js +231 -231
  77. package/src/langs/tr.js +231 -231
  78. package/src/langs/uk.js +231 -231
  79. package/src/langs/ur.js +231 -231
  80. package/src/langs/zh_cn.js +231 -231
  81. package/src/modules/ApiManager.js +191 -191
  82. package/src/modules/Browser.js +669 -667
  83. package/src/modules/ColorPicker.js +364 -362
  84. package/src/modules/Controller.js +474 -454
  85. package/src/modules/Figure.js +1620 -1617
  86. package/src/modules/FileManager.js +359 -359
  87. package/src/modules/HueSlider.js +577 -565
  88. package/src/modules/Modal.js +346 -346
  89. package/src/modules/ModalAnchorEditor.js +643 -643
  90. package/src/modules/SelectMenu.js +549 -549
  91. package/src/modules/_DragHandle.js +17 -17
  92. package/src/modules/index.js +14 -14
  93. package/src/plugins/browser/audioGallery.js +83 -83
  94. package/src/plugins/browser/fileBrowser.js +103 -103
  95. package/src/plugins/browser/fileGallery.js +83 -83
  96. package/src/plugins/browser/imageGallery.js +81 -81
  97. package/src/plugins/browser/videoGallery.js +103 -103
  98. package/src/plugins/command/blockquote.js +61 -60
  99. package/src/plugins/command/exportPDF.js +134 -134
  100. package/src/plugins/command/fileUpload.js +456 -456
  101. package/src/plugins/command/list_bulleted.js +149 -148
  102. package/src/plugins/command/list_numbered.js +152 -151
  103. package/src/plugins/dropdown/align.js +157 -155
  104. package/src/plugins/dropdown/backgroundColor.js +108 -104
  105. package/src/plugins/dropdown/font.js +141 -137
  106. package/src/plugins/dropdown/fontColor.js +109 -105
  107. package/src/plugins/dropdown/formatBlock.js +170 -178
  108. package/src/plugins/dropdown/hr.js +152 -152
  109. package/src/plugins/dropdown/layout.js +83 -83
  110. package/src/plugins/dropdown/lineHeight.js +131 -130
  111. package/src/plugins/dropdown/list.js +123 -122
  112. package/src/plugins/dropdown/paragraphStyle.js +138 -138
  113. package/src/plugins/dropdown/table.js +4110 -4000
  114. package/src/plugins/dropdown/template.js +83 -83
  115. package/src/plugins/dropdown/textStyle.js +149 -149
  116. package/src/plugins/field/mention.js +242 -242
  117. package/src/plugins/index.js +120 -120
  118. package/src/plugins/input/fontSize.js +414 -410
  119. package/src/plugins/input/pageNavigator.js +71 -70
  120. package/src/plugins/modal/audio.js +677 -677
  121. package/src/plugins/modal/drawing.js +537 -531
  122. package/src/plugins/modal/embed.js +886 -886
  123. package/src/plugins/modal/image.js +1377 -1376
  124. package/src/plugins/modal/link.js +248 -240
  125. package/src/plugins/modal/math.js +563 -563
  126. package/src/plugins/modal/video.js +1226 -1226
  127. package/src/plugins/popup/anchor.js +224 -222
  128. package/src/suneditor.js +114 -107
  129. package/src/themes/dark.css +132 -122
  130. package/src/typedef.js +132 -130
  131. package/types/assets/icons/defaultIcons.d.ts +8 -0
  132. package/types/core/base/eventManager.d.ts +29 -4
  133. package/types/core/class/char.d.ts +2 -1
  134. package/types/core/class/component.d.ts +1 -2
  135. package/types/core/class/format.d.ts +8 -1
  136. package/types/core/class/html.d.ts +8 -0
  137. package/types/core/class/menu.d.ts +8 -0
  138. package/types/core/class/offset.d.ts +24 -26
  139. package/types/core/class/selection.d.ts +2 -0
  140. package/types/core/class/toolbar.d.ts +6 -0
  141. package/types/core/class/ui.d.ts +1 -1
  142. package/types/core/editor.d.ts +34 -12
  143. package/types/core/section/constructor.d.ts +5 -638
  144. package/types/core/section/documentType.d.ts +12 -2
  145. package/types/core/section/options.d.ts +740 -0
  146. package/types/core/util/instanceCheck.d.ts +50 -0
  147. package/types/editorInjector/_core.d.ts +5 -5
  148. package/types/editorInjector/index.d.ts +2 -2
  149. package/types/events.d.ts +2 -0
  150. package/types/helper/converter.d.ts +9 -0
  151. package/types/helper/dom/domQuery.d.ts +5 -5
  152. package/types/helper/dom/domUtils.d.ts +8 -0
  153. package/types/helper/env.d.ts +6 -1
  154. package/types/helper/index.d.ts +4 -1
  155. package/types/index.d.ts +122 -120
  156. package/types/langs/_Lang.d.ts +194 -194
  157. package/types/modules/ColorPicker.d.ts +5 -1
  158. package/types/modules/Controller.d.ts +8 -4
  159. package/types/modules/Figure.d.ts +2 -1
  160. package/types/modules/HueSlider.d.ts +4 -1
  161. package/types/modules/SelectMenu.d.ts +1 -1
  162. package/types/plugins/command/blockquote.d.ts +1 -0
  163. package/types/plugins/command/list_bulleted.d.ts +1 -0
  164. package/types/plugins/command/list_numbered.d.ts +1 -0
  165. package/types/plugins/dropdown/align.d.ts +1 -0
  166. package/types/plugins/dropdown/backgroundColor.d.ts +1 -0
  167. package/types/plugins/dropdown/font.d.ts +1 -0
  168. package/types/plugins/dropdown/fontColor.d.ts +1 -0
  169. package/types/plugins/dropdown/formatBlock.d.ts +3 -2
  170. package/types/plugins/dropdown/lineHeight.d.ts +1 -0
  171. package/types/plugins/dropdown/list.d.ts +1 -0
  172. package/types/plugins/dropdown/table.d.ts +6 -0
  173. package/types/plugins/input/fontSize.d.ts +1 -0
  174. package/types/plugins/modal/drawing.d.ts +4 -0
  175. package/types/plugins/modal/link.d.ts +32 -15
  176. package/types/suneditor.d.ts +13 -9
  177. package/types/typedef.d.ts +8 -0
package/src/typedef.js CHANGED
@@ -1,130 +1,132 @@
1
- /**
2
- * @fileoverview Global Type Declarations for SunEditor Custom Types
3
- */
4
-
5
- // --------------------------------------------------------- [Node] ---------------------------------------------------------------------------------------------------
6
- /**
7
- * @typedef {Array<Node>|HTMLCollection|NodeList} __se__NodeCollection
8
- */
9
-
10
- // --------------------------------------------------------- [Editor] ---------------------------------------------------------------------------------------------------
11
- /**
12
- * @typedef {import('./core/editor').default} __se__EditorCore
13
- */
14
-
15
- /**
16
- * @typedef {import('./editorInjector').default} __se__EditorInjector
17
- */
18
-
19
- /**
20
- * @typedef {import('./editorInjector/_core').default} __se__CoreInjector
21
- */
22
-
23
- /**
24
- * @typedef {Object} __se__ComponentInfo
25
- * @property {HTMLElement} target - The target element associated with the component.
26
- * @property {string} pluginName - The name of the plugin related to the component.
27
- * @property {Object<string, *>} options - Options related to the component.
28
- * @property {HTMLElement} container - The main container element for the component.
29
- * @property {?HTMLElement} cover - The cover element, if applicable.
30
- * @property {?HTMLElement} inlineCover - The inline cover element, if applicable.
31
- * @property {?HTMLElement} caption - The caption element, if applicable.
32
- * @property {boolean} isFile - Whether the component is a file-related component.
33
- * @property {?HTMLElement} launcher - The element that triggered the component, if applicable.
34
- * @property {boolean} isInputType - Whether the component is an input component (e.g., table).
35
- */
36
-
37
- /**
38
- * @typedef {Object} __se__EditorStatus
39
- * @property {boolean} hasFocus Boolean value of whether the editor has focus
40
- * @property {number} tabSize Indent size of tab (4)
41
- * @property {number} indentSize Indent size (25)px
42
- * @property {number} codeIndentSize Indent size of Code view mode (2)
43
- * @property {Array<string>} currentNodes An element array of the current cursor's node structure
44
- * @property {Array<string>} currentNodesMap An element name array of the current cursor's node structure
45
- * @property {boolean} onSelected Boolean value of whether component is selected
46
- * @property {number} rootKey Current root key
47
- * @property {Range} _range Current range object
48
- * @property {boolean} _onMousedown Mouse down event status
49
- */
50
-
51
- // --------------------------------------------------------- [Event] ---------------------------------------------------------------------------------------------------
52
- /**
53
- * @typedef {Object} __se__EventInfo
54
- * @property {*} target Target element
55
- * @property {string} type Event type
56
- * @property {(...args: *) => *} listener Event listener
57
- * @property {boolean|AddEventListenerOptions=} useCapture Event useCapture option
58
- */
59
-
60
- /**
61
- * @typedef {Object} __se__GlobalEventInfo
62
- * @property {string} type Event type
63
- * @property {(...args: *) => *} listener Event listener
64
- * @property {boolean|AddEventListenerOptions=} useCapture Use event capture
65
- */
66
-
67
- // --------------------------------------------------------- [Plugin Event] ---------------------------------------------------------------------------------------------------
68
- /**
69
- * @typedef {Object} __se__PluginMouseEventInfo
70
- * @property {__se__FrameContext} frameContext Frame context
71
- * @property {MouseEvent} event Event object
72
- */
73
-
74
- /**
75
- * @typedef {Object} __se__PluginKeyEventInfo
76
- * @property {__se__FrameContext} frameContext Frame context
77
- * @property {KeyboardEvent} event Event object
78
- * @property {Range} range range object
79
- * @property {HTMLElement} line Current line element
80
- */
81
-
82
- /**
83
- * @typedef {Object} __se__PluginToolbarInputChangeEventInfo
84
- * @property {HTMLElement} target Input element
85
- * @property {Event} event Event object
86
- * @property {string} value Input value
87
- */
88
-
89
- /**
90
- * @typedef {Object} __se__PluginShortcutInfo Information of the "shortcut" plugin
91
- * @property {Range} range - Range object
92
- * @property {HTMLElement} line - The line element of the current range
93
- * @property {import('./core/class/shortcuts').ShortcutInfo} info - Information of the shortcut
94
- * @property {KeyboardEvent} event - Key event object
95
- * @property {string} keyCode - KeyBoardEvent.code
96
- * @property {__se__EditorCore} editor - The root editor instance
97
- */
98
-
99
- /**
100
- * @typedef {Object} __se__PluginPasteParams
101
- * @property {__se__FrameContext} frameContext Frame context
102
- * @property {ClipboardEvent} event Clipboard event object
103
- * @property {string} data Format cleaned paste data (HTML string)
104
- * @property {Document} doc DomParser data (new DOMParser().parseFromString(data, 'text/html');)
105
- */
106
-
107
- /**
108
- * @typedef {Object} __se__PluginCopyComponentParams
109
- * @property {ClipboardEvent} event Clipboard event object
110
- * @property {HTMLElement} cloneContainer Cloned component container
111
- * @property {__se__ComponentInfo} info Component information
112
- */
113
-
114
- // --------------------------------------------------------- [Context] ---------------------------------------------------------------------------------------------------
115
- /**
116
- * @typedef {Map<string, *>} __se__FrameOptions
117
- */
118
-
119
- /**
120
- * @typedef {Map<string, *>} __se__FrameContext
121
- */
122
-
123
- /**
124
- * @typedef {Map<string, *>} __se__Context
125
- */
126
-
127
- // --------------------------------------------------------- [core.class] ---------------------------------------------------------------------------------------------------
128
- /**
129
- * @typedef {import('./core/class/offset').OffsetGlobalInfo} __se__Class_OffsetGlobalInfo
130
- */
1
+ /**
2
+ * @fileoverview Global Type Declarations for SunEditor Custom Types
3
+ */
4
+
5
+ // --------------------------------------------------------- [Node] ---------------------------------------------------------------------------------------------------
6
+ /**
7
+ * @typedef {Array<Node>|HTMLCollection|NodeList} __se__NodeCollection
8
+ */
9
+
10
+ // --------------------------------------------------------- [Editor] ---------------------------------------------------------------------------------------------------
11
+ /**
12
+ * @typedef {import('./core/editor').default} __se__EditorCore
13
+ */
14
+
15
+ /**
16
+ * @typedef {import('./editorInjector').default} __se__EditorInjector
17
+ */
18
+
19
+ /**
20
+ * @typedef {import('./editorInjector/_core').default} __se__CoreInjector
21
+ */
22
+
23
+ /**
24
+ * @typedef {Object} __se__ComponentInfo
25
+ * @property {HTMLElement} target - The target element associated with the component.
26
+ * @property {string} pluginName - The name of the plugin related to the component.
27
+ * @property {Object<string, *>} options - Options related to the component.
28
+ * @property {HTMLElement} container - The main container element for the component.
29
+ * @property {?HTMLElement} cover - The cover element, if applicable.
30
+ * @property {?HTMLElement} inlineCover - The inline cover element, if applicable.
31
+ * @property {?HTMLElement} caption - The caption element, if applicable.
32
+ * @property {boolean} isFile - Whether the component is a file-related component.
33
+ * @property {?HTMLElement} launcher - The element that triggered the component, if applicable.
34
+ * @property {boolean} isInputType - Whether the component is an input component (e.g., table).
35
+ */
36
+
37
+ /**
38
+ * @typedef {Object} __se__EditorStatus
39
+ * @property {boolean} hasFocus Boolean value of whether the editor has focus
40
+ * @property {number} tabSize Indent size of tab (4)
41
+ * @property {number} indentSize Indent size (25)px
42
+ * @property {number} codeIndentSize Indent size of Code view mode (2)
43
+ * @property {Array<string>} currentNodes An element array of the current cursor's node structure
44
+ * @property {Array<string>} currentNodesMap An element name array of the current cursor's node structure
45
+ * @property {number} currentViewportHeight Current visual viewport height size
46
+ * @property {number} initViewportHeight Height of the initial visual viewport height size
47
+ * @property {boolean} onSelected Boolean value of whether component is selected
48
+ * @property {number} rootKey Current root key
49
+ * @property {Range} _range Current range object
50
+ * @property {boolean} _onMousedown Mouse down event status
51
+ */
52
+
53
+ // --------------------------------------------------------- [Event] ---------------------------------------------------------------------------------------------------
54
+ /**
55
+ * @typedef {Object} __se__EventInfo
56
+ * @property {*} target Target element
57
+ * @property {string} type Event type
58
+ * @property {(...args: *) => *} listener Event listener
59
+ * @property {boolean|AddEventListenerOptions=} useCapture Event useCapture option
60
+ */
61
+
62
+ /**
63
+ * @typedef {Object} __se__GlobalEventInfo
64
+ * @property {string} type Event type
65
+ * @property {(...args: *) => *} listener Event listener
66
+ * @property {boolean|AddEventListenerOptions=} useCapture Use event capture
67
+ */
68
+
69
+ // --------------------------------------------------------- [Plugin Event] ---------------------------------------------------------------------------------------------------
70
+ /**
71
+ * @typedef {Object} __se__PluginMouseEventInfo
72
+ * @property {__se__FrameContext} frameContext Frame context
73
+ * @property {MouseEvent} event Event object
74
+ */
75
+
76
+ /**
77
+ * @typedef {Object} __se__PluginKeyEventInfo
78
+ * @property {__se__FrameContext} frameContext Frame context
79
+ * @property {KeyboardEvent} event Event object
80
+ * @property {Range} range range object
81
+ * @property {HTMLElement} line Current line element
82
+ */
83
+
84
+ /**
85
+ * @typedef {Object} __se__PluginToolbarInputChangeEventInfo
86
+ * @property {HTMLElement} target Input element
87
+ * @property {Event} event Event object
88
+ * @property {string} value Input value
89
+ */
90
+
91
+ /**
92
+ * @typedef {Object} __se__PluginShortcutInfo Information of the "shortcut" plugin
93
+ * @property {Range} range - Range object
94
+ * @property {HTMLElement} line - The line element of the current range
95
+ * @property {import('./core/class/shortcuts').ShortcutInfo} info - Information of the shortcut
96
+ * @property {KeyboardEvent} event - Key event object
97
+ * @property {string} keyCode - KeyBoardEvent.code
98
+ * @property {__se__EditorCore} editor - The root editor instance
99
+ */
100
+
101
+ /**
102
+ * @typedef {Object} __se__PluginPasteParams
103
+ * @property {__se__FrameContext} frameContext Frame context
104
+ * @property {ClipboardEvent} event Clipboard event object
105
+ * @property {string} data Format cleaned paste data (HTML string)
106
+ * @property {Document} doc DomParser data (new DOMParser().parseFromString(data, 'text/html');)
107
+ */
108
+
109
+ /**
110
+ * @typedef {Object} __se__PluginCopyComponentParams
111
+ * @property {ClipboardEvent} event Clipboard event object
112
+ * @property {HTMLElement} cloneContainer Cloned component container
113
+ * @property {__se__ComponentInfo} info Component information
114
+ */
115
+
116
+ // --------------------------------------------------------- [Context] ---------------------------------------------------------------------------------------------------
117
+ /**
118
+ * @typedef {Map<string, *>} __se__FrameOptions
119
+ */
120
+
121
+ /**
122
+ * @typedef {Map<string, *>} __se__FrameContext
123
+ */
124
+
125
+ /**
126
+ * @typedef {Map<string, *>} __se__Context
127
+ */
128
+
129
+ // --------------------------------------------------------- [core.class] ---------------------------------------------------------------------------------------------------
130
+ /**
131
+ * @typedef {import('./core/class/offset').OffsetGlobalInfo} __se__Class_OffsetGlobalInfo
132
+ */
@@ -41,6 +41,7 @@ declare namespace _default {
41
41
  export let background_color: string;
42
42
  export let list_bulleted: string;
43
43
  export let list_numbered: string;
44
+ export let list_checked: string;
44
45
  export let table: string;
45
46
  export let table_header: string;
46
47
  export let table_properties: string;
@@ -134,6 +135,13 @@ declare namespace _default {
134
135
  export let side_menu_item: string;
135
136
  export let side_menu_folder_plus: string;
136
137
  export let alert_outline: string;
138
+ export let more_media: string;
139
+ export let more_gallery: string;
140
+ export let more_folder: string;
141
+ export let more_list: string;
142
+ export let more_file: string;
143
+ export let more_view: string;
144
+ export let more_page: string;
137
145
  export let more_text: string;
138
146
  export let more_paragraph: string;
139
147
  export let more_plus: string;
@@ -28,6 +28,11 @@ declare class EventManager {
28
28
  * @type {boolean}
29
29
  */
30
30
  isComposing: boolean;
31
+ /**
32
+ * @description An array of parent containers that can be scrolled (in descending order)
33
+ * @type {Array<Element>}
34
+ */
35
+ scrollparents: Array<Element>;
31
36
  /** @type {Array<*>} */
32
37
  _events: Array<any>;
33
38
  /** @type {RegExp} */
@@ -54,8 +59,6 @@ declare class EventManager {
54
59
  __close_move: __se__GlobalEventInfo | null;
55
60
  /** @type {__se__GlobalEventInfo|null} */
56
61
  __geckoActiveEvent: __se__GlobalEventInfo | null;
57
- /** @type {Array<Element>} */
58
- __scrollparents: Array<Element>;
59
62
  /** @type {Array<Node>} */
60
63
  __cacheStyleNodes: Array<Node>;
61
64
  /** @type {__se__GlobalEventInfo|null} */
@@ -283,9 +286,9 @@ declare class EventManager {
283
286
  * @this {EventManagerThis}
284
287
  * @description Adjusts the position of the editor's toolbar, controllers, and other floating elements based on scroll position.
285
288
  * - Ensures UI elements maintain their intended relative positions when scrolling.
286
- * @param {Element} eventWysiwyg The wysiwyg event object containing scroll data
289
+ * @param {*} eventWysiwyg The wysiwyg event object containing scroll data (Window or element)
287
290
  */
288
- _moveContainer(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, eventWysiwyg: Element): void;
291
+ _moveContainer(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, eventWysiwyg: any): void;
289
292
  /**
290
293
  * @private
291
294
  * @this {EventManagerThis}
@@ -382,4 +385,26 @@ declare class EventManager {
382
385
  * @param {*} range Range object
383
386
  */
384
387
  __enterScrollTo(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, range: any): void;
388
+ /**
389
+ * @private
390
+ * @description Focus Event Postprocessing
391
+ * @this {EventManagerThis}
392
+ * @param {__se__FrameContext} frameContext - frame context object
393
+ * @param {Event} event - Event object
394
+ */
395
+ __postFocusEvent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, frameContext: __se__FrameContext, event: Event): void;
396
+ /**
397
+ * @private
398
+ * @description Blur Event Postprocessing
399
+ * @this {EventManagerThis}
400
+ * @param {__se__FrameContext} frameContext - frame context object
401
+ * @param {Event} event - Event object
402
+ */
403
+ __postBlurEvent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, frameContext: __se__FrameContext, event: Event): void;
404
+ /**
405
+ * @private
406
+ * @description Records the current viewport size.
407
+ * @this {EventManagerThis}
408
+ */
409
+ __setViewportSize(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
385
410
  }
@@ -46,8 +46,9 @@ declare class Char {
46
46
  /**
47
47
  * @this {CharThis}
48
48
  * @description Set the char count to charCounter element textContent.
49
+ * @param {?__se__FrameContext=} fc Frame context
49
50
  */
50
- display(this: Omit<Char & Partial<import('../../editorInjector').default>, 'char'>): void;
51
+ display(this: Omit<Char & Partial<import('../../editorInjector').default>, 'char'>, fc?: (__se__FrameContext | null) | undefined): void;
51
52
  /**
52
53
  * @this {CharThis}
53
54
  * @description Returns false if char count is greater than "frameOptions.get('charCounter_max')" when "inputText" is added to the current editor.
@@ -63,10 +63,9 @@ declare class Component {
63
63
  _bindClose_keydown: __se__GlobalEventInfo | void;
64
64
  /** @type {__se__GlobalEventInfo|void} */
65
65
  _bindClose_mousedown: __se__GlobalEventInfo | void;
66
- /** @type {__se__GlobalEventInfo|void} */
67
- _bindClose_touchstart: __se__GlobalEventInfo | void;
68
66
  /** @type {boolean} */
69
67
  __selectionSelected: boolean;
68
+ __prevent: boolean;
70
69
  /**
71
70
  * @this {ComponentThis}
72
71
  * @description Inserts an element and returns it. (Used for elements: table, hr, image, video)
@@ -49,7 +49,7 @@ declare class Format {
49
49
  _formatClosureBlockCheck: any;
50
50
  _formatClosureBrLineCheck: any;
51
51
  _textStyleTagsCheck: RegExp;
52
- _brLineBreak: any;
52
+ _brLineBreak: boolean;
53
53
  /**
54
54
  * @this {FormatThis}
55
55
  * @description Replace the line tag of the current selection.
@@ -613,4 +613,11 @@ declare class Format {
613
613
  * @param {Array|null} styleArray Refer style array
614
614
  */
615
615
  _sn_resetCommonListCell(this: Omit<Format & Partial<import('../../editorInjector').default>, 'format'>, el: Node, styleArray: any[] | null): boolean;
616
+ /**
617
+ * @private
618
+ * @this {FormatThis}
619
+ * @description Reset the line break format.
620
+ * @param {"line"|"br"} breakFormat options.get('defaultLineBreakFormat')
621
+ */
622
+ __resetBrLineBreak(this: Omit<Format & Partial<import('../../editorInjector').default>, 'format'>, breakFormat: 'line' | 'br'): void;
616
623
  }
@@ -419,4 +419,12 @@ declare class HTML {
419
419
  * @returns {Node} The cleaned node with redundant styles removed.
420
420
  */
421
421
  _dupleCheck(this: Omit<HTML & Partial<import('../../editorInjector').default>, 'html'>, oNode: Node, parentNode: Node): Node;
422
+ /**
423
+ * @private
424
+ * @this {HTMLThis}
425
+ * @description Reset autoStyleify options.
426
+ * @param {Array.<string>} autoStyleify Styles applied automatically on text input.
427
+ * - ex ["bold", "underline", "italic", "strike"]
428
+ */
429
+ __resetAutoStyleify(this: Omit<HTML & Partial<import('../../editorInjector').default>, 'html'>, autoStyleify: Array<string>): void;
422
430
  }
@@ -96,6 +96,14 @@ declare class Menu {
96
96
  * @param {HTMLElement} menu Menu element
97
97
  */
98
98
  _setMenuPosition(this: Omit<Menu & Partial<import('../../editorInjector').default>, 'menu'>, element: Node, menu: HTMLElement): void;
99
+ /**
100
+ * @private
101
+ * @this {MenuThis}
102
+ * @description Reset the menu position.
103
+ * @param {Node} element Button element
104
+ * @param {HTMLElement} menu Menu element
105
+ */
106
+ _resetMenuPosition(this: Omit<Menu & Partial<import('../../editorInjector').default>, 'menu'>, element: Node, menu: HTMLElement): void;
99
107
  /**
100
108
  * @private
101
109
  * @this {MenuThis}
@@ -75,21 +75,21 @@ export type OffsetGlobalInfo = {
75
75
  */
76
76
  left: number;
77
77
  /**
78
- * - The total width of the element, including its content, padding, and border.
78
+ * - The top position within the current viewport, without taking scrolling into account.
79
79
  */
80
- width: number;
80
+ fixedTop: number;
81
81
  /**
82
- * - The total height of the element, including its content, padding, and border.
82
+ * - The left position within the current viewport, without taking scrolling into account.
83
83
  */
84
- height: number;
84
+ fixedLeft: number;
85
85
  /**
86
- * - The amount of vertical scrolling applied to the element.
86
+ * - The total width of the element, including its content, padding, and border.
87
87
  */
88
- scrollTop: number;
88
+ width: number;
89
89
  /**
90
- * - The amount of horizontal scrolling applied to the element.
90
+ * - The total height of the element, including its content, padding, and border.
91
91
  */
92
- scrollLeft: number;
92
+ height: number;
93
93
  };
94
94
  export type OffsetGlobalScrollInfo = {
95
95
  /**
@@ -205,10 +205,10 @@ export type OffsetWWScrollInfo = {
205
205
  * @typedef {Object} OffsetGlobalInfo
206
206
  * @property {number} top - The top position of the element relative to the entire document.
207
207
  * @property {number} left - The left position of the element relative to the entire document.
208
+ * @property {number} fixedTop - The top position within the current viewport, without taking scrolling into account.
209
+ * @property {number} fixedLeft - The left position within the current viewport, without taking scrolling into account.
208
210
  * @property {number} width - The total width of the element, including its content, padding, and border.
209
211
  * @property {number} height - The total height of the element, including its content, padding, and border.
210
- * @property {number} scrollTop - The amount of vertical scrolling applied to the element.
211
- * @property {number} scrollLeft - The amount of horizontal scrolling applied to the element.
212
212
  */
213
213
  /**
214
214
  * @typedef {Object} OffsetGlobalScrollInfo
@@ -274,10 +274,10 @@ declare class Offset {
274
274
  * @typedef {Object} OffsetGlobalInfo
275
275
  * @property {number} top - The top position of the element relative to the entire document.
276
276
  * @property {number} left - The left position of the element relative to the entire document.
277
+ * @property {number} fixedTop - The top position within the current viewport, without taking scrolling into account.
278
+ * @property {number} fixedLeft - The left position within the current viewport, without taking scrolling into account.
277
279
  * @property {number} width - The total width of the element, including its content, padding, and border.
278
280
  * @property {number} height - The total height of the element, including its content, padding, and border.
279
- * @property {number} scrollTop - The amount of vertical scrolling applied to the element.
280
- * @property {number} scrollLeft - The amount of horizontal scrolling applied to the element.
281
281
  */
282
282
  /**
283
283
  * @typedef {Object} OffsetGlobalScrollInfo
@@ -312,10 +312,6 @@ declare class Offset {
312
312
  * @param {__se__EditorCore} editor - The root editor instance
313
313
  */
314
314
  constructor(editor: __se__EditorCore);
315
- _scrollEvent: any;
316
- _elTop: number;
317
- _scrollY: number;
318
- _isFixed: boolean;
319
315
  /**
320
316
  * @this {OffsetThis}
321
317
  * @description Gets the position just outside the argument's internal editor (wysiwygFrame).
@@ -333,6 +329,7 @@ declare class Offset {
333
329
  /**
334
330
  * @this {OffsetThis}
335
331
  * @description Returns the position of the argument relative to the global document.
332
+ * This is a refactored version using getBoundingClientRect for better performance and accuracy.
336
333
  * @param {?Node=} node Target element.
337
334
  * @returns {OffsetGlobalInfo} Global position and scroll values.
338
335
  */
@@ -357,9 +354,8 @@ declare class Offset {
357
354
  * @param {HTMLElement} e_container Element's root container
358
355
  * @param {HTMLElement} target Target element to position against
359
356
  * @param {HTMLElement} t_container Target's root container
360
- * @param {boolean} _reload Whether to reload position
361
357
  */
362
- setRelPosition(this: Omit<Offset & Partial<import('../../editorInjector').default>, 'offset'>, element: HTMLElement, e_container: HTMLElement, target: HTMLElement, t_container: HTMLElement, _reload: boolean): void;
358
+ setRelPosition(this: Omit<Offset & Partial<import('../../editorInjector').default>, 'offset'>, element: HTMLElement, e_container: HTMLElement, target: HTMLElement, t_container: HTMLElement): void;
363
359
  /**
364
360
  * @this {OffsetThis}
365
361
  * @description Sets the absolute position of an element
@@ -370,6 +366,7 @@ declare class Offset {
370
366
  * @param {{left:number, top:number}} [params.addOffset={left:0, top:0}] Additional offset
371
367
  * @param {"bottom"|"top"} [params.position="bottom"] Position ('bottom'|'top')
372
368
  * @param {*} params.inst Instance object of caller
369
+ * @param {HTMLElement} [params.sibling] The sibling controller element
373
370
  * @returns {{position: "top" | "bottom"} | undefined} Success -> {position: current position}
374
371
  */
375
372
  setAbsPosition(
@@ -384,6 +381,7 @@ declare class Offset {
384
381
  };
385
382
  position?: 'bottom' | 'top';
386
383
  inst: any;
384
+ sibling?: HTMLElement;
387
385
  }
388
386
  ):
389
387
  | {
@@ -459,7 +457,12 @@ declare class Offset {
459
457
  * @param {RectsInfo} targetRect Target rect object
460
458
  * @param {boolean} isTargetAbs Is target absolute position
461
459
  * @param {OffsetWWScrollInfo} wwScroll WYSIWYG scroll info
462
- * @returns {{rmt:number, rmb:number, rt:number}} Margin values (rmt: top margin, rmb: bottom margin, rt: Toolbar height offset adjustment)
460
+ * @returns {{rmt:number, rmb:number, rt:number, tMargin:number, bMargin:number}} Margin values
461
+ * - rmt: top margin to frame
462
+ * - rmb: bottom margin to frame
463
+ * - rt: Toolbar height offset adjustment
464
+ * - tMargin: top margin
465
+ * - bMargin: bottom margin
463
466
  */
464
467
  _getVMargin(
465
468
  this: Omit<Offset & Partial<import('../../editorInjector').default>, 'offset'>,
@@ -477,6 +480,8 @@ declare class Offset {
477
480
  rmt: number;
478
481
  rmb: number;
479
482
  rt: number;
483
+ tMargin: number;
484
+ bMargin: number;
480
485
  };
481
486
  /**
482
487
  * @private
@@ -512,11 +517,4 @@ declare class Offset {
512
517
  bottom: number;
513
518
  rects: RectsInfo;
514
519
  };
515
- /**
516
- * @private
517
- * @this {OffsetThis}
518
- * @description Removes the global scroll event listener from the editor.
519
- * - Resets related scroll tracking properties.
520
- */
521
- __removeGlobalEvent(this: Omit<Offset & Partial<import('../../editorInjector').default>, 'offset'>): void;
522
520
  }
@@ -33,6 +33,8 @@ declare class Selection_ {
33
33
  /** @type {HTMLElement|Text} */
34
34
  selectionNode: HTMLElement | Text;
35
35
  __iframeFocus: boolean;
36
+ __hasScrollParents: boolean;
37
+ _scrollMargin: number;
36
38
  /**
37
39
  * @this {SelectionThis}
38
40
  * @description Get window selection obejct
@@ -120,6 +120,12 @@ declare class Toolbar {
120
120
  * @param {Array} buttonList Button list
121
121
  */
122
122
  setButtons(this: Omit<Toolbar & Partial<import('../../editorInjector').default>, 'toolbar' | 'subToolbar'>, buttonList: any[]): void;
123
+ /**
124
+ * @private
125
+ * @this {ToolbarThis}
126
+ * @description Reset the common buttons info.
127
+ */
128
+ _resetButtonInfo(this: Omit<Toolbar & Partial<import('../../editorInjector').default>, 'toolbar' | 'subToolbar'>): void;
123
129
  /**
124
130
  * @private
125
131
  * @this {ToolbarThis}
@@ -38,7 +38,7 @@ declare class UI {
38
38
  _toastToggle: number;
39
39
  /**
40
40
  * @this {UIThis}
41
- * @description Set "options.get('editorStyle')" style.
41
+ * @description set editor frame styles.
42
42
  * - Define the style of the edit area
43
43
  * - It can also be defined with the "setOptions" method, but the "setEditorStyle" method does not render the editor again.
44
44
  * @param {string} style Style string