@thomasfosterau/effect-sveltekit 0.8.0 → 0.9.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 +10 -1
- package/dist/client.d.ts +9 -7
- package/dist/client.js +8 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ optional `effectKit()` Vite plugin lets route files export bare Effects instead.
|
|
|
49
49
|
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
50
|
| `@thomasfosterau/effect-sveltekit` | Universal helpers: `load` / `makeUniversalRuntime`, the `Remote` call namespace and `Hooks` (`reroute`, `transport`), each also exported member by member, `ResponseHeaders`, `sveltekitConfig` / `readConfig`, `apiClient` |
|
|
51
51
|
| `…/server` | Server wrappers (`serverLoad`, `action`, `actions`, `endpoint`), `Hooks`, `Endpoint`, `makeServerRuntime`, the per-request runtime seam (`makeRuntimeAdapter` / `RequestRuntime`), `Errors`, `RemoteFunction` / `RemoteFunctionUsageError`, `KitError` / `KitErrorBody`, request decoding (`decodeParams`, `decodeJson`, …) |
|
|
52
|
-
| `…/client` | Browser-only `Navigation`, `State` (incl. the `CurrentPage` service), `Remote`, `Realtime`, `Forms` and `Hooks` namespaces, and `useRemoteQuery` / `RemoteQueryResult`
|
|
52
|
+
| `…/client` | Browser-only `Navigation`, `State` (incl. the `CurrentPage` service), `Remote`, `Realtime`, `Forms` and `Hooks` namespaces, each also exported member by member, and `useRemoteQuery` / `RemoteQueryResult` |
|
|
53
53
|
| `…/vite` | The `effectKit()` Vite plugin (auto-wraps bare-Effect route exports) |
|
|
54
54
|
| `…/adapter` | The Effect HTTP deployment adapter (`effectAdapter`) |
|
|
55
55
|
| `…/adapter/handler` | The SvelteKit app as an Effect HTTP app (`makeHandler`, `makeHandlerWith`, `AssetSource`, `toWebHandler`, the `SvelteKitServerError` / `AssetFetchError` defects) |
|
|
@@ -388,6 +388,15 @@ import {
|
|
|
388
388
|
// Remote.callQuery(getTodos), State.page()
|
|
389
389
|
```
|
|
390
390
|
|
|
391
|
+
Every member of `Navigation`, `State`, `Remote`, `Realtime`, `Forms` and
|
|
392
|
+
`Hooks` is also a named export of `…/client` (`goto`, `page`, `callQuery`,
|
|
393
|
+
`fromEventSource`, `enhance`, `handleError`, …), and the named imports are the
|
|
394
|
+
ones to prefer in the browser bundle. The published build turns each namespace
|
|
395
|
+
into a single object, so `Navigation.goto` also keeps `beforeNavigate`,
|
|
396
|
+
`afterNavigate`, `onNavigate` and the navigation-event registry behind them,
|
|
397
|
+
while `import { goto } from "@thomasfosterau/effect-sveltekit/client"` keeps
|
|
398
|
+
only `goto` and what it uses.
|
|
399
|
+
|
|
391
400
|
`Navigation.goto`, `invalidate`, `invalidateAll`, `refreshAll`, `preloadData`
|
|
392
401
|
and `preloadCode` fail with `Navigation.NavigationError` when SvelteKit rejects
|
|
393
402
|
or throws: for example, `goto` to a URL outside the app, `preloadData` for an
|
package/dist/client.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { Navigation_d_exports } from "./Navigation.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { NavigationError, Navigation_d_exports, afterNavigate, beforeNavigate, goto, invalidate, invalidateAll, onNavigate, preloadCode, preloadData, refreshAll } from "./Navigation.js";
|
|
2
|
+
import { NavigatingSnapshot, PageSnapshot, UpdateCheckError } from "./internal/app-state.js";
|
|
3
|
+
import { CurrentPage, CurrentPageInterface, State_d_exports, checkForUpdate, navigating, page, updated } from "./State.js";
|
|
4
|
+
import { RemoteSubmit, Remote_d_exports, callCommand, callCommandWithUpdates, callPrerender, callQuery, liveQueryStream, submitForm, submitFormWithUpdates } from "./Remote.js";
|
|
4
5
|
import { RemoteQueryResult, useRemoteQuery } from "./remote-reactive.js";
|
|
5
|
-
import { realtime_d_exports } from "./realtime.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
6
|
+
import { EventSourceConstructor, EventSourceError, FromEventSourceOptions, FromWebSocketOptions, SseMessage, WebSocketConstructor, WebSocketError, fromEventSource, fromWebSocket, realtime_d_exports } from "./realtime.js";
|
|
7
|
+
import { EnhanceHandlers, EnhanceOptions, EnhanceOptionsArgs, EnhanceRuntime, ResultOptions, SubmitInput } from "./internal/enhance.js";
|
|
8
|
+
import { ApplyActionError, applyAction, deserialize, enhance, forms_d_exports } from "./forms.js";
|
|
9
|
+
import { Hooks_d_exports, handleError, init } from "./client/Hooks.js";
|
|
10
|
+
export { ApplyActionError, CurrentPage, type CurrentPageInterface, type EnhanceHandlers, type EnhanceOptions, type EnhanceOptionsArgs, type EnhanceRuntime, type EventSourceConstructor, EventSourceError, forms_d_exports as Forms, type FromEventSourceOptions, type FromWebSocketOptions, Hooks_d_exports as Hooks, type NavigatingSnapshot, Navigation_d_exports as Navigation, NavigationError, type PageSnapshot, realtime_d_exports as Realtime, Remote_d_exports as Remote, type RemoteQueryResult, type RemoteSubmit, type ResultOptions, type SseMessage, State_d_exports as State, type SubmitInput, UpdateCheckError, type WebSocketConstructor, WebSocketError, afterNavigate, applyAction, beforeNavigate, callCommand, callCommandWithUpdates, callPrerender, callQuery, checkForUpdate, deserialize, enhance, fromEventSource, fromWebSocket, goto, handleError, init, invalidate, invalidateAll, liveQueryStream, navigating, onNavigate, page, preloadCode, preloadData, refreshAll, submitForm, submitFormWithUpdates, updated, useRemoteQuery };
|
package/dist/client.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Remote_exports } from "./Remote.js";
|
|
2
|
-
import { Navigation_exports } from "./Navigation.js";
|
|
3
|
-
import {
|
|
1
|
+
import { Remote_exports, callCommand, callCommandWithUpdates, callPrerender, callQuery, liveQueryStream, submitForm, submitFormWithUpdates } from "./Remote.js";
|
|
2
|
+
import { NavigationError, Navigation_exports, afterNavigate, beforeNavigate, goto, invalidate, invalidateAll, onNavigate, preloadCode, preloadData, refreshAll } from "./Navigation.js";
|
|
3
|
+
import { UpdateCheckError } from "./internal/app-state.js";
|
|
4
|
+
import { CurrentPage, State_exports, checkForUpdate, navigating, page, updated } from "./State.js";
|
|
4
5
|
import { useRemoteQuery } from "./remote-reactive.js";
|
|
5
|
-
import { realtime_exports } from "./realtime.js";
|
|
6
|
-
import { forms_exports } from "./forms.js";
|
|
7
|
-
import { Hooks_exports } from "./client/Hooks.js";
|
|
8
|
-
export { forms_exports as Forms, Hooks_exports as Hooks, Navigation_exports as Navigation, realtime_exports as Realtime, Remote_exports as Remote, State_exports as State, useRemoteQuery };
|
|
6
|
+
import { EventSourceError, WebSocketError, fromEventSource, fromWebSocket, realtime_exports } from "./realtime.js";
|
|
7
|
+
import { ApplyActionError, applyAction, deserialize, enhance, forms_exports } from "./forms.js";
|
|
8
|
+
import { Hooks_exports, handleError, init } from "./client/Hooks.js";
|
|
9
|
+
export { ApplyActionError, CurrentPage, EventSourceError, forms_exports as Forms, Hooks_exports as Hooks, Navigation_exports as Navigation, NavigationError, realtime_exports as Realtime, Remote_exports as Remote, State_exports as State, UpdateCheckError, WebSocketError, afterNavigate, applyAction, beforeNavigate, callCommand, callCommandWithUpdates, callPrerender, callQuery, checkForUpdate, deserialize, enhance, fromEventSource, fromWebSocket, goto, handleError, init, invalidate, invalidateAll, liveQueryStream, navigating, onNavigate, page, preloadCode, preloadData, refreshAll, submitForm, submitFormWithUpdates, updated, useRemoteQuery };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thomasfosterau/effect-sveltekit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Effect integration for SvelteKit: load/action/endpoint wrappers, remote functions, an effectKit() Vite plugin, and an Effect HTTP deployment adapter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"effect",
|