@protobase/ui 0.46.3 → 0.46.5

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 (214) hide show
  1. package/dist/account/account-page.js +50 -0
  2. package/dist/account/account-pages.js +24 -9
  3. package/dist/account/account-tree.js +18 -0
  4. package/dist/account/blocks/account-loading.js +19 -0
  5. package/dist/account/blocks/connected-accounts-block.js +37 -0
  6. package/dist/account/blocks/connected-apps-block.js +21 -0
  7. package/dist/account/blocks/devices-block.js +23 -0
  8. package/dist/account/blocks/passkeys-block.js +25 -0
  9. package/dist/account/blocks/password-block.js +27 -0
  10. package/dist/account/blocks/profile-block.js +28 -0
  11. package/dist/account/blocks/two-factor-block.js +29 -0
  12. package/dist/account/blocks/use-account-data.js +24 -0
  13. package/dist/account/change-email-dialog.js +98 -0
  14. package/dist/account/connected-apps-section.js +4 -4
  15. package/dist/account/device-name.js +26 -0
  16. package/dist/account/devices-section.js +119 -0
  17. package/dist/account/messages.js +94 -2
  18. package/dist/account/passkeys-section.js +4 -4
  19. package/dist/account/password-change-dialog.js +119 -0
  20. package/dist/account/password-dialog.js +2 -2
  21. package/dist/account/password-section.js +51 -0
  22. package/dist/account/profile-section.js +107 -0
  23. package/dist/account/sign-in-policy-form.js +1 -1
  24. package/dist/account/sign-in-policy-page.js +1 -1
  25. package/dist/account/sign-in-providers-section.js +2 -2
  26. package/dist/account/staff-sign-in-log.js +1 -1
  27. package/dist/account/two-factor-section.js +1 -1
  28. package/dist/account/two-factor-setup.js +2 -2
  29. package/dist/activity-chart/activity-chart.js +2 -2
  30. package/dist/app/app.js +39 -23
  31. package/dist/app/charts/chart-view.js +2 -2
  32. package/dist/app/comments/comment-composer.js +1 -1
  33. package/dist/app/comments/comments-section.js +3 -3
  34. package/dist/app/create/create-page.js +4 -4
  35. package/dist/app/current-address.d.ts +1 -0
  36. package/dist/app/custom-section.js +4 -4
  37. package/dist/app/delete/use-delete-flow.js +1 -1
  38. package/dist/app/displays/board-column.js +1 -1
  39. package/dist/app/displays/board-display.js +2 -2
  40. package/dist/app/displays/calendar-display.js +2 -2
  41. package/dist/app/displays/custom-display.js +3 -3
  42. package/dist/app/displays/display-controls.js +1 -1
  43. package/dist/app/displays/map-display.js +2 -2
  44. package/dist/app/displays/period-controls.js +1 -1
  45. package/dist/app/displays/record-card.js +2 -2
  46. package/dist/app/displays/timeline-display.js +2 -2
  47. package/dist/app/displays/use-calendar-move.js +1 -1
  48. package/dist/app/document-title.js +2 -2
  49. package/dist/app/embedded-list/embedded-display.js +1 -1
  50. package/dist/app/embedded-list/embedded-list.js +1 -1
  51. package/dist/app/export/export-dialog.js +2 -2
  52. package/dist/app/export/use-export-flow.js +1 -1
  53. package/dist/app/field-editor.js +2 -2
  54. package/dist/app/file-field.js +3 -3
  55. package/dist/app/gallery/gallery-section.js +2 -2
  56. package/dist/app/gallery/photo-details.js +1 -1
  57. package/dist/app/gallery/use-gallery-photos.js +1 -1
  58. package/dist/app/hand-order/hand-sorted-list.js +3 -3
  59. package/dist/app/history/history-section.js +2 -2
  60. package/dist/app/import/import-button.js +1 -1
  61. package/dist/app/import/import-check-step.js +1 -1
  62. package/dist/app/incoming-card.js +2 -2
  63. package/dist/app/list-group-chart.js +1 -1
  64. package/dist/app/list-page.js +6 -6
  65. package/dist/app/messages.js +0 -2
  66. package/dist/app/meta-gate.js +1 -1
  67. package/dist/app/nav-from-meta.js +1 -1
  68. package/dist/app/new-version/new-version-banner.js +1 -1
  69. package/dist/app/new-version/new-version-button.js +1 -1
  70. package/dist/app/new-version/new-version-toast.js +1 -1
  71. package/dist/app/pages/action-inputs/action-inputs-dialog.js +2 -2
  72. package/dist/app/pages/action-inputs/input-answers.js +1 -1
  73. package/dist/app/pages/blocks/card-row.js +2 -2
  74. package/dist/app/pages/blocks/field.js +1 -1
  75. package/dist/app/pages/blocks/form-draft.js +19 -0
  76. package/dist/app/pages/blocks/modal-form.js +10 -24
  77. package/dist/app/pages/blocks/page-block.js +1 -1
  78. package/dist/app/pages/blocks/record-card.js +2 -2
  79. package/dist/app/pages/blocks/settings.js +179 -0
  80. package/dist/app/pages/blocks/stat.js +2 -2
  81. package/dist/app/pages/blocks/tabs.js +59 -0
  82. package/dist/app/pages/composed-page.js +16 -3
  83. package/dist/app/pages/custom-boundary.js +1 -1
  84. package/dist/app/pages/field-value.js +1 -1
  85. package/dist/app/pages/messages.js +6 -0
  86. package/dist/app/pages/page-tabs.js +27 -0
  87. package/dist/app/pages/record-actions.js +2 -2
  88. package/dist/app/pages/render-node.js +22 -3
  89. package/dist/app/pages/use-run-action.js +1 -1
  90. package/dist/app/project-logo.js +2 -2
  91. package/dist/app/record-chart/record-chart-section.js +4 -4
  92. package/dist/app/record-page.js +12 -12
  93. package/dist/app/record-row/record-row-body.js +1 -1
  94. package/dist/app/record-row/saved-record-row.js +1 -1
  95. package/dist/app/related-cards/related-card.js +1 -1
  96. package/dist/app/related-dots/related-dots-columns.js +1 -1
  97. package/dist/app/related-section.js +2 -2
  98. package/dist/app/relation-picker.js +1 -1
  99. package/dist/app/router.js +2 -2
  100. package/dist/app/saved/saved-list.js +1 -1
  101. package/dist/app/search/use-global-search.js +1 -1
  102. package/dist/app/searches/save-search-button.js +1 -1
  103. package/dist/app/searches/saved-search-rows.js +1 -1
  104. package/dist/app/searches/saved-search-section.js +2 -2
  105. package/dist/app/searches/saved-searches.js +3 -3
  106. package/dist/app/searches/search-controls.js +2 -2
  107. package/dist/app/searches/search-name-dialog.js +1 -1
  108. package/dist/app/searches/update-search-dialog.js +2 -2
  109. package/dist/app/searches/use-save-search.js +1 -1
  110. package/dist/app/sensitive-field.js +2 -2
  111. package/dist/app/source-notice.js +1 -1
  112. package/dist/app/staff-banner.js +2 -2
  113. package/dist/app/use-app-address.js +2 -2
  114. package/dist/app/use-incoming-counts.js +1 -1
  115. package/dist/app-shell/app-shell.js +2 -1
  116. package/dist/app-shell/breadcrumb.js +1 -1
  117. package/dist/app-shell/drawer.js +1 -1
  118. package/dist/app-shell/global-search.js +1 -1
  119. package/dist/app-shell/profile-menu.js +27 -12
  120. package/dist/app-shell/sidebar.js +2 -1
  121. package/dist/assistant-dock/widget-view.js +1 -1
  122. package/dist/auth/auth-gate.js +2 -2
  123. package/dist/auth/auth-messages.js +2 -2
  124. package/dist/auth/auth-provider.js +4 -0
  125. package/dist/auth/code-form.js +1 -1
  126. package/dist/auth/email-code-form.js +1 -1
  127. package/dist/auth/email-code-page.js +1 -1
  128. package/dist/auth/forgot-password-form.js +4 -4
  129. package/dist/auth/provider-sign-in-page.js +2 -2
  130. package/dist/auth/reset-password-form.js +1 -1
  131. package/dist/auth/setup-required-form.js +1 -1
  132. package/dist/auth/setup-required-page.js +2 -2
  133. package/dist/auth/sign-in-form.js +2 -2
  134. package/dist/auth/sign-in-page.js +1 -1
  135. package/dist/auth/sign-in-prompt.js +2 -2
  136. package/dist/auth/sign-up-code-form.js +1 -1
  137. package/dist/auth/sign-up-details-form.js +2 -2
  138. package/dist/auth/sign-up-email-form.js +1 -1
  139. package/dist/auth/sign-up-page.js +1 -1
  140. package/dist/auth/staff-sign-in-form.js +2 -2
  141. package/dist/auth/staff-sign-in-page.js +1 -1
  142. package/dist/auth/two-factor-form.js +3 -3
  143. package/dist/auth/two-factor-page.js +1 -1
  144. package/dist/chat/composer.js +1 -1
  145. package/dist/connect/connect-page.js +4 -4
  146. package/dist/data/meta-data.d.ts +3 -1
  147. package/dist/data/use-meta.js +1 -0
  148. package/dist/data-grid/cell-text.js +1 -1
  149. package/dist/data-grid/cells.js +3 -3
  150. package/dist/data-grid/grid-header.js +1 -1
  151. package/dist/data-grid/grid-row.js +2 -2
  152. package/dist/data-grid/row-menu.js +1 -1
  153. package/dist/filter-panel/facet-group.js +1 -1
  154. package/dist/forms/public-form-page.js +5 -5
  155. package/dist/index.js +20 -20
  156. package/dist/inline-child-table/line-row.js +1 -1
  157. package/dist/inline-child-table/totals-footer.js +1 -1
  158. package/dist/invitations/invite-form.js +1 -1
  159. package/dist/lists/paged-search-list.js +1 -1
  160. package/dist/live/columns-from-model.js +1 -1
  161. package/dist/live/use-filter-config.js +1 -1
  162. package/dist/live/use-reference-search.js +1 -1
  163. package/dist/notifications/bell/notification-bell.js +1 -1
  164. package/dist/notifications/bell/notification-item.js +2 -2
  165. package/dist/organizations/all-organizations.js +1 -1
  166. package/dist/organizations/invitation-page.js +6 -6
  167. package/dist/organizations/invitations-page.js +3 -3
  168. package/dist/organizations/members-page.js +5 -5
  169. package/dist/organizations/organization-page.js +3 -3
  170. package/dist/organizations/organization-row.js +1 -1
  171. package/dist/organizations/organizations-page.js +3 -3
  172. package/dist/organizations/use-organizations.js +1 -1
  173. package/dist/package.js +1 -1
  174. package/dist/plugins/before-sign-in.js +1 -1
  175. package/dist/plugins/plugin-gate.js +1 -1
  176. package/dist/primitives/sheet.js +1 -1
  177. package/dist/record-view/field.js +2 -2
  178. package/dist/record-view/record-header.js +1 -1
  179. package/dist/record-view/record-tabs.js +1 -1
  180. package/dist/roles/use-active-role.js +1 -1
  181. package/dist/shell/assets/app-DYCHMbTU.js +9 -0
  182. package/dist/shell/assets/index-CT4BrHx-.js +2 -0
  183. package/dist/shell/assets/index-zVvlyz9B.css +2 -0
  184. package/dist/shell/assets/{maplibre-BlwO7zTh.js → maplibre-CjNYwEqW.js} +3 -3
  185. package/dist/shell/assets/{preload-helper-C24C2MCK.js → preload-helper-SYSsmQ2O.js} +2 -2
  186. package/dist/shell/assets/{record-map-QajKJid1.js → record-map-DjqQGqZ2.js} +2 -2
  187. package/dist/shell/assets/{records-map-DybHhZlM.js → records-map-CZB4A_qN.js} +2 -2
  188. package/dist/shell/assets/shared-protobase-ui-DVOkKNxu.js +2 -0
  189. package/dist/shell/assets/vendor-BzlIWwX2.js +63 -0
  190. package/dist/shell/index.html +6 -6
  191. package/dist/shell/protobase.shell.json +1 -1
  192. package/dist/shell/protobase.sw.js +2 -2
  193. package/dist/shell-source-maps/assets/app-DYCHMbTU.js.map +1 -0
  194. package/dist/shell-source-maps/assets/{index-CY22munM.js.map → index-CT4BrHx-.js.map} +1 -1
  195. package/dist/shell-source-maps/assets/{maplibre-BlwO7zTh.js.map → maplibre-CjNYwEqW.js.map} +1 -1
  196. package/dist/shell-source-maps/assets/{preload-helper-C24C2MCK.js.map → preload-helper-SYSsmQ2O.js.map} +1 -1
  197. package/dist/shell-source-maps/assets/{record-map-QajKJid1.js.map → record-map-DjqQGqZ2.js.map} +1 -1
  198. package/dist/shell-source-maps/assets/{records-map-DybHhZlM.js.map → records-map-CZB4A_qN.js.map} +1 -1
  199. package/dist/shell-source-maps/assets/{shared-protobase-ui-TOG-RVkz.js.map → shared-protobase-ui-DVOkKNxu.js.map} +1 -1
  200. package/dist/shell-source-maps/assets/vendor-BzlIWwX2.js.map +1 -0
  201. package/dist/side-panel/side-panel.js +1 -1
  202. package/dist/toasts/toast.js +1 -1
  203. package/dist/users/create-user-form.js +1 -1
  204. package/dist/users/use-user-roles.js +1 -1
  205. package/dist/users/user-row.js +1 -1
  206. package/package.json +4 -4
  207. package/dist/account/account-security-page.js +0 -97
  208. package/dist/shell/assets/app-BDvKMNNB.js +0 -9
  209. package/dist/shell/assets/index-CY22munM.js +0 -2
  210. package/dist/shell/assets/index-DHaeB8cs.css +0 -2
  211. package/dist/shell/assets/shared-protobase-ui-TOG-RVkz.js +0 -2
  212. package/dist/shell/assets/vendor-C4-Hop1T.js +0 -63
  213. package/dist/shell-source-maps/assets/app-BDvKMNNB.js.map +0 -1
  214. package/dist/shell-source-maps/assets/vendor-C4-Hop1T.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { Skeleton } from "../primitives/skeleton.js";
