@rool-dev/svelte 0.10.2-dev.a9e71cd → 0.10.2-dev.eeb9773
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 +2 -10
- package/dist/channel.svelte.d.ts +14 -12
- package/dist/channel.svelte.d.ts.map +1 -1
- package/dist/channel.svelte.js +35 -28
- package/dist/file-tree.svelte.d.ts +4 -4
- package/dist/file-tree.svelte.d.ts.map +1 -1
- package/dist/file-tree.svelte.js +12 -31
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/rool.svelte.d.ts +1 -20
- package/dist/rool.svelte.d.ts.map +1 -1
- package/dist/rool.svelte.js +0 -35
- package/dist/space.svelte.d.ts +1 -2
- package/dist/space.svelte.d.ts.map +1 -1
- package/dist/space.svelte.js +1 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -431,13 +431,10 @@ See the [SDK documentation](../sdk/README.md) for complete API details.
|
|
|
431
431
|
### Utilities
|
|
432
432
|
|
|
433
433
|
```typescript
|
|
434
|
-
import {
|
|
435
|
-
|
|
436
|
-
// 6-character alphanumeric basename
|
|
437
|
-
const basename = generateBasename();
|
|
434
|
+
import { loc, parseLocation, normalizeLocation } from '@rool-dev/svelte';
|
|
438
435
|
|
|
439
436
|
// Build / parse location strings
|
|
440
|
-
const location = loc('article',
|
|
437
|
+
const location = loc('article', 'welcome'); // '/space/article/welcome.json'
|
|
441
438
|
const parts = parseLocation(location); // { collection, basename }
|
|
442
439
|
const canonical = normalizeLocation('article/welcome'); // '/space/article/welcome.json'
|
|
443
440
|
```
|
|
@@ -474,11 +471,6 @@ import type {
|
|
|
474
471
|
SpaceSchema,
|
|
475
472
|
SpaceMember,
|
|
476
473
|
UserResult,
|
|
477
|
-
PublishedExtensionInfo,
|
|
478
|
-
PublishExtensionOptions,
|
|
479
|
-
ExtensionManifest,
|
|
480
|
-
FindExtensionsOptions,
|
|
481
|
-
|
|
482
474
|
} from '@rool-dev/svelte';
|
|
483
475
|
```
|
|
484
476
|
|
package/dist/channel.svelte.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ declare class ReactiveWatchImpl {
|
|
|
22
22
|
objects: RoolObject[];
|
|
23
23
|
loading: boolean;
|
|
24
24
|
constructor(channel: RoolChannel, fileTree: ReactiveFileTree, options: WatchOptions);
|
|
25
|
-
/** Re-fetch matching objects using the canonical file tree for
|
|
25
|
+
/** Re-fetch matching objects using the canonical file tree for paths. */
|
|
26
26
|
refresh(): Promise<void>;
|
|
27
27
|
close(): void;
|
|
28
28
|
}
|
|
@@ -34,7 +34,7 @@ declare class ReactiveObjectImpl {
|
|
|
34
34
|
#private;
|
|
35
35
|
data: RoolObject | undefined;
|
|
36
36
|
loading: boolean;
|
|
37
|
-
constructor(channel: RoolChannel, fileTree: ReactiveFileTree,
|
|
37
|
+
constructor(channel: RoolChannel, fileTree: ReactiveFileTree, path: string);
|
|
38
38
|
refresh(): Promise<void>;
|
|
39
39
|
close(): void;
|
|
40
40
|
}
|
|
@@ -51,11 +51,11 @@ declare class ReactiveConversationHandleImpl {
|
|
|
51
51
|
getSystemInstruction(): string | undefined;
|
|
52
52
|
setSystemInstruction(...args: Parameters<ConversationHandle['setSystemInstruction']>): Promise<void>;
|
|
53
53
|
rename(...args: Parameters<ConversationHandle['rename']>): Promise<void>;
|
|
54
|
-
|
|
54
|
+
putObject(...args: Parameters<ConversationHandle['putObject']>): Promise<{
|
|
55
55
|
object: RoolObject;
|
|
56
56
|
message: string;
|
|
57
57
|
}>;
|
|
58
|
-
|
|
58
|
+
patchObject(...args: Parameters<ConversationHandle['patchObject']>): Promise<{
|
|
59
59
|
object: RoolObject;
|
|
60
60
|
message: string;
|
|
61
61
|
}>;
|
|
@@ -64,6 +64,8 @@ declare class ReactiveConversationHandleImpl {
|
|
|
64
64
|
message: string;
|
|
65
65
|
}>;
|
|
66
66
|
deleteObjects(...args: Parameters<ConversationHandle['deleteObjects']>): Promise<void>;
|
|
67
|
+
/** @deprecated Use deleteObjects instead. */
|
|
68
|
+
deletePaths(...args: Parameters<ConversationHandle['deletePaths']>): Promise<void>;
|
|
67
69
|
prompt(...args: Parameters<ConversationHandle['prompt']>): Promise<{
|
|
68
70
|
message: string;
|
|
69
71
|
objects: RoolObject[];
|
|
@@ -82,7 +84,7 @@ export type ReactiveConversationHandle = ReactiveConversationHandleImpl;
|
|
|
82
84
|
declare class ReactiveChannelImpl {
|
|
83
85
|
#private;
|
|
84
86
|
interactions: Interaction[];
|
|
85
|
-
|
|
87
|
+
objectPaths: string[];
|
|
86
88
|
collections: string[];
|
|
87
89
|
conversations: ConversationInfo[];
|
|
88
90
|
constructor(channel: RoolChannel, fileTree: ReactiveFileTree);
|
|
@@ -94,18 +96,16 @@ declare class ReactiveChannelImpl {
|
|
|
94
96
|
get channelName(): string | null;
|
|
95
97
|
get isReadOnly(): boolean;
|
|
96
98
|
get linkAccess(): import("@rool-dev/sdk").LinkAccess;
|
|
97
|
-
get extensionUrl(): string | null;
|
|
98
|
-
get extensionId(): string | null;
|
|
99
|
-
get manifest(): import("@rool-dev/sdk").ExtensionManifest | null;
|
|
100
99
|
get isClosed(): boolean;
|
|
101
100
|
close(): void;
|
|
102
101
|
getObject(...args: Parameters<RoolChannel['getObject']>): Promise<RoolObject | undefined>;
|
|
102
|
+
getObjects(...args: Parameters<RoolChannel['getObjects']>): Promise<import("@rool-dev/sdk").GetObjectsResult>;
|
|
103
103
|
stat(...args: Parameters<RoolChannel['stat']>): import("@rool-dev/sdk").RoolObjectStat | undefined;
|
|
104
|
-
|
|
104
|
+
putObject(...args: Parameters<RoolChannel['putObject']>): Promise<{
|
|
105
105
|
object: RoolObject;
|
|
106
106
|
message: string;
|
|
107
107
|
}>;
|
|
108
|
-
|
|
108
|
+
patchObject(...args: Parameters<RoolChannel['patchObject']>): Promise<{
|
|
109
109
|
object: RoolObject;
|
|
110
110
|
message: string;
|
|
111
111
|
}>;
|
|
@@ -114,6 +114,8 @@ declare class ReactiveChannelImpl {
|
|
|
114
114
|
message: string;
|
|
115
115
|
}>;
|
|
116
116
|
deleteObjects(...args: Parameters<RoolChannel['deleteObjects']>): Promise<void>;
|
|
117
|
+
/** @deprecated Use deleteObjects instead. */
|
|
118
|
+
deletePaths(...args: Parameters<RoolChannel['deletePaths']>): Promise<void>;
|
|
117
119
|
prompt(...args: Parameters<RoolChannel['prompt']>): Promise<{
|
|
118
120
|
message: string;
|
|
119
121
|
objects: RoolObject[];
|
|
@@ -146,9 +148,9 @@ declare class ReactiveChannelImpl {
|
|
|
146
148
|
on(...args: Parameters<RoolChannel['on']>): () => void;
|
|
147
149
|
off(...args: Parameters<RoolChannel['off']>): void;
|
|
148
150
|
/**
|
|
149
|
-
* Create a reactive object that auto-updates when the object at this
|
|
151
|
+
* Create a reactive object that auto-updates when the object at this path changes.
|
|
150
152
|
*/
|
|
151
|
-
object(
|
|
153
|
+
object(path: string): ReactiveObject;
|
|
152
154
|
/**
|
|
153
155
|
* Create a reactive watch that auto-updates when matching objects change.
|
|
154
156
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.svelte.d.ts","sourceRoot":"","sources":["../src/channel.svelte.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAEnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAqD,MAAM,uBAAuB,CAAC;AAE5G;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAC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C,IAAI,EAAE,MAAM,GAAG,cAAc;IAKpC;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,aAAa;CAK5C;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,GAAG,eAAe,CAE7F;AAED,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAElD;;GAEG;AACH,cAAM,uBAAuB;;IAK3B,IAAI,gBAA6B;IACjC,OAAO,UAAgB;gBAEX,cAAc,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAoCpD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAW9B,KAAK,IAAI,IAAI;CAId;AAED,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,mBAAmB,CAErG;AAED,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC"}
|
package/dist/channel.svelte.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
1
|
+
import { isObjectPath, machinePath } from '@rool-dev/sdk';
|
|
2
|
+
function objectCollection(path) {
|
|
3
|
+
if (!isObjectPath(path))
|
|
4
|
+
return undefined;
|
|
5
|
+
return path.split('/')[2];
|
|
6
|
+
}
|
|
7
|
+
function eventTouchesObject(event, objectPath, collection) {
|
|
3
8
|
if (event.reset)
|
|
4
9
|
return true;
|
|
5
10
|
for (const path of [...event.changedPaths, ...event.deletedPaths]) {
|
|
6
|
-
if (
|
|
11
|
+
if (objectPath && path === objectPath)
|
|
7
12
|
return true;
|
|
8
|
-
if (!
|
|
9
|
-
if (!collection || path
|
|
13
|
+
if (!objectPath && isObjectPath(path)) {
|
|
14
|
+
if (!collection || objectCollection(path) === collection)
|
|
10
15
|
return true;
|
|
11
16
|
}
|
|
12
17
|
}
|
|
@@ -18,10 +23,10 @@ function sameJsonValue(a, b) {
|
|
|
18
23
|
async function watchObjectsFromTree(channel, fileTree, options) {
|
|
19
24
|
if (fileTree.loading)
|
|
20
25
|
await fileTree.ready();
|
|
21
|
-
const
|
|
26
|
+
const paths = fileTree.objectPaths({ collection: options.collection, order: options.order });
|
|
22
27
|
const objects = [];
|
|
23
|
-
for (const
|
|
24
|
-
const object = await channel.getObject(
|
|
28
|
+
for (const path of paths) {
|
|
29
|
+
const object = await channel.getObject(path);
|
|
25
30
|
if (!object)
|
|
26
31
|
continue;
|
|
27
32
|
if (options.where) {
|
|
@@ -66,7 +71,7 @@ class ReactiveWatchImpl {
|
|
|
66
71
|
});
|
|
67
72
|
this.#unsubscribers.push(unsubscribe);
|
|
68
73
|
}
|
|
69
|
-
/** Re-fetch matching objects using the canonical file tree for
|
|
74
|
+
/** Re-fetch matching objects using the canonical file tree for paths. */
|
|
70
75
|
async refresh() {
|
|
71
76
|
this.loading = true;
|
|
72
77
|
try {
|
|
@@ -88,25 +93,25 @@ class ReactiveWatchImpl {
|
|
|
88
93
|
class ReactiveObjectImpl {
|
|
89
94
|
#channel;
|
|
90
95
|
#fileTree;
|
|
91
|
-
#
|
|
96
|
+
#path;
|
|
92
97
|
#unsubscribers = [];
|
|
93
98
|
// Reactive state
|
|
94
99
|
data = $state(undefined);
|
|
95
100
|
loading = $state(true);
|
|
96
|
-
constructor(channel, fileTree,
|
|
101
|
+
constructor(channel, fileTree, path) {
|
|
97
102
|
this.#channel = channel;
|
|
98
103
|
this.#fileTree = fileTree;
|
|
99
|
-
this.#
|
|
104
|
+
this.#path = machinePath(path);
|
|
100
105
|
this.#setup();
|
|
101
106
|
}
|
|
102
107
|
#setup() {
|
|
103
108
|
this.refresh();
|
|
104
109
|
const unsubscribe = this.#fileTree.subscribe((event) => {
|
|
105
|
-
if (event.deletedPaths.has(this.#
|
|
110
|
+
if (event.deletedPaths.has(this.#path)) {
|
|
106
111
|
this.data = undefined;
|
|
107
112
|
return;
|
|
108
113
|
}
|
|
109
|
-
if (eventTouchesObject(event, this.#
|
|
114
|
+
if (eventTouchesObject(event, this.#path))
|
|
110
115
|
void this.refresh();
|
|
111
116
|
});
|
|
112
117
|
this.#unsubscribers.push(unsubscribe);
|
|
@@ -114,7 +119,7 @@ class ReactiveObjectImpl {
|
|
|
114
119
|
async refresh() {
|
|
115
120
|
this.loading = true;
|
|
116
121
|
try {
|
|
117
|
-
this.data = await this.#channel.getObject(this.#
|
|
122
|
+
this.data = await this.#channel.getObject(this.#path);
|
|
118
123
|
}
|
|
119
124
|
finally {
|
|
120
125
|
this.loading = false;
|
|
@@ -162,10 +167,12 @@ class ReactiveConversationHandleImpl {
|
|
|
162
167
|
setSystemInstruction(...args) { return this.#handle.setSystemInstruction(...args); }
|
|
163
168
|
rename(...args) { return this.#handle.rename(...args); }
|
|
164
169
|
// Object operations
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
putObject(...args) { return this.#handle.putObject(...args); }
|
|
171
|
+
patchObject(...args) { return this.#handle.patchObject(...args); }
|
|
167
172
|
moveObject(...args) { return this.#handle.moveObject(...args); }
|
|
168
173
|
deleteObjects(...args) { return this.#handle.deleteObjects(...args); }
|
|
174
|
+
/** @deprecated Use deleteObjects instead. */
|
|
175
|
+
deletePaths(...args) { return this.#handle.deletePaths(...args); }
|
|
169
176
|
// AI
|
|
170
177
|
prompt(...args) { return this.#handle.prompt(...args); }
|
|
171
178
|
// Schema
|
|
@@ -191,14 +198,14 @@ class ReactiveChannelImpl {
|
|
|
191
198
|
#closed = false;
|
|
192
199
|
// Reactive state
|
|
193
200
|
interactions = $state([]);
|
|
194
|
-
|
|
201
|
+
objectPaths = $state([]);
|
|
195
202
|
collections = $state([]);
|
|
196
203
|
conversations = $state([]);
|
|
197
204
|
constructor(channel, fileTree) {
|
|
198
205
|
this.#channel = channel;
|
|
199
206
|
this.#fileTree = fileTree;
|
|
200
207
|
this.interactions = channel.getInteractions();
|
|
201
|
-
this.
|
|
208
|
+
this.objectPaths = fileTree.objectPaths();
|
|
202
209
|
this.collections = fileTree.collections();
|
|
203
210
|
this.conversations = channel.getConversations();
|
|
204
211
|
const onChannelUpdated = () => {
|
|
@@ -213,7 +220,7 @@ class ReactiveChannelImpl {
|
|
|
213
220
|
channel.on('conversationUpdated', onConversationUpdated);
|
|
214
221
|
this.#unsubscribers.push(() => channel.off('conversationUpdated', onConversationUpdated));
|
|
215
222
|
const refreshFromFileTree = () => {
|
|
216
|
-
this.
|
|
223
|
+
this.objectPaths = fileTree.objectPaths();
|
|
217
224
|
this.collections = fileTree.collections();
|
|
218
225
|
};
|
|
219
226
|
this.#unsubscribers.push(fileTree.subscribe((event) => {
|
|
@@ -238,9 +245,6 @@ class ReactiveChannelImpl {
|
|
|
238
245
|
get channelName() { return this.#channel.channelName; }
|
|
239
246
|
get isReadOnly() { return this.#channel.isReadOnly; }
|
|
240
247
|
get linkAccess() { return this.#channel.linkAccess; }
|
|
241
|
-
get extensionUrl() { return this.#channel.extensionUrl; }
|
|
242
|
-
get extensionId() { return this.#channel.extensionId; }
|
|
243
|
-
get manifest() { return this.#channel.manifest; }
|
|
244
248
|
get isClosed() { return this.#closed; }
|
|
245
249
|
close() {
|
|
246
250
|
if (this.#closed)
|
|
@@ -253,11 +257,14 @@ class ReactiveChannelImpl {
|
|
|
253
257
|
}
|
|
254
258
|
// Object operations
|
|
255
259
|
getObject(...args) { return this.#channel.getObject(...args); }
|
|
260
|
+
getObjects(...args) { return this.#channel.getObjects(...args); }
|
|
256
261
|
stat(...args) { return this.#channel.stat(...args); }
|
|
257
|
-
|
|
258
|
-
|
|
262
|
+
putObject(...args) { return this.#channel.putObject(...args); }
|
|
263
|
+
patchObject(...args) { return this.#channel.patchObject(...args); }
|
|
259
264
|
moveObject(...args) { return this.#channel.moveObject(...args); }
|
|
260
265
|
deleteObjects(...args) { return this.#channel.deleteObjects(...args); }
|
|
266
|
+
/** @deprecated Use deleteObjects instead. */
|
|
267
|
+
deletePaths(...args) { return this.#channel.deletePaths(...args); }
|
|
261
268
|
// AI
|
|
262
269
|
prompt(...args) { return this.#channel.prompt(...args); }
|
|
263
270
|
// Undo/redo
|
|
@@ -301,12 +308,12 @@ class ReactiveChannelImpl {
|
|
|
301
308
|
off(...args) { return this.#channel.off(...args); }
|
|
302
309
|
// Reactive primitives
|
|
303
310
|
/**
|
|
304
|
-
* Create a reactive object that auto-updates when the object at this
|
|
311
|
+
* Create a reactive object that auto-updates when the object at this path changes.
|
|
305
312
|
*/
|
|
306
|
-
object(
|
|
313
|
+
object(path) {
|
|
307
314
|
if (this.#closed)
|
|
308
315
|
throw new Error('Cannot create reactive object: channel is closed');
|
|
309
|
-
return new ReactiveObjectImpl(this.#channel, this.#fileTree,
|
|
316
|
+
return new ReactiveObjectImpl(this.#channel, this.#fileTree, path);
|
|
310
317
|
}
|
|
311
318
|
/**
|
|
312
319
|
* Create a reactive watch that auto-updates when matching objects change.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export type ReactiveFilePath =
|
|
1
|
+
import { type RoolSpace, type WebDAVDepth, type WebDAVPropName, type WebDAVResponse, type WebDAVSyncLevel } from '@rool-dev/sdk';
|
|
2
|
+
export type ReactiveFilePath = string;
|
|
3
3
|
export type ReactiveFileRoot = '' | 'space' | 'rool-drive';
|
|
4
4
|
export interface ReactiveFileNode {
|
|
5
5
|
/** Stable node id. Same as `path`. */
|
|
@@ -75,8 +75,8 @@ export declare class ReactiveFileTree {
|
|
|
75
75
|
has(path: string): boolean;
|
|
76
76
|
childrenOf(path: string): ReactiveFileNode[];
|
|
77
77
|
descendantsOf(path: string): ReactiveFileNode[];
|
|
78
|
-
/** Object file
|
|
79
|
-
|
|
78
|
+
/** Object file paths sorted by modified time descending. */
|
|
79
|
+
objectPaths(options?: {
|
|
80
80
|
collection?: string;
|
|
81
81
|
order?: 'asc' | 'desc';
|
|
82
82
|
limit?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-tree.svelte.d.ts","sourceRoot":"","sources":["../src/file-tree.svelte.ts"],"names":[],"mappings":"AAA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,gBAAgB,EAAE;IAK/C,4DAA4D;IAC5D,WAAW,CAAC,OAAO,GAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,MAAM,EAAE;IAUpG,WAAW,IAAI,MAAM,EAAE;IAOjB,YAAY,IAAI,OAAO,CAAC,0BAA0B,CAAC;IAgCnD,IAAI,IAAI,OAAO,CAAC,0BAA0B,CAAC;IAuBjD,OAAO,IAAI,OAAO,CAAC,0BAA0B,CAAC;IAI9C,KAAK,IAAI,IAAI;CA0Id"}
|
package/dist/file-tree.svelte.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isObjectPath, machinePath, } from '@rool-dev/sdk';
|
|
2
2
|
const ROOT = '/';
|
|
3
3
|
const DEFAULT_PROPS = [
|
|
4
4
|
'displayname',
|
|
@@ -9,14 +9,7 @@ const DEFAULT_PROPS = [
|
|
|
9
9
|
'resourcetype',
|
|
10
10
|
];
|
|
11
11
|
function normalizePath(path) {
|
|
12
|
-
|
|
13
|
-
return ROOT;
|
|
14
|
-
const normalized = `/${path.replace(/^\/+|\/+$/g, '')}`;
|
|
15
|
-
if (normalized === '/space' || normalized.startsWith('/space/'))
|
|
16
|
-
return normalized;
|
|
17
|
-
if (normalized === '/rool-drive' || normalized.startsWith('/rool-drive/'))
|
|
18
|
-
return normalized;
|
|
19
|
-
return ROOT;
|
|
12
|
+
return machinePath(path);
|
|
20
13
|
}
|
|
21
14
|
function parentPath(path) {
|
|
22
15
|
if (path === ROOT)
|
|
@@ -25,7 +18,7 @@ function parentPath(path) {
|
|
|
25
18
|
parts.pop();
|
|
26
19
|
return parts.length === 0 ? ROOT : `/${parts.join('/')}`;
|
|
27
20
|
}
|
|
28
|
-
function
|
|
21
|
+
function leafName(path) {
|
|
29
22
|
if (path === ROOT)
|
|
30
23
|
return 'Space';
|
|
31
24
|
const leaf = path.split('/').filter(Boolean).pop() ?? '';
|
|
@@ -60,7 +53,7 @@ function nodeFromResponse(response) {
|
|
|
60
53
|
parent: parentPath(path),
|
|
61
54
|
name: typeof response.props.displayname === 'string' && response.props.displayname
|
|
62
55
|
? response.props.displayname
|
|
63
|
-
:
|
|
56
|
+
: leafName(path),
|
|
64
57
|
root: rootOf(path),
|
|
65
58
|
isCollection: response.isCollection,
|
|
66
59
|
size: typeof response.props.getcontentlength === 'number' ? response.props.getcontentlength : null,
|
|
@@ -150,16 +143,16 @@ export class ReactiveFileTree {
|
|
|
150
143
|
const root = normalizePath(path);
|
|
151
144
|
return this.nodes.filter((node) => node.path !== root && isDescendant(node.path, root));
|
|
152
145
|
}
|
|
153
|
-
/** Object file
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
.filter((node) => !node.isCollection &&
|
|
146
|
+
/** Object file paths sorted by modified time descending. */
|
|
147
|
+
objectPaths(options = {}) {
|
|
148
|
+
const paths = this.nodes
|
|
149
|
+
.filter((node) => !node.isCollection && isObjectPath(node.path))
|
|
157
150
|
.filter((node) => !options.collection || safeCollection(node.path) === options.collection)
|
|
158
151
|
.sort((a, b) => (b.modifiedAt ?? 0) - (a.modifiedAt ?? 0))
|
|
159
152
|
.map((node) => node.path);
|
|
160
153
|
if (options.order === 'asc')
|
|
161
|
-
|
|
162
|
-
return options.limit === undefined ?
|
|
154
|
+
paths.reverse();
|
|
155
|
+
return options.limit === undefined ? paths : paths.slice(0, options.limit);
|
|
163
156
|
}
|
|
164
157
|
collections() {
|
|
165
158
|
return this.childrenOf('/space')
|
|
@@ -399,20 +392,8 @@ function isDescendant(path, ancestor) {
|
|
|
399
392
|
return path !== ROOT;
|
|
400
393
|
return path.startsWith(`${ancestor}/`);
|
|
401
394
|
}
|
|
402
|
-
function isObjectLocation(path) {
|
|
403
|
-
try {
|
|
404
|
-
parseLocation(path);
|
|
405
|
-
return true;
|
|
406
|
-
}
|
|
407
|
-
catch {
|
|
408
|
-
return false;
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
395
|
function safeCollection(path) {
|
|
412
|
-
|
|
413
|
-
return parseLocation(path).collection;
|
|
414
|
-
}
|
|
415
|
-
catch {
|
|
396
|
+
if (!isObjectPath(path))
|
|
416
397
|
return undefined;
|
|
417
|
-
|
|
398
|
+
return path.split('/')[2];
|
|
418
399
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { createRool, generateId } from './rool.svelte.js';
|
|
2
|
-
export {
|
|
3
|
-
export type { ParsedLocation, MachineResource } from '@rool-dev/sdk';
|
|
2
|
+
export { isObjectPath, machinePath, machineUri } from '@rool-dev/sdk';
|
|
4
3
|
export { wrapChannel } from './channel.svelte.js';
|
|
5
4
|
export { wrapSpace } from './space.svelte.js';
|
|
6
5
|
export { ReactiveFileTree } from './file-tree.svelte.js';
|
|
@@ -8,5 +7,5 @@ export type { Rool } from './rool.svelte.js';
|
|
|
8
7
|
export type { ReactiveChannel, ReactiveConversationHandle, ReactiveObject, ReactiveWatch, ReactiveChannelList, WatchOptions } from './channel.svelte.js';
|
|
9
8
|
export type { ReactiveSpace } from './space.svelte.js';
|
|
10
9
|
export type { ReactiveFileNode, ReactiveFilePath, ReactiveFileRoot, ReactiveFileTreeEvent, ReactiveFileTreeSyncResult } from './file-tree.svelte.js';
|
|
11
|
-
export type { RoolClientConfig, RoolChannel, RoolSpace, RoolSpaceInfo, RoolObject, RoolObjectStat, RoolUserRole, ConnectionState, ChannelInfo, Conversation, ConversationInfo, CurrentUser, Interaction, PromptOptions, PromptAttachment,
|
|
10
|
+
export type { RoolClientConfig, RoolChannel, RoolSpace, RoolSpaceInfo, RoolObject, GetObjectsResult, RoolObjectStat, RoolUserRole, ConnectionState, ChannelInfo, Conversation, ConversationInfo, CurrentUser, Interaction, PromptOptions, PromptAttachment, UpdateObjectOptions, MoveObjectOptions, CollectionOptions, FieldType, FieldDef, CollectionDef, SpaceSchema, SpaceMember, UserResult, RoolClient, RoolSpaceEvents, ProbeRequestEvent, SpaceFileStorageUsage, WebDAVDepth, WebDAVSyncLevel, WebDAVPropName, WebDAVResponse, WebDAVProps, } from '@rool-dev/sdk';
|
|
12
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGtE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,0BAA0B,EAAE,cAAc,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACzJ,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAGrJ,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,cAAc,EACd,cAAc,EACd,WAAW,GACZ,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Main export
|
|
2
2
|
export { createRool, generateId } from './rool.svelte.js';
|
|
3
|
-
//
|
|
4
|
-
export {
|
|
3
|
+
// Machine path helpers — re-exported from the SDK for convenience
|
|
4
|
+
export { isObjectPath, machinePath, machineUri } from '@rool-dev/sdk';
|
|
5
5
|
// Reactive wrappers
|
|
6
6
|
export { wrapChannel } from './channel.svelte.js';
|
|
7
7
|
export { wrapSpace } from './space.svelte.js';
|
package/dist/rool.svelte.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RoolClient, type RoolSpaceInfo, type ConnectionState, type RoolClientConfig, type CurrentUser
|
|
1
|
+
import { RoolClient, type RoolSpaceInfo, type ConnectionState, type RoolClientConfig, type CurrentUser } from '@rool-dev/sdk';
|
|
2
2
|
import { type ReactiveChannelList } from './channel.svelte.js';
|
|
3
3
|
import { type ReactiveSpace } from './space.svelte.js';
|
|
4
4
|
/**
|
|
@@ -120,27 +120,8 @@ declare class RoolImpl {
|
|
|
120
120
|
slug?: string;
|
|
121
121
|
marketingOptIn?: boolean;
|
|
122
122
|
}): Promise<CurrentUser>;
|
|
123
|
-
/**
|
|
124
|
-
* Install an extension into a space.
|
|
125
|
-
* Creates/updates a channel with the extension's manifest settings.
|
|
126
|
-
* Returns the channel ID.
|
|
127
|
-
*/
|
|
128
|
-
/** Upload or update a user extension bundle. */
|
|
129
|
-
uploadExtension(extensionId: string, options: UploadExtensionOptions): Promise<ExtensionInfo>;
|
|
130
|
-
/** Delete a user extension permanently. */
|
|
131
|
-
deleteExtension(extensionId: string): Promise<void>;
|
|
132
|
-
/** List the current user's extensions. */
|
|
133
|
-
listExtensions(): Promise<ExtensionInfo[]>;
|
|
134
|
-
/** Get info for a specific user extension. */
|
|
135
|
-
getExtensionInfo(extensionId: string): Promise<ExtensionInfo | null>;
|
|
136
|
-
/** Search published extensions. */
|
|
137
|
-
findExtensions(options?: FindExtensionsOptions): Promise<PublishedExtensionInfo[]>;
|
|
138
123
|
/** Respond to a server-initiated probe with a method-specific result or error. */
|
|
139
124
|
probeResponse(requestId: string, result?: unknown, error?: string): Promise<boolean>;
|
|
140
|
-
/** Publish a user extension (make it publicly discoverable). */
|
|
141
|
-
publishToPublic(extensionId: string): Promise<void>;
|
|
142
|
-
/** Unpublish an extension (remove from public listing). */
|
|
143
|
-
unpublishFromPublic(extensionId: string): Promise<void>;
|
|
144
125
|
/**
|
|
145
126
|
* Create a reactive channel list for a space.
|
|
146
127
|
* Auto-updates when channels are created, updated, or deleted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rool.svelte.d.ts","sourceRoot":"","sources":["../src/rool.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"rool.svelte.d.ts","sourceRoot":"","sources":["../src/rool.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC9H,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;;;;GAQG;AACH,cAAM,QAAQ;;IAMZ,aAAa,iBA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
|
-
* Install an extension into a space.
|
|
265
|
-
* Creates/updates a channel with the extension's manifest settings.
|
|
266
|
-
* Returns the channel ID.
|
|
267
|
-
*/
|
|
268
|
-
// --- User Extensions (your personal library) ---
|
|
269
|
-
/** Upload or update a user extension bundle. */
|
|
270
|
-
uploadExtension(extensionId, options) {
|
|
271
|
-
return this.#client.uploadExtension(extensionId, options);
|
|
272
|
-
}
|
|
273
|
-
/** Delete a user extension permanently. */
|
|
274
|
-
deleteExtension(extensionId) {
|
|
275
|
-
return this.#client.deleteExtension(extensionId);
|
|
276
|
-
}
|
|
277
|
-
/** List the current user's extensions. */
|
|
278
|
-
listExtensions() {
|
|
279
|
-
return this.#client.listExtensions();
|
|
280
|
-
}
|
|
281
|
-
/** Get info for a specific user extension. */
|
|
282
|
-
getExtensionInfo(extensionId) {
|
|
283
|
-
return this.#client.getExtensionInfo(extensionId);
|
|
284
|
-
}
|
|
285
|
-
// --- Published Extensions (public discovery & install) ---
|
|
286
|
-
/** Search published extensions. */
|
|
287
|
-
findExtensions(options) {
|
|
288
|
-
return this.#client.findExtensions(options);
|
|
289
|
-
}
|
|
290
263
|
/** Respond to a server-initiated probe with a method-specific result or error. */
|
|
291
264
|
probeResponse(requestId, result, error) {
|
|
292
265
|
return this.#client.probeResponse(requestId, result, error);
|
|
293
266
|
}
|
|
294
|
-
/** Publish a user extension (make it publicly discoverable). */
|
|
295
|
-
publishToPublic(extensionId) {
|
|
296
|
-
return this.#client.publishToPublic(extensionId);
|
|
297
|
-
}
|
|
298
|
-
/** Unpublish an extension (remove from public listing). */
|
|
299
|
-
unpublishFromPublic(extensionId) {
|
|
300
|
-
return this.#client.unpublishFromPublic(extensionId);
|
|
301
|
-
}
|
|
302
267
|
/**
|
|
303
268
|
* Create a reactive channel list for a space.
|
|
304
269
|
* Auto-updates when channels are created, updated, or deleted.
|
package/dist/space.svelte.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ declare class ReactiveSpaceImpl {
|
|
|
32
32
|
get webdav(): import("@rool-dev/sdk").RoolWebDAV;
|
|
33
33
|
get fileTree(): ReactiveFileTree;
|
|
34
34
|
getStorageUsage(...args: Parameters<RoolSpace['getStorageUsage']>): Promise<import("@rool-dev/sdk").SpaceFileStorageUsage>;
|
|
35
|
-
|
|
35
|
+
fetchPath(...args: Parameters<RoolSpace['fetchPath']>): Promise<Response>;
|
|
36
36
|
rename(newName: string): Promise<void>;
|
|
37
37
|
delete(): Promise<void>;
|
|
38
38
|
listUsers(): Promise<SpaceMember[]>;
|
|
@@ -41,7 +41,6 @@ declare class ReactiveSpaceImpl {
|
|
|
41
41
|
setLinkAccess(...args: Parameters<RoolSpace['setLinkAccess']>): Promise<void>;
|
|
42
42
|
renameChannel(channelId: string, name: string): Promise<void>;
|
|
43
43
|
deleteChannel(channelId: string): Promise<void>;
|
|
44
|
-
installExtension(extensionId: string, channelId: string): Promise<string>;
|
|
45
44
|
exportArchive(): Promise<Blob>;
|
|
46
45
|
refresh(): Promise<void>;
|
|
47
46
|
on(...args: Parameters<RoolSpace['on']>): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.svelte.d.ts","sourceRoot":"","sources":["../src/space.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpH,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;GAMG;AACH,cAAM,iBAAiB;;IASrB,eAAe,kBAA2C;gBAE9C,KAAK,EAAE,SAAS;IAoB5B,IAAI,QAAQ,YAA2B;IAEvC;;;OAGG;IACG,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAY9D;;;OAGG;IACH,KAAK,IAAI,IAAI;IAiBb,IAAI,QAAQ,I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e,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IACjE,SAAS,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAGrD,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACtC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IACvB,SAAS,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IACnC,OAAO,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACjD,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACzC,aAAa,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC7D,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7D,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAC/C,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAC9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAGxB,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACvC,GAAG,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;CAC1C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,CAEzD;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC"}
|
package/dist/space.svelte.js
CHANGED
|
@@ -79,7 +79,7 @@ class ReactiveSpaceImpl {
|
|
|
79
79
|
get fileTree() { return this.#fileTree; }
|
|
80
80
|
// Proxy resource methods
|
|
81
81
|
getStorageUsage(...args) { return this.#space.getStorageUsage(...args); }
|
|
82
|
-
|
|
82
|
+
fetchPath(...args) { return this.#space.fetchPath(...args); }
|
|
83
83
|
// Proxy admin methods
|
|
84
84
|
rename(newName) { return this.#space.rename(newName); }
|
|
85
85
|
delete() { return this.#space.delete(); }
|
|
@@ -89,7 +89,6 @@ class ReactiveSpaceImpl {
|
|
|
89
89
|
setLinkAccess(...args) { return this.#space.setLinkAccess(...args); }
|
|
90
90
|
renameChannel(channelId, name) { return this.#space.renameChannel(channelId, name); }
|
|
91
91
|
deleteChannel(channelId) { return this.#space.deleteChannel(channelId); }
|
|
92
|
-
installExtension(extensionId, channelId) { return this.#space.installExtension(extensionId, channelId); }
|
|
93
92
|
exportArchive() { return this.#space.exportArchive(); }
|
|
94
93
|
refresh() { return this.#space.refresh(); }
|
|
95
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.eeb9773",
|
|
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.eeb9773"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"svelte": "^5.0.0"
|