@xmachines/play-router 4.0.0 → 5.0.1

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 (40) hide show
  1. package/README.md +25 -14
  2. package/dist/base-route-map.d.ts +17 -12
  3. package/dist/base-route-map.d.ts.map +1 -1
  4. package/dist/base-route-map.js +101 -25
  5. package/dist/base-route-map.js.map +1 -1
  6. package/dist/create-route-map-from-tree.d.ts +1 -1
  7. package/dist/create-route-map-from-tree.js +1 -1
  8. package/dist/errors.js +3 -3
  9. package/dist/errors.js.map +1 -1
  10. package/dist/find-route.d.ts +13 -1
  11. package/dist/find-route.d.ts.map +1 -1
  12. package/dist/find-route.js +22 -10
  13. package/dist/find-route.js.map +1 -1
  14. package/dist/index.d.ts +3 -3
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/provider-lifecycle.d.ts +13 -5
  19. package/dist/provider-lifecycle.d.ts.map +1 -1
  20. package/dist/provider-lifecycle.js +9 -4
  21. package/dist/provider-lifecycle.js.map +1 -1
  22. package/dist/router-bridge-base.d.ts +36 -20
  23. package/dist/router-bridge-base.d.ts.map +1 -1
  24. package/dist/router-bridge-base.js +79 -72
  25. package/dist/router-bridge-base.js.map +1 -1
  26. package/dist/router-sync.d.ts +2 -26
  27. package/dist/router-sync.d.ts.map +1 -1
  28. package/dist/router-sync.js +8 -41
  29. package/dist/router-sync.js.map +1 -1
  30. package/dist/types.d.ts +31 -26
  31. package/dist/types.d.ts.map +1 -1
  32. package/dist/xstate/create-route-map.d.ts +2 -2
  33. package/dist/xstate/create-route-map.d.ts.map +1 -1
  34. package/dist/xstate/create-route-map.js +6 -3
  35. package/dist/xstate/create-route-map.js.map +1 -1
  36. package/dist/xstate/extract-routes.d.ts +2 -1
  37. package/dist/xstate/extract-routes.d.ts.map +1 -1
  38. package/dist/xstate/extract-routes.js +5 -5
  39. package/dist/xstate/extract-routes.js.map +1 -1
  40. package/package.json +15 -12
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * The class holds the logic that each router bridge shares, and that is 90% of the
5
5
  * code of every bridge:
6
- * - The TC39 Signal watcher of the direction from the actor to the router
6
+ * - The atom watcher of the direction from the actor to the router
7
7
  * - `lastSyncedPath`, for the echo suppression in the direction from the actor to the router
8
8
  * - The `isProcessingNavigation` flag, which stops a loop of a guard redirect in `syncActorFromRouter` only
9
9
  * - `syncRouterFromActor` and `syncActorFromRouter`, with the read of each URL parameter
@@ -42,10 +42,10 @@
42
42
  *
43
43
  * @see [Play RFC](../../docs/rfc/play.md) - invariant INV-04
44
44
  */
45
- import { NO_BASE_PATH, firstMarkIndex, holdsUnsubstitutedParam, joinBasePath, parsePattern, resolveBasePath, stripBasePath, } from "@xmachines/play-url";
46
- import { Signal, watchSignal } from "@xmachines/play-signals";
45
+ import { NO_BASE_PATH, sanitizePathname, splitLocation, holdsUnsubstitutedParam, joinBasePath, parsePattern, resolveBasePath, stripBasePath, } from "@xmachines/play-url";
46
+ import { watchAtom } from "@xmachines/play-atom";
47
47
  import { DuplicateBridgeError, RouterSyncError, InvalidRoutePatternError } from "./errors.js";
48
- import { buildPlayRouteEvent, extractQuery, extractRouteParams, matchRouteMap, sanitizePathname, } from "./router-sync.js";
48
+ import { buildPlayRouteEvent, extractQuery, extractRouteParams, matchRouteMap, } from "./router-sync.js";
49
49
  /**
50
50
  * The registry of the actors with an active bridge connection, at the module level.
51
51
  *
@@ -84,19 +84,19 @@ export class RouterBridgeBase {
84
84
  /**
85
85
  * The raw value of `actor.currentRoute` that this bridge accounted for already.
86
86
  *
87
- * The field answers ONE question: "did the bridge see this value of the signal
87
+ * The field answers ONE question: "did the bridge see this value of the atom
88
88
  * before?". It is therefore a string, and not a location — a route that resolves to
89
89
  * no URL, such as an unknown stateId or a parameterized pattern, still stops a
90
90
  * second attempt at the same value.
91
91
  *
92
92
  * The constructor and `connect()` seed it, so that the first fire of the watcher of
93
- * the signal pushes nothing for a route that moved nowhere.
93
+ * the atom pushes nothing for a route that moved nowhere.
94
94
  */
