@hexclave/tanstack-start 1.0.25 → 1.0.27

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 (88) hide show
  1. package/dist/components/api-key-dialogs.d.ts +1 -1
  2. package/dist/components/elements/ssr-layout-effect.d.ts.map +1 -1
  3. package/dist/components/elements/ssr-layout-effect.js +5 -3
  4. package/dist/components/elements/ssr-layout-effect.js.map +1 -1
  5. package/dist/components-page/hexclave-handler-client.js +6 -5
  6. package/dist/components-page/hexclave-handler-client.js.map +1 -1
  7. package/dist/dev-tool/dev-tool-core.js +1 -1
  8. package/dist/dev-tool/dev-tool-core.js.map +1 -1
  9. package/dist/esm/components/api-key-dialogs.d.ts +1 -1
  10. package/dist/esm/components/elements/ssr-layout-effect.d.ts.map +1 -1
  11. package/dist/esm/components/elements/ssr-layout-effect.js +5 -3
  12. package/dist/esm/components/elements/ssr-layout-effect.js.map +1 -1
  13. package/dist/esm/components-page/hexclave-handler-client.js +6 -5
  14. package/dist/esm/components-page/hexclave-handler-client.js.map +1 -1
  15. package/dist/esm/dev-tool/dev-tool-core.js +1 -1
  16. package/dist/esm/dev-tool/dev-tool-core.js.map +1 -1
  17. package/dist/esm/generated/quetzal-translations.d.ts +2 -2
  18. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +7 -0
  19. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  20. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js +33 -1
  21. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
  22. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -0
  23. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
  24. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +9 -8
  25. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
  26. package/dist/esm/lib/hexclave-app/apps/implementations/common.js +1 -1
  27. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts +1 -0
  28. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
  29. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js +44 -19
  30. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
  31. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js +97 -8
  32. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -1
  33. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts +2 -1
  34. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
  35. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
  36. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
  37. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
  38. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
  39. package/dist/esm/lib/hexclave-app/index.d.ts +2 -1
  40. package/dist/esm/lib/hexclave-app/plan-usage/index.d.ts +27 -0
  41. package/dist/esm/lib/hexclave-app/plan-usage/index.d.ts.map +1 -0
  42. package/dist/esm/lib/hexclave-app/plan-usage/index.js +1 -0
  43. package/dist/esm/lib/hexclave-app/projects/index.d.ts +1 -0
  44. package/dist/esm/lib/hexclave-app/projects/index.d.ts.map +1 -1
  45. package/dist/esm/lib/hexclave-app/projects/index.js.map +1 -1
  46. package/dist/generated/quetzal-translations.d.ts +2 -2
  47. package/dist/index.d.ts +2 -1
  48. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +7 -0
  49. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  50. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js +33 -1
  51. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
  52. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -0
  53. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
  54. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +9 -8
  55. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
  56. package/dist/lib/hexclave-app/apps/implementations/common.js +1 -1
  57. package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts +1 -0
  58. package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
  59. package/dist/lib/hexclave-app/apps/implementations/session-replay.js +43 -18
  60. package/dist/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
  61. package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js +97 -8
  62. package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -1
  63. package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts +2 -1
  64. package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
  65. package/dist/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
  66. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
  67. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
  68. package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
  69. package/dist/lib/hexclave-app/index.d.ts +2 -1
  70. package/dist/lib/hexclave-app/plan-usage/index.d.ts +27 -0
  71. package/dist/lib/hexclave-app/plan-usage/index.d.ts.map +1 -0
  72. package/dist/lib/hexclave-app/plan-usage/index.js +0 -0
  73. package/dist/lib/hexclave-app/projects/index.d.ts +1 -0
  74. package/dist/lib/hexclave-app/projects/index.d.ts.map +1 -1
  75. package/dist/lib/hexclave-app/projects/index.js.map +1 -1
  76. package/package.json +3 -3
  77. package/src/components/elements/ssr-layout-effect.tsx +15 -3
  78. package/src/components-page/hexclave-handler-client.tsx +6 -5
  79. package/src/dev-tool/dev-tool-core.ts +1 -1
  80. package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +38 -1
  81. package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +9 -8
  82. package/src/lib/hexclave-app/apps/implementations/session-replay.test.ts +123 -4
  83. package/src/lib/hexclave-app/apps/implementations/session-replay.ts +63 -29
  84. package/src/lib/hexclave-app/apps/interfaces/admin-app.ts +2 -0
  85. package/src/lib/hexclave-app/apps/interfaces/client-app.ts +1 -0
  86. package/src/lib/hexclave-app/index.ts +8 -0
  87. package/src/lib/hexclave-app/plan-usage/index.ts +29 -0
  88. package/src/lib/hexclave-app/projects/index.ts +1 -0
@@ -4,7 +4,7 @@ import { ApiKey, ApiKeyCreationOptions, ApiKeyType } from "../lib/hexclave-app/a
4
4
  //#region src/components/api-key-dialogs.d.ts
5
5
  declare const neverInMs: number;
6
6
  declare const expiresInOptions: {
7
- readonly [x: number]: "1 day" | "7 days" | "30 days" | "90 days" | "1 year" | "Never";
7
+ readonly [x: number]: "Never" | "1 day" | "7 days" | "30 days" | "90 days" | "1 year";
8
8
  };
