@axium/storage 0.7.1 → 0.7.2

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.
@@ -1,9 +1,9 @@
1
1
  <script lang="ts">
2
- import * as icon from '@axium/core/icons';
3
2
  import { ClipboardCopy, FormDialog, Icon } from '@axium/client/components';
3
+ import * as icon from '@axium/core/icons';
4
4
  import { deleteItem, updateItemMetadata } from '@axium/storage/client';
5
5
  import type { StorageItemMetadata } from '@axium/storage/common';
6
- import { debug, getDirectory, selection, toggle, toggleRange } from '@axium/storage/sidebar';
6
+ import { getDirectory, preferences, selection, toggle, toggleRange } from '@axium/storage/sidebar';
7
7
  import SidebarItem from './SidebarItem.svelte';
8
8
 
9
9
  let {
@@ -104,7 +104,7 @@
104
104
  {#if item.type == 'cas_item'}
105
105
  {@render action('download', 'download', 'Download')}
106
106
  {/if}
107
- {#if debug}
107
+ {#if preferences.debug}
108
108
  <ClipboardCopy value={item.id} />
109
109
  {/if}
110
110
  </div>
@@ -1,6 +1,9 @@
1
1
  import type { StorageItemMetadata } from '@axium/storage/common';
2
2
  import { getDirectoryMetadata } from '@axium/storage/client';
3
3
  import { SvelteSet } from 'svelte/reactivity';
4
+ import { preferenceDefaults, type Preferences } from '@axium/core';
5
+
6
+ export const preferences = $state<Preferences>(preferenceDefaults);
4
7
 
5
8
  export const selection = $state(new SvelteSet());
6
9
 
@@ -12,9 +15,6 @@ export function getLastSelected() {
12
15
  return lastSelected;
13
16
  }
14
17
 
15
- /** @todo move this into user preferences somehow */
16
- export let debug = false;
17
-
18
18
  export async function getDirectory(id: string, assignTo?: StorageItemMetadata[]) {
19
19
  const data = await getDirectoryMetadata(id);
20
20
  items.push(...data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/storage",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "description": "User file storage for Axium",
6
6
  "funding": {