@real-router/core 0.126.4 → 0.126.6
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/Router-ChxUQY0x.js +2 -0
- package/dist/cjs/Router-ChxUQY0x.js.map +1 -0
- package/dist/cjs/Router.d.ts +1 -2
- package/dist/cjs/Router.d.ts.map +1 -1
- package/dist/cjs/RouterError-DCVsSNgX.js.map +1 -1
- package/dist/cjs/RouterError.d.ts +9 -5
- package/dist/cjs/RouterError.d.ts.map +1 -1
- package/dist/cjs/api/cloneRouter.d.ts +2 -3
- package/dist/cjs/api/cloneRouter.d.ts.map +1 -1
- package/dist/cjs/api/getDependenciesApi.d.ts +1 -2
- package/dist/cjs/api/getDependenciesApi.d.ts.map +1 -1
- package/dist/cjs/api/getLifecycleApi.d.ts +1 -2
- package/dist/cjs/api/getLifecycleApi.d.ts.map +1 -1
- package/dist/cjs/api/getPluginApi.d.ts +1 -2
- package/dist/cjs/api/getPluginApi.d.ts.map +1 -1
- package/dist/cjs/api/getRoutesApi.d.ts +1 -2
- package/dist/cjs/api/getRoutesApi.d.ts.map +1 -1
- package/dist/cjs/api/types.d.ts +2 -2
- package/dist/cjs/api/types.d.ts.map +1 -1
- package/dist/cjs/api.js +1 -1
- package/dist/cjs/api.js.map +1 -1
- package/dist/cjs/constants.d.ts +7 -8
- package/dist/cjs/constants.d.ts.map +1 -1
- package/dist/cjs/createRouter.d.ts +1 -2
- package/dist/cjs/createRouter.d.ts.map +1 -1
- package/dist/cjs/engine/builder/types.d.ts +2 -3
- package/dist/cjs/engine/builder/types.d.ts.map +1 -1
- package/dist/cjs/engine/createMatcher.d.ts +4 -5
- package/dist/cjs/engine/createMatcher.d.ts.map +1 -1
- package/dist/cjs/engine/path-matcher/SegmentMatcher.d.ts +1 -2
- package/dist/cjs/engine/path-matcher/SegmentMatcher.d.ts.map +1 -1
- package/dist/cjs/engine/path-matcher/types.d.ts +7 -8
- package/dist/cjs/engine/path-matcher/types.d.ts.map +1 -1
- package/dist/cjs/engine/search-params/types.d.ts +5 -6
- package/dist/cjs/engine/search-params/types.d.ts.map +1 -1
- package/dist/cjs/engine/validation/route-batch.d.ts +1 -2
- package/dist/cjs/engine/validation/route-batch.d.ts.map +1 -1
- package/dist/cjs/getNavigator.d.ts +1 -2
- package/dist/cjs/getNavigator.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internals-BGTllfGV.js.map +1 -1
- package/dist/cjs/internals.d.ts +2 -3
- package/dist/cjs/internals.d.ts.map +1 -1
- package/dist/cjs/namespaces/DependenciesNamespace/dependenciesStore.d.ts +1 -2
- package/dist/cjs/namespaces/DependenciesNamespace/dependenciesStore.d.ts.map +1 -1
- package/dist/cjs/namespaces/RouteLifecycleNamespace/RouteLifecycleNamespace.d.ts +2 -3
- package/dist/cjs/namespaces/RouteLifecycleNamespace/RouteLifecycleNamespace.d.ts.map +1 -1
- package/dist/cjs/namespaces/RouteLifecycleNamespace/types.d.ts +1 -2
- package/dist/cjs/namespaces/RouteLifecycleNamespace/types.d.ts.map +1 -1
- package/dist/cjs/namespaces/RoutesNamespace/forwardChain.d.ts +1 -2
- package/dist/cjs/namespaces/RoutesNamespace/forwardChain.d.ts.map +1 -1
- package/dist/cjs/namespaces/RoutesNamespace/routesStore.d.ts +1 -2
- package/dist/cjs/namespaces/RoutesNamespace/routesStore.d.ts.map +1 -1
- package/dist/cjs/namespaces/RoutesNamespace/types.d.ts +2 -3
- package/dist/cjs/namespaces/RoutesNamespace/types.d.ts.map +1 -1
- package/dist/cjs/pipeline/port.d.ts +1 -2
- package/dist/cjs/pipeline/port.d.ts.map +1 -1
- package/dist/cjs/types/RouterValidator.d.ts +1 -2
- package/dist/cjs/types/RouterValidator.d.ts.map +1 -1
- package/dist/cjs/types/api.d.ts +7 -8
- package/dist/cjs/types/api.d.ts.map +1 -1
- package/dist/cjs/types/base.d.ts +14 -15
- package/dist/cjs/types/base.d.ts.map +1 -1
- package/dist/cjs/types/constants.d.ts +9 -10
- package/dist/cjs/types/constants.d.ts.map +1 -1
- package/dist/cjs/types/internal.d.ts +1 -2
- package/dist/cjs/types/internal.d.ts.map +1 -1
- package/dist/cjs/types/limits.d.ts +1 -2
- package/dist/cjs/types/limits.d.ts.map +1 -1
- package/dist/cjs/types/route-node-types.d.ts +4 -5
- package/dist/cjs/types/route-node-types.d.ts.map +1 -1
- package/dist/cjs/types/router.d.ts +27 -28
- package/dist/cjs/types/router.d.ts.map +1 -1
- package/dist/cjs/types/tree-changed.d.ts +7 -8
- package/dist/cjs/types/tree-changed.d.ts.map +1 -1
- package/dist/cjs/types.d.ts +3 -3
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/utils/ingest.d.ts +2 -3
- package/dist/cjs/utils/ingest.d.ts.map +1 -1
- package/dist/esm/Router-BcMc2U5f.mjs +2 -0
- package/dist/esm/Router-BcMc2U5f.mjs.map +1 -0
- package/dist/esm/Router.d.mts +1 -2
- package/dist/esm/Router.d.mts.map +1 -1
- package/dist/esm/RouterError-iSQqAez7.mjs.map +1 -1
- package/dist/esm/RouterError.d.mts +9 -5
- package/dist/esm/RouterError.d.mts.map +1 -1
- package/dist/esm/api/cloneRouter.d.mts +2 -3
- package/dist/esm/api/cloneRouter.d.mts.map +1 -1
- package/dist/esm/api/getDependenciesApi.d.mts +1 -2
- package/dist/esm/api/getDependenciesApi.d.mts.map +1 -1
- package/dist/esm/api/getLifecycleApi.d.mts +1 -2
- package/dist/esm/api/getLifecycleApi.d.mts.map +1 -1
- package/dist/esm/api/getPluginApi.d.mts +1 -2
- package/dist/esm/api/getPluginApi.d.mts.map +1 -1
- package/dist/esm/api/getRoutesApi.d.mts +1 -2
- package/dist/esm/api/getRoutesApi.d.mts.map +1 -1
- package/dist/esm/api/types.d.mts +2 -2
- package/dist/esm/api/types.d.mts.map +1 -1
- package/dist/esm/api.mjs +1 -1
- package/dist/esm/api.mjs.map +1 -1
- package/dist/esm/constants.d.mts +7 -8
- package/dist/esm/constants.d.mts.map +1 -1
- package/dist/esm/createRouter.d.mts +1 -2
- package/dist/esm/createRouter.d.mts.map +1 -1
- package/dist/esm/engine/builder/types.d.mts +2 -3
- package/dist/esm/engine/builder/types.d.mts.map +1 -1
- package/dist/esm/engine/createMatcher.d.mts +4 -5
- package/dist/esm/engine/createMatcher.d.mts.map +1 -1
- package/dist/esm/engine/path-matcher/SegmentMatcher.d.mts +1 -2
- package/dist/esm/engine/path-matcher/SegmentMatcher.d.mts.map +1 -1
- package/dist/esm/engine/path-matcher/types.d.mts +7 -8
- package/dist/esm/engine/path-matcher/types.d.mts.map +1 -1
- package/dist/esm/engine/search-params/types.d.mts +5 -6
- package/dist/esm/engine/search-params/types.d.mts.map +1 -1
- package/dist/esm/engine/validation/route-batch.d.mts +1 -2
- package/dist/esm/engine/validation/route-batch.d.mts.map +1 -1
- package/dist/esm/getNavigator.d.mts +1 -2
- package/dist/esm/getNavigator.d.mts.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internals-CcqRqpm9.mjs.map +1 -1
- package/dist/esm/internals.d.mts +2 -3
- package/dist/esm/internals.d.mts.map +1 -1
- package/dist/esm/namespaces/DependenciesNamespace/dependenciesStore.d.mts +1 -2
- package/dist/esm/namespaces/DependenciesNamespace/dependenciesStore.d.mts.map +1 -1
- package/dist/esm/namespaces/RouteLifecycleNamespace/RouteLifecycleNamespace.d.mts +2 -3
- package/dist/esm/namespaces/RouteLifecycleNamespace/RouteLifecycleNamespace.d.mts.map +1 -1
- package/dist/esm/namespaces/RouteLifecycleNamespace/types.d.mts +1 -2
- package/dist/esm/namespaces/RouteLifecycleNamespace/types.d.mts.map +1 -1
- package/dist/esm/namespaces/RoutesNamespace/forwardChain.d.mts +1 -2
- package/dist/esm/namespaces/RoutesNamespace/forwardChain.d.mts.map +1 -1
- package/dist/esm/namespaces/RoutesNamespace/routesStore.d.mts +1 -2
- package/dist/esm/namespaces/RoutesNamespace/routesStore.d.mts.map +1 -1
- package/dist/esm/namespaces/RoutesNamespace/types.d.mts +2 -3
- package/dist/esm/namespaces/RoutesNamespace/types.d.mts.map +1 -1
- package/dist/esm/pipeline/port.d.mts +1 -2
- package/dist/esm/pipeline/port.d.mts.map +1 -1
- package/dist/esm/types/RouterValidator.d.mts +1 -2
- package/dist/esm/types/RouterValidator.d.mts.map +1 -1
- package/dist/esm/types/api.d.mts +7 -8
- package/dist/esm/types/api.d.mts.map +1 -1
- package/dist/esm/types/base.d.mts +14 -15
- package/dist/esm/types/base.d.mts.map +1 -1
- package/dist/esm/types/constants.d.mts +9 -10
- package/dist/esm/types/constants.d.mts.map +1 -1
- package/dist/esm/types/internal.d.mts +1 -2
- package/dist/esm/types/internal.d.mts.map +1 -1
- package/dist/esm/types/limits.d.mts +1 -2
- package/dist/esm/types/limits.d.mts.map +1 -1
- package/dist/esm/types/route-node-types.d.mts +4 -5
- package/dist/esm/types/route-node-types.d.mts.map +1 -1
- package/dist/esm/types/router.d.mts +27 -28
- package/dist/esm/types/router.d.mts.map +1 -1
- package/dist/esm/types/tree-changed.d.mts +7 -8
- package/dist/esm/types/tree-changed.d.mts.map +1 -1
- package/dist/esm/types.d.mts +3 -3
- package/dist/esm/types.d.mts.map +1 -1
- package/dist/esm/utils/ingest.d.mts +2 -3
- package/dist/esm/utils/ingest.d.mts.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/Router-Bndi5Jnt.js +0 -2
- package/dist/cjs/Router-Bndi5Jnt.js.map +0 -1
- package/dist/esm/Router-DsAOMUDq.mjs +0 -2
- package/dist/esm/Router-DsAOMUDq.mjs.map +0 -1
package/dist/cjs/constants.d.ts
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { ErrorCodeKeys, ErrorCodeToValueMap, ErrorCodeValues, EventToNameMap } from "./types/constants.js";
|
|
2
2
|
//#region src/constants.d.ts
|
|
3
|
-
type ConstantsKeys = "UNKNOWN_ROUTE";
|
|
4
|
-
type Constants = Readonly<Record<ConstantsKeys, string>>;
|
|
5
|
-
type ErrorCodes = Record<ErrorCodeKeys, ErrorCodeValues>;
|
|
3
|
+
export type ConstantsKeys = "UNKNOWN_ROUTE";
|
|
4
|
+
export type Constants = Readonly<Record<ConstantsKeys, string>>;
|
|
5
|
+
export type ErrorCodes = Record<ErrorCodeKeys, ErrorCodeValues>;
|
|
6
6
|
/**
|
|
7
7
|
* Error codes for router operations.
|
|
8
8
|
* Used to identify specific failure scenarios in navigation and lifecycle.
|
|
9
9
|
* Frozen to prevent accidental modifications.
|
|
10
10
|
*/
|
|
11
|
-
declare const errorCodes: ErrorCodeToValueMap;
|
|
11
|
+
export declare const errorCodes: ErrorCodeToValueMap;
|
|
12
12
|
/**
|
|
13
13
|
* General router constants.
|
|
14
14
|
* Special route names and identifiers.
|
|
15
15
|
*/
|
|
16
|
-
declare const UNKNOWN_ROUTE = "@@router/UNKNOWN_ROUTE";
|
|
17
|
-
declare const constants: Constants;
|
|
16
|
+
export declare const UNKNOWN_ROUTE = "@@router/UNKNOWN_ROUTE";
|
|
17
|
+
export declare const constants: Constants;
|
|
18
18
|
/**
|
|
19
19
|
* Event names for router event system.
|
|
20
20
|
* Used with addEventListener/removeEventListener for reactive subscriptions.
|
|
21
21
|
*/
|
|
22
|
-
declare const events: EventToNameMap;
|
|
22
|
+
export declare const events: EventToNameMap;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { Constants, ConstantsKeys, ErrorCodes, UNKNOWN_ROUTE, constants, errorCodes, events };
|
|
25
24
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../src/constants.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../src/constants.ts"],"mappings":";;YAWY;YAEA,YAAY,SAAS,OAAO;YAM5B,aAAa,OAAO,eAAe;;;;;;qBAOlC,YAAY;;;;;qBAuBZ;qBA2BA,WAAW;;;;;qBAsBX,QAAQ"}
|
|
@@ -17,7 +17,6 @@ import { Router } from "./Router.js";
|
|
|
17
17
|
*
|
|
18
18
|
* router.start('/');
|
|
19
19
|
*/
|
|
20
|
-
declare const createRouter: <Dependencies extends DefaultDependencies = DefaultDependencies>(routes?: Route<Dependencies>[], options?: Partial<Options<Dependencies>>, dependencies?: Dependencies) => Router<Dependencies>;
|
|
20
|
+
export declare const createRouter: <Dependencies extends DefaultDependencies = DefaultDependencies>(routes?: Route<Dependencies>[], options?: Partial<Options<Dependencies>>, dependencies?: Dependencies) => Router<Dependencies>;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { createRouter };
|
|
23
22
|
//# sourceMappingURL=createRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRouter.d.ts","names":[],"sources":["../../src/createRouter.ts"],"mappings":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"createRouter.d.ts","names":[],"sources":["../../src/createRouter.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAsBa,eACX,qBAAqB,sBAAsB,qBAE3C,SAAQ,MAAM,iBACd,UAAS,QAAQ,QAAQ,gBACzB,eAAc,iBACb,OAAO"}
|
|
@@ -3,7 +3,7 @@ import { ParamMeta } from "../path-matcher/types.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Definition of a route for configuration.
|
|
5
5
|
*/
|
|
6
|
-
interface RouteDefinition {
|
|
6
|
+
export interface RouteDefinition {
|
|
7
7
|
[key: string]: unknown;
|
|
8
8
|
name: string;
|
|
9
9
|
path: string;
|
|
@@ -19,7 +19,7 @@ interface RouteDefinition {
|
|
|
19
19
|
* - nonAbsoluteChildren: filtered children without absolute paths
|
|
20
20
|
* - fullName: pre-computed "users.profile" instead of runtime join
|
|
21
21
|
*/
|
|
22
|
-
interface RouteTree {
|
|
22
|
+
export interface RouteTree {
|
|
23
23
|
/** Route segment name (e.g., "users" in "users.profile") */
|
|
24
24
|
readonly name: string;
|
|
25
25
|
/** Route path pattern (e.g., "/users/:id") */
|
|
@@ -44,5 +44,4 @@ interface RouteTree {
|
|
|
44
44
|
readonly paramTypeMap: Readonly<Record<string, "url" | "query">>;
|
|
45
45
|
}
|
|
46
46
|
//#endregion
|
|
47
|
-
export { RouteDefinition, RouteTree };
|
|
48
47
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/engine/builder/types.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/engine/builder/types.ts"],"mappings":";;;;;iBAiBiB;GACd;EACD;EACA;EACA,WAAW;;;;;;;;;;;;iBAiBI;;WAIN;;WAGA;;WAGA;;WAGA,UAAU,oBAAoB;;WAG9B,WAAW;;WAKX,QAAQ;;WAGR,8BAA8B;;WAG9B;;;;;;WAOA,cAAc,SAAS"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Options } from "./search-params/types.js";
|
|
2
1
|
import { SegmentMatcher } from "./path-matcher/SegmentMatcher.js";
|
|
2
|
+
import { Options } from "./search-params/types.js";
|
|
3
3
|
//#region src/engine/createMatcher.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Query string formatting options.
|
|
6
6
|
*
|
|
7
7
|
* Controls how arrays, booleans, nulls, and numbers are serialized in query strings.
|
|
8
8
|
*/
|
|
9
|
-
type QueryParamsConfig = Readonly<Options>;
|
|
9
|
+
export type QueryParamsConfig = Readonly<Options>;
|
|
10
10
|
/**
|
|
11
11
|
* Options for creating a path matcher.
|
|
12
12
|
*/
|
|
13
|
-
interface CreateMatcherOptions {
|
|
13
|
+
export interface CreateMatcherOptions {
|
|
14
14
|
readonly caseSensitive?: boolean;
|
|
15
15
|
readonly strictTrailingSlash?: boolean;
|
|
16
16
|
readonly strictQueryParams?: boolean;
|
|
@@ -23,7 +23,6 @@ interface CreateMatcherOptions {
|
|
|
23
23
|
* Opaque type — consumers use methods (match, buildPath, hasRoute, etc.)
|
|
24
24
|
* without knowing the underlying SegmentMatcher implementation.
|
|
25
25
|
*/
|
|
26
|
-
type Matcher = SegmentMatcher;
|
|
26
|
+
export type Matcher = SegmentMatcher;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { CreateMatcherOptions, Matcher, QueryParamsConfig };
|
|
29
28
|
//# sourceMappingURL=createMatcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMatcher.d.ts","names":[],"sources":["../../../src/engine/createMatcher.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"createMatcher.d.ts","names":[],"sources":["../../../src/engine/createMatcher.ts"],"mappings":";;;;;;;;YAwBY,oBAAoB,SAAS;;;;iBAKxB;WACN;WACA;WACA;WACA;WACA,cAAc;;;;;;;;YASb,UAAU"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BuildPathOptions, MatchResult, MatcherInputNode, ResolvedMatcherOptions, SegmentMatcherOptions } from "./types.js";
|
|
2
2
|
//#region src/engine/path-matcher/SegmentMatcher.d.ts
|
|
3
|
-
declare class SegmentMatcher {
|
|
3
|
+
export declare class SegmentMatcher {
|
|
4
4
|
#private;
|
|
5
5
|
get options(): ResolvedMatcherOptions;
|
|
6
6
|
constructor(options: SegmentMatcherOptions);
|
|
@@ -25,5 +25,4 @@ declare class SegmentMatcher {
|
|
|
25
25
|
hasRoute(name: string): boolean;
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
|
-
export { SegmentMatcher };
|
|
29
28
|
//# sourceMappingURL=SegmentMatcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentMatcher.d.ts","names":[],"sources":["../../../../src/engine/path-matcher/SegmentMatcher.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"SegmentMatcher.d.ts","names":[],"sources":["../../../../src/engine/path-matcher/SegmentMatcher.ts"],"mappings":";;qBAsLa;;MACP,WAAW;EA2BH,YAAA,SAAS;EAoFrB,aAAa,MAAM;EAkBnB,MAAM,eAAe;EAqDrB,UACE,cACA,SAAS,yBACT,SAAS,yBACT,UAAU;EA4BZ,kBAAkB,wBAAwB;EAO1C,cACE,eACC,SAAS,eAAe;;;;;;;;;;;;;EAgB3B,uBAAuB;EAIvB,SAAS"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
/**
|
|
10
10
|
* Parameter metadata extracted from a route path pattern.
|
|
11
11
|
*/
|
|
12
|
-
interface ParamMeta {
|
|
12
|
+
export interface ParamMeta {
|
|
13
13
|
/**
|
|
14
14
|
* URL parameter names extracted from the path pattern.
|
|
15
15
|
*
|
|
@@ -43,8 +43,8 @@ interface ParamMeta {
|
|
|
43
43
|
* - `uriComponent` - encodeURIComponent/decodeURIComponent
|
|
44
44
|
* - `none` - no encoding/decoding
|
|
45
45
|
*/
|
|
46
|
-
type URLParamsEncodingType = "default" | "uri" | "uriComponent" | "none";
|
|
47
|
-
interface MatcherInputNode {
|
|
46
|
+
export type URLParamsEncodingType = "default" | "uri" | "uriComponent" | "none";
|
|
47
|
+
export interface MatcherInputNode {
|
|
48
48
|
readonly name: string;
|
|
49
49
|
readonly path: string;
|
|
50
50
|
readonly fullName: string;
|
|
@@ -57,11 +57,11 @@ interface MatcherInputNode {
|
|
|
57
57
|
/**
|
|
58
58
|
* Per-call options for buildPath.
|
|
59
59
|
*/
|
|
60
|
-
interface BuildPathOptions {
|
|
60
|
+
export interface BuildPathOptions {
|
|
61
61
|
readonly queryParamsMode?: "default" | "strict" | "loose" | undefined;
|
|
62
62
|
readonly trailingSlash?: "default" | "always" | "never" | "strict" | undefined;
|
|
63
63
|
}
|
|
64
|
-
interface MatchResult {
|
|
64
|
+
export interface MatchResult {
|
|
65
65
|
readonly segments: readonly MatcherInputNode[];
|
|
66
66
|
/** PATH params (query still folded in for A2 back-compat, RFC-4 M2 / #1548). */
|
|
67
67
|
readonly params: Readonly<Record<string, unknown>>;
|
|
@@ -69,7 +69,7 @@ interface MatchResult {
|
|
|
69
69
|
readonly search: Readonly<Record<string, unknown>>;
|
|
70
70
|
readonly meta: Readonly<Record<string, Record<string, "url" | "query">>>;
|
|
71
71
|
}
|
|
72
|
-
interface SegmentMatcherOptions {
|
|
72
|
+
export interface SegmentMatcherOptions {
|
|
73
73
|
caseSensitive?: boolean;
|
|
74
74
|
strictTrailingSlash?: boolean;
|
|
75
75
|
strictQueryParams?: boolean;
|
|
@@ -77,7 +77,7 @@ interface SegmentMatcherOptions {
|
|
|
77
77
|
parseQueryString: (queryString: string) => Record<string, unknown>;
|
|
78
78
|
buildQueryString: (params: Record<string, unknown>) => string;
|
|
79
79
|
}
|
|
80
|
-
interface ResolvedMatcherOptions {
|
|
80
|
+
export interface ResolvedMatcherOptions {
|
|
81
81
|
readonly caseSensitive: boolean;
|
|
82
82
|
readonly strictTrailingSlash: boolean;
|
|
83
83
|
readonly strictQueryParams: boolean;
|
|
@@ -86,5 +86,4 @@ interface ResolvedMatcherOptions {
|
|
|
86
86
|
readonly buildQueryString: (params: Record<string, unknown>) => string;
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
|
-
export { BuildPathOptions, MatchResult, MatcherInputNode, ParamMeta, ResolvedMatcherOptions, SegmentMatcherOptions, URLParamsEncodingType };
|
|
90
89
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/engine/path-matcher/types.ts"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/engine/path-matcher/types.ts"],"mappings":";;;;;;;;;;;iBAWiB;;;;;;WAMN;;;;;;WAOA;;;;;;WAOA,cAAc,SAAS;;;;;;WAOvB;;;;;;;;;;YAeC;iBAMK;WACN;WACA;WACA;WACA;WACA,UAAU,oBAAoB;WAC9B,8BAA8B;WAC9B,WAAW;WACX,cAAc,SAAS;;;;;iBAqCjB;WACN;WACA;;iBA2BM;WACN,mBAAmB;;WAEnB,QAAQ,SAAS;;WAEjB,QAAQ,SAAS;WACjB,MAAM,SAAS,eAAe;;iBAOxB;EACf;EACA;EACA;EACA,oBAAoB;EACpB,mBAAmB,wBAAwB;EAC3C,mBAAmB,QAAQ;;iBAGZ;WACN;WACA;WACA;WACA,mBAAmB;WACnB,mBAAmB,wBAAwB;WAC3C,mBAAmB,QAAQ"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* - `index` - indexed notation: `a[0]=1&a[1]=2`
|
|
16
16
|
* - `comma` - comma-separated: `a=1,2`
|
|
17
17
|
*/
|
|
18
|
-
type ArrayFormat = "none" | "brackets" | "index" | "comma";
|
|
18
|
+
export type ArrayFormat = "none" | "brackets" | "index" | "comma";
|
|
19
19
|
/**
|
|
20
20
|
* Boolean parameter encoding format.
|
|
21
21
|
*
|
|
@@ -31,7 +31,7 @@ type ArrayFormat = "none" | "brackets" | "index" | "comma";
|
|
|
31
31
|
* and true collapse to the same token and only `true` decodes back. Pair
|
|
32
32
|
* `empty-true` with `nullFormat: "hidden"`, or avoid null query values.
|
|
33
33
|
*/
|
|
34
|
-
type BooleanFormat = "none" | "auto" | "empty-true";
|
|
34
|
+
export type BooleanFormat = "none" | "auto" | "empty-true";
|
|
35
35
|
/**
|
|
36
36
|
* Null parameter encoding format.
|
|
37
37
|
*
|
|
@@ -40,7 +40,7 @@ type BooleanFormat = "none" | "auto" | "empty-true";
|
|
|
40
40
|
* which reserves the bare-key form for `true` — null then decodes as `true`)
|
|
41
41
|
* - `hidden` - omit from query string
|
|
42
42
|
*/
|
|
43
|
-
type NullFormat = "default" | "hidden";
|
|
43
|
+
export type NullFormat = "default" | "hidden";
|
|
44
44
|
/**
|
|
45
45
|
* Number parameter encoding format.
|
|
46
46
|
*
|
|
@@ -53,11 +53,11 @@ type NullFormat = "default" | "hidden";
|
|
|
53
53
|
* it, but an `Object.is` guard rejects it since `build(-0)` emits `"0"`, #898)
|
|
54
54
|
* — those keep their exact text as strings.
|
|
55
55
|
*/
|
|
56
|
-
type NumberFormat = "none" | "auto";
|
|
56
|
+
export type NumberFormat = "none" | "auto";
|
|
57
57
|
/**
|
|
58
58
|
* Options for search-params parsing and building.
|
|
59
59
|
*/
|
|
60
|
-
interface Options {
|
|
60
|
+
export interface Options {
|
|
61
61
|
/** Array parameter encoding format. @default "none" */
|
|
62
62
|
arrayFormat?: ArrayFormat;
|
|
63
63
|
/** Boolean parameter encoding format. @default "auto" */
|
|
@@ -68,5 +68,4 @@ interface Options {
|
|
|
68
68
|
numberFormat?: NumberFormat;
|
|
69
69
|
}
|
|
70
70
|
//#endregion
|
|
71
|
-
export { ArrayFormat, BooleanFormat, NullFormat, NumberFormat, Options };
|
|
72
71
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/engine/search-params/types.ts"],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/engine/search-params/types.ts"],"mappings":";;;;;;;;;;;;;;;;;YAqBY;;;;;;;;;;;;;;;;YAiBA;;;;;;;;;YAUA;;;;;;;;;;;;;YAcA;;;;iBASK;;EAEf,cAAc;;EAEd,gBAAgB;;EAEhB,aAAa;;EAEb,eAAe"}
|
|
@@ -32,7 +32,6 @@ import { RouteDefinition, RouteTree } from "../builder/types.js";
|
|
|
32
32
|
* }
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
declare function validateRoute(route: unknown, methodName: string, rootNode?: RouteTree, parentName?: string, seenNames?: Set<string>, seenPathsByParent?: Map<string, Set<string>>): asserts route is RouteDefinition;
|
|
35
|
+
export declare function validateRoute(route: unknown, methodName: string, rootNode?: RouteTree, parentName?: string, seenNames?: Set<string>, seenPathsByParent?: Map<string, Set<string>>): asserts route is RouteDefinition;
|
|
36
36
|
//#endregion
|
|
37
|
-
export { validateRoute };
|
|
38
37
|
//# sourceMappingURL=route-batch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-batch.d.ts","names":[],"sources":["../../../../src/engine/validation/route-batch.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"route-batch.d.ts","names":[],"sources":["../../../../src/engine/validation/route-batch.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA6XgB,cACd,gBACA,oBACA,WAAW,WACX,qBACA,YAAY,aACZ,oBAAoB,YAAY,uBACvB,SAAS"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DefaultDependencies, Navigator, Router } from "./types/router.js";
|
|
2
2
|
//#region src/getNavigator.d.ts
|
|
3
|
-
declare const getNavigator: <Dependencies extends DefaultDependencies = DefaultDependencies>(router: Router<Dependencies>) => Navigator;
|
|
3
|
+
export declare const getNavigator: <Dependencies extends DefaultDependencies = DefaultDependencies>(router: Router<Dependencies>) => Navigator;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { getNavigator };
|
|
6
5
|
//# sourceMappingURL=getNavigator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNavigator.d.ts","names":[],"sources":["../../src/getNavigator.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getNavigator.d.ts","names":[],"sources":["../../src/getNavigator.ts"],"mappings":";;qBAOa,eACX,qBAAqB,sBAAsB,qBAE3C,QAAQ,OAAO,kBACd"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ingest-C6HQ7xXf.js"),t=require("./Router-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ingest-C6HQ7xXf.js"),t=require("./Router-ChxUQY0x.js"),n=require("./RouterError-DCVsSNgX.js"),r=(e=[],n={},r={})=>new t.t(e,n,r),i=Object.freeze,a=new WeakMap,o=e=>{let t=a.get(e);return t||(t=i({navigate:e.navigate,getState:e.getState,isActiveRoute:e.isActiveRoute,canNavigateTo:e.canNavigateTo,subscribe:e.subscribe,subscribeLeave:e.subscribeLeave,isLeaveApproved:e.isLeaveApproved}),a.set(e,t)),t};exports.Router=t.t,exports.RouterError=n.t,exports.UNKNOWN_ROUTE=e.d,exports.constants=e.p,exports.createRouter=r,exports.errorCodes=e.m,exports.events=e.h,exports.getNavigator=o,exports.resolveForwardChain=t.y;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|