@shwfed/nuxt 0.1.54 → 0.1.56

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/dist/module.d.mts CHANGED
@@ -62,10 +62,17 @@ interface ModuleOptions {
62
62
  /**
63
63
  * 导航栏右侧显示的内容,可以使用 Markdown (DSL)
64
64
  *
65
+ * 通常显示用户名
66
+ *
65
67
  * @type Markdown
66
68
  */
67
69
  name: string;
68
70
  }>;
71
+ /**
72
+ * 默认展示的应用标题
73
+ *
74
+ * 如果当前路由没有匹配到导航项,则显示该标题
75
+ */
69
76
  title: string;
70
77
  }
71
78
  interface Env {
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.1.54",
4
+ "version": "0.1.56",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -2,10 +2,37 @@ import type { Scope } from 'effect';
2
2
  import { Effect } from 'effect';
3
3
  type Item = Readonly<{
4
4
  id: string;
5
+ /**
6
+ * 命令的标题
7
+ *
8
+ * 调用者处理 i18n
9
+ *
10
+ * @type string
11
+ */
5
12
  title: string;
13
+ /**
14
+ * 命令的图标
15
+ *
16
+ * @type string
17
+ */
6
18
  icon?: string;
19
+ /**
20
+ * 命令是否禁用
21
+ *
22
+ * @type DSL
23
+ */
7
24
  disabled?: boolean | string;
25
+ /**
26
+ * 命令是否隐藏
27
+ *
28
+ * @type DSL | boolean
29
+ */
8
30
  hidden?: boolean | string;
31
+ /**
32
+ * 命令的关键词
33
+ *
34
+ * @type string[]
35
+ */
9
36
  keywords?: ReadonlyArray<string>;
10
37
  }>;
11
38
  type CommandPosition = 'profile' | 'command-palette';
@@ -14,7 +41,17 @@ interface Command extends Item {
14
41
  effect: Effect.Effect<void, never, Scope.Scope>;
15
42
  }
16
43
  interface Navigation extends Item {
44
+ /**
45
+ * 导航项的跳转目标
46
+ *
47
+ * @type string
48
+ */
17
49
  target: string;
50
+ /**
51
+ * 导航项是否为外部链接
52
+ *
53
+ * @type DSL
54
+ */
18
55
  external: string;
19
56
  }
20
57
  type __VLS_Props = {
@@ -27,6 +64,12 @@ type __VLS_Props = {
27
64
  icon?: string;
28
65
  children: ReadonlyArray<Navigation>;
29
66
  }>>;
67
+ /**
68
+ * 应用内命令列表,用于命令面板(Cmd+K)和/或顶栏个人资料下拉菜单。
69
+ * 每项为「单个命令」或「分组」:单个命令含 positions、effect;分组含 id、title、可选 icon、children(Command 数组)。
70
+ * positions 控制展示位置:'command-palette' 出现在命令面板,'profile' 出现在个人资料菜单;可同时包含两者。
71
+ * 用户选择某命令时执行其 effect(带 Scope)。可选 disabled、hidden(CEL 表达式)、keywords 与导航等用法一致。
72
+ */
30
73
  commands?: ReadonlyArray<Command | Readonly<{
31
74
  id: string;
32
75
  title: string;
@@ -2,10 +2,37 @@ import type { Scope } from 'effect';
2
2
  import { Effect } from 'effect';
3
3
  type Item = Readonly<{
4
4
  id: string;
5
+ /**
6
+ * 命令的标题
7
+ *
8
+ * 调用者处理 i18n
9
+ *
10
+ * @type string
11
+ */
5
12
  title: string;
13
+ /**
14
+ * 命令的图标
15
+ *
16
+ * @type string
17
+ */
6
18
  icon?: string;
19
+ /**
20
+ * 命令是否禁用
21
+ *
22
+ * @type DSL
23
+ */
7
24
  disabled?: boolean | string;
25
+ /**
26
+ * 命令是否隐藏
27
+ *
28
+ * @type DSL | boolean
29
+ */
8
30
  hidden?: boolean | string;
31
+ /**
32
+ * 命令的关键词
33
+ *
34
+ * @type string[]
35
+ */
9
36
  keywords?: ReadonlyArray<string>;
10
37
  }>;
11
38
  type CommandPosition = 'profile' | 'command-palette';
@@ -14,7 +41,17 @@ interface Command extends Item {
14
41
  effect: Effect.Effect<void, never, Scope.Scope>;
15
42
  }
16
43
  interface Navigation extends Item {
44
+ /**
45
+ * 导航项的跳转目标
46
+ *
47
+ * @type string
48
+ */
17
49
  target: string;
50
+ /**
51
+ * 导航项是否为外部链接
52
+ *
53
+ * @type DSL
54
+ */
18
55
  external: string;
19
56
  }
20
57
  type __VLS_Props = {
@@ -27,6 +64,12 @@ type __VLS_Props = {
27
64
  icon?: string;
28
65
  children: ReadonlyArray<Navigation>;
29
66
  }>>;
67
+ /**
68
+ * 应用内命令列表,用于命令面板(Cmd+K)和/或顶栏个人资料下拉菜单。
69
+ * 每项为「单个命令」或「分组」:单个命令含 positions、effect;分组含 id、title、可选 icon、children(Command 数组)。
70
+ * positions 控制展示位置:'command-palette' 出现在命令面板,'profile' 出现在个人资料菜单;可同时包含两者。
71
+ * 用户选择某命令时执行其 effect(带 Scope)。可选 disabled、hidden(CEL 表达式)、keywords 与导航等用法一致。
72
+ */
30
73
  commands?: ReadonlyArray<Command | Readonly<{
31
74
  id: string;
32
75
  title: string;
@@ -67,6 +67,7 @@ export default defineNuxtPlugin({
67
67
  client_id: config.apis.clientId
68
68
  });
69
69
  url.search = params.toString();
70
+ window.sessionStorage.clear();
70
71
  navigateTo(url.href, {
71
72
  external: true,
72
73
  replace: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
- "version": "0.1.54",
3
+ "version": "0.1.56",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",