@rool-dev/svelte 0.1.0-dev.9257360 → 0.1.0-dev.b38eb99
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 +38 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,9 +7,11 @@ Svelte 5 runes for Rool Spaces. Transforms the event-based SDK into reactive sta
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install @rool-dev/svelte
|
|
10
|
+
npm install @rool-dev/svelte @rool-dev/sdk
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
Requires `@rool-dev/sdk` as a peer dependency.
|
|
14
|
+
|
|
13
15
|
## Quick Start
|
|
14
16
|
|
|
15
17
|
```svelte
|
|
@@ -195,6 +197,15 @@ await space.renameConversation('convo-id', 'Research Thread');
|
|
|
195
197
|
await space.deleteConversation('convo-id');
|
|
196
198
|
```
|
|
197
199
|
|
|
200
|
+
### Utilities
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
import { generateId } from '@rool-dev/svelte';
|
|
204
|
+
|
|
205
|
+
// Generate a 6-character alphanumeric ID (same as RoolClient.generateId())
|
|
206
|
+
const id = generateId();
|
|
207
|
+
```
|
|
208
|
+
|
|
198
209
|
## Auto-Refresh Behavior
|
|
199
210
|
|
|
200
211
|
| State | Auto-refreshes on |
|
|
@@ -228,6 +239,32 @@ class AsyncValue<T> {
|
|
|
228
239
|
4. **Auto-refresh where safe** — Object/relation state auto-refreshes; queries are manual
|
|
229
240
|
5. **Caching** — Factory functions return cached instances by arguments
|
|
230
241
|
|
|
242
|
+
## Exported Types
|
|
243
|
+
|
|
244
|
+
```typescript
|
|
245
|
+
// Package types
|
|
246
|
+
import type {
|
|
247
|
+
Rool,
|
|
248
|
+
SpaceHandle,
|
|
249
|
+
SpaceInfo,
|
|
250
|
+
AsyncValue,
|
|
251
|
+
CreateObjectOptions,
|
|
252
|
+
UpdateObjectOptions,
|
|
253
|
+
} from '@rool-dev/svelte';
|
|
254
|
+
|
|
255
|
+
// Re-exported from @rool-dev/sdk
|
|
256
|
+
import type {
|
|
257
|
+
RoolSpaceInfo,
|
|
258
|
+
RoolObject,
|
|
259
|
+
RoolUserRole,
|
|
260
|
+
ConnectionState,
|
|
261
|
+
ConversationInfo,
|
|
262
|
+
Interaction,
|
|
263
|
+
FindObjectsOptions,
|
|
264
|
+
PromptOptions,
|
|
265
|
+
} from '@rool-dev/svelte';
|
|
266
|
+
```
|
|
267
|
+
|
|
231
268
|
## License
|
|
232
269
|
|
|
233
270
|
MIT - see [LICENSE](../../LICENSE) for details.
|