95
95
  lastActorRoute = null;
96
96
  /**
97
97
  * The flag guards `syncActorFromRouter` against a re-entrant call from a guard
98
98
  * redirect of the actor itself. Such a call has this sequence: the bridge sends to
99
- * the actor, the signal fires, the bridge pushes to the router, and a second
99
+ * the actor, the atom fires, the bridge pushes to the router, and a second
100
100
  * `syncActorFromRouter` call starts before the first one returns.
101
101
  *
102
102
  * The flag is NOT the echo suppression of the direction from the actor to the
@@ -168,6 +168,13 @@ export class RouterBridgeBase {
168
168
  * the echo suppression therefore keeps comparing like with like.
169
169
  */
170
170
  mount = NO_BASE_PATH;
171
+ /**
172
+ * The caches that every parse and every compilation of this bridge reads.
173
+ *
174
+ * `resolveNavigationPath` and `isActorAtPath` parse a CONCRETE location, and an
175
+ * application writes one for each value that it puts in a param.
176
+ */
177
+ compileOptions;
171
178
  /**
172
179
  * @param actor - A `RoutableActor`, with `currentRoute`, `initialRoute`, and `send`.
173
180
  * @param routeMap - The route map of both directions, for the resolution between a
@@ -180,11 +187,19 @@ export class RouterBridgeBase {
180
187
  constructor(actor, routeMap, options) {
181
188
  this.actor = actor;
182
189
  this.routeMap = routeMap;
190
+ // The caches of this bridge, or the shared defaults. `resolveNavigationPath` and
191
+ // `isActorAtPath` parse a CONCRETE location — one for each value that the
192
+ // application puts in a param — so a server that holds a bridge for each request
193
+ // passes caches that the request owns and drops.
194
+ this.compileOptions = {
195
+ patternCache: options?.patternCache,
196
+ compiledCache: options?.compiledCache,
197
+ };
183
198
  // Resolve the mount BEFORE the seed of lastSyncedPath: an invalid basePath must
184
199
  // fail here, at the construction, and not on the first navigation.
185
200
  this.mount = resolveBasePath(options?.basePath, options?.basePathParams);
186
201
  // Record the route of the actor as accounted for. This stops a loop in the first
187
- // synchronization: the watcher of the signal fires once when `connect()` arms it,
202
+ // synchronization: the watcher of the atom fires once when `connect()` arms it,
188
203
  // and a route that moved nowhere must push nothing.
189
204
  //
190
205
  // The seed goes to `lastActorRoute`, and NOT to `lastSyncedPath`. The route of the
@@ -419,7 +434,7 @@ export class RouterBridgeBase {
419
434
  /**
420
435
  * Connects the router bridge to the Actor.
421
436
  *
422
- * The method installs the TC39 Signal watcher of the direction from the actor to the
437
+ * The method installs the atom watcher of the direction from the actor to the
423
438
  * router. It then starts the watch of the router changes, which each framework does
424
439
  * in its own way.
425
440
  *
@@ -466,7 +481,7 @@ export class RouterBridgeBase {
466
481
  this.hasConnectedOnce = true;
467
482
  // From here on, connect() gives all or nothing. THREE steps below can throw, and
468
483
  // the rollback has to cover each of them:
469
- // - `createRouteWatcher`, on a signal that refuses a watcher
484
+ // - `createRouteWatcher`, on an atom that refuses a watcher
470
485
  // - `watchRouterChanges()`, which belongs to the adapter: `afterNavigate()` of
471
486
  // SvelteKit raises `lifecycle_outside_component` outside the initialization of
472
487
  // a component, and a host reaches that by calling `connectRouter` from a module
@@ -482,13 +497,13 @@ export class RouterBridgeBase {
482
497
  // cleanup. Every part above must go away again, or it leaks:
483
498
  // - the router listener keeps firing, and it drives the actor through a bridge
484
499
  // that the caller believes to be dead
485
- // - the signal watcher keeps pushing each actor route to the router
500
+ // - the atom watcher keeps pushing each actor route to the router
486
501
  // - the activeBridges entry keeps the actor, so the NEXT connect() call of the
487
502
  // caller for this actor throws a DuplicateBridgeError. A repair of the real
488
503
  // cause, for example a correction of the route pattern, rescues that actor
489
504
  // never.
490
505
  try {
491
- // The TC39 Signal watcher of the direction from the actor to the router.
506
+ // The atom watcher of the direction from the actor to the router.
492
507
  this.routeWatcher = createRouteWatcher(this.actor.currentRoute, (route) => {
493
508
  this.syncRouterFromActor(route);
494
509
  });
@@ -678,7 +693,7 @@ export class RouterBridgeBase {
678
693
  /**
679
694
  * Disconnects the router bridge from the Actor.
680
695
  *
681
- * The method stops the watch of the signal, and it removes the router listener of the
696
+ * The method stops the watch of the atom, and it removes the router listener of the
682
697
  * framework.
683
698
  */
