@hexclave/react 1.0.29 → 1.0.32

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 (121) hide show
  1. package/dist/clickmap/clickmap-core.js +1 -1
  2. package/dist/clickmap/index.js +2 -2
  3. package/dist/components/api-key-dialogs.js +2 -2
  4. package/dist/components/credential-sign-in.js +1 -1
  5. package/dist/components/credential-sign-up.js +1 -1
  6. package/dist/components/magic-link-sign-in.js +1 -1
  7. package/dist/components/team-switcher.js +1 -1
  8. package/dist/components-page/account-settings/active-sessions/active-sessions-page.js +1 -1
  9. package/dist/components-page/account-settings/email-and-auth/emails-section.js +1 -1
  10. package/dist/components-page/account-settings/email-and-auth/mfa-section.js +1 -1
  11. package/dist/components-page/account-settings/email-and-auth/password-section.js +1 -1
  12. package/dist/components-page/account-settings/teams/team-api-keys-section.js +1 -1
  13. package/dist/components-page/account-settings/teams/team-creation-page.js +1 -1
  14. package/dist/components-page/account-settings/teams/team-member-invitation-section.js +1 -1
  15. package/dist/components-page/auth-page.js +1 -1
  16. package/dist/components-page/cli-auth-confirm.js +1 -1
  17. package/dist/components-page/cli-auth-confirm.test.js +1 -1
  18. package/dist/components-page/forgot-password.js +1 -1
  19. package/dist/components-page/oauth-callback.d.ts.map +1 -1
  20. package/dist/components-page/oauth-callback.js +3 -1
  21. package/dist/components-page/oauth-callback.js.map +1 -1
  22. package/dist/components-page/oauth-callback.test.js +3 -1
  23. package/dist/components-page/oauth-callback.test.js.map +1 -1
  24. package/dist/components-page/onboarding.js +1 -1
  25. package/dist/components-page/password-reset.js +1 -1
  26. package/dist/components-page/team-creation.js +1 -1
  27. package/dist/dev-tool/dev-tool-core.js +1 -1
  28. package/dist/dev-tool/index.js +1 -1
  29. package/dist/esm/clickmap/clickmap-core.js +1 -1
  30. package/dist/esm/clickmap/index.js +2 -2
  31. package/dist/esm/components/api-key-dialogs.js +2 -2
  32. package/dist/esm/components/credential-sign-in.js +1 -1
  33. package/dist/esm/components/credential-sign-up.js +1 -1
  34. package/dist/esm/components/magic-link-sign-in.js +1 -1
  35. package/dist/esm/components/team-switcher.js +1 -1
  36. package/dist/esm/components-page/account-settings/active-sessions/active-sessions-page.js +1 -1
  37. package/dist/esm/components-page/account-settings/email-and-auth/emails-section.js +1 -1
  38. package/dist/esm/components-page/account-settings/email-and-auth/mfa-section.js +1 -1
  39. package/dist/esm/components-page/account-settings/email-and-auth/password-section.js +1 -1
  40. package/dist/esm/components-page/account-settings/teams/team-api-keys-section.js +1 -1
  41. package/dist/esm/components-page/account-settings/teams/team-creation-page.js +1 -1
  42. package/dist/esm/components-page/account-settings/teams/team-member-invitation-section.js +1 -1
  43. package/dist/esm/components-page/auth-page.js +1 -1
  44. package/dist/esm/components-page/cli-auth-confirm.js +1 -1
  45. package/dist/esm/components-page/cli-auth-confirm.test.js +1 -1
  46. package/dist/esm/components-page/forgot-password.js +1 -1
  47. package/dist/esm/components-page/oauth-callback.d.ts.map +1 -1
  48. package/dist/esm/components-page/oauth-callback.js +3 -1
  49. package/dist/esm/components-page/oauth-callback.js.map +1 -1
  50. package/dist/esm/components-page/oauth-callback.test.js +3 -1
  51. package/dist/esm/components-page/oauth-callback.test.js.map +1 -1
  52. package/dist/esm/components-page/onboarding.js +1 -1
  53. package/dist/esm/components-page/password-reset.js +1 -1
  54. package/dist/esm/components-page/team-creation.js +1 -1
  55. package/dist/esm/dev-tool/dev-tool-core.js +1 -1
  56. package/dist/esm/dev-tool/index.js +1 -1
  57. package/dist/esm/generated/quetzal-translations.d.ts +2 -2
  58. package/dist/esm/lib/auth.js +1 -1
  59. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +2 -1
  60. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  61. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
  62. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
  63. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +6 -10
  64. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
  65. package/dist/esm/lib/hexclave-app/apps/implementations/common.js +2 -2
  66. package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.js +1 -1
  67. package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +14 -0
  68. package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts.map +1 -1
  69. package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js +31 -16
  70. package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
  71. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
  72. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js +9 -2
  73. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
  74. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
  75. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
  76. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
  77. package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.d.ts +13 -0
  78. package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.d.ts.map +1 -1
  79. package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.js.map +1 -1
  80. package/dist/esm/lib/hexclave-app/teams/index.d.ts +4 -0
  81. package/dist/esm/lib/hexclave-app/teams/index.d.ts.map +1 -1
  82. package/dist/esm/lib/hexclave-app/teams/index.js.map +1 -1
  83. package/dist/esm/providers/theme-provider.js +1 -1
  84. package/dist/esm/pushed-config-error-overlay/index.js +1 -1
  85. package/dist/generated/quetzal-translations.d.ts +2 -2
  86. package/dist/lib/auth.js +1 -1
  87. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -0
  88. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  89. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
  90. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
  91. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +6 -10
  92. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
  93. package/dist/lib/hexclave-app/apps/implementations/common.js +2 -2
  94. package/dist/lib/hexclave-app/apps/implementations/event-tracker.js +1 -1
  95. package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +14 -0
  96. package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts.map +1 -1
  97. package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js +31 -16
  98. package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
  99. package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
  100. package/dist/lib/hexclave-app/apps/implementations/session-replay.js +9 -2
  101. package/dist/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
  102. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
  103. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
  104. package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
  105. package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts +13 -0
  106. package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts.map +1 -1
  107. package/dist/lib/hexclave-app/apps/interfaces/server-app.js.map +1 -1
  108. package/dist/lib/hexclave-app/teams/index.d.ts +4 -0
  109. package/dist/lib/hexclave-app/teams/index.d.ts.map +1 -1
  110. package/dist/lib/hexclave-app/teams/index.js.map +1 -1
  111. package/dist/providers/theme-provider.js +1 -1
  112. package/dist/pushed-config-error-overlay/index.js +1 -1
  113. package/package.json +3 -3
  114. package/src/components-page/oauth-callback.test.tsx +4 -0
  115. package/src/components-page/oauth-callback.tsx +6 -0
  116. package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +3 -5
  117. package/src/lib/hexclave-app/apps/implementations/server-app-impl.ts +35 -19
  118. package/src/lib/hexclave-app/apps/implementations/session-replay.ts +16 -1
  119. package/src/lib/hexclave-app/apps/interfaces/client-app.ts +1 -0
  120. package/src/lib/hexclave-app/apps/interfaces/server-app.ts +5 -0
  121. package/src/lib/hexclave-app/teams/index.ts +4 -0
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('../chunk-BE-pF4vm.js');
3
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
3
4
  let _hexclave_shared_dist_interface_admin_metrics = require("@hexclave/shared/dist/interface/admin-metrics");
