@typed/navigation 0.3.0 → 0.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typed/navigation",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -19,12 +19,12 @@
19
19
  }
20
20
  },
21
21
  "dependencies": {
22
- "@effect/data": "^0.16.0",
23
- "@effect/io": "^0.35.1",
24
- "@typed/context": "0.16.0",
25
- "@typed/dom": "8.16.0",
26
- "@typed/fx": "1.15.1",
27
- "@typed/path": "0.5.1",
22
+ "@effect/data": "^0.17.0",
23
+ "@effect/io": "^0.36.1",
24
+ "@typed/context": "0.16.2",
25
+ "@typed/dom": "8.16.2",
26
+ "@typed/fx": "1.15.2",
27
+ "@typed/path": "0.5.2",
28
28
  "happy-dom": "^10.5.2"
29
29
  },
30
30
  "publishConfig": {
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "sideEffects": false,
34
34
  "devDependencies": {
35
- "@types/node": "^20.4.2",
35
+ "@types/node": "^20.4.5",
36
36
  "vitest": "0.33.0"
37
37
  },
38
- "gitHead": "4325ae8ab198741f5393b63512a1942fc7b36961"
38
+ "gitHead": "5565448a46ef863202b3e08a927da64ccb19c473"
39
39
  }
package/src/Navigation.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as Brand from '@effect/data/Brand'
2
2
  import { Option } from '@effect/data/Option'
3
- import * as Cause from '@effect/io/Cause'
4
3
  import * as Effect from '@effect/io/Effect'
5
4
  import * as Scope from '@effect/io/Scope'
6
5
  import * as Context from '@typed/context'
@@ -95,7 +94,7 @@ export const onNavigation = <R>(
95
94
  handler: (event: NavigationEvent) => Effect.Effect<R, never, void>,
96
95
  ) => Navigation.withEffect((n) => n.onNavigation(handler))
97
96
 
98
- export const canGoBack: Effect.Effect<Navigation, Cause.NoSuchElementException, boolean> &
97
+ export const canGoBack: Effect.Effect<Navigation, never, boolean> &
99
98
  Fx.Fx<Navigation, never, boolean> = Object.assign(
100
99
  Navigation.withEffect((n) => n.canGoBack),
101
100
  Navigation.withFx((n) => n.canGoBack),
@@ -103,7 +102,7 @@ export const canGoBack: Effect.Effect<Navigation, Cause.NoSuchElementException,
103
102
 
104
103
  export const back = Navigation.withEffect((n) => n.back)
105
104
 
106
- export const canGoForward: Effect.Effect<Navigation, Cause.NoSuchElementException, boolean> &
105
+ export const canGoForward: Effect.Effect<Navigation, never, boolean> &
107
106
  Fx.Fx<Navigation, never, boolean> = Object.assign(
108
107
  Navigation.withEffect((n) => n.canGoForward),
109
108
  Navigation.withFx((n) => n.canGoForward),
@@ -188,5 +187,6 @@ export interface OnNavigationOptions {
188
187
  readonly passive?: boolean
189
188
  }
190
189
 
191
- export const getCurrentUrl: Effect.Effect<Navigation, Cause.NoSuchElementException, URL> =
192
- Navigation.withEffect((n) => n.currentEntry.map((d) => d.url))
190
+ export const getCurrentUrl: Effect.Effect<Navigation, never, URL> = Navigation.withEffect((n) =>
191
+ n.currentEntry.map((d) => d.url),
192
+ )