9
9
  /**
10
10
  * Dialog for creating a new API key
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-layout-effect.d.ts","names":[],"sources":["../../../../src/components/elements/ssr-layout-effect.tsx"],"mappings":";;;iBAQgB,SAAA,CAAU,KAAA;EAAS,MAAA;EAAgB,KAAA;AAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"ssr-layout-effect.d.ts","names":[],"sources":["../../../../src/components/elements/ssr-layout-effect.tsx"],"mappings":";;;iBAYgB,SAAA,CAAU,KAAA;EAAS,MAAA;EAAgB,KAAA;AAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -4,14 +4,16 @@ import { useLayoutEffect } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/elements/ssr-layout-effect.tsx
7
+ function escapeHtmlAttr(str) {
8
+ return str.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
9
+ }
7
10
  function SsrScript(props) {
8
11
  useLayoutEffect(() => {
9
12
  (0, eval)(props.script);
10
13
  }, []);
11
- return /* @__PURE__ */ jsx("script", {
14
+ return /* @__PURE__ */ jsx("span", {
12
15
  suppressHydrationWarning: true,
13
- nonce: props.nonce,
14
- dangerouslySetInnerHTML: { __html: props.script }
16
+ dangerouslySetInnerHTML: { __html: `<script${props.nonce ? ` nonce="${escapeHtmlAttr(props.nonce)}"` : ""}>${props.script}<\/script>` }
15
17
  });
16
18
  }
17
19
 
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-layout-effect.js","names":[],"sources":["../../../../src/components/elements/ssr-layout-effect.tsx"],"sourcesContent":["\"use client\";\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { useLayoutEffect } from \"react\";\n\nexport function SsrScript(props: { script: string, nonce?: string }) {\n useLayoutEffect(() => {\n // TODO fix workaround: React has a bug where it doesn't run the script on the first CSR render if SSR has been skipped due to suspense\n // As a workaround, we run the script in the <script> tag again after the first render\n // Note that we do an indirect eval as described here: https://esbuild.github.io/content-types/#direct-eval\n (0, eval)(props.script);\n }, []);\n\n return (\n <script\n suppressHydrationWarning // the transpiler is setup differently for client/server targets, so if `script` was generated with Function.toString they will differ\n nonce={props.nonce}\n dangerouslySetInnerHTML={{ __html: props.script }}\n />\n );\n}\n"],"mappings":";;;;;;AAQA,SAAgB,UAAU,OAA2C;AACnE,uBAAsB;AAIpB,GAAC,GAAG,MAAM,MAAM,OAAO;IACtB,EAAE,CAAC;AAEN,QACE,oBAAC;EACC;EACA,OAAO,MAAM;EACb,yBAAyB,EAAE,QAAQ,MAAM,QAAQ;GACjD"}
1
+ {"version":3,"file":"ssr-layout-effect.js","names":[],"sources":["../../../../src/components/elements/ssr-layout-effect.tsx"],"sourcesContent":["\"use client\";\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { useLayoutEffect } from \"react\";\n\nfunction escapeHtmlAttr(str: string): string {\n return str.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n\nexport function SsrScript(props: { script: string, nonce?: string }) {\n useLayoutEffect(() => {\n // TODO fix workaround: React has a bug where it doesn't run the script on the first CSR render if SSR has been skipped due to suspense\n // As a workaround, we run the script in the <script> tag again after the first render\n // Note that we do an indirect eval as described here: https://esbuild.github.io/content-types/#direct-eval\n (0, eval)(props.script);\n }, []);\n\n // Embed the <script> in a span's innerHTML rather than as a React <script> JSX element to\n // avoid React 19's \"Scripts inside React components are never executed when rendering on the\n // client\" warning. The browser still executes the script during SSR HTML parsing, and on the\n // client React sets innerHTML but the browser won't re-execute the script (innerHTML scripts\n // don't run). Using the same HTML on both sides avoids hydration mismatches.\n const nonceAttr = props.nonce ? ` nonce=\"${escapeHtmlAttr(props.nonce)}\"` : '';\n\n return (\n <span\n suppressHydrationWarning // the transpiler is setup differently for client/server targets, so if `script` was generated with Function.toString they will differ\n dangerouslySetInnerHTML={{\n __html: `<script${nonceAttr}>${props.script}</script>`,\n }}\n />\n );\n}\n"],"mappings":";;;;;;AAQA,SAAS,eAAe,KAAqB;AAC3C,QAAO,IAAI,QAAQ,MAAM,QAAQ,CAAC,QAAQ,MAAM,SAAS,CAAC,QAAQ,MAAM,OAAO,CAAC,QAAQ,MAAM,OAAO;;AAGvG,SAAgB,UAAU,OAA2C;AACnE,uBAAsB;AAIpB,GAAC,GAAG,MAAM,MAAM,OAAO;IACtB,EAAE,CAAC;AASN,QACE,oBAAC;EACC;EACA,yBAAyB,EACvB,QAAQ,UANI,MAAM,QAAQ,WAAW,eAAe,MAAM,MAAM,CAAC,KAAK,GAM1C,GAAG,MAAM,OAAO,aAC7C;GACD"}
@@ -143,7 +143,7 @@ function renderComponent(props) {
143
143
  });