4
5
  let _hexclave_shared_dist_utils_analytics_clickmap_overlay = require("@hexclave/shared/dist/utils/analytics-clickmap-overlay");
5
6
  let _hexclave_shared_dist_utils_dev_tool = require("@hexclave/shared/dist/utils/dev-tool");
6
7
  let _hexclave_shared_dist_utils_dom = require("@hexclave/shared/dist/utils/dom");
7
8
  let _hexclave_shared_dist_utils_elements_chain = require("@hexclave/shared/dist/utils/elements-chain");
8
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
9
9
  let _hexclave_shared_dist_utils_strings = require("@hexclave/shared/dist/utils/strings");
10
10
  let ___in_page_ui_dom_js = require("../in-page-ui/dom.js");
11
11
  let ___lib_hexclave_app_common_js = require("../lib/hexclave-app/common.js");
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('../chunk-BE-pF4vm.js');
3
- let _hexclave_shared_dist_utils_analytics_clickmap_overlay = require("@hexclave/shared/dist/utils/analytics-clickmap-overlay");
3
+ let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
4
4
  let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
5
+ let _hexclave_shared_dist_utils_analytics_clickmap_overlay = require("@hexclave/shared/dist/utils/analytics-clickmap-overlay");
5
6
  let ___in_page_ui_dom_js = require("../in-page-ui/dom.js");
6
- let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
7
7
 
8
8
  //#region src/clickmap/index.ts
