@weftui/core 0.26.3 → 0.27.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.
- package/README.md +9 -9
- package/dist/{index-B8idtfB3.d.ts → index-DMNuAQXj.d.ts} +70 -9
- package/dist/index.d.ts +250 -230
- package/dist/index.js +1 -1
- package/dist/rolldown-runtime-DK3Fl9T5.js +1 -0
- package/dist/types/index.d.ts +1 -1
- package/docs/explanation/boundaries-and-suspense.md +8 -8
- package/docs/explanation/reactive-primitives.md +13 -11
- package/docs/explanation/rendering-model.md +1 -1
- package/docs/explanation/services-and-context.md +3 -3
- package/docs/how-to/add-routing.md +7 -5
- package/docs/how-to/author-components.md +5 -5
- package/docs/how-to/handle-forms.md +10 -10
- package/docs/how-to/load-async-data.md +4 -4
- package/docs/how-to/load-data-with-rpc.md +5 -5
- package/docs/how-to/provide-services.md +1 -1
- package/docs/how-to/use-element-refs.md +5 -5
- package/docs/reference/core.md +31 -20
- package/docs/reference/router.md +5 -5
- package/docs/tutorial/02-reactivity.md +6 -6
- package/docs/tutorial/03-services-and-async.md +3 -4
- package/docs/tutorial/04-errors-and-server.md +2 -2
- package/package.json +3 -5
|
@@ -20,12 +20,12 @@ import { Data, Effect } from "effect";
|
|
|
20
20
|
class ApiError extends Data.TaggedError("ApiError")<{ status: number }> {}
|
|
21
21
|
|
|
22
22
|
const SafeWidget = () =>
|
|
23
|
-
Boundary.
|
|
23
|
+
Boundary.catch({ fallback: (e) => h.div({ class: "error" }, `Request failed: ${e.status}`) }, [
|
|
24
24
|
Effect.fail(new ApiError({ status: 503 })),
|
|
25
25
|
]);
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
There are six failure-catch variants — `
|
|
28
|
+
There are six failure-catch variants — `catch`, `catchCause`, `catchTag`, `catchTags`, `catchFilter`, `catchIf` — mirroring Effect's own error operators. A failure that a boundary does not match re-raises to the **nearest enclosing** boundary; if none catches it, the mount fails. The conceptual model (and why the boundary's type reflects exactly which failures are handled) is [Boundaries and Suspense](https://weftui.dev/docs/explanation/boundaries-and-suspense).
|
|
29
29
|
|
|
30
30
|
## Render on the server
|
|
31
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weftui/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Element builders and combinators for Weft — reactive UI, woven from Effect",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"combinators",
|
|
@@ -41,17 +41,15 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@effect/rpc": "^0.75.1",
|
|
45
44
|
"@types/node": "^25.9.2",
|
|
46
45
|
"csstype": "^3.2.3",
|
|
47
|
-
"effect": "
|
|
46
|
+
"effect": "4.0.0-beta.93",
|
|
48
47
|
"tsx": "^4.22.4",
|
|
49
48
|
"typescript": "^6.0.3",
|
|
50
49
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.2",
|
|
51
50
|
"vite-plus": "0.2.2"
|
|
52
51
|
},
|
|
53
52
|
"peerDependencies": {
|
|
54
|
-
"
|
|
55
|
-
"effect": "^3.21"
|
|
53
|
+
"effect": "4.0.0-beta.93"
|
|
56
54
|
}
|
|
57
55
|
}
|