A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang. (PERSONAL FORK)
at lambda-fork/main 866 lines 49 kB view raw
1import {isMobile} from "./util/functions"; 2 3declare const SIYUAN_VERSION: string; 4declare const NODE_ENV: string; 5 6const _SIYUAN_VERSION = SIYUAN_VERSION; 7const _NODE_ENV = NODE_ENV; 8 9const altNumber = navigator.platform.toUpperCase().indexOf("MAC") > -1 ? "⌃" : "⌥"; 10 11const getFunctionKey = () => { 12 const fData: { [key: number]: string } = {}; 13 for (let i = 1; i <= 32; i++) { 14 fData[i + 111] = "F" + i; 15 } 16 return fData; 17}; 18 19export abstract class Constants { 20 public static readonly SIYUAN_VERSION: string = _SIYUAN_VERSION; 21 public static readonly NODE_ENV: string = _NODE_ENV; 22 public static readonly SIYUAN_APPID: string = Math.random().toString(36).substring(8); 23 24 // 服务器地址 25 public static readonly ASSETS_ADDRESS: string = "https://assets.b3logfile.com/siyuan/"; 26 public static readonly PROTYLE_CDN: string = "/stage/protyle"; 27 public static readonly UPLOAD_ADDRESS: string = "/upload"; 28 public static readonly SERVICE_WORKER_PATH: string = "/service-worker.js"; 29 30 // drop 事件 31 public static readonly SIYUAN_DROP_FILE: string = "application/siyuan-file"; 32 public static readonly SIYUAN_DROP_GUTTER: string = "application/siyuan-gutter"; 33 public static readonly SIYUAN_DROP_TAB: string = "application/siyuan-tab"; 34 public static readonly SIYUAN_DROP_EDITOR: string = "application/siyuan-editor"; 35 36 // 渲染进程调主进程 37 public static readonly SIYUAN_CMD: string = "siyuan-cmd"; 38 public static readonly SIYUAN_GET: string = "siyuan-get"; 39 public static readonly SIYUAN_EVENT: string = "siyuan-event"; 40 41 public static readonly SIYUAN_CONFIG_TRAY: string = "siyuan-config-tray"; 42 public static readonly SIYUAN_QUIT: string = "siyuan-quit"; 43 public static readonly SIYUAN_HOTKEY: string = "siyuan-hotkey"; 44 public static readonly SIYUAN_INIT: string = "siyuan-init"; 45 public static readonly SIYUAN_SEND_WINDOWS: string = "siyuan-send-windows"; // 主窗口和各新窗口之间的通信,{cmd: "closetab"|"lockscreen"|"lockscreenByMode", data: {}}) 46 public static readonly SIYUAN_SAVE_CLOSE: string = "siyuan-save-close"; 47 public static readonly SIYUAN_AUTO_LAUNCH: string = "siyuan-auto-launch"; 48 49 public static readonly SIYUAN_OPEN_WORKSPACE: string = "siyuan-open-workspace"; 50 public static readonly SIYUAN_OPEN_URL: string = "siyuan-open-url"; 51 public static readonly SIYUAN_OPEN_WINDOW: string = "siyuan-open-window"; 52 public static readonly SIYUAN_OPEN_FILE: string = "siyuan-open-file"; 53 54 public static readonly SIYUAN_EXPORT_PDF: string = "siyuan-export-pdf"; 55 public static readonly SIYUAN_EXPORT_NEWWINDOW: string = "siyuan-export-newwindow"; 56 57 public static readonly SIYUAN_CONTEXT_MENU: string = "siyuan-context-menu"; 58 59 public static readonly SIYUAN_SHOW_WINDOW: string = "siyuan-show-window"; 60 61 // custom 62 public static readonly CUSTOM_SY_READONLY: string = "custom-sy-readonly"; 63 public static readonly CUSTOM_SY_FULLWIDTH: string = "custom-sy-fullwidth"; 64 public static readonly CUSTOM_SY_AV_VIEW: string = "custom-sy-av-view"; 65 public static readonly CUSTOM_REMINDER_WECHAT: string = "custom-reminder-wechat"; 66 public static readonly CUSTOM_RIFF_DECKS: string = "custom-riff-decks"; 67 68 // size 69 public static readonly SIZE_DATABASE_MAZ_SIZE: number = 102400; 70 public static readonly SIZE_SCROLL_TB: number = 24; 71 public static readonly SIZE_SCROLL_STEP: number = 256; 72 public static readonly SIZE_LINK_TEXT_MAX: number = 64; 73 public static readonly SIZE_TOOLBAR_HEIGHT: number = isMobile() ? 0 : 32; 74 public static readonly SIZE_GET_MAX = 102400; 75 public static readonly SIZE_UNDO = 64; 76 public static readonly SIZE_TITLE = 512; 77 public static readonly SIZE_EDITOR_WIDTH = 760; 78 public static readonly SIZE_ZOOM = [ 79 { 80 zoom: 0.67, 81 position: {x: 0, y: 2} 82 }, 83 { 84 zoom: 0.75, 85 position: {x: 1, y: 4} 86 }, { 87 zoom: 0.8, 88 position: {x: 2, y: 4} 89 }, { 90 zoom: 0.9, 91 position: {x: 5, y: 6} 92 }, { 93 zoom: 1, 94 position: {x: 8, y: 8} 95 }, { 96 zoom: 1.1, 97 position: {x: 12, y: 9} 98 }, { 99 zoom: 1.25, 100 position: {x: 18, y: 12} 101 }, { 102 zoom: 1.5, 103 position: {x: 27, y: 16} 104 }, { 105 zoom: 1.75, 106 position: {x: 36, y: 20} 107 }, { 108 zoom: 2, 109 position: {x: 45, y: 23} 110 }, { 111 zoom: 2.5, 112 position: {x: 63, y: 31} 113 }, { 114 zoom: 3, 115 position: {x: 80, y: 39} 116 }]; 117 118 // ws callback 119 public static readonly CB_MOVE_NOLIST = "cb-move-nolist"; 120 public static readonly CB_MOUNT_REMOVE = "cb-mount-remove"; 121 public static readonly CB_GET_APPEND = "cb-get-append"; // 向下滚动加载 122 public static readonly CB_GET_BEFORE = "cb-get-before"; // 向上滚动加载 123 public static readonly CB_GET_UNCHANGEID = "cb-get-unchangeid"; // 上下滚动,定位时不修改 blockid 124 public static readonly CB_GET_HL = "cb-get-hl"; // 高亮 125 public static readonly CB_GET_FOCUS = "cb-get-focus"; // 光标定位 126 public static readonly CB_GET_FOCUSFIRST = "cb-get-focusfirst"; // 动态定位到第一个块 127 public static readonly CB_GET_SETID = "cb-get-setid"; // 无折叠大纲点击 重置 blockid 128 public static readonly CB_GET_OUTLINE = "cb-get-outline"; // 大纲点击 129 public static readonly CB_GET_ALL = "cb-get-all"; // 获取所有块 130 public static readonly CB_GET_BACKLINK = "cb-get-backlink"; // 悬浮窗为传递型需展示上下文 131 public static readonly CB_GET_UNUNDO = "cb-get-unundo"; // 不需要记录历史 132 public static readonly CB_GET_SCROLL = "cb-get-scroll"; // 滚动到指定位置,用于直接打开文档,必有 rootID 133 public static readonly CB_GET_CONTEXT = "cb-get-context"; // 包含上下文 134 public static readonly CB_GET_ROOTSCROLL = "cb-get-rootscroll"; // 如果为 rootID 就滚动到指定位置,必有 rootID 135 public static readonly CB_GET_HTML = "cb-get-html"; // 直接渲染,不需要再 /api/block/getDocInfo,否则搜索表格无法定位 136 public static readonly CB_GET_HISTORY = "cb-get-history"; // 历史渲染 137 public static readonly CB_GET_OPENNEW = "cb-get-opennew"; // 编辑器只读后新建文件需为临时解锁状态 & https://github.com/siyuan-note/siyuan/issues/12197 138 139 // localstorage 140 public static readonly LOCAL_ZOOM = "local-zoom"; 141 public static readonly LOCAL_SEARCHDATA = "local-searchdata"; 142 public static readonly LOCAL_SEARCHKEYS = "local-searchkeys"; 143 public static readonly LOCAL_SEARCHASSET = "local-searchasset"; 144 public static readonly LOCAL_SEARCHUNREF = "local-searchunref"; 145 public static readonly LOCAL_DOCINFO = "local-docinfo"; // only mobile 146 public static readonly LOCAL_DAILYNOTEID = "local-dailynoteid"; // string 147 public static readonly LOCAL_HISTORY = "local-history"; 148 public static readonly LOCAL_CODELANG = "local-codelang"; // string 149 public static readonly LOCAL_FONTSTYLES = "local-fontstyles"; 150 public static readonly LOCAL_EXPORTPDF = "local-exportpdf"; 151 public static readonly LOCAL_EXPORTWORD = "local-exportword"; 152 public static readonly LOCAL_EXPORTIMG = "local-exportimg"; 153 public static readonly LOCAL_BAZAAR = "local-bazaar"; 154 public static readonly LOCAL_PDFTHEME = "local-pdftheme"; 155 public static readonly LOCAL_LAYOUTS = "local-layouts"; 156 public static readonly LOCAL_AI = "local-ai"; 157 public static readonly LOCAL_PLUGINTOPUNPIN = "local-plugintopunpin"; 158 public static readonly LOCAL_FLASHCARD = "local-flashcard"; 159 public static readonly LOCAL_FILEPOSITION = "local-fileposition"; 160 public static readonly LOCAL_FILESPATHS = "local-filespaths"; 161 public static readonly LOCAL_DIALOGPOSITION = "local-dialogposition"; 162 public static readonly LOCAL_SESSION_FIRSTLOAD = "local-session-firstload"; 163 public static readonly LOCAL_OUTLINE = "local-outline"; 164 public static readonly LOCAL_PLUGIN_DOCKS = "local-plugin-docks"; 165 public static readonly LOCAL_IMAGES = "local-images"; 166 public static readonly LOCAL_EMOJIS = "local-emojis"; 167 public static readonly LOCAL_MOVE_PATH = "local-move-path"; 168 public static readonly LOCAL_RECENT_DOCS = "local-recent-docs"; 169 170 // dialog 171 public static readonly DIALOG_CONFIRM = "dialog-confirm"; 172 public static readonly DIALOG_OPENCARD = "dialog-opencard"; 173 public static readonly DIALOG_MAKECARD = "dialog-makecard"; 174 public static readonly DIALOG_VIEWCARDS = "dialog-viewcards"; 175 public static readonly DIALOG_DIALYNOTE = "dialog-dialynote"; 176 public static readonly DIALOG_RECENTDOCS = "dialog-recentdocs"; 177 public static readonly DIALOG_SWITCHTAB = "dialog-switchtab"; 178 public static readonly DIALOG_SEARCH = "dialog-search"; 179 public static readonly DIALOG_REPLACE = "dialog-replace"; 180 public static readonly DIALOG_GLOBALSEARCH = "dialog-globalsearch"; 181 public static readonly DIALOG_HISTORYCOMPARE = "dialog-historycompare"; 182 183 public static readonly DIALOG_ACCESSAUTHCODE = "dialog-accessauthcode"; // 访问鉴权码 184 public static readonly DIALOG_AICUSTOMACTION = "dialog-aicustomaction"; // AI 自定义操作 185 public static readonly DIALOG_AIUPDATECUSTOMACTION = "dialog-aiupdatecustomaction"; // 更新 AI 自定义操作 186 public static readonly DIALOG_BACKGROUNDLINK = "dialog-backgroundlink"; // 题头图-随机 187 public static readonly DIALOG_BACKGROUNDRANDOM = "dialog-backgroundrandom"; // 题头图-链接 188 public static readonly DIALOG_CHANGELOG = "dialog-changelog"; // 更新日志 189 public static readonly DIALOG_COMMANDPANEL = "dialog-commandpanel"; // 插件命令面板 190 public static readonly DIALOG_DEACTIVATEUSER = "dialog-deactivateuser"; // 注销账户 191 public static readonly DIALOG_EMOJIS = "dialog-emojis"; // 文档、笔记本图表 192 public static readonly DIALOG_EXPORTIMAGE = "dialog-exportimage"; // 导出为图片 193 public static readonly DIALOG_EXPORTTEMPLATE = "dialog-exporttemplate"; // 导出为模板 194 public static readonly DIALOG_EXPORTWORD = "dialog-exportword"; // 导出为 word 195 public static readonly DIALOG_HISTORY = "dialog-history"; // 数据历史(Alt + H) 196 public static readonly DIALOG_HISTORYDOC = "dialog-historydoc"; // 文档历史 197 public static readonly DIALOG_MOVEPATHTO = "dialog-movepathto"; // 移动文档 198 public static readonly DIALOG_RENAME = "dialog-rename"; // 重命名 199 public static readonly DIALOG_RENAMEASSETS = "dialog-renameassets"; // 重命名资源文件 200 public static readonly DIALOG_RENAMEBOOKMARK = "dialog-renamebookmark"; // 重命名书签 201 public static readonly DIALOG_RENAMETAG = "dialog-renametag"; // 重命名标签 202 public static readonly DIALOG_REPLACETYPE = "dialog-replacetype"; // 替换 - 替换类型 203 public static readonly DIALOG_SAVECRITERION = "dialog-savecriterion"; // 保存查询条件 204 public static readonly DIALOG_SEARCHTYPE = "dialog-searchtype"; // 搜索 - 类型 205 public static readonly DIALOG_SEARCHASSETSTYPE = "dialog-searchassetstype"; // 搜索资源文件 - 类型 206 public static readonly DIALOG_SETTING = "dialog-setting"; // 设置面板 207 public static readonly DIALOG_SNAPSHOTTAG = "dialog-snapshottag"; // 标记快照 208 public static readonly DIALOG_SNAPSHOTMEMO = "dialog-snapshotmemo"; // 快照备注 209 public static readonly DIALOG_SNIPPETS = "dialog-snippets"; // 代码片段 210 public static readonly DIALOG_SYNCADDCLOUDDIR = "dialog-syncaddclouddir"; // 新建云端同步目录 211 public static readonly DIALOG_SYNCCHOOSEDIR = "dialog-syncchoosedir"; // 选择云端同步目录 212 public static readonly DIALOG_SYNCCHOOSEDIRECTION = "dialog-syncchoosedirection"; // 选择云端同步方向 213 public static readonly DIALOG_TRANSFERBLOCKREF = "dialog-transferblockref"; // 转移引用 214 public static readonly DIALOG_WECHATREMINDER = "dialog-wechatreminder"; // 微信提醒 215 public static readonly DIALOG_PASSWORD = "dialog-password"; // 导入同步密钥 216 public static readonly DIALOG_SETPASSWORD = "dialog-setpassword"; // 设置同步密钥 217 public static readonly DIALOG_BOOTSYNCFAILED = "dialog-bootsyncfailed"; // 启动时同步数据失败 218 public static readonly DIALOG_KERNELFAULT = "dialog-kernelfault"; // 内核退出 219 public static readonly DIALOG_STATEEXCEPTED = "dialog-stateexcepted"; // 状态异常 220 public static readonly DIALOG_ATTR = "dialog-attr"; // 设置块属性 221 public static readonly DIALOG_SETCUSTOMATTR = "dialog-setcustomattr"; // 设置自定义属性 222 public static readonly DIALOG_CREATENOTEBOOK = "dialog-createnotebook"; // 创建笔记本 223 public static readonly DIALOG_NOTEBOOKCONF = "dialog-notebookconf"; // 笔记本设置 224 public static readonly DIALOG_CREATEWORKSPACE = "dialog-createworkspace"; // 创建工作空间 225 public static readonly DIALOG_OPENWORKSPACE = "dialog-openworkspace"; // 打开工作空间 226 public static readonly DIALOG_SAVEWORKSPACE = "dialog-saveworkspace"; // 保存工作空间 227 228 // menu 229 public static readonly MENU_BAR_WORKSPACE = "barWorkspace"; // 顶栏主菜单 230 public static readonly MENU_BAR_PLUGIN = "topBarPlugin"; // 顶栏插件菜单 231 public static readonly MENU_BAR_ZOOM = "barZoom"; // 顶栏缩放菜单 232 public static readonly MENU_BAR_MODE = "barmode"; // 顶栏外观菜单 233 public static readonly MENU_BAR_MORE = "barmore"; // 顶栏更多菜单 234 public static readonly MENU_STATUS_HELP = "statusHelp"; // 状态栏帮助菜单 235 public static readonly MENU_STATUS_BACKGROUND_TASK = "statusBackgroundTask"; // 状态栏后台任务菜单 236 public static readonly MENU_DOCK_MOBILE = "dockMobileMenu"; // 移动端侧栏插件选项菜单 237 238 public static readonly MENU_BLOCK_SINGLE = "block-single"; // 单选块菜单 239 public static readonly MENU_BLOCK_MULTI = "block-multi"; // 多选块菜单 240 public static readonly MENU_TITLE = "titleMenu"; // 文档块菜单 241 public static readonly MENU_FROM_TITLE_PROTYLE = "title-protyle"; // 在 Protyle 触发的文档块菜单 242 public static readonly MENU_FROM_TITLE_BREADCRUMB = "title-breadcrumb"; // 在面包屑触发的文档块菜单 243 public static readonly MENU_BREADCRUMB_MORE = "breadcrumbMore"; // 面包屑更多菜单 244 public static readonly MENU_BREADCRUMB_MOBILE_PATH = "breadcrumb-mobile-path"; // 移动端面包屑菜单 245 246 public static readonly MENU_DOC_TREE_MORE = "docTreeMore"; // 侧栏文档树右键菜单 247 public static readonly MENU_FROM_DOC_TREE_MORE_NOTEBOOK = "tree-notebook"; // 侧栏文档树右键菜单,单个笔记本 248 public static readonly MENU_FROM_DOC_TREE_MORE_DOC = "tree-doc"; // 侧栏文档树右键菜单,单个文档 249 public static readonly MENU_FROM_DOC_TREE_MORE_ITEMS = "tree-items"; // 侧栏文档树右键菜单,多个文档或笔记本 250 public static readonly MENU_TAG = "tagMenu"; // 侧栏标签菜单 251 public static readonly MENU_BOOKMARK = "bookmarkMenu"; // 侧栏书签菜单 252 public static readonly MENU_OUTLINE_CONTEXT = "outline-context"; // 大纲标题右键菜单 253 public static readonly MENU_OUTLINE_EXPAND_LEVEL = "outline-expand-level"; // 大纲展开层级菜单 254 255 public static readonly MENU_AV_VIEW = "av-view"; // 数据库视图标题菜单 256 public static readonly MENU_AV_HEADER_CELL = "av-header-cell"; // 数据库字段标题菜单 257 public static readonly MENU_AV_HEADER_ADD = "av-header-add"; // 数据库添加字段菜单 258 public static readonly MENU_AV_ADD_FILTER = "av-add-filter"; // 数据库添加筛选条件菜单 259 public static readonly MENU_AV_ADD_SORT = "av-add-sort"; // 数据库添加排序条件菜单 260 public static readonly MENU_AV_COL_OPTION = "av-col-option"; // 数据库单选多选字段的选项编辑菜单 261 public static readonly MENU_AV_COL_FORMAT_NUMBER = "av-col-format-number"; // 数据库数字字段格式化菜单 262 public static readonly MENU_AV_GROUP_DATE = "avGroupDate"; // 数据库日期字段分组菜单的日期菜单 263 public static readonly MENU_AV_GROUP_SORT = "avGroupSort"; // 数据库日期字段分组菜单的排序菜单 264 public static readonly MENU_AV_ASSET_EDIT = "av-asset-edit"; // 数据库资源字段链接或资源文件菜单 265 public static readonly MENU_AV_CALC = "av-calc"; // 数据库计算菜单 266 public static readonly MENU_AV_PAGE_SIZE = "av-page-size"; // 数据库条目数菜单 267 268 public static readonly MENU_SEARCH_MORE = "searchMore"; // 搜索更多菜单 269 public static readonly MENU_SEARCH_METHOD = "searchMethod"; // 搜索方式菜单 270 public static readonly MENU_SEARCH_ASSET_MORE = "searchAssetMore"; // 资源文件搜索更多菜单 271 public static readonly MENU_SEARCH_ASSET_METHOD = "searchAssetMethod"; // 资源文件搜索方式菜单 272 public static readonly MENU_SEARCH_UNREF_MORE = "searchUnRefMore"; // 列出引用失效的块的更多菜单 273 public static readonly MENU_SEARCH_HISTORY = "search-history"; // 搜索历史菜单 274 public static readonly MENU_SEARCH_REPLACE_HISTORY = "search-replace-history"; // 替换历史菜单 275 public static readonly MENU_SEARCH_ASSET_HISTORY = "search-asset-history"; // 资源文件搜索历史菜单 276 public static readonly MENU_MOVE_PATH_HISTORY = "move-path-history"; // 移动文档窗口搜索历史菜单 277 278 public static readonly MENU_BACKGROUND_ASSET = "background-asset"; // 资源文件选择器菜单 279 public static readonly MENU_AI = "ai"; // 块 AI 菜单 280 public static readonly MENU_TAB = "tab"; // 页签右键菜单 281 public static readonly MENU_TAB_LIST = "tabList"; // 页签切换菜单 282 283 public static readonly MENU_INLINE_CONTEXT = "inline-context"; // 文本右键菜单 284 public static readonly MENU_INLINE_IMG = "inline-img"; // 图片元素菜单 285 public static readonly MENU_INLINE_FILE_ANNOTATION_REF = "inline-file-annotation-ref"; // PDF 标注元素菜单 286 public static readonly MENU_INLINE_REF = "inline-block-ref"; // 块引用元素菜单 287 public static readonly MENU_INLINE_A = "inline-a"; // 超链接元素菜单 288 public static readonly MENU_INLINE_TAG = "inline-tag"; // 行级标签元素菜单 289 public static readonly MENU_INLINE_MATH = "inline-math"; // 行级公式元素菜单 290 291 // timeout 292 public static readonly TIMEOUT_OPENDIALOG = 50; 293 public static readonly TIMEOUT_DBLCLICK = 190; 294 public static readonly TIMEOUT_INPUT = 256; 295 public static readonly TIMEOUT_LOAD = 300; 296 public static readonly TIMEOUT_TRANSITION = 300; 297 public static readonly TIMEOUT_COUNT = 1000; 298 299 // id 300 public static readonly HELP_PATH: { [key: string]: string } = { 301 ar_SA: "20210808180117-6v0mkxr", 302 de_DE: "20210808180117-6v0mkxr", 303 en_US: "20210808180117-6v0mkxr", 304 es_ES: "20210808180117-6v0mkxr", 305 fr_FR: "20210808180117-6v0mkxr", 306 he_IL: "20210808180117-6v0mkxr", 307 it_IT: "20210808180117-6v0mkxr", 308 ja_JP: "20240530133126-axarxgx", 309 pl_PL: "20210808180117-6v0mkxr", 310 pt_BR: "20210808180117-6v0mkxr", 311 ru_RU: "20210808180117-6v0mkxr", 312 zh_CHT: "20211226090932-5lcq56f", 313 zh_CN: "20210808180117-czj9bvb", 314 }; 315 public static readonly QUICK_DECK_ID = "20230218211946-2kw8jgx"; 316 317 public static KEYCODELIST: { [key: number]: string } = Object.assign(getFunctionKey(), { 318 8: "⌫", 319 9: "⇥", 320 13: "↩", 321 16: "⇧", 322 17: "⌃", 323 18: "⌥", 324 19: "Pause", 325 20: "CapsLock", 326 27: "Escape", 327 32: " ", 328 33: "PageUp", 329 34: "PageDown", 330 35: "End", 331 36: "Home", 332 37: "←", 333 38: "↑", 334 39: "→", 335 40: "↓", 336 44: "PrintScreen", 337 45: "Insert", 338 46: "⌦", 339 48: "0", 340 49: "1", 341 50: "2", 342 51: "3", 343 52: "4", 344 53: "5", 345 54: "6", 346 55: "7", 347 56: "8", 348 57: "9", 349 65: "A", 350 66: "B", 351 67: "C", 352 68: "D", 353 69: "E", 354 70: "F", 355 71: "G", 356 72: "H", 357 73: "I", 358 74: "J", 359 75: "K", 360 76: "L", 361 77: "M", 362 78: "N", 363 79: "O", 364 80: "P", 365 81: "Q", 366 82: "R", 367 83: "S", 368 84: "T", 369 85: "U", 370 86: "V", 371 87: "W", 372 88: "X", 373 89: "Y", 374 90: "Z", 375 91: "⌘", 376 92: "⌘", 377 93: "ContextMenu", 378 96: "0", 379 97: "1", 380 98: "2", 381 99: "3", 382 100: "4", 383 101: "5", 384 102: "6", 385 103: "7", 386 104: "8", 387 105: "9", 388 106: "*", 389 107: "+", 390 109: "-", 391 110: ".", 392 111: "/", 393 144: "NumLock", 394 145: "ScrollLock", 395 182: "MyComputer", 396 183: "MyCalculator", 397 186: ";", 398 187: "=", 399 188: ",", 400 189: "-", 401 190: ".", 402 191: "/", 403 192: "`", 404 219: "[", 405 220: "\\", 406 221: "]", 407 222: "'", 408 }); 409 // 冲突不使用 "⌘S/Q" 410 // "⌘", "⇧", "⌥", "⌃" 411 // "⌘A", "⌘X", "⌘C", "⌘V", "⌘-", "⌘=", "⌘0", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⌃D", "⇧⌘→", "⇧⌘←", 412 // "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦", "Escape" 不可自定义 413 public static readonly SIYUAN_KEYMAP: Config.IKeymap = { 414 general: { 415 mainMenu: {default: "⌥\\", custom: "⌥\\"}, 416 commandPanel: {default: "⌥⇧P", custom: "⌥⇧P"}, 417 editReadonly: {default: "⇧⌘G", custom: "⇧⌘G"}, 418 syncNow: {default: "F9", custom: "F9"}, 419 enterBack: {default: "⌥←", custom: "⌥←"}, 420 enter: {default: "⌥→", custom: "⌥→"}, 421 goForward: {default: "⌘]", custom: "⌘]"}, 422 goBack: {default: "⌘[", custom: "⌘["}, 423 newFile: {default: "⌘N", custom: "⌘N"}, 424 search: {default: "⌘F", custom: "⌘F"}, 425 globalSearch: {default: "⌘P", custom: "⌘P"}, 426 stickSearch: {default: "⇧⌘F", custom: "⇧⌘F"}, 427 replace: {default: "⌘R", custom: "⌘R"}, 428 closeTab: {default: "⌘W", custom: "⌘W"}, 429 fileTree: {default: altNumber + "1", custom: altNumber + "1"}, 430 outline: {default: altNumber + "2", custom: altNumber + "2"}, 431 bookmark: {default: altNumber + "3", custom: altNumber + "3"}, 432 tag: {default: altNumber + "4", custom: altNumber + "4"}, 433 dailyNote: {default: altNumber + "5", custom: altNumber + "5"}, 434 inbox: {default: altNumber + "6", custom: altNumber + "6"}, 435 backlinks: {default: altNumber + "7", custom: altNumber + "7"}, 436 graphView: {default: altNumber + "8", custom: altNumber + "8"}, 437 globalGraph: {default: altNumber + "9", custom: altNumber + "9"}, 438 riffCard: {default: altNumber + "0", custom: altNumber + "0"}, 439 config: {default: "⌥P", custom: "⌥P"}, 440 dataHistory: {default: "⌥H", custom: "⌥H"}, 441 toggleWin: {default: "⌥M", custom: "⌥M"}, 442 lockScreen: {default: "⌥N", custom: "⌥N"}, 443 recentDocs: {default: "⌘E", custom: "⌘E"}, 444 goToTab1: {default: "⌘1", custom: "⌘1"}, 445 goToTab2: {default: "⌘2", custom: "⌘2"}, 446 goToTab3: {default: "⌘3", custom: "⌘3"}, 447 goToTab4: {default: "⌘4", custom: "⌘4"}, 448 goToTab5: {default: "⌘5", custom: "⌘5"}, 449 goToTab6: {default: "⌘6", custom: "⌘6"}, 450 goToTab7: {default: "⌘7", custom: "⌘7"}, 451 goToTab8: {default: "⌘8", custom: "⌘8"}, 452 goToTab9: {default: "⌘9", custom: "⌘9"}, 453 goToTabNext: {default: "⇧⌘]", custom: "⇧⌘]"}, 454 goToTabPrev: {default: "⇧⌘[", custom: "⇧⌘["}, 455 goToEditTabNext: {default: "⌃⇥", custom: "⌃⇥"}, 456 goToEditTabPrev: {default: "⌃⇧⇥", custom: "⌃⇧⇥"}, 457 recentClosed: {default: "⇧⌘T", custom: "⇧⌘T"}, 458 move: {default: "", custom: ""}, 459 selectOpen1: {default: "", custom: ""}, 460 toggleDock: {default: "", custom: ""}, 461 splitLR: {default: "", custom: ""}, 462 splitMoveR: {default: "", custom: ""}, 463 splitTB: {default: "", custom: ""}, 464 splitMoveB: {default: "", custom: ""}, 465 closeOthers: {default: "", custom: ""}, 466 closeAll: {default: "", custom: ""}, 467 closeUnmodified: {default: "", custom: ""}, 468 closeLeft: {default: "", custom: ""}, 469 closeRight: {default: "", custom: ""}, 470 tabToWindow: {default: "", custom: ""}, 471 addToDatabase: {default: "", custom: ""}, 472 unsplit: {default: "", custom: ""}, 473 unsplitAll: {default: "", custom: ""}, 474 }, 475 editor: { 476 general: { 477 duplicate: {default: "⌘D", custom: "⌘D"}, 478 expandDown: {default: "⌥⇧↓", custom: "⌥⇧↓"}, 479 expandUp: {default: "⌥⇧↑", custom: "⌥⇧↑"}, 480 expand: {default: "⌘↓", custom: "⌘↓"}, 481 collapse: {default: "⌘↑", custom: "⌘↑"}, 482 insertBottom: {default: "⌥⌘.", custom: "⌥⌘."}, 483 refTab: {default: "⇧⌘.", custom: "⇧⌘."}, 484 openBy: {default: "⌥,", custom: "⌥,"}, 485 insertRight: {default: "⌥.", custom: "⌥."}, 486 attr: {default: "⌥⌘A", custom: "⌥⌘A"}, 487 quickMakeCard: {default: "⌥⌘F", custom: "⌥⌘F"}, 488 refresh: {default: "F5", custom: "F5"}, 489 copyBlockRef: {default: "⇧⌘C", custom: "⇧⌘C"}, 490 copyProtocol: {default: "⇧⌘H", custom: "⇧⌘H"}, 491 copyBlockEmbed: {default: "⇧⌘E", custom: "⇧⌘E"}, 492 copyHPath: {default: "⇧⌘P", custom: "⇧⌘P"}, 493 undo: {default: "⌘Z", custom: "⌘Z"}, 494 redo: {default: "⌘Y", custom: "⌘Y"}, 495 rename: {default: "F2", custom: "F2"}, 496 newNameFile: {default: "F3", custom: "F3"}, 497 newContentFile: {default: "F4", custom: "F4"}, 498 newNameSettingFile: {default: "⌘F3", custom: "⌘F3"}, 499 showInFolder: {default: "⌥A", custom: "⌥A"}, 500 outline: {default: "⌥O", custom: "⌥O"}, 501 backlinks: {default: "⌥B", custom: "⌥B"}, 502 graphView: {default: "⌥G", custom: "⌥G"}, 503 spaceRepetition: {default: "⌥F", custom: "⌥F"}, 504 fullscreen: {default: "⌥Y", custom: "⌥Y"}, 505 alignLeft: {default: "⌥L", custom: "⌥L"}, 506 alignCenter: {default: "⌥C", custom: "⌥C"}, 507 alignRight: {default: "⌥R", custom: "⌥R"}, 508 wysiwyg: {default: "⌥⌘7", custom: "⌥⌘7"}, 509 preview: {default: "⌥⌘9", custom: "⌥⌘9"}, 510 insertBefore: {default: "⇧⌘B", custom: "⇧⌘B"}, 511 insertAfter: {default: "⇧⌘A", custom: "⇧⌘A"}, 512 jumpToParentNext: {default: "⇧⌘N", custom: "⇧⌘N"}, 513 jumpToParentPrev: {default: "⇧⌘M", custom: "⇧⌘M"}, 514 jumpToParent: {default: "⇧⌘J", custom: "⇧⌘J"}, 515 moveToUp: {default: "⇧⌘↑", custom: "⇧⌘↑"}, 516 moveToDown: {default: "⇧⌘↓", custom: "⇧⌘↓"}, 517 duplicateCompletely: {default: "", custom: ""}, 518 copyPlainText: {default: "", custom: ""}, 519 copyID: {default: "", custom: ""}, 520 copyProtocolInMd: {default: "", custom: ""}, 521 netImg2LocalAsset: {default: "", custom: ""}, 522 netAssets2LocalAssets: {default: "", custom: ""}, 523 optimizeTypography: {default: "", custom: ""}, 524 hLayout: {default: "", custom: ""}, 525 vLayout: {default: "", custom: ""}, 526 refPopover: {default: "", custom: ""}, 527 copyText: {default: "", custom: ""}, 528 exitFocus: {default: "", custom: ""}, 529 ai: {default: "", custom: ""}, 530 switchReadonly: {default: "", custom: ""}, 531 switchAdjust: {default: "", custom: ""}, 532 rtl: {default: "", custom: ""}, 533 ltr: {default: "", custom: ""}, 534 aiWriting: {default: "", custom: ""}, 535 openInNewTab: {default: "", custom: ""}, 536 }, 537 insert: { 538 appearance: {default: "⌥⌘X", custom: "⌥⌘X"}, 539 lastUsed: {default: "⌥X", custom: "⌥X"}, 540 ref: {default: "⌥[", custom: "⌥["}, 541 kbd: {default: "⌘'", custom: "⌘'"}, 542 sup: {default: "⌘H", custom: "⌘H"}, 543 sub: {default: "⌘J", custom: "⌘J"}, 544 bold: {default: "⌘B", custom: "⌘B"}, 545 "inline-math": {default: "⌘M", custom: "⌘M"}, 546 memo: {default: "⌥⌘M", custom: "⌥⌘M"}, 547 underline: {default: "⌘U", custom: "⌘U"}, 548 italic: {default: "⌘I", custom: "⌘I"}, 549 mark: {default: "⌥D", custom: "⌥D"}, 550 tag: {default: "⌘T", custom: "⌘T"}, 551 strike: {default: "⇧⌘S", custom: "⇧⌘S"}, 552 "inline-code": {default: "⌘G", custom: "⌘G"}, 553 link: {default: "⌘K", custom: "⌘K"}, 554 check: {default: "⌘L", custom: "⌘L"}, 555 "ordered-list": {default: "", custom: ""}, 556 list: {default: "", custom: ""}, 557 table: {default: "⌘O", custom: "⌘O"}, 558 code: {default: "⇧⌘K", custom: "⇧⌘K"}, 559 quote: {default: "", custom: ""}, 560 clearInline: {default: "⌘\\", custom: "⌘\\"}, 561 }, 562 heading: { 563 paragraph: {default: "⌥⌘0", custom: "⌥⌘0"}, 564 heading1: {default: "⌥⌘1", custom: "⌥⌘1"}, 565 heading2: {default: "⌥⌘2", custom: "⌥⌘2"}, 566 heading3: {default: "⌥⌘3", custom: "⌥⌘3"}, 567 heading4: {default: "⌥⌘4", custom: "⌥⌘4"}, 568 heading5: {default: "⌥⌘5", custom: "⌥⌘5"}, 569 heading6: {default: "⌥⌘6", custom: "⌥⌘6"}, 570 }, 571 list: { 572 indent: {default: "⇥", custom: "⇥"}, 573 outdent: {default: "⇧⇥", custom: "⇧⇥"}, 574 checkToggle: {default: "⌘↩", custom: "⌘↩"}, 575 }, 576 table: { 577 insertRowAbove: {default: "", custom: ""}, 578 insertRowBelow: {default: "", custom: ""}, 579 insertColumnLeft: {default: "", custom: ""}, 580 insertColumnRight: {default: "", custom: ""}, 581 moveToUp: {default: "⌥⌘T", custom: "⌥⌘T"}, 582 moveToDown: {default: "⌥⌘B", custom: "⌥⌘B"}, 583 moveToLeft: {default: "⌥⌘L", custom: "⌥⌘L"}, 584 moveToRight: {default: "⌥⌘R", custom: "⌥⌘R"}, 585 "delete-row": {default: "⌘-", custom: "⌘-"}, 586 "delete-column": {default: "⇧⌘-", custom: "⇧⌘-"} 587 } 588 }, 589 plugin: {}, 590 }; 591 592 public static readonly SIYUAN_EMPTY_LAYOUT: Config.IUiLayout = { 593 hideDock: false, 594 layout: { 595 "direction": "tb", 596 "size": "0px", 597 "type": "normal", 598 "instance": "Layout", 599 "children": [{ 600 "direction": "lr", 601 "size": "auto", 602 "type": "normal", 603 "instance": "Layout", 604 "children": [{ 605 "direction": "tb", 606 "size": "0px", 607 "type": "left", 608 "instance": "Layout", 609 "children": [{ 610 "instance": "Wnd", 611 "children": [] 612 }, { 613 "instance": "Wnd", 614 "resize": "tb", 615 "children": [] 616 }] 617 }, { 618 "direction": "lr", 619 "resize": "lr", 620 "size": "auto", 621 "type": "center", 622 "instance": "Layout", 623 "children": [{ 624 "instance": "Wnd", 625 "children": [{ 626 "instance": "Tab", 627 "children": [] 628 }] 629 }] 630 }, { 631 "direction": "tb", 632 "size": "0px", 633 "resize": "lr", 634 "type": "right", 635 "instance": "Layout", 636 "children": [{ 637 "instance": "Wnd", 638 "children": [] 639 }, { 640 "instance": "Wnd", 641 "resize": "tb", 642 "children": [] 643 }] 644 }] 645 }, { 646 "direction": "lr", 647 "size": "0px", 648 "resize": "tb", 649 "type": "bottom", 650 "instance": "Layout", 651 "children": [{ 652 "instance": "Wnd", 653 "children": [] 654 }, { 655 "instance": "Wnd", 656 "resize": "lr", 657 "children": [] 658 }] 659 }] 660 }, 661 bottom: { 662 pin: true, 663 data: [] 664 }, 665 left: { 666 pin: true, 667 data: [ 668 [{ 669 type: "file", 670 size: {width: 232, height: 0}, 671 show: true, 672 icon: "iconFiles", 673 hotkeyLangId: "fileTree", 674 }, { 675 type: "outline", 676 size: {width: 232, height: 0}, 677 show: false, 678 icon: "iconAlignCenter", 679 hotkeyLangId: "outline", 680 }, { 681 type: "inbox", 682 size: {width: 320, height: 0}, 683 show: false, 684 icon: "iconInbox", 685 hotkeyLangId: "inbox", 686 }], [{ 687 type: "bookmark", 688 size: {width: 232, height: 0}, 689 show: false, 690 icon: "iconBookmark", 691 hotkeyLangId: "bookmark", 692 }, { 693 type: "tag", 694 size: {width: 232, height: 0}, 695 show: false, 696 icon: "iconTags", 697 hotkeyLangId: "tag", 698 }] 699 ] 700 }, 701 right: { 702 pin: true, 703 data: [ 704 [{ 705 type: "graph", 706 size: {width: 320, height: 0}, 707 show: false, 708 icon: "iconGraph", 709 hotkeyLangId: "graphView", 710 }, { 711 type: "globalGraph", 712 size: {width: 320, height: 0}, 713 show: false, 714 icon: "iconGlobalGraph", 715 hotkeyLangId: "globalGraph", 716 }], [{ 717 type: "backlink", 718 size: {width: 320, height: 0}, 719 show: false, 720 icon: "iconLink", 721 hotkeyLangId: "backlinks", 722 }] 723 ] 724 } 725 }; 726 727 public static readonly SIYUAN_DEFAULT_REPLACETYPES: Required<Config.IUILayoutTabSearchConfigReplaceTypes> = { 728 "text": true, 729 "imgText": true, 730 "imgTitle": true, 731 "imgSrc": true, 732 "aText": true, 733 "aTitle": true, 734 "aHref": true, 735 "code": true, 736 "em": true, 737 "strong": true, 738 "inlineMath": true, 739 "inlineMemo": true, 740 "blockRef": true, 741 "fileAnnotationRef": true, 742 "kbd": true, 743 "mark": true, 744 "s": true, 745 "sub": true, 746 "sup": true, 747 "tag": true, 748 "u": true, 749 "docTitle": true, 750 "codeBlock": true, 751 "mathBlock": true, 752 "htmlBlock": true 753 }; 754 755 // image 756 public static readonly SIYUAN_IMAGE_VIP: string = `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"> 757<path fill="#ffd00f" d="M2.288 12.643l23.487 12.853c0.286 0.153 0.477 0.45 0.477 0.791 0 0.082-0.011 0.161-0.032 0.237l0.001-0.006c-0.119 0.395-0.479 0.678-0.905 0.678-0.004 0-0.009-0-0.013-0h-19.439c-0.958 0-1.766-0.684-1.885-1.595l-1.691-12.956z"></path> 758<path fill="#ffd00f" d="M29.676 12.643l-1.691 12.957c-0.119 0.911-0.927 1.594-1.884 1.594h-19.442c-0.004 0-0.009 0-0.013 0-0.425 0-0.785-0.281-0.903-0.668l-0.002-0.007c-0.019-0.070-0.031-0.15-0.031-0.232 0-0.341 0.191-0.638 0.472-0.788l0.005-0.002 23.487-12.853z"></path> 759<path fill="#ffe668" d="M15.413 8.369l10.394 15.921c0.378 0.579 0.407 1.317 0.076 1.924-0.328 0.591-0.948 0.985-1.66 0.985-0 0-0.001 0-0.001 0h-17.617c-0.694 0-1.331-0.378-1.661-0.985-0.144-0.26-0.229-0.569-0.229-0.899 0-0.382 0.114-0.736 0.31-1.033l-0.004 0.007 10.394-15.921z"></path> 760<path fill="#ffdd4e" d="M15.396 8.403l11.659 15.921c0.401 0.579 0.432 1.317 0.081 1.924-0.361 0.594-1.005 0.985-1.741 0.985-0.008 0-0.017-0-0.025-0h-9.344l-0.63-18.83z"></path> 761<path fill="#ffd00f" d="M13.868 6.478c0 0.946 0.767 1.712 1.712 1.712s1.712-0.767 1.712-1.712v0c0-0.945-0.766-1.712-1.712-1.712s-1.712 0.766-1.712 1.712v0zM28.577 10.818c0 0.945 0.766 1.712 1.712 1.712s1.712-0.766 1.712-1.712v0c0-0.945-0.766-1.712-1.712-1.712s-1.712 0.766-1.712 1.712v0zM0 10.822c0 0.945 0.766 1.712 1.712 1.712s1.712-0.766 1.712-1.712v0c0-0.945-0.766-1.712-1.712-1.712s-1.712 0.766-1.712 1.712v0z"></path> 762</svg>`; 763 764 // assets 765 public static readonly SIYUAN_ASSETS_IMAGE: string[] = [".apng", ".ico", ".cur", ".jpg", ".jpe", ".jpeg", ".jfif", ".pjp", ".pjpeg", ".png", ".gif", ".webp", ".bmp", ".svg", ".avif"]; 766 public static readonly SIYUAN_ASSETS_AUDIO: string[] = [".mp3", ".wav", ".ogg", ".m4a", ".aac", ".flac"]; 767 public static readonly SIYUAN_ASSETS_VIDEO: string[] = [".mov", ".weba", ".mkv", ".mp4", ".webm"]; 768 public static readonly SIYUAN_ASSETS_EXTS: string[] = [".pdf"].concat(Constants.SIYUAN_ASSETS_IMAGE).concat(Constants.SIYUAN_ASSETS_AUDIO).concat(Constants.SIYUAN_ASSETS_VIDEO); 769 public static readonly SIYUAN_ASSETS_SEARCH: string[] = [".txt", ".md", ".markdown", ".docx", ".xlsx", ".pptx", ".pdf", ".json", ".log", ".sql", ".html", ".xml", ".java", ".h", ".c", 770 ".cpp", ".go", ".rs", ".swift", ".kt", ".py", ".php", ".js", ".css", ".ts", ".sh", ".bat", ".cmd", ".ini", ".yaml", 771 ".rst", ".adoc", ".textile", ".opml", ".org", ".wiki", ".epub", ".cs"]; 772 773 // protyle 774 public static readonly SIYUAN_CONFIG_APPEARANCE_DARK_CODE: string[] = ["a11y-dark", "agate", "an-old-hope", "androidstudio", 775 "arta", "atom-one-dark", "atom-one-dark-reasonable", "base16/3024", "base16/apathy", "base16/apprentice", "base16/ashes", 776 "base16/atelier-cave", "base16/atelier-dune", "base16/atelier-estuary", "base16/atelier-forest", "base16/atelier-heath", 777 "base16/atelier-lakeside", "base16/atelier-plateau", "base16/atelier-savanna", "base16/atelier-seaside", "base16/atelier-sulphurpool", 778 "base16/atlas", "base16/bespin", "base16/black-metal", "base16/black-metal-bathory", "base16/black-metal-burzum", 779 "base16/black-metal-dark-funeral", "base16/black-metal-gorgoroth", "base16/black-metal-immortal", "base16/black-metal-khold", 780 "base16/black-metal-marduk", "base16/black-metal-mayhem", "base16/black-metal-nile", "base16/black-metal-venom", 781 "base16/brewer", "base16/bright", "base16/brogrammer", "base16/brush-trees-dark", "base16/chalk", "base16/circus", 782 "base16/classic-dark", "base16/codeschool", "base16/colors", "base16/danqing", "base16/darcula", "base16/dark-violet", 783 "base16/darkmoss", "base16/darktooth", "base16/decaf", "base16/default-dark", "base16/dracula", "base16/edge-dark", 784 "base16/eighties", "base16/embers", "base16/equilibrium-dark", "base16/equilibrium-gray-dark", "base16/espresso", 785 "base16/eva", "base16/eva-dim", "base16/flat", "base16/framer", "base16/gigavolt", "base16/google-dark", "base16/grayscale-dark", 786 "base16/green-screen", "base16/gruvbox-dark-hard", "base16/gruvbox-dark-medium", "base16/gruvbox-dark-pale", "base16/gruvbox-dark-soft", 787 "base16/hardcore", "base16/harmonic16-dark", "base16/heetch-dark", "base16/helios", "base16/hopscotch", "base16/horizon-dark", 788 "base16/humanoid-dark", "base16/ia-dark", "base16/icy-dark", "base16/ir-black", "base16/isotope", "base16/kimber", 789 "base16/london-tube", "base16/macintosh", "base16/marrakesh", "base16/materia", "base16/material", "base16/material-darker", 790 "base16/material-palenight", "base16/material-vivid", "base16/mellow-purple", "base16/mocha", "base16/monokai", 791 "base16/nebula", "base16/nord", "base16/nova", "base16/ocean", "base16/oceanicnext", "base16/onedark", "base16/outrun-dark", 792 "base16/papercolor-dark", "base16/paraiso", "base16/pasque", "base16/phd", "base16/pico", "base16/pop", "base16/porple", 793 "base16/qualia", "base16/railscasts", "base16/rebecca", "base16/ros-pine", "base16/ros-pine-moon", "base16/sandcastle", 794 "base16/seti-ui", "base16/silk-dark", "base16/snazzy", "base16/solar-flare", "base16/solarized-dark", "base16/spacemacs", 795 "base16/summercamp", "base16/summerfruit-dark", "base16/synth-midnight-terminal-dark", "base16/tango", "base16/tender", 796 "base16/tomorrow-night", "base16/twilight", "base16/unikitty-dark", "base16/vulcan", "base16/windows-10", "base16/windows-95", 797 "base16/windows-high-contrast", "base16/windows-nt", "base16/woodland", "base16/xcode-dusk", "base16/zenburn", "codepen-embed", 798 "cybertopia-cherry", "cybertopia-dimmer", "cybertopia-icecap", "cybertopia-saturated", "dark", "devibeans", "far", 799 "felipec", "github-dark", "github-dark-dimmed", "gml", "gradient-dark", "hybrid", "ir-black", "isbl-editor-dark", 800 "kimbie-dark", "lioshi", "monokai", "monokai-sublime", "night-owl", "nnfx-dark", "nord", "obsidian", "panda-syntax-dark", 801 "paraiso-dark", "pojoaque", "qtcreator-dark", "rainbow", "rose-pine", "rose-pine-moon", "shades-of-purple", "srcery", 802 "stackoverflow-dark", "sunburst", "tomorrow-night-blue", "tomorrow-night-bright", "tokyo-night-dark", "vs2015", "xt256" 803 ]; 804 public static readonly SIYUAN_CONFIG_APPEARANCE_LIGHT_CODE: string[] = ["ant-design", 805 "1c-light", "a11y-light", "arduino-light", "ascetic", "atom-one-light", "base16/atelier-cave-light", "base16/atelier-dune-light", 806 "base16/atelier-estuary-light", "base16/atelier-forest-light", "base16/atelier-heath-light", "base16/atelier-lakeside-light", 807 "base16/atelier-plateau-light", "base16/atelier-savanna-light", "base16/atelier-seaside-light", "base16/atelier-sulphurpool-light", 808 "base16/brush-trees", "base16/classic-light", "base16/cupcake", "base16/cupertino", "base16/default-light", "base16/dirtysea", 809 "base16/edge-light", "base16/equilibrium-gray-light", "base16/equilibrium-light", "base16/fruit-soda", "base16/github", 810 "base16/google-light", "base16/grayscale-light", "base16/gruvbox-light-hard", "base16/gruvbox-light-medium", 811 "base16/gruvbox-light-soft", "base16/harmonic16-light", "base16/heetch-light", "base16/humanoid-light", "base16/horizon-light", 812 "base16/ia-light", "base16/material-lighter", "base16/mexico-light", "base16/one-light", "base16/papercolor-light", 813 "base16/ros-pine-dawn", "base16/sagelight", "base16/shapeshifter", "base16/silk-light", "base16/solar-flare-light", 814 "base16/solarized-light", "base16/summerfruit-light", "base16/synth-midnight-terminal-light", "base16/tomorrow", 815 "base16/unikitty-light", "base16/windows-10-light", "base16/windows-95-light", "base16/windows-high-contrast-light", 816 "brown-paper", "base16/windows-nt-light", "color-brewer", "docco", "foundation", "github", "googlecode", "gradient-light", 817 "grayscale", "idea", "intellij-light", "isbl-editor-light", "kimbie-light", "lightfair", "magula", "mono-blue", 818 "nnfx-light", "panda-syntax-light", "paraiso-light", "purebasic", "qtcreator-light", "rose-pine-dawn", "routeros", 819 "school-book", "stackoverflow-light", "tokyo-night-light", "vs", "xcode", "default"]; 820 public static readonly ZWSP: string = "\u200b"; 821 public static readonly INLINE_TYPE: string[] = ["block-ref", "kbd", "text", "file-annotation-ref", "a", "strong", "em", "u", "s", "mark", "sup", "sub", "tag", "code", "inline-math", "inline-memo", "clear"]; 822 public static readonly BLOCK_HINT_KEYS: string[] = ["((", "[[", "((", "【【"]; 823 public static readonly BLOCK_HINT_CLOSE_KEYS: IObject = {"((": "))", "[[": "]]", "((": "))", "【【": "】】"}; 824 // common: "bash", "c", "csharp", "cpp", "css", "diff", "go", "xml", "json", "java", "javascript", "kotlin", "less", "lua", "makefile", "markdown", "objectivec", "php", "php-template", "perl", "plaintext", "python", "python-repl", "r", "ruby", "rust", "scss", "sql", "shell", "swift", "ini", "typescript", "vbnet", "yaml", "properties", "1c", "armasm", "avrasm", "actionscript", "ada", "angelscript", "accesslog", "apache", "applescript", "arcade", "arduino", "asciidoc", "aspectj", "abnf", "autohotkey", "autoit", "awk", "basic", "bnf", "dos", "brainfuck", "cal", "cmake", "csp", "cos", "capnproto", "ceylon", "clean", "clojure", "clojure-repl", "coffeescript", "coq", "crystal", "d", "dns", "dart", "delphi", "dts", "django", "dockerfile", "dust", "erb", "elixir", "elm", "erlang", "erlang-repl", "excel", "ebnf", "fsharp", "fix", "flix", "fortran", "gcode", "gams", "gauss", "glsl", "gml", "gherkin", "golo", "gradle", "groovy", "haml", "hsp", "http", "handlebars", "haskell", "haxe", "hy", "irpf90", "isbl", "inform7", "x86asm", "jboss-cli", "julia", "julia-repl", "ldif", "llvm", "lsl", "latex", "lasso", "leaf", "lisp", "livecodeserver", "livescript", "mel", "mipsasm", "matlab", "maxima", "mercury", "axapta", "routeros", "mizar", "mojolicious", "monkey", "moonscript", "n1ql", "nsis", "nestedtext", "nginx", "nim", "nix", "node-repl", "ocaml", "openscad", "ruleslanguage", "oxygene", "pf", "parser3", "pony", "pgsql", "powershell", "processing", "prolog", "protobuf", "puppet", "purebasic", "profile", "q", "qml", "reasonml", "rib", "rsl", "roboconf", "sas", "sml", "sqf", "step21", "scala", "scheme", "scilab", "smali", "smalltalk", "stan", "stata", "stylus", "subunit", "tp", "taggerscript", "tcl", "tap", "thrift", "twig", "vbscript", "vbscript-html", "vhdl", "vala", "verilog", "vim", "wasm", "mathematica", "wren", "xl", "xquery", "zephir", "crmsh", "dsconfig", "graphql", 825 // third: "yul", "solidity", "abap", "hlsl", "gdscript" 826 public static readonly ALIAS_CODE_LANGUAGES: string[] = [ 827 "js", "ts", "html", "toml", "c#", "bat" 828 ]; 829 public static readonly SIYUAN_RENDER_CODE_LANGUAGES: string[] = [ 830 "abc", "plantuml", "mermaid", "flowchart", "echarts", "mindmap", "graphviz", "math" 831 ]; 832 public static readonly PROTYLE_TOOLBAR: string[] = isMobile() ? [ 833 "block-ref", 834 "a", 835 "|", 836 "text", 837 "strong", 838 "em", 839 "u", 840 "clear", 841 "|", 842 "code", 843 "tag", 844 "inline-math", 845 "inline-memo", 846 ] : [ 847 "block-ref", 848 "a", 849 "|", 850 "text", 851 "strong", 852 "em", 853 "u", 854 "s", 855 "mark", 856 "sup", 857 "sub", 858 "clear", 859 "|", 860 "code", 861 "kbd", 862 "tag", 863 "inline-math", 864 "inline-memo", 865 ]; 866}