@rool-dev/svelte 0.1.0 → 0.1.1-dev.0bedc35
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 +41 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Rool Svelte
|
|
2
2
|
|
|
3
|
-
Svelte 5
|
|
3
|
+
Svelte 5 bindings for Rool Spaces. Transforms the event-based SDK into reactive state using `$state` runes.
|
|
4
4
|
|
|
5
|
-
**Requires Svelte 5.**
|
|
5
|
+
**Requires Svelte 5.** For core concepts (objects, relations, AI placeholders, undo/redo), see the [SDK documentation](https://docs.rool.dev/sdk/).
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -195,6 +195,15 @@ await space.renameConversation('convo-id', 'Research Thread');
|
|
|
195
195
|
await space.deleteConversation('convo-id');
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
+
### Utilities
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
import { generateId } from '@rool-dev/svelte';
|
|
202
|
+
|
|
203
|
+
// Generate a 6-character alphanumeric ID (same as RoolClient.generateId())
|
|
204
|
+
const id = generateId();
|
|
205
|
+
```
|
|
206
|
+
|
|
198
207
|
## Auto-Refresh Behavior
|
|
199
208
|
|
|
200
209
|
| State | Auto-refreshes on |
|
|
@@ -228,6 +237,36 @@ class AsyncValue<T> {
|
|
|
228
237
|
4. **Auto-refresh where safe** — Object/relation state auto-refreshes; queries are manual
|
|
229
238
|
5. **Caching** — Factory functions return cached instances by arguments
|
|
230
239
|
|
|
240
|
+
## Exported Types
|
|
241
|
+
|
|
242
|
+
```typescript
|
|
243
|
+
// Package types
|
|
244
|
+
import type {
|
|
245
|
+
Rool,
|
|
246
|
+
SpaceHandle,
|
|
247
|
+
SpaceInfo,
|
|
248
|
+
AsyncValue,
|
|
249
|
+
CreateObjectOptions,
|
|
250
|
+
UpdateObjectOptions,
|
|
251
|
+
} from '@rool-dev/svelte';
|
|
252
|
+
|
|
253
|
+
// Re-exported from @rool-dev/sdk
|
|
254
|
+
import type {
|
|
255
|
+
RoolSpaceInfo,
|
|
256
|
+
RoolObject,
|
|
257
|
+
RoolUserRole,
|
|
258
|
+
ConnectionState,
|
|
259
|
+
ConversationInfo,
|
|
260
|
+
Interaction,
|
|
261
|
+
FindObjectsOptions,
|
|
262
|
+
PromptOptions,
|
|
263
|
+
} from '@rool-dev/svelte';
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## Examples
|
|
267
|
+
|
|
268
|
+
See the [svelte-chat example](https://github.com/rool-dev/rool-js/tree/main/examples/svelte-chat) for a complete working app.
|
|
269
|
+
|
|
231
270
|
## License
|
|
232
271
|
|
|
233
272
|
MIT - see [LICENSE](../../LICENSE) for details.
|