@shwfed/nuxt 0.1.49 → 0.1.51

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.
Files changed (135) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/app.d.vue.ts +35 -54
  3. package/dist/runtime/components/app.vue +528 -100
  4. package/dist/runtime/components/app.vue.d.ts +35 -54
  5. package/dist/runtime/components/logo.d.vue.ts +3 -0
  6. package/dist/runtime/components/logo.vue +58 -0
  7. package/dist/runtime/components/logo.vue.d.ts +3 -0
  8. package/dist/runtime/components/ui/collapsible/Collapsible.d.vue.ts +20 -0
  9. package/dist/runtime/components/ui/collapsible/Collapsible.vue +23 -0
  10. package/dist/runtime/components/ui/collapsible/Collapsible.vue.d.ts +20 -0
  11. package/dist/runtime/components/ui/collapsible/CollapsibleContent.d.vue.ts +14 -0
  12. package/dist/runtime/components/ui/collapsible/CollapsibleContent.vue +17 -0
  13. package/dist/runtime/components/ui/collapsible/CollapsibleContent.vue.d.ts +14 -0
  14. package/dist/runtime/components/ui/collapsible/CollapsibleTrigger.d.vue.ts +14 -0
  15. package/dist/runtime/components/ui/collapsible/CollapsibleTrigger.vue +16 -0
  16. package/dist/runtime/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +14 -0
  17. package/dist/runtime/components/ui/collapsible/index.d.ts +3 -0
  18. package/dist/runtime/components/ui/collapsible/index.js +3 -0
  19. package/dist/runtime/components/ui/field/index.d.ts +1 -1
  20. package/dist/runtime/components/ui/navigation-menu/NavigationMenuContent.vue +1 -1
  21. package/dist/runtime/components/ui/navigation-menu/NavigationMenuIndicator.vue +1 -1
  22. package/dist/runtime/components/ui/navigation-menu/NavigationMenuLink.vue +1 -1
  23. package/dist/runtime/components/ui/sheet/Sheet.d.vue.ts +21 -0
  24. package/dist/runtime/components/ui/sheet/Sheet.vue +20 -0
  25. package/dist/runtime/components/ui/sheet/Sheet.vue.d.ts +21 -0
  26. package/dist/runtime/components/ui/sheet/SheetClose.d.vue.ts +14 -0
  27. package/dist/runtime/components/ui/sheet/SheetClose.vue +16 -0
  28. package/dist/runtime/components/ui/sheet/SheetClose.vue.d.ts +14 -0
  29. package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +35 -0
  30. package/dist/runtime/components/ui/sheet/SheetContent.vue +53 -0
  31. package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +35 -0
  32. package/dist/runtime/components/ui/sheet/SheetDescription.d.vue.ts +18 -0
  33. package/dist/runtime/components/ui/sheet/SheetDescription.vue +21 -0
  34. package/dist/runtime/components/ui/sheet/SheetDescription.vue.d.ts +18 -0
  35. package/dist/runtime/components/ui/sheet/SheetFooter.d.vue.ts +17 -0
  36. package/dist/runtime/components/ui/sheet/SheetFooter.vue +17 -0
  37. package/dist/runtime/components/ui/sheet/SheetFooter.vue.d.ts +17 -0
  38. package/dist/runtime/components/ui/sheet/SheetHeader.d.vue.ts +17 -0
  39. package/dist/runtime/components/ui/sheet/SheetHeader.vue +15 -0
  40. package/dist/runtime/components/ui/sheet/SheetHeader.vue.d.ts +17 -0
  41. package/dist/runtime/components/ui/sheet/SheetOverlay.d.vue.ts +18 -0
  42. package/dist/runtime/components/ui/sheet/SheetOverlay.vue +22 -0
  43. package/dist/runtime/components/ui/sheet/SheetOverlay.vue.d.ts +18 -0
  44. package/dist/runtime/components/ui/sheet/SheetTitle.d.vue.ts +18 -0
  45. package/dist/runtime/components/ui/sheet/SheetTitle.vue +21 -0
  46. package/dist/runtime/components/ui/sheet/SheetTitle.vue.d.ts +18 -0
  47. package/dist/runtime/components/ui/sheet/SheetTrigger.d.vue.ts +14 -0
  48. package/dist/runtime/components/ui/sheet/SheetTrigger.vue +16 -0
  49. package/dist/runtime/components/ui/sheet/SheetTrigger.vue.d.ts +14 -0
  50. package/dist/runtime/components/ui/sheet/index.d.ts +8 -0
  51. package/dist/runtime/components/ui/sheet/index.js +8 -0
  52. package/dist/runtime/components/ui/sidebar/Sidebar.d.vue.ts +22 -0
  53. package/dist/runtime/components/ui/sidebar/Sidebar.vue +92 -0
  54. package/dist/runtime/components/ui/sidebar/Sidebar.vue.d.ts +22 -0
  55. package/dist/runtime/components/ui/sidebar/SidebarContent.d.vue.ts +17 -0
  56. package/dist/runtime/components/ui/sidebar/SidebarContent.vue +16 -0
  57. package/dist/runtime/components/ui/sidebar/SidebarContent.vue.d.ts +17 -0
  58. package/dist/runtime/components/ui/sidebar/SidebarFooter.d.vue.ts +17 -0
  59. package/dist/runtime/components/ui/sidebar/SidebarFooter.vue +16 -0
  60. package/dist/runtime/components/ui/sidebar/SidebarFooter.vue.d.ts +17 -0
  61. package/dist/runtime/components/ui/sidebar/SidebarGroup.d.vue.ts +17 -0
  62. package/dist/runtime/components/ui/sidebar/SidebarGroup.vue +16 -0
  63. package/dist/runtime/components/ui/sidebar/SidebarGroup.vue.d.ts +17 -0
  64. package/dist/runtime/components/ui/sidebar/SidebarGroupAction.d.vue.ts +18 -0
  65. package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue +26 -0
  66. package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue.d.ts +18 -0
  67. package/dist/runtime/components/ui/sidebar/SidebarGroupContent.d.vue.ts +17 -0
  68. package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue +16 -0
  69. package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue.d.ts +17 -0
  70. package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.d.vue.ts +18 -0
  71. package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue +25 -0
  72. package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +18 -0
  73. package/dist/runtime/components/ui/sidebar/SidebarHeader.d.vue.ts +17 -0
  74. package/dist/runtime/components/ui/sidebar/SidebarHeader.vue +16 -0
  75. package/dist/runtime/components/ui/sidebar/SidebarHeader.vue.d.ts +17 -0
  76. package/dist/runtime/components/ui/sidebar/SidebarInput.d.vue.ts +17 -0
  77. package/dist/runtime/components/ui/sidebar/SidebarInput.vue +20 -0
  78. package/dist/runtime/components/ui/sidebar/SidebarInput.vue.d.ts +17 -0
  79. package/dist/runtime/components/ui/sidebar/SidebarInset.d.vue.ts +17 -0
  80. package/dist/runtime/components/ui/sidebar/SidebarInset.vue +19 -0
  81. package/dist/runtime/components/ui/sidebar/SidebarInset.vue.d.ts +17 -0
  82. package/dist/runtime/components/ui/sidebar/SidebarMenu.d.vue.ts +17 -0
  83. package/dist/runtime/components/ui/sidebar/SidebarMenu.vue +16 -0
  84. package/dist/runtime/components/ui/sidebar/SidebarMenu.vue.d.ts +17 -0
  85. package/dist/runtime/components/ui/sidebar/SidebarMenuAction.d.vue.ts +21 -0
  86. package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue +31 -0
  87. package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue.d.ts +21 -0
  88. package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.d.vue.ts +17 -0
  89. package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue +24 -0
  90. package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +17 -0
  91. package/dist/runtime/components/ui/sidebar/SidebarMenuButton.d.vue.ts +24 -0
  92. package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue +50 -0
  93. package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue.d.ts +24 -0
  94. package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.d.vue.ts +26 -0
  95. package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue +28 -0
  96. package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +26 -0
  97. package/dist/runtime/components/ui/sidebar/SidebarMenuItem.d.vue.ts +17 -0
  98. package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue +16 -0
  99. package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue.d.ts +17 -0
  100. package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.d.vue.ts +8 -0
  101. package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue +32 -0
  102. package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +8 -0
  103. package/dist/runtime/components/ui/sidebar/SidebarMenuSub.d.vue.ts +17 -0
  104. package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue +20 -0
  105. package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue.d.ts +17 -0
  106. package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.d.vue.ts +23 -0
  107. package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue +32 -0
  108. package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +23 -0
  109. package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.d.vue.ts +17 -0
  110. package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue +16 -0
  111. package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +17 -0
  112. package/dist/runtime/components/ui/sidebar/SidebarProvider.d.vue.ts +26 -0
  113. package/dist/runtime/components/ui/sidebar/SidebarProvider.vue +61 -0
  114. package/dist/runtime/components/ui/sidebar/SidebarProvider.vue.d.ts +26 -0
  115. package/dist/runtime/components/ui/sidebar/SidebarRail.d.vue.ts +17 -0
  116. package/dist/runtime/components/ui/sidebar/SidebarRail.vue +30 -0
  117. package/dist/runtime/components/ui/sidebar/SidebarRail.vue.d.ts +17 -0
  118. package/dist/runtime/components/ui/sidebar/SidebarSeparator.d.vue.ts +17 -0
  119. package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue +17 -0
  120. package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue.d.ts +17 -0
  121. package/dist/runtime/components/ui/sidebar/SidebarTrigger.d.vue.ts +7 -0
  122. package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +23 -0
  123. package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue.d.ts +7 -0
  124. package/dist/runtime/components/ui/sidebar/index.d.ts +37 -0
  125. package/dist/runtime/components/ui/sidebar/index.js +45 -0
  126. package/dist/runtime/components/ui/sidebar/utils.d.ts +56 -0
  127. package/dist/runtime/components/ui/sidebar/utils.js +8 -0
  128. package/dist/runtime/components/ui/skeleton/Skeleton.d.vue.ts +7 -0
  129. package/dist/runtime/components/ui/skeleton/Skeleton.vue +13 -0
  130. package/dist/runtime/components/ui/skeleton/Skeleton.vue.d.ts +7 -0
  131. package/dist/runtime/components/ui/skeleton/index.d.ts +1 -0
  132. package/dist/runtime/components/ui/skeleton/index.js +1 -0
  133. package/dist/runtime/plugins/cel/env.js +9 -1
  134. package/dist/runtime/plugins/cel/index.js +2 -1
  135. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.1.49",
