@taskcast/react 0.1.2 → 0.3.0

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.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -10,7 +10,7 @@ pnpm add @taskcast/react @taskcast/client @taskcast/core react
10
10
 
11
11
  ## Usage
12
12
 
13
- ```typescript
13
+ ```tsx
14
14
  import { useTaskEvents } from '@taskcast/react'
15
15
 
16
16
  function TaskStream({ taskId }: { taskId: string }) {
@@ -39,10 +39,10 @@ Returns:
39
39
 
40
40
  | Field | Type | Description |
41
41
  |-------|------|-------------|
42
- | `events` | `TaskEventEnvelope[]` | Accumulated events |
42
+ | `events` | `SSEEnvelope[]` | Accumulated events |
43
43
  | `isDone` | `boolean` | Whether the task has reached a terminal state |
44
- | `doneReason` | `string \| undefined` | Terminal status (`completed`, `failed`, etc.) |
45
- | `error` | `Error \| undefined` | Connection or parse errors |
44
+ | `doneReason` | `string \| null` | Terminal status (`completed`, `failed`, etc.) |
45
+ | `error` | `Error \| null` | Connection or parse errors |
46
46
 
47
47
  ## Part of Taskcast
48
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taskcast/react",
3
- "version": "0.1.2",
3
+ "version": "0.3.0",
4
4
  "description": "React hook useTaskEvents for Taskcast SSE subscriptions.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,8 +28,8 @@
28
28
  "provenance": true
29
29
  },
30
30
  "dependencies": {
31
- "@taskcast/client": "0.1.2",
32
- "@taskcast/core": "0.1.2"
31
+ "@taskcast/client": "0.3.0",
32
+ "@taskcast/core": "0.3.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": "^18.0.0"