@real-router/types 0.2.0 → 0.4.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/dist/cjs/index.d.ts +23 -1
- package/dist/cjs/metafile-cjs.json +1 -1
- package/dist/esm/index.d.mts +23 -1
- package/dist/esm/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -387,6 +387,13 @@ interface Options {
|
|
|
387
387
|
* @default undefined
|
|
388
388
|
*/
|
|
389
389
|
logger?: Partial<LoggerConfig>;
|
|
390
|
+
/**
|
|
391
|
+
* Disables argument validation in public router methods.
|
|
392
|
+
* Use in production for performance. Keep false in development for early error detection.
|
|
393
|
+
*
|
|
394
|
+
* @default false
|
|
395
|
+
*/
|
|
396
|
+
noValidate?: boolean;
|
|
390
397
|
}
|
|
391
398
|
type ActivationFn = (toState: State, fromState: State | undefined, done: DoneFn) => boolean | Promise<boolean | object | void> | State | void;
|
|
392
399
|
type DefaultDependencies = object;
|
|
@@ -420,6 +427,21 @@ interface Listener {
|
|
|
420
427
|
interface Subscription {
|
|
421
428
|
unsubscribe: Unsubscribe;
|
|
422
429
|
}
|
|
430
|
+
/**
|
|
431
|
+
* Navigator interface - a minimal, safe subset of Router methods.
|
|
432
|
+
*
|
|
433
|
+
* Provides only the essential navigation and state inspection methods.
|
|
434
|
+
* Excludes lifecycle methods (start, stop), plugin management, and internal APIs.
|
|
435
|
+
* Use this when you need to pass a limited router interface to components.
|
|
436
|
+
*
|
|
437
|
+
* For full router access, use the Router interface directly or the useRouter() hook.
|
|
438
|
+
*/
|
|
439
|
+
interface Navigator {
|
|
440
|
+
navigate: (routeName: string, routeParamsOrDone?: Params | DoneFn, optionsOrDone?: NavigationOptions | DoneFn, done?: DoneFn) => CancelFn;
|
|
441
|
+
getState: () => State | undefined;
|
|
442
|
+
isActiveRoute: (name: string, params?: Params, strictEquality?: boolean, ignoreQueryParams?: boolean) => boolean;
|
|
443
|
+
subscribe: (listener: SubscribeFn) => Unsubscribe;
|
|
444
|
+
}
|
|
423
445
|
|
|
424
446
|
/**
|
|
425
447
|
* Plugin lifecycle method names
|
|
@@ -478,4 +500,4 @@ interface ErrorCodeToValueMap {
|
|
|
478
500
|
TRANSITION_CANCELLED: "CANCELLED";
|
|
479
501
|
}
|
|
480
502
|
|
|
481
|
-
export type { ActivationFn, CancelFn, Config, DefaultDependencies, DoneFn, ErrorCodeKeys, ErrorCodeToValueMap, ErrorCodeValues, EventName, EventToNameMap, EventToPluginMap, EventsKeys, Listener, Middleware, NavigationOptions, Options, Params, Plugin, PluginMethod, QueryParamsMode, QueryParamsOptions, RouteTreeState, RouterError, SimpleState, State, StateMeta, StateMetaInput, SubscribeFn, SubscribeState, Subscription, Unsubscribe };
|
|
503
|
+
export type { ActivationFn, CancelFn, Config, DefaultDependencies, DoneFn, ErrorCodeKeys, ErrorCodeToValueMap, ErrorCodeValues, EventName, EventToNameMap, EventToPluginMap, EventsKeys, Listener, Middleware, NavigationOptions, Navigator, Options, Params, Plugin, PluginMethod, QueryParamsMode, QueryParamsOptions, RouteTreeState, RouterError, SimpleState, State, StateMeta, StateMetaInput, SubscribeFn, SubscribeState, Subscription, Unsubscribe };
|
|
@@ -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":
|
|
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":1097,"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}}}
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -387,6 +387,13 @@ interface Options {
|
|
|
387
387
|
* @default undefined
|
|
388
388
|
*/
|
|
389
389
|
logger?: Partial<LoggerConfig>;
|
|
390
|
+
/**
|
|
391
|
+
* Disables argument validation in public router methods.
|
|
392
|
+
* Use in production for performance. Keep false in development for early error detection.
|
|
393
|
+
*
|
|
394
|
+
* @default false
|
|
395
|
+
*/
|
|
396
|
+
noValidate?: boolean;
|
|
390
397
|
}
|
|
391
398
|
type ActivationFn = (toState: State, fromState: State | undefined, done: DoneFn) => boolean | Promise<boolean | object | void> | State | void;
|
|
392
399
|
type DefaultDependencies = object;
|
|
@@ -420,6 +427,21 @@ interface Listener {
|
|
|
420
427
|
interface Subscription {
|
|
421
428
|
unsubscribe: Unsubscribe;
|
|
422
429
|
}
|
|
430
|
+
/**
|
|
431
|
+
* Navigator interface - a minimal, safe subset of Router methods.
|
|
432
|
+
*
|
|
433
|
+
* Provides only the essential navigation and state inspection methods.
|
|
434
|
+
* Excludes lifecycle methods (start, stop), plugin management, and internal APIs.
|
|
435
|
+
* Use this when you need to pass a limited router interface to components.
|
|
436
|
+
*
|
|
437
|
+
* For full router access, use the Router interface directly or the useRouter() hook.
|
|
438
|
+
*/
|
|
439
|
+
interface Navigator {
|
|
440
|
+
navigate: (routeName: string, routeParamsOrDone?: Params | DoneFn, optionsOrDone?: NavigationOptions | DoneFn, done?: DoneFn) => CancelFn;
|
|
441
|
+
getState: () => State | undefined;
|
|
442
|
+
isActiveRoute: (name: string, params?: Params, strictEquality?: boolean, ignoreQueryParams?: boolean) => boolean;
|
|
443
|
+
subscribe: (listener: SubscribeFn) => Unsubscribe;
|
|
444
|
+
}
|
|
423
445
|
|
|
424
446
|
/**
|
|
425
447
|
* Plugin lifecycle method names
|
|
@@ -478,4 +500,4 @@ interface ErrorCodeToValueMap {
|
|
|
478
500
|
TRANSITION_CANCELLED: "CANCELLED";
|
|
479
501
|
}
|
|
480
502
|
|
|
481
|
-
export type { ActivationFn, CancelFn, Config, DefaultDependencies, DoneFn, ErrorCodeKeys, ErrorCodeToValueMap, ErrorCodeValues, EventName, EventToNameMap, EventToPluginMap, EventsKeys, Listener, Middleware, NavigationOptions, Options, Params, Plugin, PluginMethod, QueryParamsMode, QueryParamsOptions, RouteTreeState, RouterError, SimpleState, State, StateMeta, StateMetaInput, SubscribeFn, SubscribeState, Subscription, Unsubscribe };
|
|
503
|
+
export type { ActivationFn, CancelFn, Config, DefaultDependencies, DoneFn, ErrorCodeKeys, ErrorCodeToValueMap, ErrorCodeValues, EventName, EventToNameMap, EventToPluginMap, EventsKeys, Listener, Middleware, NavigationOptions, Navigator, Options, Params, Plugin, PluginMethod, QueryParamsMode, QueryParamsOptions, RouteTreeState, RouterError, SimpleState, State, StateMeta, StateMetaInput, SubscribeFn, SubscribeState, Subscription, Unsubscribe };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/index.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/index.ts":{"bytes":1097,"imports":[],"format":"esm"}},"outputs":{"dist/esm/index.mjs":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":0}}}
|