suneditor 3.1.4 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/dist/suneditor-contents.min.css +1 -1
  2. package/dist/suneditor.min.css +28 -1
  3. package/dist/suneditor.min.js +1 -1
  4. package/package.json +2 -1
  5. package/src/assets/design/color.css +12 -0
  6. package/src/assets/design/size.css +9 -2
  7. package/src/assets/icons/defaultIcons.js +96 -47
  8. package/src/assets/suneditor-contents.css +3 -2
  9. package/src/assets/suneditor.css +481 -31
  10. package/src/core/config/contextProvider.js +2 -1
  11. package/src/core/config/eventManager.js +41 -2
  12. package/src/core/config/optionProvider.js +23 -2
  13. package/src/core/editor.js +32 -14
  14. package/src/core/event/actions/index.js +76 -9
  15. package/src/core/event/effects/common.registry.js +2 -1
  16. package/src/core/event/effects/keydown.registry.js +169 -33
  17. package/src/core/event/effects/ruleHelpers.js +20 -6
  18. package/src/core/event/eventOrchestrator.js +162 -30
  19. package/src/core/event/handlers/handler_toolbar.js +4 -2
  20. package/src/core/event/handlers/handler_ww_dragDrop.js +10 -0
  21. package/src/core/event/handlers/handler_ww_input.js +84 -2
  22. package/src/core/event/handlers/handler_ww_key.js +82 -21
  23. package/src/core/event/handlers/handler_ww_mouse.js +45 -8
  24. package/src/core/event/ports.js +27 -13
  25. package/src/core/event/reducers/keydown.reducer.js +33 -5
  26. package/src/core/event/rules/keydown.rule.arrow.js +12 -2
  27. package/src/core/event/rules/keydown.rule.backspace.js +110 -15
  28. package/src/core/event/rules/keydown.rule.delete.js +62 -7
  29. package/src/core/event/rules/keydown.rule.enter.js +62 -31
  30. package/src/core/event/support/defaultLineManager.js +9 -2
  31. package/src/core/event/support/selectionState.js +13 -3
  32. package/src/core/kernel/coreKernel.js +1 -0
  33. package/src/core/logic/dom/char.js +13 -3
  34. package/src/core/logic/dom/format.js +171 -39
  35. package/src/core/logic/dom/html.js +350 -72
  36. package/src/core/logic/dom/inline.js +229 -34
  37. package/src/core/logic/dom/listFormat.js +111 -20
  38. package/src/core/logic/dom/nodeTransform.js +36 -11
  39. package/src/core/logic/dom/offset.js +116 -31
  40. package/src/core/logic/dom/selection.js +147 -29
  41. package/src/core/logic/panel/blockHandle.js +785 -0
  42. package/src/core/logic/panel/blockResolver.js +278 -0
  43. package/src/core/logic/panel/finder.js +16 -6
  44. package/src/core/logic/panel/menu.js +119 -18
  45. package/src/core/logic/panel/toolbar.js +75 -19
  46. package/src/core/logic/panel/viewer.js +76 -20
  47. package/src/core/logic/shell/_commandExecutor.js +44 -9
  48. package/src/core/logic/shell/commandDispatcher.js +46 -4
  49. package/src/core/logic/shell/component.js +102 -25
  50. package/src/core/logic/shell/focusManager.js +13 -3
  51. package/src/core/logic/shell/history.js +21 -6
  52. package/src/core/logic/shell/pluginManager.js +21 -13
  53. package/src/core/logic/shell/shortcuts.js +9 -1
  54. package/src/core/logic/shell/ui.js +139 -37
  55. package/src/core/schema/frameContext.js +34 -3
  56. package/src/core/schema/options.js +46 -4
  57. package/src/core/section/constructor.js +537 -106
  58. package/src/core/section/documentType.js +35 -6
  59. package/src/helper/converter.js +24 -7
  60. package/src/helper/dom/domCheck.js +25 -5
  61. package/src/helper/dom/domQuery.js +2 -1
  62. package/src/helper/dom/domUtils.js +17 -4
  63. package/src/helper/env.js +11 -2
  64. package/src/helper/keyCodeMap.js +6 -2
  65. package/src/helper/markdown.js +24 -5
  66. package/src/helper/msOffice.js +9 -2
  67. package/src/interfaces/plugins.js +1 -1
  68. package/src/langs/ckb.js +0 -1
  69. package/src/langs/cs.js +0 -1
  70. package/src/langs/da.js +0 -1
  71. package/src/langs/de.js +0 -1
  72. package/src/langs/en.js +0 -1
  73. package/src/langs/es.js +0 -1
  74. package/src/langs/fa.js +0 -1
  75. package/src/langs/fr.js +0 -1
  76. package/src/langs/he.js +0 -1
  77. package/src/langs/hu.js +0 -1
  78. package/src/langs/index.js +27 -1
  79. package/src/langs/it.js +0 -1
  80. package/src/langs/ja.js +0 -1
  81. package/src/langs/km.js +0 -1
  82. package/src/langs/ko.js +0 -1
  83. package/src/langs/lv.js +0 -1
  84. package/src/langs/nl.js +0 -1
  85. package/src/langs/pl.js +0 -1
  86. package/src/langs/pt_br.js +0 -1
  87. package/src/langs/ro.js +0 -1
  88. package/src/langs/ru.js +0 -1
  89. package/src/langs/se.js +0 -1
  90. package/src/langs/tr.js +0 -1
  91. package/src/langs/uk.js +0 -1
  92. package/src/langs/ur.js +0 -1
  93. package/src/langs/zh_cn.js +0 -1
  94. package/src/modules/contract/Browser.js +58 -14
  95. package/src/modules/contract/ColorPicker.js +12 -4
  96. package/src/modules/contract/Controller.js +37 -7
  97. package/src/modules/contract/Figure.js +156 -36
  98. package/src/modules/contract/HueSlider.js +27 -4
  99. package/src/modules/contract/Modal.js +50 -10
  100. package/src/modules/manager/FileManager.js +50 -8
  101. package/src/modules/ui/CommandMenu.js +597 -0
  102. package/src/modules/ui/ModalAnchorEditor.js +33 -6
  103. package/src/modules/ui/SelectMenu.js +481 -36
  104. package/src/modules/ui/index.js +1 -0
  105. package/src/plugins/browser/audioGallery.js +2 -1
  106. package/src/plugins/browser/fileBrowser.js +9 -2
  107. package/src/plugins/browser/fileGallery.js +2 -1
  108. package/src/plugins/browser/imageGallery.js +18 -3
  109. package/src/plugins/browser/videoGallery.js +13 -4
  110. package/src/plugins/command/blockquote.js +6 -1
  111. package/src/plugins/command/codeBlock.js +43 -5
  112. package/src/plugins/command/exportPDF.js +20 -4
  113. package/src/plugins/command/fileUpload.js +46 -11
  114. package/src/plugins/command/list_bulleted.js +6 -1
  115. package/src/plugins/command/list_numbered.js +6 -1
  116. package/src/plugins/dropdown/align.js +21 -33
  117. package/src/plugins/dropdown/backgroundColor.js +10 -2
  118. package/src/plugins/dropdown/blockStyle.js +17 -22
  119. package/src/plugins/dropdown/font.js +34 -34
  120. package/src/plugins/dropdown/hr.js +15 -43
  121. package/src/plugins/dropdown/layout.js +10 -27
  122. package/src/plugins/dropdown/lineHeight.js +10 -33
  123. package/src/plugins/dropdown/list.js +19 -25
  124. package/src/plugins/dropdown/paragraphStyle.js +16 -24
  125. package/src/plugins/dropdown/table/index.js +72 -17
  126. package/src/plugins/dropdown/table/render/table.html.js +3 -1
  127. package/src/plugins/dropdown/table/services/table.cell.js +33 -7
  128. package/src/plugins/dropdown/table/services/table.clipboard.js +5 -1
  129. package/src/plugins/dropdown/table/services/table.grid.js +40 -9
  130. package/src/plugins/dropdown/table/services/table.resize.js +55 -11
  131. package/src/plugins/dropdown/table/services/table.selection.js +27 -7
  132. package/src/plugins/dropdown/table/services/table.style.js +120 -20
  133. package/src/plugins/dropdown/template.js +13 -29
  134. package/src/plugins/dropdown/textStyle.js +22 -35
  135. package/src/plugins/field/autocomplete.js +8 -4
  136. package/src/plugins/field/slashCommand.js +297 -0
  137. package/src/plugins/index.js +3 -0
  138. package/src/plugins/input/fontSize.js +37 -8
  139. package/src/plugins/input/pageNavigator.js +7 -1
  140. package/src/plugins/modal/audio.js +71 -17
  141. package/src/plugins/modal/drawing.js +41 -11
  142. package/src/plugins/modal/embed.js +92 -22
  143. package/src/plugins/modal/image/index.js +114 -28
  144. package/src/plugins/modal/image/services/image.size.js +9 -2
  145. package/src/plugins/modal/image/services/image.upload.js +38 -4
  146. package/src/plugins/modal/link.js +9 -2
  147. package/src/plugins/modal/math.js +10 -2
  148. package/src/plugins/modal/video/index.js +112 -26
  149. package/src/plugins/modal/video/render/video.html.js +4 -1
  150. package/src/plugins/modal/video/services/video.size.js +15 -4
  151. package/src/plugins/modal/video/services/video.upload.js +10 -2
  152. package/src/plugins/popup/anchor.js +14 -2
  153. package/src/suneditor.js +8 -2
  154. package/src/themes/cobalt.css +12 -0
  155. package/src/themes/cream.css +12 -0
  156. package/src/themes/dark.css +12 -0
  157. package/src/themes/midnight.css +12 -0
  158. package/src/typedef.js +32 -21
  159. package/types/assets/icons/defaultIcons.d.ts +1 -0
  160. package/types/core/config/contextProvider.d.ts +7 -1
  161. package/types/core/config/eventManager.d.ts +37 -4
  162. package/types/core/config/optionProvider.d.ts +5 -1
  163. package/types/core/event/actions/index.d.ts +44 -6
  164. package/types/core/event/effects/keydown.registry.d.ts +37 -7
  165. package/types/core/event/effects/ruleHelpers.d.ts +6 -1
  166. package/types/core/event/eventOrchestrator.d.ts +13 -3
  167. package/types/core/event/handlers/handler_ww_clipboard.d.ts +15 -3
  168. package/types/core/event/handlers/handler_ww_dragDrop.d.ts +14 -2
  169. package/types/core/event/handlers/handler_ww_input.d.ts +10 -2
  170. package/types/core/event/handlers/handler_ww_key.d.ts +10 -2
  171. package/types/core/event/handlers/handler_ww_mouse.d.ts +25 -5
  172. package/types/core/event/ports.d.ts +11 -4
  173. package/types/core/event/reducers/keydown.reducer.d.ts +12 -3
  174. package/types/core/event/rules/keydown.rule.backspace.d.ts +6 -1
  175. package/types/core/kernel/store.d.ts +4 -1
  176. package/types/core/logic/dom/format.d.ts +32 -14
  177. package/types/core/logic/dom/html.d.ts +11 -3
  178. package/types/core/logic/dom/nodeTransform.d.ts +6 -6
  179. package/types/core/logic/panel/blockHandle.d.ts +64 -0
  180. package/types/core/logic/panel/blockResolver.d.ts +50 -0
  181. package/types/core/logic/panel/menu.d.ts +72 -3
  182. package/types/core/logic/shell/commandDispatcher.d.ts +8 -0
  183. package/types/core/logic/shell/component.d.ts +5 -3
  184. package/types/core/logic/shell/shortcuts.d.ts +10 -1
  185. package/types/core/logic/shell/ui.d.ts +7 -1
  186. package/types/core/schema/context.d.ts +7 -1
  187. package/types/core/schema/frameContext.d.ts +36 -4
  188. package/types/core/schema/options.d.ts +83 -2
  189. package/types/core/section/constructor.d.ts +38 -1
  190. package/types/events.d.ts +208 -32
  191. package/types/helper/converter.d.ts +4 -2
  192. package/types/helper/dom/domCheck.d.ts +12 -2
  193. package/types/helper/dom/domQuery.d.ts +35 -7
  194. package/types/helper/dom/domUtils.d.ts +4 -1
  195. package/types/interfaces/plugins.d.ts +2 -2
  196. package/types/langs/_Lang.d.ts +0 -1
  197. package/types/modules/contract/ColorPicker.d.ts +2 -2
  198. package/types/modules/contract/Controller.d.ts +7 -0
  199. package/types/modules/contract/Figure.d.ts +31 -4
  200. package/types/modules/ui/CommandMenu.d.ts +262 -0
  201. package/types/modules/ui/SelectMenu.d.ts +56 -3
  202. package/types/modules/ui/index.d.ts +1 -0
  203. package/types/plugins/browser/audioGallery.d.ts +1 -1
  204. package/types/plugins/browser/fileBrowser.d.ts +1 -1
  205. package/types/plugins/browser/fileGallery.d.ts +1 -1
  206. package/types/plugins/browser/imageGallery.d.ts +1 -1
  207. package/types/plugins/browser/videoGallery.d.ts +1 -1
  208. package/types/plugins/dropdown/align.d.ts +1 -1
  209. package/types/plugins/dropdown/blockStyle.d.ts +3 -1
  210. package/types/plugins/dropdown/table/index.d.ts +4 -1
  211. package/types/plugins/dropdown/table/services/table.clipboard.d.ts +5 -1
  212. package/types/plugins/dropdown/table/services/table.grid.d.ts +10 -2
  213. package/types/plugins/field/autocomplete.d.ts +0 -1
  214. package/types/plugins/field/slashCommand.d.ts +165 -0
  215. package/types/plugins/index.d.ts +3 -0
  216. package/types/plugins/modal/link.d.ts +4 -1
  217. package/types/typedef.d.ts +48 -23