2
1
  import { keys } from "../data/query-keys.js";
3
2
  import { useClient } from "../data/api-provider.js";
4
3
  import { useAdminMeta, usePermissions } from "./meta-gate.js";
4
+ import { Skeleton } from "../primitives/skeleton.js";
5
5
  import { Section } from "../record-view/section.js";
6
6
  import { listColumnNames } from "../live/columns-from-model.js";
7
7
  import { ErrorBanner } from "./error-banner.js";
@@ -17,8 +17,8 @@ import { HandSortedList } from "./hand-order/hand-sorted-list.js";
17
17
  import { ReorderButton } from "./hand-order/reorder-button.js";
18
18
  import { useState } from "react";
19
19
  import { jsx, jsxs } from "react/jsx-runtime";
20
- import { createWhere, printFilter } from "@protobase/schema";
21
20
  import { useQuery } from "@tanstack/react-query";
21
+ import { createWhere, printFilter } from "@protobase/schema";
22
22
  //#region src/app/related-section.tsx
23
23
  const where$1 = createWhere();
24
24
  const and = (...parts) => {
@@ -1,8 +1,8 @@
1
1
  import { cn } from "../lib/cn.js";
2
2
  import { Input } from "../primitives/input.js";
3
- import { text } from "./messages.js";
4
3
  import { humanize } from "../live/naming.js";
5
4
  import { labelFieldOf } from "../live/model-helpers.js";
5
+ import { text } from "./messages.js";
6
6
  import { useList } from "../data/use-list.js";
7
7
  import { relationOptionsQuery, titleMatches } from "./relation-options.js";
8
8
  import { useCallback, useEffect, useId, useRef, useState } from "react";
@@ -1,7 +1,7 @@
1
- import { RouteLink } from "../primitives/route-link.js";
2
- import { guarded } from "../lib/guarded.js";
3
1
  import { Button } from "../primitives/button.js";
4
2
  import { Dialog } from "../primitives/dialog.js";
3
+ import { guarded } from "../lib/guarded.js";
4
+ import { RouteLink } from "../primitives/route-link.js";
5
5
  import { text } from "./messages.js";
6
6
  import { createPagePlaces } from "./page-places.js";
7
7
  import { restoreScroll } from "./restore-scroll.js";
@@ -1,7 +1,7 @@
1
1
  import { Skeleton } from "../../primitives/skeleton.js";
2
- import { PageHeader } from "../../app-shell/page-header.js";
3
2
  import { humanize } from "../../live/naming.js";
4
3
  import { ErrorBanner } from "../error-banner.js";
4
+ import { PageHeader } from "../../app-shell/page-header.js";
5
5
  import { savedScope } from "./saved-records.js";
6
6
  import { useSavedRecords } from "./use-saved-records.js";
7
7
  import { text } from "./messages.js";
@@ -1,6 +1,6 @@
1
- import { useRouter } from "../router.js";
2
1
  import { useClient } from "../../data/api-provider.js";
3
2
  import { useAdminMeta } from "../meta-gate.js";
3
+ import { useRouter } from "../router.js";
4
4
  import { useDebounced } from "../../lib/use-debounced.js";
5
5
  import { navigationHits } from "./navigation-hits.js";
6
6
  import { searchFields, searchFilter, searchPlaceholder, searchTargets, toHit } from "./search-model.js";
@@ -1,6 +1,6 @@
1
1
  import { Button } from "../../primitives/button.js";
2
- import { SignInPrompt } from "../../auth/sign-in-prompt.js";
3
2
  import { text } from "./messages.js";
3
+ import { SignInPrompt } from "../../auth/sign-in-prompt.js";
4
4
  import { SearchNameDialog } from "./search-name-dialog.js";
5
5
  import { UpdateSearchDialog } from "./update-search-dialog.js";
6
6
  import { useSaveSearch } from "./use-save-search.js";
@@ -1,5 +1,5 @@
1
- import { Skeleton } from "../../primitives/skeleton.js";
2
1
  import { useAdminMeta } from "../meta-gate.js";
2
+ import { Skeleton } from "../../primitives/skeleton.js";
3
3
  import { humanize } from "../../live/naming.js";
4
4
  import { recordKey } from "../../live/model-helpers.js";
5
5
  import { AppLink } from "../use-app-address.js";
@@ -1,7 +1,7 @@
1
- import { Button } from "../../primitives/button.js";
2
1
  import { useClient } from "../../data/api-provider.js";
3
- import { humanize } from "../../live/naming.js";
2
+ import { Button } from "../../primitives/button.js";
4
3
  import { useToast } from "../../toasts/toast-provider.js";
4
+ import { humanize } from "../../live/naming.js";
5
5
  import { AppLink } from "../use-app-address.js";
6
6
  import { useRefreshResource } from "../pages/use-layout-data.js";
7
7
  import { text } from "./messages.js";
@@ -1,12 +1,12 @@
1
- import { Skeleton } from "../../primitives/skeleton.js";
2
- import { PageHeader } from "../../app-shell/page-header.js";
3
1
  import { Notice, useAdminMeta, usePermissions } from "../meta-gate.js";
4
- import { slotted } from "../../locale/slotted.js";
2
+ import { Skeleton } from "../../primitives/skeleton.js";
5
3
  import { humanize } from "../../live/naming.js";
6
4
  import { recordKey } from "../../live/model-helpers.js";
7
5
  import { AppLink } from "../use-app-address.js";
8
6
  import { ErrorBanner } from "../error-banner.js";
7
+ import { slotted } from "../../locale/slotted.js";
9
8
  import { can } from "../permissions.js";
9
+ import { PageHeader } from "../../app-shell/page-header.js";
10
10
  import { text } from "./messages.js";
11
11
  import { useSavedSearches } from "./use-saved-searches.js";
12
12
  import { useDeleteFlow } from "../delete/use-delete-flow.js";
@@ -1,13 +1,13 @@
1
1
  import { useClient } from "../../data/api-provider.js";
2
- import { humanize } from "../../live/naming.js";
3
2
  import { useToast } from "../../toasts/toast-provider.js";
3
+ import { humanize } from "../../live/naming.js";
4
4
  import { Switch } from "../../primitives/switch.js";
5
5
  import { useRefreshResource } from "../pages/use-layout-data.js";
6
6
  import { text } from "./messages.js";
7
7
  import { useId } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { enumLabel } from "@protobase/schema";
10
9
  import { useMutation } from "@tanstack/react-query";
10
+ import { enumLabel } from "@protobase/schema";
11
11
  //#region src/app/searches/search-controls.tsx
12
12
  const message = (error) => error instanceof Error ? error.message : text("somethingWrong");
13
13
  const Control = ({ model, view, name, value, onChange }) => {
@@ -1,6 +1,6 @@
1
- import { Input } from "../../primitives/input.js";
2
1
  import { Button } from "../../primitives/button.js";
3
2
  import { ResponsiveDialog } from "../../primitives/responsive-dialog.js";
3
+ import { Input } from "../../primitives/input.js";
4
4
  import { text } from "./messages.js";
5
5
  import { FilterChipList } from "./filter-chip-list.js";
6
6
  import { useId, useState } from "react";
@@ -1,7 +1,7 @@
1
- import { Skeleton } from "../../primitives/skeleton.js";
1
+ import { useClient } from "../../data/api-provider.js";
2
2
  import { Button } from "../../primitives/button.js";
3
3
  import { ResponsiveDialog } from "../../primitives/responsive-dialog.js";
4
- import { useClient } from "../../data/api-provider.js";
4
+ import { Skeleton } from "../../primitives/skeleton.js";
5
5
  import { humanize } from "../../live/naming.js";
6
6
  import { defaultOrderBy } from "../list-order.js";
7
7
  import { countQuery } from "../pages/use-layout-data.js";
@@ -1,7 +1,7 @@
1
1
  import { useClient } from "../../data/api-provider.js";
2
2
  import { useAdminMeta } from "../meta-gate.js";
3
- import { humanize } from "../../live/naming.js";
4
3
  import { useToast } from "../../toasts/toast-provider.js";
4
+ import { humanize } from "../../live/naming.js";
5
5
  import { recordKey } from "../../live/model-helpers.js";
6
6
  import { useAppAddress } from "../use-app-address.js";
7
7
  import { can } from "../permissions.js";
@@ -1,9 +1,9 @@
1
1
  import { cn } from "../lib/cn.js";
2
- import { Input } from "../primitives/input.js";
3
2
  import { Button } from "../primitives/button.js";
4
- import { text } from "./messages.js";
3
+ import { Input } from "../primitives/input.js";
5
4
  import { humanize } from "../live/naming.js";
6
5
  import { displayValue } from "../live/display-value.js";
6
+ import { text } from "./messages.js";
7
7
  import { toDraft } from "../live/field-values.js";
8
8
  import { ErrorBanner } from "./error-banner.js";
9
9
  import { useState } from "react";
@@ -1,7 +1,7 @@
1
+ import { keys } from "../data/query-keys.js";
1
2
  import { Spinner } from "../primitives/spinner.js";
2
3
  import { Button } from "../primitives/button.js";
3
4
  import { text } from "./messages.js";
4
- import { keys } from "../data/query-keys.js";
5
5
  import { isApiError } from "@protobase/client";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { useQueryClient } from "@tanstack/react-query";
@@ -1,8 +1,8 @@
1
- import { authMessage } from "../auth/auth-messages.js";
2
- import { formatDateTime } from "../format/date.js";
3
1
  import { Button } from "../primitives/button.js";
2
+ import { formatDateTime } from "../format/date.js";
4
3
  import { text } from "./messages.js";
5
4
  import { slotted } from "../locale/slotted.js";
5
+ import { authMessage } from "../auth/auth-messages.js";
6
6
  import { useState } from "react";
7
7
  import { UserRoundCog } from "lucide-react";
8
8
  import { AuthError } from "@protobase/client";
@@ -1,7 +1,7 @@
1
- import { useIsXs } from "../lib/use-media-query.js";
2
- import { Link, useRouter } from "./router.js";
3
1
  import { useAdminMeta } from "./meta-gate.js";
2
+ import { useIsXs } from "../lib/use-media-query.js";
4
3
  import { changedList, currentAddress, listDefaults, listedResource } from "./current-address.js";
4
+ import { Link, useRouter } from "./router.js";
5
5
  import { useCallback, useMemo } from "react";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import { appPath, readAppPath } from "@protobase/schema";
@@ -1,7 +1,7 @@
1
1
  import { keys } from "../data/query-keys.js";
2
2
  import { useClient } from "../data/api-provider.js";
3
- import { createWhere, printFilter } from "@protobase/schema";
4
3
  import { useQueries } from "@tanstack/react-query";
4
+ import { createWhere, printFilter } from "@protobase/schema";
5
5
  //#region src/app/use-incoming-counts.ts
6
6
  const where$1 = createWhere();
7
7
  /** How many records point at `key` through each relation: `undefined` while loading, left out when the list is refused. */
@@ -11,7 +11,7 @@ import { useEffect, useRef, useState } from "react";
11
11
  import { jsx, jsxs } from "react/jsx-runtime";
12
12
  //#region src/app-shell/app-shell.tsx
13
13
  const drawerId = "app-drawer";
14
- const AppShell = ({ sidebarMode, activeItem, breadcrumb, user, workspace, appName, appIcon, logo, actions, rightPanel, sidebarNotice, banner, forceExpanded, profileMenuOpen, navGroups, userMenu, bottomBar, onNavigate, onBack, onSignOut, signIn, organizations, roles, theme, search, pageScroll: scrollsByDefault = false, className, children }) => {
14
+ const AppShell = ({ sidebarMode, activeItem, breadcrumb, user, workspace, appName, appIcon, logo, actions, rightPanel, sidebarNotice, banner, forceExpanded, profileMenuOpen, navGroups, userMenu, account, bottomBar, onNavigate, onBack, onSignOut, signIn, organizations, roles, theme, search, pageScroll: scrollsByDefault = false, className, children }) => {
15
15
  const desktop = useIsDesktop();
16
16
  const noticeShown = useSidebarNoticeShown(sidebarMode);
17
17
  const [drawerOpen, setDrawerOpen] = useState(false);
@@ -39,6 +39,7 @@ const AppShell = ({ sidebarMode, activeItem, breadcrumb, user, workspace, appNam
39
39
  profileMenuOpen,
40
40
  groups: navGroups,
41
41
  userMenu,
42
+ account,
42
43
  onNavigate,
43
44
  onSignOut,
44
45
  signIn,
@@ -1,6 +1,6 @@
1
1
  import { cn } from "../lib/cn.js";
2
- import { text } from "./messages.js";
3
2
  import { Skeleton } from "../primitives/skeleton.js";
3
+ import { text } from "./messages.js";
4
4
  import { ChevronRight } from "lucide-react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/app-shell/breadcrumb.tsx
@@ -1,5 +1,5 @@
1
- import { text } from "./messages.js";
2
1
  import { useFocusTrap } from "../lib/use-focus-trap.js";
2
+ import { text } from "./messages.js";
3
3
  import { useRef } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/app-shell/drawer.tsx
@@ -1,8 +1,8 @@
1
1
  import { cn } from "../lib/cn.js";
2
+ import { Spinner } from "../primitives/spinner.js";
2
3
  import { text } from "./messages.js";
3
4
  import { Input } from "../primitives/input.js";
4
5
  import { Kbd } from "../primitives/kbd.js";
5
- import { Spinner } from "../primitives/spinner.js";
6
6
  import { useId, useRef, useState } from "react";
7
7
  import { Search, X } from "lucide-react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -10,7 +10,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
10
  //#region src/app-shell/profile-menu.tsx
11
11
  const menuRow = "flex min-h-11 w-full items-center gap-2.5 px-3 py-1.5 text-left text-muted-foreground hover:bg-muted md:min-h-0";
12
12
  /** The person at the bottom of the sidebar; the menu is fixed to the viewport so a narrow sidebar cannot clip it. */
13
- const ProfileMenu = ({ user, compact, open: controlled, items = [], onNavigate, onSignOut, organizations, roles, theme }) => {
13
+ const ProfileMenu = ({ user, compact, open: controlled, items = [], account, onNavigate, onSignOut, organizations, roles, theme }) => {
14
14
  const activeRole = roles?.roles.find((role) => role.name === roles.active);
15
15
  const [local, setLocal] = useState(false);
16
16
  const open = controlled ?? local;
@@ -28,6 +28,13 @@ const ProfileMenu = ({ user, compact, open: controlled, items = [], onNavigate,
28
28
  document.removeEventListener("keydown", close);
29
29
  };
30
30
  }, [open, controlled]);
31
+ const groups = items.filter((group) => group.length > 0);
32
+ const follow = (event, href, external) => {
33
+ setLocal(false);
34
+ if (external || !onNavigate) return;
35
+ event.preventDefault();
36
+ onNavigate(href);
37
+ };
31
38
  const toggle = () => {
32
39
  const rect = root.current?.getBoundingClientRect();
33
40
  if (rect) setAnchor({
@@ -71,7 +78,19 @@ const ProfileMenu = ({ user, compact, open: controlled, items = [], onNavigate,
71
78
  bottom: anchor.bottom
72
79
  } : void 0,
73
80
  children: [
74
- /* @__PURE__ */ jsxs("div", {
81
+ account ? /* @__PURE__ */ jsxs("a", {
82
+ role: "menuitem",
83
+ href: account,
84
+ onClick: (event) => follow(event, account),
85
+ className: "block border-b px-3 pb-2 pt-1.5 hover:bg-muted",
86
+ children: [/* @__PURE__ */ jsx("div", {
87
+ className: "font-medium",
88
+ children: user.name
89
+ }), /* @__PURE__ */ jsx("div", {
90
+ className: "truncate text-xs text-muted-foreground",
91
+ children: user.email
92
+ })]
93
+ }) : /* @__PURE__ */ jsxs("div", {
75
94
  className: "border-b px-3 pb-2 pt-1.5",
76
95
  children: [/* @__PURE__ */ jsx("div", {
77
96
  className: "font-medium",
@@ -113,9 +132,10 @@ const ProfileMenu = ({ user, compact, open: controlled, items = [], onNavigate,
113
132
  roles.onSwitch(name);
114
133
  }
115
134
  }),
116
- items.length > 0 && /* @__PURE__ */ jsx("div", {
117
- className: cn((theme || onSignOut) && "border-b"),
118
- children: items.map((item) => {
135
+ groups.map((group, index) => /* @__PURE__ */ jsx("div", {
136
+ role: "group",
137
+ className: cn("py-1", (index < groups.length - 1 || theme || onSignOut) && "border-b"),
138
+ children: group.map((item) => {
119
139
  const Icon = item.icon;
120
140
  return /* @__PURE__ */ jsxs("a", {
121
141
  role: "menuitem",
@@ -125,17 +145,12 @@ const ProfileMenu = ({ user, compact, open: controlled, items = [], onNavigate,
125
145
  target: "_blank",
126
146
  rel: "noreferrer"
127
147
  } : {},
128
- onClick: (event) => {
129
- setLocal(false);
130
- if (item.external || !onNavigate) return;
131
- event.preventDefault();
132
- onNavigate(item.href);
133
- },
148
+ onClick: (event) => follow(event, item.href, item.external),
134
149
  className: cn(menuRow, item.active && "bg-muted text-foreground"),
135
150
  children: [/* @__PURE__ */ jsx(Icon, { className: "size-4" }), item.label]
136
151
  }, item.id);
137
152
  })
138
- }),
153
+ }, group[0]?.id)),
139
154
  theme && /* @__PURE__ */ jsx("div", {
140
155
  className: cn(onSignOut && "border-b"),
141
156
  children: /* @__PURE__ */ jsx(ThemeSwitch, {
@@ -11,7 +11,7 @@ import { SidebarGroup } from "./sidebar-group.js";
11
11
  import { LogIn } from "lucide-react";
12
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
13
  //#region src/app-shell/sidebar.tsx
14
- const Sidebar = ({ mode, activeItem, user, workspace, appName, appIcon, forceExpanded, profileMenuOpen, groups = navGroups, userMenu, onNavigate, onSignOut, signIn, organizations, roles, theme, sticky, logo: SidebarLogo = Logo, notice }) => {
14
+ const Sidebar = ({ mode, activeItem, user, workspace, appName, appIcon, forceExpanded, profileMenuOpen, groups = navGroups, userMenu, account, onNavigate, onSignOut, signIn, organizations, roles, theme, sticky, logo: SidebarLogo = Logo, notice }) => {
15
15
  const expanding = mode === "icon-expand";
16
16
  const expanded = expanding && forceExpanded;
17
17
  const inline = isTextMode(mode) || expanding;
@@ -59,6 +59,7 @@ const Sidebar = ({ mode, activeItem, user, workspace, appName, appIcon, forceExp
59
59
  compact: !inline,
60
60
  open: profileMenuOpen,
61
61
  items: userMenu,
62
+ account,
62
63
  onNavigate,
63
64
  onSignOut,
64
65
  organizations,
@@ -1,5 +1,5 @@
1
- import { reportRenderError } from "../app/error-reporting.js";
2
1
  import { useProjectUi } from "../app/pages/project-ui.js";
2
+ import { reportRenderError } from "../app/error-reporting.js";
3
3
  import { ActionCard } from "../action-card/action-card.js";
4
4
  import { text } from "./messages.js";
5
5
  import { Component } from "react";
@@ -1,11 +1,11 @@
1
- import { Spinner } from "../primitives/spinner.js";
2
- import { providerMessage } from "./auth-messages.js";
3
1
  import { readProviderError, readSignInLink, withoutSignInLink } from "./provider-link.js";
4
2
  import { text } from "./messages.js";
5
3
  import { useAuth } from "./auth-provider.js";
4
+ import { Spinner } from "../primitives/spinner.js";
6
5
  import { Button } from "../primitives/button.js";
7
6
  import { useRouter } from "../app/router.js";
8
7
  import { useSignInAddress } from "./use-sign-in-address.js";
8
+ import { providerMessage } from "./auth-messages.js";
9
9
  import { EmailCodePage } from "./email-code-page.js";
10
10
  import { FirstRunPage } from "./first-run-page.js";
11
11
  import { readResetLink, withoutResetLink } from "./reset-link.js";
@@ -59,7 +59,7 @@ const text = defineMessages({
59
59
  const providerText = defineMessages({
60
60
  en: {
61
61
  signupDisabled: (name) => `No account here belongs to this ${name} account. Ask an admin to add you, or sign in another way.`,
62
- notLinked: (name) => `Your ${name} account is not linked to your account here. Sign in another way, then connect ${name} on the Sign-in & security page.`,
62
+ notLinked: (name) => `Your ${name} account is not linked to your account here. Sign in another way, then connect ${name} on your account page.`,
63
63
  linkedToOther: (name) => `This ${name} account is linked to someone else here already.`,
64
64
  couldNotLink: (name) => `Your ${name} account could not be linked. Try again.`,
65
65
  accessDenied: (name) => `${name} did not let you in, or you cancelled.`,
@@ -68,7 +68,7 @@ const providerText = defineMessages({
68
68
  },
69
69
  nl: {
70
70
  signupDisabled: (name) => `Geen account hier hoort bij dit ${name}-account. Vraag een beheerder om je toe te voegen, of log op een andere manier in.`,
71
- notLinked: (name) => `Je ${name}-account is niet gekoppeld aan je account hier. Log op een andere manier in en koppel ${name} dan op de pagina Inloggen en beveiliging.`,
71
+ notLinked: (name) => `Je ${name}-account is niet gekoppeld aan je account hier. Log op een andere manier in en koppel ${name} dan op je accountpagina.`,
72
72
  linkedToOther: (name) => `Dit ${name}-account is hier al aan iemand anders gekoppeld.`,
73
73
  couldNotLink: (name) => `Je ${name}-account kon niet worden gekoppeld. Probeer het opnieuw.`,
74
74
  accessDenied: (name) => `${name} liet je niet binnen, of je hebt geannuleerd.`,
@@ -21,6 +21,7 @@ const AuthProvider = ({ session: given, origin, nativeBridge, children }) => {
21
21
  const [state, setState] = useState({ kind: "loading" });
22
22
  const [signInMethods, setSignInMethods] = useState(["password"]);
23
23
  const [passwordReset, setPasswordReset] = useState(false);
24
+ const [changeEmail, setChangeEmail] = useState(false);
24
25
  const [mcp, setMcp] = useState(false);
25
26
  const [canSignUp, setCanSignUp] = useState(false);
26
27
  const [passkeyDomains, setPasskeyDomains] = useState([]);
@@ -104,6 +105,7 @@ const AuthProvider = ({ session: given, origin, nativeBridge, children }) => {
104
105
  session.status().then(async (status) => {
105
106
  setSignInMethods(status.signInMethods);
106
107
  setPasswordReset(status.passwordReset && !nativeBridge);
108
+ setChangeEmail(Boolean(status.changeEmail));
107
109
  setMcp(Boolean(status.mcp));
108
110
  setCanSignUp(Boolean(status.signUp));
109
111
  setPasskeyDomains(status.passkeyDomains ?? []);
@@ -133,6 +135,7 @@ const AuthProvider = ({ session: given, origin, nativeBridge, children }) => {
133
135
  session,
134
136
  signInMethods,
135
137
  passwordReset,
138
+ changeEmail,
136
139
  mcp,
137
140
  canSignUp,
138
141
  passkeyDomains,
@@ -189,6 +192,7 @@ const AuthProvider = ({ session: given, origin, nativeBridge, children }) => {
189
192
  session,
190
193
  signInMethods,
191
194
  passwordReset,
195
+ changeEmail,
192
196
  mcp,
193
197
  canSignUp,
194
198
  passkeyDomains,
@@ -1,7 +1,7 @@
1
1
  import { text } from "./messages.js";
2
2
  import { Button } from "../primitives/button.js";
3
- import { OtpInput } from "../primitives/otp-input.js";
4
3
  import { AuthLayout } from "./auth-layout.js";
4
+ import { OtpInput } from "../primitives/otp-input.js";
5
5
  import { ResendCodeButton } from "./resend-code-button.js";
6
6
  import { useEffect, useRef, useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { text } from "./messages.js";
2
- import { CodeForm } from "./code-form.js";
3
2
  import { slotted } from "../locale/slotted.js";
3
+ import { CodeForm } from "./code-form.js";
4
4
  import { Fragment, jsx } from "react/jsx-runtime";
5
5
  //#region src/auth/email-code-form.tsx
6
6
  /** The second half of signing in with an emailed code: the code from the email. */
@@ -1,6 +1,6 @@
1
- import { authMessage } from "./auth-messages.js";
2
1
  import { text } from "./messages.js";
3
2
  import { useAuth } from "./auth-provider.js";
3
+ import { authMessage } from "./auth-messages.js";
4
4
  import { EmailCodeForm } from "./email-code-form.js";
5
5
  import { useState } from "react";
6
6
  import { AuthError } from "@protobase/client";
@@ -1,10 +1,10 @@
1
- import { cn } from "../lib/cn.js";
2
- import { RouteLink } from "../primitives/route-link.js";
3
- import { Input } from "../primitives/input.js";
4
1
  import { text } from "./messages.js";
2
+ import { cn } from "../lib/cn.js";
5
3
  import { Button, buttonClass } from "../primitives/button.js";
6
- import { AuthLayout } from "./auth-layout.js";
4
+ import { Input } from "../primitives/input.js";
5
+ import { RouteLink } from "../primitives/route-link.js";
7
6
  import { slotted } from "../locale/slotted.js";
7
+ import { AuthLayout } from "./auth-layout.js";
8
8
  import { useState } from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  //#region src/auth/forgot-password-form.tsx
@@ -1,8 +1,8 @@
1
- import { Spinner } from "../primitives/spinner.js";
2
- import { signInMessage } from "./auth-messages.js";
3
1
  import { providerName } from "./provider-link.js";
4
2
  import { text } from "./messages.js";
5
3
  import { useAuth } from "./auth-provider.js";
4
+ import { Spinner } from "../primitives/spinner.js";
5
+ import { signInMessage } from "./auth-messages.js";
6
6
  import { AuthLayout } from "./auth-layout.js";
7
7
  import { useEffect, useRef } from "react";
8
8
  import { AuthError } from "@protobase/client";
@@ -1,6 +1,6 @@
1
- import { Input } from "../primitives/input.js";
2
1
  import { text } from "./messages.js";
3
2
  import { Button } from "../primitives/button.js";
3
+ import { Input } from "../primitives/input.js";
4
4
  import { AuthLayout } from "./auth-layout.js";
5
5
  import { useState } from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  import { text } from "./messages.js";
2
2
  import { Button } from "../primitives/button.js";
3
- import { TwoFactorSetup } from "../account/two-factor-setup.js";
4
3
  import { AuthLayout } from "./auth-layout.js";
4
+ import { TwoFactorSetup } from "../account/two-factor-setup.js";
5
5
  import { KeyRound } from "lucide-react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/auth/setup-required-form.tsx
@@ -1,7 +1,7 @@
1
- import { Spinner } from "../primitives/spinner.js";
2
- import { authMessage } from "./auth-messages.js";
3
1
  import { text } from "./messages.js";
4
2
  import { useAuth } from "./auth-provider.js";
3
+ import { Spinner } from "../primitives/spinner.js";
4
+ import { authMessage } from "./auth-messages.js";
5
5
  import { SetupRequiredForm } from "./setup-required-form.js";
6
6
  import { useEffect, useState } from "react";
7
7
  import { AuthError } from "@protobase/client";
@@ -1,7 +1,7 @@
1
- import { RouteLink } from "../primitives/route-link.js";
2
- import { Input } from "../primitives/input.js";
3
1
  import { text } from "./messages.js";
4
2
  import { Button } from "../primitives/button.js";
3
+ import { Input } from "../primitives/input.js";
4
+ import { RouteLink } from "../primitives/route-link.js";
5
5
  import { AuthLayout } from "./auth-layout.js";
6
6
  import { ProviderIcon } from "./provider-icon.js";
7
7
  import { useRef, useState } from "react";
@@ -1,5 +1,5 @@
1
- import { authMessage, signInMessage } from "./auth-messages.js";
2
1
  import { useAuth } from "./auth-provider.js";
2
+ import { authMessage, signInMessage } from "./auth-messages.js";
3
3
  import { SignInForm } from "./sign-in-form.js";
4
4
  import { useState } from "react";
5
5
  import { AuthError } from "@protobase/client";
@@ -1,9 +1,9 @@
1
- import { RouteLink } from "../primitives/route-link.js";
2
1
  import { text } from "./messages.js";
3
2
  import { useAuth } from "./auth-provider.js";
4
3
  import { Button, buttonClass } from "../primitives/button.js";
5
- import { namedIcon } from "../app/named-icon.js";
6
4
  import { ResponsiveDialog } from "../primitives/responsive-dialog.js";
5
+ import { RouteLink } from "../primitives/route-link.js";
6
+ import { namedIcon } from "../app/named-icon.js";
7
7
  import { useSignInAddress } from "./use-sign-in-address.js";
8
8
  import { useId } from "react";
9
9
  import { Check, LogIn } from "lucide-react";
@@ -1,6 +1,6 @@
1
1
  import { text } from "./messages.js";
2
- import { CodeForm } from "./code-form.js";
3
2
  import { slotted } from "../locale/slotted.js";
3
+ import { CodeForm } from "./code-form.js";
4
4
  import { Fragment, jsx } from "react/jsx-runtime";
5
5
  //#region src/auth/sign-up-code-form.tsx
6
6
  /** The second step of making an account: the emailed code on its own, before the name and password. */
@@ -1,8 +1,8 @@
1
- import { Input } from "../primitives/input.js";
2
1
  import { text } from "./messages.js";
3
2
  import { Button } from "../primitives/button.js";
4
- import { AuthLayout } from "./auth-layout.js";
3
+ import { Input } from "../primitives/input.js";
5
4
  import { slotted } from "../locale/slotted.js";
5
+ import { AuthLayout } from "./auth-layout.js";
6
6
  import { useId, useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/auth/sign-up-details-form.tsx
@@ -1,6 +1,6 @@
1
- import { Input } from "../primitives/input.js";
2
1
  import { text } from "./messages.js";
3
2
  import { Button } from "../primitives/button.js";
3
+ import { Input } from "../primitives/input.js";
4
4
  import { AuthLayout } from "./auth-layout.js";
5
5
  import { useState } from "react";
6
6
  import { Mail } from "lucide-react";
@@ -1,6 +1,6 @@
1
- import { authMessage } from "./auth-messages.js";
2
1
  import { text } from "./messages.js";
3
2
  import { useAuth } from "./auth-provider.js";
3
+ import { authMessage } from "./auth-messages.js";
4
4
  import { SignUpCodeForm } from "./sign-up-code-form.js";
5
5
  import { SignUpDetailsForm } from "./sign-up-details-form.js";
6
6
  import { SignUpEmailForm } from "./sign-up-email-form.js";
@@ -1,7 +1,7 @@
1
- import { cn } from "../lib/cn.js";
2
- import { Input } from "../primitives/input.js";
3
1
  import { text } from "./messages.js";
2
+ import { cn } from "../lib/cn.js";
4
3
  import { Button } from "../primitives/button.js";
4
+ import { Input } from "../primitives/input.js";
5
5
  import { AuthLayout } from "./auth-layout.js";
6
6
  import { useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { staffSignInMessage } from "./auth-messages.js";
2
1
  import { useAuth } from "./auth-provider.js";
2
+ import { staffSignInMessage } from "./auth-messages.js";
3
3
  import { withoutStaffLink } from "./staff-link.js";
4
4
  import { StaffSignInForm } from "./staff-sign-in-form.js";
5
5
  import { useState } from "react";
@@ -1,9 +1,9 @@
1
- import { Input } from "../primitives/input.js";
2
1
  import { text } from "./messages.js";
3
2
  import { Button } from "../primitives/button.js";
4
- import { OtpInput } from "../primitives/otp-input.js";
5
- import { AuthLayout } from "./auth-layout.js";
3
+ import { Input } from "../primitives/input.js";
6
4
  import { Checkbox } from "../primitives/checkbox.js";
5
+ import { AuthLayout } from "./auth-layout.js";
6
+ import { OtpInput } from "../primitives/otp-input.js";
7
7
  import { useState } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/auth/two-factor-form.tsx