@rool-dev/svelte 0.8.2-dev.02b70e5 → 0.8.2-dev.d82ea25

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,4 +1,5 @@
1
1
  import { wrapChannel } from './channel.svelte.js';
2
+ import { ReactiveFileTree } from './file-tree.svelte.js';
2
3
  /**
3
4
  * A reactive wrapper around a RoolSpace. Exposes reactive `channels` and
4
5
  * `connectionState`, and provides `openChannel()` that returns a ReactiveChannel.
@@ -10,12 +11,14 @@ class ReactiveSpaceImpl {
10
11
  #space;
11
12
  #channels = new Map();
12
13
  #unsubscribers = [];
14
+ #fileTree;
13
15
  #closed = false;
14
16
  // Reactive state mirroring the underlying space
15
17
  #channelList = $state([]);
16
18
  connectionState = $state('reconnecting');
17
19
  constructor(space) {
18
20
  this.#space = space;
21
+ this.#fileTree = new ReactiveFileTree(space);
19
22
  this.#channelList = space.channels;
20
23
  const refreshChannels = () => { this.#channelList = space.channels; };
21
24
  space.on('channelCreated', refreshChannels);
@@ -42,7 +45,7 @@ class ReactiveSpaceImpl {
42
45
  if (existing && !existing.isClosed)
43
46
  return existing;
44
47
  const raw = await this.#space.openChannel(channelId);
45
- const reactive = wrapChannel(raw);
48
+ const reactive = wrapChannel(raw, this.#fileTree);
46
49
  this.#channels.set(channelId, reactive);
47
50
  return reactive;
48
51
  }
@@ -61,6 +64,7 @@ class ReactiveSpaceImpl {
61
64
  for (const unsub of this.#unsubscribers)
62
65
  unsub();
63
66
  this.#unsubscribers.length = 0;
67
+ this.#fileTree.close();
64
68
  this.#space.close();
65
69
  }
66
70
  // Reactive getters
@@ -71,6 +75,11 @@ class ReactiveSpaceImpl {
71
75
  get role() { return this.#space.role; }
72
76
  get linkAccess() { return this.#space.linkAccess; }
73
77
  get memberCount() { return this.#space.memberCount; }
78
+ get webdav() { return this.#space.webdav; }
79
+ get fileTree() { return this.#fileTree; }
80
+ // Proxy resource methods
81
+ getStorageUsage(...args) { return this.#space.getStorageUsage(...args); }
82
+ fetchPath(...args) { return this.#space.fetchPath(...args); }
74
83
  // Proxy admin methods
75
84
  rename(newName) { return this.#space.rename(newName); }
76
85
  delete() { return this.#space.delete(); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rool-dev/svelte",
3
- "version": "0.8.2-dev.02b70e5",
3
+ "version": "0.8.2-dev.d82ea25",
4
4
  "description": "Svelte 5 runes for Rool Spaces",
5
5
  "type": "module",
6
6
  "svelte": "./dist/index.js",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "license": "MIT",
43
43
  "dependencies": {
44
- "@rool-dev/sdk": "0.8.2-dev.02b70e5"
44
+ "@rool-dev/sdk": "0.8.2-dev.d82ea25"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "svelte": "^5.0.0"
@@ -55,7 +55,7 @@
55
55
  "scripts": {
56
56
  "build": "svelte-package -i src -o dist",
57
57
  "dev": "svelte-package -i src -o dist --watch",
58
- "typecheck": "svelte-check --tsconfig ./tsconfig.json",
58
+ "typecheck": "pnpm --filter @rool-dev/sdk build && svelte-check --tsconfig ./tsconfig.json",
59
59
  "clean": "rm -rf dist"
60
60
  }
61
61
  }