@xmachines/play-router 2.2.0 → 4.0.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.
Files changed (83) hide show
  1. package/README.md +103 -109
  2. package/dist/base-route-map.d.ts +7 -1
  3. package/dist/base-route-map.d.ts.map +1 -1
  4. package/dist/base-route-map.js +25 -12
  5. package/dist/base-route-map.js.map +1 -1
  6. package/dist/build-tree.d.ts +16 -1
  7. package/dist/build-tree.d.ts.map +1 -1
  8. package/dist/build-tree.js +23 -6
  9. package/dist/build-tree.js.map +1 -1
  10. package/dist/create-route-map-from-tree.d.ts +12 -6
  11. package/dist/create-route-map-from-tree.d.ts.map +1 -1
  12. package/dist/create-route-map-from-tree.js +13 -5
  13. package/dist/create-route-map-from-tree.js.map +1 -1
  14. package/dist/errors.d.ts +2 -134
  15. package/dist/errors.d.ts.map +1 -1
  16. package/dist/errors.js +11 -151
  17. package/dist/errors.js.map +1 -1
  18. package/dist/find-route.d.ts.map +1 -1
  19. package/dist/find-route.js +14 -19
  20. package/dist/find-route.js.map +1 -1
  21. package/dist/index.d.ts +7 -16
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +10 -11
  24. package/dist/index.js.map +1 -1
  25. package/dist/provider-lifecycle.d.ts +28 -6
  26. package/dist/provider-lifecycle.d.ts.map +1 -1
  27. package/dist/provider-lifecycle.js +16 -2
  28. package/dist/provider-lifecycle.js.map +1 -1
  29. package/dist/router-bridge-base.d.ts +42 -23
  30. package/dist/router-bridge-base.d.ts.map +1 -1
  31. package/dist/router-bridge-base.js +257 -84
  32. package/dist/router-bridge-base.js.map +1 -1
  33. package/dist/router-sync.d.ts +1 -1
  34. package/dist/router-sync.d.ts.map +1 -1
  35. package/dist/router-sync.js +28 -13
  36. package/dist/router-sync.js.map +1 -1
  37. package/dist/types.d.ts +186 -87
  38. package/dist/types.d.ts.map +1 -1
  39. package/dist/{create-route-map.d.ts → xstate/create-route-map.d.ts} +6 -20
  40. package/dist/xstate/create-route-map.d.ts.map +1 -0
  41. package/dist/{create-route-map.js → xstate/create-route-map.js} +5 -3
  42. package/dist/xstate/create-route-map.js.map +1 -0
  43. package/dist/{extract-routes.d.ts → xstate/extract-routes.d.ts} +3 -2
  44. package/dist/xstate/extract-routes.d.ts.map +1 -0
  45. package/dist/{extract-routes.js → xstate/extract-routes.js} +8 -3
  46. package/dist/xstate/extract-routes.js.map +1 -0
  47. package/dist/xstate/index.d.ts +35 -0
  48. package/dist/xstate/index.d.ts.map +1 -0
  49. package/dist/xstate/index.js +33 -0
  50. package/dist/xstate/index.js.map +1 -0
  51. package/dist/{machine-to-graph.d.ts → xstate/machine-to-graph.d.ts} +1 -1
  52. package/dist/xstate/machine-to-graph.d.ts.map +1 -0
  53. package/dist/{machine-to-graph.js → xstate/machine-to-graph.js} +2 -2
  54. package/dist/xstate/machine-to-graph.js.map +1 -0
  55. package/dist/xstate/machine-types.d.ts +42 -0
  56. package/dist/xstate/machine-types.d.ts.map +1 -0
  57. package/dist/xstate/machine-types.js +2 -0
  58. package/dist/xstate/machine-types.js.map +1 -0
  59. package/dist/{query.d.ts → xstate/query.d.ts} +6 -4
  60. package/dist/xstate/query.d.ts.map +1 -0
  61. package/dist/{query.js → xstate/query.js} +3 -2
  62. package/dist/xstate/query.js.map +1 -0
  63. package/package.json +26 -20
  64. package/dist/base-path.d.ts +0 -209
  65. package/dist/base-path.d.ts.map +0 -1
  66. package/dist/base-path.js +0 -418
  67. package/dist/base-path.js.map +0 -1
  68. package/dist/create-route-map.d.ts.map +0 -1
  69. package/dist/create-route-map.js.map +0 -1
  70. package/dist/extract-routes.d.ts.map +0 -1
  71. package/dist/extract-routes.js.map +0 -1
  72. package/dist/framework-params.d.ts +0 -144
  73. package/dist/framework-params.d.ts.map +0 -1
  74. package/dist/framework-params.js +0 -291
  75. package/dist/framework-params.js.map +0 -1
  76. package/dist/machine-to-graph.d.ts.map +0 -1
  77. package/dist/machine-to-graph.js.map +0 -1
  78. package/dist/query.d.ts.map +0 -1
  79. package/dist/query.js.map +0 -1
  80. package/dist/url-pattern-utils.d.ts +0 -93
  81. package/dist/url-pattern-utils.d.ts.map +0 -1
  82. package/dist/url-pattern-utils.js +0 -233
  83. package/dist/url-pattern-utils.js.map +0 -1