9
9
  function consumeResumeSentinel() {
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
- let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
7
5
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
8
6
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
7
+ let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
8
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
9
9
  let _hexclave_ui = require("@hexclave/ui");
10
10
  let react = require("react");
11
11
  let react_hook_form = require("react-hook-form");
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
5
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
7
6
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
7
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
8
8
  let _hexclave_ui = require("@hexclave/ui");
9
9
  let react = require("react");
10
10
  let react_hook_form = require("react-hook-form");
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
5
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
7
6
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
7
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
8
8
  let _hexclave_ui = require("@hexclave/ui");
9
9
  let react = require("react");
10
10
  react = require_chunk.__toESM(react);
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
5
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
7
6
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
7
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
8
8
  let _hexclave_ui = require("@hexclave/ui");
9
9
  let react = require("react");
10
10
  let react_hook_form = require("react-hook-form");
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
5
  let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
6
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
7
7
  let _hexclave_ui = require("@hexclave/ui");
8
8
  let react = require("react");
9
9
  let ___index_js = require("../index.js");
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('../../../chunk-BE-pF4vm.js');
3
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
4
3
  let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
4
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
5
5
  let _hexclave_ui = require("@hexclave/ui");
6
6
  let react = require("react");
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('../../../chunk-BE-pF4vm.js');
3
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
4
3
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
5
4
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
5
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
6
  let _hexclave_ui = require("@hexclave/ui");
7
7
  let react = require("react");
8
8
  let react_hook_form = require("react-hook-form");
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('../../../chunk-BE-pF4vm.js');
3
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
4
3
  let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
4
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
5
5
  let _hexclave_ui = require("@hexclave/ui");
6
6
  let react = require("react");
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('../../../chunk-BE-pF4vm.js');
3
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
4
3
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
5
4
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
5
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
6
  let _hexclave_ui = require("@hexclave/ui");
7
7
  let react = require("react");
8
8
  let react_hook_form = require("react-hook-form");
@@ -6,9 +6,9 @@ let react = require("react");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
  let _________lib_hooks_js = require("../../../lib/hooks.js");
8
8
  let _________lib_translations_js = require("../../../lib/translations.js");
9
+ let ___section_js = require("../section.js");
9
10
  let _________components_api_key_dialogs_js = require("../../../components/api-key-dialogs.js");
10
11
  let _________components_api_key_table_js = require("../../../components/api-key-table.js");
11
- let ___section_js = require("../section.js");
12
12
 
13
13
  //#region src/components-page/account-settings/teams/team-api-keys-section.tsx
14
14
  function TeamApiKeysSection(props) {
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('../../../chunk-BE-pF4vm.js');
3
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
4
3
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
5
4
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
5
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
6
  let _hexclave_ui = require("@hexclave/ui");
7
7
  let react = require("react");
8
8
  let react_hook_form = require("react-hook-form");
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('../../../chunk-BE-pF4vm.js');
3
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
4
3
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
5
4
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
5
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
6
  let _hexclave_ui = require("@hexclave/ui");
7
7
  let react = require("react");
8
8
  let react_hook_form = require("react-hook-form");
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
5
  let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
6
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
7
7
  let _hexclave_ui = require("@hexclave/ui");
8
8
  let react = require("react");
9
9
  let ___index_js = require("../index.js");
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
5
  let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
- let ___lib_hexclave_app_common_js = require("../lib/hexclave-app/common.js");
7
6
  let _hexclave_ui = require("@hexclave/ui");
8
7
  let react = require("react");
9
8
  let ___lib_translations_js = require("../lib/translations.js");
10
9
  let react_jsx_runtime = require("react/jsx-runtime");
11
10
  let ___lib_hooks_js = require("../lib/hooks.js");
11
+ let ___lib_hexclave_app_common_js = require("../lib/hexclave-app/common.js");
12
12
  let ___components_message_cards_message_card_js = require("../components/message-cards/message-card.js");
13
13
 
14
14
  //#region src/components-page/cli-auth-confirm.tsx
@@ -1,9 +1,9 @@
1
1
  const require_chunk = require('../chunk-BE-pF4vm.js');
2
2
  let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
3
- let ___lib_hexclave_app_common_js = require("../lib/hexclave-app/common.js");
4
3
  let react = require("react");
5
4
  react = require_chunk.__toESM(react);
6
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
+ let ___lib_hexclave_app_common_js = require("../lib/hexclave-app/common.js");
7
7
  let react_dom_client = require("react-dom/client");
8
8
  let vitest = require("vitest");
9
9
  let ___providers_hexclave_context_js = require("../providers/hexclave-context.js");
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
5
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
7
6
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
7
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
8
8
  let _hexclave_ui = require("@hexclave/ui");
9
9
  let react = require("react");
10
10
  let react_hook_form = require("react-hook-form");
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-callback.d.ts","names":[],"sources":["../../src/components-page/oauth-callback.tsx"],"mappings":";;;iBAkBgB,aAAA,CAAA;EAAgB;AAAA;EAAc,QAAA;AAAA,IAAoB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"oauth-callback.d.ts","names":[],"sources":["../../src/components-page/oauth-callback.tsx"],"mappings":";;;iBAmBgB,aAAA,CAAA;EAAgB;AAAA;EAAc,QAAA;AAAA,IAAoB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -2,14 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
5
  let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
6
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
7
7
  let _hexclave_ui = require("@hexclave/ui");
8
8
  let react = require("react");
9
9
  let ___index_js = require("../index.js");
10
10
  let ___lib_translations_js = require("../lib/translations.js");
11
11
  let react_jsx_runtime = require("react/jsx-runtime");
12
12
  let _hexclave_shared = require("@hexclave/shared");
13
+ let ___lib_hexclave_app_common_js = require("../lib/hexclave-app/common.js");
13
14
  let ___components_elements_maybe_full_page_js = require("../components/elements/maybe-full-page.js");
14
15
  let ___components_link_js = require("../components/link.js");
15
16
  let __error_page_js = require("./error-page.js");
@@ -25,6 +26,7 @@ function OAuthCallback({ fullPage }) {
25
26
  if (called.current) return;
26
27
  called.current = true;
27
28
  try {
29
+ await app[___lib_hexclave_app_common_js.hexclaveAppInternalsSymbol].awaitPendingAuthResolutions();
28
30
  if (!await app.callOAuthCallback()) await app.redirectToSignIn({ noRedirectBack: true });
29
31
  } catch (e) {
30
32
  if (_hexclave_shared.KnownError.isKnownError(e)) {
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-callback.js","names":["KnownError","ErrorPage","MaybeFullPage","Spinner","StyledLink"],"sources":["../../src/components-page/oauth-callback.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 } from \"@hexclave/shared/dist/utils/errors\";\nimport { runAsynchronously } from \"@hexclave/shared/dist/utils/promises\";\nimport { Spinner, cn } from \"@hexclave/ui\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { useStackApp } from \"..\";\nimport { MaybeFullPage } from \"../components/elements/maybe-full-page\";\nimport { StyledLink } from \"../components/link\";\nimport { useTranslation } from \"../lib/translations\";\nimport { ErrorPage } from \"./error-page\";\n\nexport function OAuthCallback({ fullPage }: { fullPage?: boolean }) {\n const { t } = useTranslation();\n const app = useStackApp();\n const called = useRef(false);\n const [showRedirectLink, setShowRedirectLink] = useState(false);\n const [errorSearchParams, setErrorSearchParams] = useState<Record<string, string> | null>(null);\n\n useEffect(() => runAsynchronously(async () => {\n if (called.current) return;\n called.current = true;\n try {\n const hasRedirected = await app.callOAuthCallback();\n if (!hasRedirected) {\n await app.redirectToSignIn({ noRedirectBack: true });\n }\n } catch (e) {\n if (KnownError.isKnownError(e)) {\n setErrorSearchParams({\n errorCode: e.errorCode,\n message: e.message,\n details: JSON.stringify(e.details ?? {}),\n });\n return;\n }\n captureError(\"<OAuthCallback />\", e);\n setErrorSearchParams({});\n }\n }), [app]);\n\n useEffect(() => {\n setTimeout(() => setShowRedirectLink(true), 3000);\n }, []);\n\n if (errorSearchParams != null) {\n return <ErrorPage searchParams={errorSearchParams} fullPage={fullPage} />;\n }\n\n return (\n <MaybeFullPage\n fullPage={fullPage ?? false}\n containerClassName=\"flex items-center justify-center\"\n >\n <div\n className={cn(\n \"text-center justify-center items-center stack-scope flex flex-col gap-4 max-w-[380px]\",\n fullPage ? \"p-4\" : \"p-0\"\n )}\n >\n <div className=\"flex flex-col justify-center items-center gap-4\">\n <Spinner size={20} />\n </div>\n {showRedirectLink ? <p>{t('If you are not redirected automatically, ')}<StyledLink\n className=\"whitespace-nowrap\"\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n runAsynchronously(app.redirectToHome());\n }}\n >{t(\"click here\")}</StyledLink></p> : null}\n </div>\n </MaybeFullPage>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,SAAgB,cAAc,EAAE,YAAoC;CAClE,MAAM,EAAE,kDAAsB;CAC9B,MAAM,oCAAmB;CACzB,MAAM,2BAAgB,MAAM;CAC5B,MAAM,CAAC,kBAAkB,2CAAgC,MAAM;CAC/D,MAAM,CAAC,mBAAmB,4CAAgE,KAAK;AAE/F,wFAAkC,YAAY;AAC5C,MAAI,OAAO,QAAS;AACpB,SAAO,UAAU;AACjB,MAAI;AAEF,OAAI,CADkB,MAAM,IAAI,mBAAmB,CAEjD,OAAM,IAAI,iBAAiB,EAAE,gBAAgB,MAAM,CAAC;WAE/C,GAAG;AACV,OAAIA,4BAAW,aAAa,EAAE,EAAE;AAC9B,yBAAqB;KACnB,WAAW,EAAE;KACb,SAAS,EAAE;KACX,SAAS,KAAK,UAAU,EAAE,WAAW,EAAE,CAAC;KACzC,CAAC;AACF;;AAEF,wDAAa,qBAAqB,EAAE;AACpC,wBAAqB,EAAE,CAAC;;GAE1B,EAAE,CAAC,IAAI,CAAC;AAEV,4BAAgB;AACd,mBAAiB,oBAAoB,KAAK,EAAE,IAAK;IAChD,EAAE,CAAC;AAEN,KAAI,qBAAqB,KACvB,QAAO,2CAACC;EAAU,cAAc;EAA6B;GAAY;AAG3E,QACE,2CAACC;EACC,UAAU,YAAY;EACtB,oBAAmB;YAEnB,4CAAC;GACC,gCACE,yFACA,WAAW,QAAQ,MACpB;cAED,2CAAC;IAAI,WAAU;cACb,2CAACC,wBAAQ,MAAM,KAAM;KACjB,EACL,mBAAmB,4CAAC,kBAAG,EAAE,4CAA4C,EAAC,2CAACC;IACtE,WAAU;IACV,MAAK;IACL,UAAU,MAAM;AACd,OAAE,gBAAgB;AAClB,iEAAkB,IAAI,gBAAgB,CAAC;;cAEzC,EAAE,aAAa;KAAc,IAAI,GAAG;IAClC;GACQ"}
1
+ {"version":3,"file":"oauth-callback.js","names":["hexclaveAppInternalsSymbol","KnownError","ErrorPage","MaybeFullPage","Spinner","StyledLink"],"sources":["../../src/components-page/oauth-callback.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 } from \"@hexclave/shared/dist/utils/errors\";\nimport { runAsynchronously } from \"@hexclave/shared/dist/utils/promises\";\nimport { Spinner, cn } from \"@hexclave/ui\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { useStackApp } from \"..\";\nimport { MaybeFullPage } from \"../components/elements/maybe-full-page\";\nimport { StyledLink } from \"../components/link\";\nimport { hexclaveAppInternalsSymbol } from \"../lib/hexclave-app/common\";\nimport { useTranslation } from \"../lib/translations\";\nimport { ErrorPage } from \"./error-page\";\n\nexport function OAuthCallback({ fullPage }: { fullPage?: boolean }) {\n const { t } = useTranslation();\n const app = useStackApp();\n const called = useRef(false);\n const [showRedirectLink, setShowRedirectLink] = useState(false);\n const [errorSearchParams, setErrorSearchParams] = useState<Record<string, string> | null>(null);\n\n useEffect(() => runAsynchronously(async () => {\n if (called.current) return;\n called.current = true;\n try {\n // The startup handler in StackClientApp's constructor may have already consumed the\n // one-time OAuth params (code + state cookie) via a microtask that fires before this\n // macrotask-scheduled useEffect. Await its completion so we don't race: if it succeeds\n // it will redirect and this page tears down; if it fails we fall through below.\n await app[hexclaveAppInternalsSymbol].awaitPendingAuthResolutions();\n const hasRedirected = await app.callOAuthCallback();\n if (!hasRedirected) {\n await app.redirectToSignIn({ noRedirectBack: true });\n }\n } catch (e) {\n if (KnownError.isKnownError(e)) {\n setErrorSearchParams({\n errorCode: e.errorCode,\n message: e.message,\n details: JSON.stringify(e.details ?? {}),\n });\n return;\n }\n captureError(\"<OAuthCallback />\", e);\n setErrorSearchParams({});\n }\n }), [app]);\n\n useEffect(() => {\n setTimeout(() => setShowRedirectLink(true), 3000);\n }, []);\n\n if (errorSearchParams != null) {\n return <ErrorPage searchParams={errorSearchParams} fullPage={fullPage} />;\n }\n\n return (\n <MaybeFullPage\n fullPage={fullPage ?? false}\n containerClassName=\"flex items-center justify-center\"\n >\n <div\n className={cn(\n \"text-center justify-center items-center stack-scope flex flex-col gap-4 max-w-[380px]\",\n fullPage ? \"p-4\" : \"p-0\"\n )}\n >\n <div className=\"flex flex-col justify-center items-center gap-4\">\n <Spinner size={20} />\n </div>\n {showRedirectLink ? <p>{t('If you are not redirected automatically, ')}<StyledLink\n className=\"whitespace-nowrap\"\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n runAsynchronously(app.redirectToHome());\n }}\n >{t(\"click here\")}</StyledLink></p> : null}\n </div>\n </MaybeFullPage>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,SAAgB,cAAc,EAAE,YAAoC;CAClE,MAAM,EAAE,kDAAsB;CAC9B,MAAM,oCAAmB;CACzB,MAAM,2BAAgB,MAAM;CAC5B,MAAM,CAAC,kBAAkB,2CAAgC,MAAM;CAC/D,MAAM,CAAC,mBAAmB,4CAAgE,KAAK;AAE/F,wFAAkC,YAAY;AAC5C,MAAI,OAAO,QAAS;AACpB,SAAO,UAAU;AACjB,MAAI;AAKF,SAAM,IAAIA,0DAA4B,6BAA6B;AAEnE,OAAI,CADkB,MAAM,IAAI,mBAAmB,CAEjD,OAAM,IAAI,iBAAiB,EAAE,gBAAgB,MAAM,CAAC;WAE/C,GAAG;AACV,OAAIC,4BAAW,aAAa,EAAE,EAAE;AAC9B,yBAAqB;KACnB,WAAW,EAAE;KACb,SAAS,EAAE;KACX,SAAS,KAAK,UAAU,EAAE,WAAW,EAAE,CAAC;KACzC,CAAC;AACF;;AAEF,wDAAa,qBAAqB,EAAE;AACpC,wBAAqB,EAAE,CAAC;;GAE1B,EAAE,CAAC,IAAI,CAAC;AAEV,4BAAgB;AACd,mBAAiB,oBAAoB,KAAK,EAAE,IAAK;IAChD,EAAE,CAAC;AAEN,KAAI,qBAAqB,KACvB,QAAO,2CAACC;EAAU,cAAc;EAA6B;GAAY;AAG3E,QACE,2CAACC;EACC,UAAU,YAAY;EACtB,oBAAmB;YAEnB,4CAAC;GACC,gCACE,yFACA,WAAW,QAAQ,MACpB;cAED,2CAAC;IAAI,WAAU;cACb,2CAACC,wBAAQ,MAAM,KAAM;KACjB,EACL,mBAAmB,4CAAC,kBAAG,EAAE,4CAA4C,EAAC,2CAACC;IACtE,WAAU;IACV,MAAK;IACL,UAAU,MAAM;AACd,OAAE,gBAAgB;AAClB,iEAAkB,IAAI,gBAAgB,CAAC;;cAEzC,EAAE,aAAa;KAAc,IAAI,GAAG;IAClC;GACQ"}
@@ -3,6 +3,7 @@ let react = require("react");
3
3
  react = require_chunk.__toESM(react);
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
5
  let _hexclave_shared = require("@hexclave/shared");
6
+ let ___lib_hexclave_app_common_js = require("../lib/hexclave-app/common.js");
6
7
  let react_dom_client = require("react-dom/client");
7
8
  let vitest = require("vitest");
8
9
  let __oauth_callback_js = require("./oauth-callback.js");
@@ -33,7 +34,8 @@ function createAppTestDouble(options) {
33
34
  return {
34
35
  callOAuthCallback: options.callOAuthCallback,
35
36
  redirectToSignIn: vitest.vi.fn(async () => {}),
36
- redirectToHome: vitest.vi.fn(async () => {})
37
+ redirectToHome: vitest.vi.fn(async () => {}),
38
+ [___lib_hexclave_app_common_js.hexclaveAppInternalsSymbol]: { awaitPendingAuthResolutions: vitest.vi.fn(async () => {}) }
37
39
  };
38
40
  }
39
41
  let root = null;
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-callback.test.js","names":["vi","TranslationProviderClient","OAuthCallback","KnownErrors"],"sources":["../../src/components-page/oauth-callback.test.tsx"],"sourcesContent":["\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// @vitest-environment jsdom\n\nimport { KnownErrors } from \"@hexclave/shared\";\nimport React, { act } from \"react\";\nimport { createRoot, type Root } from \"react-dom/client\";\nimport { afterEach, beforeEach, describe, expect, it, vi } from \"vitest\";\nimport type { StackClientApp } from \"../lib/hexclave-app/apps/interfaces/client-app\";\nimport { TranslationProviderClient } from \"../providers/translation-provider-client\";\nimport { OAuthCallback } from \"./oauth-callback\";\n\nconst appMockState = vi.hoisted(() => ({ app: null as unknown }));\n\nvi.mock(\"..\", () => ({\n useStackApp: () => {\n if (appMockState.app == null) {\n throw new Error(\"Expected test app to be set before rendering.\");\n }\n return appMockState.app;\n },\n}));\n\nvi.mock(\"@hexclave/ui\", async () => {\n const React = await import(\"react\");\n return {\n Button: (props: { children: React.ReactNode, onClick?: () => void }) => (\n <button type=\"button\" onClick={props.onClick}>{props.children}</button>\n ),\n Spinner: () => <div data-testid=\"spinner\" />,\n Typography: (props: { children: React.ReactNode }) => <div>{props.children}</div>,\n cn: (...classes: (string | false | null | undefined)[]) => classes.filter(Boolean).join(\" \"),\n };\n});\n\nconst previousActEnvironment = Reflect.get(globalThis, \"IS_REACT_ACT_ENVIRONMENT\");\n\nfunction createAppTestDouble(options: {\n callOAuthCallback: () => Promise<boolean>,\n}) {\n const app = {\n callOAuthCallback: options.callOAuthCallback,\n redirectToSignIn: vi.fn(async () => {}),\n redirectToHome: vi.fn(async () => {}),\n };\n\n // This test double intentionally implements only the StackClientApp surface\n // that OAuthCallback and the rendered error card touch.\n return app as unknown as StackClientApp<true>;\n}\n\nlet root: Root | null = null;\nlet container: HTMLDivElement | null = null;\n\nasync function renderWithApp(app: StackClientApp<true>) {\n appMockState.app = app;\n container = document.createElement(\"div\");\n document.body.append(container);\n root = createRoot(container);\n await act(async () => {\n root?.render(\n <TranslationProviderClient quetzalKeys={new Map()} quetzalLocale={new Map()}>\n <OAuthCallback />\n </TranslationProviderClient>\n );\n });\n}\n\nasync function flushEffects() {\n await act(async () => {\n await new Promise((resolve) => setTimeout(resolve, 0));\n });\n}\n\ndescribe(\"OAuthCallback\", () => {\n beforeEach(() => {\n Reflect.set(globalThis, \"IS_REACT_ACT_ENVIRONMENT\", true);\n });\n\n afterEach(() => {\n act(() => {\n root?.unmount();\n });\n container?.remove();\n root = null;\n container = null;\n appMockState.app = null;\n vi.restoreAllMocks();\n Reflect.set(globalThis, \"IS_REACT_ACT_ENVIRONMENT\", previousActEnvironment);\n });\n\n it(\"renders backend-encoded OAuth callback errors on the callback page\", async () => {\n const errorMessage = \"Your sign up was rejected by an administrator's sign-up rule.\";\n const callOAuthCallback = vi.fn(async () => {\n throw new KnownErrors.SignUpRejected(errorMessage);\n });\n const app = createAppTestDouble({ callOAuthCallback });\n\n await renderWithApp(app);\n await flushEffects();\n\n expect(callOAuthCallback).toHaveBeenCalledOnce();\n expect(container?.textContent).toContain(\"SIGN_UP_REJECTED\");\n expect(container?.textContent).toContain(errorMessage);\n expect(app.redirectToSignIn).not.toHaveBeenCalled();\n });\n});\n"],"mappings":";;;;;;;;;;;;AAcA,MAAM,eAAeA,UAAG,eAAe,EAAE,KAAK,MAAiB,EAAE;AAEjEA,UAAG,KAAK,aAAa,EACnB,mBAAmB;AACjB,KAAI,aAAa,OAAO,KACtB,OAAM,IAAI,MAAM,gDAAgD;AAElE,QAAO,aAAa;GAEvB,EAAE;AAEHA,UAAG,KAAK,gBAAgB,YAAY;AACpB,OAAM,OAAO;AAC3B,QAAO;EACL,SAAS,UACP,2CAAC;GAAO,MAAK;GAAS,SAAS,MAAM;aAAU,MAAM;IAAkB;EAEzE,eAAe,2CAAC,SAAI,eAAY,YAAY;EAC5C,aAAa,UAAyC,2CAAC,mBAAK,MAAM,WAAe;EACjF,KAAK,GAAG,YAAmD,QAAQ,OAAO,QAAQ,CAAC,KAAK,IAAI;EAC7F;EACD;AAEF,MAAM,yBAAyB,QAAQ,IAAI,YAAY,2BAA2B;AAElF,SAAS,oBAAoB,SAE1B;AASD,QARY;EACV,mBAAmB,QAAQ;EAC3B,kBAAkBA,UAAG,GAAG,YAAY,GAAG;EACvC,gBAAgBA,UAAG,GAAG,YAAY,GAAG;EACtC;;AAOH,IAAI,OAAoB;AACxB,IAAI,YAAmC;AAEvC,eAAe,cAAc,KAA2B;AACtD,cAAa,MAAM;AACnB,aAAY,SAAS,cAAc,MAAM;AACzC,UAAS,KAAK,OAAO,UAAU;AAC/B,yCAAkB,UAAU;AAC5B,sBAAU,YAAY;AACpB,QAAM,OACJ,2CAACC;GAA0B,6BAAa,IAAI,KAAK;GAAE,+BAAe,IAAI,KAAK;aACzE,2CAACC,sCAAgB;IACS,CAC7B;GACD;;AAGJ,eAAe,eAAe;AAC5B,sBAAU,YAAY;AACpB,QAAM,IAAI,SAAS,YAAY,WAAW,SAAS,EAAE,CAAC;GACtD;;qBAGK,uBAAuB;AAC9B,8BAAiB;AACf,UAAQ,IAAI,YAAY,4BAA4B,KAAK;GACzD;AAEF,6BAAgB;AACd,uBAAU;AACR,SAAM,SAAS;IACf;AACF,aAAW,QAAQ;AACnB,SAAO;AACP,cAAY;AACZ,eAAa,MAAM;AACnB,YAAG,iBAAiB;AACpB,UAAQ,IAAI,YAAY,4BAA4B,uBAAuB;GAC3E;AAEF,gBAAG,sEAAsE,YAAY;EACnF,MAAM,eAAe;EACrB,MAAM,oBAAoBF,UAAG,GAAG,YAAY;AAC1C,SAAM,IAAIG,6BAAY,eAAe,aAAa;IAClD;EACF,MAAM,MAAM,oBAAoB,EAAE,mBAAmB,CAAC;AAEtD,QAAM,cAAc,IAAI;AACxB,QAAM,cAAc;AAEpB,qBAAO,kBAAkB,CAAC,sBAAsB;AAChD,qBAAO,WAAW,YAAY,CAAC,UAAU,mBAAmB;AAC5D,qBAAO,WAAW,YAAY,CAAC,UAAU,aAAa;AACtD,qBAAO,IAAI,iBAAiB,CAAC,IAAI,kBAAkB;GACnD;EACF"}
1
+ {"version":3,"file":"oauth-callback.test.js","names":["vi","hexclaveAppInternalsSymbol","TranslationProviderClient","OAuthCallback","KnownErrors"],"sources":["../../src/components-page/oauth-callback.test.tsx"],"sourcesContent":["\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// @vitest-environment jsdom\n\nimport { KnownErrors } from \"@hexclave/shared\";\nimport React, { act } from \"react\";\nimport { createRoot, type Root } from \"react-dom/client\";\nimport { afterEach, beforeEach, describe, expect, it, vi } from \"vitest\";\nimport type { StackClientApp } from \"../lib/hexclave-app/apps/interfaces/client-app\";\nimport { hexclaveAppInternalsSymbol } from \"../lib/hexclave-app/common\";\nimport { TranslationProviderClient } from \"../providers/translation-provider-client\";\nimport { OAuthCallback } from \"./oauth-callback\";\n\nconst appMockState = vi.hoisted(() => ({ app: null as unknown }));\n\nvi.mock(\"..\", () => ({\n useStackApp: () => {\n if (appMockState.app == null) {\n throw new Error(\"Expected test app to be set before rendering.\");\n }\n return appMockState.app;\n },\n}));\n\nvi.mock(\"@hexclave/ui\", async () => {\n const React = await import(\"react\");\n return {\n Button: (props: { children: React.ReactNode, onClick?: () => void }) => (\n <button type=\"button\" onClick={props.onClick}>{props.children}</button>\n ),\n Spinner: () => <div data-testid=\"spinner\" />,\n Typography: (props: { children: React.ReactNode }) => <div>{props.children}</div>,\n cn: (...classes: (string | false | null | undefined)[]) => classes.filter(Boolean).join(\" \"),\n };\n});\n\nconst previousActEnvironment = Reflect.get(globalThis, \"IS_REACT_ACT_ENVIRONMENT\");\n\nfunction createAppTestDouble(options: {\n callOAuthCallback: () => Promise<boolean>,\n}) {\n const app = {\n callOAuthCallback: options.callOAuthCallback,\n redirectToSignIn: vi.fn(async () => {}),\n redirectToHome: vi.fn(async () => {}),\n [hexclaveAppInternalsSymbol]: {\n awaitPendingAuthResolutions: vi.fn(async () => {}),\n },\n };\n\n // This test double intentionally implements only the StackClientApp surface\n // that OAuthCallback and the rendered error card touch.\n return app as unknown as StackClientApp<true>;\n}\n\nlet root: Root | null = null;\nlet container: HTMLDivElement | null = null;\n\nasync function renderWithApp(app: StackClientApp<true>) {\n appMockState.app = app;\n container = document.createElement(\"div\");\n document.body.append(container);\n root = createRoot(container);\n await act(async () => {\n root?.render(\n <TranslationProviderClient quetzalKeys={new Map()} quetzalLocale={new Map()}>\n <OAuthCallback />\n </TranslationProviderClient>\n );\n });\n}\n\nasync function flushEffects() {\n await act(async () => {\n await new Promise((resolve) => setTimeout(resolve, 0));\n });\n}\n\ndescribe(\"OAuthCallback\", () => {\n beforeEach(() => {\n Reflect.set(globalThis, \"IS_REACT_ACT_ENVIRONMENT\", true);\n });\n\n afterEach(() => {\n act(() => {\n root?.unmount();\n });\n container?.remove();\n root = null;\n container = null;\n appMockState.app = null;\n vi.restoreAllMocks();\n Reflect.set(globalThis, \"IS_REACT_ACT_ENVIRONMENT\", previousActEnvironment);\n });\n\n it(\"renders backend-encoded OAuth callback errors on the callback page\", async () => {\n const errorMessage = \"Your sign up was rejected by an administrator's sign-up rule.\";\n const callOAuthCallback = vi.fn(async () => {\n throw new KnownErrors.SignUpRejected(errorMessage);\n });\n const app = createAppTestDouble({ callOAuthCallback });\n\n await renderWithApp(app);\n await flushEffects();\n\n expect(callOAuthCallback).toHaveBeenCalledOnce();\n expect(container?.textContent).toContain(\"SIGN_UP_REJECTED\");\n expect(container?.textContent).toContain(errorMessage);\n expect(app.redirectToSignIn).not.toHaveBeenCalled();\n });\n});\n"],"mappings":";;;;;;;;;;;;;AAeA,MAAM,eAAeA,UAAG,eAAe,EAAE,KAAK,MAAiB,EAAE;AAEjEA,UAAG,KAAK,aAAa,EACnB,mBAAmB;AACjB,KAAI,aAAa,OAAO,KACtB,OAAM,IAAI,MAAM,gDAAgD;AAElE,QAAO,aAAa;GAEvB,EAAE;AAEHA,UAAG,KAAK,gBAAgB,YAAY;AACpB,OAAM,OAAO;AAC3B,QAAO;EACL,SAAS,UACP,2CAAC;GAAO,MAAK;GAAS,SAAS,MAAM;aAAU,MAAM;IAAkB;EAEzE,eAAe,2CAAC,SAAI,eAAY,YAAY;EAC5C,aAAa,UAAyC,2CAAC,mBAAK,MAAM,WAAe;EACjF,KAAK,GAAG,YAAmD,QAAQ,OAAO,QAAQ,CAAC,KAAK,IAAI;EAC7F;EACD;AAEF,MAAM,yBAAyB,QAAQ,IAAI,YAAY,2BAA2B;AAElF,SAAS,oBAAoB,SAE1B;AAYD,QAXY;EACV,mBAAmB,QAAQ;EAC3B,kBAAkBA,UAAG,GAAG,YAAY,GAAG;EACvC,gBAAgBA,UAAG,GAAG,YAAY,GAAG;GACpCC,2DAA6B,EAC5B,6BAA6BD,UAAG,GAAG,YAAY,GAAG,EACnD;EACF;;AAOH,IAAI,OAAoB;AACxB,IAAI,YAAmC;AAEvC,eAAe,cAAc,KAA2B;AACtD,cAAa,MAAM;AACnB,aAAY,SAAS,cAAc,MAAM;AACzC,UAAS,KAAK,OAAO,UAAU;AAC/B,yCAAkB,UAAU;AAC5B,sBAAU,YAAY;AACpB,QAAM,OACJ,2CAACE;GAA0B,6BAAa,IAAI,KAAK;GAAE,+BAAe,IAAI,KAAK;aACzE,2CAACC,sCAAgB;IACS,CAC7B;GACD;;AAGJ,eAAe,eAAe;AAC5B,sBAAU,YAAY;AACpB,QAAM,IAAI,SAAS,YAAY,WAAW,SAAS,EAAE,CAAC;GACtD;;qBAGK,uBAAuB;AAC9B,8BAAiB;AACf,UAAQ,IAAI,YAAY,4BAA4B,KAAK;GACzD;AAEF,6BAAgB;AACd,uBAAU;AACR,SAAM,SAAS;IACf;AACF,aAAW,QAAQ;AACnB,SAAO;AACP,cAAY;AACZ,eAAa,MAAM;AACnB,YAAG,iBAAiB;AACpB,UAAQ,IAAI,YAAY,4BAA4B,uBAAuB;GAC3E;AAEF,gBAAG,sEAAsE,YAAY;EACnF,MAAM,eAAe;EACrB,MAAM,oBAAoBH,UAAG,GAAG,YAAY;AAC1C,SAAM,IAAII,6BAAY,eAAe,aAAa;IAClD;EACF,MAAM,MAAM,oBAAoB,EAAE,mBAAmB,CAAC;AAEtD,QAAM,cAAc,IAAI;AACxB,QAAM,cAAc;AAEpB,qBAAO,kBAAkB,CAAC,sBAAsB;AAChD,qBAAO,WAAW,YAAY,CAAC,UAAU,mBAAmB;AAC5D,qBAAO,WAAW,YAAY,CAAC,UAAU,aAAa;AACtD,qBAAO,IAAI,iBAAiB,CAAC,IAAI,kBAAkB;GACnD;EACF"}
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
5
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
7
6
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
7
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
8
8
  let _hexclave_ui = require("@hexclave/ui");
9
9
  let react = require("react");
10
10
  let react_hook_form = require("react-hook-form");
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
5
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
7
6
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
7
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
8
8
  let _hexclave_ui = require("@hexclave/ui");
9
9
  let react = require("react");
10
10
  let react_hook_form = require("react-hook-form");
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_chunk = require('../chunk-BE-pF4vm.js');
5
- let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
6
5
  let _hookform_resolvers_yup = require("@hookform/resolvers/yup");
7
6
  let _hexclave_shared_dist_schema_fields = require("@hexclave/shared/dist/schema-fields");
7
+ let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
8
8
  let _hexclave_ui = require("@hexclave/ui");
9
9
  let react = require("react");
10
10
  let react_hook_form = require("react-hook-form");
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('../chunk-BE-pF4vm.js');
3
- let _hexclave_shared_dist_utils_dev_tool = require("@hexclave/shared/dist/utils/dev-tool");
4
3
  let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
4
+ let _hexclave_shared_dist_utils_dev_tool = require("@hexclave/shared/dist/utils/dev-tool");
5
5
  let ___in_page_ui_dom_js = require("../in-page-ui/dom.js");
6
6
  let ___lib_hexclave_app_common_js = require("../lib/hexclave-app/common.js");
7
7
  let _hexclave_shared_dist_utils_urls = require("@hexclave/shared/dist/utils/urls");
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('../chunk-BE-pF4vm.js');
3
+ let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
3
4
  let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
4
5
  let ___in_page_ui_dom_js = require("../in-page-ui/dom.js");
5
- let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
6
6
  let _hexclave_shared_dist_utils_urls = require("@hexclave/shared/dist/utils/urls");
7
7
  let ___generated_env_js = require("../generated/env.js");
8
8
 
@@ -1,9 +1,9 @@
1
+ import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
1
2
  import { AnalyticsClickmapResponseBodySchema } from "@hexclave/shared/dist/interface/admin-metrics";
2
3
  import { CLICKMAP_OVERLAY_RESUME_STORAGE_KEY, CLICKMAP_OVERLAY_TOKEN_STORAGE_KEY, CLICKMAP_OVERLAY_TOKEN_UPDATED_EVENT } from "@hexclave/shared/dist/utils/analytics-clickmap-overlay";
3
4
  import { CLICKMAP_ROOT_ID, DEV_TOOL_ROOT_ID } from "@hexclave/shared/dist/utils/dev-tool";
4
5
  import { cssEscapeIdent } from "@hexclave/shared/dist/utils/dom";
5
6
  import { buildElementsChain, parseElementsChain } from "@hexclave/shared/dist/utils/elements-chain";
6
- import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
7
7
  import { stringCompare } from "@hexclave/shared/dist/utils/strings";
8
8
  import { getGlobalUiInstance, h, hasAppendChild, setGlobalUiInstance, setHtml } from "../in-page-ui/dom.js";
9
9
  import { hexclaveAppInternalsSymbol } from "../lib/hexclave-app/common.js";
@@ -1,7 +1,7 @@
1
- import { CLICKMAP_OVERLAY_RESUME_STORAGE_KEY, CLICKMAP_OVERLAY_TOKEN_UPDATED_EVENT } from "@hexclave/shared/dist/utils/analytics-clickmap-overlay";
1
+ import { captureError } from "@hexclave/shared/dist/utils/errors";
2
2
  import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
3
+ import { CLICKMAP_OVERLAY_RESUME_STORAGE_KEY, CLICKMAP_OVERLAY_TOKEN_UPDATED_EVENT } from "@hexclave/shared/dist/utils/analytics-clickmap-overlay";
3
4
  import { canMountIntoDom } from "../in-page-ui/dom.js";
4
- import { captureError } from "@hexclave/shared/dist/utils/errors";
5
5
 
6
6
  //#region src/clickmap/index.ts
7
7
  function consumeResumeSentinel() {
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
- import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
4
- import { captureError } from "@hexclave/shared/dist/utils/errors";
5
3
  import { yupResolver } from "@hookform/resolvers/yup";
6
4
  import { yupObject, yupString } from "@hexclave/shared/dist/schema-fields";
5
+ import { captureError } from "@hexclave/shared/dist/utils/errors";
6
+ import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
7
7
  import { ActionDialog, Button, CopyField, Input, Label, Typography } from "@hexclave/ui";
8
8
  import { useState } from "react";
9
9
  import { useForm } from "react-hook-form";
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
- import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
4
3
  import { yupResolver } from "@hookform/resolvers/yup";
5
4
  import { passwordSchema, strictEmailSchema, yupObject } from "@hexclave/shared/dist/schema-fields";
5
+ import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
6
6
  import { Button, Input, Label, PasswordInput } from "@hexclave/ui";
7
7
  import { useState } from "react";
8
8
  import { useForm } from "react-hook-form";
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
- import { runAsynchronously, runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
4
3
  import { yupResolver } from "@hookform/resolvers/yup";
5
4
  import { passwordSchema, strictEmailSchema, yupObject } from "@hexclave/shared/dist/schema-fields";
5
+ import { runAsynchronously, runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
6
6
  import { Button, Input, Label, PasswordInput } from "@hexclave/ui";
7
7
  import React, { useState } from "react";
8
8
  import { useForm } from "react-hook-form";
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
- import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
4
3
  import { yupResolver } from "@hookform/resolvers/yup";
5
4
  import { strictEmailSchema, yupObject } from "@hexclave/shared/dist/schema-fields";
5
+ import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
6
6
  import { Button, Input, InputOTP, InputOTPGroup, InputOTPSlot, Label, Typography } from "@hexclave/ui";
7
7
  import { useEffect, useState } from "react";
8
8
  import { useForm } from "react-hook-form";
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
4
3
  import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
4
+ import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
5
5
  import { Button, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Skeleton, Typography, cn } from "@hexclave/ui";
6
6
  import { Suspense, useMemo } from "react";
7
7
  import { useStackApp, useUser } from "../index.js";
@@ -1,5 +1,5 @@
1
- import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
2
1
  import { captureError } from "@hexclave/shared/dist/utils/errors";
2
+ import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
3
3
  import { ActionCell, Badge, Button, Skeleton, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Typography } from "@hexclave/ui";
4
4
  import { useEffect, useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
2
1
  import { yupResolver } from "@hookform/resolvers/yup";
3
2
  import { strictEmailSchema, yupObject } from "@hexclave/shared/dist/schema-fields";
3
+ import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
4
4
  import { ActionCell, Badge, Button, Input, Table, TableBody, TableCell, TableRow, Typography } from "@hexclave/ui";
5
5
  import { useEffect, useState } from "react";
6
6
  import { useForm } from "react-hook-form";
@@ -1,5 +1,5 @@
1
- import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
2
1
  import { throwErr } from "@hexclave/shared/dist/utils/errors";
2
+ import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
3
3
  import { Button, Input, Typography } from "@hexclave/ui";
4
4
  import { useEffect, useState } from "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import { runAsynchronously, runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
2
1
  import { yupResolver } from "@hookform/resolvers/yup";
3
2
  import { passwordSchema, yupObject, yupString } from "@hexclave/shared/dist/schema-fields";
3
+ import { runAsynchronously, runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
4
4
  import { Button, Input, Label, PasswordInput, Typography } from "@hexclave/ui";
5
5
  import { useState } from "react";
6
6
  import { useForm } from "react-hook-form";
@@ -4,9 +4,9 @@ import { useState } from "react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useStackApp, useUser } from "../../../lib/hooks.js";
6
6
  import { useTranslation } from "../../../lib/translations.js";
7
+ import { Section } from "../section.js";
7
8
  import { CreateApiKeyDialog, ShowApiKeyDialog } from "../../../components/api-key-dialogs.js";
8
9
  import { ApiKeyTable } from "../../../components/api-key-table.js";
9
- import { Section } from "../section.js";
10
10
 
11
11
  //#region src/components-page/account-settings/teams/team-api-keys-section.tsx
12
12
  function TeamApiKeysSection(props) {
@@ -1,6 +1,6 @@
1
- import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
2
1
  import { yupResolver } from "@hookform/resolvers/yup";
3
2
  import { yupObject, yupString } from "@hexclave/shared/dist/schema-fields";
3
+ import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
4
4
  import { Button, Input } from "@hexclave/ui";
5
5
  import { useState } from "react";
6
6
  import { useForm } from "react-hook-form";
@@ -1,6 +1,6 @@
1
- import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
2
1
  import { yupResolver } from "@hookform/resolvers/yup";
3
2
  import { strictEmailSchema, yupObject } from "@hexclave/shared/dist/schema-fields";
3
+ import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
4
4
  import { Button, Input, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Typography } from "@hexclave/ui";
5
5
  import { useEffect, useState } from "react";
6
6
  import { useForm } from "react-hook-form";
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
4
3
  import { captureError } from "@hexclave/shared/dist/utils/errors";
4
+ import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
5
5
  import { Skeleton, Tabs, TabsContent, TabsList, TabsTrigger, Typography, cn } from "@hexclave/ui";
6
6
  import { Suspense, useMemo } from "react";
7
7
  import { useStackApp, useUser } from "../index.js";
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
 
3
3
  import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
4
- import { hexclaveAppInternalsSymbol } from "../lib/hexclave-app/common.js";
5
4
  import { Typography } from "@hexclave/ui";
6
5
  import { useCallback, useEffect, useRef, useState } from "react";
7
6
  import { useTranslation } from "../lib/translations.js";
8
7
  import { jsx, jsxs } from "react/jsx-runtime";
9
8
  import { useStackApp } from "../lib/hooks.js";
9
+ import { hexclaveAppInternalsSymbol } from "../lib/hexclave-app/common.js";
10
10
  import { MessageCard } from "../components/message-cards/message-card.js";
11
11
 
12
12
  //#region src/components-page/cli-auth-confirm.tsx
@@ -1,7 +1,7 @@
1
1
  import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
2
- import { hexclaveAppInternalsSymbol } from "../lib/hexclave-app/common.js";
3
2
  import React, { act } from "react";
4
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { hexclaveAppInternalsSymbol } from "../lib/hexclave-app/common.js";
5
5
  import { createRoot } from "react-dom/client";
6
6
  import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
7
7
  import { HexclaveContext } from "../providers/hexclave-context.js";
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
- import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
4
3
  import { yupResolver } from "@hookform/resolvers/yup";
5
4
  import { strictEmailSchema, yupObject } from "@hexclave/shared/dist/schema-fields";
5
+ import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
6
6
  import { Button, Input, Label, Typography, cn } from "@hexclave/ui";
7
7
  import { useState } from "react";
8
8
  import { useForm } from "react-hook-form";
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-callback.d.ts","names":[],"sources":["../../../src/components-page/oauth-callback.tsx"],"mappings":";;;iBAkBgB,aAAA,CAAA;EAAgB;AAAA;EAAc,QAAA;AAAA,IAAoB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"oauth-callback.d.ts","names":[],"sources":["../../../src/components-page/oauth-callback.tsx"],"mappings":";;;iBAmBgB,aAAA,CAAA;EAAgB;AAAA;EAAc,QAAA;AAAA,IAAoB,kBAAA,CAAA,GAAA,CAAA,OAAA"}