@@ -10,7 +10,11 @@ declare class EventManager {
10
10
  * @param {import('./optionProvider').default} optionProvider
11
11
  * @param {import('../kernel/coreKernel').Deps} $
12
12
  */
13
- constructor(contextProvider: import('./contextProvider').default, optionProvider: import('./optionProvider').default, $: import('../kernel/coreKernel').Deps);
13
+ constructor(
14
+ contextProvider: import('./contextProvider').default,
15
+ optionProvider: import('./optionProvider').default,
16
+ $: import('../kernel/coreKernel').Deps,
17
+ );
14
18
  /**
15
19
  * @description Events object, call by triggerEvent function
16
20
  * @type {SunEditor.Event.Handlers}
@@ -21,6 +25,22 @@ declare class EventManager {
21
25
  * @type {(eventName: string, ...args: *) => Promise<*>}
22
26
  */
23
27
  triggerEvent: (eventName: string, ...args: any) => Promise<any>;
28
+ /**
29
+ * @internal
30
+ * @description Bind the EventOrchestrator once it is constructed. Invoked by `coreKernel`
31
+ * immediately after orchestrator creation so the public `applyTagEffect` method below can delegate.
32
+ * @param {import('../event/eventOrchestrator').default} orchestrator
33
+ */
34
+ _bindOrchestrator(orchestrator: import('../event/eventOrchestrator').default): void;
35
+ /**
36
+ * @description Re-run the toolbar/menu active-state pass against the given selection node (or the
37
+ * current selection if `null`). Thin pass-through to {@link EventOrchestrator#applyTagEffect};
38
+ * exposed on `$.eventManager` so modules/plugins can request an immediate sync after they mutate
39
+ * `commandDispatcher.targets` (e.g. CommandMenu pushing newly-rendered rows).
40
+ * @param {?Node} [selectionNode]
41
+ * @returns {Node | undefined}
42
+ */
43
+ applyTagEffect(selectionNode?: Node | null): Node | undefined;
24
44
  /**
25
45
  * @description Register for an event.
26
46
  * - Only events registered with this method are unregistered or re-registered when methods such as 'setOptions', 'destroy' are called.
@@ -30,7 +50,12 @@ declare class EventManager {
30
50
  * @param {boolean|AddEventListenerOptions} [useCapture] Event useCapture option
31
51
  * @return {?SunEditor.Event.Info} Registered event information
32
52
  */
33
- addEvent(target: any, type: string, listener: any, useCapture?: boolean | AddEventListenerOptions): SunEditor.Event.Info | null;
53
+ addEvent(
54
+ target: any,
55
+ type: string,
56
+ listener: any,
57
+ useCapture?: boolean | AddEventListenerOptions,
58
+ ): SunEditor.Event.Info | null;
34
59
  /**
35
60
  * @description Remove event
36
61
  * @param {SunEditor.Event.Info} params event info = this.addEvent()
@@ -45,7 +70,11 @@ declare class EventManager {
45
70
  * @param {boolean|AddEventListenerOptions} [useCapture] Use event capture
46
71
  * @return {SunEditor.Event.GlobalInfo} Registered event information
47
72
  */
48
- addGlobalEvent(type: string, listener: any, useCapture?: boolean | AddEventListenerOptions): SunEditor.Event.GlobalInfo;
73
+ addGlobalEvent(
74
+ type: string,
75
+ listener: any,
76
+ useCapture?: boolean | AddEventListenerOptions,
77
+ ): SunEditor.Event.GlobalInfo;
49
78
  /**
50
79
  * @description Remove events from document.
51
80
  * - When created as an Iframe, the event of the document inside the Iframe is also removed.
@@ -54,7 +83,11 @@ declare class EventManager {
54
83
  * @param {boolean|AddEventListenerOptions} [useCapture] Use event capture
55
84
  * @returns {undefined|null} Success: `null`, Not found: `undefined`
56
85
  */
57
- removeGlobalEvent(type: string | SunEditor.Event.GlobalInfo, listener?: any, useCapture?: boolean | AddEventListenerOptions): undefined | null;
86
+ removeGlobalEvent(
87
+ type: string | SunEditor.Event.GlobalInfo,
88
+ listener?: any,
89
+ useCapture?: boolean | AddEventListenerOptions,
90
+ ): undefined | null;
58
91
  /**
59
92
  * @internal
60
93
  * @description Gives an active effect when the mouse down event is blocked. (Used when "env.isGecko" is `true`)
@@ -52,7 +52,11 @@ export default class OptionProvider {
52
52
  * @param {SunEditor.Kernel} kernel
53
53
  * @param {import('../section/constructor').ConstructorReturnType} product
54
54
  */
55
- constructor(kernel: SunEditor.Kernel, product: import('../section/constructor').ConstructorReturnType, options: any);
55
+ constructor(
56
+ kernel: SunEditor.Kernel,
57
+ product: import('../section/constructor').ConstructorReturnType,
58
+ options: any,
59
+ );
56
60
  /**
57
61
  * @return {BaseOptionsMap}
58
62
  */
@@ -10,29 +10,67 @@ export namespace A {
10
10
  function historyPush(hard: boolean): Action;
11
11
  function documentTypeRefreshHeader(): Action;
12
12
  function selectionSetRange(sc: Node, so: number, ec: Node, eo: number): Action;
13
- function formatRemoveBlock(rangeEl: Element, selectedFormats: Element[] | null, newBlockElement: Element | null, shouldDelete: boolean, skipHistory: boolean): Action;
13
+ function formatRemoveBlock(
14
+ rangeEl: Element,
15
+ selectedFormats: Element[] | null,
16
+ newBlockElement: Element | null,
17
+ shouldDelete: boolean,
18
+ skipHistory: boolean,
19
+ ): Action;
14
20
  function domUtilsRemoveItem(item: Node): Action;
15
21
  function selectComponentFallback(cmponentInfo: SunEditor.ComponentInfo): Action;
16
22
  function delFormatRemoveAndMove(container: Node, formatEl: Element): Action;
17
23
  function backspaceFormatMaintain(formatEl: Element): Action;
18
24
  function backspaceBrLineStrip(formatEl: Element): Action;
19
- function backspaceComponentSelect(selectionNode: Node, range: Range, fileComponentInfo: SunEditor.ComponentInfo): Action;
20
- function backspaceComponentRemove(isList: boolean, sel: Node, formatEl: Element, fileComponentInfo: SunEditor.ComponentInfo): Action;
25
+ function backspaceComponentSelect(
26
+ selectionNode: Node,
27
+ range: Range,
28
+ fileComponentInfo: SunEditor.ComponentInfo,
29
+ ): Action;
30
+ function backspaceComponentRemove(
31
+ isList: boolean,
32
+ sel: Node,
33
+ formatEl: Element,
34
+ fileComponentInfo: SunEditor.ComponentInfo,
35
+ ): Action;
21
36
  function backspaceListMergePrev(prev: Element, formatEl: Element, rangeEl: Element): Action;
22
37
  function backspaceListRemoveNested(range: Range): Action;
38
+ function backspaceEmptyLineMergePrev(formatEl: Element, prev: Element): Action;
39
+ function backspaceBrLineRowMerge(rowEndBr: Node, rowStartBr: Node): Action;
23
40
  function deleteComponentSelect(formatEl: Element, fileComponentInfo: SunEditor.ComponentInfo): Action;
24
41
  function deleteComponentSelectNext(formatEl: any, nextEl: Element): Action;
25
42
  function deleteListRemoveNested(range: Range, formatEl: Element, rangeEl: Element): Action;
43
+ function deleteEmptyLineMergeNext(formatEl: Element, next: Element): Action;
44
+ function deleteBrLineRowMerge(rowEndBr: Node): Action;
26
45
  function tabFormatIndent(range: Range, formatEl: Element, shift: boolean): Action;
27
46
  function enterScrollTo(range: Range): Action;
28
47
  function enterLineAddDefault(formatEl: Element): Action;
29
48
  function enterListAddItem(formatEl: Element, selectionNode: Node): Action;
30
49
  function enterFormatExitEmpty(formatEl: Element, rangeEl: Element): Action;
31
- function enterFormatCleanBrAndZWS(selectionNode: Node, selectionFormat: boolean, brBlock: Element, children: NodeList, offset: number): Action;
50
+ function enterFormatCleanBrAndZWS(
51
+ selectionNode: Node,
52
+ selectionFormat: boolean,
53
+ brBlock: Element,
54
+ children: NodeList,
55
+ offset: number,
56
+ ): Action;
32
57
  function enterFormatInsertBrHtml(brBlock: Element, range: Range, wSelection: Selection, offset: number): Action;
33
58
  function enterFormatInsertBrNode(wSelection: Selection): Action;
34
- function enterFormatBreakAtEdge(formatEl: Element, selectionNode: Node, formatStartEdge: boolean, formatEndEdge: boolean, bidiSwapped?: boolean): Action;
35
- function enterFormatBreakWithSelection(formatEl: Element, range: Range, formatStartEdge: boolean, formatEndEdge: boolean): Action;
59
+ function enterBrLineInsert(range: Range): Action;
60
+ function enterBrLineExit(brBlock: Element): Action;
61
+ function enterFormatBreakAtEdge(
62
+ formatEl: Element,
63
+ selectionNode: Node,
64
+ formatStartEdge: boolean,
65
+ formatEndEdge: boolean,
66
+ bidiSwapped?: boolean,
67
+ ): Action;
68
+ function enterFormatBreakWithSelection(
69
+ formatEl: Element,
70
+ range: Range,
71
+ formatStartEdge: boolean,
72
+ formatEndEdge: boolean,
73
+ ): Action;
36
74
  function enterFormatBreakAtCursor(formatEl: Element, range: Range): Action;
37
75
  function enterFigcaptionExitInList(formatEl: Element): Action;
38
76
  function keydownInputInsertNbsp(): Action;
@@ -9,13 +9,23 @@ declare const _default: {
9
9
  /** @action backspaceFormatMaintain */
10
10
  'backspace.format.maintain': ({ ctx }: EffectContext_keydown, { formatEl }: any) => void;
11
11
  /** @action backspaceComponentSelect */
12
- 'backspace.component.select': ({ ports }: EffectContext_keydown, { selectionNode, range, fileComponentInfo }: any) => void;
12
+ 'backspace.component.select': (
13
+ { ports }: EffectContext_keydown,
14
+ { selectionNode, range, fileComponentInfo }: any,
15
+ ) => void;
13
16
  /** @action backspaceComponentRemove */
14
- 'backspace.component.remove': ({ ports }: EffectContext_keydown, { isList, sel, formatEl, fileComponentInfo }: any) => void;
17
+ 'backspace.component.remove': (
18
+ { ports }: EffectContext_keydown,
19
+ { isList, sel, formatEl, fileComponentInfo }: any,
20
+ ) => void;
15
21
  /** @action backspaceListMergePrev */
16
22
  'backspace.list.mergePrev': ({ ports }: EffectContext_keydown, { prev, formatEl, rangeEl }: any) => void;
17
23
  /** @action backspaceListRemoveNested */
18
24
  'backspace.list.removeNested': ({ ports }: EffectContext_keydown, { range }: any) => void;
25
+ /** @action backspaceEmptyLineMergePrev */
26
+ 'backspace.emptyLine.mergePrev': ({ ports }: EffectContext_keydown, { formatEl, prev }: any) => void;
27
+ /** @action backspaceBrLineRowMerge */
28
+ 'backspace.brline.rowMerge': ({ ports }: EffectContext_keydown, { rowEndBr, rowStartBr }: any) => void;
19
29
  /** [delete] */
20
30
  /** @action deleteComponentSelect */
21
31
  'delete.component.select': ({ ports }: EffectContext_keydown, { formatEl, fileComponentInfo }: any) => void;
@@ -23,6 +33,10 @@ declare const _default: {
23
33
  'delete.component.selectNext': ({ ports, ctx }: EffectContext_keydown, { formatEl, nextEl }: any) => void;
24
34
  /** @action deleteListRemoveNested */
25
35
  'delete.list.removeNested': ({ ports, ctx }: EffectContext_keydown, { range, formatEl, rangeEl }: any) => void;
36
+ /** @action deleteEmptyLineMergeNext — remove an empty line, move caret to the start of the next line */
37
+ 'delete.emptyLine.mergeNext': ({ ports }: EffectContext_keydown, { formatEl, next }: any) => void;
38
+ /** @action deleteBrLineRowMerge — remove an empty row inside a brLine (PRE), pull the next row up */
39
+ 'delete.brline.rowMerge': ({ ports }: EffectContext_keydown, { rowEndBr }: any) => void;
26
40
  /** [tab] */
27
41
  /** @action tabFormatIndent */
28
42
  'tab.format.indent': ({ ports, ctx }: EffectContext_keydown, { range, formatEl, shift }: any) => boolean;
@@ -30,21 +44,37 @@ declare const _default: {
30
44
  /** @action enterScrollTo */
31
45
  'enter.scrollTo': ({ ports }: EffectContext_keydown, { range }: any) => void;
32
46
  /** @action enterLineAddDefault */
33
- 'enter.line.addDefault': ({ ports, ctx }: EffectContext_keydown, { formatEl }: any) => void;
47
+ 'enter.line.addDefault': ({ ports }: EffectContext_keydown, { formatEl }: any) => void;
34
48
  /** @action enterListAddItem */
35
49
  'enter.list.addItem': ({ ports }: EffectContext_keydown, { formatEl, selectionNode }: any) => void;
36
50
  /** @action enterFormatExitEmpty */
37
51
  'enter.format.exitEmpty': ({ ports, ctx }: EffectContext_keydown, { formatEl, rangeEl }: any) => void;
38
52
  /** @action enterFormatCleanBrAndZWS */
39
- 'enter.format.cleanBrAndZWS': ({ ports }: EffectContext_keydown, { selectionNode, selectionFormat, brBlock, children, offset }: any) => void;
53
+ 'enter.format.cleanBrAndZWS': (
54
+ { ports }: EffectContext_keydown,
55
+ { selectionNode, selectionFormat, brBlock, children, offset }: any,
56
+ ) => void;
40
57
  /** @action enterFormatInsertBrHtml */
41
- 'enter.format.insertBrHtml': ({ ports }: EffectContext_keydown, { brBlock, range, wSelection, offset }: any) => void;
58
+ 'enter.format.insertBrHtml': (
59
+ { ports }: EffectContext_keydown,
60
+ { brBlock, range, wSelection, offset }: any,
61
+ ) => void;
62
+ /** @action enterBrLineInsert — insert exactly one empty row at the caret inside a normal brLine. */
63
+ 'enter.brline.insert': ({ ports }: EffectContext_keydown, { range }: any) => void;
64
+ /** @action enterBrLineExit — consume only the caret's current (last) empty row and add a default line after the brLine. */
65
+ 'enter.brline.exit': ({ ports }: EffectContext_keydown, { brBlock }: any) => void;
42
66
  /** @action enterFormatInsertBrNode */
43
67
  'enter.format.insertBrNode': ({ ports }: EffectContext_keydown, { wSelection }: any) => void;
44
68
  /** @action enterFormatBreakAtEdge */
45
- 'enter.format.breakAtEdge': ({ ports, ctx }: EffectContext_keydown, { formatEl, selectionNode, formatStartEdge, formatEndEdge, bidiSwapped }: any) => void;
69
+ 'enter.format.breakAtEdge': (
70
+ { ports, ctx }: EffectContext_keydown,
71
+ { formatEl, selectionNode, formatStartEdge, formatEndEdge, bidiSwapped }: any,
72
+ ) => void;
46
73
  /** @action enterFormatBreakWithSelection */
47
- 'enter.format.breakWithSelection': ({ ports, ctx }: EffectContext_keydown, { formatEl, range, formatStartEdge, formatEndEdge }: any) => void;
74
+ 'enter.format.breakWithSelection': (
75
+ { ports, ctx }: EffectContext_keydown,
76
+ { formatEl, range, formatStartEdge, formatEndEdge }: any,
77
+ ) => void;
48
78
  /** @action enterFormatBreakAtCursor */
49
79
  'enter.format.breakAtCursor': ({ ports, ctx }: EffectContext_keydown, { formatEl, range }: any) => void;
50
80
  /** @action enterFigcaptionExitInList */
@@ -45,4 +45,9 @@ export function setDefaultLine(ports: EventPorts, lineTagName: string): void;
45
45
  * @param {Document} doc - The document object
46
46
  * @returns {boolean} true if the detected edge doesn't match the visual position (bidi mismatch)
47
47
  */
48
- export function isRtlBidiMismatch(range: Range, formatEl: HTMLElement, detectedEdge: 'front' | 'end', doc: Document): boolean;
48
+ export function isRtlBidiMismatch(
49
+ range: Range,
50
+ formatEl: HTMLElement,
51
+ detectedEdge: 'front' | 'end',
52
+ doc: Document,
53
+ ): boolean;
@@ -51,8 +51,6 @@ declare class EventOrchestrator extends KernelInjector {
51
51
  __eventDoc: Document;
52
52
  /** @type {string} */
53
53
  __secopy: string;
54
- /** @type {HTMLInputElement} */
55
- __focusTemp: HTMLInputElement;
56
54
  /**
57
55
  * @description Activates the corresponding button with the tags information of the current cursor position,
58
56
  * - such as `bold`, `underline`, etc., and executes the `active` method of the plugins.
@@ -86,6 +84,13 @@ declare class EventOrchestrator extends KernelInjector {
86
84
  * @param {?string} formatName Format tag name (default: `P`)
87
85
  */
88
86
  _setDefaultLine(formatName: string | null): void;
87
+ /**
88
+ * @internal
89
+ * @description Normalize the Enter range before the reducer reads it: reset to a text node, and when the
90
+ * caret sits inside a zero-width text node adjacent to a `<br>`, move it onto the `<br>`.
91
+ * @returns {?(HTMLElement|Text)} The updated selection node, or `null` when the caret is not on a line (no normalization ran).
92
+ */
93
+ _normalizeEnterRange(): (HTMLElement | Text) | null;
89
94
  /**
90
95
  * @internal
91
96
  * @description Handles data transfer actions for `paste` and `drop` events.
@@ -96,7 +101,12 @@ declare class EventOrchestrator extends KernelInjector {
96
101
  * @param {SunEditor.FrameContext} frameContext The frame context
97
102
  * @returns {Promise<boolean>} Resolves to `false` if processing is complete, otherwise allows default behavior
98
103
  */
99
- _dataTransferAction(type: 'paste' | 'drop', e: Event, clipboardData: DataTransfer, frameContext: SunEditor.FrameContext): Promise<boolean>;
104
+ _dataTransferAction(
105
+ type: 'paste' | 'drop',
106
+ e: Event,
107
+ clipboardData: DataTransfer,
108
+ frameContext: SunEditor.FrameContext,
109
+ ): Promise<boolean>;
100
110
  /**
101
111
  * @internal
102
112
  * @description Registers common UI events such as toolbar and menu interactions.
@@ -6,12 +6,20 @@ import type {} from '../../../typedef';
6
6
  * @this {EventManagerThis_handler_ww_clipboard}
7
7
  * @param {ClipboardEvent} e - Event object
8
8
  */
9
- export function OnPaste_wysiwyg(this: import('../eventOrchestrator').default, frameContext: any, e: ClipboardEvent): true | Promise<boolean>;
9
+ export function OnPaste_wysiwyg(
10
+ this: import('../eventOrchestrator').default,
11
+ frameContext: any,
12
+ e: ClipboardEvent,
13
+ ): true | Promise<boolean>;
10
14
  /**
11
15
  * @this {EventManagerThis_handler_ww_clipboard}
12
16
  * @param {ClipboardEvent} e - Event object
13
17
  */
14
- export function OnCopy_wysiwyg(this: import('../eventOrchestrator').default, frameContext: any, e: ClipboardEvent): Promise<boolean>;
18
+ export function OnCopy_wysiwyg(
19
+ this: import('../eventOrchestrator').default,
20
+ frameContext: any,
21
+ e: ClipboardEvent,
22
+ ): Promise<boolean>;
15
23
  export class OnCopy_wysiwyg {
16
24
  /**
17
25
  * @this {EventManagerThis_handler_ww_clipboard}
@@ -24,7 +32,11 @@ export class OnCopy_wysiwyg {
24
32
  * @this {EventManagerThis_handler_ww_clipboard}
25
33
  * @param {ClipboardEvent} e - Event object
26
34
  */
27
- export function OnCut_wysiwyg(this: import('../eventOrchestrator').default, frameContext: any, e: ClipboardEvent): Promise<boolean>;
35
+ export function OnCut_wysiwyg(
36
+ this: import('../eventOrchestrator').default,
37
+ frameContext: any,
38
+ e: ClipboardEvent,
39
+ ): Promise<boolean>;
28
40
  export class OnCut_wysiwyg {
29
41
  /**
30
42
  * @this {EventManagerThis_handler_ww_clipboard}
@@ -10,7 +10,14 @@ import type {} from '../../../typedef';
10
10
  * @param {?HTMLElement} _innerToolbar - Inner toolbar element
11
11
  * @param {DragEvent} e - Event object
12
12
  */
13
- export function OnDragOver_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, dragCursor: HTMLElement, _iframeTopArea: HTMLElement | null, _innerToolbar: HTMLElement | null, e: DragEvent): void;
13
+ export function OnDragOver_wysiwyg(
14
+ this: import('../eventOrchestrator').default,
15
+ fc: SunEditor.FrameContext,
16
+ dragCursor: HTMLElement,
17
+ _iframeTopArea: HTMLElement | null,
18
+ _innerToolbar: HTMLElement | null,
19
+ e: DragEvent,
20
+ ): void;
14
21
  /**
15
22
  * @this {EventManagerThis_handler_ww_dragDrop}
16
23
  * @param {HTMLElement} dragCursor - Drag cursor element
@@ -22,5 +29,10 @@ export function OnDragEnd_wysiwyg(this: import('../eventOrchestrator').default,
22
29
  * @param {HTMLElement} dragCursor - Drag cursor element
23
30
  * @param {DragEvent} e - Event object
24
31
  */
25
- export function OnDrop_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, dragCursor: HTMLElement, e: DragEvent): boolean | Promise<boolean>;
32
+ export function OnDrop_wysiwyg(
33
+ this: import('../eventOrchestrator').default,
34
+ fc: SunEditor.FrameContext,
35
+ dragCursor: HTMLElement,
36
+ e: DragEvent,
37
+ ): boolean | Promise<boolean>;
26
38
  export type EventManagerThis_handler_ww_dragDrop = import('../eventOrchestrator').default;
@@ -7,7 +7,11 @@ import type {} from '../../../typedef';
7
7
  * @param {SunEditor.FrameContext} fc - Frame context object
8
8
  * @param {InputEvent} e - Event object
9
9
  */
10
- export function OnBeforeInput_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, e: InputEvent): Promise<boolean>;
10
+ export function OnBeforeInput_wysiwyg(
11
+ this: import('../eventOrchestrator').default,
12
+ fc: SunEditor.FrameContext,
13
+ e: InputEvent,
14
+ ): Promise<boolean>;
11
15
  export class OnBeforeInput_wysiwyg {
12
16
  /**
13
17
  * @typedef {import('../eventOrchestrator').default} EventManagerThis_handler_ww_input
@@ -25,7 +29,11 @@ export class OnBeforeInput_wysiwyg {
25
29
  * @param {SunEditor.FrameContext} fc - Frame context object
26
30
  * @param {InputEvent} e - Event object
27
31
  */
28
- export function OnInput_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, e: InputEvent): Promise<boolean>;
32
+ export function OnInput_wysiwyg(
33
+ this: import('../eventOrchestrator').default,
34
+ fc: SunEditor.FrameContext,
35
+ e: InputEvent,
36
+ ): Promise<boolean>;
29
37
  export class OnInput_wysiwyg {
30
38
  /**
31
39
  * @this {EventManagerThis_handler_ww_input}
@@ -7,7 +7,11 @@ import type {} from '../../../typedef';
7
7
  * @param {SunEditor.FrameContext} fc - Frame context object
8
8
  * @param {KeyboardEvent} e - Event object
9
9
  */
10
- export function OnKeyDown_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, e: KeyboardEvent): Promise<boolean>;
10
+ export function OnKeyDown_wysiwyg(
11
+ this: import('../eventOrchestrator').default,
12
+ fc: SunEditor.FrameContext,
13
+ e: KeyboardEvent,
14
+ ): Promise<boolean>;
11
15
  export class OnKeyDown_wysiwyg {
12
16
  /**
13
17
  * @typedef {import('../eventOrchestrator').default} EventManagerThis_handler_ww_key_input
@@ -26,7 +30,11 @@ export class OnKeyDown_wysiwyg {
26
30
  * @param {SunEditor.FrameContext} fc - Frame context object
27
31
  * @param {KeyboardEvent} e - Event object
28
32
  */
29
- export function OnKeyUp_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, e: KeyboardEvent): Promise<void>;
33
+ export function OnKeyUp_wysiwyg(
34
+ this: import('../eventOrchestrator').default,
35
+ fc: SunEditor.FrameContext,
36
+ e: KeyboardEvent,
37
+ ): Promise<void>;
30
38
  export class OnKeyUp_wysiwyg {
31
39
  /**
32
40
  * @this {EventManagerThis_handler_ww_key_input}
@@ -7,7 +7,11 @@ import type {} from '../../../typedef';
7
7
  * @param {SunEditor.FrameContext} fc - Frame context object
8
8
  * @param {MouseEvent} e - Event object
9
9
  */
10
- export function OnMouseDown_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, e: MouseEvent): Promise<void>;
10
+ export function OnMouseDown_wysiwyg(
11
+ this: import('../eventOrchestrator').default,
12
+ fc: SunEditor.FrameContext,
13
+ e: MouseEvent,
14
+ ): Promise<void>;
11
15
  export class OnMouseDown_wysiwyg {
12
16
  /**
13
17
  * @typedef {import('../eventOrchestrator').default} EventManagerThis_handler_ww_mouse
@@ -25,23 +29,39 @@ export class OnMouseDown_wysiwyg {
25
29
  * @param {SunEditor.FrameContext} fc - Frame context object
26
30
  * @param {MouseEvent} e - Event object
27
31
  */
28
- export function OnMouseUp_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, e: MouseEvent): Promise<void>;
32
+ export function OnMouseUp_wysiwyg(
33
+ this: import('../eventOrchestrator').default,
34
+ fc: SunEditor.FrameContext,
35
+ e: MouseEvent,
36
+ ): Promise<void>;
29
37
  /**
30
38
  * @this {EventManagerThis_handler_ww_mouse}
31
39
  * @param {SunEditor.FrameContext} fc - Frame context object
32
40
  * @param {MouseEvent} e - Event object
33
41
  */
34
- export function OnClick_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, e: MouseEvent): Promise<boolean>;
42
+ export function OnClick_wysiwyg(
43
+ this: import('../eventOrchestrator').default,
44
+ fc: SunEditor.FrameContext,
45
+ e: MouseEvent,
46
+ ): Promise<boolean>;
35
47
  /**
36
48
  * @this {EventManagerThis_handler_ww_mouse}
37
49
  * @param {SunEditor.FrameContext} fc - Frame context object
38
50
  * @param {MouseEvent} e - Event object
39
51
  */
40
- export function OnMouseMove_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, e: MouseEvent): boolean;
52
+ export function OnMouseMove_wysiwyg(
53
+ this: import('../eventOrchestrator').default,
54
+ fc: SunEditor.FrameContext,
55
+ e: MouseEvent,
56
+ ): boolean;
41
57
  /**
42
58
  * @this {EventManagerThis_handler_ww_mouse}
43
59
  * @param {SunEditor.FrameContext} fc - Frame context object
44
60
  * @param {MouseEvent} e - Event object
45
61
  */
46
- export function OnMouseLeave_wysiwyg(this: import('../eventOrchestrator').default, fc: SunEditor.FrameContext, e: MouseEvent): Promise<void>;
62
+ export function OnMouseLeave_wysiwyg(
63
+ this: import('../eventOrchestrator').default,
64
+ fc: SunEditor.FrameContext,
65
+ e: MouseEvent,
66
+ ): Promise<void>;
47
67
  export type EventManagerThis_handler_ww_mouse = import('../eventOrchestrator').default;
@@ -33,6 +33,7 @@ import type {} from '../../typedef';
33
33
  * @property {(...args: Parameters<Format['isEdgeLine']>) => ReturnType<Format['isEdgeLine']>} isEdgeLine
34
34
  * @property {(...args: Parameters<Format['removeBlock']>) => ReturnType<Format['removeBlock']>} removeBlock
35
35
  * @property {(...args: Parameters<Format['addLine']>) => ReturnType<Format['addLine']>} addLine
36
+ * @property {(...args: Parameters<Format['addLineAfter']>) => ReturnType<Format['addLineAfter']>} addLineAfter
36
37
  */
37
38
  /**
38
39
  * @typedef {Object} ListFormatPorts
@@ -111,6 +112,7 @@ export function makePorts(
111
112
  removeArray: Array<Node> | null;
112
113
  };
113
114
  addLine: (el: any, nextOrTag: any) => HTMLElement;
115
+ addLineAfter: (el: any) => HTMLElement;
114
116
  };
115
117
  listFormat: {
116
118
  applyNested: (
@@ -167,12 +169,14 @@ export function makePorts(
167
169
  setOnShortcutKey: (v: any) => any;
168
170
  /**
169
171
  * @description Scrolls the editor view to the caret position after pressing `Enter`.
170
- * @param {Range} range Range object
172
+ * @param {Range} range Pre-Enter snapshot range (fallback only).
171
173
  */
172
174
  enterScrollTo(range: Range): void;
173
175
  /**
174
- * @description Prevents the default behavior of the `Enter` key and refocuses the editor.
175
- * @param {Event} e The keyboard event
176
+ * @description Prevents the default behavior of the `Enter` key.
177
+ * Enter now runs from `beforeinput` (post-IME-commit), so the former mobile focus-shuffle
178
+ * (temp-focus → refocus, to force-end a virtual-keyboard IME session) is unnecessary.
179
+ * @param {Event} e The keyboard/input event
176
180
  */
177
181
  enterPrevent(e: Event): void;
178
182
  };
@@ -204,6 +208,7 @@ export type FormatPorts = {
204
208
  isEdgeLine: (...args: Parameters<Format['isEdgeLine']>) => ReturnType<Format['isEdgeLine']>;
205
209
  removeBlock: (...args: Parameters<Format['removeBlock']>) => ReturnType<Format['removeBlock']>;
206
210
  addLine: (...args: Parameters<Format['addLine']>) => ReturnType<Format['addLine']>;
211
+ addLineAfter: (...args: Parameters<Format['addLineAfter']>) => ReturnType<Format['addLineAfter']>;
207
212
  };
208
213
  export type ListFormatPorts = {
209
214
  applyNested: (...args: Parameters<ListFormat['applyNested']>) => ReturnType<ListFormat['applyNested']>;
@@ -220,7 +225,9 @@ export type HtmlPorts = {
220
225
  insertNode: (...args: Parameters<Html['insertNode']>) => ReturnType<Html['insertNode']>;
221
226
  };
222
227
  export type NodeTransformPorts = {
223
- removeAllParents: (...args: Parameters<NodeTransform['removeAllParents']>) => ReturnType<NodeTransform['removeAllParents']>;
228
+ removeAllParents: (
229
+ ...args: Parameters<NodeTransform['removeAllParents']>
230
+ ) => ReturnType<NodeTransform['removeAllParents']>;
224
231
  split: (...args: Parameters<NodeTransform['split']>) => ReturnType<NodeTransform['split']>;
225
232
  };
226
233
  export type CharPorts = {
@@ -4,7 +4,7 @@ import type {} from '../../../typedef';
4
4
  */
5
5
  /**
6
6
  * @typedef {Object} KeydownReducerCtx - Keydown Reducer Context object
7
- * @property {KeyboardEvent} ctx.e - The keyboard event
7
+ * @property {KeyboardEvent|InputEvent} ctx.e - The keyboard event (or the `beforeinput` InputEvent when Enter is dispatched from `beforeinput`)
8
8
  * @property {SunEditor.FrameContext} ctx.fc - Frame context object
9
9
  * @property {SunEditor.Store} ctx.store - Editor store object
10
10
  * @property {SunEditor.Options} ctx.options - Options object
@@ -27,15 +27,24 @@ import type {} from '../../../typedef';
27
27
  * @returns {Promise<EventActions>} Action list
28
28
  */
29
29
  export function reduceKeydown(ports: EventPorts, ctx: KeydownReducerCtx): Promise<EventActions>;
30
+ /**
31
+ * @description Enter is processed from the `beforeinput` event (post-IME-commit) instead of `keydown`,
32
+ * to avoid trapping iOS/mobile IME marked-text when `keydown` mutates the DOM (see `handler_ww_input.js`).
33
+ * Flip to `false` to instantly restore the legacy synchronous `keydown` Enter path — no other file needs
34
+ * touching for rollback (the `keydown` Enter gate, the `handler_ww_key` normalization guard, and the
35
+ * `beforeinput` dispatch all key off this single flag).
36
+ * @type {boolean}
37
+ */
38
+ export const ENTER_FROM_BEFOREINPUT: boolean;
30
39
  export type EventPorts = import('../ports').EventReducerPorts;
31
40
  /**
32
41
  * - Keydown Reducer Context object
33
42
  */
34
43
  export type KeydownReducerCtx = {
35
44
  /**
36
- * - The keyboard event
45
+ * - The keyboard event (or the `beforeinput` InputEvent when Enter is dispatched from `beforeinput`)
37
46
  */
38
- e: KeyboardEvent;
47
+ e: KeyboardEvent | InputEvent;
39
48
  /**
40
49
  * - Frame context object
41
50
  */
@@ -12,7 +12,12 @@ import type {} from '../../../typedef';
12
12
  * @param {EventKeydownCtx} ctx - Context object
13
13
  * @returns {boolean} Return `false` to stop the processing
14
14
  */
15
- export function reduceBackspaceDown(this: void, actions: EventActions, ports: EventPorts, ctx: EventKeydownCtx): boolean;
15
+ export function reduceBackspaceDown(
16
+ this: void,
17
+ actions: EventActions,
18
+ ports: EventPorts,
19
+ ctx: EventKeydownCtx,
20
+ ): boolean;
16
21
  export type EventActions = import('../actions').Action[];
17
22
  export type EventPorts = import('../ports').EventReducerPorts;
18
23
  export type EventKeydownCtx = import('../reducers/keydown.reducer').KeydownReducerCtx;
@@ -168,7 +168,10 @@ declare class Store {
168
168
  * @param {(newValue: StoreState[K], oldValue: StoreState[K]) => void} callback
169
169
  * @returns {() => void} Unsubscribe function
170
170
  */
171
- subscribe<K extends keyof StoreState>(path: K, callback: (newValue: StoreState[K], oldValue: StoreState[K]) => void): () => void;
171
+ subscribe<K extends keyof StoreState>(
172
+ path: K,
173
+ callback: (newValue: StoreState[K], oldValue: StoreState[K]) => void,
174
+ ): () => void;
172
175
  _reset(): void;
173
176
  _destroy(): void;
174
177
  #private;