@@ -0,0 +1,35 @@
1
+ /**
2
+ * `@xmachines/play-router/xstate` - the routes of an XState machine
3
+ *
4
+ * A route of XMachines is a fact about a STATE. This entry point reads that fact out of an
5
+ * XState v5 machine: it walks the machine, collects each `meta.route`, builds the route
6
+ * tree, and answers the questions that the tree can be asked — which routes are reachable,
7
+ * which are navigable from a state, and which path maps to which state id.
8
+ *
9
+ * The MAIN entry point holds what happens AFTERWARDS: the route map, the match of a
10
+ * location, the bridge, and the provider lifecycle. It names no machine, and it reads this
11
+ * module never. `xstate` is therefore an OPTIONAL peer of this package, and a bundler drops
12
+ * `@statelyai/graph` for a consumer that imports this entry point nowhere.
13
+ *
14
+ * This is the same shape as `@xmachines/play-xstate/routing` and
15
+ * `@xmachines/play-xstate/view`: an optional capability behind its own entry point, with
16
+ * its own dependency.
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * import { createRouteMap } from "@xmachines/play-router/xstate";
21
+ * import { connectRouter } from "@xmachines/play-dom-router";
22
+ *
23
+ * const routeMap = createRouteMap(myMachine);
24
+ * ```
25
+ *
26
+ * @packageDocumentation
27
+ * @see [Routing guide](../../../docs/guides/routing.md)
28
+ */
29
+ export { extractMachineRoutes } from "./extract-routes.js";
30
+ export { createRouteMap } from "./create-route-map.js";
31
+ export { machineToGraph } from "./machine-to-graph.js";
32
+ export type { MachineGraph } from "./machine-to-graph.js";
33
+ export type { MachineNodeData, MachineEdgeData } from "./machine-types.js";
34
+ export { getNavigableRoutes, getRoutableRoutes, routeExists, getTransitionReachableRoutes, isRouteReachable, getRouteMappings, } from "./query.js";
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/xstate/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EACN,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,4BAA4B,EAC5B,gBAAgB,EAChB,gBAAgB,GAChB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * `@xmachines/play-router/xstate` - the routes of an XState machine
3
+ *
4
+ * A route of XMachines is a fact about a STATE. This entry point reads that fact out of an
5
+ * XState v5 machine: it walks the machine, collects each `meta.route`, builds the route
6
+ * tree, and answers the questions that the tree can be asked — which routes are reachable,
7
+ * which are navigable from a state, and which path maps to which state id.
8
+ *
9
+ * The MAIN entry point holds what happens AFTERWARDS: the route map, the match of a
10
+ * location, the bridge, and the provider lifecycle. It names no machine, and it reads this
11
+ * module never. `xstate` is therefore an OPTIONAL peer of this package, and a bundler drops
12
+ * `@statelyai/graph` for a consumer that imports this entry point nowhere.
13
+ *
14
+ * This is the same shape as `@xmachines/play-xstate/routing` and
15
+ * `@xmachines/play-xstate/view`: an optional capability behind its own entry point, with
16
+ * its own dependency.
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * import { createRouteMap } from "@xmachines/play-router/xstate";
21
+ * import { connectRouter } from "@xmachines/play-dom-router";
22
+ *
23
+ * const routeMap = createRouteMap(myMachine);
24
+ * ```
25
+ *
26
+ * @packageDocumentation
27
+ * @see [Routing guide](../../../docs/guides/routing.md)
28
+ */
29
+ export { extractMachineRoutes } from "./extract-routes.js";
30
+ export { createRouteMap } from "./create-route-map.js";
31
+ export { machineToGraph } from "./machine-to-graph.js";
32
+ export { getNavigableRoutes, getRoutableRoutes, routeExists, getTransitionReachableRoutes, isRouteReachable, getRouteMappings, } from "./query.js";
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/xstate/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EACN,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,4BAA4B,EAC5B,gBAAgB,EAChB,gBAAgB,GAChB,MAAM,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { AnyStateMachine } from "xstate";
2
2
  import { type Graph } from "@statelyai/graph";
3
- import type { MachineNodeData, MachineEdgeData } from "./types.js";
3
+ import type { MachineNodeData, MachineEdgeData } from "./machine-types.js";
4
4
  /**
5
5
  * The typed Graph of @statelyai/graph that represents a state machine.
6
6
  * It gives you the queries of the hierarchy, the algorithms of a walk, and the tests
@@ -0,0 +1 @@
1
+ {"version":3,"file":"machine-to-graph.d.ts","sourceRoot":"","sources":["../../src/xstate/machine-to-graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG3E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;AAsDnE,eAAO,MAAM,cAAc,GAAI,SAAS,eAAe,KAAG,YAwEzD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { toDirectedGraph } from "xstate/graph";
2
2
  import { createGraph } from "@statelyai/graph";
3
- import { UnknownStateTypeError } from "./errors.js";
3
+ import { UnknownStateTypeError } from "../errors.js";
4
4
  /**
5
5
  * Converts an XState v5 state machine into a typed Graph of @statelyai/graph.
6
6
  *
@@ -20,7 +20,7 @@ import { UnknownStateTypeError } from "./errors.js";
20
20
  * ```typescript
