siyuan 0.7.2 → 0.7.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 ADDED
@@ -0,0 +1,46 @@
1
+ # Changelog
2
+
3
+ ## v0.7.2
4
+ 1. 更换为 SiYuan 官方 API
5
+
6
+ ## v0.7.0
7
+ 1. 添加版本自动判断
8
+ 2. 添加插件系统内置配置页面支持插件注入
9
+ 3. 修复export classes
10
+
11
+ ## v0.5.0
12
+ 1. 插件系统国际化
13
+ 2. 插件支持卸载
14
+ 3. 插件商店预览功能
15
+
16
+ ## v0.4.0
17
+ 1. 插件系统已支持浏览器使用,需思源2.8.1及以上版本。 **注意:大量插件目前对web的支持并不好,需要等待插件开发者进行适配。建议还是在桌面端使用。**
18
+ 2. 升级过程中将原版代码挂件loader迁移到挂件版路径,但不会下载挂件。
19
+ 3. 挂件版用户记得更新到最新版本挂件
20
+
21
+ ## v0.3.21
22
+ + 挂件版本不进行自动升级,即使勾选了自动升级功能
23
+
24
+ ## v0.3.20
25
+ + 新增功能:命令面板
26
+ + 重构:修改vite构建脚本,移除dist
27
+
28
+ ## v0.3.19
29
+ + 修改图标
30
+ + eslint重构代码
31
+
32
+ ## v0.3.13
33
+ + 增加插件商店,并可配置插件商店地址
34
+ + 暴露PluginSystem及Ioc容器到window对象
35
+
36
+ ## v0.3.12
37
+ + 重构API接口,支持自动化导出api类型声明
38
+
39
+ ## v0.3.11
40
+ + 增加通过Plugin继承调用registerCommand,实现插件快捷键注册。未来将通过此方式开发命令面板。
41
+
42
+ ## v0.3.10
43
+ + 修复没有plugins时初次安装遇到的问题
44
+
45
+ ## v0.3.9
46
+ + 适配思源2.7.7,调整配置界面布局
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # Siyuan Plugin API
1
+ # SiYuan Plugin API
2
2
 
3
- This is Siyuan Plugin System API. Only types declaration here.
3
+ Here is the API declaration of SiYuan Plugin System, usages please refer to [SiYuan plugin sample](https://github.com/siyuan-note/plugin-sample).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "siyuan",
3
- "author": ["zuoez02", "Vanessa"],
3
+ "contributors": ["zuoez02", "Vanessa"],
4
4
  "types": "siyuan.d.ts",
5
- "version": "0.7.2",
6
- "repository": "https://github.com/siyuan-note/petal/type"
5
+ "version": "0.7.3",
6
+ "repository": "https://github.com/siyuan-note/petal"
7
7
  }
package/siyuan.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  type TEventBus = "ws-main" | "click-blockicon" | "click-editorcontent" | "click-pdf" |
2
- "click-editortitleicon" | "open-noneditableblock"
2
+ "click-editortitleicon" | "open-noneditableblock" | "loaded-protyle"
3
3
 
4
4
  type TCardType = "doc" | "notebook" | "all"
5
5
 
@@ -79,7 +79,7 @@ interface IWebSocketData {
79
79
  sid: string
80
80
  }
81
81
 
82
- declare interface IPluginDockTab {
82
+ interface IPluginDockTab {
83
83
  position: "LeftTop" | "LeftBottom" | "RightTop" | "RightBottom" | "BottomLeft" | "BottomRight",
84
84
  size: { width: number, height: number },
85
85
  icon: string,
@@ -190,6 +190,7 @@ export abstract class Plugin {
190
190
  name: string;
191
191
  app: App;
192
192
  commands: ICommandOption[];
193
+ setting: Setting;
193
194
 
194
195
  constructor(options: {
195
196
  app: App,
@@ -206,6 +207,7 @@ export abstract class Plugin {
206
207
  /**
207
208
  * Must be executed before the synchronous function.
208
209
  * @param {string} [options.position=right]
210
+ * @param {string} options.icon - Support svg id or svg tag.
209
211
  */
210
212
  addTopBar(options: {
211
213
  icon: string,
@@ -268,6 +270,24 @@ export abstract class Plugin {
268
270
  }): void
269
271
  }
270
272
 
273
+ export class Setting {
274
+ constructor(options: {
275
+ height?: string,
276
+ width?: string,
277
+ destroyCallback?: () => void
278
+ confirmCallback?: () => void
279
+ })
280
+
281
+ addItem(options: {
282
+ title: string
283
+ description?: string
284
+ actionElement?: HTMLElement
285
+ createActionElement?(): HTMLElement
286
+ }): void;
287
+
288
+ open(name: string): void;
289
+ }
290
+
271
291
  export class EventBus {
272
292
  on(type: TEventBus, listener: (event: CustomEvent<any>) => void): void;
273
293
 
@@ -317,7 +337,7 @@ export class Menu {
317
337
  close(): void;
318
338
  }
319
339
 
320
- declare class Lute {
340
+ export class Lute {
321
341
  public static WalkStop: number;
322
342
  public static WalkSkipChildren: number;
323
343
  public static WalkContinue: number;