@typed/svelte 1.0.0-beta.8 → 1.0.0-beta.9

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/dist/Router.d.ts CHANGED
@@ -11,11 +11,11 @@ import { type SourceOptions } from "./Reactive.js";
11
11
  import { type RuntimeSource, type Runtime } from "./Runtime.js";
12
12
  /** Follows committed entries from browser, server memory, or test Navigation. */
13
13
  export declare function useLocation<ER = never>(options?: SourceOptions<Destination, never, Navigation, ER>): import("./AsyncData.js").AsyncState<{
14
+ readonly id: string;
15
+ readonly key: string;
14
16
  readonly url: URL;
15
17
  readonly state: unknown;
16
18
  readonly sameDocument: boolean;
17
- readonly id: string;
18
- readonly key: string;
19
19
  }, ER>;
20
20
  /** Follows the canonical pathname plus query used by Typed's Matcher. */
21
21
  export declare function useCurrentPath<ER = never>(options?: SourceOptions<string, never, Navigation, ER>): import("./AsyncData.js").AsyncState<string, ER>;
@@ -27,27 +27,27 @@ export declare function useCurrentRoute<ER = never>(options?: SourceOptions<Curr
27
27
  */
28
28
  export declare function useNavigation<ER = never>(options?: SourceOptions<Destination, never, Navigation, ER>): {
29
29
  location: import("./AsyncData.js").AsyncState<{
30
+ readonly id: string;
31
+ readonly key: string;
30
32
  readonly url: URL;
31
33
  readonly state: unknown;
32
34
  readonly sameDocument: boolean;
33
- readonly id: string;
34
- readonly key: string;
35
35
  }, ER>;
36
36
  entries: import("./AsyncData.js").AsyncState<readonly {
37
+ readonly id: string;
38
+ readonly key: string;
37
39
  readonly url: URL;
38
40
  readonly state: unknown;
39
41
  readonly sameDocument: boolean;
40
- readonly id: string;
41
- readonly key: string;
42
42
  }[], ER>;
43
43
  transition: import("./AsyncData.js").AsyncState<Option.Option<{
44
- readonly type: "push" | "reload" | "replace" | "traverse";
44
+ readonly type: "push" | "replace" | "reload" | "traverse";
45
45
  readonly from: {
46
+ readonly id: string;
47
+ readonly key: string;
46
48
  readonly url: URL;
47
49
  readonly state: unknown;
48
50
  readonly sameDocument: boolean;
49
- readonly id: string;
50
- readonly key: string;
51
51
  };
52
52
  readonly to: {
53
53
  readonly url: URL;
@@ -59,26 +59,26 @@ export declare function useNavigation<ER = never>(options?: SourceOptions<Destin
59
59
  }>, ER>;
60
60
  canGoBack: import("./AsyncData.js").AsyncState<boolean, ER>;
61
61
  canGoForward: import("./AsyncData.js").AsyncState<boolean, ER>;
62
- navigate: (...args: Parameters<typeof Navigation.navigate>) => Promise<{
62
+ navigate: (url: string | URL, options?: import("@typed/navigation/Navigation").NavigationNavigateOptions | undefined) => Promise<{
63
+ readonly id: string;
64
+ readonly key: string;
63
65
  readonly url: URL;
64
66
  readonly state: unknown;
65
67
  readonly sameDocument: boolean;
68
+ }>;
69
+ back: (options?: import("@typed/navigation/Navigation").NavigationInfoOptions | undefined) => Promise<{
66
70
  readonly id: string;
67
71
  readonly key: string;
68
- }>;
69
- back: (...args: Parameters<typeof Navigation.back>) => Promise<{
70
72
  readonly url: URL;
71
73
  readonly state: unknown;
72
74
  readonly sameDocument: boolean;
75
+ }>;
76
+ forward: (options?: import("@typed/navigation/Navigation").NavigationInfoOptions | undefined) => Promise<{
73
77
  readonly id: string;
74
78
  readonly key: string;
75
- }>;
76
- forward: (...args: Parameters<typeof Navigation.forward>) => Promise<{
77
79
  readonly url: URL;
78
80
  readonly state: unknown;
79
81
  readonly sameDocument: boolean;
80
- readonly id: string;
81
- readonly key: string;
82
82
  }>;
83
83
  };
84
84
  /** Options for matching one route through Typed's native matcher. */
@@ -91,7 +91,7 @@ export interface RouteOptions<Rt extends Route.Route.Any, ER = never> extends So
91
91
  * the ambient mount yields None. An explicit root confines the wildcard to that
92
92
  * root, so paths outside it retain the native RouteNotFound failure.
93
93
  */
94
- export declare function useRoute<Rt extends Route.Route.Any, ER = never>(route: Rt, options?: RouteOptions<Rt, ER>): import("./AsyncData.js").AsyncState<Option.Option<Route.Route.Type<Rt>>, ER | Matcher.RouteDecodeError | Matcher.RouteGuardError | Matcher.RouteNotFound>;
94
+ export declare function useRoute<Rt extends Route.Route.Any, ER = never>(route: Rt, options?: RouteOptions<Rt, ER>): import("./AsyncData.js").AsyncState<Option.Option<Route.Route.Type<Rt>>, Matcher.RouteNotFound | Matcher.RouteDecodeError | Matcher.RouteGuardError | ER>;
95
95
  /**
96
96
  * Extends the structural CurrentRoute for descendants, including nested Typed
97
97
  * content. Pass the full mount route, as with CurrentRoute.extend.
@@ -1 +1 @@
1
- {"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../src/Router.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAe,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,qBAAqB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,OAAO,EACb,MAAM,cAAc,CAAC;AAEtB,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,EAAE,GAAG,KAAK,EACpC,OAAO,GAAE,aAAa,CAAC,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAM;;;;;;OAGhE;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,EAAE,GAAG,KAAK,EACvC,OAAO,GAAE,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAM,mDA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EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,EACtB,OAAO,GAAE,aAAa,CAAC,CAAC,EAAE,EAAE,CAAuB,GAClD,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAG,YAAY,EAAE,EAAE,CAAC,CAAC,CAsBzC"}
package/dist/Store.d.ts CHANGED
@@ -9,7 +9,7 @@ import type { Readable } from "svelte/store";
9
9
  */
10
10
  export declare const toReadable: <A, R>(source: Fx.Fx<A, never, R>, initial: A) => Effect.Effect<{
11
11
  subscribe: (this: void, run: import("svelte/store").Subscriber<A>, invalidate?: () => void) => import("svelte/store").Unsubscriber;
12
- }, never, R | import("effect/Scope").Scope>;
12
+ }, never, import("effect/Scope").Scope | R>;
13
13
  /** Converts a Svelte readable into an Fx, unsubscribing on interruption. */
14
14
  export declare function fromReadable<A>(store: Readable<A>): Fx.Fx<A>;
15
15
  /**
@@ -22,5 +22,5 @@ export declare const toWritable: <A, R>(ref: RefSubject.RefSubject<A, never, R>)
22
22
  subscribe: (this: void, run: import("svelte/store").Subscriber<A>, invalidate?: () => void) => import("svelte/store").Unsubscriber;
23
23
  set: (value: A) => void;
24
24
  update: (f: (value: A) => A) => void;
25
- }, never, R | import("effect/Scope").Scope>;
25
+ }, never, import("effect/Scope").Scope | R>;
26
26
  //# sourceMappingURL=Store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TypedComponent.d.ts","sourceRoot":"","sources":["../src/TypedComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,0EAA0E;AAC1E,OAAO,CAAC,MAAM,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,SAAS,UAAU,CAAC,GAAG,EAAE,EAAE,GAAG,KAAK,EAC9D,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACtD,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,KACrB,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;eAC/B,KAAK"}
1
+ {"version":3,"file":"TypedComponent.d.ts","sourceRoot":"","sources":["../src/TypedComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,0EAA0E;AAC1E,OAAO,CAAC,MAAM,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,SAAS,UAAU,CAAC,GAAG,EAAE,EAAE,GAAG,KAAK,EAC9D,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACtD,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,KACrB,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAC9C,eAAe,KAAK,CAAC"}
@@ -35,7 +35,7 @@ export const mountComponent = Effect.fn(function* (element, component, props, op
35
35
  transformError: options.transformError,
36
36
  recover: options.recover,
37
37
  };
38
- instance = hydrate ? hydrateComponent(Bridge, common) : mount(Bridge, common);
38
+ instance = hydrate ? hydrateComponent((Bridge), common) : mount((Bridge), common);
39
39
  // Publication follows native Typed ref timing; Svelte schedules its own commit.
40
40
  yield* Deferred.succeed(ready, undefined);
41
41
  yield* Effect.promise(tick).pipe(Effect.onExit((exit) => Deferred.done(committed, exit)));
@@ -12,7 +12,7 @@ export const render = Effect.fn(function* (component, props, options) {
12
12
  const output = yield* Effect.promise(async () => {
13
13
  const { render } = await import("svelte/server");
14
14
  const values = readable(initial.value);
15
- return await render(Bridge, {
15
+ return await render((Bridge), {
16
16
  props: { component, values },
17
17
  context: new Map([...runtimeContext(fromContext(services)), ...(options.context ?? [])]),
18
18
  idPrefix: options.idPrefix ?? options.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typed/svelte",
3
- "version": "1.0.0-beta.8",
3
+ "version": "1.0.0-beta.9",
4
4
  "description": "Bidirectional Svelte integration for Typed templates.",
5
5
  "homepage": "https://github.com/TylorS/typed/tree/development/packages/svelte#readme",
6
6
  "bugs": "https://github.com/TylorS/typed/issues",
@@ -66,12 +66,12 @@
66
66
  "access": "public"
67
67
  },
68
68
  "dependencies": {
69
- "@typed/async-data": "1.0.0-beta.8",
70
- "@typed/fx": "2.0.0-beta.8",
71
- "@typed/id": "1.0.0-beta.8",
72
- "@typed/navigation": "1.0.0-beta.8",
73
- "@typed/router": "1.0.0-beta.8",
74
- "@typed/template": "1.0.0-beta.8",
69
+ "@typed/async-data": "1.0.0-beta.9",
70
+ "@typed/fx": "2.0.0-beta.9",
71
+ "@typed/id": "1.0.0-beta.9",
72
+ "@typed/navigation": "1.0.0-beta.9",
73
+ "@typed/router": "1.0.0-beta.9",
74
+ "@typed/template": "1.0.0-beta.9",
75
75
  "effect": "4.0.0-rc.112"
76
76
  },
77
77
  "devDependencies": {