siyuan 1.1.3 → 1.1.5

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.1.5 2025-09-09
4
+
5
+ * [Adjust imports to separate type and general](https://github.com/siyuan-note/petal/pull/41)
6
+ * [Supplement missing attributes](https://github.com/siyuan-note/petal/issues/40)
7
+ * [Add plugin function `expandDocTree`](https://github.com/siyuan-note/siyuan/issues/15639)
8
+
9
+ ## v1.1.4 2025-09-02
10
+
11
+ * [Add plugin event bus `code-language-update` and `code-language-change`](https://github.com/siyuan-note/siyuan/pull/15610)
12
+
3
13
  ## v1.1.3 2025-08-26
4
14
 
5
15
  * [Add plugin function `getActiveEditor`](https://github.com/siyuan-note/siyuan/issues/15641)
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "README.md",
13
13
  "siyuan.d.ts"
14
14
  ],
15
- "version": "1.1.3",
15
+ "version": "1.1.5",
16
16
  "repository": {
17
17
  "type": "git",
18
18
  "url": "git+https://github.com/siyuan-note/petal.git"
package/siyuan.d.ts CHANGED
@@ -1,26 +1,30 @@
1
- import {
1
+ import type {
2
2
  IGetDocInfo,
3
3
  IGetTreeStat,
4
4
  IMenuBaseDetail,
5
- Config,
6
- Custom,
7
- Dock,
8
5
  IMenu,
9
6
  IObject,
10
7
  IPosition,
11
8
  ISiyuan,
12
9
  IWebSocketData,
13
10
  IProtyle,
11
+ IProtyleOptions,
12
+ TProtyleAction,
13
+ IMenuItem,
14
+ IRefDefs,
15
+ } from "./types";
16
+ import {
17
+ Config,
18
+ Custom,
14
19
  Lute,
15
20
  Protyle,
16
21
  Toolbar,
17
- IProtyleOptions,
18
- TProtyleAction,
19
22
  subMenu,
20
23
  App,
21
24
  Files,
22
- Tab, Model,
23
- IMenuItem, IRefDefs, MobileCustom,
25
+ Tab,
26
+ Model,
27
+ MobileCustom,
24
28
  } from "./types";
25
29
 
26
30
  export * from "./types";
@@ -204,6 +208,12 @@ export interface IEventBusMap {
204
208
  "sync-fail": IWebSocketData;
205
209
  "mobile-keyboard-show": void;
206
210
  "mobile-keyboard-hide": void;
211
+ "code-language-update": { languages: string[] };
212
+ "code-language-change": {
213
+ language: string,
214
+ languageElements: HTMLElement[],
215
+ protyle: IProtyle
216
+ };
207
217
  }
208
218
 
209
219
  export interface IPluginDockTab {
@@ -290,6 +300,11 @@ export function getActiveTab(wndActive?: boolean): Tab;
290
300
  */
291
301
  export function getActiveEditor(wndActive?: boolean): Protyle;
292
302
 
303
+ export function expandDocTree(options: {
304
+ id: string,
305
+ isSetCurrent?: boolean
306
+ }): void;
307
+
293
308
  export function openMobileFileById(app: App, id: string, action?: TProtyleAction[]): void;
294
309
 
295
310
  export function openTab(options: {
@@ -1,4 +1,4 @@
1
- import {IObject, Config} from "../siyuan";
1
+ import type {IObject, Config} from "../siyuan";
2
2
 
3
3
  const altNumber = navigator.platform.toUpperCase().indexOf("MAC") > -1 ? "⌃" : "⌥";
4
4
 
package/types/index.d.ts CHANGED
@@ -211,7 +211,7 @@ export interface ISiyuan {
211
211
  }[]
212
212
  },
213
213
  dragElement?: HTMLElement,
214
- currentDragOverTabHeadersElement?: HTMLElement,
214
+ currentDragOverTabHeadersElement?: HTMLElement
215
215
  layout?: {
216
216
  layout?: Layout,
217
217
  centerLayout?: Layout,
@@ -240,6 +240,10 @@ export interface ISiyuan {
240
240
  blockPanels: BlockPanel[],
241
241
  dialogs: Dialog[],
242
242
  viewer?: Viewer
243
+ /**
244
+ * 是否在发布服务下访问
245
+ */
246
+ isPublish?: boolean;
243
247
  }
244
248
 
245
249
  export interface IMenu {
@@ -102,6 +102,8 @@ export interface IProtyleOptions {
102
102
  render?: {
103
103
  background?: boolean
104
104
  title?: boolean
105
+ titleShowTop?: boolean
106
+ hideTitleOnZoom?: boolean
105
107
  gutter?: boolean
106
108
  scroll?: boolean
107
109
  breadcrumb?: boolean