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.
- package/dist/module.mjs +0 -1
- package/dist/runtime/components/app/AppBreadcrumbs.vue +1 -2
- package/dist/runtime/components/app/AppHeader.vue +2 -2
- package/dist/runtime/components/app/AppNavMain.d.vue.ts +1 -2
- package/dist/runtime/components/app/AppNavMain.vue +4 -4
- package/dist/runtime/components/app/AppNavMain.vue.d.ts +1 -2
- package/dist/runtime/components/ui/accordion/AccordionTrigger.vue +3 -2
- package/dist/runtime/components/ui/auto-form/AutoFormFieldArray.vue +3 -3
- package/dist/runtime/components/ui/auto-form/AutoFormFieldDate.vue +2 -2
- package/dist/runtime/components/ui/auto-form/AutoFormFieldFile.vue +2 -2
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue +2 -2
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue +2 -2
- package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +2 -2
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +2 -2
- package/dist/runtime/components/ui/carousel/CarouselNext.vue +2 -2
- package/dist/runtime/components/ui/carousel/CarouselPrevious.vue +2 -2
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +2 -2
- package/dist/runtime/components/ui/combobox/ComboboxInput.vue +2 -2
- package/dist/runtime/components/ui/command/CommandInput.vue +2 -2
- package/dist/runtime/components/ui/context-menu/ContextMenuCheckboxItem.vue +2 -2
- package/dist/runtime/components/ui/context-menu/ContextMenuRadioItem.vue +2 -2
- package/dist/runtime/components/ui/context-menu/ContextMenuSubTrigger.vue +2 -2
- package/dist/runtime/components/ui/dialog/DialogContent.vue +2 -2
- package/dist/runtime/components/ui/dialog/DialogScrollContent.vue +2 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +2 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +2 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +2 -2
- package/dist/runtime/components/ui/file/FileEmptyState.vue +3 -3
- package/dist/runtime/components/ui/file/FileGrid.vue +10 -10
- package/dist/runtime/components/ui/file/FileTable.vue +16 -17
- package/dist/runtime/components/ui/input-otp/InputOTPSeparator.vue +2 -2
- package/dist/runtime/components/ui/menubar/MenubarCheckboxItem.vue +2 -2
- package/dist/runtime/components/ui/menubar/MenubarRadioItem.vue +2 -2
- package/dist/runtime/components/ui/menubar/MenubarSubTrigger.vue +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelect.vue +3 -2
- package/dist/runtime/components/ui/navigation-menu/NavigationMenuTrigger.vue +3 -2
- package/dist/runtime/components/ui/number-field/NumberFieldDecrement.vue +2 -2
- package/dist/runtime/components/ui/number-field/NumberFieldIncrement.vue +2 -2
- package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue +2 -2
- package/dist/runtime/components/ui/pagination/PaginationFirst.vue +2 -2
- package/dist/runtime/components/ui/pagination/PaginationLast.vue +2 -2
- package/dist/runtime/components/ui/pagination/PaginationNext.vue +2 -2
- package/dist/runtime/components/ui/pagination/PaginationPrevious.vue +2 -2
- package/dist/runtime/components/ui/pin-input/PinInputSeparator.vue +2 -2
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue +2 -2
- package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue +2 -2
- package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue +2 -2
- package/dist/runtime/components/ui/resizable/ResizableHandle.vue +2 -2
- package/dist/runtime/components/ui/select/SelectItem.vue +2 -2
- package/dist/runtime/components/ui/select/SelectScrollDownButton.vue +2 -2
- package/dist/runtime/components/ui/select/SelectScrollUpButton.vue +2 -2
- package/dist/runtime/components/ui/select/SelectTrigger.vue +2 -2
- package/dist/runtime/components/ui/sheet/InnerSheetContent.vue +2 -2
- package/dist/runtime/components/ui/sheet/SheetContent.vue +2 -2
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +2 -2
- package/dist/runtime/components/ui/sonner/Sonner.vue +7 -7
- package/dist/runtime/components/ui/spinner/Spinner.vue +3 -2
- package/dist/runtime/components/ui/storage/StorageActionBar.vue +3 -4
- package/dist/runtime/components/ui/storage/StorageEmptyState.vue +3 -4
- package/dist/runtime/components/ui/storage/StorageGrid.vue +10 -11
- package/dist/runtime/components/ui/storage/StorageSelectionBar.vue +3 -3
- package/dist/runtime/components/ui/storage/StorageTable.vue +10 -11
- package/dist/runtime/components/ui/storage/StorageUploadZone.vue +5 -4
- package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue +2 -2
- package/dist/runtime/composables/useAuth.d.ts +4 -18
- package/dist/runtime/middleware/auth.global.d.ts +1 -1
- package/dist/runtime/shared/constants/r2.js +12 -6
- package/dist/runtime/types/nitro-graphql-client.d.ts +0 -1
- 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:
|
|
22
|
-
VIDEO:
|
|
23
|
-
AUDIO:
|
|
24
|
-
DOCUMENT:
|
|
25
|
-
ARCHIVE:
|
|
26
|
-
OTHER:
|
|
27
|
-
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
|
-
<
|
|
115
|
+
<Icon
|
|
117
116
|
v-else
|
|
118
|
-
:
|
|
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
|
-
<
|
|
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 {
|
|
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
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
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 {
|
|
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
|
-
<
|
|
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";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export function bytesToSize(bytes) {
|
|
2
|
-
if (bytes === 0)
|
|
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/"))
|
|
13
|
-
|
|
14
|
-
if (mimeType.startsWith("
|
|
15
|
-
|
|
16
|
-
if (mimeType.
|
|
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
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "abckit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
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.
|
|
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": "
|
|
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.
|
|
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.
|
|
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
|
-
"
|
|
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.
|
|
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.
|
|
112
|
+
"vue-router": "^4.6.4",
|
|
114
113
|
"vue-sonner": "^2.0.9",
|
|
115
|
-
"vue-tsc": "^3.1.
|
|
114
|
+
"vue-tsc": "^3.1.8",
|
|
116
115
|
"zod": "^4.1.13"
|
|
117
116
|
},
|
|
118
117
|
"devDependencies": {
|
|
119
|
-
"@antfu/eslint-config": "^6.
|
|
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.
|
|
123
|
-
"@types/pg": "^8.
|
|
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.
|
|
125
|
+
"nuxt": "^4.2.2",
|
|
127
126
|
"typescript": "^5.9.3",
|
|
128
127
|
"vue": "^3.5.25"
|
|
129
128
|
},
|