@shwfed/nuxt 0.1.42 → 0.1.43

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 (52) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/app.d.vue.ts +18 -22
  3. package/dist/runtime/components/app.vue +125 -5
  4. package/dist/runtime/components/app.vue.d.ts +18 -22
  5. package/dist/runtime/components/ui/button/index.d.ts +1 -1
  6. package/dist/runtime/components/ui/dropdown-menu/DropdownMenu.d.vue.ts +20 -0
  7. package/dist/runtime/components/ui/dropdown-menu/DropdownMenu.vue +21 -0
  8. package/dist/runtime/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +20 -0
  9. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.d.vue.ts +26 -0
  10. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +44 -0
  11. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +26 -0
  12. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +32 -0
  13. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue +52 -0
  14. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +32 -0
  15. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuGroup.d.vue.ts +14 -0
  16. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuGroup.vue +16 -0
  17. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +14 -0
  18. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.d.vue.ts +22 -0
  19. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue +28 -0
  20. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +22 -0
  21. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.d.vue.ts +19 -0
  22. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue +24 -0
  23. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +19 -0
  24. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioGroup.d.vue.ts +18 -0
  25. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +22 -0
  26. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +18 -0
  27. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.d.vue.ts +24 -0
  28. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +44 -0
  29. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +24 -0
  30. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.d.vue.ts +8 -0
  31. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.vue +21 -0
  32. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +8 -0
  33. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.d.vue.ts +17 -0
  34. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.vue +15 -0
  35. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +17 -0
  36. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSub.d.vue.ts +20 -0
  37. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSub.vue +22 -0
  38. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +20 -0
  39. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +34 -0
  40. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue +44 -0
  41. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +34 -0
  42. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.d.vue.ts +19 -0
  43. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +37 -0
  44. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +19 -0
  45. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuTrigger.d.vue.ts +14 -0
  46. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuTrigger.vue +18 -0
  47. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +14 -0
  48. package/dist/runtime/components/ui/dropdown-menu/index.d.ts +15 -0
  49. package/dist/runtime/components/ui/dropdown-menu/index.js +15 -0
  50. package/dist/runtime/components/ui/input-group/InputGroupButton.d.vue.ts +1 -1
  51. package/dist/runtime/components/ui/input-group/InputGroupButton.vue.d.ts +1 -1
  52. 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.42",
4
+ "version": "0.1.43",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,32 +1,28 @@
1
1
  import type { Scope } from 'effect';
2
2
  import { Effect } from 'effect';
3
+ type Position = 'command-palette' | 'dropdown';
4
+ type Item = Readonly<{
5
+ id: string;
6
+ title: string;
7
+ icon?: string;
8
+ keywords?: ReadonlyArray<string>;
9
+ effect: Effect.Effect<void, never, Scope.Scope>;
10
+ }>;
11
+ type Group = Readonly<{
12
+ id: string;
13
+ title: string;
14
+ position: ReadonlyArray<Position>;
15
+ children: ReadonlyArray<Item>;
16
+ }>;
3
17
  declare const _default: typeof __VLS_export;
4
18
  export default _default;
5
19
  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
- keywords?: ReadonlyArray<string>;
13
- icon?: string;
14
- effect: Effect.Effect<void, never, Scope.Scope>;
15
- }>>;
16
- }>>;
20
+ commands?: ReadonlyArray<Group>;
17
21
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
18
- commands?: ReadonlyArray<Readonly<{
19
- id: string;
20
- title: string;
21
- children: ReadonlyArray<Readonly<{
22
- id: string;
23
- title: string;
24
- keywords?: ReadonlyArray<string>;
25
- icon?: string;
26
- effect: Effect.Effect<void, never, Scope.Scope>;
27
- }>>;
28
- }>>;
22
+ commands?: ReadonlyArray<Group>;
29
23
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
24
+ menu?: (props: {}) => any;
25
+ } & {
30
26
  default?: (props: {}) => any;
31
27
  }>;
32
28
  type __VLS_WithSlots<T, S> = T & {
@@ -8,6 +8,7 @@ import { useMagicKeys, whenever } from "@vueuse/core";
8
8
  import { useI18n } from "vue-i18n";
9
9
  import { Icon } from "@iconify/vue";
10
10
  import { Effect } from "effect";
11
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuGroup, DropdownMenuLabel } from "./ui/dropdown-menu";
11
12
  </script>
