@shwfed/nuxt 0.1.25 → 0.1.27
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 +27 -6
- package/dist/runtime/components/app.vue +29 -11
- package/dist/runtime/components/app.vue.d.ts +27 -6
- package/dist/runtime/components/ui/command/CommandGroup.vue +2 -2
- package/dist/runtime/components/ui/command/CommandItem.vue +1 -1
- package/package.json +2 -1
package/dist/module.json
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
default?: (props: typeof __VLS_53) => any;
|
|
4
|
-
};
|
|
5
|
-
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
1
|
+
import type { Scope } from 'effect';
|
|
2
|
+
import { Effect } from 'effect';
|
|
7
3
|
declare const _default: typeof __VLS_export;
|
|
8
4
|
export default _default;
|
|
5
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
6
|
+
commands?: ReadonlyArray<Readonly<{
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
children: ReadonlyArray<Readonly<{
|
|
10
|
+
id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
effect: Effect.Effect<void, never, Scope.Scope>;
|
|
14
|
+
}>>;
|
|
15
|
+
}>>;
|
|
16
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
17
|
+
commands?: ReadonlyArray<Readonly<{
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
children: ReadonlyArray<Readonly<{
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
effect: Effect.Effect<void, never, Scope.Scope>;
|
|
25
|
+
}>>;
|
|
26
|
+
}>>;
|
|
27
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
28
|
+
default?: (props: {}) => any;
|
|
29
|
+
}>;
|
|
9
30
|
type __VLS_WithSlots<T, S> = T & {
|
|
10
31
|
new (): {
|
|
11
32
|
$slots: S;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>
|
|
2
2
|
import { useHead } from "#app";
|
|
3
3
|
import { ref } from "vue";
|
|
4
|
-
import { CommandDialog, CommandInput, CommandList, CommandGroup, CommandEmpty } from "./ui/command";
|
|
4
|
+
import { CommandDialog, CommandInput, CommandList, CommandGroup, CommandEmpty, CommandItem, CommandSeparator } from "./ui/command";
|
|
5
5
|
import { TooltipProvider } from "./ui/tooltip";
|
|
6
6
|
import { Toaster } from "vue-sonner";
|
|
7
7
|
import { useMagicKeys, whenever } from "@vueuse/core";
|
|
8
8
|
import { useI18n } from "vue-i18n";
|
|
9
9
|
import { Icon } from "@iconify/vue";
|
|
10
|
+
import { Effect } from "effect";
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
defineProps({
|
|
15
|
+
commands: { type: Array, required: false }
|
|
16
|
+
});
|
|
10
17
|
const { t } = useI18n();
|
|
11
18
|
useHead({
|
|
12
19
|
bodyAttrs: {
|
|
@@ -43,18 +50,29 @@ whenever(() => meta_k?.value, () => {
|
|
|
43
50
|
</p>
|
|
44
51
|
</section>
|
|
45
52
|
</CommandEmpty>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
|
|
54
|
+
<CommandGroup
|
|
55
|
+
v-for="(group, i) in commands"
|
|
56
|
+
:key="group.id"
|
|
57
|
+
:heading="group.title"
|
|
58
|
+
>
|
|
59
|
+
<CommandItem
|
|
60
|
+
v-for="child in group.children"
|
|
61
|
+
:key="child.id"
|
|
62
|
+
:value="child.id"
|
|
63
|
+
@select="
|
|
64
|
+
child.effect.pipe(Effect.scoped).pipe(Effect.tap(() => {
|
|
65
|
+
isCommandOpen = false;
|
|
66
|
+
})).pipe(Effect.runPromise)
|
|
67
|
+
"
|
|
51
68
|
>
|
|
52
69
|
<Icon
|
|
53
|
-
v-if="
|
|
54
|
-
:icon="
|
|
70
|
+
v-if="child.icon"
|
|
71
|
+
:icon="child.icon"
|
|
55
72
|
/>
|
|
56
|
-
<span>{{
|
|
57
|
-
</CommandItem>
|
|
73
|
+
<span>{{ child.title }}</span>
|
|
74
|
+
</CommandItem>
|
|
75
|
+
<CommandSeparator v-if="i !== Object.keys(commands ?? {}).length - 1" />
|
|
58
76
|
</CommandGroup>
|
|
59
77
|
</CommandList>
|
|
60
78
|
</CommandDialog>
|
|
@@ -1,11 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
default?: (props: typeof __VLS_53) => any;
|
|
4
|
-
};
|
|
5
|
-
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
1
|
+
import type { Scope } from 'effect';
|
|
2
|
+
import { Effect } from 'effect';
|
|
7
3
|
declare const _default: typeof __VLS_export;
|
|
8
4
|
export default _default;
|
|
5
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
6
|
+
commands?: ReadonlyArray<Readonly<{
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
children: ReadonlyArray<Readonly<{
|
|
10
|
+
id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
effect: Effect.Effect<void, never, Scope.Scope>;
|
|
14
|
+
}>>;
|
|
15
|
+
}>>;
|
|
16
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
17
|
+
commands?: ReadonlyArray<Readonly<{
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
children: ReadonlyArray<Readonly<{
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
effect: Effect.Effect<void, never, Scope.Scope>;
|
|
25
|
+
}>>;
|
|
26
|
+
}>>;
|
|
27
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
28
|
+
default?: (props: {}) => any;
|
|
29
|
+
}>;
|
|
9
30
|
type __VLS_WithSlots<T, S> = T & {
|
|
10
31
|
new (): {
|
|
11
32
|
$slots: S;
|
|
@@ -29,13 +29,13 @@ onUnmounted(() => {
|
|
|
29
29
|
v-bind="delegatedProps"
|
|
30
30
|
:id="id"
|
|
31
31
|
data-slot="command-group"
|
|
32
|
-
:class="cn('text-zinc-700
|
|
32
|
+
:class="cn('text-zinc-700 p-1 pt-0 outline-none', props.class)"
|
|
33
33
|
:hidden="isRender ? void 0 : true"
|
|
34
34
|
>
|
|
35
35
|
<ListboxGroupLabel
|
|
36
36
|
v-if="heading"
|
|
37
37
|
data-slot="command-group-heading"
|
|
38
|
-
class="px-2 py-
|
|
38
|
+
class="sticky top-0 z-10 bg-white px-2 py-2 text-xs font-medium text-zinc-700 select-none"
|
|
39
39
|
>
|
|
40
40
|
{{ heading }}
|
|
41
41
|
</ListboxGroupLabel>
|
|
@@ -55,7 +55,7 @@ onUnmounted(() => {
|
|
|
55
55
|
:id="id"
|
|
56
56
|
ref="itemRef"
|
|
57
57
|
data-slot="command-item"
|
|
58
|
-
:class="cn('data-highlighted:bg-zinc-100 data-highlighted:text-zinc-700 [&_svg:not([class*=\'text-\'])]:text-zinc-700 relative flex
|
|
58
|
+
:class="cn('data-highlighted:bg-zinc-100 data-highlighted:text-zinc-700 [&_svg:not([class*=\'text-\'])]:text-zinc-700 cursor-pointer relative flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class)"
|
|
59
59
|
@select="() => {
|
|
60
60
|
filterState.search = '';
|
|
61
61
|
}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shwfed/nuxt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"date-fns": "^4.1.0",
|
|
52
52
|
"defu": "^6.1.4",
|
|
53
53
|
"dot-prop": "^10.1.0",
|
|
54
|
+
"effect": "^3.19.15",
|
|
54
55
|
"markdown-it": "^14.1.0",
|
|
55
56
|
"reka-ui": "^2.7.0",
|
|
56
57
|
"tailwind-merge": "^3.4.0",
|