abckit 0.0.9 → 0.0.11

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 (69) hide show
  1. package/dist/module.mjs +0 -1
  2. package/dist/runtime/components/app/AppBreadcrumbs.vue +1 -2
  3. package/dist/runtime/components/app/AppHeader.vue +2 -2
  4. package/dist/runtime/components/app/AppNavMain.d.vue.ts +1 -2
  5. package/dist/runtime/components/app/AppNavMain.vue +4 -4
  6. package/dist/runtime/components/app/AppNavMain.vue.d.ts +1 -2
  7. package/dist/runtime/components/ui/accordion/AccordionTrigger.vue +3 -2
  8. package/dist/runtime/components/ui/auto-form/AutoFormFieldArray.vue +3 -3
  9. package/dist/runtime/components/ui/auto-form/AutoFormFieldDate.vue +2 -2
  10. package/dist/runtime/components/ui/auto-form/AutoFormFieldFile.vue +2 -2
  11. package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue +2 -2
  12. package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue +2 -2
  13. package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +2 -2
  14. package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +2 -2
  15. package/dist/runtime/components/ui/carousel/CarouselNext.vue +2 -2
  16. package/dist/runtime/components/ui/carousel/CarouselPrevious.vue +2 -2
  17. package/dist/runtime/components/ui/checkbox/Checkbox.vue +2 -2
  18. package/dist/runtime/components/ui/combobox/ComboboxInput.vue +2 -2
  19. package/dist/runtime/components/ui/command/CommandInput.vue +2 -2
  20. package/dist/runtime/components/ui/context-menu/ContextMenuCheckboxItem.vue +2 -2
  21. package/dist/runtime/components/ui/context-menu/ContextMenuRadioItem.vue +2 -2
  22. package/dist/runtime/components/ui/context-menu/ContextMenuSubTrigger.vue +2 -2
  23. package/dist/runtime/components/ui/dialog/DialogContent.vue +2 -2
  24. package/dist/runtime/components/ui/dialog/DialogScrollContent.vue +2 -2
  25. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +2 -2
  26. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +2 -2
  27. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +2 -2
  28. package/dist/runtime/components/ui/file/FileEmptyState.vue +3 -3
  29. package/dist/runtime/components/ui/file/FileGrid.vue +10 -10
  30. package/dist/runtime/components/ui/file/FileTable.vue +16 -17
  31. package/dist/runtime/components/ui/input-otp/InputOTPSeparator.vue +2 -2
  32. package/dist/runtime/components/ui/menubar/MenubarCheckboxItem.vue +2 -2
  33. package/dist/runtime/components/ui/menubar/MenubarRadioItem.vue +2 -2
  34. package/dist/runtime/components/ui/menubar/MenubarSubTrigger.vue +2 -2
  35. package/dist/runtime/components/ui/native-select/NativeSelect.vue +3 -2
  36. package/dist/runtime/components/ui/navigation-menu/NavigationMenuTrigger.vue +3 -2
  37. package/dist/runtime/components/ui/number-field/NumberFieldDecrement.vue +2 -2
  38. package/dist/runtime/components/ui/number-field/NumberFieldIncrement.vue +2 -2
  39. package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue +2 -2
  40. package/dist/runtime/components/ui/pagination/PaginationFirst.vue +2 -2
  41. package/dist/runtime/components/ui/pagination/PaginationLast.vue +2 -2
  42. package/dist/runtime/components/ui/pagination/PaginationNext.vue +2 -2
  43. package/dist/runtime/components/ui/pagination/PaginationPrevious.vue +2 -2
  44. package/dist/runtime/components/ui/pin-input/PinInputSeparator.vue +2 -2
  45. package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue +2 -2
  46. package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue +2 -2
  47. package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue +2 -2
  48. package/dist/runtime/components/ui/resizable/ResizableHandle.vue +2 -2
  49. package/dist/runtime/components/ui/select/SelectItem.vue +2 -2
  50. package/dist/runtime/components/ui/select/SelectScrollDownButton.vue +2 -2
  51. package/dist/runtime/components/ui/select/SelectScrollUpButton.vue +2 -2
  52. package/dist/runtime/components/ui/select/SelectTrigger.vue +2 -2
  53. package/dist/runtime/components/ui/sheet/InnerSheetContent.vue +2 -2
  54. package/dist/runtime/components/ui/sheet/SheetContent.vue +2 -2
  55. package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +2 -2
  56. package/dist/runtime/components/ui/sonner/Sonner.vue +7 -7
  57. package/dist/runtime/components/ui/spinner/Spinner.vue +3 -2
  58. package/dist/runtime/components/ui/storage/StorageActionBar.vue +3 -4
  59. package/dist/runtime/components/ui/storage/StorageEmptyState.vue +3 -4
  60. package/dist/runtime/components/ui/storage/StorageGrid.vue +10 -11
  61. package/dist/runtime/components/ui/storage/StorageSelectionBar.vue +3 -3
  62. package/dist/runtime/components/ui/storage/StorageTable.vue +10 -11
  63. package/dist/runtime/components/ui/storage/StorageUploadZone.vue +5 -4
  64. package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue +2 -2
  65. package/dist/runtime/composables/useAuth.d.ts +4 -18
  66. package/dist/runtime/middleware/auth.global.d.ts +1 -1
  67. package/dist/runtime/shared/constants/r2.js +12 -6
  68. package/dist/runtime/types/nitro-graphql-client.d.ts +0 -1
  69. package/package.json +13 -14
