@effect-app/vue 4.0.0-beta.182 → 4.0.0-beta.183

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/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @effect-app/vue
2
2
 
3
+ ## 4.0.0-beta.183
4
+
5
+ ### Minor Changes
6
+
7
+ - 8ff0bf9: Add `Command.streamFn` — a stream-backed variant of `Command.fn`.
8
+
9
+ The body generator (or plain function) returns a `Stream` instead of an `Effect`. The command's `waiting` state stays `true` while the stream is running and updates the reactive `result` ref for every emitted value.
10
+
11
+ Three handler shapes are accepted:
12
+
13
+ 1. **Generator returning a Stream** (primary):
14
+ ```ts
15
+ Command.streamFn("exportData")(function* (arg, ctx) {
16
+ const token = yield* getAuthToken;
17
+ return Stream.fromEffect(startExport(token, arg.id)).pipe(
18
+ Stream.flatMap((job) => pollProgress(job.id))
19
+ );
20
+ });
21
+ ```
22
+ 2. Function returning a `Stream` directly.
23
+ 3. Function returning `Effect<Stream>` (unwrapped automatically).
24
+
25
+ - 8ff0bf9: - `CommandButton`: add optional `:map-progress` prop to compute progress from `command.result` via a custom mapper function
26
+ - `CommandBase`: add optional `result` field exposing reactive `AsyncResult` state
27
+ - Export `Progress` type from `@effect-app/vue`
28
+ - `streamFn`: pipe operators now receive the initial `Effect<Stream>` (or `Stream`) value unchanged; `Stream.unwrap` is deferred until after all combinators, enabling use of `withDefaultToast` and other Effect-level combinators
29
+ - Add `makeStreamMutation2`: like `makeStreamMutation` but returns `Effect<Stream>` per invocation (with invalidation via `Stream.ensuring`), for use with `streamFn` combinators
30
+ - Expose `streamFn` on `XClient.Y` stream handlers and on the `Command` object
31
+ - Expose `mutateStream2` on `XClient.Y` stream handlers, with a `wrapStream` helper that calls `streamFn` with the handler and provided combinators
32
+ - fc98fb7: Add `streamQuery` support for stream-type Rpc handlers. When an Rpc is of type `"stream"`, the client now exposes a `.streamQuery` property (and `...StreamQuery` in helpers) that uses `streamedQuery` from `@tanstack/query-core` to accumulate chunks reactively as an `AsyncResult<A[], E>`.
33
+
34
+ ### Patch Changes
35
+
36
+ - effect-app@4.0.0-beta.183
37
+
3
38
  ## 4.0.0-beta.182
4
39
 
5
40
  ### Minor Changes