@vertesia/ui 1.3.0-dev.20260620.091720Z → 1.3.0-dev.20260621.071017Z
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/lib/router/Router.d.ts.map +1 -1
- package/lib/router/Router.js +7 -3
- package/lib/router/Router.js.map +1 -1
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js +15 -7
- package/lib/session/UserSession.js.map +1 -1
- package/lib/session/auth/domainRouting.d.ts +10 -0
- package/lib/session/auth/domainRouting.d.ts.map +1 -1
- package/lib/session/auth/domainRouting.js +15 -0
- package/lib/session/auth/domainRouting.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/package.json +6 -6
- package/src/router/Router.tsx +7 -3
- package/src/session/UserSession.ts +15 -7
- package/src/session/auth/domainRouting.test.ts +28 -1
- package/src/session/auth/domainRouting.ts +16 -0
|
@@ -33,3 +33,19 @@ export function authReturnUrl(): URL {
|
|
|
33
33
|
target.hash = '';
|
|
34
34
|
return target;
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The app's mount root URL — the served `<base href>` (or the origin root for the Studio UI).
|
|
39
|
+
*
|
|
40
|
+
* Used for full-reload navigations that intentionally reset to the app root (logout, account /
|
|
41
|
+
* project switch). Building these from a bare `/` drops a gateway-mounted app off its mount and
|
|
42
|
+
* lands on a URL that serves no app; resolving against `document.baseURI` keeps the reload inside
|
|
43
|
+
* the mount. For the Studio UI (no `<base>` element) `document.baseURI` is the origin root, so the
|
|
44
|
+
* behavior is unchanged.
|
|
45
|
+
*/
|
|
46
|
+
export function mountRootUrl(): URL {
|
|
47
|
+
const url = new URL(document.baseURI);
|
|
48
|
+
url.hash = '';
|
|
49
|
+
url.search = '';
|
|
50
|
+
return url;
|
|
51
|
+
}
|