@axium/storage 0.13.3 → 0.13.4

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/storage",
3
- "version": "0.13.3",
3
+ "version": "0.13.4",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "description": "User file storage for Axium",
6
6
  "funding": {
@@ -39,7 +39,7 @@
39
39
  "build": "tsc"
40
40
  },
41
41
  "peerDependencies": {
42
- "@axium/client": ">=0.12.0",
42
+ "@axium/client": ">=0.12.3",
43
43
  "@axium/core": ">=0.18.0",
44
44
  "@axium/server": ">=0.30.0",
45
45
  "@sveltejs/kit": "^2.27.3",
@@ -1,65 +1,14 @@
1
1
  <script lang="ts">
2
- import { Icon } from '@axium/client/components';
2
+ import SidebarLayout from '@axium/client/components/SidebarLayout';
3
3
  import { StorageUsage } from '@axium/storage/components';
4
- import { capitalize } from 'utilium';
5
4
 
6
5
  let { children, data } = $props();
7
6
  </script>
8
7
 
9
- <div class="app">
10
- <div class="sidebar">
11
- {#each data.tabs as { href, name, icon: i, active }}
12
- <a {href} class={['item', 'icon-text', active && 'active']}><Icon {i} /> {capitalize(name)}</a>
13
- {/each}
8
+ <SidebarLayout tabs={data.tabs}>
9
+ {#snippet bottom()}
10
+ <StorageUsage userId={data.session?.userId} />
11
+ {/snippet}
14
12
 
15
- <div class="usage">
16
- <StorageUsage userId={data.session?.userId} />
17
- </div>
18
- </div>
19
-
20
- <div class="files-content">
21
- {@render children()}
22
- </div>
23
- </div>
24
-
25
- <style>
26
- .app {
27
- display: grid;
28
- grid-template-columns: 15em 1fr;
29
- height: 100%;
30
- }
31
-
32
- .sidebar {
33
- grid-column: 1;
34
- width: 100%;
35
- display: inline-flex;
36
- flex-direction: column;
37
- gap: 0.5em;
38
- padding-left: 1em;
39
- }
40
-
41
- .item {
42
- padding: 0.3em 0.5em;
43
- border-radius: 0.25em 1em 1em 0.25em;
44
- }
45
-
46
- .item:hover {
47
- background-color: var(--bg-accent);
48
- cursor: pointer;
49
- }
50
-
51
- .item.active {
52
- background-color: var(--bg-accent);
53
- }
54
-
55
- .usage {
56
- margin-top: auto;
57
- }
58
-
59
- .files-content {
60
- grid-column: 2;
61
- padding: 1em;
62
- overflow-x: hidden;
63
- overflow-y: scroll;
64
- }
65
- </style>
13
+ {@render children()}
14
+ </SidebarLayout>