@rool-dev/svelte 0.10.2-dev.47747e3 → 0.10.2-dev.57158ea
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/README.md +24 -19
- package/dist/channel.svelte.d.ts +9 -20
- package/dist/channel.svelte.d.ts.map +1 -1
- package/dist/channel.svelte.js +85 -162
- package/dist/file-tree.svelte.d.ts +91 -0
- package/dist/file-tree.svelte.d.ts.map +1 -0
- package/dist/file-tree.svelte.js +418 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/rool.svelte.d.ts +22 -20
- package/dist/rool.svelte.d.ts.map +1 -1
- package/dist/rool.svelte.js +33 -35
- package/dist/space.svelte.d.ts +2 -1
- package/dist/space.svelte.d.ts.map +1 -1
- package/dist/space.svelte.js +6 -2
- package/package.json +2 -2
package/dist/space.svelte.js
CHANGED
|
@@ -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
|
|
@@ -72,6 +76,7 @@ class ReactiveSpaceImpl {
|
|
|
72
76
|
get linkAccess() { return this.#space.linkAccess; }
|
|
73
77
|
get memberCount() { return this.#space.memberCount; }
|
|
74
78
|
get webdav() { return this.#space.webdav; }
|
|
79
|
+
get fileTree() { return this.#fileTree; }
|
|
75
80
|
// Proxy resource methods
|
|
76
81
|
getStorageUsage(...args) { return this.#space.getStorageUsage(...args); }
|
|
77
82
|
fetchMachineResource(...args) { return this.#space.fetchMachineResource(...args); }
|
|
@@ -84,7 +89,6 @@ class ReactiveSpaceImpl {
|
|
|
84
89
|
setLinkAccess(...args) { return this.#space.setLinkAccess(...args); }
|
|
85
90
|
renameChannel(channelId, name) { return this.#space.renameChannel(channelId, name); }
|
|
86
91
|
deleteChannel(channelId) { return this.#space.deleteChannel(channelId); }
|
|
87
|
-
installExtension(extensionId, channelId) { return this.#space.installExtension(extensionId, channelId); }
|
|
88
92
|
exportArchive() { return this.#space.exportArchive(); }
|
|
89
93
|
refresh() { return this.#space.refresh(); }
|
|
90
94
|
// Events on the underlying space (channelCreated/Updated/Deleted, connectionStateChanged)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rool-dev/svelte",
|
|
3
|
-
"version": "0.10.2-dev.
|
|
3
|
+
"version": "0.10.2-dev.57158ea",
|
|
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.10.2-dev.
|
|
44
|
+
"@rool-dev/sdk": "0.10.2-dev.57158ea"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"svelte": "^5.0.0"
|