@shwfed/nuxt 0.1.50 → 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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/app.d.vue.ts +35 -54
- package/dist/runtime/components/app.vue +528 -100
- package/dist/runtime/components/app.vue.d.ts +35 -54
- package/dist/runtime/components/logo.d.vue.ts +3 -0
- package/dist/runtime/components/logo.vue +58 -0
- package/dist/runtime/components/logo.vue.d.ts +3 -0
- package/dist/runtime/components/ui/collapsible/Collapsible.d.vue.ts +20 -0
- package/dist/runtime/components/ui/collapsible/Collapsible.vue +23 -0
- package/dist/runtime/components/ui/collapsible/Collapsible.vue.d.ts +20 -0
- package/dist/runtime/components/ui/collapsible/CollapsibleContent.d.vue.ts +14 -0
- package/dist/runtime/components/ui/collapsible/CollapsibleContent.vue +17 -0
- package/dist/runtime/components/ui/collapsible/CollapsibleContent.vue.d.ts +14 -0
- package/dist/runtime/components/ui/collapsible/CollapsibleTrigger.d.vue.ts +14 -0
- package/dist/runtime/components/ui/collapsible/CollapsibleTrigger.vue +16 -0
- package/dist/runtime/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +14 -0
- package/dist/runtime/components/ui/collapsible/index.d.ts +3 -0
- package/dist/runtime/components/ui/collapsible/index.js +3 -0
- package/dist/runtime/components/ui/field/index.d.ts +1 -1
- package/dist/runtime/components/ui/navigation-menu/NavigationMenuContent.vue +1 -1
- package/dist/runtime/components/ui/navigation-menu/NavigationMenuIndicator.vue +1 -1
- package/dist/runtime/components/ui/navigation-menu/NavigationMenuLink.vue +1 -1
- package/dist/runtime/components/ui/sheet/Sheet.d.vue.ts +21 -0
- package/dist/runtime/components/ui/sheet/Sheet.vue +20 -0
- package/dist/runtime/components/ui/sheet/Sheet.vue.d.ts +21 -0
- package/dist/runtime/components/ui/sheet/SheetClose.d.vue.ts +14 -0
- package/dist/runtime/components/ui/sheet/SheetClose.vue +16 -0
- package/dist/runtime/components/ui/sheet/SheetClose.vue.d.ts +14 -0
- package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +35 -0
- package/dist/runtime/components/ui/sheet/SheetContent.vue +53 -0
- package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +35 -0
- package/dist/runtime/components/ui/sheet/SheetDescription.d.vue.ts +18 -0
- package/dist/runtime/components/ui/sheet/SheetDescription.vue +21 -0
- package/dist/runtime/components/ui/sheet/SheetDescription.vue.d.ts +18 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.vue +17 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.vue +15 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.d.vue.ts +18 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.vue +22 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.vue.d.ts +18 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.d.vue.ts +18 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.vue +21 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.vue.d.ts +18 -0
- package/dist/runtime/components/ui/sheet/SheetTrigger.d.vue.ts +14 -0
- package/dist/runtime/components/ui/sheet/SheetTrigger.vue +16 -0
- package/dist/runtime/components/ui/sheet/SheetTrigger.vue.d.ts +14 -0
- package/dist/runtime/components/ui/sheet/index.d.ts +8 -0
- package/dist/runtime/components/ui/sheet/index.js +8 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.d.vue.ts +22 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.vue +92 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.vue.d.ts +22 -0
- package/dist/runtime/components/ui/sidebar/SidebarContent.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarContent.vue +16 -0
- package/dist/runtime/components/ui/sidebar/SidebarContent.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.vue +16 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.vue +16 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.d.vue.ts +18 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue +26 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue.d.ts +18 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue +16 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.d.vue.ts +18 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue +25 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +18 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.vue +16 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.vue +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.vue +19 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.vue +16 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.d.vue.ts +21 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue +31 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue.d.ts +21 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue +24 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.d.vue.ts +24 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue +50 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue.d.ts +24 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.d.vue.ts +26 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue +28 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +26 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue +16 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.d.vue.ts +8 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue +32 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +8 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.d.vue.ts +23 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue +32 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +23 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue +16 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.d.vue.ts +26 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.vue +61 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.vue.d.ts +26 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.vue +30 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.d.vue.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue.d.ts +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.d.vue.ts +7 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +23 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue.d.ts +7 -0
- package/dist/runtime/components/ui/sidebar/index.d.ts +37 -0
- package/dist/runtime/components/ui/sidebar/index.js +45 -0
- package/dist/runtime/components/ui/sidebar/utils.d.ts +56 -0
- package/dist/runtime/components/ui/sidebar/utils.js +8 -0
- package/dist/runtime/components/ui/skeleton/Skeleton.d.vue.ts +7 -0
- package/dist/runtime/components/ui/skeleton/Skeleton.vue +13 -0
- package/dist/runtime/components/ui/skeleton/Skeleton.vue.d.ts +7 -0
- package/dist/runtime/components/ui/skeleton/index.d.ts +1 -0
- package/dist/runtime/components/ui/skeleton/index.js +1 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
}
|
|
99
|
-
|
|
73
|
+
};
|
|
74
|
+
declare var __VLS_103: {}, __VLS_377: {};
|
|
75
|
+
type __VLS_Slots = {} & {
|
|
76
|
+
menu?: (props: typeof __VLS_103) => any;
|
|
100
77
|
} & {
|
|
101
|
-
default?: (props:
|
|
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;
|