@opentf/web 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentf/web",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "The native-first OTF Web runtime — signal-based reactivity and zero-VDOM DOM operations, paired with the IR-based compiler.",
5
5
  "type": "module",
6
6
  "exports": {
package/runtime/router.js CHANGED
@@ -338,7 +338,13 @@ export async function navigate(path, replace = false, isPop = false, hydrate = f
338
338
  if (guard) {
339
339
  let redirected = false;
340
340
  const to = {
341
+ // `pathname` is the documented, platform-standard field (matches the URL API
342
+ // and `router.pathname`); `path` is kept as a back-compat alias. `fullPath`
343
+ // is the whole relative URL (pathname + query + hash), for guards that need to
344
+ // preserve or inspect the query/hash (e.g. redirect back after login).
345
+ pathname: url.pathname,
341
346
  path: url.pathname,
347
+ fullPath: url.pathname + url.search + url.hash,
342
348
  params: matchRoute(url.pathname)?.params || {},
343
349
  query: Object.fromEntries(url.searchParams),
344
350
  };