4
+ "version": "0.1.51",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,63 +1,38 @@
1
1
  import type { Scope } from 'effect';
2
2
  import { Effect } from 'effect';
3
- type Position = 'command-palette' | 'dropdown';
4
3
  type Item = Readonly<{
5
4
  id: string;
6
5
  title: string;
7
6
  icon?: string;
8
- disabled?: boolean;
7
+ disabled?: boolean | string;
8
+ hidden?: boolean | string;
9
9
  keywords?: ReadonlyArray<string>;
10
- effect: Effect.Effect<void, never, Scope.Scope>;
11
- }>;
12
- type Group = Readonly<{
13
- id: string;
14
- title: string;
15
- position: ReadonlyArray<Position>;
16
- children: ReadonlyArray<Item>;
17
10
  }>;
18
- declare const _default: typeof __VLS_export;
19
- export default _default;
20
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
21
- commands?: ReadonlyArray<Group>;
11
+ type CommandPosition = 'profile' | 'command-palette';
12
+ interface Command extends Item {
13
+ positions: ReadonlyArray<CommandPosition>;
14
+ effect: Effect.Effect<void, never, Scope.Scope>;
15
+ }
16
+ interface Navigation extends Item {
17
+ target: string;
18
+ external: string;
19
+ }
20
+ type __VLS_Props = {
22
21
  /**
23
- * 应用的全局 DSL(CEL)执行上下文。传入一个 Effect,在应用启动时运行一次;
24
- * 其解析结果(一个 record)会被永久设为全局上下文,供后续所有 CEL 求值(如 `$dsl.evaluate`)使用。
25
- *
26
- * 应用会等待该 effect 解析完成后才渲染;在整个应用生命周期内只会执行一次。
27
- * 若未传入 `dsl`,全局上下文将被设为 `{}`。
28
- *
29
- * 适用于需要在首屏前就确定的、会话级稳定数据,例如:当前用户信息、用户所属组、
30
- * 用户菜单列表、用户权限(或权限模块)等。此处加载的数据在整个应用内可通过 CEL 访问
31
- *(如 `user`、`menu`、`permissions`)。强调「会话级」稳定即可,不必永久不变。
32
- *
33
- * 重要约束:
34
- * - 加载时间至关重要:在该 effect 解析前,整应用不会加载,用户会看到白屏,因此必须保持非常快
35
- * (如减少请求、缓存或并行拉取)。
36
- * - 这是有意为之的权衡:菜单、用户等关键数据必须在此加载,否则可能出现空菜单、无用户等异常表现。
37
- * - 该 effect 不得抛错(类型为 `never`):任何失败(如网络)应在 effect 内部处理,
38
- * 返回空对象或安全默认值,保证应用仍能正常启动并得到一致的全局上下文。
39
- *
40
- * 返回的 `Record<string, unknown>` 会在通过 `$dsl.evaluate` 求值 CEL 表达式时,
41
- * 与运行时上下文(如 `now`、`today` 及调用处传入的 context)合并使用。
42
- *
43
- * @example 最小示例:返回静态对象,键可在 CEL 中直接使用
44
- * dsl: Effect.succeed({ hello: 'world' })
45
- * // 之后在模板或逻辑中:$dsl.evaluate`hello`() 得到 'world'
46
- *
47
- * @example 实际场景:拉取会话数据(用户、菜单、权限)并返回,供 CEL 使用
48
- * dsl: Effect.gen(function* () {
49
- * const [user, menu, permissions] = yield* Effect.all([
50
- * fetchUser().pipe(Effect.catchAll(() => Effect.succeed({ name: '', id: '' }))),
51
- * fetchMenu().pipe(Effect.catchAll(() => Effect.succeed([]))),
52
- * fetchPermissions().pipe(Effect.catchAll(() => Effect.succeed({ canEdit: false }))),
53
- * ])
54
- * return { user, menu, permissions }
55
- * })
56
- * // CEL 中可访问 user.name、permissions.canEdit 等;失败时在 effect 内兜底,不抛错
22
+ * 所有导航项
57
23
  */
58
- dsl?: Effect.Effect<Record<string, unknown>, never, Scope.Scope>;
59
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
60
- commands?: ReadonlyArray<Group>;
24
+ navigation?: ReadonlyArray<Navigation | Readonly<{
25
+ id: string;
26
+ title: string;
27
+ icon?: string;
28
+ children: ReadonlyArray<Navigation>;
29
+ }>>;
30
+ commands?: ReadonlyArray<Command | Readonly<{
31
+ id: string;
32
+ title: string;
33
+ icon?: string;
34
+ children: ReadonlyArray<Command>;
35
+ }>>;
61
36
  /**
62
37
  * 应用的全局 DSL(CEL)执行上下文。传入一个 Effect,在应用启动时运行一次;
63
38
  * 其解析结果(一个 record)会被永久设为全局上下文,供后续所有 CEL 求值(如 `$dsl.evaluate`)使用。
@@ -95,11 +70,17 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
95
70
  * // CEL 中可访问 user.name、permissions.canEdit 等;失败时在 effect 内兜底,不抛错
96
71
  */
97
72
  dsl?: Effect.Effect<Record<string, unknown>, never, Scope.Scope>;
98
- }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
99
- menu?: (props: {}) => any;
73
+ };
74
+ declare var __VLS_103: {}, __VLS_377: {};
75
+ type __VLS_Slots = {} & {
76
+ menu?: (props: typeof __VLS_103) => any;
100
77
  } & {
101
- default?: (props: {}) => any;
102
- }>;
78
+ default?: (props: typeof __VLS_377) => any;
79
+ };
80
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
81
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
82
+ declare const _default: typeof __VLS_export;
83
+ export default _default;
103
84
  type __VLS_WithSlots<T, S> = T & {
104
85
  new (): {
105
86
  $slots: S;