siyuan 1.1.2 → 1.1.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.1.3 2025-08-26
4
+
5
+ * [Add plugin function `getActiveEditor`](https://github.com/siyuan-note/siyuan/issues/15641)
6
+ * [Add plugin function `getActiveTab`](https://github.com/siyuan-note/siyuan/issues/15415)
7
+ * [Add plugin event bus `switch-protyle-mode`](https://github.com/siyuan-note/siyuan/issues/15516)
8
+ * [Add plugin function `hideMessage`](https://github.com/siyuan-note/siyuan/issues/15485)
9
+ * [Update Constants](https://github.com/siyuan-note/petal/pull/39)
10
+ * [Add plugin function `IProtyleOptions.handleEmptyContent`](https://github.com/siyuan-note/siyuan/issues/15398)
11
+
3
12
  ## v1.1.2 2025-07-22
4
13
 
5
14
  * [Add plugin option `IProtyleOptions.click.preventInsetEmptyBlock`](https://github.com/siyuan-note/siyuan/issues/15303)
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "README.md",
13
13
  "siyuan.d.ts"
14
14
  ],
15
- "version": "1.1.2",
15
+ "version": "1.1.3",
16
16
  "repository": {
17
17
  "type": "git",
18
18
  "url": "git+https://github.com/siyuan-note/petal.git"
package/siyuan.d.ts CHANGED
@@ -149,6 +149,9 @@ export interface IEventBusMap {
149
149
  "switch-protyle": {
150
150
  protyle: IProtyle,
151
151
  };
152
+ "switch-protyle-mode": {
153
+ protyle: IProtyle,
154
+ };
152
155
  "open-menu-av": IMenuBaseDetail & { selectRowElements: HTMLElement[] };
153
156
  "open-menu-blockref": IMenuBaseDetail;
154
157
  "open-menu-breadcrumbmore": {
@@ -276,6 +279,17 @@ export function openWindow(options: {
276
279
  },
277
280
  }): void;
278
281
 
282
+ /**
283
+ * 不支持移动端
284
+ * @param {boolean} [wndActive=true] - 当前活动窗口是否为激活状态
285
+ */
286
+ export function getActiveTab(wndActive?: boolean): Tab;
287
+
288
+ /**
289
+ * @param {boolean} [wndActive=true] - 当前活动窗口是否为激活状态
290
+ */
291
+ export function getActiveEditor(wndActive?: boolean): Protyle;
292
+
279
293
  export function openMobileFileById(app: App, id: string, action?: TProtyleAction[]): void;
280
294
 
281
295
  export function openTab(options: {
@@ -372,6 +386,8 @@ export function globalCommand(command: string, app: App): void;
372
386
  */
373
387
  export function showMessage(text: string, timeout?: number, type?: "info" | "error", id?: string): void;
374
388
 
389
+ export function hideMessage(id?: string): void;
390
+
375
391
  export abstract class Plugin {
376
392
  eventBus: EventBus;
377
393
  i18n: IObject;
@@ -35,7 +35,6 @@ export abstract class Constants {
35
35
  public static readonly SIYUAN_OPEN_WORKSPACE: string = "siyuan-open-workspace";
36
36
  public static readonly SIYUAN_OPEN_URL: string = "siyuan-open-url";
37
37
  public static readonly SIYUAN_OPEN_WINDOW: string = "siyuan-open-window";
38
- public static readonly SIYUAN_OPEN_FOLDER: string = "siyuan-open-folder";
39
38
  public static readonly SIYUAN_OPEN_FILE: string = "siyuan-open-file";
40
39
 
41
40
  public static readonly SIYUAN_EXPORT_PDF: string = "siyuan-export-pdf";
@@ -43,6 +42,8 @@ export abstract class Constants {
43
42
 
44
43
  public static readonly SIYUAN_CONTEXT_MENU: string = "siyuan-context-menu";
45
44
 
45
+ public static readonly SIYUAN_SHOW_WINDOW: string = "siyuan-show-window";
46
+
46
47
  // custom
47
48
  public static readonly CUSTOM_SY_READONLY: string = "custom-sy-readonly";
48
49
  public static readonly CUSTOM_SY_FULLWIDTH: string = "custom-sy-fullwidth";
@@ -55,12 +56,49 @@ export abstract class Constants {
55
56
  public static readonly SIZE_SCROLL_TB: number = 24;
56
57
  public static readonly SIZE_SCROLL_STEP: number = 256;
57
58
  public static readonly SIZE_LINK_TEXT_MAX: number = 64;
58
- public static readonly SIZE_TOOLBAR_HEIGHT: number = 32;
59
59
  public static readonly SIZE_GET_MAX = 102400;
60
60
  public static readonly SIZE_UNDO = 64;
61
61
  public static readonly SIZE_TITLE = 512;
62
62
  public static readonly SIZE_EDITOR_WIDTH = 760;
63
- public static readonly SIZE_ZOOM = [0.25, 0.33, 0.5, 0.67, 0.75, 0.8, 0.9, 1, 1.1, 1.25, 1.5, 1.75, 2, 2.5, 3];
63
+ public static readonly SIZE_ZOOM = [
64
+ {
65
+ zoom: 0.67,
66
+ position: {x: 0, y: 2}
67
+ },
68
+ {
69
+ zoom: 0.75,
70
+ position: {x: 1, y: 4}
71
+ }, {
72
+ zoom: 0.8,
73
+ position: {x: 2, y: 4}
74
+ }, {
75
+ zoom: 0.9,
76
+ position: {x: 5, y: 6}
77
+ }, {
78
+ zoom: 1,
79
+ position: {x: 8, y: 8}
80
+ }, {
81
+ zoom: 1.1,
82
+ position: {x: 12, y: 9}
83
+ }, {
84
+ zoom: 1.25,
85
+ position: {x: 18, y: 12}
86
+ }, {
87
+ zoom: 1.5,
88
+ position: {x: 27, y: 16}
89
+ }, {
90
+ zoom: 1.75,
91
+ position: {x: 36, y: 20}
92
+ }, {
93
+ zoom: 2,
94
+ position: {x: 45, y: 23}
95
+ }, {
96
+ zoom: 2.5,
97
+ position: {x: 63, y: 31}
98
+ }, {
99
+ zoom: 3,
100
+ position: {x: 80, y: 39}
101
+ }];
64
102
 
65
103
  // ws callback
66
104
  public static readonly CB_MOVE_NOLIST = "cb-move-nolist";
@@ -71,7 +109,8 @@ export abstract class Constants {
71
109
  public static readonly CB_GET_HL = "cb-get-hl"; // 高亮
72
110
  public static readonly CB_GET_FOCUS = "cb-get-focus"; // 光标定位
73
111
  public static readonly CB_GET_FOCUSFIRST = "cb-get-focusfirst"; // 动态定位到第一个块
74
- public static readonly CB_GET_SETID = "cb-get-setid"; // 重置 blockid
112
+ public static readonly CB_GET_SETID = "cb-get-setid"; // 无折叠大纲点击 重置 blockid
113
+ public static readonly CB_GET_OUTLINE = "cb-get-outline"; // 大纲点击
75
114
  public static readonly CB_GET_ALL = "cb-get-all"; // 获取所有块
76
115
  public static readonly CB_GET_BACKLINK = "cb-get-backlink"; // 悬浮窗为传递型需展示上下文
77
116
  public static readonly CB_GET_UNUNDO = "cb-get-unundo"; // 不需要记录历史
@@ -108,8 +147,12 @@ export abstract class Constants {
108
147
  public static readonly LOCAL_SESSION_FIRSTLOAD = "local-session-firstload";
109
148
  public static readonly LOCAL_OUTLINE = "local-outline";
110
149
  public static readonly LOCAL_PLUGIN_DOCKS = "local-plugin-docks";
150
+ public static readonly LOCAL_IMAGES = "local-images";
151
+ public static readonly LOCAL_EMOJIS = "local-emojis";
152
+ public static readonly LOCAL_MOVE_PATH = "local-move-path";
111
153
 
112
154
  // dialog
155
+ public static readonly DIALOG_CONFIRM = "dialog-confirm";
113
156
  public static readonly DIALOG_OPENCARD = "dialog-opencard";
114
157
  public static readonly DIALOG_MAKECARD = "dialog-makecard";
115
158
  public static readonly DIALOG_VIEWCARDS = "dialog-viewcards";
@@ -167,6 +210,7 @@ export abstract class Constants {
167
210
  public static readonly DIALOG_SAVEWORKSPACE = "dialog-saveworkspace"; // 保存工作空间
168
211
 
169
212
  // timeout
213
+ public static readonly TIMEOUT_OPENDIALOG = 50;
170
214
  public static readonly TIMEOUT_DBLCLICK = 190;
171
215
  public static readonly TIMEOUT_INPUT = 256;
172
216
  public static readonly TIMEOUT_LOAD = 300;
@@ -174,18 +218,20 @@ export abstract class Constants {
174
218
  public static readonly TIMEOUT_COUNT = 1000;
175
219
 
176
220
  // id
177
- public static readonly HELP_PATH = {
178
- zh_CN: "20210808180117-czj9bvb",
179
- zh_CHT: "20211226090932-5lcq56f",
221
+ public static readonly HELP_PATH: { [key: string]: string } = {
222
+ ar_SA: "20210808180117-6v0mkxr",
223
+ de_DE: "20210808180117-6v0mkxr",
180
224
  en_US: "20210808180117-6v0mkxr",
181
- fr_FR: "20210808180117-6v0mkxr",
182
225
  es_ES: "20210808180117-6v0mkxr",
183
- ja_JP: "20240530133126-axarxgx",
184
- it_IT: "20210808180117-6v0mkxr",
185
- de_DE: "20210808180117-6v0mkxr",
226
+ fr_FR: "20210808180117-6v0mkxr",
186
227
  he_IL: "20210808180117-6v0mkxr",
187
- ru_RU: "20210808180117-6v0mkxr",
228
+ it_IT: "20210808180117-6v0mkxr",
229
+ ja_JP: "20240530133126-axarxgx",
188
230
  pl_PL: "20210808180117-6v0mkxr",
231
+ pt_BR: "20210808180117-6v0mkxr",
232
+ ru_RU: "20210808180117-6v0mkxr",
233
+ zh_CHT: "20211226090932-5lcq56f",
234
+ zh_CN: "20210808180117-czj9bvb",
189
235
  };
190
236
  public static readonly QUICK_DECK_ID = "20230218211946-2kw8jgx";
191
237
 
@@ -435,6 +481,11 @@ export abstract class Constants {
435
481
  exitFocus: {default: "", custom: ""},
436
482
  ai: {default: "", custom: ""},
437
483
  switchReadonly: {default: "", custom: ""},
484
+ switchAdjust: {default: "", custom: ""},
485
+ rtl: {default: "", custom: ""},
486
+ ltr: {default: "", custom: ""},
487
+ aiWriting: {default: "", custom: ""},
488
+ openInNewTab: {default: "", custom: ""},
438
489
  },
439
490
  insert: {
440
491
  appearance: {default: "⌥⌘X", custom: "⌥⌘X"},
@@ -630,16 +681,17 @@ export abstract class Constants {
630
681
  "text": true,
631
682
  "imgText": true,
632
683
  "imgTitle": true,
633
- "imgSrc": false,
684
+ "imgSrc": true,
634
685
  "aText": true,
635
686
  "aTitle": true,
636
- "aHref": false,
637
- "code": false,
687
+ "aHref": true,
688
+ "code": true,
638
689
  "em": true,
639
690
  "strong": true,
640
- "inlineMath": false,
691
+ "inlineMath": true,
641
692
  "inlineMemo": true,
642
- "blockRef": false,
693
+ "blockRef": true,
694
+ "fileAnnotationRef": true,
643
695
  "kbd": true,
644
696
  "mark": true,
645
697
  "s": true,
@@ -648,9 +700,9 @@ export abstract class Constants {
648
700
  "tag": true,
649
701
  "u": true,
650
702
  "docTitle": true,
651
- "codeBlock": false,
652
- "mathBlock": false,
653
- "htmlBlock": false
703
+ "codeBlock": true,
704
+ "mathBlock": true,
705
+ "htmlBlock": true
654
706
  };
655
707
 
656
708
  // image
@@ -661,51 +713,63 @@ export abstract class Constants {
661
713
  <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>
662
714
  <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>
663
715
  </svg>`;
664
- public static readonly SIYUAN_IMAGE_FILE: string = "1f4c4";
665
- public static readonly SIYUAN_IMAGE_NOTE: string = "1f5c3";
666
- public static readonly SIYUAN_IMAGE_FOLDER: string = "1f4d1";
667
716
 
668
717
  // assets
669
718
  public static readonly SIYUAN_ASSETS_IMAGE: string[] = [".apng", ".ico", ".cur", ".jpg", ".jpe", ".jpeg", ".jfif", ".pjp", ".pjpeg", ".png", ".gif", ".webp", ".bmp", ".svg", ".avif"];
670
- public static readonly SIYUAN_ASSETS_AUDIO: string[] = [".mp3", ".wav", ".ogg", ".m4a", ".aac"];
719
+ public static readonly SIYUAN_ASSETS_AUDIO: string[] = [".mp3", ".wav", ".ogg", ".m4a", ".aac", ".flac"];
671
720
  public static readonly SIYUAN_ASSETS_VIDEO: string[] = [".mov", ".weba", ".mkv", ".mp4", ".webm"];
672
721
  public static readonly SIYUAN_ASSETS_EXTS: string[] = [".pdf"].concat(Constants.SIYUAN_ASSETS_IMAGE).concat(Constants.SIYUAN_ASSETS_AUDIO).concat(Constants.SIYUAN_ASSETS_VIDEO);
673
722
  public static readonly SIYUAN_ASSETS_SEARCH: string[] = [".txt", ".md", ".markdown", ".docx", ".xlsx", ".pptx", ".pdf", ".json", ".log", ".sql", ".html", ".xml", ".java", ".h", ".c",
674
723
  ".cpp", ".go", ".rs", ".swift", ".kt", ".py", ".php", ".js", ".css", ".ts", ".sh", ".bat", ".cmd", ".ini", ".yaml",
675
- ".rst", ".adoc", ".textile", ".opml", ".org", ".wiki", ".epub"];
724
+ ".rst", ".adoc", ".textile", ".opml", ".org", ".wiki", ".epub", ".cs"];
676
725
 
677
726
  // protyle
678
727
  public static readonly SIYUAN_CONFIG_APPEARANCE_DARK_CODE: string[] = ["a11y-dark", "agate", "an-old-hope", "androidstudio",
679
- "arta", "atom-one-dark", "atom-one-dark-reasonable", "base16/3024", "base16/apathy", "base16/apprentice", "base16/ashes", "base16/atelier-cave", "base16/atelier-dune",
680
- "base16/atelier-estuary", "base16/atelier-forest", "base16/atelier-heath", "base16/atelier-lakeside", "base16/atelier-plateau", "base16/atelier-savanna", "base16/atelier-seaside", "base16/atelier-sulphurpool",
681
- "base16/atlas", "base16/bespin", "base16/black-metal", "base16/black-metal-bathory", "base16/black-metal-burzum", "base16/black-metal-dark-funeral", "base16/black-metal-gorgoroth", "base16/black-metal-immortal", "base16/black-metal-khold", "base16/black-metal-marduk", "base16/black-metal-mayhem", "base16/black-metal-nile", "base16/black-metal-venom", "base16/brewer", "base16/bright", "base16/brogrammer",
682
- "base16/brush-trees-dark", "base16/chalk", "base16/circus", "base16/classic-dark", "base16/codeschool", "base16/colors", "base16/danqing", "base16/darcula", "base16/dark-violet",
683
- "base16/darkmoss", "base16/darktooth", "base16/decaf", "base16/default-dark", "base16/dracula", "base16/edge-dark", "base16/eighties", "base16/embers", "base16/equilibrium-dark",
684
- "base16/equilibrium-gray-dark", "base16/espresso", "base16/eva", "base16/eva-dim", "base16/flat", "base16/framer", "base16/gigavolt", "base16/google-dark", "base16/grayscale-dark", "base16/green-screen", "base16/gruvbox-dark-hard", "base16/gruvbox-dark-medium",
685
- "base16/gruvbox-dark-pale", "base16/gruvbox-dark-soft", "base16/hardcore", "base16/harmonic16-dark", "base16/heetch-dark", "base16/helios", "base16/hopscotch", "base16/horizon-dark", "base16/humanoid-dark", "base16/ia-dark", "base16/icy-dark", "base16/ir-black", "base16/isotope",
686
- "base16/kimber", "base16/london-tube", "base16/macintosh", "base16/marrakesh", "base16/materia", "base16/material", "base16/material-darker", "base16/material-palenight", "base16/material-vivid",
687
- "base16/mellow-purple", "base16/mocha", "base16/monokai", "base16/nebula", "base16/nord", "base16/nova", "base16/ocean", "base16/oceanicnext", "base16/onedark", "base16/outrun-dark",
688
- "base16/papercolor-dark", "base16/paraiso", "base16/pasque", "base16/phd", "base16/pico", "base16/pop", "base16/porple", "base16/qualia", "base16/railscasts", "base16/rebecca",
689
- "base16/ros-pine", "base16/ros-pine-moon", "base16/sandcastle", "base16/seti-ui", "base16/silk-dark", "base16/snazzy", "base16/solar-flare", "base16/solarized-dark", "base16/spacemacs", "base16/summercamp", "base16/summerfruit-dark",
690
- "base16/synth-midnight-terminal-dark", "base16/tango", "base16/tender", "base16/tomorrow-night", "base16/twilight", "base16/unikitty-dark", "base16/vulcan",
691
- "base16/windows-10", "base16/windows-95", "base16/windows-high-contrast", "base16/windows-nt", "base16/woodland", "base16/xcode-dusk", "base16/zenburn", "codepen-embed", "dark",
692
- "devibeans", "far", "felipec", "github-dark", "github-dark-dimmed", "gml", "gradient-dark", "hybrid", "ir-black", "isbl-editor-dark", "kimbie-dark", "lioshi",
693
- "monokai", "monokai-sublime", "night-owl", "nnfx-dark", "nord", "obsidian", "panda-syntax-dark", "paraiso-dark", "pojoaque", "qtcreator-dark", "rainbow", "shades-of-purple", "srcery", "stackoverflow-dark",
694
- "sunburst", "tomorrow-night-blue", "tomorrow-night-bright", "tokyo-night-dark", "vs2015", "xt256"
728
+ "arta", "atom-one-dark", "atom-one-dark-reasonable", "base16/3024", "base16/apathy", "base16/apprentice", "base16/ashes",
729
+ "base16/atelier-cave", "base16/atelier-dune", "base16/atelier-estuary", "base16/atelier-forest", "base16/atelier-heath",
730
+ "base16/atelier-lakeside", "base16/atelier-plateau", "base16/atelier-savanna", "base16/atelier-seaside", "base16/atelier-sulphurpool",
731
+ "base16/atlas", "base16/bespin", "base16/black-metal", "base16/black-metal-bathory", "base16/black-metal-burzum",
732
+ "base16/black-metal-dark-funeral", "base16/black-metal-gorgoroth", "base16/black-metal-immortal", "base16/black-metal-khold",
733
+ "base16/black-metal-marduk", "base16/black-metal-mayhem", "base16/black-metal-nile", "base16/black-metal-venom",
734
+ "base16/brewer", "base16/bright", "base16/brogrammer", "base16/brush-trees-dark", "base16/chalk", "base16/circus",
735
+ "base16/classic-dark", "base16/codeschool", "base16/colors", "base16/danqing", "base16/darcula", "base16/dark-violet",
736
+ "base16/darkmoss", "base16/darktooth", "base16/decaf", "base16/default-dark", "base16/dracula", "base16/edge-dark",
737
+ "base16/eighties", "base16/embers", "base16/equilibrium-dark", "base16/equilibrium-gray-dark", "base16/espresso",
738
+ "base16/eva", "base16/eva-dim", "base16/flat", "base16/framer", "base16/gigavolt", "base16/google-dark", "base16/grayscale-dark",
739
+ "base16/green-screen", "base16/gruvbox-dark-hard", "base16/gruvbox-dark-medium", "base16/gruvbox-dark-pale", "base16/gruvbox-dark-soft",
740
+ "base16/hardcore", "base16/harmonic16-dark", "base16/heetch-dark", "base16/helios", "base16/hopscotch", "base16/horizon-dark",
741
+ "base16/humanoid-dark", "base16/ia-dark", "base16/icy-dark", "base16/ir-black", "base16/isotope", "base16/kimber",
742
+ "base16/london-tube", "base16/macintosh", "base16/marrakesh", "base16/materia", "base16/material", "base16/material-darker",
743
+ "base16/material-palenight", "base16/material-vivid", "base16/mellow-purple", "base16/mocha", "base16/monokai",
744
+ "base16/nebula", "base16/nord", "base16/nova", "base16/ocean", "base16/oceanicnext", "base16/onedark", "base16/outrun-dark",
745
+ "base16/papercolor-dark", "base16/paraiso", "base16/pasque", "base16/phd", "base16/pico", "base16/pop", "base16/porple",
746
+ "base16/qualia", "base16/railscasts", "base16/rebecca", "base16/ros-pine", "base16/ros-pine-moon", "base16/sandcastle",
747
+ "base16/seti-ui", "base16/silk-dark", "base16/snazzy", "base16/solar-flare", "base16/solarized-dark", "base16/spacemacs",
748
+ "base16/summercamp", "base16/summerfruit-dark", "base16/synth-midnight-terminal-dark", "base16/tango", "base16/tender",
749
+ "base16/tomorrow-night", "base16/twilight", "base16/unikitty-dark", "base16/vulcan", "base16/windows-10", "base16/windows-95",
750
+ "base16/windows-high-contrast", "base16/windows-nt", "base16/woodland", "base16/xcode-dusk", "base16/zenburn", "codepen-embed",
751
+ "cybertopia-cherry", "cybertopia-dimmer", "cybertopia-icecap", "cybertopia-saturated", "dark", "devibeans", "far",
752
+ "felipec", "github-dark", "github-dark-dimmed", "gml", "gradient-dark", "hybrid", "ir-black", "isbl-editor-dark",
753
+ "kimbie-dark", "lioshi", "monokai", "monokai-sublime", "night-owl", "nnfx-dark", "nord", "obsidian", "panda-syntax-dark",
754
+ "paraiso-dark", "pojoaque", "qtcreator-dark", "rainbow", "rose-pine", "rose-pine-moon", "shades-of-purple", "srcery",
755
+ "stackoverflow-dark", "sunburst", "tomorrow-night-blue", "tomorrow-night-bright", "tokyo-night-dark", "vs2015", "xt256"
695
756
  ];
696
757
  public static readonly SIYUAN_CONFIG_APPEARANCE_LIGHT_CODE: string[] = ["ant-design",
697
- "a11y-light", "arduino-light", "ascetic", "atom-one-light", "base16/atelier-cave-light",
698
- "base16/atelier-dune-light", "base16/atelier-estuary-light", "base16/atelier-forest-light", "base16/atelier-heath-light",
699
- "base16/atelier-lakeside-light", "base16/atelier-plateau-light", "base16/atelier-savanna-light", "base16/atelier-seaside-light", "base16/atelier-sulphurpool-light", "base16/brush-trees",
700
- "base16/classic-light", "base16/cupcake", "base16/cupertino", "base16/default-light", "base16/dirtysea", "base16/edge-light", "base16/equilibrium-gray-light", "base16/equilibrium-light",
701
- "base16/fruit-soda", "base16/github", "base16/google-light", "base16/grayscale-light", "base16/gruvbox-light-hard", "base16/gruvbox-light-medium", "base16/gruvbox-light-soft",
702
- "base16/harmonic16-light", "base16/heetch-light", "base16/humanoid-light", "base16/horizon-light", "base16/ia-light", "base16/material-lighter", "base16/mexico-light",
703
- "base16/one-light", "base16/papercolor-light", "base16/ros-pine-dawn", "base16/sagelight", "base16/shapeshifter",
704
- "base16/silk-light", "base16/solar-flare-light", "base16/solarized-light", "base16/summerfruit-light", "base16/synth-midnight-terminal-light", "base16/tomorrow",
705
- "base16/unikitty-light", "base16/windows-10-light", "base16/windows-95-light", "base16/windows-high-contrast-light", "brown-paper", "base16/windows-nt-light",
706
- "color-brewer", "docco", "foundation", "github", "googlecode", "gradient-light", "grayscale", "idea", "intellij-light", "isbl-editor-light", "kimbie-light",
707
- "lightfair", "magula", "mono-blue", "nnfx-light", "panda-syntax-light", "paraiso-light", "purebasic", "qtcreator-light", "routeros", "school-book",
708
- "stackoverflow-light", "tokyo-night-light", "vs", "xcode", "default"];
758
+ "1c-light", "a11y-light", "arduino-light", "ascetic", "atom-one-light", "base16/atelier-cave-light", "base16/atelier-dune-light",
759
+ "base16/atelier-estuary-light", "base16/atelier-forest-light", "base16/atelier-heath-light", "base16/atelier-lakeside-light",
760
+ "base16/atelier-plateau-light", "base16/atelier-savanna-light", "base16/atelier-seaside-light", "base16/atelier-sulphurpool-light",
761
+ "base16/brush-trees", "base16/classic-light", "base16/cupcake", "base16/cupertino", "base16/default-light", "base16/dirtysea",
762
+ "base16/edge-light", "base16/equilibrium-gray-light", "base16/equilibrium-light", "base16/fruit-soda", "base16/github",
763
+ "base16/google-light", "base16/grayscale-light", "base16/gruvbox-light-hard", "base16/gruvbox-light-medium",
764
+ "base16/gruvbox-light-soft", "base16/harmonic16-light", "base16/heetch-light", "base16/humanoid-light", "base16/horizon-light",
765
+ "base16/ia-light", "base16/material-lighter", "base16/mexico-light", "base16/one-light", "base16/papercolor-light",
766
+ "base16/ros-pine-dawn", "base16/sagelight", "base16/shapeshifter", "base16/silk-light", "base16/solar-flare-light",
767
+ "base16/solarized-light", "base16/summerfruit-light", "base16/synth-midnight-terminal-light", "base16/tomorrow",
768
+ "base16/unikitty-light", "base16/windows-10-light", "base16/windows-95-light", "base16/windows-high-contrast-light",
769
+ "brown-paper", "base16/windows-nt-light", "color-brewer", "docco", "foundation", "github", "googlecode", "gradient-light",
770
+ "grayscale", "idea", "intellij-light", "isbl-editor-light", "kimbie-light", "lightfair", "magula", "mono-blue",
771
+ "nnfx-light", "panda-syntax-light", "paraiso-light", "purebasic", "qtcreator-light", "rose-pine-dawn", "routeros",
772
+ "school-book", "stackoverflow-light", "tokyo-night-light", "vs", "xcode", "default"];
709
773
  public static readonly ZWSP: string = "\u200b";
710
774
  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"];
711
775
  public static readonly BLOCK_HINT_KEYS: string[] = ["((", "[[", "((", "【【"];
@@ -713,12 +777,9 @@ export abstract class Constants {
713
777
  // 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",
714
778
  // third: "yul", "solidity", "abap", "hlsl", "gdscript"
715
779
  public static readonly ALIAS_CODE_LANGUAGES: string[] = [
716
- "js", "ts", "html", "toml", "c#", "bat",
780
+ "js", "ts", "html", "toml", "c#", "bat"
717
781
  ];
718
782
  public static readonly SIYUAN_RENDER_CODE_LANGUAGES: string[] = [
719
783
  "abc", "plantuml", "mermaid", "flowchart", "echarts", "mindmap", "graphviz", "math"
720
784
  ];
721
-
722
- // Google Analytics 事件
723
- public static readonly ANALYTICS_EVT_ON_GET_CONFIG: string = "siyuan.onGetConfig";
724
785
  }
@@ -126,6 +126,8 @@ export interface IProtyleOptions {
126
126
  preventInsetEmptyBlock?: boolean
127
127
  }
128
128
 
129
+ handleEmptyContent?(): void
130
+
129
131
  /** 编辑器异步渲染完成后的回调方法 */
130
132
  after?(protyle: Protyle): void;
131
133
  }