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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Controller } from '../../modules';
|
|
1
|
+
import { PluginPopup } from '../../interfaces';
|
|
2
|
+
import { Controller } from '../../modules/contract';
|
|
3
3
|
import { dom, env } from '../../helper';
|
|
4
4
|
|
|
5
5
|
const { _w } = env;
|
|
@@ -9,12 +9,11 @@ const { _w } = env;
|
|
|
9
9
|
* @description Anchor plugin
|
|
10
10
|
* - Allows you to create, edit, and delete elements that act as anchors (bookmarks) within a document.
|
|
11
11
|
*/
|
|
12
|
-
class Anchor extends
|
|
12
|
+
class Anchor extends PluginPopup {
|
|
13
13
|
static key = 'anchor';
|
|
14
|
-
static type = 'popup';
|
|
15
14
|
static className = '';
|
|
15
|
+
|
|
16
16
|
/**
|
|
17
|
-
* @this {Anchor}
|
|
18
17
|
* @param {HTMLElement} node - The node to check.
|
|
19
18
|
* @returns {HTMLElement|null} Returns a node if the node is a valid component.
|
|
20
19
|
*/
|
|
@@ -22,75 +21,76 @@ class Anchor extends EditorInjector {
|
|
|
22
21
|
return dom.check.isAnchor(node) && node.hasAttribute('id') && node.hasAttribute('data-se-anchor') ? node : null;
|
|
23
22
|
}
|
|
24
23
|
|
|
24
|
+
#element = null;
|
|
25
|
+
#range = null;
|
|
26
|
+
|
|
25
27
|
/**
|
|
26
28
|
* @constructor
|
|
27
|
-
* @param {
|
|
29
|
+
* @param {SunEditor.Kernel} editor - The core kernel
|
|
28
30
|
*/
|
|
29
31
|
constructor(editor) {
|
|
30
32
|
super(editor);
|
|
31
33
|
// plugin basic properties
|
|
32
|
-
this.title = this
|
|
34
|
+
this.title = this.$.lang.anchor;
|
|
33
35
|
this.icon = 'bookmark_anchor';
|
|
34
36
|
|
|
35
37
|
// members
|
|
36
38
|
const parser = new DOMParser();
|
|
37
|
-
const svgDoc = parser.parseFromString(this
|
|
39
|
+
const svgDoc = parser.parseFromString(this.$.icons.bookmark_anchor, 'image/svg+xml');
|
|
38
40
|
this.bookmarkIcon = svgDoc.documentElement;
|
|
39
|
-
this._element = null;
|
|
40
|
-
this._range = null;
|
|
41
41
|
|
|
42
42
|
// controller
|
|
43
|
-
const controllerSelectEl = CreateHTML_controller_select(this);
|
|
43
|
+
const controllerSelectEl = CreateHTML_controller_select(this.$);
|
|
44
44
|
this.displayId = controllerSelectEl.querySelector('.se-controller-display');
|
|
45
|
-
this.controllerSelect = new Controller(this, controllerSelectEl, { position: 'bottom', disabled: true }, Anchor.key);
|
|
45
|
+
this.controllerSelect = new Controller(this, this.$, controllerSelectEl, { position: 'bottom', disabled: true }, Anchor.key);
|
|
46
46
|
|
|
47
|
-
const controllerEl = CreateHTML_controller(this);
|
|
47
|
+
const controllerEl = CreateHTML_controller(this.$);
|
|
48
48
|
this.inputEl = controllerEl.querySelector('input');
|
|
49
|
-
this.controller = new Controller(this, controllerEl, { position: 'bottom', disabled: true, parents: [this.controllerSelect.form], parentsHide: true }, Anchor.key);
|
|
49
|
+
this.controller = new Controller(this, this.$, controllerEl, { position: 'bottom', disabled: true, parents: [this.controllerSelect.form], parentsHide: true }, Anchor.key);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* @
|
|
54
|
-
* @
|
|
53
|
+
* @override
|
|
54
|
+
* @type {PluginPopup['show']}
|
|
55
55
|
*/
|
|
56
56
|
show() {
|
|
57
|
-
this.controller.open((this
|
|
57
|
+
this.controller.open((this.#range = this.$.selection.getRange()));
|
|
58
58
|
_w.setTimeout(() => {
|
|
59
59
|
this.inputEl.focus();
|
|
60
60
|
}, 0);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* @
|
|
65
|
-
* @
|
|
66
|
-
* @param {HTMLElement} target Target component element
|
|
64
|
+
* @hook Editor.Component
|
|
65
|
+
* @type {SunEditor.Hook.Component.Select}
|
|
67
66
|
*/
|
|
68
|
-
|
|
69
|
-
this
|
|
67
|
+
componentSelect(target) {
|
|
68
|
+
this.#element = target;
|
|
70
69
|
this.displayId.textContent = target.getAttribute('id');
|
|
71
70
|
this.controllerSelect.open(target);
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
/**
|
|
75
|
-
* @
|
|
76
|
-
* @
|
|
74
|
+
* @hook Editor.Component
|
|
75
|
+
* @type {SunEditor.Hook.Component.Deselect}
|
|
77
76
|
*/
|
|
78
|
-
|
|
79
|
-
this
|
|
77
|
+
componentDeselect() {
|
|
78
|
+
this.#init();
|
|
80
79
|
}
|
|
81
80
|
|
|
82
81
|
/**
|
|
83
|
-
* @
|
|
84
|
-
* @
|
|
85
|
-
* @param {HTMLButtonElement} target Target button element
|
|
82
|
+
* @hook Modules.Controller
|
|
83
|
+
* @type {SunEditor.Hook.Controller.Action}
|
|
86
84
|
*/
|
|
87
85
|
controllerAction(target) {
|
|
88
86
|
const command = target.getAttribute('data-command');
|
|
89
87
|
if (!command) return;
|
|
90
|
-
const currentElement = this
|
|
88
|
+
const currentElement = this.#element;
|
|
91
89
|
|
|
92
90
|
switch (command) {
|
|
93
91
|
case 'submit': {
|
|
92
|
+
this.controller.close();
|
|
93
|
+
|
|
94
94
|
if (!currentElement) {
|
|
95
95
|
const id = this.inputEl.value.trim();
|
|
96
96
|
if (!id) {
|
|
@@ -103,35 +103,35 @@ class Anchor extends EditorInjector {
|
|
|
103
103
|
'data-se-anchor': this.inputEl.value,
|
|
104
104
|
'data-se-non-link': 'true',
|
|
105
105
|
contenteditable: 'false',
|
|
106
|
-
class: 'se-component se-inline-component'
|
|
106
|
+
class: 'se-component se-inline-component',
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
this
|
|
109
|
+
this.$.component.insert(a, { insertBehavior: 'none', scrollTo: false });
|
|
110
110
|
|
|
111
|
-
const r = this
|
|
111
|
+
const r = this.$.selection.getNearRange(a);
|
|
112
112
|
if (r) {
|
|
113
|
-
this
|
|
113
|
+
this.$.selection.setRange(r.container, r.offset, r.container, r.offset);
|
|
114
114
|
} else {
|
|
115
|
-
this
|
|
115
|
+
this.$.component.select(a, Anchor.key);
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
|
|
118
|
+
this.#init();
|
|
118
119
|
} else {
|
|
119
|
-
this.controller.close();
|
|
120
120
|
currentElement.id = this.inputEl.value;
|
|
121
|
-
this.select(currentElement);
|
|
121
|
+
this.$.component.select(currentElement, Anchor.key);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
126
|
case 'cancel': {
|
|
127
127
|
this.controller.close(!currentElement);
|
|
128
|
-
if (this
|
|
129
|
-
this
|
|
128
|
+
if (this.#range) {
|
|
129
|
+
this.$.selection.setRange(this.#range);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
this
|
|
132
|
+
this.#init();
|
|
133
133
|
if (currentElement) {
|
|
134
|
-
this.
|
|
134
|
+
this.componentSelect(currentElement);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
break;
|
|
@@ -140,20 +140,21 @@ class Anchor extends EditorInjector {
|
|
|
140
140
|
this.inputEl.value = this.displayId.textContent;
|
|
141
141
|
this.controllerSelect.hide();
|
|
142
142
|
this.controller.open(currentElement);
|
|
143
|
+
this.inputEl.focus();
|
|
143
144
|
|
|
144
145
|
break;
|
|
145
146
|
}
|
|
146
147
|
case 'delete': {
|
|
147
|
-
const r = this
|
|
148
|
+
const r = this.$.selection.getNearRange(currentElement);
|
|
148
149
|
|
|
149
150
|
dom.utils.removeItem(currentElement);
|
|
150
151
|
this.controllerSelect.close(true);
|
|
151
152
|
|
|
152
153
|
if (r) {
|
|
153
|
-
this
|
|
154
|
+
this.$.selection.setRange(r.container, r.offset, r.container, r.offset);
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
this
|
|
157
|
+
this.#init();
|
|
157
158
|
|
|
158
159
|
break;
|
|
159
160
|
}
|
|
@@ -161,18 +162,21 @@ class Anchor extends EditorInjector {
|
|
|
161
162
|
}
|
|
162
163
|
|
|
163
164
|
/**
|
|
164
|
-
* @private
|
|
165
165
|
* @description Initializes state variables.
|
|
166
166
|
* - called when the popup is closed
|
|
167
167
|
*/
|
|
168
|
-
|
|
169
|
-
this
|
|
170
|
-
this
|
|
168
|
+
#init() {
|
|
169
|
+
this.#element = null;
|
|
170
|
+
this.#range = null;
|
|
171
171
|
this.inputEl.value = '';
|
|
172
172
|
this.displayId.textContent = '';
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
/**
|
|
177
|
+
* @param {SunEditor.Deps} $ - Kernel dependencies
|
|
178
|
+
* @returns {HTMLElement}
|
|
179
|
+
*/
|
|
176
180
|
function CreateHTML_controller({ lang, icons }) {
|
|
177
181
|
const html = /*html*/ `
|
|
178
182
|
<div class="se-arrow se-arrow-up"></div>
|
|
@@ -195,6 +199,10 @@ function CreateHTML_controller({ lang, icons }) {
|
|
|
195
199
|
return dom.utils.createElement('DIV', { class: 'se-controller se-controller-simple-input' }, html);
|
|
196
200
|
}
|
|
197
201
|
|
|
202
|
+
/**
|
|
203
|
+
* @param {SunEditor.Deps} $ - Kernel dependencies
|
|
204
|
+
* @returns {HTMLElement}
|
|
205
|
+
*/
|
|
198
206
|
function CreateHTML_controller_select({ lang, icons }) {
|
|
199
207
|
const html = /*html*/ `
|
|
200
208
|
<div class="se-arrow se-arrow-up"></div>
|
package/src/suneditor.js
CHANGED
|
@@ -1,47 +1,28 @@
|
|
|
1
|
-
import Editor from './core/editor';
|
|
2
|
-
|
|
3
|
-
import EditorInjector from './editorInjector';
|
|
4
|
-
import Plugins from './plugins';
|
|
5
|
-
import Langs from './langs';
|
|
6
|
-
import Modules from './modules';
|
|
7
|
-
import Helper from './helper';
|
|
8
|
-
|
|
9
1
|
/**
|
|
10
|
-
* @
|
|
2
|
+
* @warning `suneditor.js`, `cdn-builder.js`, `format-index.cjs` must be modified together.
|
|
11
3
|
*/
|
|
12
4
|
|
|
13
|
-
|
|
14
|
-
* @typedef {import('./core/section/constructor').EditorFrameOptions} EditorFrameOptions_suneditor
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @typedef {import('./core/section/constructor').EditorInitOptions} EditorInitOptions_suneditor
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Editor Injector module, Inject "editor" and basic frequently used objects by calling it with "call(this, editor)".
|
|
23
|
-
*/
|
|
24
|
-
export { EditorInjector };
|
|
5
|
+
import Editor from './core/editor';
|
|
25
6
|
|
|
26
|
-
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
|
|
7
|
+
import plugins from './plugins';
|
|
8
|
+
import * as moduleContract from './modules/contract';
|
|
9
|
+
import * as moduleManager from './modules/manager';
|
|
10
|
+
import * as moduleUI from './modules/ui';
|
|
11
|
+
import helper from './helper';
|
|
12
|
+
import * as interfaces from './interfaces';
|
|
30
13
|
|
|
31
|
-
|
|
32
|
-
* Editor modules
|
|
33
|
-
*/
|
|
34
|
-
export { Modules };
|
|
14
|
+
import langs from './langs';
|
|
35
15
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
const modules = {
|
|
17
|
+
contract: moduleContract,
|
|
18
|
+
manager: moduleManager,
|
|
19
|
+
ui: moduleUI,
|
|
20
|
+
};
|
|
40
21
|
|
|
41
22
|
/**
|
|
42
|
-
*
|
|
23
|
+
* @module SunEditorExports
|
|
43
24
|
*/
|
|
44
|
-
export {
|
|
25
|
+
export { plugins, modules, helper, langs, interfaces };
|
|
45
26
|
|
|
46
27
|
/**
|
|
47
28
|
* SunEditor Factory Object
|
|
@@ -50,47 +31,78 @@ export { Helper };
|
|
|
50
31
|
export default {
|
|
51
32
|
/**
|
|
52
33
|
* Returns the create function with preset options.
|
|
53
|
-
* If the options overlap, the options of the
|
|
54
|
-
* @
|
|
55
|
-
*
|
|
34
|
+
* If the options overlap, the options of the `create` function take precedence.
|
|
35
|
+
* @example
|
|
36
|
+
* // Preset common options, then create multiple editors
|
|
37
|
+
* const preset = SUNEDITOR.init({
|
|
38
|
+
* plugins: [image, link],
|
|
39
|
+
* buttonList: [['bold', 'italic'], ['image', 'link']],
|
|
40
|
+
* });
|
|
41
|
+
* const editor1 = preset.create('#editor1', { height: '300px' });
|
|
42
|
+
* const editor2 = preset.create('#editor2', { height: '500px' });
|
|
43
|
+
* @param {SunEditor.InitOptions} init_options - Initialization options
|
|
44
|
+
* @returns {{create: (targets: Element|Object<string, {target: Element, options: SunEditor.InitFrameOptions}>, options: SunEditor.InitOptions) => SunEditor.Instance}}}
|
|
56
45
|
*/
|
|
57
46
|
init(init_options) {
|
|
58
47
|
return {
|
|
59
|
-
create: (targets, options) => this.create(targets, options, init_options)
|
|
48
|
+
create: (targets, options) => this.create(targets, options, init_options),
|
|
60
49
|
};
|
|
61
50
|
},
|
|
62
51
|
|
|
63
52
|
/**
|
|
64
53
|
* Creates a new instance of the SunEditor
|
|
65
|
-
* @
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
54
|
+
* @example
|
|
55
|
+
* // Create with a DOM element
|
|
56
|
+
* const editor = SUNEDITOR.create(document.getElementById('editor'), {
|
|
57
|
+
* buttonList: [['bold', 'italic', 'underline']],
|
|
58
|
+
* });
|
|
59
|
+
*
|
|
60
|
+
* // Create with a CSS selector
|
|
61
|
+
* const editor = SUNEDITOR.create('#editor', { height: '400px' });
|
|
62
|
+
*
|
|
63
|
+
* // Create multi-root editor
|
|
64
|
+
* const editor = SUNEDITOR.create({
|
|
65
|
+
* header: { target: document.getElementById('header') },
|
|
66
|
+
* body: { target: document.getElementById('body'), options: { height: '500px' } },
|
|
67
|
+
* });
|
|
68
|
+
* @param {Element|string|Object<string, {target: Element, options: SunEditor.InitFrameOptions}>} target
|
|
69
|
+
* - `Element`: The direct DOM element to initialize the editor on.
|
|
70
|
+
* - `string`: A CSS selector string. The corresponding element is selected using `document.querySelector`.
|
|
71
|
+
* - `Object`: For multi-root setup. Each key maps to a config with `{target, options}`.
|
|
72
|
+
* @param {SunEditor.InitOptions} options - Initialization options
|
|
73
|
+
* @param {SunEditor.InitOptions} [_init_options] - Optional preset initialization options
|
|
74
|
+
* @returns {SunEditor.Instance} - Instance of the SunEditor
|
|
69
75
|
* @throws {Error} If the target element is not provided or is invalid
|
|
70
76
|
*/
|
|
71
77
|
create(target, options, _init_options) {
|
|
72
|
-
if (typeof options !== 'object') options = {};
|
|
78
|
+
if (typeof options !== 'object') options = /** @type {SunEditor.InitOptions} */ ({});
|
|
73
79
|
if (_init_options) {
|
|
74
|
-
options =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
options = /** @type {SunEditor.InitOptions} */ (
|
|
81
|
+
(() => {
|
|
82
|
+
return [_init_options, options].reduce((init, option) => {
|
|
83
|
+
Object.entries(option).forEach(([key, value]) => {
|
|
84
|
+
if (key === 'plugins' && value && init[key]) {
|
|
85
|
+
const i = Array.isArray(init[key]) ? init[key] : Object.values(init[key]);
|
|
86
|
+
const o = Array.isArray(value) ? value : Object.values(value);
|
|
87
|
+
init[key] = [...o.filter((val) => !i.includes(val)), ...i];
|
|
88
|
+
} else {
|
|
89
|
+
init[key] = value;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return init;
|
|
93
|
+
}, {});
|
|
94
|
+
})()
|
|
95
|
+
);
|
|
88
96
|
}
|
|
89
97
|
|
|
90
|
-
if (!target) throw Error(
|
|
98
|
+
if (!target) throw Error('[SUNEDITOR.create.fail] The first parameter "target" is missing.');
|
|
91
99
|
|
|
92
100
|
const multiTargets = [];
|
|
93
|
-
if (target
|
|
101
|
+
if (typeof target === 'string') {
|
|
102
|
+
const t = document.querySelector(target);
|
|
103
|
+
if (!t) throw Error(`[SUNEDITOR.create.fail]-[document.querySelector(${target})] Cannot find target element. Make sure "${target}" is a valid selector and exists in the document.`);
|
|
104
|
+
multiTargets.push({ key: null, target: t });
|
|
105
|
+
} else if (target.nodeType === 1) {
|
|
94
106
|
multiTargets.push({ key: null, target: target });
|
|
95
107
|
} else {
|
|
96
108
|
let props;
|
|
@@ -103,5 +115,5 @@ export default {
|
|
|
103
115
|
}
|
|
104
116
|
|
|
105
117
|
return new Editor(multiTargets, options);
|
|
106
|
-
}
|
|
118
|
+
},
|
|
107
119
|
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/** Theme color tokens used by suneditor.css and suneditor-contents.css. */
|
|
2
|
+
/** [ assets/design/color.css ] */
|
|
3
|
+
|
|
4
|
+
.sun-editor.se-theme-cobalt,
|
|
5
|
+
.sun-editor-editable.se-theme-cobalt {
|
|
6
|
+
/** --------------------------- content - [colors] ----------- */
|
|
7
|
+
/* caret and placeholder */
|
|
8
|
+
--se-caret-color: #ccc;
|
|
9
|
+
--se-drag-caret-color: #18aa7a;
|
|
10
|
+
--se-placeholder-color: #64718c;
|
|
11
|
+
|
|
12
|
+
/* editable text tones */
|
|
13
|
+
--se-edit-font-color: #ccc;
|
|
14
|
+
--se-edit-font-pre: #aaa;
|
|
15
|
+
--se-edit-font-quote: #8899aa;
|
|
16
|
+
|
|
17
|
+
/* editable surfaces */
|
|
18
|
+
--se-edit-background-color: #0f1828;
|
|
19
|
+
--se-edit-background-pre: #364153;
|
|
20
|
+
|
|
21
|
+
/* content border scale */
|
|
22
|
+
--se-edit-border-light: #2a4a7a;
|
|
23
|
+
--se-edit-border-dark: #1e3a6a;
|
|
24
|
+
--se-edit-border-dark-n1: #244070;
|
|
25
|
+
--se-edit-border-dark-n2: #305088;
|
|
26
|
+
--se-edit-border-table: #4a5565;
|
|
27
|
+
|
|
28
|
+
/* links and horizontal rules */
|
|
29
|
+
--se-edit-anchor: #77aaff;
|
|
30
|
+
--se-edit-anchor-on-back: #004cff;
|
|
31
|
+
--se-edit-anchor-on-font: #e8f7ff;
|
|
32
|
+
--se-edit-hr-color: #556688;
|
|
33
|
+
--se-edit-hr-on-back: #77aaff;
|
|
34
|
+
|
|
35
|
+
/* content interaction states */
|
|
36
|
+
--se-edit-active: #77aaff;
|
|
37
|
+
--se-edit-hover: #5599ff;
|
|
38
|
+
--se-edit-outline: #444;
|
|
39
|
+
|
|
40
|
+
/** --------------------------- layout - [colors] ----------- */
|
|
41
|
+
/* main shell and typography */
|
|
42
|
+
--se-main-font-family: Helvetica Neue;
|
|
43
|
+
--se-main-out-color: #444;
|
|
44
|
+
--se-main-color: #ccc;
|
|
45
|
+
--se-main-color-lighter: #aaa;
|
|
46
|
+
--se-main-background-color: #0f1828;
|
|
47
|
+
--se-code-view-color: #030712;
|
|
48
|
+
--se-main-font-color: #ccc;
|
|
49
|
+
--se-code-view-background-color: #ddd;
|
|
50
|
+
--se-main-divider-color: #555;
|
|
51
|
+
--se-main-border-color: #666;
|
|
52
|
+
--se-main-outline-color: #444;
|
|
53
|
+
--se-main-shadow-color: #222;
|
|
54
|
+
--se-statusbar-font-color: #aaa;
|
|
55
|
+
--se-overlay-background-color: #111;
|
|
56
|
+
|
|
57
|
+
/* hover states */
|
|
58
|
+
--se-hover-color: #0d200c;
|
|
59
|
+
--se-hover-dark-color: #8192a3;
|
|
60
|
+
--se-hover-dark2-color: #738495;
|
|
61
|
+
--se-hover-dark3-color: #667788;
|
|
62
|
+
--se-hover-light-color: #9ab0c5;
|
|
63
|
+
--se-hover-light2-color: #adc2d7;
|
|
64
|
+
--se-hover-light3-color: #c0d3e5;
|
|
65
|
+
|
|
66
|
+
/* active foreground states */
|
|
67
|
+
--se-active-color: #5cd2e6;
|
|
68
|
+
--se-active-hover-color: #6de9f5;
|
|
69
|
+
--se-active-dark-color: #3bb9cd;
|
|
70
|
+
--se-active-dark2-color: #2a9fb1;
|
|
71
|
+
--se-active-dark3-color: #5cd2e6;
|
|
72
|
+
--se-active-dark4-color: #3bb9cd;
|
|
73
|
+
--se-active-dark5-color: #197d91;
|
|
74
|
+
|
|
75
|
+
/* active background states */
|
|
76
|
+
--se-active-light-color: #17303a;
|
|
77
|
+
--se-active-light2-color: #1e3f4d;
|
|
78
|
+
--se-active-light3-color: #255e6f;
|
|
79
|
+
--se-active-light4-color: #2c7d91;
|
|
80
|
+
--se-active-light5-color: #33aacc;
|
|
81
|
+
--se-active-light6-color: #3bd1f2;
|
|
82
|
+
|
|
83
|
+
/* floating layer shadow */
|
|
84
|
+
--se-shadow-layer-color: rgba(0, 64, 128, 0.25);
|
|
85
|
+
|
|
86
|
+
/* drag feedback */
|
|
87
|
+
--se-drag-over-color: #ffcc00;
|
|
88
|
+
|
|
89
|
+
/* modal, browser, dropdown surfaces */
|
|
90
|
+
--se-modal-background-color: #1c202a;
|
|
91
|
+
--se-modal-color: #ececec;
|
|
92
|
+
--se-modal-border-color: #555;
|
|
93
|
+
--se-modal-anchor-color: #77aaff;
|
|
94
|
+
--se-modal-preview-color: #aaa;
|
|
95
|
+
--se-modal-file-input-background-color: #232837;
|
|
96
|
+
--se-modal-input-disabled-color: #666;
|
|
97
|
+
--se-modal-input-disabled-background-color: #333;
|
|
98
|
+
|
|
99
|
+
/* dropdown text */
|
|
100
|
+
--se-dropdown-font-color: #ccc;
|
|
101
|
+
|
|
102
|
+
/* media/controller chrome */
|
|
103
|
+
--se-controller-border-color: #555;
|
|
104
|
+
--se-controller-background-color: #091025;
|
|
105
|
+
--se-controller-color: #ececec;
|
|
106
|
+
--se-shadow-controller-color: rgba(80, 200, 255, 0.2);
|
|
107
|
+
|
|
108
|
+
/* input-side button states */
|
|
109
|
+
--se-input-btn-border-color: #444;
|
|
110
|
+
--se-input-btn-disabled-color: #666;
|
|
111
|
+
|
|
112
|
+
/* table picker */
|
|
113
|
+
--se-table-picker-color: #2a3040;
|
|
114
|
+
--se-table-picker-border-color: #4a5568;
|
|
115
|
+
--se-table-picker-highlight-color: #24384d;
|
|
116
|
+
--se-table-picker-highlight-border-color: #558a9c;
|
|
117
|
+
|
|
118
|
+
/* success status palette */
|
|
119
|
+
--se-success-color: #2cb67d;
|
|
120
|
+
--se-success-dark-color: #1f8f65;
|
|
121
|
+
--se-success-dark2-color: #186f4f;
|
|
122
|
+
--se-success-dark3-color: #125f44;
|
|
123
|
+
--se-success-light-color: #3dd9a5;
|
|
124
|
+
--se-success-light2-color: #57e2b7;
|
|
125
|
+
--se-success-light3-color: #8cf0ce;
|
|
126
|
+
--se-success-light4-color: #c1fae4;
|
|
127
|
+
--se-success-light5-color: #e9fef5;
|
|
128
|
+
|
|
129
|
+
/* error status palette */
|
|
130
|
+
--se-error-color: #ef4444;
|
|
131
|
+
--se-error-dark-color: #991b1b;
|
|
132
|
+
--se-error-dark2-color: #7f1d1d;
|
|
133
|
+
--se-error-dark3-color: #651616;
|
|
134
|
+
--se-error-light-color: #f87171;
|
|
135
|
+
--se-error-light2-color: #fca5a5;
|
|
136
|
+
--se-error-light3-color: #fecaca;
|
|
137
|
+
--se-error-light4-color: #fee2e2;
|
|
138
|
+
--se-error-light5-color: #fef2f2;
|
|
139
|
+
|
|
140
|
+
/* document mode palette */
|
|
141
|
+
--se-doc-background: #344153;
|
|
142
|
+
--se-doc-info-page-font-color: #0f1828;
|
|
143
|
+
--se-doc-info-page-background-color: #cfcfcf;
|
|
144
|
+
--se-doc-info-font-color: #cfcfcf;
|
|
145
|
+
--se-doc-info-active-color: #5599ff;
|
|
146
|
+
|
|
147
|
+
/* loading indicator */
|
|
148
|
+
--se-loading-color: #77aaff;
|
|
149
|
+
|
|
150
|
+
/* show-blocks debug colors */
|
|
151
|
+
--se-show-blocks-color: #5599ff;
|
|
152
|
+
--se-show-blocks-li-color: #d539ff;
|
|
153
|
+
--se-show-blocks-pre-color: #27c022;
|
|
154
|
+
--se-show-blocks-component-color: #f4b124;
|
|
155
|
+
}
|