144
144
  default: {
145
145
  if (Object.values(availablePaths).includes(path)) throw new HexclaveAssertionError(`Path alias ${path} not included in switch statement, but in availablePaths?`, { availablePaths });
146
- for (const [key, value] of Object.entries(pathAliases)) if (path.toLowerCase().replaceAll("-", "") === key.toLowerCase().replaceAll("-", "")) return { redirect: `${app.urls.handler}/${value}?${new URLSearchParams(searchParams).toString()}` };
146
+ for (const [key, value] of Object.entries(pathAliases)) if (path.toLowerCase().replaceAll("-", "") === key.toLowerCase().replaceAll("-", "")) return { redirect: `${app[hexclaveAppInternalsSymbol].getUrls().handler}/${value}?${new URLSearchParams(searchParams).toString()}` };
147
147
  const defaultUnknownPathUrl = getDefaultUnknownPathUrl?.(path);
148
148
  if (defaultUnknownPathUrl != null) {
149
149
  const defaultUnknownPathUrlObject = new URL(defaultUnknownPathUrl, "http://example.com");
@@ -184,15 +184,16 @@ function RedirectToPage(props) {
184
184
  }
185
185
  function HexclaveHandlerClient(props) {
186
186
  const hexclaveApp = useStackApp$1();
187
+ const handlerUrls = hexclaveApp[hexclaveAppInternalsSymbol].getUrls();
187
188
  const clientOrigin = useClientOriginAfterHydration();
188
189
  const navigate = hexclaveApp.useNavigate();
189
190
  const navigateRef = useRef(navigate);
190
191
  navigateRef.current = navigate;
191
- const currentLocation = props.location ?? (typeof window === "undefined" ? new URL(hexclaveApp.urls.handler, placeholderOrigin).pathname : window.location.pathname);
192
+ const currentLocation = props.location ?? (typeof window === "undefined" ? new URL(handlerUrls.handler, placeholderOrigin).pathname : window.location.pathname);
192
193
  const searchParamsSource = new URLSearchParams(typeof window === "undefined" ? "" : window.location.search);
193
194
  const redirectTargets = [];
194
195
  const { path, searchParams, handlerPath } = useMemo(() => {
195
- const handlerPath = new URL(hexclaveApp.urls.handler, "http://example.com").pathname;
196
+ const handlerPath = new URL(handlerUrls.handler, "http://example.com").pathname;
196
197
  return {
197
198
  path: currentLocation.startsWith(handlerPath) ? currentLocation.slice(handlerPath.length).replace(/^\/+/, "") : currentLocation.replace(/^\/+/, ""),
198
199
  searchParams: Object.fromEntries(searchParamsSource.entries()),
@@ -201,7 +202,7 @@ function HexclaveHandlerClient(props) {
201
202
  }, [
202
203
  currentLocation,
203
204
  searchParamsSource,
204
- hexclaveApp.urls.handler
205
+ handlerUrls.handler
205
206
  ]);
206
207
  const getDefaultUnknownPathUrl = (unknownPath) => {
207
208
  return resolveUnknownHandlerPathFallbackUrl({
@@ -211,7 +212,7 @@ function HexclaveHandlerClient(props) {
211
212
  });
212
213
  };
213
214
  const shouldRedirectToPage = (name) => {
214
- const url = hexclaveApp.urls[name];
215
+ const url = handlerUrls[name];
215
216
  if (name === "oauthCallback" && searchParams.hexclave_cross_domain_auth === "1") return false;
216
217
  return !isLocalHandlerUrlTarget({
217
218
  targetUrl: url,
@@ -1 +1 @@
1
- {"version":3,"file":"hexclave-handler-client.js","names":["MessageCard","useStackApp"],"sources":["../../../src/components-page/hexclave-handler-client.tsx"],"sourcesContent":["\"use client\";\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\n\nimport { KnownError } from \"@hexclave/shared\";\nimport { captureError, HexclaveAssertionError } from \"@hexclave/shared/dist/utils/errors\";\nimport { FilterUndefined, filterUndefined } from \"@hexclave/shared/dist/utils/objects\";\nimport { use } from \"@hexclave/shared/dist/utils/react\";\nimport { getRelativePart } from \"@hexclave/shared/dist/utils/urls\";\nimport { Suspense, useMemo, useSyncExternalStore } from 'react';\nimport { useEffect, useRef } from 'react';\nimport { SignIn, SignUp, StackServerApp } from \"..\";\nimport { useStackApp } from \"../lib/hooks\";\nimport { HandlerUrls, StackClientApp, hexclaveAppInternalsSymbol } from \"../lib/hexclave-app\";\nimport { isLocalHandlerUrlTarget, resolveUnknownHandlerPathFallbackUrl } from \"../lib/hexclave-app/url-targets\";\nimport { AccountSettings } from \"./account-settings\";\nimport { CliAuthConfirmation } from \"./cli-auth-confirm\";\nimport { EmailVerification } from \"./email-verification\";\nimport { ErrorPage } from \"./error-page\";\nimport { ForgotPassword } from \"./forgot-password\";\nimport { MagicLinkCallback } from \"./magic-link-callback\";\nimport { MFA } from \"./mfa\";\nimport { OAuthCallback } from \"./oauth-callback\";\nimport { Onboarding } from \"./onboarding\";\nimport { PasswordReset } from \"./password-reset\";\nimport { SignOut } from \"./sign-out\";\nimport { TeamInvitation } from \"./team-invitation\";\n\nimport { KnownErrorMessageCard } from \"../components/message-cards/known-error-message-card\";\nimport { MessageCard } from \"../components/message-cards/message-card\";\nimport { PredefinedMessageCard } from \"../components/message-cards/predefined-message-card\";\n\ntype Components = {\n SignIn: typeof SignIn,\n SignUp: typeof SignUp,\n EmailVerification: typeof EmailVerification,\n PasswordReset: typeof PasswordReset,\n ForgotPassword: typeof ForgotPassword,\n SignOut: typeof SignOut,\n OAuthCallback: typeof OAuthCallback,\n MagicLinkCallback: typeof MagicLinkCallback,\n TeamInvitation: typeof TeamInvitation,\n ErrorPage: typeof ErrorPage,\n AccountSettings: typeof AccountSettings,\n CliAuthConfirmation: typeof CliAuthConfirmation,\n MFA: typeof MFA,\n Onboarding: typeof Onboarding,\n};\n\ntype RouteProps = {\n params: Promise<{ stack?: string[] }> | { stack?: string[] },\n searchParams: Promise<Record<string, string>> | Record<string, string>,\n};\n\ntype RedirectToPageResult =\n | { status: \"success\" }\n | { status: \"known-error\", error: KnownError }\n | { status: \"unknown-error\" };\n\nconst availablePaths = {\n signIn: 'sign-in',\n signUp: 'sign-up',\n emailVerification: 'email-verification',\n passwordReset: 'password-reset',\n forgotPassword: 'forgot-password',\n signOut: 'sign-out',\n oauthCallback: 'oauth-callback',\n magicLinkCallback: 'magic-link-callback',\n teamInvitation: 'team-invitation',\n accountSettings: 'account-settings',\n cliAuthConfirm: 'cli-auth-confirm',\n mfa: 'mfa',\n error: 'error',\n onboarding: 'onboarding',\n} as const;\n\nconst placeholderOrigin = \"http://example.com\";\n\nconst pathAliases = {\n // also includes the uppercase and non-dashed versions\n ...Object.fromEntries(Object.entries(availablePaths).map(([key, value]) => [value, value])),\n \"log-in\": availablePaths.signIn,\n \"register\": availablePaths.signUp,\n} as const;\n\nexport type BaseHandlerProps = {\n fullPage: boolean,\n componentProps?: {\n [K in keyof Components]?: Parameters<Components[K]>[0];\n },\n};\n\nfunction renderComponent(props: {\n path: string,\n searchParams: Record<string, string>,\n fullPage: boolean,\n componentProps?: BaseHandlerProps['componentProps'],\n shouldRedirectToPage?: (name: keyof HandlerUrls) => boolean,\n getDefaultUnknownPathUrl?: (path: string) => string | null,\n onNotFound: () => any,\n app: StackClientApp<any> | StackServerApp<any>,\n}) {\n const { path, searchParams, fullPage, componentProps, shouldRedirectToPage, getDefaultUnknownPathUrl, onNotFound, app } = props;\n\n switch (path) {\n case availablePaths.signIn: {\n if (shouldRedirectToPage?.('signIn')) return { redirectToPage: 'signIn' as const };\n return <SignIn\n fullPage={fullPage}\n automaticRedirect\n {...filterUndefinedINU(componentProps?.SignIn)}\n />;\n }\n case availablePaths.signUp: {\n if (shouldRedirectToPage?.('signUp')) return { redirectToPage: 'signUp' as const };\n return <SignUp\n fullPage={fullPage}\n automaticRedirect\n {...filterUndefinedINU(componentProps?.SignUp)}\n />;\n }\n case availablePaths.emailVerification: {\n if (shouldRedirectToPage?.('emailVerification')) return { redirectToPage: 'emailVerification' as const };\n return <EmailVerification\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.EmailVerification)}\n />;\n }\n case availablePaths.passwordReset: {\n if (shouldRedirectToPage?.('passwordReset')) return { redirectToPage: 'passwordReset' as const };\n return <PasswordReset\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.PasswordReset)}\n />;\n }\n case availablePaths.forgotPassword: {\n if (shouldRedirectToPage?.('forgotPassword')) return { redirectToPage: 'forgotPassword' as const };\n return <ForgotPassword\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.ForgotPassword)}\n />;\n }\n case availablePaths.signOut: {\n if (shouldRedirectToPage?.('signOut')) return { redirectToPage: 'signOut' as const };\n return <SignOut\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.SignOut)}\n />;\n }\n case availablePaths.oauthCallback: {\n if (shouldRedirectToPage?.('oauthCallback')) return { redirectToPage: 'oauthCallback' as const };\n return <OAuthCallback\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.OAuthCallback)}\n />;\n }\n case availablePaths.magicLinkCallback: {\n if (shouldRedirectToPage?.('magicLinkCallback')) return { redirectToPage: 'magicLinkCallback' as const };\n return <MagicLinkCallback\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.MagicLinkCallback)}\n />;\n }\n case availablePaths.teamInvitation: {\n if (shouldRedirectToPage?.('teamInvitation')) return { redirectToPage: 'teamInvitation' as const };\n return <TeamInvitation\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.TeamInvitation)}\n />;\n }\n case availablePaths.accountSettings: {\n return <AccountSettings\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.AccountSettings)}\n />;\n }\n case availablePaths.error: {\n return <ErrorPage\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.ErrorPage)}\n />;\n }\n case availablePaths.cliAuthConfirm: {\n if (shouldRedirectToPage?.('cliAuthConfirm')) return { redirectToPage: 'cliAuthConfirm' as const };\n return <CliAuthConfirmation\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.CliAuthConfirmation)}\n />;\n }\n case availablePaths.mfa: {\n if (shouldRedirectToPage?.('mfa')) return { redirectToPage: 'mfa' as const };\n return <MFA\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.MFA)}\n />;\n }\n case availablePaths.onboarding: {\n if (shouldRedirectToPage?.('onboarding')) return { redirectToPage: 'onboarding' as const };\n return <Onboarding\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.Onboarding)}\n />;\n }\n default: {\n if (Object.values(availablePaths).includes(path as any)) {\n throw new HexclaveAssertionError(`Path alias ${path} not included in switch statement, but in availablePaths?`, { availablePaths });\n }\n for (const [key, value] of Object.entries(pathAliases)) {\n if (path.toLowerCase().replaceAll('-', '') === key.toLowerCase().replaceAll('-', '')) {\n const redirectUrl = `${app.urls.handler}/${value}?${new URLSearchParams(searchParams).toString()}`;\n return { redirect: redirectUrl };\n }\n }\n const defaultUnknownPathUrl = getDefaultUnknownPathUrl?.(path);\n if (defaultUnknownPathUrl != null) {\n const defaultUnknownPathUrlObject = new URL(defaultUnknownPathUrl, \"http://example.com\");\n for (const [key, value] of Object.entries(searchParams)) {\n defaultUnknownPathUrlObject.searchParams.set(key, value);\n }\n return { redirect: toAbsoluteOrRelativeRedirectTarget(defaultUnknownPathUrlObject) };\n }\n return onNotFound();\n }\n }\n}\n\nexport async function getRedirectToPageResult(\n app: StackClientApp,\n redirectToPage: keyof HandlerUrls,\n): Promise<RedirectToPageResult> {\n try {\n await app[hexclaveAppInternalsSymbol].redirectToHandler(redirectToPage, { replace: true });\n return { status: \"success\" };\n } catch (e) {\n if (KnownError.isKnownError(e)) {\n return { status: \"known-error\", error: e };\n }\n captureError(\"<HexclaveHandlerClient redirectToPage />\", e);\n return { status: \"unknown-error\" };\n }\n}\n\nfunction RedirectToPage(props: {\n app: StackClientApp,\n fullPage?: boolean,\n redirectToPage: keyof HandlerUrls,\n}) {\n const redirectResultPromise = useMemo(\n () => getRedirectToPageResult(props.app, props.redirectToPage),\n [props.app, props.redirectToPage],\n );\n\n const redirectResult = use(redirectResultPromise);\n if (redirectResult.status === \"known-error\") {\n return <KnownErrorMessageCard error={redirectResult.error} fullPage={props.fullPage} />;\n }\n if (redirectResult.status === \"unknown-error\") {\n return <PredefinedMessageCard type=\"unknownError\" fullPage={props.fullPage} />;\n }\n return <MessageCard title=\"Redirecting...\" fullPage={props.fullPage} />;\n}\n\nexport function HexclaveHandlerClient(props: BaseHandlerProps & Partial<RouteProps> & { location?: string }) {\n // Use hooks to get app\n const hexclaveApp = useStackApp();\n const clientOrigin = useClientOriginAfterHydration();\n\n const navigate = hexclaveApp.useNavigate();\n const navigateRef = useRef(navigate);\n navigateRef.current = navigate;\n const currentLocation = props.location ?? (typeof window === \"undefined\" ? new URL(hexclaveApp.urls.handler, placeholderOrigin).pathname : window.location.pathname);\n const searchParamsSource = new URLSearchParams(typeof window === \"undefined\" ? \"\" : window.location.search);\n const redirectTargets: (string | undefined)[] = [];\n\n const { path, searchParams, handlerPath } = useMemo(() => {\n const handlerPath = new URL(hexclaveApp.urls.handler, 'http://example.com').pathname;\n const relativePath = currentLocation.startsWith(handlerPath)\n ? currentLocation.slice(handlerPath.length).replace(/^\\/+/, '')\n : currentLocation.replace(/^\\/+/, '');\n\n return {\n path: relativePath,\n searchParams: Object.fromEntries(searchParamsSource.entries()),\n handlerPath,\n };\n }, [currentLocation, searchParamsSource, hexclaveApp.urls.handler]);\n\n const getDefaultUnknownPathUrl = (unknownPath: string): string | null => {\n return resolveUnknownHandlerPathFallbackUrl({\n defaultTarget: hexclaveApp[hexclaveAppInternalsSymbol].getConstructorOptions().urls?.default,\n projectId: hexclaveApp.projectId,\n unknownPath,\n });\n };\n\n const shouldRedirectToPage = (name: keyof HandlerUrls): boolean => {\n const url = hexclaveApp.urls[name];\n const isCrossDomainLocalOauthCallback = name === \"oauthCallback\" && searchParams.hexclave_cross_domain_auth === \"1\";\n if (isCrossDomainLocalOauthCallback) {\n return false;\n }\n return !isLocalHandlerUrlTarget({\n targetUrl: url,\n handlerPath,\n currentOrigin: clientOrigin,\n });\n };\n\n const result = renderComponent({\n path,\n searchParams,\n fullPage: props.fullPage,\n componentProps: props.componentProps,\n shouldRedirectToPage,\n getDefaultUnknownPathUrl,\n onNotFound: () =>\n (\n <MessageCard\n title=\"Page does not exist\"\n fullPage={props.fullPage}\n primaryButtonText=\"Go to Home\"\n primaryAction={() => hexclaveApp.redirectToHome()}\n >\n The page you are looking for could not be found. Please check the URL and try again.\n </MessageCard>\n )\n ,\n app: hexclaveApp,\n });\n\n const redirectToPage = (result != null && typeof result === 'object' && 'redirectToPage' in result) ? result.redirectToPage : undefined;\n\n if (redirectToPage != null) {\n return (\n <Suspense fallback={<MessageCard title=\"Redirecting...\" fullPage={props.fullPage} />}>\n <RedirectToPage app={hexclaveApp} redirectToPage={redirectToPage} fullPage={props.fullPage} />\n </Suspense>\n );\n }\n\n if (result && 'redirect' in result) {\n redirectTargets.push(result.redirect);\n }\n\n const redirectTarget = redirectTargets[0];\n const shouldRenderRedirectFallback = redirectTarget != null && hexclaveApp[hexclaveAppInternalsSymbol].getRedirectMethod() === \"none\";\n useEffect(() => {\n if (redirectTarget == null || shouldRenderRedirectFallback) {\n return;\n }\n navigateRef.current(redirectTarget);\n }, [redirectTarget, shouldRenderRedirectFallback]);\n\n if (redirectTarget != null && shouldRenderRedirectFallback) {\n return (\n <MessageCard\n title=\"Continue\"\n fullPage={props.fullPage}\n primaryButtonText=\"Continue\"\n primaryAction={() => window.location.assign(redirectTarget)}\n >\n Continue to the next page.\n </MessageCard>\n );\n }\n\n if (redirectTarget != null) {\n return null;\n }\n\n return result;\n}\n\n// filter undefined values in object. if object itself is undefined, return undefined\nfunction filterUndefinedINU<T extends {}>(value: T | undefined): FilterUndefined<T> | undefined {\n return value === undefined ? value : filterUndefined(value);\n}\n\nfunction toAbsoluteOrRelativeRedirectTarget(url: URL): string {\n return url.origin === \"http://example.com\" ? getRelativePart(url) : url.toString();\n}\n\nfunction useClientOriginAfterHydration(): string | undefined {\n // The first hydrated render must match SSR. After hydration, React re-checks\n // the snapshot and lets us distinguish same-path cross-origin handler URLs.\n return useSyncExternalStore(\n () => () => {},\n () => window.location.origin,\n () => undefined,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,MAAM,iBAAiB;CACrB,QAA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,kBAEI,oBAACD;GACC,OAAM;GACN,UAAU,MAAM;GAChB,mBAAkB;GAClB,qBAAqB,YAAY,gBAAgB;aAClD;IAEa;EAGlB,KAAK;EACN,CAAC;CAEF,MAAM,iBAAkB,UAAU,QAAQ,OAAO,WAAW,YAAY,oBAAoB,SAAU,OAAO,iBAAiB;AAE9H,KAAI,kBAAkB,KACpB,QACE,oBAAC;EAAS,UAAU,oBAACA;GAAY,OAAM;GAAiB,UAAU,MAAM;IAAY;YAClF,oBAAC;GAAe,KAAK;GAA6B;GAAgB,UAAU,MAAM;IAAY;GACrF;AAIf,KAAI,UAAU,cAAc,OAC1B,iBAAgB,KAAK,OAAO,SAAS;CAGvC,MAAM,iBAAiB,gBAAgB;CACvC,MAAM,+BAA+B,kBAAkB,QAAQ,YAAY,4BAA4B,mBAAmB,KAAK;AAC/H,iBAAgB;AACd,MAAI,kBAAkB,QAAQ,6BAC5B;AAEF,cAAY,QAAQ,eAAe;IAClC,CAAC,gBAAgB,6BAA6B,CAAC;AAElD,KAAI,kBAAkB,QAAQ,6BAC5B,QACE,oBAACA;EACC,OAAM;EACN,UAAU,MAAM;EAChB,mBAAkB;EAClB,qBAAqB,OAAO,SAAS,OAAO,eAAe;YAC5D;GAEa;AAIlB,KAAI,kBAAkB,KACpB,QAAO;AAGT,QAAO;;AAIT,SAAS,mBAAiC,OAAsD;AAC9F,QAAO,UAAU,SAAY,QAAQ,gBAAgB,MAAM;;AAG7D,SAAS,mCAAmC,KAAkB;AAC5D,QAAO,IAAI,WAAW,uBAAuB,gBAAgB,IAAI,GAAG,IAAI,UAAU;;AAGpF,SAAS,gCAAoD;AAG3D,QAAO,iCACO,UACN,OAAO,SAAS,cAChB,OACP"}
1
+ {"version":3,"file":"hexclave-handler-client.js","names":["MessageCard","useStackApp"],"sources":["../../../src/components-page/hexclave-handler-client.tsx"],"sourcesContent":["\"use client\";\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\n\nimport { KnownError } from \"@hexclave/shared\";\nimport { captureError, HexclaveAssertionError } from \"@hexclave/shared/dist/utils/errors\";\nimport { FilterUndefined, filterUndefined } from \"@hexclave/shared/dist/utils/objects\";\nimport { use } from \"@hexclave/shared/dist/utils/react\";\nimport { getRelativePart } from \"@hexclave/shared/dist/utils/urls\";\nimport { Suspense, useMemo, useSyncExternalStore } from 'react';\nimport { useEffect, useRef } from 'react';\nimport { SignIn, SignUp, StackServerApp } from \"..\";\nimport { useStackApp } from \"../lib/hooks\";\nimport { HandlerUrls, StackClientApp, hexclaveAppInternalsSymbol } from \"../lib/hexclave-app\";\nimport { isLocalHandlerUrlTarget, resolveUnknownHandlerPathFallbackUrl } from \"../lib/hexclave-app/url-targets\";\nimport { AccountSettings } from \"./account-settings\";\nimport { CliAuthConfirmation } from \"./cli-auth-confirm\";\nimport { EmailVerification } from \"./email-verification\";\nimport { ErrorPage } from \"./error-page\";\nimport { ForgotPassword } from \"./forgot-password\";\nimport { MagicLinkCallback } from \"./magic-link-callback\";\nimport { MFA } from \"./mfa\";\nimport { OAuthCallback } from \"./oauth-callback\";\nimport { Onboarding } from \"./onboarding\";\nimport { PasswordReset } from \"./password-reset\";\nimport { SignOut } from \"./sign-out\";\nimport { TeamInvitation } from \"./team-invitation\";\n\nimport { KnownErrorMessageCard } from \"../components/message-cards/known-error-message-card\";\nimport { MessageCard } from \"../components/message-cards/message-card\";\nimport { PredefinedMessageCard } from \"../components/message-cards/predefined-message-card\";\n\ntype Components = {\n SignIn: typeof SignIn,\n SignUp: typeof SignUp,\n EmailVerification: typeof EmailVerification,\n PasswordReset: typeof PasswordReset,\n ForgotPassword: typeof ForgotPassword,\n SignOut: typeof SignOut,\n OAuthCallback: typeof OAuthCallback,\n MagicLinkCallback: typeof MagicLinkCallback,\n TeamInvitation: typeof TeamInvitation,\n ErrorPage: typeof ErrorPage,\n AccountSettings: typeof AccountSettings,\n CliAuthConfirmation: typeof CliAuthConfirmation,\n MFA: typeof MFA,\n Onboarding: typeof Onboarding,\n};\n\ntype RouteProps = {\n params: Promise<{ stack?: string[] }> | { stack?: string[] },\n searchParams: Promise<Record<string, string>> | Record<string, string>,\n};\n\ntype RedirectToPageResult =\n | { status: \"success\" }\n | { status: \"known-error\", error: KnownError }\n | { status: \"unknown-error\" };\n\nconst availablePaths = {\n signIn: 'sign-in',\n signUp: 'sign-up',\n emailVerification: 'email-verification',\n passwordReset: 'password-reset',\n forgotPassword: 'forgot-password',\n signOut: 'sign-out',\n oauthCallback: 'oauth-callback',\n magicLinkCallback: 'magic-link-callback',\n teamInvitation: 'team-invitation',\n accountSettings: 'account-settings',\n cliAuthConfirm: 'cli-auth-confirm',\n mfa: 'mfa',\n error: 'error',\n onboarding: 'onboarding',\n} as const;\n\nconst placeholderOrigin = \"http://example.com\";\n\nconst pathAliases = {\n // also includes the uppercase and non-dashed versions\n ...Object.fromEntries(Object.entries(availablePaths).map(([key, value]) => [value, value])),\n \"log-in\": availablePaths.signIn,\n \"register\": availablePaths.signUp,\n} as const;\n\nexport type BaseHandlerProps = {\n fullPage: boolean,\n componentProps?: {\n [K in keyof Components]?: Parameters<Components[K]>[0];\n },\n};\n\nfunction renderComponent(props: {\n path: string,\n searchParams: Record<string, string>,\n fullPage: boolean,\n componentProps?: BaseHandlerProps['componentProps'],\n shouldRedirectToPage?: (name: keyof HandlerUrls) => boolean,\n getDefaultUnknownPathUrl?: (path: string) => string | null,\n onNotFound: () => any,\n app: StackClientApp<any> | StackServerApp<any>,\n}) {\n const { path, searchParams, fullPage, componentProps, shouldRedirectToPage, getDefaultUnknownPathUrl, onNotFound, app } = props;\n\n switch (path) {\n case availablePaths.signIn: {\n if (shouldRedirectToPage?.('signIn')) return { redirectToPage: 'signIn' as const };\n return <SignIn\n fullPage={fullPage}\n automaticRedirect\n {...filterUndefinedINU(componentProps?.SignIn)}\n />;\n }\n case availablePaths.signUp: {\n if (shouldRedirectToPage?.('signUp')) return { redirectToPage: 'signUp' as const };\n return <SignUp\n fullPage={fullPage}\n automaticRedirect\n {...filterUndefinedINU(componentProps?.SignUp)}\n />;\n }\n case availablePaths.emailVerification: {\n if (shouldRedirectToPage?.('emailVerification')) return { redirectToPage: 'emailVerification' as const };\n return <EmailVerification\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.EmailVerification)}\n />;\n }\n case availablePaths.passwordReset: {\n if (shouldRedirectToPage?.('passwordReset')) return { redirectToPage: 'passwordReset' as const };\n return <PasswordReset\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.PasswordReset)}\n />;\n }\n case availablePaths.forgotPassword: {\n if (shouldRedirectToPage?.('forgotPassword')) return { redirectToPage: 'forgotPassword' as const };\n return <ForgotPassword\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.ForgotPassword)}\n />;\n }\n case availablePaths.signOut: {\n if (shouldRedirectToPage?.('signOut')) return { redirectToPage: 'signOut' as const };\n return <SignOut\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.SignOut)}\n />;\n }\n case availablePaths.oauthCallback: {\n if (shouldRedirectToPage?.('oauthCallback')) return { redirectToPage: 'oauthCallback' as const };\n return <OAuthCallback\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.OAuthCallback)}\n />;\n }\n case availablePaths.magicLinkCallback: {\n if (shouldRedirectToPage?.('magicLinkCallback')) return { redirectToPage: 'magicLinkCallback' as const };\n return <MagicLinkCallback\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.MagicLinkCallback)}\n />;\n }\n case availablePaths.teamInvitation: {\n if (shouldRedirectToPage?.('teamInvitation')) return { redirectToPage: 'teamInvitation' as const };\n return <TeamInvitation\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.TeamInvitation)}\n />;\n }\n case availablePaths.accountSettings: {\n return <AccountSettings\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.AccountSettings)}\n />;\n }\n case availablePaths.error: {\n return <ErrorPage\n searchParams={searchParams}\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.ErrorPage)}\n />;\n }\n case availablePaths.cliAuthConfirm: {\n if (shouldRedirectToPage?.('cliAuthConfirm')) return { redirectToPage: 'cliAuthConfirm' as const };\n return <CliAuthConfirmation\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.CliAuthConfirmation)}\n />;\n }\n case availablePaths.mfa: {\n if (shouldRedirectToPage?.('mfa')) return { redirectToPage: 'mfa' as const };\n return <MFA\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.MFA)}\n />;\n }\n case availablePaths.onboarding: {\n if (shouldRedirectToPage?.('onboarding')) return { redirectToPage: 'onboarding' as const };\n return <Onboarding\n fullPage={fullPage}\n {...filterUndefinedINU(componentProps?.Onboarding)}\n />;\n }\n default: {\n if (Object.values(availablePaths).includes(path as any)) {\n throw new HexclaveAssertionError(`Path alias ${path} not included in switch statement, but in availablePaths?`, { availablePaths });\n }\n for (const [key, value] of Object.entries(pathAliases)) {\n if (path.toLowerCase().replaceAll('-', '') === key.toLowerCase().replaceAll('-', '')) {\n const redirectUrl = `${app[hexclaveAppInternalsSymbol].getUrls().handler}/${value}?${new URLSearchParams(searchParams).toString()}`;\n return { redirect: redirectUrl };\n }\n }\n const defaultUnknownPathUrl = getDefaultUnknownPathUrl?.(path);\n if (defaultUnknownPathUrl != null) {\n const defaultUnknownPathUrlObject = new URL(defaultUnknownPathUrl, \"http://example.com\");\n for (const [key, value] of Object.entries(searchParams)) {\n defaultUnknownPathUrlObject.searchParams.set(key, value);\n }\n return { redirect: toAbsoluteOrRelativeRedirectTarget(defaultUnknownPathUrlObject) };\n }\n return onNotFound();\n }\n }\n}\n\nexport async function getRedirectToPageResult(\n app: StackClientApp,\n redirectToPage: keyof HandlerUrls,\n): Promise<RedirectToPageResult> {\n try {\n await app[hexclaveAppInternalsSymbol].redirectToHandler(redirectToPage, { replace: true });\n return { status: \"success\" };\n } catch (e) {\n if (KnownError.isKnownError(e)) {\n return { status: \"known-error\", error: e };\n }\n captureError(\"<HexclaveHandlerClient redirectToPage />\", e);\n return { status: \"unknown-error\" };\n }\n}\n\nfunction RedirectToPage(props: {\n app: StackClientApp,\n fullPage?: boolean,\n redirectToPage: keyof HandlerUrls,\n}) {\n const redirectResultPromise = useMemo(\n () => getRedirectToPageResult(props.app, props.redirectToPage),\n [props.app, props.redirectToPage],\n );\n\n const redirectResult = use(redirectResultPromise);\n if (redirectResult.status === \"known-error\") {\n return <KnownErrorMessageCard error={redirectResult.error} fullPage={props.fullPage} />;\n }\n if (redirectResult.status === \"unknown-error\") {\n return <PredefinedMessageCard type=\"unknownError\" fullPage={props.fullPage} />;\n }\n return <MessageCard title=\"Redirecting...\" fullPage={props.fullPage} />;\n}\n\nexport function HexclaveHandlerClient(props: BaseHandlerProps & Partial<RouteProps> & { location?: string }) {\n // Use hooks to get app\n const hexclaveApp = useStackApp();\n const handlerUrls = hexclaveApp[hexclaveAppInternalsSymbol].getUrls();\n const clientOrigin = useClientOriginAfterHydration();\n\n const navigate = hexclaveApp.useNavigate();\n const navigateRef = useRef(navigate);\n navigateRef.current = navigate;\n const currentLocation = props.location ?? (typeof window === \"undefined\" ? new URL(handlerUrls.handler, placeholderOrigin).pathname : window.location.pathname);\n const searchParamsSource = new URLSearchParams(typeof window === \"undefined\" ? \"\" : window.location.search);\n const redirectTargets: (string | undefined)[] = [];\n\n const { path, searchParams, handlerPath } = useMemo(() => {\n const handlerPath = new URL(handlerUrls.handler, 'http://example.com').pathname;\n const relativePath = currentLocation.startsWith(handlerPath)\n ? currentLocation.slice(handlerPath.length).replace(/^\\/+/, '')\n : currentLocation.replace(/^\\/+/, '');\n\n return {\n path: relativePath,\n searchParams: Object.fromEntries(searchParamsSource.entries()),\n handlerPath,\n };\n }, [currentLocation, searchParamsSource, handlerUrls.handler]);\n\n const getDefaultUnknownPathUrl = (unknownPath: string): string | null => {\n return resolveUnknownHandlerPathFallbackUrl({\n defaultTarget: hexclaveApp[hexclaveAppInternalsSymbol].getConstructorOptions().urls?.default,\n projectId: hexclaveApp.projectId,\n unknownPath,\n });\n };\n\n const shouldRedirectToPage = (name: keyof HandlerUrls): boolean => {\n const url = handlerUrls[name];\n const isCrossDomainLocalOauthCallback = name === \"oauthCallback\" && searchParams.hexclave_cross_domain_auth === \"1\";\n if (isCrossDomainLocalOauthCallback) {\n return false;\n }\n return !isLocalHandlerUrlTarget({\n targetUrl: url,\n handlerPath,\n currentOrigin: clientOrigin,\n });\n };\n\n const result = renderComponent({\n path,\n searchParams,\n fullPage: props.fullPage,\n componentProps: props.componentProps,\n shouldRedirectToPage,\n getDefaultUnknownPathUrl,\n onNotFound: () =>\n (\n <MessageCard\n title=\"Page does not exist\"\n fullPage={props.fullPage}\n primaryButtonText=\"Go to Home\"\n primaryAction={() => hexclaveApp.redirectToHome()}\n >\n The page you are looking for could not be found. Please check the URL and try again.\n </MessageCard>\n )\n ,\n app: hexclaveApp,\n });\n\n const redirectToPage = (result != null && typeof result === 'object' && 'redirectToPage' in result) ? result.redirectToPage : undefined;\n\n if (redirectToPage != null) {\n return (\n <Suspense fallback={<MessageCard title=\"Redirecting...\" fullPage={props.fullPage} />}>\n <RedirectToPage app={hexclaveApp} redirectToPage={redirectToPage} fullPage={props.fullPage} />\n </Suspense>\n );\n }\n\n if (result && 'redirect' in result) {\n redirectTargets.push(result.redirect);\n }\n\n const redirectTarget = redirectTargets[0];\n const shouldRenderRedirectFallback = redirectTarget != null && hexclaveApp[hexclaveAppInternalsSymbol].getRedirectMethod() === \"none\";\n useEffect(() => {\n if (redirectTarget == null || shouldRenderRedirectFallback) {\n return;\n }\n navigateRef.current(redirectTarget);\n }, [redirectTarget, shouldRenderRedirectFallback]);\n\n if (redirectTarget != null && shouldRenderRedirectFallback) {\n return (\n <MessageCard\n title=\"Continue\"\n fullPage={props.fullPage}\n primaryButtonText=\"Continue\"\n primaryAction={() => window.location.assign(redirectTarget)}\n >\n Continue to the next page.\n </MessageCard>\n );\n }\n\n if (redirectTarget != null) {\n return null;\n }\n\n return result;\n}\n\n// filter undefined values in object. if object itself is undefined, return undefined\nfunction filterUndefinedINU<T extends {}>(value: T | undefined): FilterUndefined<T> | undefined {\n return value === undefined ? value : filterUndefined(value);\n}\n\nfunction toAbsoluteOrRelativeRedirectTarget(url: URL): string {\n return url.origin === \"http://example.com\" ? getRelativePart(url) : url.toString();\n}\n\nfunction useClientOriginAfterHydration(): string | undefined {\n // The first hydrated render must match SSR. After hydration, React re-checks\n // the snapshot and lets us distinguish same-path cross-origin handler URLs.\n return useSyncExternalStore(\n () => () => {},\n () => window.location.origin,\n () => undefined,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,MAAM,iBAAiB;CACrB,QAAQ;CACR,QAAQ;CACR,mBAAmB;CACnB,eAAe;CACf,gBAAgB;CAChB,SAAS;CACT,eAAe;CACf,mBAAmB;CACnB,gBAAgB;CAChB,iBAAiB;CACjB,gBAAgB;CAChB,KAAK;CACL,OAAO;CACP,YAAY;CACb;AAED,MAAM,oBAAoB;AAE1B,MAAM,cAAc;CAElB,GAAG,OAAO,YAAY,OAAO,QAAQ,eAAe,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;CAC3F,UAAU,eAAe;CACzB,YAAY,eAAe;CAC5B;AASD,SAAS,gBAAgB,OAStB;CACD,MAAM,EAAE,MAAM,cAAc,UAAU,gBAAgB,sBAAsB,0BAA0B,YAAY,QAAQ;AAE1H,SAAQ,MAAR;EACE,KAAK,eAAe;AAClB,OAAI,uBAAuB,SAAS,CAAE,QAAO,EAAE,gBAAgB,UAAmB;AAClF,UAAO,oBAAC;IACI;IACV;IACA,GAAI,mBAAmB,gBAAgB,OAAO;KAC9C;EAEJ,KAAK,eAAe;AAClB,OAAI,uBAAuB,SAAS,CAAE,QAAO,EAAE,gB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QACE,oBAACA;EACC,OAAM;EACN,UAAU,MAAM;EAChB,mBAAkB;EAClB,qBAAqB,OAAO,SAAS,OAAO,eAAe;YAC5D;GAEa;AAIlB,KAAI,kBAAkB,KACpB,QAAO;AAGT,QAAO;;AAIT,SAAS,mBAAiC,OAAsD;AAC9F,QAAO,UAAU,SAAY,QAAQ,gBAAgB,MAAM;;AAG7D,SAAS,mCAAmC,KAAkB;AAC5D,QAAO,IAAI,WAAW,uBAAuB,gBAAgB,IAAI,GAAG,IAAI,UAAU;;AAGpF,SAAS,gCAAoD;AAG3D,QAAO,iCACO,UACN,OAAO,SAAS,cAChB,OACP"}
@@ -1591,7 +1591,7 @@ function createSupportTab(app) {
1591
1591
  function createComponentsTab(app) {
1592
1592
  const container = h("div", { className: "sdt-pg-layout" });
1593
1593
  const apiBaseUrl = resolveApiBaseUrl(app);
1594
- const urls = app.urls;
1594
+ const urls = app[hexclaveAppInternalsSymbol].getUrls();
1595
1595
  const urlOptions = app[hexclaveAppInternalsSymbol].getConstructorOptions().urls ?? {};
1596
1596
  const PAGE_ENTRIES = [
1597
1597
  {