@real-router/types 0.23.0 → 0.24.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.
@@ -47,11 +47,11 @@ interface SimpleState<P extends Params = Params> {
47
47
  type TransitionPhase = "deactivating" | "activating";
48
48
  type TransitionReason = "success" | "blocked" | "cancelled" | "error";
49
49
  interface TransitionMeta {
50
- readonly reload?: boolean;
51
- readonly redirected?: boolean;
52
50
  phase: TransitionPhase;
53
- from?: string;
54
51
  reason: TransitionReason;
52
+ reload?: boolean;
53
+ redirected?: boolean;
54
+ from?: string;
55
55
  blocker?: string;
56
56
  segments: {
57
57
  deactivated: string[];
@@ -668,6 +668,7 @@ interface PluginApi {
668
668
  getTree: () => unknown;
669
669
  addInterceptor: <M extends keyof InterceptableMethodMap>(method: M, fn: InterceptorFn<M>) => Unsubscribe;
670
670
  extendRouter: (extensions: Record<string, unknown>) => Unsubscribe;
671
+ getRouteConfig: (name: string) => Record<string, unknown> | undefined;
671
672
  }
672
673
  /**
673
674
  * Routes API — for dynamic route mutation.
@@ -682,7 +683,6 @@ interface RoutesApi<Dependencies extends DefaultDependencies = DefaultDependenci
682
683
  replace: (routes: Route<Dependencies>[] | Route<Dependencies>) => void;
683
684
  has: (name: string) => boolean;
684
685
  get: (name: string) => Route<Dependencies> | undefined;
685
- getConfig: (name: string) => Record<string, unknown> | undefined;
686
686
  }
687
687
  /**
688
688
  * Dependencies API — CRUD for dependency injection.
@@ -1 +1 @@
1
- {"inputs":{"../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js":{"bytes":569,"imports":[],"format":"esm"},"src/index.ts":{"bytes":1392,"imports":[{"path":"/home/runner/work/real-router/real-router/node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/cjs/index.js":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":0}}}
1
+ {"inputs":{"../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js":{"bytes":569,"imports":[],"format":"esm"},"src/index.ts":{"bytes":1392,"imports":[{"path":"/home/runner/work/real-router/real-router/node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/cjs/index.js":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":0}}}
@@ -47,11 +47,11 @@ interface SimpleState<P extends Params = Params> {
47
47
  type TransitionPhase = "deactivating" | "activating";
48
48
  type TransitionReason = "success" | "blocked" | "cancelled" | "error";
49
49
  interface TransitionMeta {
50
- readonly reload?: boolean;
51
- readonly redirected?: boolean;
52
50
  phase: TransitionPhase;
53
- from?: string;
54
51
  reason: TransitionReason;
52
+ reload?: boolean;
53
+ redirected?: boolean;
54
+ from?: string;
55
55
  blocker?: string;
56
56
  segments: {
57
57
  deactivated: string[];
@@ -668,6 +668,7 @@ interface PluginApi {
668
668
  getTree: () => unknown;
669
669
  addInterceptor: <M extends keyof InterceptableMethodMap>(method: M, fn: InterceptorFn<M>) => Unsubscribe;
670
670
  extendRouter: (extensions: Record<string, unknown>) => Unsubscribe;
671
+ getRouteConfig: (name: string) => Record<string, unknown> | undefined;
671
672
  }
672
673
  /**
673
674
  * Routes API — for dynamic route mutation.
@@ -682,7 +683,6 @@ interface RoutesApi<Dependencies extends DefaultDependencies = DefaultDependenci
682
683
  replace: (routes: Route<Dependencies>[] | Route<Dependencies>) => void;
683
684
  has: (name: string) => boolean;
684
685
  get: (name: string) => Route<Dependencies> | undefined;
685
- getConfig: (name: string) => Record<string, unknown> | undefined;
686
686
  }
687
687
  /**
688
688
  * Dependencies API — CRUD for dependency injection.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@real-router/types",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "type": "commonjs",
5
5
  "description": "Shared TypeScript types for Real Router ecosystem",
6
6
  "types": "./dist/esm/index.d.mts",
package/src/api.ts CHANGED
@@ -93,6 +93,8 @@ export interface PluginApi {
93
93
  ) => Unsubscribe;
94
94
 
95
95
  extendRouter: (extensions: Record<string, unknown>) => Unsubscribe;
96
+
97
+ getRouteConfig: (name: string) => Record<string, unknown> | undefined;
96
98
  }
97
99
 
98
100
  /**
@@ -117,8 +119,6 @@ export interface RoutesApi<
117
119
  has: (name: string) => boolean;
118
120
 
119
121
  get: (name: string) => Route<Dependencies> | undefined;
120
-
121
- getConfig: (name: string) => Record<string, unknown> | undefined;
122
122
  }
123
123
 
124
124
  /**
package/src/base.ts CHANGED
@@ -16,11 +16,11 @@ export type TransitionPhase = "deactivating" | "activating";
16
16
  export type TransitionReason = "success" | "blocked" | "cancelled" | "error";
17
17
 
18
18
  export interface TransitionMeta {
19
- readonly reload?: boolean;
20
- readonly redirected?: boolean;
21
19
  phase: TransitionPhase;
22
- from?: string;
23
20
  reason: TransitionReason;
21
+ reload?: boolean;
22
+ redirected?: boolean;
23
+ from?: string;
24
24
  blocker?: string;
25
25
  segments: {
26
26
  deactivated: string[];