@axium/server 0.7.5 → 0.7.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axium/server",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
|
|
5
5
|
"funding": {
|
|
6
6
|
"type": "individual",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"commander": "^13.1.0",
|
|
46
46
|
"kysely": "^0.27.5",
|
|
47
47
|
"logzen": "^0.7.0",
|
|
48
|
+
"mime": "^4.0.7",
|
|
48
49
|
"pg": "^8.14.1",
|
|
49
50
|
"utilium": "^2.3.0",
|
|
50
51
|
"zod-validation-error": "^3.4.0"
|
package/web/lib/Account.svelte
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { getUserImage } from '@axium/core';
|
|
4
4
|
import './account.css';
|
|
5
5
|
import FormDialog from './FormDialog.svelte';
|
|
6
|
-
import Icon from './Icon.svelte';
|
|
6
|
+
import Icon from './icons/Icon.svelte';
|
|
7
7
|
import './styles.css';
|
|
8
8
|
|
|
9
9
|
const { data, children = () => {}, form } = $props();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import light from './
|
|
3
|
-
import solid from './
|
|
4
|
-
import regular from './
|
|
2
|
+
import light from './light.svg';
|
|
3
|
+
import solid from './solid.svg';
|
|
4
|
+
import regular from './regular.svg';
|
|
5
5
|
const urls = { light, solid, regular };
|
|
6
6
|
const { i } = $props();
|
|
7
7
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import mime from 'mime';
|
|
2
|
+
import mimeIcons from './mime.json' with { type: 'json' };
|
|
3
|
+
|
|
4
|
+
export { default as Icon } from './Icon.svelte';
|
|
5
|
+
|
|
6
|
+
export function iconFor(path: string): string {
|
|
7
|
+
type K = keyof typeof mimeIcons;
|
|
8
|
+
const type = mime.getType(path) || 'application/octet-stream';
|
|
9
|
+
return mimeIcons[type as K] || mimeIcons[type.split('/')[0] as K] || 'file';
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"application/gzip": "file-zipper",
|
|
3
|
+
"application/json": "brackets-curly",
|
|
4
|
+
"application/octet-stream": "file",
|
|
5
|
+
"application/pdf": "file-invoice",
|
|
6
|
+
"application/pgp-signature": "file-contract",
|
|
7
|
+
"application/vnd.rar": "box-archive",
|
|
8
|
+
"application/x-7z-compressed": "file-zipper",
|
|
9
|
+
"application/x-bzip": "file-zipper",
|
|
10
|
+
"application/x-bzip2": "file-zipper",
|
|
11
|
+
"application/x-sh": "square-terminal",
|
|
12
|
+
"application/x-tar": "box-archive",
|
|
13
|
+
"application/x-xz": "file-zipper",
|
|
14
|
+
"application/xml": "code",
|
|
15
|
+
"application/zip": "file-zipper",
|
|
16
|
+
"audio": "waveform-lines",
|
|
17
|
+
"image": "image",
|
|
18
|
+
"image/gif": "gif",
|
|
19
|
+
"image/svg+xml": "file-svg",
|
|
20
|
+
"image/vnd.microsoft.icon": "icons",
|
|
21
|
+
"text/css": "css",
|
|
22
|
+
"text/csv": "file-csv",
|
|
23
|
+
"text/html": "code",
|
|
24
|
+
"text/javascript": "square-js",
|
|
25
|
+
"text/plain": "file-lines",
|
|
26
|
+
"text/xml": "code",
|
|
27
|
+
"video": "clapperboard-play"
|
|
28
|
+
}
|
package/web/lib/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as Account } from './Account.svelte';
|
|
2
2
|
export { default as Dialog } from './Dialog.svelte';
|
|
3
3
|
export { default as FormDialog } from './FormDialog.svelte';
|
|
4
|
-
export
|
|
4
|
+
export * from './icons/index.js';
|
|
5
5
|
export { default as SignUp } from './SignUp.svelte';
|
|
6
6
|
export { default as Toast } from './Toast.svelte';
|
|
7
7
|
export { default as UserCard } from './UserCard.svelte';
|