suneditor 3.0.0-beta.9 → 3.0.0-rc.2
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.
- package/README.md +65 -57
- package/dist/suneditor-contents.min.css +1 -0
- package/dist/suneditor.min.css +1 -1
- package/dist/suneditor.min.js +1 -1
- package/package.json +110 -61
- package/src/assets/design/color.css +36 -17
- package/src/assets/design/size.css +2 -0
- package/src/assets/icons/defaultIcons.js +17 -2
- package/src/assets/suneditor-contents.css +51 -16
- package/src/assets/suneditor.css +116 -43
- package/src/core/config/contextProvider.js +288 -0
- package/src/core/config/eventManager.js +188 -0
- package/src/core/config/instanceCheck.js +59 -0
- package/src/core/config/optionProvider.js +452 -0
- package/src/core/editor.js +166 -1637
- package/src/core/event/actions/index.js +229 -0
- package/src/core/event/effects/common.registry.js +74 -0
- package/src/core/event/effects/keydown.registry.js +573 -0
- package/src/core/event/effects/ruleHelpers.js +148 -0
- package/src/core/event/eventOrchestrator.js +944 -0
- package/src/core/event/executor.js +27 -0
- package/src/core/{base/eventHandlers → event/handlers}/handler_toolbar.js +27 -28
- package/src/core/{base/eventHandlers → event/handlers}/handler_ww_clipboard.js +10 -8
- package/src/core/{base/eventHandlers → event/handlers}/handler_ww_dragDrop.js +22 -23
- package/src/core/event/handlers/handler_ww_input.js +75 -0
- package/src/core/event/handlers/handler_ww_key.js +228 -0
- package/src/core/event/handlers/handler_ww_mouse.js +166 -0
- package/src/core/event/ports.js +211 -0
- package/src/core/event/reducers/keydown.reducer.js +97 -0
- package/src/core/event/rules/keydown.rule.arrow.js +63 -0
- package/src/core/event/rules/keydown.rule.backspace.js +208 -0
- package/src/core/event/rules/keydown.rule.delete.js +132 -0
- package/src/core/event/rules/keydown.rule.enter.js +150 -0
- package/src/core/event/rules/keydown.rule.tab.js +35 -0
- package/src/core/event/support/defaultLineManager.js +136 -0
- package/src/core/event/support/selectionState.js +204 -0
- package/src/core/kernel/coreKernel.js +320 -0
- package/src/core/kernel/kernelInjector.js +19 -0
- package/src/core/kernel/store.js +173 -0
- package/src/core/{class → logic/dom}/char.js +42 -45
- package/src/core/logic/dom/format.js +1075 -0
- package/src/core/{class → logic/dom}/html.js +743 -624
- package/src/core/logic/dom/inline.js +1847 -0
- package/src/core/logic/dom/listFormat.js +601 -0
- package/src/core/{class → logic/dom}/nodeTransform.js +92 -72
- package/src/core/{class → logic/dom}/offset.js +254 -317
- package/src/core/logic/dom/selection.js +754 -0
- package/src/core/logic/panel/menu.js +389 -0
- package/src/core/logic/panel/toolbar.js +449 -0
- package/src/core/logic/panel/viewer.js +761 -0
- package/src/core/logic/shell/_commandExecutor.js +380 -0
- package/src/core/logic/shell/commandDispatcher.js +241 -0
- package/src/core/logic/shell/component.js +970 -0
- package/src/core/logic/shell/focusManager.js +110 -0
- package/src/core/{base → logic/shell}/history.js +110 -60
- package/src/core/logic/shell/pluginManager.js +363 -0
- package/src/core/logic/shell/shortcuts.js +130 -0
- package/src/core/logic/shell/ui.js +904 -0
- package/src/core/schema/context.js +66 -0
- package/src/core/schema/frameContext.js +160 -0
- package/src/core/schema/options.js +628 -0
- package/src/core/section/constructor.js +194 -500
- package/src/core/section/documentType.js +297 -222
- package/src/events.js +808 -543
- package/src/helper/clipboard.js +27 -16
- package/src/helper/converter.js +100 -78
- package/src/helper/dom/domCheck.js +56 -30
- package/src/helper/dom/domQuery.js +159 -89
- package/src/helper/dom/domUtils.js +114 -49
- package/src/helper/dom/index.js +5 -1
- package/src/helper/env.js +26 -26
- package/src/helper/index.js +1 -1
- package/src/helper/keyCodeMap.js +25 -28
- package/src/helper/numbers.js +4 -8
- package/src/helper/unicode.js +4 -8
- package/src/hooks/base.js +307 -0
- package/src/hooks/params.js +130 -0
- package/src/interfaces/contracts.js +227 -0
- package/src/interfaces/index.js +7 -0
- package/src/interfaces/plugins.js +239 -0
- package/src/langs/ckb.js +4 -4
- package/src/langs/cs.js +4 -4
- package/src/langs/da.js +4 -4
- package/src/langs/de.js +4 -4
- package/src/langs/en.js +4 -4
- package/src/langs/es.js +4 -4
- package/src/langs/fa.js +4 -4
- package/src/langs/fr.js +4 -4
- package/src/langs/he.js +4 -4
- package/src/langs/hu.js +4 -4
- package/src/langs/it.js +4 -4
- package/src/langs/ja.js +4 -4
- package/src/langs/km.js +4 -4
- package/src/langs/ko.js +4 -4
- package/src/langs/lv.js +4 -4
- package/src/langs/nl.js +4 -4
- package/src/langs/pl.js +4 -4
- package/src/langs/pt_br.js +13 -13
- package/src/langs/ro.js +4 -4
- package/src/langs/ru.js +4 -4
- package/src/langs/se.js +4 -4
- package/src/langs/tr.js +4 -4
- package/src/langs/uk.js +4 -4
- package/src/langs/ur.js +4 -4
- package/src/langs/zh_cn.js +4 -4
- package/src/modules/{Browser.js → contract/Browser.js} +119 -128
- package/src/modules/{ColorPicker.js → contract/ColorPicker.js} +132 -142
- package/src/modules/contract/Controller.js +589 -0
- package/src/modules/{Figure.js → contract/Figure.js} +591 -411
- package/src/modules/{HueSlider.js → contract/HueSlider.js} +125 -86
- package/src/modules/contract/Modal.js +357 -0
- package/src/modules/contract/index.js +9 -0
- package/src/modules/manager/ApiManager.js +197 -0
- package/src/modules/{FileManager.js → manager/FileManager.js} +128 -160
- package/src/modules/manager/index.js +5 -0
- package/src/modules/{ModalAnchorEditor.js → ui/ModalAnchorEditor.js} +108 -138
- package/src/modules/{SelectMenu.js → ui/SelectMenu.js} +119 -120
- package/src/modules/{_DragHandle.js → ui/_DragHandle.js} +1 -1
- package/src/modules/ui/index.js +6 -0
- package/src/plugins/browser/audioGallery.js +23 -26
- package/src/plugins/browser/fileBrowser.js +25 -28
- package/src/plugins/browser/fileGallery.js +20 -23
- package/src/plugins/browser/imageGallery.js +24 -23
- package/src/plugins/browser/videoGallery.js +27 -29
- package/src/plugins/command/blockquote.js +11 -17
- package/src/plugins/command/exportPDF.js +26 -26
- package/src/plugins/command/fileUpload.js +138 -133
- package/src/plugins/command/list_bulleted.js +48 -44
- package/src/plugins/command/list_numbered.js +48 -44
- package/src/plugins/dropdown/align.js +64 -50
- package/src/plugins/dropdown/backgroundColor.js +34 -35
- package/src/plugins/dropdown/{formatBlock.js → blockStyle.js} +43 -37
- package/src/plugins/dropdown/font.js +50 -36
- package/src/plugins/dropdown/fontColor.js +34 -35
- package/src/plugins/dropdown/hr.js +55 -50
- package/src/plugins/dropdown/layout.js +20 -15
- package/src/plugins/dropdown/lineHeight.js +46 -30
- package/src/plugins/dropdown/list.js +32 -33
- package/src/plugins/dropdown/paragraphStyle.js +40 -34
- package/src/plugins/dropdown/table/index.js +915 -0
- package/src/plugins/dropdown/table/render/table.html.js +308 -0
- package/src/plugins/dropdown/table/render/table.menu.js +121 -0
- package/src/plugins/dropdown/table/services/table.cell.js +465 -0
- package/src/plugins/dropdown/table/services/table.clipboard.js +414 -0
- package/src/plugins/dropdown/table/services/table.grid.js +504 -0
- package/src/plugins/dropdown/table/services/table.resize.js +463 -0
- package/src/plugins/dropdown/table/services/table.selection.js +466 -0
- package/src/plugins/dropdown/table/services/table.style.js +844 -0
- package/src/plugins/dropdown/table/shared/table.constants.js +109 -0
- package/src/plugins/dropdown/table/shared/table.utils.js +219 -0
- package/src/plugins/dropdown/template.js +20 -15
- package/src/plugins/dropdown/textStyle.js +28 -22
- package/src/plugins/field/mention.js +54 -49
- package/src/plugins/index.js +5 -5
- package/src/plugins/input/fontSize.js +100 -97
- package/src/plugins/input/pageNavigator.js +13 -10
- package/src/plugins/modal/audio.js +208 -219
- package/src/plugins/modal/drawing.js +99 -104
- package/src/plugins/modal/embed.js +323 -312
- package/src/plugins/modal/image/index.js +942 -0
- package/src/plugins/modal/image/render/image.html.js +150 -0
- package/src/plugins/modal/image/services/image.size.js +198 -0
- package/src/plugins/modal/image/services/image.upload.js +216 -0
- package/src/plugins/modal/image/shared/image.constants.js +20 -0
- package/src/plugins/modal/link.js +74 -54
- package/src/plugins/modal/math.js +126 -119
- package/src/plugins/modal/video/index.js +858 -0
- package/src/plugins/modal/video/render/video.html.js +131 -0
- package/src/plugins/modal/video/services/video.size.js +281 -0
- package/src/plugins/modal/video/services/video.upload.js +92 -0
- package/src/plugins/popup/anchor.js +57 -49
- package/src/suneditor.js +73 -61
- package/src/themes/cobalt.css +155 -0
- package/src/themes/dark.css +143 -120
- package/src/typedef.js +214 -63
- package/types/assets/icons/defaultIcons.d.ts +8 -0
- package/types/assets/suneditor-contents.css.d.ts +1 -0
- package/types/assets/suneditor.css.d.ts +1 -0
- package/types/core/config/contextProvider.d.ts +148 -0
- package/types/core/config/eventManager.d.ts +68 -0
- package/types/core/config/instanceCheck.d.ts +33 -0
- package/types/core/config/optionProvider.d.ts +147 -0
- package/types/core/editor.d.ts +27 -586
- package/types/core/event/actions/index.d.ts +50 -0
- package/types/core/event/effects/common.registry.d.ts +56 -0
- package/types/core/event/effects/keydown.registry.d.ts +80 -0
- package/types/core/event/effects/ruleHelpers.d.ts +36 -0
- package/types/core/event/eventOrchestrator.d.ts +191 -0
- package/types/core/event/executor.d.ts +13 -0
- package/types/core/event/handlers/handler_toolbar.d.ts +38 -0
- package/types/core/event/handlers/handler_ww_clipboard.d.ts +36 -0
- package/types/core/event/handlers/handler_ww_dragDrop.d.ts +26 -0
- package/types/core/event/handlers/handler_ww_input.d.ts +38 -0
- package/types/core/event/handlers/handler_ww_key.d.ts +40 -0
- package/types/core/event/handlers/handler_ww_mouse.d.ts +47 -0
- package/types/core/event/ports.d.ts +256 -0
- package/types/core/event/reducers/keydown.reducer.d.ts +84 -0
- package/types/core/event/rules/keydown.rule.arrow.d.ts +19 -0
- package/types/core/event/rules/keydown.rule.backspace.d.ts +18 -0
- package/types/core/event/rules/keydown.rule.delete.d.ts +18 -0
- package/types/core/event/rules/keydown.rule.enter.d.ts +18 -0
- package/types/core/event/rules/keydown.rule.tab.d.ts +18 -0
- package/types/core/event/support/defaultLineManager.d.ts +22 -0
- package/types/core/event/support/selectionState.d.ts +29 -0
- package/types/core/kernel/coreKernel.d.ts +219 -0
- package/types/core/kernel/kernelInjector.d.ts +16 -0
- package/types/core/kernel/store.d.ts +170 -0
- package/types/core/logic/dom/char.d.ts +46 -0
- package/types/core/logic/dom/format.d.ts +234 -0
- package/types/core/logic/dom/html.d.ts +290 -0
- package/types/core/logic/dom/inline.d.ts +93 -0
- package/types/core/logic/dom/listFormat.d.ts +101 -0
- package/types/core/logic/dom/nodeTransform.d.ts +110 -0
- package/types/core/logic/dom/offset.d.ts +335 -0
- package/types/core/logic/dom/selection.d.ts +165 -0
- package/types/core/logic/panel/menu.d.ts +93 -0
- package/types/core/logic/panel/toolbar.d.ts +128 -0
- package/types/core/logic/panel/viewer.d.ts +89 -0
- package/types/core/logic/shell/_commandExecutor.d.ts +18 -0
- package/types/core/logic/shell/commandDispatcher.d.ts +65 -0
- package/types/core/logic/shell/component.d.ts +182 -0
- package/types/core/logic/shell/focusManager.d.ts +31 -0
- package/types/core/{base → logic/shell}/history.d.ts +13 -12
- package/types/core/logic/shell/pluginManager.d.ts +115 -0
- package/types/core/logic/shell/shortcuts.d.ts +131 -0
- package/types/core/logic/shell/ui.d.ts +261 -0
- package/types/core/schema/context.d.ts +104 -0
- package/types/core/schema/frameContext.d.ts +320 -0
- package/types/core/schema/options.d.ts +1241 -0
- package/types/core/section/constructor.d.ts +117 -652
- package/types/core/section/documentType.d.ts +43 -61
- package/types/events.d.ts +796 -65
- package/types/helper/clipboard.d.ts +5 -4
- package/types/helper/converter.d.ts +55 -43
- package/types/helper/dom/domCheck.d.ts +27 -19
- package/types/helper/dom/domQuery.d.ts +76 -57
- package/types/helper/dom/domUtils.d.ts +62 -39
- package/types/helper/dom/index.d.ts +87 -1
- package/types/helper/env.d.ts +16 -13
- package/types/helper/index.d.ts +8 -2
- package/types/helper/keyCodeMap.d.ts +24 -23
- package/types/helper/numbers.d.ts +4 -6
- package/types/helper/unicode.d.ts +4 -3
- package/types/hooks/base.d.ts +239 -0
- package/types/hooks/params.d.ts +65 -0
- package/types/index.d.ts +20 -117
- package/types/interfaces/contracts.d.ts +183 -0
- package/types/interfaces/index.d.ts +3 -0
- package/types/interfaces/plugins.d.ts +168 -0
- package/types/langs/_Lang.d.ts +2 -2
- package/types/langs/index.d.ts +2 -2
- package/types/modules/contract/Browser.d.ts +262 -0
- package/types/modules/contract/ColorPicker.d.ts +99 -0
- package/types/modules/contract/Controller.d.ts +204 -0
- package/types/modules/contract/Figure.d.ts +529 -0
- package/types/modules/{HueSlider.d.ts → contract/HueSlider.d.ts} +39 -28
- package/types/modules/contract/Modal.d.ts +62 -0
- package/types/modules/contract/index.d.ts +7 -0
- package/types/modules/manager/ApiManager.d.ts +106 -0
- package/types/modules/manager/FileManager.d.ts +124 -0
- package/types/modules/manager/index.d.ts +3 -0
- package/types/modules/ui/ModalAnchorEditor.d.ts +152 -0
- package/types/modules/ui/SelectMenu.d.ts +107 -0
- package/types/modules/{_DragHandle.d.ts → ui/_DragHandle.d.ts} +1 -0
- package/types/modules/ui/index.d.ts +4 -0
- package/types/plugins/browser/audioGallery.d.ts +33 -41
- package/types/plugins/browser/fileBrowser.d.ts +42 -50
- package/types/plugins/browser/fileGallery.d.ts +33 -41
- package/types/plugins/browser/imageGallery.d.ts +30 -37
- package/types/plugins/browser/videoGallery.d.ts +33 -41
- package/types/plugins/command/blockquote.d.ts +4 -21
- package/types/plugins/command/exportPDF.d.ts +23 -33
- package/types/plugins/command/fileUpload.d.ts +80 -100
- package/types/plugins/command/list_bulleted.d.ts +9 -35
- package/types/plugins/command/list_numbered.d.ts +9 -35
- package/types/plugins/dropdown/align.d.ts +23 -46
- package/types/plugins/dropdown/backgroundColor.d.ts +35 -53
- package/types/plugins/dropdown/blockStyle.d.ts +45 -0
- package/types/plugins/dropdown/font.d.ts +18 -41
- package/types/plugins/dropdown/fontColor.d.ts +35 -53
- package/types/plugins/dropdown/hr.d.ts +26 -52
- package/types/plugins/dropdown/layout.d.ts +19 -25
- package/types/plugins/dropdown/lineHeight.d.ts +21 -39
- package/types/plugins/dropdown/list.d.ts +6 -34
- package/types/plugins/dropdown/paragraphStyle.d.ts +34 -45
- package/types/plugins/dropdown/table/index.d.ts +158 -0
- package/types/plugins/dropdown/table/render/table.html.d.ts +71 -0
- package/types/plugins/dropdown/table/render/table.menu.d.ts +59 -0
- package/types/plugins/dropdown/table/services/table.cell.d.ts +76 -0
- package/types/plugins/dropdown/table/services/table.clipboard.d.ts +26 -0
- package/types/plugins/dropdown/table/services/table.grid.d.ts +77 -0
- package/types/plugins/dropdown/table/services/table.resize.d.ts +72 -0
- package/types/plugins/dropdown/table/services/table.selection.d.ts +59 -0
- package/types/plugins/dropdown/table/services/table.style.d.ts +162 -0
- package/types/plugins/dropdown/table/shared/table.constants.d.ts +134 -0
- package/types/plugins/dropdown/table/shared/table.utils.d.ts +91 -0
- package/types/plugins/dropdown/template.d.ts +19 -25
- package/types/plugins/dropdown/textStyle.d.ts +23 -30
- package/types/plugins/field/mention.d.ts +66 -72
- package/types/plugins/index.d.ts +41 -40
- package/types/plugins/input/fontSize.d.ts +57 -96
- package/types/plugins/input/pageNavigator.d.ts +5 -8
- package/types/plugins/modal/audio.d.ts +60 -153
- package/types/plugins/modal/drawing.d.ts +16 -118
- package/types/plugins/modal/embed.d.ts +46 -166
- package/types/plugins/modal/image/index.d.ts +281 -0
- package/types/plugins/modal/image/render/image.html.d.ts +45 -0
- package/types/plugins/modal/image/services/image.size.d.ts +55 -0
- package/types/plugins/modal/image/services/image.upload.d.ts +24 -0
- package/types/plugins/modal/image/shared/image.constants.d.ts +17 -0
- package/types/plugins/modal/link.d.ts +46 -66
- package/types/plugins/modal/math.d.ts +17 -86
- package/types/plugins/modal/{video.d.ts → video/index.d.ts} +89 -221
- package/types/plugins/modal/video/render/video.html.d.ts +37 -0
- package/types/plugins/modal/video/services/video.size.d.ts +74 -0
- package/types/plugins/modal/video/services/video.upload.d.ts +19 -0
- package/types/plugins/popup/anchor.d.ts +8 -38
- package/types/suneditor.d.ts +55 -24
- package/types/typedef.d.ts +344 -228
- package/CONTRIBUTING.md +0 -186
- package/src/core/base/eventHandlers/handler_ww_key_input.js +0 -1200
- package/src/core/base/eventHandlers/handler_ww_mouse.js +0 -194
- package/src/core/base/eventManager.js +0 -1523
- package/src/core/class/component.js +0 -856
- package/src/core/class/format.js +0 -3433
- package/src/core/class/menu.js +0 -346
- package/src/core/class/selection.js +0 -610
- package/src/core/class/shortcuts.js +0 -98
- package/src/core/class/toolbar.js +0 -431
- package/src/core/class/ui.js +0 -424
- package/src/core/class/viewer.js +0 -750
- package/src/core/section/actives.js +0 -266
- package/src/core/section/context.js +0 -102
- package/src/editorInjector/_classes.js +0 -36
- package/src/editorInjector/_core.js +0 -87
- package/src/editorInjector/index.js +0 -73
- package/src/modules/ApiManager.js +0 -191
- package/src/modules/Controller.js +0 -474
- package/src/modules/Modal.js +0 -346
- package/src/modules/index.js +0 -14
- package/src/plugins/dropdown/table.js +0 -4034
- package/src/plugins/modal/image.js +0 -1376
- package/src/plugins/modal/video.js +0 -1226
- package/types/core/base/eventHandlers/handler_toolbar.d.ts +0 -41
- package/types/core/base/eventHandlers/handler_ww_clipboard.d.ts +0 -40
- package/types/core/base/eventHandlers/handler_ww_dragDrop.d.ts +0 -35
- package/types/core/base/eventHandlers/handler_ww_key_input.d.ts +0 -45
- package/types/core/base/eventHandlers/handler_ww_mouse.d.ts +0 -39
- package/types/core/base/eventManager.d.ts +0 -401
- package/types/core/class/char.d.ts +0 -61
- package/types/core/class/component.d.ts +0 -213
- package/types/core/class/format.d.ts +0 -623
- package/types/core/class/html.d.ts +0 -430
- package/types/core/class/menu.d.ts +0 -126
- package/types/core/class/nodeTransform.d.ts +0 -93
- package/types/core/class/offset.d.ts +0 -522
- package/types/core/class/selection.d.ts +0 -188
- package/types/core/class/shortcuts.d.ts +0 -142
- package/types/core/class/toolbar.d.ts +0 -189
- package/types/core/class/ui.d.ts +0 -164
- package/types/core/class/viewer.d.ts +0 -140
- package/types/core/section/actives.d.ts +0 -46
- package/types/core/section/context.d.ts +0 -45
- package/types/editorInjector/_classes.d.ts +0 -41
- package/types/editorInjector/_core.d.ts +0 -87
- package/types/editorInjector/index.d.ts +0 -69
- package/types/modules/ApiManager.d.ts +0 -125
- package/types/modules/Browser.d.ts +0 -326
- package/types/modules/ColorPicker.d.ts +0 -135
- package/types/modules/Controller.d.ts +0 -251
- package/types/modules/Figure.d.ts +0 -517
- package/types/modules/FileManager.d.ts +0 -202
- package/types/modules/Modal.d.ts +0 -111
- package/types/modules/ModalAnchorEditor.d.ts +0 -236
- package/types/modules/SelectMenu.d.ts +0 -194
- package/types/modules/index.d.ts +0 -26
- package/types/plugins/dropdown/formatBlock.d.ts +0 -55
- package/types/plugins/dropdown/table.d.ts +0 -627
- package/types/plugins/modal/image.d.ts +0 -451
- /package/{LICENSE → LICENSE.txt} +0 -0
package/src/themes/dark.css
CHANGED
|
@@ -1,132 +1,155 @@
|
|
|
1
|
+
/** Theme color tokens used by suneditor.css and suneditor-contents.css. */
|
|
2
|
+
/** [ assets/design/color.css ] */
|
|
3
|
+
|
|
1
4
|
.sun-editor.se-theme-dark,
|
|
2
5
|
.sun-editor-editable.se-theme-dark {
|
|
3
6
|
/** --------------------------- content - [colors] ----------- */
|
|
4
|
-
|
|
5
|
-
--se-
|
|
6
|
-
--se-
|
|
7
|
-
--se-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
--se-edit-
|
|
11
|
-
--se-edit-
|
|
12
|
-
--se-edit-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
--se-edit-
|
|
16
|
-
--se-edit-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
--se-edit-
|
|
20
|
-
--se-edit-
|
|
21
|
-
--se-edit-
|
|
22
|
-
--se-edit-
|
|
7
|
+
/* caret and placeholder */
|
|
8
|
+
--se-caret-color: #e4e4e4;
|
|
9
|
+
--se-drag-caret-color: #86f0ff;
|
|
10
|
+
--se-placeholder-color: #9aa0a6;
|
|
11
|
+
|
|
12
|
+
/* editable text tones */
|
|
13
|
+
--se-edit-font-color: #e4e4e4;
|
|
14
|
+
--se-edit-font-pre: #d0d0d0;
|
|
15
|
+
--se-edit-font-quote: #b5b5b5;
|
|
16
|
+
|
|
17
|
+
/* editable surfaces */
|
|
18
|
+
--se-edit-background-color: #212121;
|
|
19
|
+
--se-edit-background-pre: #1a2a30;
|
|
20
|
+
|
|
21
|
+
/* content border scale */
|
|
22
|
+
--se-edit-border-light: #3d5c6e;
|
|
23
|
+
--se-edit-border-dark: #2e4a5a;
|
|
24
|
+
--se-edit-border-dark-n1: #355363;
|
|
25
|
+
--se-edit-border-dark-n2: #456d7f;
|
|
26
|
+
--se-edit-border-table: #5e5e5e;
|
|
27
|
+
|
|
28
|
+
/* links and horizontal rules */
|
|
29
|
+
--se-edit-anchor: #a7b8d6;
|
|
30
|
+
--se-edit-anchor-on-back: #2f3b4a;
|
|
31
|
+
--se-edit-anchor-on-font: #ffffff;
|
|
32
|
+
--se-edit-hr-color: #777;
|
|
33
|
+
--se-edit-hr-on-back: #566070;
|
|
34
|
+
|
|
35
|
+
/* content interaction states */
|
|
36
|
+
--se-edit-active: #64c7da;
|
|
37
|
+
--se-edit-hover: #58c0d2;
|
|
38
|
+
--se-edit-outline: #424242;
|
|
23
39
|
|
|
24
40
|
/** --------------------------- layout - [colors] ----------- */
|
|
25
|
-
|
|
41
|
+
/* main shell and typography */
|
|
26
42
|
--se-main-font-family: Helvetica Neue;
|
|
27
|
-
--se-main-out-color: #
|
|
28
|
-
--se-main-color: #
|
|
29
|
-
--se-main-color-lighter: #
|
|
30
|
-
--se-main-background-color: #
|
|
31
|
-
--se-code-view-color: #
|
|
32
|
-
--se-main-font-color: #
|
|
33
|
-
--se-code-view-background-color: #
|
|
34
|
-
--se-main-divider-color: #
|
|
35
|
-
--se-main-border-color: #
|
|
36
|
-
--se-main-outline-color: #
|
|
37
|
-
--se-main-shadow-color: #
|
|
38
|
-
--se-statusbar-font-color: #
|
|
39
|
-
--se-overlay-background-color:
|
|
40
|
-
|
|
41
|
-
/* hover */
|
|
42
|
-
--se-hover-color: #
|
|
43
|
-
--se-hover-dark-color: #
|
|
44
|
-
--se-hover-dark2-color: #
|
|
45
|
-
--se-hover-dark3-color: #
|
|
46
|
-
--se-hover-light-color: #
|
|
47
|
-
--se-hover-light2-color: #
|
|
48
|
-
--se-hover-light3-color: #
|
|
49
|
-
|
|
50
|
-
/* active */
|
|
51
|
-
--se-active-color: #
|
|
52
|
-
--se-active-hover-color: #
|
|
53
|
-
--se-active-dark-color: #
|
|
54
|
-
--se-active-dark2-color: #
|
|
55
|
-
--se-active-dark3-color: #
|
|
56
|
-
--se-active-dark4-color: #
|
|
57
|
-
--se-active-dark5-color: #
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
--se-active-
|
|
61
|
-
--se-active-
|
|
62
|
-
--se-active-
|
|
63
|
-
--se-active-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
--se-modal-
|
|
75
|
-
--se-modal-
|
|
76
|
-
--se-modal-
|
|
77
|
-
--se-modal-
|
|
78
|
-
--se-modal-
|
|
43
|
+
--se-main-out-color: #2c2c2c;
|
|
44
|
+
--se-main-color: #e4e4e4;
|
|
45
|
+
--se-main-color-lighter: #cfcfcf;
|
|
46
|
+
--se-main-background-color: #212121;
|
|
47
|
+
--se-code-view-color: #111111;
|
|
48
|
+
--se-main-font-color: #e4e4e4;
|
|
49
|
+
--se-code-view-background-color: #dadada;
|
|
50
|
+
--se-main-divider-color: #333;
|
|
51
|
+
--se-main-border-color: #444;
|
|
52
|
+
--se-main-outline-color: #2c2c2c;
|
|
53
|
+
--se-main-shadow-color: #000;
|
|
54
|
+
--se-statusbar-font-color: #a1a1a1;
|
|
55
|
+
--se-overlay-background-color: rgba(0, 0, 0, 0.6);
|
|
56
|
+
|
|
57
|
+
/* hover states */
|
|
58
|
+
--se-hover-color: #2f3f44;
|
|
59
|
+
--se-hover-dark-color: #4b6b72;
|
|
60
|
+
--se-hover-dark2-color: #5a7c84;
|
|
61
|
+
--se-hover-dark3-color: #689099;
|
|
62
|
+
--se-hover-light-color: #7fb0bb;
|
|
63
|
+
--se-hover-light2-color: #8fc2cc;
|
|
64
|
+
--se-hover-light3-color: #a2d6df;
|
|
65
|
+
|
|
66
|
+
/* active foreground states */
|
|
67
|
+
--se-active-color: #64c7da;
|
|
68
|
+
--se-active-hover-color: #7ad9e8;
|
|
69
|
+
--se-active-dark-color: #46b4c8;
|
|
70
|
+
--se-active-dark2-color: #379daf;
|
|
71
|
+
--se-active-dark3-color: #64c7da;
|
|
72
|
+
--se-active-dark4-color: #46b4c8;
|
|
73
|
+
--se-active-dark5-color: #2a7f8f;
|
|
74
|
+
|
|
75
|
+
/* active background states */
|
|
76
|
+
--se-active-light-color: #26383d;
|
|
77
|
+
--se-active-light2-color: #2c4349;
|
|
78
|
+
--se-active-light3-color: #334f56;
|
|
79
|
+
--se-active-light4-color: #3b5c64;
|
|
80
|
+
--se-active-light5-color: #446b75;
|
|
81
|
+
--se-active-light6-color: #4f7d88;
|
|
82
|
+
|
|
83
|
+
/* floating layer shadow */
|
|
84
|
+
--se-shadow-layer-color: rgba(0, 0, 0, 0.38);
|
|
85
|
+
|
|
86
|
+
/* drag feedback */
|
|
87
|
+
--se-drag-over-color: #f0c34a;
|
|
88
|
+
|
|
89
|
+
/* modal, browser, dropdown surfaces */
|
|
90
|
+
--se-modal-background-color: #2b2b2b;
|
|
91
|
+
--se-modal-color: #f1f1f1;
|
|
92
|
+
--se-modal-border-color: #4a4a4a;
|
|
93
|
+
--se-modal-anchor-color: #95a5bc;
|
|
94
|
+
--se-modal-preview-color: #c2c2c2;
|
|
95
|
+
--se-modal-file-input-background-color: #1a1a1a;
|
|
96
|
+
--se-modal-input-disabled-color: #888;
|
|
79
97
|
--se-modal-input-disabled-background-color: #333;
|
|
80
98
|
|
|
81
|
-
/* dropdown
|
|
82
|
-
--se-dropdown-font-color: #
|
|
83
|
-
|
|
84
|
-
/* controller */
|
|
85
|
-
--se-controller-border-color: #
|
|
86
|
-
--se-controller-background-color: #
|
|
87
|
-
--se-controller-color: #
|
|
88
|
-
--se-shadow-controller-color: rgba(
|
|
89
|
-
|
|
90
|
-
/*
|
|
91
|
-
--se-input-btn-border-color: #
|
|
92
|
-
--se-input-btn-disabled-color: #
|
|
93
|
-
|
|
94
|
-
/*
|
|
95
|
-
--se-
|
|
96
|
-
--se-
|
|
97
|
-
--se-
|
|
98
|
-
--se-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
--se-success-
|
|
102
|
-
--se-success-
|
|
103
|
-
--se-success-
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
/* dropdown text */
|
|
100
|
+
--se-dropdown-font-color: #e4e4e4;
|
|
101
|
+
|
|
102
|
+
/* media/controller chrome */
|
|
103
|
+
--se-controller-border-color: #3a3a3a;
|
|
104
|
+
--se-controller-background-color: #212121;
|
|
105
|
+
--se-controller-color: #e4e4e4;
|
|
106
|
+
--se-shadow-controller-color: rgba(0, 0, 0, 0.45);
|
|
107
|
+
|
|
108
|
+
/* input-side button states */
|
|
109
|
+
--se-input-btn-border-color: #3a3a3a;
|
|
110
|
+
--se-input-btn-disabled-color: #777;
|
|
111
|
+
|
|
112
|
+
/* table picker */
|
|
113
|
+
--se-table-picker-color: #3a3a3a;
|
|
114
|
+
--se-table-picker-border-color: #555;
|
|
115
|
+
--se-table-picker-highlight-color: #304a5c;
|
|
116
|
+
--se-table-picker-highlight-border-color: #6589a0;
|
|
117
|
+
|
|
118
|
+
/* success status palette */
|
|
119
|
+
--se-success-color: #22c55e;
|
|
120
|
+
--se-success-dark-color: #16a34a;
|
|
121
|
+
--se-success-dark2-color: #15803d;
|
|
122
|
+
--se-success-dark3-color: #166534;
|
|
123
|
+
--se-success-light-color: #4ade80;
|
|
124
|
+
--se-success-light2-color: #86efac;
|
|
125
|
+
--se-success-light3-color: #c7f7e3;
|
|
126
|
+
--se-success-light4-color: #e9fdf5;
|
|
127
|
+
--se-success-light5-color: #f5fffb;
|
|
128
|
+
|
|
129
|
+
/* error status palette */
|
|
106
130
|
--se-error-color: #ef4444;
|
|
107
|
-
--se-error-dark-color: #
|
|
108
|
-
--se-error-dark2-color: #
|
|
109
|
-
--se-error-dark3-color: #
|
|
131
|
+
--se-error-dark-color: #dc2626;
|
|
132
|
+
--se-error-dark2-color: #b91c1c;
|
|
133
|
+
--se-error-dark3-color: #991b1b;
|
|
110
134
|
--se-error-light-color: #f87171;
|
|
111
135
|
--se-error-light2-color: #fca5a5;
|
|
112
|
-
--se-error-light3-color: #
|
|
113
|
-
--se-error-light4-color: #
|
|
114
|
-
--se-error-light5-color: #
|
|
115
|
-
|
|
116
|
-
/* document
|
|
117
|
-
--se-doc-background: #
|
|
118
|
-
--se-doc-info-page-font-color: #
|
|
119
|
-
--se-doc-info-page-background-color: #
|
|
120
|
-
|
|
121
|
-
--se-doc-info-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
--se-show-blocks-color: #
|
|
129
|
-
--se-show-blocks-
|
|
130
|
-
--se-show-blocks-
|
|
131
|
-
--se-show-blocks-component-color: #f4b124;
|
|
136
|
+
--se-error-light3-color: #fee2e2;
|
|
137
|
+
--se-error-light4-color: #fef2f2;
|
|
138
|
+
--se-error-light5-color: #fff5f5;
|
|
139
|
+
|
|
140
|
+
/* document mode palette */
|
|
141
|
+
--se-doc-background: #2c2c2c;
|
|
142
|
+
--se-doc-info-page-font-color: #212121;
|
|
143
|
+
--se-doc-info-page-background-color: #d0d0d0;
|
|
144
|
+
--se-doc-info-font-color: #d0d0d0;
|
|
145
|
+
--se-doc-info-active-color: #7f90a8;
|
|
146
|
+
|
|
147
|
+
/* loading indicator */
|
|
148
|
+
--se-loading-color: #7f90a8;
|
|
149
|
+
|
|
150
|
+
/* show-blocks debug colors */
|
|
151
|
+
--se-show-blocks-color: #7f90a8;
|
|
152
|
+
--se-show-blocks-li-color: #c084fc;
|
|
153
|
+
--se-show-blocks-pre-color: #34d399;
|
|
154
|
+
--se-show-blocks-component-color: #f0c34a;
|
|
132
155
|
}
|
package/src/typedef.js
CHANGED
|
@@ -2,26 +2,50 @@
|
|
|
2
2
|
* @fileoverview Global Type Declarations for SunEditor Custom Types
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
// --------------------------------------------------------- [Node] ---------------------------------------------------------------------------------------------------
|
|
6
5
|
/**
|
|
7
|
-
* @
|
|
6
|
+
* @namespace SunEditor
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
//
|
|
9
|
+
// ================================================================================================================================
|
|
10
|
+
// === PUBLIC API TYPES (User-facing types for common use cases)
|
|
11
|
+
// ================================================================================================================================
|
|
12
|
+
|
|
13
|
+
// --------------------------------------------------------- [Editor Types] ---------------------------------------------------------------------------------------------------
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {import('./core/editor').default} SunEditor.Instance
|
|
16
|
+
* @typedef {import('./core/kernel/coreKernel').default} SunEditor.Kernel
|
|
17
|
+
* @typedef {import('./core/kernel/store').default} SunEditor.Store
|
|
18
|
+
* @typedef {import('./core/kernel/store').StoreState} SunEditor.StorePathMap
|
|
19
|
+
* @typedef {import('./core/kernel/coreKernel').Deps} SunEditor.Deps
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
// --------------------------------------------------------- [Init Options] ---------------------------------------------------------------------------------------------------
|
|
23
|
+
/**
|
|
24
|
+
* @typedef {import('./core/schema/options').EditorInitOptions} SunEditor.InitOptions
|
|
25
|
+
* @typedef {import('./core/schema/options').EditorFrameOptions} SunEditor.InitFrameOptions
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
// --------------------------------------------------------- [Context & Options] ---------------------------------------------------------------------------------------------------
|
|
11
29
|
/**
|
|
12
|
-
* @typedef {import('./core/
|
|
30
|
+
* @typedef {import('./core/config/contextProvider').ContextMap} SunEditor.Context
|
|
31
|
+
* @typedef {import('./core/config/optionProvider').BaseOptionsMap} SunEditor.Options
|
|
13
32
|
*/
|
|
14
33
|
|
|
34
|
+
// --------------------------------------------------------- [{Frame} Context & Options] ---------------------------------------------------------------------------------------------------
|
|
15
35
|
/**
|
|
16
|
-
* @typedef {import('./
|
|
36
|
+
* @typedef {import('./core/config/contextProvider').FrameContextMap} SunEditor.FrameContext
|
|
37
|
+
* @typedef {import('./core/config/optionProvider').FrameOptionsMap} SunEditor.FrameOptions
|
|
17
38
|
*/
|
|
18
39
|
|
|
19
40
|
/**
|
|
20
|
-
* @typedef {
|
|
41
|
+
* @typedef {HTMLElement & Window} SunEditor.EventWysiwyg
|
|
42
|
+
* @typedef {HTMLElement & HTMLIFrameElement} SunEditor.WysiwygFrame
|
|
43
|
+
* @typedef {Window & typeof globalThis} SunEditor.GlobalWindow
|
|
21
44
|
*/
|
|
22
45
|
|
|
46
|
+
// --------------------------------------------------------- [Component Types] ---------------------------------------------------------------------------------------------------
|
|
23
47
|
/**
|
|
24
|
-
* @typedef {Object}
|
|
48
|
+
* @typedef {Object} SunEditor.ComponentInfo
|
|
25
49
|
* @property {HTMLElement} target - The target element associated with the component.
|
|
26
50
|
* @property {string} pluginName - The name of the plugin related to the component.
|
|
27
51
|
* @property {Object<string, *>} options - Options related to the component.
|
|
@@ -35,96 +59,223 @@
|
|
|
35
59
|
*/
|
|
36
60
|
|
|
37
61
|
/**
|
|
38
|
-
* @typedef {
|
|
39
|
-
* @
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* @property {number} rootKey Current root key
|
|
47
|
-
* @property {Range} _range Current range object
|
|
48
|
-
* @property {boolean} _onMousedown Mouse down event status
|
|
62
|
+
* @typedef {"auto"|"select"|"line"|"none"} SunEditor.ComponentInsertType
|
|
63
|
+
* @description Component insertion behavior for selection and cursor placement.
|
|
64
|
+
* - For inline components: places the cursor near the inserted component or selects it if no nearby range is available.
|
|
65
|
+
* - For block components: executes behavior based on `selectMode`:
|
|
66
|
+
* - `auto`: Move cursor to the next line if possible, otherwise select the component.
|
|
67
|
+
* - `select`: Always select the inserted component.
|
|
68
|
+
* - `line`: Move cursor to the next line if possible, or create a new line and move there.
|
|
69
|
+
* - `none`: Do nothing.
|
|
49
70
|
*/
|
|
50
71
|
|
|
51
|
-
// --------------------------------------------------------- [
|
|
72
|
+
// --------------------------------------------------------- [DOM/Utility Types] ---------------------------------------------------------------------------------------------------
|
|
52
73
|
/**
|
|
53
|
-
* @typedef {
|
|
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
|
|
74
|
+
* @typedef {Array<Node>|HTMLCollection|NodeList} SunEditor.NodeCollection
|
|
58
75
|
*/
|
|
59
76
|
|
|
77
|
+
// --------------------------------------------------------- [Module Types - Cross-module Public API] ---------------------------------------------------------------------------------------------------
|
|
60
78
|
/**
|
|
61
|
-
* @typedef {
|
|
62
|
-
*
|
|
63
|
-
* @
|
|
64
|
-
* @
|
|
79
|
+
* @typedef {import('./modules/contract/Controller').ControllerInfo} SunEditor.Module.Controller.Info
|
|
80
|
+
*
|
|
81
|
+
* @typedef {import('./modules/contract/Figure').FigureInfo} SunEditor.Module.Figure.Info
|
|
82
|
+
* @typedef {import('./modules/contract/Figure').FigureTargetInfo} SunEditor.Module.Figure.TargetInfo
|
|
83
|
+
* @typedef {import('./modules/contract/Figure').FigureControlButton} SunEditor.Module.Figure.ControlButton
|
|
84
|
+
* @typedef {import('./modules/contract/Figure').FigureControlResize} SunEditor.Module.Figure.ControlResize
|
|
85
|
+
* @typedef {import('./modules/contract/Figure').ControlCustomAction} SunEditor.Module.Figure.ControlCustomAction
|
|
86
|
+
* @typedef {import('./modules/contract/Figure').FigureControls} SunEditor.Module.Figure.Controls
|
|
87
|
+
*
|
|
88
|
+
* @typedef {import('./modules/contract/Browser').BrowserFile} SunEditor.Module.Browser.File
|
|
89
|
+
*
|
|
90
|
+
* @typedef {import('./modules/contract/HueSlider').HueSliderColor} SunEditor.Module.HueSlider.Color
|
|
65
91
|
*/
|
|
66
92
|
|
|
67
|
-
// --------------------------------------------------------- [Plugin
|
|
93
|
+
// --------------------------------------------------------- [Plugin Hook Types] ---------------------------------------------------------------------------------------------------
|
|
94
|
+
// Editor hooks - Called by Editor core
|
|
95
|
+
// Event sync
|
|
68
96
|
/**
|
|
69
|
-
* @typedef {
|
|
70
|
-
* @
|
|
71
|
-
* @
|
|
97
|
+
* @typedef {typeof import('./hooks/base').Event.Active} SunEditor.Hook.Event.Active
|
|
98
|
+
* @typedef {typeof import('./hooks/base').Event.OnFocus} SunEditor.Hook.Event.OnFocus
|
|
99
|
+
* @typedef {typeof import('./hooks/base').Event.OnBlur} SunEditor.Hook.Event.OnBlur
|
|
100
|
+
* @typedef {typeof import('./hooks/base').Event.OnMouseMove} SunEditor.Hook.Event.OnMouseMove
|
|
101
|
+
* @typedef {typeof import('./hooks/base').Event.OnScroll} SunEditor.Hook.Event.OnScroll
|
|
72
102
|
*/
|
|
73
103
|
|
|
104
|
+
// Event sync/async
|
|
74
105
|
/**
|
|
75
|
-
* @typedef {
|
|
76
|
-
* @
|
|
77
|
-
* @
|
|
78
|
-
* @
|
|
79
|
-
* @
|
|
106
|
+
* @typedef {typeof import('./hooks/base').Event.OnBeforeInput} SunEditor.Hook.Event.OnBeforeInput
|
|
107
|
+
* @typedef {typeof import('./hooks/base').Event.OnBeforeInputAsync} SunEditor.Hook.Event.OnBeforeInputAsync
|
|
108
|
+
* @typedef {typeof import('./hooks/base').Event.OnInput} SunEditor.Hook.Event.OnInput
|
|
109
|
+
* @typedef {typeof import('./hooks/base').Event.OnInputAsync} SunEditor.Hook.Event.OnInputAsync
|
|
110
|
+
* @typedef {typeof import('./hooks/base').Event.OnKeyDown} SunEditor.Hook.Event.OnKeyDown
|
|
111
|
+
* @typedef {typeof import('./hooks/base').Event.OnKeyDownAsync} SunEditor.Hook.Event.OnKeyDownAsync
|
|
112
|
+
* @typedef {typeof import('./hooks/base').Event.OnKeyUp} SunEditor.Hook.Event.OnKeyUp
|
|
113
|
+
* @typedef {typeof import('./hooks/base').Event.OnKeyUpAsync} SunEditor.Hook.Event.OnKeyUpAsync
|
|
114
|
+
* @typedef {typeof import('./hooks/base').Event.OnMouseDown} SunEditor.Hook.Event.OnMouseDown
|
|
115
|
+
* @typedef {typeof import('./hooks/base').Event.OnMouseDownAsync} SunEditor.Hook.Event.OnMouseDownAsync
|
|
116
|
+
* @typedef {typeof import('./hooks/base').Event.OnMouseUp} SunEditor.Hook.Event.OnMouseUp
|
|
117
|
+
* @typedef {typeof import('./hooks/base').Event.OnMouseUpAsync} SunEditor.Hook.Event.OnMouseUpAsync
|
|
118
|
+
* @typedef {typeof import('./hooks/base').Event.OnClick} SunEditor.Hook.Event.OnClick
|
|
119
|
+
* @typedef {typeof import('./hooks/base').Event.OnClickAsync} SunEditor.Hook.Event.OnClickAsync
|
|
120
|
+
* @typedef {typeof import('./hooks/base').Event.OnMouseLeave} SunEditor.Hook.Event.OnMouseLeave
|
|
121
|
+
* @typedef {typeof import('./hooks/base').Event.OnMouseLeaveAsync} SunEditor.Hook.Event.OnMouseLeaveAsync
|
|
122
|
+
* @typedef {typeof import('./hooks/base').Event.OnFilePasteAndDrop} SunEditor.Hook.Event.OnFilePasteAndDrop
|
|
123
|
+
* @typedef {typeof import('./hooks/base').Event.OnFilePasteAndDropAsync} SunEditor.Hook.Event.OnFilePasteAndDropAsync
|
|
124
|
+
* @typedef {typeof import('./hooks/base').Event.OnPaste} SunEditor.Hook.Event.OnPaste
|
|
125
|
+
* @typedef {typeof import('./hooks/base').Event.OnPasteAsync} SunEditor.Hook.Event.OnPasteAsync
|
|
80
126
|
*/
|
|
81
127
|
|
|
128
|
+
// Core etc
|
|
82
129
|
/**
|
|
83
|
-
* @typedef {
|
|
84
|
-
* @
|
|
85
|
-
* @
|
|
86
|
-
* @
|
|
130
|
+
* @typedef {typeof import('./hooks/base').Core.RetainFormat} SunEditor.Hook.Core.RetainFormat
|
|
131
|
+
* @typedef {typeof import('./hooks/base').Core.Shortcut} SunEditor.Hook.Core.Shortcut
|
|
132
|
+
* @typedef {typeof import('./hooks/base').Core.SetDir} SunEditor.Hook.Core.SetDir
|
|
133
|
+
* @typedef {typeof import('./hooks/base').Core.Init} SunEditor.Hook.Core.Init
|
|
87
134
|
*/
|
|
88
135
|
|
|
136
|
+
// component
|
|
89
137
|
/**
|
|
90
|
-
* @typedef {
|
|
91
|
-
* @
|
|
92
|
-
* @
|
|
93
|
-
* @
|
|
94
|
-
* @
|
|
95
|
-
* @property {string} keyCode - KeyBoardEvent.code
|
|
96
|
-
* @property {__se__EditorCore} editor - The root editor instance
|
|
138
|
+
* @typedef {typeof import('./interfaces/contracts').EditorComponent.prototype.componentSelect} SunEditor.Hook.Component.Select
|
|
139
|
+
* @typedef {typeof import('./interfaces/contracts').EditorComponent.prototype.componentDeselect} SunEditor.Hook.Component.Deselect
|
|
140
|
+
* @typedef {typeof import('./interfaces/contracts').EditorComponent.prototype.componentEdit} SunEditor.Hook.Component.Edit
|
|
141
|
+
* @typedef {typeof import('./interfaces/contracts').EditorComponent.prototype.componentDestroy} SunEditor.Hook.Component.Destroy
|
|
142
|
+
* @typedef {typeof import('./interfaces/contracts').EditorComponent.prototype.componentCopy} SunEditor.Hook.Component.Copy
|
|
97
143
|
*/
|
|
98
144
|
|
|
145
|
+
// Module hooks - Called by Module instances (defined in interfaces/contracts.js)
|
|
99
146
|
/**
|
|
100
|
-
* @typedef {
|
|
101
|
-
* @
|
|
102
|
-
* @
|
|
103
|
-
* @
|
|
104
|
-
* @
|
|
147
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleModal.prototype.modalAction} SunEditor.Hook.Modal.Action
|
|
148
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleModal.prototype.modalOn} SunEditor.Hook.Modal.On
|
|
149
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleModal.prototype.modalInit} SunEditor.Hook.Modal.Init
|
|
150
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleModal.prototype.modalOff} SunEditor.Hook.Modal.Off
|
|
151
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleModal.prototype.modalResize} SunEditor.Hook.Modal.Resize
|
|
152
|
+
*
|
|
153
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleController.prototype.controllerAction} SunEditor.Hook.Controller.Action
|
|
154
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleController.prototype.controllerOn} SunEditor.Hook.Controller.On
|
|
155
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleController.prototype.controllerClose} SunEditor.Hook.Controller.Close
|
|
156
|
+
*
|
|
157
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleBrowser.prototype.browserInit} SunEditor.Hook.Browser.Init
|
|
158
|
+
*
|
|
159
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleColorPicker.prototype.colorPickerAction} SunEditor.Hook.ColorPicker.Action
|
|
160
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleColorPicker.prototype.colorPickerHueSliderOpen} SunEditor.Hook.ColorPicker.HueSliderOpen
|
|
161
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleColorPicker.prototype.colorPickerHueSliderClose} SunEditor.Hook.ColorPicker.HueSliderClose
|
|
162
|
+
*
|
|
163
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleHueSlider.prototype.hueSliderAction} SunEditor.Hook.HueSlider.Action
|
|
164
|
+
* @typedef {typeof import('./interfaces/contracts').ModuleHueSlider.prototype.hueSliderCancelAction} SunEditor.Hook.HueSlider.CancelAction
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
// --------------------------------------------------------- [Plugin Hook parameter types] ---------------------------------------------------------------------------------------------------
|
|
168
|
+
/**
|
|
169
|
+
* @typedef {import('./hooks/params').MouseEventInfo} SunEditor.HookParams.MouseEvent
|
|
170
|
+
* @typedef {import('./hooks/params').KeyEventInfo} SunEditor.HookParams.KeyEvent
|
|
171
|
+
* @typedef {import('./hooks/params').ShortcutInfo} SunEditor.HookParams.Shortcut
|
|
172
|
+
* @typedef {import('./hooks/params').FilePasteDrop} SunEditor.HookParams.FilePasteDrop
|
|
173
|
+
* @typedef {import('./hooks/params').FocusBlurEvent} SunEditor.HookParams.FocusBlur
|
|
174
|
+
* @typedef {import('./hooks/params').ScrollEvent} SunEditor.HookParams.Scroll
|
|
175
|
+
* @typedef {import('./hooks/params').InputEventWithData} SunEditor.HookParams.InputWithData
|
|
176
|
+
* @typedef {import('./hooks/params').Paste} SunEditor.HookParams.Paste
|
|
177
|
+
* @typedef {import('./hooks/params').Mouse} SunEditor.HookParams.Mouse
|
|
178
|
+
* @typedef {import('./hooks/params').Keyboard} SunEditor.HookParams.Keyboard
|
|
179
|
+
*
|
|
180
|
+
* @typedef {import('./hooks/params').ToolbarInputKeyDown} SunEditor.HookParams.ToolbarInputKeyDown
|
|
181
|
+
* @typedef {import('./hooks/params').ToolbarInputChange} SunEditor.HookParams.ToolbarInputChange
|
|
182
|
+
*
|
|
183
|
+
* @typedef {import('./hooks/params').CopyComponent} SunEditor.HookParams.CopyComponent
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
//** ****************************************************************************************************************************************************************************************** */
|
|
187
|
+
|
|
188
|
+
// ================================================================================================================================
|
|
189
|
+
// === INTERNAL/ADVANCED TYPES (Framework internals and advanced use cases)
|
|
190
|
+
// ================================================================================================================================
|
|
191
|
+
|
|
192
|
+
// --------------------------------------------------------- [Event Types] ---------------------------------------------------------------------------------------------------
|
|
193
|
+
/**
|
|
194
|
+
* EventManager event information
|
|
195
|
+
* @typedef {Object} SunEditor.Event.Info
|
|
196
|
+
* @property {*} target Target element
|
|
197
|
+
* @property {string} type Event type
|
|
198
|
+
* @property {EventListenerOrEventListenerObject} listener Event listener
|
|
199
|
+
* @property {boolean|AddEventListenerOptions} [useCapture] Event useCapture option
|
|
200
|
+
*/
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* EventManager global event information
|
|
204
|
+
* @typedef {Object} SunEditor.Event.GlobalInfo
|
|
205
|
+
* @property {string} type Event type
|
|
206
|
+
* @property {(...args: *) => *} listener Event listener
|
|
207
|
+
* @property {boolean|AddEventListenerOptions} [useCapture] Use event capture
|
|
105
208
|
*/
|
|
106
209
|
|
|
107
210
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* @
|
|
211
|
+
* EventHandlers object containing all event callback functions
|
|
212
|
+
* To access individual handler types, use indexed access:
|
|
213
|
+
* Use `SunEditor.Event.Handlers["onload"]` to get the `onload` callback type
|
|
214
|
+
* @typedef {import('./events').EventHandlers} SunEditor.Event.Handlers
|
|
112
215
|
*/
|
|
113
216
|
|
|
114
|
-
// --------------------------------------------------------- [Context] ---------------------------------------------------------------------------------------------------
|
|
115
217
|
/**
|
|
116
|
-
*
|
|
218
|
+
* EventParams - Event callback parameters
|
|
219
|
+
* @typedef {import('./events').BaseEvent} SunEditor.EventParams.BaseEvent
|
|
220
|
+
* @typedef {import('./events').ClipboardEvent} SunEditor.EventParams.ClipboardEvent
|
|
221
|
+
* @typedef {import('./events').FileManagementInfo} SunEditor.EventParams.FileManagementInfo
|
|
222
|
+
* @typedef {import('./events').ProcessInfo} SunEditor.EventParams.ProcessInfo
|
|
223
|
+
* @typedef {import('./events').ImageInfo} SunEditor.EventParams.ImageInfo
|
|
224
|
+
* @typedef {import('./events').VideoInfo} SunEditor.EventParams.VideoInfo
|
|
225
|
+
* @typedef {import('./events').AudioInfo} SunEditor.EventParams.AudioInfo
|
|
226
|
+
* @typedef {import('./events').FileInfo} SunEditor.EventParams.FileInfo
|
|
227
|
+
* @typedef {import('./events').EmbedInfo} SunEditor.EventParams.EmbedInfo
|
|
117
228
|
*/
|
|
118
229
|
|
|
119
230
|
/**
|
|
120
|
-
*
|
|
231
|
+
* The event object passed to the plugin event handler
|
|
232
|
+
* @typedef {import('./core/logic/shell/pluginManager').PluginEventParam} SunEditor.EventParams.PluginEvent
|
|
121
233
|
*/
|
|
122
234
|
|
|
235
|
+
// --------------------------------------------------------- [UI Types] ---------------------------------------------------------------------------------------------------
|
|
123
236
|
/**
|
|
124
|
-
*
|
|
237
|
+
* Special toolbar control strings
|
|
238
|
+
* - `"|"`: Vertical separator between buttons
|
|
239
|
+
* - `"/"`: Line break (start new row)
|
|
240
|
+
* - `":[title]-[icon]"`: More button with dropdown (e.g., `":More Button-default.more_vertical"`)
|
|
241
|
+
* - `"-left"|"-right"`: Float alignment for button groups
|
|
242
|
+
* - `"#fix"`: RTL direction fix
|
|
243
|
+
* - `"%100"|"%50"`: Responsive breakpoint (percentage)
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* // Basic separators and layout
|
|
247
|
+
* [['bold', 'italic', '|', 'underline'],] // Separator between buttons
|
|
248
|
+
* [['font', 'fontSize'], '/', ['align'],] // Line break between rows
|
|
249
|
+
*
|
|
250
|
+
* // Float alignment
|
|
251
|
+
* [['-right', 'undo', 'redo'],] // Float right side
|
|
252
|
+
*
|
|
253
|
+
* // More button (collapsible group)
|
|
254
|
+
* [[':Paragraph-More', 'fontSize', 'align'],] // Dropdown with title
|
|
255
|
+
*
|
|
256
|
+
* // Responsive breakpoint
|
|
257
|
+
* ['%50', ['bold', 'italic'],] // Show at 50% width breakpoint
|
|
258
|
+
*
|
|
259
|
+
* @typedef {"|"|"/"|`-${"left"|"right"|"center"}`|"#fix"|`:${string}-${string}`|`%${number}`} SunEditor.UI.ButtonSpecial
|
|
125
260
|
*/
|
|
126
261
|
|
|
127
|
-
//
|
|
262
|
+
// ========================================================= [ButtonList Generate] ===================================================================================================
|
|
128
263
|
/**
|
|
129
|
-
*
|
|
264
|
+
* === [ Button Types - Auto-generated ] ===
|
|
265
|
+
* ---[ Auto-generated by scripts/check/gen-button-types.cjs - DO NOT EDIT MANUALLY ]---
|
|
266
|
+
*
|
|
267
|
+
* Default command buttons available in the toolbar
|
|
268
|
+
* @typedef {"bold"|"underline"|"italic"|"strike"|"subscript"|"superscript"|"removeFormat"|"copyFormat"|"indent"|"outdent"|"fullScreen"|"showBlocks"|"codeView"|"undo"|"redo"|"preview"|"print"|"copy"|"dir"|"dir_ltr"|"dir_rtl"|"save"|"newDocument"|"selectAll"|"pageBreak"|"pageUp"|"pageDown"|"pageNavigator"} SunEditor.UI.ButtonCommand
|
|
269
|
+
*
|
|
270
|
+
* Plugin buttons available in the toolbar
|
|
271
|
+
* @typedef {"blockquote"|"exportPDF"|"fileUpload"|"list_bulleted"|"list_numbered"|"mention"|"align"|"font"|"fontColor"|"backgroundColor"|"list"|"table"|"blockStyle"|"hr"|"layout"|"lineHeight"|"template"|"paragraphStyle"|"textStyle"|"link"|"image"|"video"|"audio"|"embed"|"math"|"drawing"|"imageGallery"|"videoGallery"|"audioGallery"|"fileGallery"|"fileBrowser"|"fontSize"|"pageNavigator"|"anchor"} SunEditor.UI.ButtonPlugin
|
|
272
|
+
*
|
|
273
|
+
* Single button item in the toolbar (includes special controls and custom strings)
|
|
274
|
+
* @typedef {SunEditor.UI.ButtonCommand|SunEditor.UI.ButtonPlugin|SunEditor.UI.ButtonSpecial|string} SunEditor.UI.ButtonItem
|
|
275
|
+
*
|
|
276
|
+
* Button list configuration for the toolbar
|
|
277
|
+
* Supports nested arrays, special controls, and responsive breakpoint configurations
|
|
278
|
+
* @typedef {Array<SunEditor.UI.ButtonItem|SunEditor.UI.ButtonList|SunEditor.UI.ButtonSpecial>} SunEditor.UI.ButtonList
|
|
279
|
+
* ///
|
|
280
|
+
* ---[ End of auto-generated button types ]---
|
|
130
281
|
*/
|
|
@@ -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;
|