12
13
 
13
14
  <script setup>
@@ -51,7 +52,7 @@ whenever(() => meta_k?.value, () => {
51
52
  </CommandEmpty>
52
53
 
53
54
  <template
54
- v-for="(group, i) in commands?.filter((group2) => group2.children.length > 0)"
55
+ v-for="(group, i) in commands?.filter((group2) => group2.children.length > 0 && group2.position.includes('command-palette'))"
55
56
  :key="group.id"
56
57
  >
57
58
  <CommandGroup :heading="group.title">
@@ -81,20 +82,139 @@ whenever(() => meta_k?.value, () => {
81
82
  </CommandList>
82
83
  </CommandDialog>
83
84
  </ClientOnly>
84
- <slot />
85
+ <main class="h-screen w-screen">
86
+ <header class="bg-(--primary) h-12 w-full flex items-center justify-between px-4 gap-4">
87
+ <span class="flex items-center">
88
+ <svg
89
+ width="60"
90
+ height="24"
91
+ viewBox="0 0 60 24"
92
+ fill="none"
93
+ xmlns="http://www.w3.org/2000/svg"
94
+ >
95
+ <path
96
+ d="M43.9352 20.2102C43.7181 20.26 43.3006 19.9779 42.8497 18.6998C42.8497 18.6998 42.0481 17.1063 40.4114 17.0399H34.8167C34.0819 17.0399 33.8648 17.0897 33.1968 17.3221C32.1781 17.6706 32.128 17.4216 32.0779 17.2889C31.8941 17.0233 32.6457 17.0067 32.6624 16.1103C32.6624 16.1103 33.13 6.8482 33.3471 5.25471C32.8294 5.25471 32.5121 4.85634 32.6791 4.37497C32.8294 3.89361 33.5642 3.49524 34.3157 3.49524C34.3157 3.49524 35.7854 3.66122 37.6725 3.66122C39.5764 3.66122 41.3634 3.49524 41.3634 3.49524C42.0982 3.49524 43.0668 3.13006 42.4155 4.37497C42.1817 4.82314 41.5471 4.97253 40.8122 4.97253H36.3866C34.7165 4.97253 34.8167 5.86887 34.4326 6.63241C34.4326 6.63241 33.7312 8.37529 33.5308 15.6124L39.3927 15.297C40.1275 15.297 41.831 15.297 42.499 16.1103C42.9165 16.6415 44.0855 19.6625 43.9352 20.2102ZM42.1316 9.20523C42.0147 9.67 41.4302 10.4335 40.8122 10.4501C39.6432 10.4833 40.0607 11.2967 39.8603 12.7076L39.877 13.1391C39.9104 14.0355 39.6599 14.7658 39.4762 14.7658C39.2758 14.7658 39.1088 14.4505 39.1088 14.0521C39.0921 13.6537 38.9752 12.608 38.8249 11.7283C38.8249 11.7283 38.875 10.6659 38.2738 10.7323L36.9711 10.7655C36.2363 10.7821 36.4367 11.8278 36.2196 13.4047C36.2196 13.4047 36.0526 14.7326 35.7687 14.965C35.5182 14.965 35.3512 14.2513 35.3679 13.3715C35.3679 13.3715 35.4681 9.07244 35.5516 7.99352C35.2677 8.01011 35.1508 7.62834 35.2677 7.16358C35.4013 6.69881 36.1027 6.30044 36.8375 6.26724L39.9939 6.16765C40.7287 6.15105 41.3634 6.03486 41.2465 6.51622C41.1296 6.98099 40.3279 7.47895 39.5764 7.49555L38.3907 7.52875C37.6558 7.54535 36.9377 7.79433 36.5035 8.05991C36.5035 8.05991 36.6705 8.04331 36.4367 9.12224L40.3446 9.03924C41.0962 9.03924 42.2485 8.74046 42.1316 9.20523Z"
97
+ fill="#F9F9FF"
98
+ />
99
+ <path
100
+ d="M48.8954 15.5625C48.7117 16.0771 48.1104 16.492 47.5593 16.492C47.0082 16.492 46.5573 16.658 46.5573 16.8572C46.5573 17.0564 46.3903 17.2224 46.1899 17.2224C45.9895 17.2224 45.8225 16.5252 45.8225 15.6621V9.75291C45.8225 8.88978 45.739 8.42501 45.6388 8.29222C45.5385 8.14283 45.4717 7.39588 45.5552 6.98091C45.6388 6.56594 45.9895 6.13437 46.2734 6.13437C46.5573 6.13437 46.5907 6.48295 46.574 6.94771C46.5406 7.72786 46.574 8.47481 46.574 9.33794V13.0063C46.574 14.6164 46.7911 14.5666 47.0583 14.5666C47.3255 14.5666 47.5426 13.8694 47.5426 13.0063V6.51614C47.5426 5.65301 47.5593 5.33763 47.4591 5.20484C47.3589 5.05545 47.2921 4.2919 47.3422 3.84373C47.409 3.39557 47.8265 2.83121 48.1438 2.83121C48.4444 2.83121 48.3776 2.881 48.411 3.66115C48.4277 4.12591 48.2941 5.22144 48.2941 6.06798V13.0063C48.2941 14.55 48.5446 14.3342 48.8119 14.3342C49.0791 14.3342 49.2628 13.8694 49.2628 13.0063V8.591C49.2628 7.72786 49.2628 7.62826 49.196 7.32949C49.1626 7.1635 49.0123 6.39995 49.0958 5.96838C49.1793 5.53681 49.4298 4.95586 49.7304 4.95586C50.031 4.95586 50.0143 4.83966 50.0477 5.81899C50.0644 6.30036 49.9976 7.36268 49.9976 8.22582V15.0811C49.9976 15.9443 49.8306 16.6414 49.6302 16.6414C49.4298 16.6414 49.2628 16.1933 49.2628 15.6455C49.2294 15.0811 49.0791 15.0479 48.8954 15.5625ZM53.6717 2.30004L54.0224 2.41624C54.9911 3.22958 54.5735 4.17571 53.822 5.05545C53.822 5.05545 52.1854 6.01818 50.4151 11.9772C50.2147 11.8942 50.2314 11.1472 50.4485 10.3173C50.4485 10.3173 51.7512 5.25463 52.2856 4.20891C52.7532 3.12999 53.0037 2.28345 53.6717 2.30004ZM56.9283 20.6915C56.6945 20.7745 56.2603 20.177 55.9597 19.3802C55.9597 19.3802 54.8742 16.7576 53.7719 17.156H53.1373C52.3023 17.156 51.7512 16.7576 51.9182 16.2762C52.0685 15.7949 52.6029 15.3965 53.1039 15.3965C53.5882 15.3965 54.7239 13.5042 54.7239 13.5042C55.1915 12.7905 55.3919 12.4253 54.5568 12.4253L52.2021 12.3423C51.367 12.3423 50.9662 11.5124 51.033 11.3464C51.0998 11.197 52.0685 11.1472 52.9035 11.1472L55.7092 11.0642C56.9784 11.0476 57.2122 10.948 56.5776 9.65332C56.5776 9.65332 54.8408 5.88539 53.3544 6.33356L53.4546 6.08457C53.7552 5.28783 54.5902 4.98905 55.3084 5.42062C55.3084 5.42062 57.112 6.98091 58.4982 12.9067C58.2644 12.9897 57.6298 12.1099 57.5128 11.7614C57.3959 11.4128 57.1287 11.4958 56.945 11.944C56.7446 12.3921 56.2102 13.3383 55.7259 14.052L55.5756 14.2844C54.6571 15.8779 55.2082 15.8447 55.7092 16.7576C55.6925 16.7078 56.2102 17.0398 56.9283 20.6915ZM52.4192 9.32134L52.4693 9.15536C52.7699 8.34201 53.6717 7.94364 54.4733 8.27562C54.4733 8.27562 54.9911 8.04324 55.1915 10.3007L54.8241 10.5165C54.5234 9.38774 53.5715 9.22175 52.4192 9.32134Z"
101
+ fill="#F9F9FF"
102
+ />
103
+ <path
104
+ d="M5.85629 21.9539C5.85629 22.1901 5.8228 22.342 5.73907 22.4095C5.65534 22.477 5.53813 22.4938 5.2367 22.4938C4.93528 22.4938 4.81806 22.4601 4.75108 22.4095C4.66735 22.342 4.63386 22.207 4.63386 21.9876V19.9121H4.61711H4.06451H3.44492L3.67936 20.3171H4.06451V21.9707C4.06451 22.3926 4.14823 22.6626 4.31569 22.7976C4.48315 22.9326 4.75108 23.0001 5.28694 23.0001C5.78931 23.0001 6.05724 22.9326 6.2247 22.7976C6.39216 22.6626 6.47588 22.3757 6.47588 21.9539V19.9121H5.85629V21.9539Z"
105
+ fill="#F9F9FF"
106
+ />
107
+ <path
108
+ d="M8.40161 21.4648C8.33463 21.5998 8.2509 21.7685 8.15043 21.971L8.03321 22.2241L7.91599 22.4772H7.89924V22.2747V22.0723V21.6842V19.9124H7.88249H7.32989H6.7103L6.94474 20.3174H7.32989V22.9666H8.30114L9.17191 21.2792C9.22215 21.1948 9.28913 21.0429 9.37286 20.8405L9.47333 20.6211L9.57381 20.4017H9.59055L9.57381 20.6042V20.8067V21.2117V22.9666H10.1432V19.8955H9.17191L8.40161 21.4648Z"
109
+ fill="#F9F9FF"
110
+ />
111
+ <path
112
+ d="M15.8701 19.8955H15.3008V22.9666H17.5782L17.7959 22.4435H15.8701V19.8955Z"
113
+ fill="#F9F9FF"
114
+ />
115
+ <path
116
+ d="M18.6834 21.6167H20.1236V21.1779H18.6834V20.3849H20.1905V19.8955H18.1141V22.9666H20.3915L20.6259 22.4772H18.6834V21.6167Z"
117
+ fill="#F9F9FF"
118
+ />
119
+ <path
120
+ d="M27.0898 20.1824C26.9224 19.9968 26.6209 19.8955 26.2023 19.8955H24.7119V22.1229H25.2813V20.3849H26.1353C26.4032 20.3849 26.5707 20.4524 26.6544 20.5705C26.7214 20.6886 26.7716 20.9754 26.7716 21.431C26.7716 21.8698 26.7382 22.1566 26.6544 22.2747C26.5707 22.4097 26.3865 22.4604 26.1186 22.4604H25.2813H24.6952L24.4272 22.9497H26.219C26.7047 22.9497 27.0061 22.8485 27.14 22.6291C27.274 22.4097 27.341 21.9204 27.341 21.1611C27.341 20.7055 27.2573 20.368 27.0898 20.1824Z"
121
+ fill="#F9F9FF"
122
+ />
123
+ <path
124
+ d="M21.9656 19.8955L20.7264 22.9666H21.3293L22.401 20.3511L23.4894 22.9666H24.0755L22.8196 19.8955H21.9656Z"
125
+ fill="#F9F9FF"
126
+ />
127
+ <path
128
+ d="M2.5406 21.9541C2.5406 22.1903 2.52386 22.3422 2.47362 22.4097C2.42338 22.4772 2.30616 22.5109 2.12196 22.5109C1.82054 22.5109 1.5861 22.4097 1.5861 22.2409C1.5861 22.2072 1.5861 22.0553 1.5861 21.8866L1 21.5491V21.9878C1 22.4097 1.06698 22.6628 1.20095 22.7978C1.33491 22.9159 1.66983 23.0003 2.10521 23.0003C2.52386 23.0003 2.79179 22.9159 2.92575 22.7978C3.05972 22.6628 3.1267 22.4266 3.1267 22.0385V19.9292H2.5406V21.9541Z"
129
+ fill="#F9F9FF"
130
+ />
131
+ <path
132
+ d="M11.7842 21.2115L12.0019 21.6333H12.9396V21.8864C12.9396 22.2577 12.8894 22.3083 12.8057 22.3926C12.7219 22.4601 12.5042 22.4939 12.1861 22.4939C11.8679 22.4939 11.6502 22.4601 11.5665 22.3758C11.4828 22.2914 11.4325 22.1058 11.4325 21.8021V21.0933C11.4325 20.7896 11.4828 20.5871 11.5665 20.5028C11.6502 20.4184 11.8679 20.3846 12.2028 20.3846C12.5042 20.3846 12.7052 20.4015 12.7722 20.4521C12.8392 20.4859 12.8727 20.5703 12.8894 20.7052H13.4755C13.4588 20.3678 13.375 20.1653 13.2411 20.0472C13.0903 19.929 12.7387 19.8784 12.1861 19.8784C11.7674 19.8784 11.4828 19.9122 11.3153 19.9965C11.1478 20.064 11.0139 20.2159 10.9302 20.4353C10.8799 20.5703 10.8464 20.8234 10.8297 21.2283V21.6502C10.8297 21.6671 10.8297 21.6839 10.8297 21.7008C10.8297 22.2239 10.9134 22.5783 11.0809 22.747C11.2483 22.9157 11.6 23.0001 12.1191 23.0001C12.6885 23.0001 13.0569 22.882 13.2243 22.747C13.3918 22.612 13.4755 22.4433 13.4755 21.9539L13.4588 21.2115H11.7842Z"
133
+ fill="#F9F9FF"
134
+ />
135
+ <path
136
+ d="M14.2124 9.11474L15.1669 10.785L16.473 8.52425L15.5185 6.85403L14.2124 4.59333L12.5546 1.7084L11.7508 0.308113C11.5331 -0.079918 10.9805 -0.079918 10.7628 0.308113L9.95898 1.7084L11.2651 3.9691L12.923 6.85403L7.78204 15.8125H4.48314L9.95898 6.24668L8.65282 3.98598L1.88756 15.8125L1.08377 17.2128C0.866079 17.6008 1.13401 18.0732 1.58614 18.0732H3.17698H6.47588H9.07146L10.3776 15.8125L14.2124 9.11474Z"
137
+ fill="#F9F9FF"
138
+ />
139
+ <path
140
+ d="M26.5539 15.8123L23.1713 9.89058C23.0876 9.75561 22.8866 9.75561 22.8196 9.89058L20.9106 13.2142C20.8269 13.3491 20.9274 13.5178 21.0948 13.5178H22.6689L23.7909 15.4749C23.8746 15.6098 23.7741 15.7785 23.6067 15.7785H16.8247L20.3915 9.55316L21.6977 7.29246L20.3915 5.03175L18.4658 1.69131L17.662 0.291023C17.4443 -0.0970078 16.8917 -0.0970078 16.674 0.291023L15.8702 1.69131L14.7315 3.68208L16.0376 5.94278L17.1764 3.96889L19.1021 7.3262L14.2291 15.8123L13.1072 17.7693C13.0234 17.9043 13.1239 18.073 13.2914 18.073H15.5353H25.2645H26.8721C27.3075 18.073 27.5922 17.5837 27.3745 17.2126L26.5539 15.8123Z"
141
+ fill="#F9F9FF"
142
+ />
143
+ </svg>
144
+ </span>
145
+ <slot name="menu" />
146
+ <span class="flex-1" />
147
+ <DropdownMenu
148
+ :modal="false"
149
+ >
150
+ <DropdownMenuTrigger as-child>
151
+ <button
152
+ ref="dropdown-trigger"
153
+ type="button"
154
+ class="text-white text-sm cursor-pointer appearance-none outline-none pl-4 py-2"
155
+ >
156
+ ABC
157
+ </button>
158
+ </DropdownMenuTrigger>
159
+ <DropdownMenuContent
160
+ class="min-w-56"
161
+ align="end"
162
+ >
163
+ <template
164
+ v-for="group in commands?.filter((group2) => group2.position.includes('dropdown') && group2.children.length > 0)"
165
+ :key="group.id"
166
+ >
167
+ <DropdownMenuLabel>
168
+ {{ group.title }}
169
+ </DropdownMenuLabel>
170
+ <DropdownMenuGroup>
171
+ <DropdownMenuItem
172
+ v-for="item in group.children"
173
+ :key="item.id"
174
+ >
175
+ <Icon
176
+ v-if="item.icon"
177
+ :icon="item.icon"
178
+ />
179
+ {{ item.title }}
180
+ </DropdownMenuItem>
181
+ </DropdownMenuGroup>
182
+ <DropdownMenuSeparator />
183
+ </template>
184
+ <DropdownMenuItem>
185
+ <Icon icon="fluent:sign-out-20-regular" />
186
+ {{ t("logout") }}
187
+ </DropdownMenuItem>
188
+ <DropdownMenuSeparator />
189
+ <DropdownMenuItem disabled>
190
+ <Icon icon="fluent:history-20-regular" />
191
+ {{ t("build") }}
192
+ <code class="uppercase">{{ $dsl.evaluate`has(git.commit) && git.commit.size() > 0 ? git.commit.slice(0, 7) : 'development'`() }}</code>
193
+ </DropdownMenuItem>
194
+ </DropdownMenuContent>
195
+ </DropdownMenu>
196
+ </header>
197
+ <slot />
198
+ </main>
85
199
  </TooltipProvider>
86
200
  </template>
87
201
 
88
202
  <i18n lang="json">
89
203
  {
90
204
  "zh": {
91
- "command-palette-empty": "无搜索结果"
205
+ "command-palette-empty": "无搜索结果",
206
+ "logout": "退出登录",
207
+ "build": "构建"
92
208
  },
93
209
  "ja": {
94
- "command-palette-empty": "結果はありません"
210
+ "command-palette-empty": "結果はありません",
211
+ "logout": "ログアウト",
212
+ "build": "ビルド"
95
213
  },
96
214
  "en": {
97
- "command-palette-empty": "No results"
215
+ "command-palette-empty": "No results",
216
+ "logout": "Logout",
217
+ "build": "Build"
98
218
  }
99
219
  }
100
220
  </i18n>
@@ -1,32 +1,28 @@
1
1
  import type { Scope } from 'effect';
2
2
  import { Effect } from 'effect';
3
+ type Position = 'command-palette' | 'dropdown';
4
+ type Item = Readonly<{
5
+ id: string;
6
+ title: string;
7
+ icon?: string;
8
+ keywords?: ReadonlyArray<string>;
9
+ effect: Effect.Effect<void, never, Scope.Scope>;
10
+ }>;
11
+ type Group = Readonly<{
12
+ id: string;
13
+ title: string;
14
+ position: ReadonlyArray<Position>;
15
+ children: ReadonlyArray<Item>;
16
+ }>;
3
17
  declare const _default: typeof __VLS_export;
4
18
  export default _default;
5
19
  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
- keywords?: ReadonlyArray<string>;
13
- icon?: string;
14
- effect: Effect.Effect<void, never, Scope.Scope>;
15
- }>>;
16
- }>>;
20
+ commands?: ReadonlyArray<Group>;
17
21
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
18
- commands?: ReadonlyArray<Readonly<{
19
- id: string;
20
- title: string;
21
- children: ReadonlyArray<Readonly<{
22
- id: string;
23
- title: string;
24
- keywords?: ReadonlyArray<string>;
25
- icon?: string;
26
- effect: Effect.Effect<void, never, Scope.Scope>;
27
- }>>;
28
- }>>;
22
+ commands?: ReadonlyArray<Group>;
29
23
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
24
+ menu?: (props: {}) => any;
25
+ } & {
30
26
  default?: (props: {}) => any;
31
27
  }>;
32
28
  type __VLS_WithSlots<T, S> = T & {
@@ -1,7 +1,7 @@
1
1
  import type { VariantProps } from 'class-variance-authority';
2
2
  export { default as Button } from './Button.vue.js';
3
3
  export declare const buttonVariants: (props?: ({
4
- variant?: "default" | "primary" | "destructive" | "ghost" | null | undefined;
4
+ variant?: "default" | "destructive" | "primary" | "ghost" | null | undefined;
5
5
  size?: "default" | "sm" | "xs" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export type ButtonVariants = VariantProps<typeof buttonVariants>;
@@ -0,0 +1,20 @@
1
+ import type { DropdownMenuRootProps } from 'reka-ui';
2
+ declare var __VLS_8: {
3
+ open: boolean;
4
+ };
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_8) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<DropdownMenuRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:open": (payload: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<DropdownMenuRootProps> & Readonly<{
11
+ "onUpdate:open"?: ((payload: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,21 @@
1
+ <script setup>
2
+ import { DropdownMenuRoot, useForwardPropsEmits } from "reka-ui";
3
+ const props = defineProps({
4
+ defaultOpen: { type: Boolean, required: false },
5
+ open: { type: Boolean, required: false },
6
+ dir: { type: String, required: false },
7
+ modal: { type: Boolean, required: false }
8
+ });
9
+ const emits = defineEmits(["update:open"]);
10
+ const forwarded = useForwardPropsEmits(props, emits);
11
+ </script>
12
+
13
+ <template>
14
+ <DropdownMenuRoot
15
+ v-slot="slotProps"
16
+ data-slot="dropdown-menu"
17
+ v-bind="forwarded"
18
+ >
19
+ <slot v-bind="slotProps" />
20
+ </DropdownMenuRoot>
21
+ </template>
@@ -0,0 +1,20 @@
1
+ import type { DropdownMenuRootProps } from 'reka-ui';
2
+ declare var __VLS_8: {
3
+ open: boolean;
4
+ };
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_8) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<DropdownMenuRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:open": (payload: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<DropdownMenuRootProps> & Readonly<{
11
+ "onUpdate:open"?: ((payload: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,26 @@
1
+ import type { DropdownMenuCheckboxItemProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = DropdownMenuCheckboxItemProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_14: {}, __VLS_21: {};
7
+ type __VLS_Slots = {} & {
8
+ 'indicator-icon'?: (props: typeof __VLS_14) => any;
9
+ } & {
10
+ default?: (props: typeof __VLS_21) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (payload: boolean) => any;
14
+ select: (event: Event) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((payload: boolean) => any) | undefined;
17
+ onSelect?: ((event: Event) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,44 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { Icon } from "@iconify/vue";
4
+ import {
5
+ DropdownMenuCheckboxItem,
6
+ DropdownMenuItemIndicator,
7
+ useForwardPropsEmits
8
+ } from "reka-ui";
9
+ import { cn } from "../../../utils/cn";
10
+ const props = defineProps({
11
+ modelValue: { type: [Boolean, String], required: false },
12
+ disabled: { type: Boolean, required: false },
13
+ textValue: { type: String, required: false },
14
+ asChild: { type: Boolean, required: false },
15
+ as: { type: null, required: false },
16
+ class: { type: null, required: false }
17
+ });
18
+ const emits = defineEmits(["select", "update:modelValue"]);
19
+ const delegatedProps = reactiveOmit(props, "class");
20
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
21
+ </script>
22
+
23
+ <template>
24
+ <DropdownMenuCheckboxItem
25
+ data-slot="dropdown-menu-checkbox-item"
26
+ v-bind="forwarded"
27
+ :class="cn(
28
+ 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 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',
29
+ props.class
30
+ )"
31
+ >
32
+ <span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
33
+ <DropdownMenuItemIndicator>
34
+ <slot name="indicator-icon">
35
+ <Icon
36
+ icon="lucide:check"
37
+ class="size-4"
38
+ />
39
+ </slot>
40
+ </DropdownMenuItemIndicator>
41
+ </span>
42
+ <slot />
43
+ </DropdownMenuCheckboxItem>
44
+ </template>
@@ -0,0 +1,26 @@
1
+ import type { DropdownMenuCheckboxItemProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = DropdownMenuCheckboxItemProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_14: {}, __VLS_21: {};
7
+ type __VLS_Slots = {} & {
8
+ 'indicator-icon'?: (props: typeof __VLS_14) => any;
9
+ } & {
10
+ default?: (props: typeof __VLS_21) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (payload: boolean) => any;
14
+ select: (event: Event) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((payload: boolean) => any) | undefined;
17
+ onSelect?: ((event: Event) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,32 @@
1
+ import type { DropdownMenuContentProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = DropdownMenuContentProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_14: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_14) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ escapeKeyDown: (event: KeyboardEvent) => any;
12
+ pointerDownOutside: (event: import("reka-ui").PointerDownOutsideEvent) => any;
13
+ focusOutside: (event: import("reka-ui").FocusOutsideEvent) => any;
14
+ interactOutside: (event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any;
15
+ closeAutoFocus: (event: Event) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
18
+ onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
19
+ onFocusOutside?: ((event: import("reka-ui").FocusOutsideEvent) => any) | undefined;
20
+ onInteractOutside?: ((event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any) | undefined;
21
+ onCloseAutoFocus?: ((event: Event) => any) | undefined;
22
+ }>, {
23
+ sideOffset: number;
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
28
+ type __VLS_WithSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,52 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import {
4
+ DropdownMenuContent,
5
+ DropdownMenuPortal,
6
+ useForwardPropsEmits
7
+ } from "reka-ui";
8
+ import { cn } from "../../../utils/cn";
9
+ defineOptions({
10
+ inheritAttrs: false
11
+ });
12
+ const props = defineProps({
13
+ forceMount: { type: Boolean, required: false },
14
+ loop: { type: Boolean, required: false },
15
+ side: { type: null, required: false },
16
+ sideOffset: { type: Number, required: false, default: 4 },
17
+ sideFlip: { type: Boolean, required: false },
18
+ align: { type: null, required: false },
19
+ alignOffset: { type: Number, required: false },
20
+ alignFlip: { type: Boolean, required: false },
21
+ avoidCollisions: { type: Boolean, required: false },
22
+ collisionBoundary: { type: null, required: false },
23
+ collisionPadding: { type: [Number, Object], required: false },
24
+ arrowPadding: { type: Number, required: false },
25
+ hideShiftedArrow: { type: Boolean, required: false },
26
+ sticky: { type: String, required: false },
27
+ hideWhenDetached: { type: Boolean, required: false },
28
+ positionStrategy: { type: String, required: false },
29
+ updatePositionStrategy: { type: String, required: false },
30
+ disableUpdateOnLayoutShift: { type: Boolean, required: false },
31
+ prioritizePosition: { type: Boolean, required: false },
32
+ reference: { type: null, required: false },
33
+ asChild: { type: Boolean, required: false },
34
+ as: { type: null, required: false },
35
+ class: { type: null, required: false }
36
+ });
37
+ const emits = defineEmits(["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "closeAutoFocus"]);
38
+ const delegatedProps = reactiveOmit(props, "class");
39
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
40
+ </script>
41
+
42
+ <template>
43
+ <DropdownMenuPortal>
44
+ <DropdownMenuContent
45
+ data-slot="dropdown-menu-content"
46
+ v-bind="{ ...$attrs, ...forwarded }"
47
+ :class="cn('bg-white text-zinc-700 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-32 origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-zinc-200 p-1 shadow-md', props.class)"
48
+ >
49
+ <slot />
50
+ </DropdownMenuContent>
51
+ </DropdownMenuPortal>
52
+ </template>
@@ -0,0 +1,32 @@
1
+ import type { DropdownMenuContentProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = DropdownMenuContentProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_14: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_14) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ escapeKeyDown: (event: KeyboardEvent) => any;
12
+ pointerDownOutside: (event: import("reka-ui").PointerDownOutsideEvent) => any;
13
+ focusOutside: (event: import("reka-ui").FocusOutsideEvent) => any;
14
+ interactOutside: (event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any;
15
+ closeAutoFocus: (event: Event) => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
18
+ onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
19
+ onFocusOutside?: ((event: import("reka-ui").FocusOutsideEvent) => any) | undefined;
20
+ onInteractOutside?: ((event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any) | undefined;
21
+ onCloseAutoFocus?: ((event: Event) => any) | undefined;
22
+ }>, {
23
+ sideOffset: number;
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
28
+ type __VLS_WithSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,14 @@
1
+ import type { DropdownMenuGroupProps } from 'reka-ui';
2
+ declare var __VLS_8: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_8) => any;
5
+ };
6
+ declare const __VLS_base: import("vue").DefineComponent<DropdownMenuGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DropdownMenuGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
10
+ type __VLS_WithSlots<T, S> = T & {
11
+ new (): {
12
+ $slots: S;
13
+ };
14
+ };
@@ -0,0 +1,16 @@
1
+ <script setup>
2
+ import { DropdownMenuGroup } from "reka-ui";
3
+ const props = defineProps({
4
+ asChild: { type: Boolean, required: false },
5
+ as: { type: null, required: false }
6
+ });
7
+ </script>
8
+
9
+ <template>
10
+ <DropdownMenuGroup
11
+ data-slot="dropdown-menu-group"
12
+ v-bind="props"
13
+ >
14
+ <slot />
15
+ </DropdownMenuGroup>
16
+ </template>
@@ -0,0 +1,14 @@
1
+ import type { DropdownMenuGroupProps } from 'reka-ui';
2
+ declare var __VLS_8: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_8) => any;
5
+ };
6
+ declare const __VLS_base: import("vue").DefineComponent<DropdownMenuGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DropdownMenuGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
10
+ type __VLS_WithSlots<T, S> = T & {
11
+ new (): {
12
+ $slots: S;
13
+ };
14
+ };
@@ -0,0 +1,22 @@
1
+ import type { DropdownMenuItemProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = DropdownMenuItemProps & {
4
+ class?: HTMLAttributes['class'];
5
+ inset?: boolean;
6
+ variant?: 'default' | 'destructive';
7
+ };
8
+ declare var __VLS_8: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_8) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ variant: "default" | "destructive";
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };