@xiongtao.xt/tau-plugins 0.2.0 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiongtao.xt/tau-plugins",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +1,10 @@
1
1
  import type { Disposable } from "./contract";
2
2
  import type { PluginPageHandle, PluginPageParams } from "./pages";
3
+ import type { ComponentType, SVGProps } from "react";
4
+ export type PluginSidebarIconProps = SVGProps<SVGSVGElement> & {
5
+ size?: number | string;
6
+ };
7
+ export type PluginSidebarIcon = ComponentType<PluginSidebarIconProps>;
3
8
  export declare const SIDEBAR_GROUPS: Readonly<{
4
9
  readonly daily: "daily";
5
10
  readonly knowledge: "knowledge";
@@ -18,6 +23,8 @@ export interface PluginSidebarGroupHandle extends Disposable {
18
23
  export interface PluginSidebarItemDefinition {
19
24
  id: string;
20
25
  title: string;
26
+ /** 传入 SVG 组件本身;缺省使用插件图标。 */
27
+ icon?: PluginSidebarIcon;
21
28
  /** 缺省或分组不存在时归入默认插件分组。 */
22
29
  group?: string;
23
30
  page: PluginPageHandle;