@@ -1,5 +1,4 @@
1
1
  <script setup>
2
- import { Cloud, FileText, Film, Folder, Image, MoreVertical } from "lucide-vue-next";
3
2
  import { bytesToSize } from "abckit/shared/constants/r2";
4
3
  import { Badge } from "abckit/shadcn/badge";
5
4
  import { Button } from "abckit/shadcn/button";
@@ -18,13 +17,13 @@ const props = defineProps({
18
17
  });
19
18
  const emit = defineEmits(["fileClick", "folderClick", "toggleSelection", "selectAll", "fileAction"]);
20
19
  const FILE_TYPE_ICONS = {
21
- IMAGE: Image,
22
- VIDEO: Film,
23
- AUDIO: FileText,
24
- DOCUMENT: FileText,
25
- ARCHIVE: Cloud,
26
- OTHER: Cloud,
27
- FOLDER: Folder
20
+ IMAGE: "lucide:image",
21
+ VIDEO: "lucide:film",
22
+ AUDIO: "lucide:file-text",
23
+ DOCUMENT: "lucide:file-text",
24
+ ARCHIVE: "lucide:cloud",
25
+ OTHER: "lucide:cloud",
26
+ FOLDER: "lucide:folder"
28
27
  };
29
28
  const FILE_TYPE_LABELS = {
30
29
  IMAGE: "Image",
@@ -113,9 +112,9 @@ const someSelected = computed(
113
112
  class="h-full w-full"
114
113
  fallback=""
115
114
  />
116
- <component
115
+ <Icon
117
116
  v-else
118
- :is="getFileIcon(file)"
117
+ :name="getFileIcon(file)"
119
118
  class="h-5 w-5 text-muted-foreground"
120
119
  />
121
120
  </div>
@@ -145,7 +144,7 @@ const someSelected = computed(
145
144
  class="h-8 w-8"
146
145
  @click.stop
147
146
  >
148
- <MoreVertical class="h-4 w-4" />
147
+ <Icon name="lucide:more-vertical" class="h-4 w-4" />
149
148
  </Button>
150
149
  </DropdownMenuTrigger>
151
150
  <DropdownMenuContent align="end">
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { Upload } from "lucide-vue-next";
2
+ import { Icon } from "#components";
3
3
  import { ref } from "vue";
4
4
  const props = defineProps({
5
5
  isDragging: { type: Boolean, required: false, default: false },
@@ -45,9 +45,10 @@ function handleClick() {
45
45
  @change="handleFileInput"
46
46
  >
47
47
 
48
- <Upload
49
- class="mx-auto h-10 w-10 transition-colors"
50
- :class="isDragging ? 'text-primary' : 'text-muted-foreground'"
48
+ <Icon
49
+ name="lucide:upload"
50
+ class="mx-auto h-10 w-10 transition-colors"
51
+ :class="isDragging ? 'text-primary' : 'text-muted-foreground'"
51
52
  />
52
53
 
53
54
  <p class="mt-3 text-base font-medium transition-colors" :class="isDragging ? 'text-primary' : 'text-foreground'">
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import { reactiveOmit } from "@vueuse/core";
3
- import { X } from "lucide-vue-next";
3
+ import { Icon } from "#components";
4
4
  import { TagsInputItemDelete, useForwardProps } from "reka-ui";
5
5
  import { cn } from "abckit/utils";
6
6
  const props = defineProps({
@@ -15,7 +15,7 @@ const forwardedProps = useForwardProps(delegatedProps);
15
15
  <template>
16
16
  <TagsInputItemDelete v-bind="forwardedProps" :class="cn('flex rounded bg-transparent mr-1', props.class)">
17
17
  <slot>
18
- <X class="w-4 h-4" />
18
+ <Icon name="lucide:x" class="w-4 h-4" />
19
19
  </slot>
20
20
  </TagsInputItemDelete>
21
21
  </template>
@@ -199,15 +199,7 @@ declare const authClient: {
199
199
  ipAddress?: string | null | undefined;
200
200
  userAgent?: string | null | undefined;
201
201
  };
202
- user: {
203
- id: string;
204
- createdAt: Date;
205
- updatedAt: Date;
206
- email: string;
207
- emailVerified: boolean;
208
- name: string;
209
- image?: string | null | undefined;
210
- };
202
+ user: import("better-auth/client/plugins").UserWithRole;
211
203
  }, {
212
204
  code?: string | undefined;
213
205
  message?: string | undefined;
@@ -1125,6 +1117,7 @@ declare const authClient: {
1125
1117
  readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
1126
1118
  readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
1127
1119
  readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
1120
+ readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
1128
1121
  readonly USER_NOT_FOUND: "User not found";
1129
1122
  readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
1130
1123
  readonly FAILED_TO_UPDATE_USER: "Failed to update user";
@@ -1470,15 +1463,7 @@ export declare function useAuth(): {
1470
1463
  ipAddress?: string | null | undefined;
1471
1464
  userAgent?: string | null | undefined;
1472
1465
  };
1473
- user: {
1474
- id: string;
1475
- createdAt: Date;
1476
- updatedAt: Date;
1477
- email: string;
1478
- emailVerified: boolean;
1479
- name: string;
1480
- image?: string | null | undefined;
1481
- };
1466
+ user: import("better-auth/client/plugins").UserWithRole;
1482
1467
  }, {
1483
1468
  code?: string | undefined;
1484
1469
  message?: string | undefined;
@@ -2396,6 +2381,7 @@ export declare function useAuth(): {
2396
2381
  readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
2397
2382
  readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
2398
2383
  readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
2384
+ readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
2399
2385
  readonly USER_NOT_FOUND: "User not found";
2400
2386
  readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
2401
2387
  readonly FAILED_TO_UPDATE_USER: "Failed to update user";
@@ -4,5 +4,5 @@
4
4
  * - Redirects banned users to /auth/banned
5
5
  * Note: Route protection is handled by layouts, not this middleware
6
6
  */
7
- declare const _default: import("nuxt/app").RouteMiddleware;
7
+ declare const _default: import("#app").RouteMiddleware;
8
8
  export default _default;
@@ -1,5 +1,6 @@
1
1
  export function bytesToSize(bytes) {
2
- if (bytes === 0) return "0 B";
2
+ if (bytes === 0)
3
+ return "0 B";
3
4
  const k = 1024;
4
5
  const sizes = ["B", "KB", "MB", "GB", "TB"];
5
6
  const i = Math.floor(Math.log(bytes) / Math.log(k));
@@ -9,10 +10,15 @@ export function getFileExtension(filename) {
9
10
  return filename.slice((filename.lastIndexOf(".") - 1 >>> 0) + 2);
10
11
  }
11
12
  export function getMimeTypeCategory(mimeType) {
12
- if (mimeType.startsWith("image/")) return "image";
13
- if (mimeType.startsWith("video/")) return "video";
14
- if (mimeType.startsWith("audio/")) return "audio";
15
- if (mimeType.includes("pdf") || mimeType.includes("document") || mimeType.includes("text/")) return "document";
16
- if (mimeType.includes("zip") || mimeType.includes("tar") || mimeType.includes("rar") || mimeType.includes("7z")) return "archive";
13
+ if (mimeType.startsWith("image/"))
14
+ return "image";
15
+ if (mimeType.startsWith("video/"))
16
+ return "video";
17
+ if (mimeType.startsWith("audio/"))
18
+ return "audio";
19
+ if (mimeType.includes("pdf") || mimeType.includes("document") || mimeType.includes("text/"))
20
+ return "document";
21
+ if (mimeType.includes("zip") || mimeType.includes("tar") || mimeType.includes("rar") || mimeType.includes("7z"))
22
+ return "archive";
17
23
  return "other";
18
24
  }
@@ -5,4 +5,3 @@ export type FileType = 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'ARCHIVE' | 'O
5
5
 
6
6
  // Re-export for convenience
7
7
  export type { FileType as StorageFileType }
8
-
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "abckit",
3
3
  "type": "module",
4
- "version": "0.0.9",
4
+ "version": "0.0.11",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {
@@ -62,11 +62,11 @@
62
62
  "@nuxtjs/i18n": "^10.2.1",
63
63
  "@nuxtjs/tailwindcss": "7.0.0-beta.1",
64
64
  "@openfga/sdk": "^0.9.1",
65
- "@pinia/colada": "^0.18.0",
65
+ "@pinia/colada": "^0.18.1",
66
66
  "@pinia/colada-nuxt": "^0.2.4",
67
67
  "@pinia/nuxt": "^0.11.3",
68
68
  "@polar-sh/sdk": "^0.41.5",
69
- "@sentry/nuxt": "catalog:",
69
+ "@sentry/nuxt": "^10.30.0",
70
70
  "@sindresorhus/slugify": "^3.0.0",
71
71
  "@tailwindcss/typography": "^0.5.19",
72
72
  "@tanstack/vue-table": "^8.21.3",
@@ -77,7 +77,7 @@
77
77
  "@vueuse/router": "^14.1.0",
78
78
  "apiful": "^4.0.0",
79
79
  "aws4fetch": "^1.0.20",
80
- "better-auth": "^1.4.5",
80
+ "better-auth": "^1.4.6",
81
81
  "class-variance-authority": "^0.7.1",
82
82
  "clsx": "^2.1.1",
83
83
  "consola": "^3.4.2",
@@ -85,15 +85,14 @@
85
85
  "date-fns": "^4.1.0",
86
86
  "defu": "^6.1.4",
87
87
  "drizzle-kit": "^0.31.8",
88
- "drizzle-orm": "^0.45.0",
88
+ "drizzle-orm": "^0.45.1",
89
89
  "drizzle-zod": "^0.8.3",
90
90
  "embla-carousel-vue": "^8.6.0",
91
91
  "graphql": "^16.12.0",
92
92
  "graphql-config": "^5.1.5",
93
93
  "graphql-scalars": "^1.25.0",
94
94
  "graphql-yoga": "^5.17.1",
95
- "lucide-vue-next": "^0.555.0",
96
- "md-editor-v3": "^6.2.0",
95
+ "md-editor-v3": "^6.2.1",
97
96
  "nitro-graphql": "^1.6.1",
98
97
  "nitropack": "^2.12.9",
99
98
  "notivue": "^2.4.5",
@@ -101,7 +100,7 @@
101
100
  "pinia": "^3.0.4",
102
101
  "reka-ui": "^2.6.1",
103
102
  "tailwind-merge": "^3.4.0",
104
- "tailwindcss": "^4.1.17",
103
+ "tailwindcss": "^4.1.18",
105
104
  "tw-animate-css": "^1.4.0",
106
105
  "unstorage": "^1.17.3",
107
106
  "uuid": "^13.0.0",
@@ -110,20 +109,20 @@
110
109
  "vite-tsconfig-paths": "^5.1.4",
111
110
  "vue": "^3.5.25",
112
111
  "vue-input-otp": "^0.3.2",
113
- "vue-router": "^4.6.3",
112
+ "vue-router": "^4.6.4",
114
113
  "vue-sonner": "^2.0.9",
115
- "vue-tsc": "^3.1.5",
114
+ "vue-tsc": "^3.1.8",
116
115
  "zod": "^4.1.13"
117
116
  },
118
117
  "devDependencies": {
119
- "@antfu/eslint-config": "^6.4.1",
118
+ "@antfu/eslint-config": "^6.6.1",
120
119
  "@nuxt/eslint": "latest",
121
120
  "@nuxt/module-builder": "^1.0.2",
122
- "@types/node": "^24.10.1",
123
- "@types/pg": "^8.15.6",
121
+ "@types/node": "^24.10.3",
122
+ "@types/pg": "^8.16.0",
124
123
  "eslint": "^9.39.1",
125
124
  "h3": "^1.15.4",
126
- "nuxt": "^4.2.1",
125
+ "nuxt": "^4.2.2",
127
126
  "typescript": "^5.9.3",
128
127
  "vue": "^3.5.25"
129
128
  },