684
699
  disconnect() {
@@ -729,7 +744,7 @@ export class RouterBridgeBase {
729
744
  }
730
745
  // ── The sync methods. They are protected, and a subclass overrides one for its own behavior ──
731
746
  /**
732
- * Writes the location of the router when the route signal of the actor changes.
747
+ * Writes the location of the router when the route atom of the actor changes.
733
748
  *
734
749
  * The method resolves the actor route to a concrete URL path, then it calls
735
750
  * navigateRouter() for the navigation of the framework. When it cannot resolve the
@@ -967,7 +982,7 @@ export class RouterBridgeBase {
967
982
  * reports, and `sanitizePathname` has removed the fragment from that already.
968
983
  */
969
984
  testEchoOfLastPush(route) {
970
- // The FIRST question: did the bridge account for this value of the signal already?
985
+ // The FIRST question: did the bridge account for this value of the atom already?
971
986
  // The test is an exact string compare, because it asks about the VALUE. A route
972
987
  // that resolves to no URL — an unknown stateId, a parameterized pattern — is
973
988
  // therefore covered too, and the bridge tries it one time only.
@@ -984,7 +999,7 @@ export class RouterBridgeBase {
984
999
  if (sameLocation(route, location))
985
1000
  return { isEcho: true };
986
1001
  // A route that is a stateId answers it only after the resolution. The machine that
987
- // mirrors an inbound `play.route` back into its route signal reaches this line:
1002
+ // mirrors an inbound `play.route` back into its route atom reaches this line:
988
1003
  // the bridge wrote "/about" and the actor answers "#about", which is ONE location.
989
1004
  // A compare of the raw value alone missed, and the bridge pushed a location that
990
1005
  // the router already held — one history entry that BACK cannot escape.
@@ -1012,7 +1027,7 @@ export class RouterBridgeBase {
1012
1027
  * literal `*` into the browser URL. The method still writes the raw route to
1013
1028
  * lastActorRoute, and it leaves lastSyncedPath as it stands, because that field
1014
1029
  * records a LOCATION and no location changed. Therefore the dedup guard fires
1015
- * correctly on the next identical value of the signal.
1030
+ * correctly on the next identical value of the atom.
1016
1031
  *
1017
1032
  * @param route - The raw value of the actor route.
1018
1033
  * @param resolved - The concrete path of that route. The default resolves it here. A
@@ -1021,7 +1036,7 @@ export class RouterBridgeBase {
1021
1036
  */
1022
1037
  pushResolvedRoute(route, resolved = this.resolveNavigationPath(route)) {
1023
1038
  // The VALUE is accounted for either way, so the dedup stops the next identical fire
1024
- // of the signal even when the route resolves to no URL.
1039
+ // of the atom even when the route resolves to no URL.
1025
1040
  this.lastActorRoute = route;
1026
1041
  // The LOCATION record takes the concrete path only. A raw stateId here described no
1027
1042
  // location that a router ever showed, and `isEchoOfLastSync` compares this field
@@ -1119,7 +1134,7 @@ export class RouterBridgeBase {
1119
1134
  }
1120
1135
  // Record the location BEFORE the send, and record it with its query.
1121
1136
  //
1122
- // The route signal of the actor notifies the watcher of the other direction
1137
+ // The route atom of the actor notifies the watcher of the other direction
1123
1138
  // for this same move, and `syncRouterFromActor` then tests the route of the
1124
1139
  // actor against this field. Two details decide that test:
1125
1140
  //
@@ -1134,7 +1149,7 @@ export class RouterBridgeBase {
1134
1149
  this.lastSyncedPath = withSearch(nextRoute.pathname, search);
1135
1150
  // The router moved, and the actor has not answered yet, so the value that the
1136
1151
  // bridge accounted for describes the agreement of the two sides NO MORE. A value
1137
- // that stayed read the answer of the actor as a repeat of the signal: a guard
1152
+ // that stayed read the answer of the actor as a repeat of the atom: a guard
1138
1153
  // redirect BACK to the route the actor came from — the route that the seed of
1139
1154
  // `connect()` recorded — stopped at the dedup, the bridge pushed nothing, and the
1140
1155
  // address bar kept the location that the guard refused.
@@ -1174,7 +1189,7 @@ export class RouterBridgeBase {
1174
1189
  const pattern = this.routeMap.getPathByStateId(stateId);
1175
1190
  if (!pattern)
1176
1191
  return {};
1177
- return extractRouteParams(pathname, pattern);
1192
+ return extractRouteParams(pathname, pattern, this.compileOptions);
1178
1193
  }
1179
1194
  /**
1180
1195
  * Resolves a value of an actor route to a concrete URL path for a navigation.
@@ -1220,9 +1235,10 @@ export class RouterBridgeBase {
1220
1235
  // - A route of the MAP is a pattern source, so every construct in it is grammar and
1221
1236
  // the parse resolves all of it.
1222
1237
  // - A route that the ACTOR built is a path already. `buildRouteUrl` of
1223
- // `@xmachines/play-xstate` substitutes each `:param` of the template and leaves
1224
- // every escape as the template wrote it, so a BACKSLASH still means an escape
1225
- // there — and nothing else does. A brace in such a path is a real brace, and
1238
+ // `@xmachines/play-xstate` reads the whole grammar and resolves every escape, so
1239
+ // a route that IT built carries no backslash. An actor of another kind can still
1240
+ // write one, and a BACKSLASH is the one construct that means grammar in such a
1241
+ // path — and nothing else does. A brace in such a path is a real brace, and
1226
1242
  // `/i18n/{en}` from an actor is the location `/i18n/{en}`.
1227
1243
  //
1228
1244
  // A route of the map is a pattern source WHOLE, and its `?` is a modifier and never
@@ -1234,7 +1250,7 @@ export class RouterBridgeBase {
1234
1250
  // all reached the address bar as they stand, where `getStateIdByPath` answers them
1235
1251
  // never.
1236
1252
  if (mapped != null)
1237
- return parsePattern(path).literalPath;
1253
+ return parsePattern(path, this.compileOptions).literalPath;
1238
1254
  // A route of the ACTOR carries its query, because `context.query` travels in
1239
1255
  // `currentRoute`, and the PATHNAME half alone reaches the grammar for it. A query
1240
1256
  // holds a ":" and a "*" legally — a time in "?at=10:30", a URL in "?next=https://x",
@@ -1245,12 +1261,11 @@ export class RouterBridgeBase {
1245
1261
  // `lastSyncedPath` and navigated nowhere, and the dedup guard then suppressed the
1246
1262
  // next attempt at the same route as an echo. The suffix carries no grammar, and it
1247
1263
  // travels to the router unchanged.
1248
- const mark = firstMarkIndex(path);
1249
- const pathname = mark === -1 ? path : path.slice(0, mark);
1264
+ const { pathname, suffix } = splitLocation(path);
1250
1265
  // A BACKSLASH is the one construct that reaches an actor route unresolved, and this
1251
1266
  // is where it resolves.
1252
1267
  if (pathname.includes("\\")) {
1253
- const literal = parsePattern(pathname).literalPath;
1268
+ const literal = parsePattern(pathname, this.compileOptions).literalPath;
1254
1269
  // The resolution FAILED, so this route resolves to no concrete path and the
1255
1270
  // bridge pushes nothing. A fall to the test below refused none of it — a backslash
1256
1271
  // is neither a ":" nor a "*" — so the SOURCE went to the address bar with its
@@ -1259,7 +1274,7 @@ export class RouterBridgeBase {
1259
1274
  // route as an echo. `encodeURIComponent` leaves "(", ")", "!", "'" and "~" as they
1260
1275
  // stand, so a param value of `f(x)` under a template that carries an escape —
1261
1276
  // `/files/c\+\+/:name` — reaches this line and derives no literal path.
1262
- return literal === null ? null : `${literal}${mark === -1 ? "" : path.slice(mark)}`;
1277
+ return literal === null ? null : `${literal}${suffix}`;
1263
1278
  }
1264
1279
  // The test is `holdsUnsubstitutedParam` and NOT `isParameterizedPattern`, because
1265
1280
  // this string is a concrete path and not a pattern. Its own documentation gives the
@@ -1325,7 +1340,7 @@ export class RouterBridgeBase {
1325
1340
  // actor standing exactly at this location as "somewhere else": `performInitialSync`
1326
1341
  // read that as a deep link and sent a `play.route` for the state the actor was in
1327
1342
  // already, so every entry action of that state ran a second time.
1328
- const [actorPath] = splitLocation(actorRoute);
1343
+ const { pathname: actorPath } = splitLocation(actorRoute);
1329
1344
  // An ESCAPED literal route resolves on that same half, and its two forms are never
1330
1345
  // the identical string: the actor carries `/tags/c\+\+`, which is what the template
1331
1346
  // writes, and the router stands at `/tags/c++`, which is the path that the route
@@ -1333,7 +1348,9 @@ export class RouterBridgeBase {
1333
1348
  // PATHNAME, and not the whole string, for two reasons: a `?` is a modifier of the
1334
1349
  // grammar that makes `/tags/c\+\+?ref=nav` malformed, and a query would key the
1335
1350
  // bounded parse cache on a string that no route map holds.
1336
- const literalPath = actorPath.includes("\\") ? parsePattern(actorPath).literalPath : null;
1351
+ const literalPath = actorPath.includes("\\")
1352
+ ? parsePattern(actorPath, this.compileOptions).literalPath
1353
+ : null;
1337
1354
  // The pathname test answers with no map at all, and it has to run FIRST: the lookup
1338
1355
  // below returns nothing for a location that the map does not hold, and the early
1339
1356
  // return then reported an actor standing exactly at that location as "somewhere
@@ -1391,10 +1408,10 @@ export class RouterBridgeBase {
1391
1408
  * callback reports the pathname and the search SEPARATELY, and `sanitizePathname`
1392
1409
  * removes the query. A comparison of the pathname alone therefore misses for every
1393
1410
  * route with a query, and the push of this bridge comes back as a `play.route` event
1394
- * of its own navigation. That echo is not only wasted work: it writes to the signal
1395
- * graph from inside the watcher callback of the actor route, and the watcher then
1396
- * arms itself again on a computed that is dirty already, which ends the direction
1397
- * from the actor to the router for the rest of the session.
1411
+ * of its own navigation. That echo is not only wasted work: the bridge sends a
1412
+ * `play.route` for a location that the actor stands on already, so every entry action
1413
+ * of that state runs a second time, and a guard that refuses the repeat moves the
1414
+ * actor to a state that no user asked for.
1398
1415
  *
1399
1416
  * The query is compared as a MAP, and not as a string: a framework can re-serialize
1400
1417
  * a search string in another order, and `URLSearchParams` also accepts the form with
@@ -1414,7 +1431,7 @@ export class RouterBridgeBase {
1414
1431
  // move that keeps the path and changes the query, which a filter link does, and
1415
1432
  // which a `validateSearch` of a route does when it injects a default. The actor
1416
1433
  // then never hears of the move, and the URL and the actor diverge.
1417
- const [lastPath, lastQuery] = splitLocation(last);
1434
+ const { pathname: lastPath, query: lastQuery } = splitLocation(last);
1418
1435
  if (lastPath !== sanitized)
1419
1436
  return false;
1420
1437
  return sortedQuery(lastQuery) === sortedQuery(search ?? "");
@@ -1478,33 +1495,6 @@ export class RouterBridgeBase {
1478
1495
  return undefined;
1479
1496
  }
1480
1497
  }
1481
- /**
1482
- * Splits a location into its path, its query with no leading `?`, and its fragment
1483
- * with its leading `#`.
1484
- *
1485
- * A '#' after index 0 ends the pathname. `pushResolvedRoute` writes what the actor
1486
- * gave — "/docs#intro" — while the callback of the router reports "/docs", because
1487
- * `sanitizePathname` strips the fragment: an echo test that compared the two whole
1488
- * strings missed, so the bridge answered its own push with an event and a history entry
1489
- * that BACK cannot escape.
1490
- *
1491
- * The fragment comes back as the THIRD field, and each caller decides whether it
1492
- * counts: `isEchoOfLastPush` compares it, because `navigateRouter` writes it, and
1493
- * `isEchoOfLastSync` drops it, because the router reports it never.
1494
- *
1495
- * At index 0 the '#' is NOT a fragment: `lastSyncedPath` legitimately holds a bare
1496
- * stateId such as "#home", which `pushResolvedRoute` stores when it can resolve no
1497
- * path. Cutting there would turn that value into the empty string.
1498
- */
1499
- function splitLocation(location) {
1500
- const fragmentAt = location.indexOf("#", 1);
1501
- const withoutFragment = fragmentAt === -1 ? location : location.slice(0, fragmentAt);
1502
- const fragment = fragmentAt === -1 ? "" : location.slice(fragmentAt);
1503
- const mark = withoutFragment.indexOf("?");
1504
- if (mark === -1)
1505
- return [withoutFragment, "", fragment];
1506
- return [withoutFragment.slice(0, mark), withoutFragment.slice(mark + 1), fragment];
1507
- }
1508
1498
  /**
1509
1499
  * True when the query of an actor route and the query of the router are the same query.
1510
1500
  *
@@ -1524,7 +1514,7 @@ function splitLocation(location) {
1524
1514
  * @param search - The query of the router, or `undefined` when it has none.
1525
1515
  */
1526
1516
  function sameQuery(actorRoute, search) {
1527
- const [, actorQuery, fragment] = splitLocation(actorRoute);
1517
+ const { query: actorQuery, fragment } = splitLocation(actorRoute);
1528
1518
  // A FRAGMENT is a difference, always. `sanitizePathname` cuts it off, so the router
1529
1519
  // reports one never and this comparison can confirm one never — and "unknown" must not
1530
1520
  // read as "the same". An actor that carries `/#intro` against a router at `/` is the
@@ -1550,7 +1540,7 @@ function sameQuery(actorRoute, search) {
1550
1540
  * @param actorRoute - The raw value of the actor route.
1551
1541
  */
1552
1542
  function carriesNoOwnSuffix(actorRoute) {
1553
- const [, query, fragment] = splitLocation(actorRoute);
1543
+ const { query, fragment } = splitLocation(actorRoute);
1554
1544
  return query === "" && fragment === "";
1555
1545
  }
1556
1546
  /** Joins a pathname and a query into one location value. An empty query adds nothing. */
@@ -1581,17 +1571,34 @@ function sortedQuery(search) {
1581
1571
  return pairs.toSorted().join("&");
1582
1572
  }
1583
1573
  function noopCleanup() { }
1584
- function createRouteWatcher(signal, onRoute) {
1574
+ /**
1575
+ * Watches the route atom of the actor.
1576
+ *
1577
+ * The bridge wraps the read in NOTHING. A subscription evaluates a computed atom inside
1578
+ * the `set` of the actor state, so a throw from the derivation would unwind into
1579
+ * `actor.send` and break the transition for every other observer — and `currentRoute`
1580
+ * therefore contains its own failures, reports them through `onError` of the actor, and
1581
+ * keeps its last route. Every subscriber benefits from that rule, and not this bridge
1582
+ * alone.
1583
+ */
1584
+ function createRouteWatcher(atom, onRoute) {
1585
1585
  let cleanup = noopCleanup;
1586
1586
  const watcher = {
1587
- watch(nextSignal) {
1588
- cleanup = watchSignal(nextSignal, onRoute);
1587
+ watch(nextAtom) {
1588
+ // Release the watch that this handle holds already. `RouteWatcherHandle` is a
1589
+ // published type, so a bridge of a consumer can repoint the handle at the atom of
1590
+ // a new actor — and an assignment alone dropped the reference to the first
1591
+ // cleanup, which left the first subscription live for the life of the process.
1592
+ watcher.unwatch();
1593
+ cleanup = watchAtom(nextAtom, onRoute);
1589
1594
  },
1590
1595
  unwatch() {
1591
- cleanup();
1596
+ const release = cleanup;
1597
+ cleanup = noopCleanup;
1598
+ release();
1592
1599
  },
1593
1600
  };
1594
- watcher.watch(signal);
1601
+ watcher.watch(atom);
1595
1602
  return watcher;
1596
1603
  }
1597
1604
  /**
@@ -1604,8 +1611,8 @@ function createRouteWatcher(signal, onRoute) {
1604
1611
  * address bar for ever.
1605
1612
  */
1606
1613
  function sameLocation(a, b) {
1607
- const [aPath, aQuery, aFragment] = splitLocation(a);
1608
- const [bPath, bQuery, bFragment] = splitLocation(b);
1614
+ const { pathname: aPath, query: aQuery, fragment: aFragment } = splitLocation(a);
1615
+ const { pathname: bPath, query: bQuery, fragment: bFragment } = splitLocation(b);
1609
1616
  if (aPath !== bPath)
1610
1617
  return false;
1611
1618
  if (aFragment !== bFragment)
@@ -1 +1 @@
1
- {"version":3,"file":"router-bridge-base.js","sourceRoot":"","sources":["../src/router-bridge-base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EACN,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,aAAa,GAGb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,wBAAwB,EAAE,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AO,CAAC;AAChB,CAAC;AAUD;;;;;;;;GAQG;AACH,SAAS,YAAY,CAAC,CAAS,EAAE,CAAS;IACzC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IACjF,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IACjF,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAClC,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC1C,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,WAAW,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type CompileOptions } from "@xmachines/play-url";
1
2
  import type { PlayRouteEvent } from "./types.js";
2
3
  export interface RouteMatch {
3
4
  to: string | null | undefined;
@@ -19,31 +20,6 @@ export interface RouterStateIdMap {
19
20
  * Therefore the semantics of the match in the route map stay identical.
20
21
  */
21
22
  export declare function matchRouteMap(pathname: string, routeMap: RouterStateIdMap, extractParams: (pathname: string, stateId: string) => Record<string, string>): RouteMatch;
22
- /**
23
- * Normalizes a pathname before a lookup in the route map.
24
- *
25
- * The function removes a query fragment and a hash fragment, it joins each duplicate
26
- * slash into one, and it refuses a path of an improbable length, because such a path
27
- * must never enter the route resolution.
28
- *
29
- * It returns `null` for a path of more than 2048 characters, which is malformed or
30
- * hostile input. An adapter that passes around
31
- * `RouterBridgeBase.syncActorFromRouter()`, for example `VueRouterBridge`, must call
32
- * this function itself, and it must return at once on a `null` value. That adapter
33
- * then gives the same guarantee of the defense in depth as the shared base class.
34
- *
35
- * @param pathname - The raw path string of a navigation event of the router.
36
- * @returns The normalized path string, or `null` when the path is malformed or too long.
37
- *
38
- * @example
39
- * ```typescript
40
- * import { sanitizePathname } from "@xmachines/play-router";
41
- *
42
- * const clean = sanitizePathname(to.path);
43
- * if (clean === null) return; // refuse a malformed path
44
- * ```
45
- */
46
- export declare function sanitizePathname(pathname: string): string | null;
47
23
  /**
48
24
  * Reads the named path parameters of a URL, with the URLPattern API.
49
25
  *
@@ -80,7 +56,7 @@ export declare function sanitizePathname(pathname: string): string | null;
80
56
  * // → {} — the optional param is absent, and the object holds it not
81
57
  * ```
82
58
  */
83
- export declare function extractRouteParams(pathname: string, pattern: string): Record<string, string>;
59
+ export declare function extractRouteParams(pathname: string, pattern: string, options?: CompileOptions): Record<string, string>;
84
60
  /**
85
61
  * Parses a URL search string into the plain object that a `play.route` event
86
62
  * needs.
@@ -1 +1 @@
1
- {"version":3,"file":"router-sync.d.ts","sourceRoot":"","sources":["../src/router-sync.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,WAAW,UAAU;IAC1B,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,UAAU,CAAC;CACjD;AAED,MAAM,WAAW,gBAAgB;IAChC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1D,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC5B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,gBAAgB,EAC1B,aAAa,EAAE,CAAC,QAAQ,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,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1D,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC5B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,gBAAgB,EAC1B,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1E,UAAU,CAUZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,GACtB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4BxB;AAeD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBnE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,0BAA0B,GACjC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,cAAc,CAAA;CAAE,GAAG,IAAI,CAsBpD"}
@@ -1,4 +1,4 @@
1
- import { getCompiledPattern, getNormalizedParamNameMap, isParameterizedPattern, } from "@xmachines/play-url";
1
+ import { getCompiledPattern, parsePattern, sanitizePathname, } from "@xmachines/play-url";
2
2
  /**
3
3
  * Matches a clean pathname against a route map, and reads each param of the match.
4
4
  *
@@ -15,42 +15,6 @@ export function matchRouteMap(pathname, routeMap, extractParams) {
15
15
  params: extractParams(pathname, stateId),
16
16
  };
17
17
  }
18
- /**
19
- * Normalizes a pathname before a lookup in the route map.
20
- *
21
- * The function removes a query fragment and a hash fragment, it joins each duplicate
22
- * slash into one, and it refuses a path of an improbable length, because such a path
23
- * must never enter the route resolution.
24
- *
25
- * It returns `null` for a path of more than 2048 characters, which is malformed or
26
- * hostile input. An adapter that passes around
27
- * `RouterBridgeBase.syncActorFromRouter()`, for example `VueRouterBridge`, must call
28
- * this function itself, and it must return at once on a `null` value. That adapter
29
- * then gives the same guarantee of the defense in depth as the shared base class.
30
- *
31
- * @param pathname - The raw path string of a navigation event of the router.
32
- * @returns The normalized path string, or `null` when the path is malformed or too long.
33
- *
34
- * @example
35
- * ```typescript
36
- * import { sanitizePathname } from "@xmachines/play-router";
37
- *
38
- * const clean = sanitizePathname(to.path);
39
- * if (clean === null) return; // refuse a malformed path
40
- * ```
41
- */
42
- export function sanitizePathname(pathname) {
43
- if (pathname.length > 2048)
44
- return null;
45
- // `slice` to the first separator. `split` allocates an array for a value that the
46
- // code reads once, and its first element reads `string | undefined` although a split
47
- // answers one element always.
48
- const queryAt = pathname.indexOf("?");
49
- const withoutQuery = queryAt === -1 ? pathname : pathname.slice(0, queryAt);
50
- const hashAt = withoutQuery.indexOf("#");
51
- const withoutHash = hashAt === -1 ? withoutQuery : withoutQuery.slice(0, hashAt);
52
- return withoutHash.replace(/\/+/g, "/");
53
- }
54
18
  /**
55
19
  * Reads the named path parameters of a URL, with the URLPattern API.
56
20
  *
@@ -87,18 +51,21 @@ export function sanitizePathname(pathname) {
87
51
  * // → {} — the optional param is absent, and the object holds it not
88
52
  * ```
89
53
  */
90
- export function extractRouteParams(pathname, pattern) {
91
- if (!isParameterizedPattern(pattern))
54
+ export function extractRouteParams(pathname, pattern, options) {
55
+ // ONE parse answers both questions of this function: does the pattern need a match,
56
+ // and which name does each URLPattern group carry.
57
+ const parsed = parsePattern(pattern, options);
58
+ if (!parsed.parameterized)
92
59
  return {};
93
60
  // Compile the pattern with the SAME normalization as the match in RouteMap.
94
61
  // Without it, URLPattern reads ":cat-id" as the group ":cat" and the literal "-id",
95
62
  // and the read of the params then contradicts the map that matched the path.
96
- const urlPattern = getCompiledPattern(pattern);
63
+ const urlPattern = getCompiledPattern(pattern, options);
97
64
  const match = urlPattern.exec({ pathname });
98
65
  if (!match?.pathname.groups)
99
66
  return {};
100
67
  // Map each normalized group name (":cat_id") back to its original param name ("cat-id").
101
- const nameMap = getNormalizedParamNameMap(pattern);
68
+ const nameMap = parsed.declaredNames;
102
69
  // A null prototype for the accumulator, exactly as `cleanFrameworkParams` uses: a plain
103
70
  // `{}` turns `params["__proto__"] = value` into a write of the PROTOTYPE setter, which
104
71
  // drops the value in silence. A machine that declares `/:__proto__` then received `{}`