21
21
  * import { createMachine } from "xstate";
22
22
  * import { getChildren, getSuccessors } from "@statelyai/graph";
23
- * import { machineToGraph } from "@xmachines/play-router";
23
+ * import { machineToGraph } from "@xmachines/play-router/xstate";
24
24
  *
25
25
  * const machine = createMachine({
26
26
  * id: "app",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"machine-to-graph.js","sourceRoot":"","sources":["../../src/xstate/machine-to-graph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAA0B,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAgBrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH;;;;GAIG;AACH,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC;IACtD,QAAQ;IACR,UAAU;IACV,UAAU;IACV,OAAO;IACP,SAAS;CACT,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAwB,EAAgB,EAAE;IACxE,MAAM,EAAE,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAEpC,8GAA8G;IAC9G,MAAM,KAAK,GAAoE,EAAE,CAAC;IAClF,MAAM,KAAK,GAKN,EAAE,CAAC;IACR,IAAI,WAAW,GAAG,CAAC,CAAC;IAEpB,MAAM,IAAI,GAAG,CAAC,MAAyB,EAAE,QAAiB,EAAQ,EAAE;QACnE,MAAM,EAAE,GAAG,M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,CAAC;YACjC,MAAM,QAAQ,GAAoB;gBACjC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI;aAC1B,CAAC;YACF,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;gBAC3B,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACpD,CAAC;YACD,KAAK,CAAC,IAAI,CAAC;gBACV,EAAE,EAAE,IAAI,WAAW,EAAE,EAAE;gBACvB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE;gBACxB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE;gBACxB,IAAI,EAAE,QAAQ;aACd,CAAC,CAAC;QACJ,CAAC;QAED,yDAAyD;QACzD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;QACxB,CAAC;IACF,CAAC,CAAC;IAEF,IAAI,CAAC,EAAE,CAAC,CAAC;IAET,OAAO,WAAW,CAAC;QAClB,IAAI,EAAE,UAAU;QAChB,aAAa,EAAE,EAAE,CAAC,EAAE;QACpB,KAAK;QACL,KAAK;KACL,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * The data that a node and an edge of an XState machine graph carry.
3
+ *
4
+ * `machineToGraph` writes them, and the query functions of this package read them. They
5
+ * live here and not on the main entry point, because a route tree is a map from a path
6
+ * to a state and it names no machine.
7
+ */
8
+ /**
9
+ * The data on each node of the graph that represents the machine.
10
+ * It holds the state metadata that the route extraction and the queries need.
11
+ */
12
+ export interface MachineNodeData {
13
+ /** The XState state ID, for example "test.dashboard.overview" */
14
+ stateId: string;
15
+ /** The state type of XState */
16
+ type: "atomic" | "compound" | "parallel" | "final" | "history";
17
+ /** The original meta object of the state */
18
+ meta?: Record<string, unknown>;
19
+ /** The route path of meta.route, in its string form */
20
+ route?: string;
21
+ }
22
+ /**
23
+ * The data on each edge of the graph that represents the machine.
24
+ * It holds the event of the transition and the information of its guard.
25
+ */
26
+ export interface MachineEdgeData {
27
+ /** The event type that starts this transition */
28
+ eventType: string;
29
+ /**
30
+ * The guard as a string, when a guard is present
31
+ *
32
+ * XState 5 holds the guard of a transition as a value that `String()` describes, and
33
+ * `machineToGraph` writes that string here.
34
+ *
35
+ * The field carried a "removed in the next major" notice before, and it keeps no such
36
+ * notice now. XState 6 populates it never, so it leaves with the migration to XState 6
37
+ * and not before: a removal while XState 5 fills it deletes a field that works, and it
38
+ * gives a consumer nothing in its place.
39
+ */
40
+ guardType?: string;
41
+ }
42
+ //# sourceMappingURL=machine-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"machine-types.d.ts","sourceRoot":"","sources":["../../src/xstate/machine-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;IAC/D,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=machine-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"machine-types.js","sourceRoot":"","sources":["../../src/xstate/machine-types.ts"],"names":[],"mappings":""}
@@ -1,7 +1,9 @@
1
+ import { type BasePathOptions } from "@xmachines/play-url";
1
2
  import type { Graph } from "@statelyai/graph";
2
- import type { RouteTree, RouteNode, MachineNodeData, MachineEdgeData } from "./types.js";
3
- import type { RouteMapping } from "./base-route-map.js";
4
- import { type BasePathOptions } from "./base-path.js";
3
+ import type { RouteTree, RouteNode } from "../types.js";
4
+ import type { MachineNodeData, MachineEdgeData } from "./machine-types.js";
5
+ import type { MachineGraph } from "./machine-to-graph.js";
6
+ import type { RouteMapping } from "../base-route-map.js";
5
7
  /**
6
8
  * Returns every route of a navigation from the given state
7
9
  *
@@ -19,7 +21,7 @@ import { type BasePathOptions } from "./base-path.js";
19
21
  * // [{ id: 'overview', path: '/overview', ... }, { id: 'settings', ... }]
20
22
  * ```
21
23
  */
22
- export declare const getNavigableRoutes: (tree: RouteTree, stateId: string) => RouteNode[];
24
+ export declare const getNavigableRoutes: (tree: RouteTree<MachineGraph>, stateId: string) => RouteNode[];
23
25
  /**
24
26
  * Returns every route of the tree that has a route, in one flat array
25
27
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/xstate/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,KAAK,eAAe,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,kBAAkB,CAAC;AAGzD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA0BzD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,SAAS,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,KAAG,SAAS,EA0B5F,CAAC;AAkBF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,SAAS,KAAG,SAAS,EAW5D,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,SAAS,EAAE,MAAM,MAAM,KAAG,OAE3D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,4BAA4B,GACxC,OAAO,KAAK,CAAC,eAAe,EAAE,eAAe,CAAC,EAC9C,SAAS,MAAM,KACb,MAAM,EAER,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,gBAAgB,GAC5B,OAAO,KAAK,CAAC,eAAe,EAAE,eAAe,CAAC,EAC9C,aAAa,MAAM,EACnB,WAAW,MAAM,KACf,OAKF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,SAAS,EAAE,UAAU,eAAe,KAAG,YAAY,EAazF,CAAC"}
@@ -1,5 +1,6 @@
1
+ import { joinBasePath, normalizeBasePath, resolveBasePath, } from "@xmachines/play-url";
1
2
  import { getSuccessors, hasNode, hasPath } from "@statelyai/graph";
2
- import { joinBasePath, normalizeBasePath, resolveBasePath, } from "./base-path.js";
3
+ import { ROOT_NODE_ID } from "../build-tree.js";
3
4
  /**
4
5
  * Returns the successor nodes of a state that have a route: the states of a direct
5
6
  * transition edge that hold a `meta.route` field.
@@ -93,7 +94,7 @@ export const getRoutableRoutes = (tree) => {
93
94
  const routes = [];
94
95
  for (const node of tree.byStateId.values()) {
95
96
  // Keep the nodes with a route, which means the nodes with a meta.route field, and skip the synthetic root
96
- if (node.routable && node.id !== "__root__") {
97
+ if (node.routable && node.id !== ROOT_NODE_ID) {
97
98
  routes.push(node);
98
99
  }
99
100
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/xstate/query.ts"],"names":[],"mapp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,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xmachines/play-router",
3
- "version": "2.2.0",
4
- "description": "Route tree extraction from XState v5 state machines. Part of @xmachines/play Universal Player Architecture.",
3
+ "version": "4.0.0",
4
+ "description": "Route maps, the router bridge base and the Routable capability of @xmachines/play. It names no state machine; the machine half is the ./xstate subpath.",
5
5
  "keywords": [
6
6
  "routing",
7
7
  "state-machine",
@@ -30,6 +30,10 @@
30
30
  "types": "./dist/index.d.ts",
31
31
  "default": "./dist/index.js"
32
32
  },
33
+ "./xstate": {
34
+ "types": "./dist/xstate/index.d.ts",
35
+ "default": "./dist/xstate/index.js"
36
+ },
33
37
  "./errors": {
34
38
  "types": "./dist/errors.d.ts",
35
39
  "default": "./dist/errors.js"
@@ -43,40 +47,42 @@
43
47
  "build": "vite build && tsc --build",
44
48
  "clean": "rm -rf dist *.tsbuildinfo coverage .vitest-attachments test/browser/__screenshots__ node_modules/.svelte2tsx-* node_modules/.vite*",
45
49
  "lint": "oxlint .",
50
+ "lint:security": "node ../../scripts/semgrep-scan.mjs",
46
51
  "format": "oxfmt .",
47
52
  "test": "vitest",
48
53
  "test:coverage": "vitest run --coverage"
49
54
  },
50
55
  "dependencies": {
51
- "@statelyai/graph": "^2.1.0",
52
- "@xmachines/play": "2.2.0",
53
- "@xmachines/play-actor": "2.2.0",
54
- "@xmachines/play-signals": "2.2.0",
56
+ "@statelyai/graph": "^2.4.0",
57
+ "@xmachines/play-url": "4.0.0",
55
58
  "quick-lru": "^7.3.0"
56
59
  },
57
60
  "devDependencies": {
58
- "@testing-library/jest-dom": "^6.9.1",
59
- "@types/node": "^26.2.0",
60
- "@vitest/browser-playwright": "^4.1.11",
61
- "oxfmt": "^0.64.0",
62
- "oxlint": "^1.79.0",
61
+ "@testing-library/jest-dom": "^7.0.1",
62
+ "@types/node": "^26.6.2",
63
+ "@vitest/browser-playwright": "^5.0.1",
64
+ "@xmachines/play": "4.0.0",
65
+ "@xmachines/play-signals": "4.0.0",
66
+ "@xmachines/play-view": "4.0.0",
67
+ "oxfmt": "^0.68.0",
68
+ "oxlint": "^1.83.0",
63
69
  "typescript": "^5.9.3 || ^6.0.3",
64
- "urlpattern-polyfill": "^10.1.0",
65
- "vite": "^8.0.10",
66
- "vitest": "^4.1.11",
67
- "xstate": "^5.31.0"
70
+ "vite": "^8.3.0",
71
+ "vitest": "^5.0.1",
72
+ "xstate": "^5.33.0"
68
73
  },
69
74
  "peerDependencies": {
70
- "urlpattern-polyfill": "^10.1.0",
71
- "xstate": "^5.31.0"
75
+ "@xmachines/play": "4.0.0",
76
+ "@xmachines/play-signals": "4.0.0",
77
+ "xstate": "^5.33.0"
72
78
  },
73
79
  "peerDependenciesMeta": {
74
- "urlpattern-polyfill": {
80
+ "xstate": {
75
81
  "optional": true
76
82
  }
77
83
  },
78
84
  "engines": {
79
- "node": ">=22.0.0"
85
+ "node": ">=24.0.0"
80
86
  },
81
- "_devDependencies_note": "xstate appears in both peerDependencies and devDependencies intentionally. devDependencies provides workspace resolution for local builds and tests. peerDependencies declares the consumer version constraint. Both are pinned to ^5.30.0 to prevent drift. urlpattern-polyfill is an optional peer dependency — consumers on Node < 24 or older browsers install it themselves. devDependencies entry ensures workspace test resolution."
87
+ "_devDependencies_note": "xstate appears in both peerDependencies and devDependencies intentionally. devDependencies provides workspace resolution for local builds and tests. peerDependencies declares the consumer version constraint. Both hold the same range, to prevent drift."
82
88
  }
@@ -1,209 +0,0 @@
1
- /**
2
- * The base-path support — it mounts the routes of a machine under a URL prefix.
3
- *
4
- * A host application often owns a part of its own URL space, and it wants a machine
5
- * to own the rest of that space, inside the SAME router. A URL such as
6
- * `/:machineId/play/dashboard` has two halves: `/:machineId/play` belongs to the
7
- * host, which resolves `:machineId` in a loader, and `/dashboard` belongs to the
8
- * `meta.route` tree of the machine.
9
- *
10
- * This module is the boundary between those two halves:
11
- * - {@link resolveBasePath} makes the concrete prefix that the browser URL carries,
12
- * from a base-path pattern and its params.
13
- * - {@link stripBasePath} removes that prefix from an inbound location of the router,
14
- * and it reports a location OUTSIDE the prefix as foreign, so that the bridge stays
15
- * out of it.
16
- * - {@link joinBasePath} adds the prefix again to an outbound path of the machine.
17
- *
18
- * The prefix lives on the BRIDGE, and not on the `RouteMap`. A route map is static,
19
- * it is shared, and it holds an LRU cache inside, while a mount point is dynamic. One
20
- * route map therefore serves every `machineId` without a rebuild.
21
- *
22
- * @internal The package exports these primitives for an adapter and for a host, but
23
- * a consumer normally uses the `basePath` option of a bridge instead.
24
- */
25
- /**
26
- * The base-path options that every router bridge, `connectRouter` function, and
27
- * `PlayRouterProvider` component accepts.
28
- *
29
- * @example
30
- * ```typescript
31
- * // A host that mounts a machine under a route it resolved in a loader
32
- * connectRouter({
33
- * actor,
34
- * router,
35
- * routeMap,
36
- * basePath: "/:machineId/play",
37
- * basePathParams: { machineId },
38
- * });
39
- * ```
40
- */
41
- export interface BasePathOptions {
42
- /**
43
- * The URL prefix that the routes of the machine hang off, for example `"/admin"`
44
- * or `"/:machineId/play"`.
45
- *
46
- * A `:param` segment is a declarative convenience, so that a host keeps ONE string
47
- * that mirrors its own route config. Every `:param` must have a value in
48
- * {@link BasePathOptions.basePathParams}, because the bridge writes a real URL. An
49
- * optional segment (`:param?`) and a wildcard (`*`) are therefore refused: neither
50
- * of them resolves to one concrete prefix.
51
- *
52
- * An absent value, `""`, and `"/"` all mean "no prefix", which is the behaviour of
53
- * every release before this option existed.
54
- */
55
- readonly basePath?: string | undefined;
56
- /**
57
- * The values of the `:param` segments of {@link BasePathOptions.basePath}.
58
- *
59
- * These values belong to the HOST, which wrote the prefix and resolved them, so
60
- * they travel in NO `play.route` event: the machine is authoritative over its own
61
- * params, and `event.params` holds what the pattern of the machine declares, and
62
- * nothing else. A param of the host that shares a name with one of the machine can
63
- * therefore shadow it never.
64
- *
65
- * A host reads them back from `bridge.basePathParams`, where they cannot go stale.
66
- * A machine that needs the identity of its host takes it through the `input` of the
67
- * actor, where that identity decides WHICH machine runs.
68
- */
69
- readonly basePathParams?: Record<string, string | number> | undefined;
70
- }
71
- /**
72
- * A base path that is ready for a use in both directions.
73
- */
74
- export interface ResolvedBasePath {
75
- /**
76
- * The normalized prefix: it starts with `/`, it carries no trailing `/`, and it
77
- * holds no duplicate slash. The empty string means "no prefix".
78
- */
79
- readonly path: string;
80
- /**
81
- * The values of each `:param` of the prefix, for the `params` of a `play.route`
82
- * event. The object is empty for a prefix without a param, and for a pattern that
83
- * nothing resolved.
84
- */
85
- readonly params: Record<string, string>;
86
- }
87
- /**
88
- * The base path of a bridge that has no `basePath` option.
89
- *
90
- * The object is FROZEN, and both levels of it: {@link resolveBasePath} returns this
91
- * exact instance for every bridge with no mount, and
92
- * `RouterBridgeBase.basePathParams` hands its `params` to the caller.
93
- * `Readonly<Record<string, string>>` is gone at run time, so without the freeze one
94
- * write in consumer code would leak that key into every other unmounted bridge in
95
- * the process.
96
- */
97
- export declare const NO_BASE_PATH: ResolvedBasePath;
98
- /**
99
- * Normalizes a base path, and it substitutes no `:param` segment of that path.
100
- *
101
- * Use this function when you want the form of the pattern, for example to declare
102
- * the routes of a machine in a route config of a host that substitutes each param
103
- * itself. {@link resolveBasePath} gives the form that a bridge needs.
104
- *
105
- * @param basePath - The prefix, as a pattern or as a concrete path. An absent value,
106
- * `""`, and `"/"` all give `""`.
107
- * @returns The normalized prefix. It starts with `/`, and it carries no trailing `/`.
108
- * @throws {InvalidBasePathError} For a wildcard segment, for an optional `:param?`
109
- * segment, for a `$param` segment, for a query string or a hash fragment, for a URL
110
- * scheme, for a dot segment (`.`, `..`, and their percent-encoded forms), and for any
111
- * segment that a browser rewrites — one that holds whitespace, a backslash, or a
112
- * character that a URL percent-encodes.
113
- *
114
- * @example
115
- * ```typescript
116
- * normalizeBasePath("/:machineId/play/"); // "/:machineId/play"
117
- * normalizeBasePath("admin"); // "/admin"
118
- * normalizeBasePath("/"); // ""
119
- * ```
120
- */
121
- export declare function normalizeBasePath(basePath?: string | undefined): string;
122
- /**
123
- * Resolves a base path and its params to the concrete prefix that a browser URL
124
- * carries.
125
- *
126
- * A bridge calls this function one time, and again on each `setBasePath()` call. The
127
- * result is always concrete. {@link stripBasePath} therefore compares a literal
128
- * prefix, and no URLPattern match runs on the hot path of a navigation.
129
- *
130
- * @param basePath - The prefix, as a pattern or as a concrete path.
131
- * @param params - The values of the `:param` segments of `basePath`.
132
- * @returns The concrete prefix, and the values of each param for a `play.route` event.
133
- * @throws {InvalidBasePathError} For a wildcard segment, for an optional `:param?`
134
- * segment, for a `$param` segment, for a query string or a hash fragment, for a URL
135
- * scheme, for a dot segment (`.`, `..`, and their percent-encoded forms), and for any
136
- * segment that a browser rewrites — one that holds whitespace, a backslash, or a
137
- * character that a URL percent-encodes.
138
- * @throws {MissingBasePathParamError} When a `:param` of the prefix has no value.
139
- *
140
- * @example
141
- * ```typescript
142
- * resolveBasePath("/:machineId/play", { machineId: "abc123" });
143
- * // → { path: "/abc123/play", params: { machineId: "abc123" } }
144
- *
145
- * resolveBasePath("/admin");
146
- * // → { path: "/admin", params: {} }
147
- * ```
148
- */
149
- export declare function resolveBasePath(basePath?: string | undefined, params?: Record<string, string | number> | undefined): ResolvedBasePath;
150
- /**
151
- * Removes the base path from an inbound location of the router.
152
- *
153
- * The return value separates the two cases that make a shared router work:
154
- * - A string is the MACHINE half of the location, for example `"/dashboard"` of
155
- * `"/abc123/play/dashboard"`. The bridge matches it against the route map.
156
- * - `null` means that the location is FOREIGN: it lies outside the mount, so it
157
- * belongs to the host. The bridge sends no `play.route` event, AND it runs no
158
- * corrective navigation. A correction here would drag the user off a page of the
159
- * host.
160
- *
161
- * The match is exact, and it respects each segment boundary. `"/abc/playground"` is
162
- * therefore foreign to the mount `"/abc/play"`.
163
- *
164
- * @param pathname - A sanitized pathname of the router, with no query and no duplicate slash.
165
- * @param basePath - The concrete prefix of {@link resolveBasePath}. `""` removes nothing.
166
- * @returns The machine half of the path, or `null` when the location is foreign.
167
- *
168
- * @example
169
- * ```typescript
170
- * stripBasePath("/abc123/play/dashboard", "/abc123/play"); // "/dashboard"
171
- * stripBasePath("/abc123/play", "/abc123/play"); // "/"
172
- * stripBasePath("/settings", "/abc123/play"); // null — the host owns it
173
- * ```
174
- */
175
- export declare function stripBasePath(pathname: string, basePath: string): string | null;
176
- /**
177
- * Adds the base path to an outbound path of the machine.
178
- *
179
- * The function joins the PATHNAME only. A query string and a hash fragment of the
180
- * path of the machine stay at the end, because the prefix belongs in front of the
181
- * path.
182
- *
183
- * @param basePath - The concrete prefix of {@link resolveBasePath}. `""` adds nothing.
184
- * @param path - The path of the machine, for example `"/dashboard"` or `"/dates?trip=one-way"`.
185
- * @returns The location for the router of the host.
186
- *
187
- * @example
188
- * ```typescript
189
- * joinBasePath("/abc123/play", "/dashboard"); // "/abc123/play/dashboard"
190
- * joinBasePath("/abc123/play", "/"); // "/abc123/play"
191
- * joinBasePath("/abc123/play", "/x?tab=a"); // "/abc123/play/x?tab=a"
192
- * joinBasePath("", "/dashboard"); // "/dashboard"
193
- * ```
194
- */
195
- export declare function joinBasePath(basePath: string, path: string): string;
196
- /**
197
- * Gives the index of the first query mark or fragment mark of a path, or `-1`.
198
- *
199
- * The names say `At`, because both values are an INDEX. A name such as `hash` reads
200
- * as a digest to a reader and to a scanner both: `gitlab.eslint.detect-possible-timing-attacks`
201
- * fires on a `===` test against an identifier of that name, and it cannot see that
202
- * the operands here are two numbers.
203
- *
204
- * @internal `RouterBridgeBase` splits a location on the same boundary, to read the
205
- * pathname half of an actor route. One function, so the two sides cannot disagree
206
- * about where a pathname ends.
207
- */
208
- export declare function firstMarkIndex(path: string): number;
209
- //# sourceMappingURL=base-path.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-path.d.ts","sourceRoot":"","sources":["../src/base-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,eA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