siyuan 1.0.8 → 1.1.0

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,6 +1,19 @@
1
1
  # Changelog
2
2
 
3
- ## v1.0.9 2025-01
3
+ ## v1.1.1 2025-03
4
+
5
+ ## v1.1.0 2025-03-04
6
+
7
+ * [Support floating window `Open in New Tab`](https://github.com/siyuan-note/siyuan/issues/11801)
8
+ * [Add `data-id` attribute to the buttons](https://github.com/siyuan-note/siyuan/pull/14182)
9
+ * [Upgrade to Graphviz v3.11.0](https://github.com/siyuan-note/siyuan/issues/13852)
10
+ * [Add parameter `nodeElement` to `protyleSlash.callback`](https://github.com/siyuan-note/siyuan/issues/14036)
11
+
12
+ ## v1.0.9 2025-02-11
13
+
14
+ * [Backlink count at the doc block title including sub-blocks](https://github.com/siyuan-note/siyuan/issues/13791)
15
+ * [Improve list item, super block and blockquote backlink propagation](https://github.com/siyuan-note/siyuan/issues/13776)
16
+ * [Add plugin function `openSetting`](https://github.com/siyuan-note/siyuan/pull/13761)
4
17
 
5
18
  ## v1.0.8 2024-12-24
6
19
 
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "README.md",
13
13
  "siyuan.d.ts"
14
14
  ],
15
- "version": "1.0.8",
15
+ "version": "1.1.0",
16
16
  "repository": {
17
17
  "type": "git",
18
18
  "url": "git+https://github.com/siyuan-note/petal.git"
package/siyuan.d.ts CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  App,
21
21
  Files,
22
22
  Tab, Model,
23
- IMenuItem,
23
+ IMenuItem, IRefDefs,
24
24
  } from "./types";
25
25
 
26
26
  export * from "./types";
@@ -276,6 +276,7 @@ export function openTab(options: {
276
276
  position?: "right" | "bottom";
277
277
  keepCursor?: boolean; // 是否跳转到新 tab 上
278
278
  removeCurrentTab?: boolean; // 在当前页签打开时需移除原有页签
279
+ openNewTab?: boolean // 使用新页签打开
279
280
  afterOpen?: () => void; // 打开后回调
280
281
  }): Promise<Tab>
281
282
 
@@ -303,6 +304,8 @@ export function getAllModels(): {
303
304
  custom: [],
304
305
  }
305
306
 
307
+ export function openSetting(app: App): Dialog | undefined;
308
+
306
309
  export function getModelByDockType(type: TDock | string): Model | any;
307
310
 
308
311
  /**
@@ -324,7 +327,7 @@ export abstract class Plugin {
324
327
  filter: string[],
325
328
  html: string,
326
329
  id: string,
327
- callback(protyle: Protyle): void,
330
+ callback(protyle: Protyle, nodeElement: HTMLElement): void,
328
331
  }[];
329
332
  protyleOptions: IProtyleOptions;
330
333
 
@@ -403,11 +406,12 @@ export abstract class Plugin {
403
406
  addCommand(options: ICommand): void;
404
407
 
405
408
  addFloatLayer(options: {
406
- ids: string[],
407
- defIds?: string[],
409
+ refDefs: IRefDefs[],
408
410
  x?: number,
409
411
  y?: number,
410
- targetElement?: HTMLElement
412
+ targetElement?: HTMLElement,
413
+ originalRefBlockIDs?: IObject,
414
+ isBacklink: boolean,
411
415
  }): void;
412
416
 
413
417
  updateCards(options: ICardData): Promise<ICardData> | ICardData;
@@ -492,7 +496,11 @@ export class Menu {
492
496
 
493
497
  addItem(option: IMenu): HTMLElement;
494
498
 
495
- addSeparator(index?: number, ignore?: boolean): HTMLElement;
499
+ addSeparator(options?: {
500
+ index?: number,
501
+ id?: string,
502
+ ignore?: boolean
503
+ }): HTMLElement;
496
504
 
497
505
  open(options: IPosition): void;
498
506
 
package/types/index.d.ts CHANGED
@@ -148,6 +148,11 @@ export interface IOperation {
148
148
  removeDest?: boolean // removeAttrViewCol 专享
149
149
  }
150
150
 
151
+ export interface IRefDefs {
152
+ refID: string,
153
+ defIDs?: string[]
154
+ }
155
+
151
156
  export interface IPosition {
152
157
  x: number,
153
158
  y: number,
@@ -206,6 +211,7 @@ export interface ISiyuan {
206
211
  }[]
207
212
  },
208
213
  dragElement?: HTMLElement,
214
+ currentDragOverTabHeadersElement?: HTMLElement,
209
215
  layout?: {
210
216
  layout?: Layout,
211
217
  centerLayout?: Layout,
@@ -414,7 +420,7 @@ export declare class subMenu {
414
420
 
415
421
  constructor();
416
422
 
417
- addSeparator(index?: number): void;
423
+ addSeparator(index?: number, id?: string): void;
418
424
 
419
425
  addItem(menu: IMenu): void;
420
426
  }
@@ -426,7 +432,9 @@ export declare class App {
426
432
 
427
433
  export declare class Menus {
428
434
  menu: Menu;
435
+
429
436
  constructor(app: App);
437
+
430
438
  private getDir;
431
439
  private unselect;
432
440
  }
@@ -95,6 +95,7 @@ export interface IProtyleOptions {
95
95
  mode?: TEditorMode,
96
96
  blockId?: string
97
97
  rootId?: string
98
+ originalRefBlockIDs?: IObject
98
99
  key?: string
99
100
  defId?: string
100
101
  render?: {
@@ -173,9 +174,9 @@ export interface IProtyle {
173
174
  }
174
175
 
175
176
  declare class Viz {
176
- constructor(worker: { worker: Worker });
177
+ public static instance(): Promise<Viz>;
177
178
 
178
- renderSVGElement: (code: string) => Promise<any>;
179
+ renderSVGElement: (code: string) => SVGElement;
179
180
  }
180
181
 
181
182
  declare class Viewer {