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

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,52 @@
1
1
  # @effect-app/vue
2
2
 
3
+ ## 4.0.0-beta.184
4
+
5
+ ### Minor Changes
6
+
7
+ - d4bf24a: Add `Command.withDefaultToastStream` — a stream-aware combinator for `streamFn` that properly handles the full stream lifecycle (waiting/success/failure toasts). Unlike `withDefaultToast`, it waits for the stream to drain before showing the success toast and correctly handles stream errors.
8
+
9
+ Strongly type `CommandBase` with `RA`/`RE` type params for `result`, and update `CommandButton`'s `mapProgress` prop to be typed as `(result: AsyncResult<RA, RE>) => Progress | undefined`.
10
+
11
+ ### Patch Changes
12
+
13
+ - effect-app@4.0.0-beta.184
14
+
15
+ ## 4.0.0-beta.183
16
+
17
+ ### Minor Changes
18
+
19
+ - 8ff0bf9: Add `Command.streamFn` — a stream-backed variant of `Command.fn`.
20
+
21
+ 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.
22
+
23
+ Three handler shapes are accepted:
24
+
25
+ 1. **Generator returning a Stream** (primary):
26
+ ```ts
27
+ Command.streamFn("exportData")(function* (arg, ctx) {
28
+ const token = yield* getAuthToken;
29
+ return Stream.fromEffect(startExport(token, arg.id)).pipe(
30
+ Stream.flatMap((job) => pollProgress(job.id))
31
+ );
32
+ });
33
+ ```
34
+ 2. Function returning a `Stream` directly.
35
+ 3. Function returning `Effect<Stream>` (unwrapped automatically).
36
+
37
+ - 8ff0bf9: - `CommandButton`: add optional `:map-progress` prop to compute progress from `command.result` via a custom mapper function
38
+ - `CommandBase`: add optional `result` field exposing reactive `AsyncResult` state
39
+ - Export `Progress` type from `@effect-app/vue`
40
+ - `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
41
+ - Add `makeStreamMutation2`: like `makeStreamMutation` but returns `Effect<Stream>` per invocation (with invalidation via `Stream.ensuring`), for use with `streamFn` combinators
42
+ - Expose `streamFn` on `XClient.Y` stream handlers and on the `Command` object
43
+ - Expose `mutateStream2` on `XClient.Y` stream handlers, with a `wrapStream` helper that calls `streamFn` with the handler and provided combinators
44
+ - 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>`.
45
+
46
+ ### Patch Changes
47
+
48
+ - effect-app@4.0.0-beta.183
49
+
3
50
  ## 4.0.0-beta.182
4
51
 
5
52
  ### Minor Changes