@questpie/admin 3.0.3 → 3.0.4

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 (249) hide show
  1. package/README.md +34 -5
  2. package/dist/client/blocks/block-renderer.d.mts +2 -2
  3. package/dist/client/blocks/block-renderer.mjs +4 -1
  4. package/dist/client/builder/types/action-types.d.mts +31 -3
  5. package/dist/client/builder/types/collection-types.d.mts +140 -0
  6. package/dist/client/builder/types/ui-config.d.mts +16 -2
  7. package/dist/client/builder/types/views.d.mts +57 -0
  8. package/dist/client/builder/types/widget-types.d.mts +5 -0
  9. package/dist/client/components/actions/action-button.mjs +137 -199
  10. package/dist/client/components/actions/action-dialog.mjs +198 -156
  11. package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
  12. package/dist/client/components/actions/header-actions.mjs +52 -53
  13. package/dist/client/components/admin-link.d.mts +2 -2
  14. package/dist/client/components/auth/auth-loading.mjs +41 -18
  15. package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
  16. package/dist/client/components/blocks/block-insert-button.mjs +4 -4
  17. package/dist/client/components/blocks/block-item.mjs +2 -2
  18. package/dist/client/components/blocks/block-library-sidebar.mjs +2 -2
  19. package/dist/client/components/component-renderer.mjs +1 -1
  20. package/dist/client/components/fields/array-field.mjs +14 -14
  21. package/dist/client/components/fields/asset-preview-field.mjs +1 -1
  22. package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
  23. package/dist/client/components/fields/json-field.mjs +2 -2
  24. package/dist/client/components/fields/object-array-field.mjs +22 -22
  25. package/dist/client/components/fields/object-field.mjs +5 -5
  26. package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
  27. package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
  28. package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
  29. package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
  30. package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
  31. package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
  32. package/dist/client/components/fields/relation-picker.mjs +7 -6
  33. package/dist/client/components/fields/relation-select.mjs +71 -47
  34. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
  35. package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
  36. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
  37. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
  38. package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
  39. package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
  40. package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
  41. package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
  42. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
  43. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
  44. package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
  45. package/dist/client/components/fields/upload-field.mjs +45 -49
  46. package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
  47. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
  48. package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
  49. package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
  50. package/dist/client/components/history-sidebar.mjs +850 -340
  51. package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
  52. package/dist/client/components/locale-switcher.mjs +8 -8
  53. package/dist/client/components/media/media-grid.mjs +12 -9
  54. package/dist/client/components/media/media-picker-dialog.mjs +242 -230
  55. package/dist/client/components/preview/live-preview-mode.mjs +1 -1
  56. package/dist/client/components/primitives/asset-preview.mjs +37 -22
  57. package/dist/client/components/primitives/date-input.mjs +212 -249
  58. package/dist/client/components/primitives/dropzone.mjs +192 -159
  59. package/dist/client/components/primitives/field-select-control.mjs +93 -0
  60. package/dist/client/components/primitives/select-multi.mjs +251 -230
  61. package/dist/client/components/primitives/select-single.mjs +345 -290
  62. package/dist/client/components/primitives/time-input.mjs +2 -2
  63. package/dist/client/components/sheets/resource-sheet.mjs +2 -0
  64. package/dist/client/components/ui/accordion.mjs +4 -4
  65. package/dist/client/components/ui/alert.mjs +3 -3
  66. package/dist/client/components/ui/badge.mjs +4 -4
  67. package/dist/client/components/ui/button.mjs +47 -37
  68. package/dist/client/components/ui/card.mjs +2 -2
  69. package/dist/client/components/ui/checkbox.mjs +1 -1
  70. package/dist/client/components/ui/command.mjs +5 -5
  71. package/dist/client/components/ui/dialog.mjs +3 -3
  72. package/dist/client/components/ui/drawer.mjs +1 -1
  73. package/dist/client/components/ui/dropdown-menu.mjs +157 -15
  74. package/dist/client/components/ui/empty-state.mjs +88 -59
  75. package/dist/client/components/ui/field.mjs +2 -2
  76. package/dist/client/components/ui/input-group.mjs +3 -3
  77. package/dist/client/components/ui/input.mjs +1 -1
  78. package/dist/client/components/ui/kbd.mjs +1 -1
  79. package/dist/client/components/ui/label.mjs +1 -1
  80. package/dist/client/components/ui/popover.mjs +19 -11
  81. package/dist/client/components/ui/scroll-fade.mjs +170 -0
  82. package/dist/client/components/ui/search-input.mjs +1 -1
  83. package/dist/client/components/ui/select.mjs +129 -27
  84. package/dist/client/components/ui/sheet.mjs +54 -34
  85. package/dist/client/components/ui/sidebar.mjs +15 -14
  86. package/dist/client/components/ui/skeleton.mjs +28 -12
  87. package/dist/client/components/ui/switch.mjs +2 -2
  88. package/dist/client/components/ui/table.mjs +82 -74
  89. package/dist/client/components/ui/tabs.mjs +26 -31
  90. package/dist/client/components/ui/textarea.mjs +1 -1
  91. package/dist/client/components/ui/tooltip.mjs +1 -1
  92. package/dist/client/components/widgets/chart-widget.mjs +134 -96
  93. package/dist/client/components/widgets/progress-widget.mjs +59 -34
  94. package/dist/client/components/widgets/quick-actions-widget.mjs +184 -113
  95. package/dist/client/components/widgets/recent-items-widget.mjs +144 -102
  96. package/dist/client/components/widgets/stats-widget.mjs +91 -72
  97. package/dist/client/components/widgets/table-widget.mjs +159 -246
  98. package/dist/client/components/widgets/timeline-widget.mjs +66 -43
  99. package/dist/client/components/widgets/value-widget.mjs +261 -152
  100. package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
  101. package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
  102. package/dist/client/contexts/focus-context.d.mts +2 -2
  103. package/dist/client/hooks/use-action.mjs +63 -55
  104. package/dist/client/hooks/use-audit-history.mjs +1 -65
  105. package/dist/client/hooks/use-collection-validation.mjs +36 -23
  106. package/dist/client/hooks/use-collection.mjs +96 -1
  107. package/dist/client/hooks/use-saved-views.mjs +70 -49
  108. package/dist/client/hooks/use-server-actions.mjs +59 -40
  109. package/dist/client/hooks/use-server-validation.mjs +156 -41
  110. package/dist/client/hooks/use-server-widget-data.mjs +1 -1
  111. package/dist/client/hooks/use-setup-status.d.mts +3 -3
  112. package/dist/client/hooks/use-setup-status.mjs +2 -2
  113. package/dist/client/hooks/use-transition-stage.mjs +2 -10
  114. package/dist/client/hooks/use-validation-error-map.mjs +31 -13
  115. package/dist/client/hooks/use-view-state.mjs +238 -174
  116. package/dist/client/i18n/date-locale.mjs +33 -0
  117. package/dist/client/i18n/hooks.mjs +17 -1
  118. package/dist/client/lib/utils.mjs +3 -2
  119. package/dist/client/preview/block-scope-context.d.mts +2 -2
  120. package/dist/client/preview/preview-banner.d.mts +2 -2
  121. package/dist/client/preview/preview-field.d.mts +4 -4
  122. package/dist/client/preview/preview-field.mjs +2 -2
  123. package/dist/client/runtime/provider.mjs +8 -1
  124. package/dist/client/runtime/translations-provider.mjs +1 -1
  125. package/dist/client/scope/picker.d.mts +2 -2
  126. package/dist/client/scope/provider.d.mts +2 -2
  127. package/dist/client/styles/base.css +1022 -0
  128. package/dist/client/styles/index.css +3 -589
  129. package/dist/client/utils/auto-expand-fields.mjs +4 -2
  130. package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
  131. package/dist/client/utils/use-lazy-component.mjs +80 -0
  132. package/dist/client/views/auth/auth-layout.d.mts +18 -11
  133. package/dist/client/views/auth/auth-layout.mjs +291 -80
  134. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  135. package/dist/client/views/auth/forgot-password-form.mjs +2 -2
  136. package/dist/client/views/auth/login-form.d.mts +2 -2
  137. package/dist/client/views/auth/login-form.mjs +1 -1
  138. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  139. package/dist/client/views/auth/reset-password-form.mjs +2 -2
  140. package/dist/client/views/auth/setup-form.d.mts +2 -2
  141. package/dist/client/views/collection/auto-form-fields.mjs +11 -9
  142. package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
  143. package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
  144. package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
  145. package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
  146. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
  147. package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
  148. package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
  149. package/dist/client/views/collection/columns/build-columns.mjs +29 -9
  150. package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
  151. package/dist/client/views/collection/field-renderer.mjs +50 -89
  152. package/dist/client/views/collection/form-view.mjs +237 -227
  153. package/dist/client/views/collection/table-view.mjs +1162 -229
  154. package/dist/client/views/collection/view-skeletons.mjs +222 -79
  155. package/dist/client/views/common/global-search.mjs +29 -18
  156. package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
  157. package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
  158. package/dist/client/views/dashboard/widget-card.mjs +23 -14
  159. package/dist/client/views/globals/global-form-view.mjs +634 -589
  160. package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
  161. package/dist/client/views/layout/admin-layout.d.mts +3 -6
  162. package/dist/client/views/layout/admin-layout.mjs +149 -172
  163. package/dist/client/views/layout/admin-router.mjs +747 -544
  164. package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
  165. package/dist/client/views/layout/admin-sidebar.mjs +751 -591
  166. package/dist/client/views/layout/admin-theme.d.mts +10 -0
  167. package/dist/client/views/layout/admin-theme.mjs +84 -0
  168. package/dist/client/views/layout/admin-view-layout.mjs +161 -0
  169. package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
  170. package/dist/client/views/pages/accept-invite-page.mjs +49 -26
  171. package/dist/client/views/pages/dashboard-page.d.mts +2 -2
  172. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  173. package/dist/client/views/pages/forgot-password-page.mjs +2 -19
  174. package/dist/client/views/pages/invite-page.d.mts +2 -2
  175. package/dist/client/views/pages/invite-page.mjs +2 -19
  176. package/dist/client/views/pages/login-page.d.mts +1 -1
  177. package/dist/client/views/pages/login-page.mjs +4 -21
  178. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  179. package/dist/client/views/pages/reset-password-page.mjs +3 -20
  180. package/dist/client/views/pages/setup-page.d.mts +2 -2
  181. package/dist/client/views/pages/setup-page.mjs +3 -20
  182. package/dist/client.d.mts +6 -2
  183. package/dist/client.mjs +2 -1
  184. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  185. package/dist/index.d.mts +6 -2
  186. package/dist/index.mjs +2 -1
  187. package/dist/server/augmentation/dashboard.d.mts +67 -3
  188. package/dist/server/augmentation/form-layout.d.mts +21 -0
  189. package/dist/server/augmentation/index.d.mts +1 -1
  190. package/dist/server/codegen/admin-client-template.mjs +4 -0
  191. package/dist/server/fields/blocks.d.mts +1 -1
  192. package/dist/server/fields/blocks.mjs +12 -0
  193. package/dist/server/fields/rich-text.d.mts +1 -1
  194. package/dist/server/fields/rich-text.mjs +8 -0
  195. package/dist/server/i18n/index.mjs +17 -1
  196. package/dist/server/i18n/messages/cs.mjs +23 -0
  197. package/dist/server/i18n/messages/de.mjs +23 -0
  198. package/dist/server/i18n/messages/en.mjs +64 -1
  199. package/dist/server/i18n/messages/es.mjs +23 -0
  200. package/dist/server/i18n/messages/fr.mjs +23 -0
  201. package/dist/server/i18n/messages/pl.mjs +23 -0
  202. package/dist/server/i18n/messages/pt.mjs +23 -0
  203. package/dist/server/i18n/messages/sk.mjs +83 -1
  204. package/dist/server/modules/admin/block/introspection.mjs +4 -1
  205. package/dist/server/modules/admin/block/prefetch.mjs +12 -2
  206. package/dist/server/modules/admin/collections/account.d.mts +50 -50
  207. package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
  208. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  209. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  210. package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
  211. package/dist/server/modules/admin/collections/assets.d.mts +20 -20
  212. package/dist/server/modules/admin/collections/assets.mjs +0 -1
  213. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  214. package/dist/server/modules/admin/collections/user.d.mts +12 -0
  215. package/dist/server/modules/admin/collections/user.mjs +40 -9
  216. package/dist/server/modules/admin/collections/verification.d.mts +2 -2
  217. package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
  218. package/dist/server/modules/admin/factories.mjs +7 -18
  219. package/dist/server/modules/admin/index.d.mts +1 -1
  220. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  221. package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
  222. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  223. package/dist/server/modules/admin/routes/execute-action.mjs +33 -0
  224. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  225. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  226. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  227. package/dist/server/modules/admin/routes/setup.d.mts +10 -10
  228. package/dist/server/modules/admin/routes/setup.mjs +7 -7
  229. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  230. package/dist/server/modules/admin/routes/translations.mjs +5 -1
  231. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  232. package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
  233. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
  234. package/dist/server/modules/audit/.generated/module.d.mts +1 -1
  235. package/dist/server/modules/audit/.generated/module.mjs +1 -1
  236. package/dist/server/modules/audit/collections/audit-log.d.mts +2 -2
  237. package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
  238. package/dist/server/modules/audit/config/app.mjs +99 -42
  239. package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
  240. package/dist/server/plugin.mjs +4 -2
  241. package/dist/server/proxy-factories.d.mts +4 -3
  242. package/dist/server/proxy-factories.mjs +34 -8
  243. package/dist/shared/types/saved-views.types.d.mts +2 -0
  244. package/package.json +6 -4
  245. package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
  246. package/dist/client/components/ui/spinner.mjs +0 -52
  247. package/dist/client/components/ui/toolbar.mjs +0 -136
  248. package/dist/client/contexts/breadcrumb-context.mjs +0 -60
  249. package/dist/client/views/layout/admin-topbar.mjs +0 -236
@@ -0,0 +1,10 @@
1
+ import "react";
2
+
3
+ //#region src/client/views/layout/admin-theme.d.ts
4
+
5
+ /**
6
+ * Theme mode for the admin interface.
7
+ */
8
+ type AdminTheme = "light" | "dark" | "system";
9
+ //#endregion
10
+ export { AdminTheme };
@@ -0,0 +1,84 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import * as React from "react";
3
+
4
+ //#region src/client/views/layout/admin-theme.ts
5
+ const ADMIN_THEME_STORAGE_KEY = "questpie:admin-theme";
6
+ const AdminThemeAppliedContext = React.createContext(false);
7
+ function getStoredAdminTheme() {
8
+ if (typeof window === "undefined") return "system";
9
+ const stored = window.localStorage.getItem(ADMIN_THEME_STORAGE_KEY);
10
+ return stored === "light" || stored === "dark" || stored === "system" ? stored : "system";
11
+ }
12
+ function useManagedAdminTheme(controlledTheme, controlledSetTheme, t0) {
13
+ const $ = c(11);
14
+ let t1;
15
+ if ($[0] !== t0) {
16
+ t1 = t0 === void 0 ? {} : t0;
17
+ $[0] = t0;
18
+ $[1] = t1;
19
+ } else t1 = $[1];
20
+ const enabled = t1.enabled ?? true;
21
+ const [uncontrolledTheme, setUncontrolledTheme] = React.useState(getStoredAdminTheme);
22
+ const theme = controlledTheme ?? uncontrolledTheme;
23
+ let t2;
24
+ if ($[2] !== controlledSetTheme) {
25
+ t2 = (next) => {
26
+ if (controlledSetTheme) {
27
+ controlledSetTheme(next);
28
+ return;
29
+ }
30
+ setUncontrolledTheme(next);
31
+ try {
32
+ window.localStorage.setItem(ADMIN_THEME_STORAGE_KEY, next);
33
+ } catch {}
34
+ };
35
+ $[2] = controlledSetTheme;
36
+ $[3] = t2;
37
+ } else t2 = $[3];
38
+ const setTheme = t2;
39
+ let t3;
40
+ let t4;
41
+ if ($[4] !== enabled || $[5] !== theme) {
42
+ t3 = () => {
43
+ if (!enabled) return;
44
+ const root = document.documentElement;
45
+ const media = window.matchMedia("(prefers-color-scheme: dark)");
46
+ const applyTheme = () => {
47
+ const resolved = theme === "system" ? media.matches ? "dark" : "light" : theme;
48
+ root.classList.toggle("dark", resolved === "dark");
49
+ root.classList.toggle("light", resolved === "light");
50
+ root.style.colorScheme = resolved;
51
+ };
52
+ applyTheme();
53
+ if (theme !== "system") return;
54
+ media.addEventListener("change", applyTheme);
55
+ return () => media.removeEventListener("change", applyTheme);
56
+ };
57
+ t4 = [enabled, theme];
58
+ $[4] = enabled;
59
+ $[5] = theme;
60
+ $[6] = t3;
61
+ $[7] = t4;
62
+ } else {
63
+ t3 = $[6];
64
+ t4 = $[7];
65
+ }
66
+ React.useEffect(t3, t4);
67
+ let t5;
68
+ if ($[8] !== setTheme || $[9] !== theme) {
69
+ t5 = {
70
+ theme,
71
+ setTheme
72
+ };
73
+ $[8] = setTheme;
74
+ $[9] = theme;
75
+ $[10] = t5;
76
+ } else t5 = $[10];
77
+ return t5;
78
+ }
79
+ function useHasManagedAdminTheme() {
80
+ return React.useContext(AdminThemeAppliedContext);
81
+ }
82
+
83
+ //#endregion
84
+ export { AdminThemeAppliedContext, useHasManagedAdminTheme, useManagedAdminTheme };
@@ -0,0 +1,161 @@
1
+ import { cn } from "../../lib/utils.mjs";
2
+ import { c } from "react/compiler-runtime";
3
+ import "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/client/views/layout/admin-view-layout.tsx
7
+ const adminViewTitleClassName = "qa-admin-view-header__title text-foreground min-w-0 truncate text-lg font-semibold tracking-tight text-balance md:text-xl";
8
+ const adminViewDescriptionClassName = "text-muted-foreground mt-1 line-clamp-2 text-sm";
9
+ const adminViewMetaClassName = "text-muted-foreground mt-1 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 font-mono text-xs tabular-nums";
10
+ function AdminViewLayout(t0) {
11
+ const $ = c(13);
12
+ const { header, children, className, contentClassName } = t0;
13
+ let t1;
14
+ if ($[0] !== className) {
15
+ t1 = cn("qa-admin-view-layout flex h-full min-h-0 flex-col overflow-hidden", className);
16
+ $[0] = className;
17
+ $[1] = t1;
18
+ } else t1 = $[1];
19
+ let t2;
20
+ if ($[2] !== header) {
21
+ t2 = header && /* @__PURE__ */ jsx("div", {
22
+ className: "shrink-0",
23
+ children: header
24
+ });
25
+ $[2] = header;
26
+ $[3] = t2;
27
+ } else t2 = $[3];
28
+ let t3;
29
+ if ($[4] !== contentClassName) {
30
+ t3 = cn("qa-admin-view-layout__content min-h-0 min-w-0 flex-1 overflow-hidden", contentClassName);
31
+ $[4] = contentClassName;
32
+ $[5] = t3;
33
+ } else t3 = $[5];
34
+ let t4;
35
+ if ($[6] !== children || $[7] !== t3) {
36
+ t4 = /* @__PURE__ */ jsx("div", {
37
+ className: t3,
38
+ children
39
+ });
40
+ $[6] = children;
41
+ $[7] = t3;
42
+ $[8] = t4;
43
+ } else t4 = $[8];
44
+ let t5;
45
+ if ($[9] !== t1 || $[10] !== t2 || $[11] !== t4) {
46
+ t5 = /* @__PURE__ */ jsxs("div", {
47
+ className: t1,
48
+ children: [t2, t4]
49
+ });
50
+ $[9] = t1;
51
+ $[10] = t2;
52
+ $[11] = t4;
53
+ $[12] = t5;
54
+ } else t5 = $[12];
55
+ return t5;
56
+ }
57
+ function AdminViewHeader(t0) {
58
+ const $ = c(26);
59
+ const { title, titleAccessory, description, meta, actions, className, titleClassName } = t0;
60
+ let t1;
61
+ if ($[0] !== className) {
62
+ t1 = cn("qa-admin-view-header px-0 pt-0 pb-2", className);
63
+ $[0] = className;
64
+ $[1] = t1;
65
+ } else t1 = $[1];
66
+ let t2;
67
+ if ($[2] !== titleClassName) {
68
+ t2 = cn(adminViewTitleClassName, titleClassName);
69
+ $[2] = titleClassName;
70
+ $[3] = t2;
71
+ } else t2 = $[3];
72
+ let t3;
73
+ if ($[4] !== t2 || $[5] !== title) {
74
+ t3 = /* @__PURE__ */ jsx("h1", {
75
+ className: t2,
76
+ children: title
77
+ });
78
+ $[4] = t2;
79
+ $[5] = title;
80
+ $[6] = t3;
81
+ } else t3 = $[6];
82
+ let t4;
83
+ if ($[7] !== t3 || $[8] !== titleAccessory) {
84
+ t4 = /* @__PURE__ */ jsxs("div", {
85
+ className: "flex min-w-0 flex-wrap items-center gap-2.5",
86
+ children: [t3, titleAccessory]
87
+ });
88
+ $[7] = t3;
89
+ $[8] = titleAccessory;
90
+ $[9] = t4;
91
+ } else t4 = $[9];
92
+ let t5;
93
+ if ($[10] !== meta) {
94
+ t5 = meta && /* @__PURE__ */ jsx("div", {
95
+ className: cn("qa-admin-view-header__meta", adminViewMetaClassName),
96
+ children: meta
97
+ });
98
+ $[10] = meta;
99
+ $[11] = t5;
100
+ } else t5 = $[11];
101
+ let t6;
102
+ if ($[12] !== description) {
103
+ t6 = description && /* @__PURE__ */ jsx("div", {
104
+ className: cn("qa-admin-view-header__description", adminViewDescriptionClassName),
105
+ children: description
106
+ });
107
+ $[12] = description;
108
+ $[13] = t6;
109
+ } else t6 = $[13];
110
+ let t7;
111
+ if ($[14] !== t4 || $[15] !== t5 || $[16] !== t6) {
112
+ t7 = /* @__PURE__ */ jsx("div", {
113
+ className: "flex min-w-0 flex-1 items-start gap-3",
114
+ children: /* @__PURE__ */ jsxs("div", {
115
+ className: "min-w-0 flex-1",
116
+ children: [
117
+ t4,
118
+ t5,
119
+ t6
120
+ ]
121
+ })
122
+ });
123
+ $[14] = t4;
124
+ $[15] = t5;
125
+ $[16] = t6;
126
+ $[17] = t7;
127
+ } else t7 = $[17];
128
+ let t8;
129
+ if ($[18] !== actions) {
130
+ t8 = actions && /* @__PURE__ */ jsx("div", {
131
+ className: "qa-admin-view-header__actions flex shrink-0 flex-wrap items-center gap-1.5 sm:justify-end",
132
+ children: actions
133
+ });
134
+ $[18] = actions;
135
+ $[19] = t8;
136
+ } else t8 = $[19];
137
+ let t9;
138
+ if ($[20] !== t7 || $[21] !== t8) {
139
+ t9 = /* @__PURE__ */ jsxs("div", {
140
+ className: "flex min-w-0 flex-col gap-2.5 sm:flex-row sm:items-start sm:justify-between sm:gap-3",
141
+ children: [t7, t8]
142
+ });
143
+ $[20] = t7;
144
+ $[21] = t8;
145
+ $[22] = t9;
146
+ } else t9 = $[22];
147
+ let t10;
148
+ if ($[23] !== t1 || $[24] !== t9) {
149
+ t10 = /* @__PURE__ */ jsx("header", {
150
+ className: t1,
151
+ children: t9
152
+ });
153
+ $[23] = t1;
154
+ $[24] = t9;
155
+ $[25] = t10;
156
+ } else t10 = $[25];
157
+ return t10;
158
+ }
159
+
160
+ //#endregion
161
+ export { AdminViewHeader, AdminViewLayout };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime5 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/views/pages/accept-invite-page.d.ts
5
5
 
@@ -61,6 +61,6 @@ declare function AcceptInvitePage({
61
61
  redirectTo,
62
62
  loginPath,
63
63
  minPasswordLength
64
- }: AcceptInvitePageProps): react_jsx_runtime5.JSX.Element;
64
+ }: AcceptInvitePageProps): react_jsx_runtime7.JSX.Element;
65
65
  //#endregion
66
66
  export { AcceptInvitePage };
@@ -1,11 +1,11 @@
1
1
  import { useTranslation } from "../../i18n/hooks.mjs";
2
2
  import { selectBasePath, selectBrandName, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
3
3
  import { Button } from "../../components/ui/button.mjs";
4
- import { Spinner } from "../../components/ui/spinner.mjs";
4
+ import { Skeleton } from "../../components/ui/skeleton.mjs";
5
5
  import { useAuthClient } from "../../hooks/use-auth.mjs";
6
6
  import { Alert, AlertDescription } from "../../components/ui/alert.mjs";
7
7
  import { AcceptInviteForm } from "../auth/accept-invite-form.mjs";
8
- import { AuthLayout } from "../auth/auth-layout.mjs";
8
+ import { AuthDefaultLogo, AuthLayout } from "../auth/auth-layout.mjs";
9
9
  import { c } from "react/compiler-runtime";
10
10
  import { Icon } from "@iconify/react";
11
11
  import * as React from "react";
@@ -19,6 +19,49 @@ import { jsx, jsxs } from "react/jsx-runtime";
19
19
  * Page for new users to complete registration after receiving invitation.
20
20
  * Uses Better Auth's admin plugin for invitation acceptance.
21
21
  */
22
+ function AcceptInvitePageSkeleton() {
23
+ const $ = c(3);
24
+ let t0;
25
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
26
+ t0 = /* @__PURE__ */ jsx("span", {
27
+ className: "sr-only",
28
+ children: "Loading invitation"
29
+ });
30
+ $[0] = t0;
31
+ } else t0 = $[0];
32
+ let t1;
33
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
34
+ t1 = /* @__PURE__ */ jsxs("div", {
35
+ className: "space-y-2",
36
+ children: [/* @__PURE__ */ jsx(Skeleton, {
37
+ variant: "text",
38
+ className: "h-4 w-20"
39
+ }), /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" })]
40
+ });
41
+ $[1] = t1;
42
+ } else t1 = $[1];
43
+ let t2;
44
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
45
+ t2 = /* @__PURE__ */ jsxs("div", {
46
+ className: "space-y-4",
47
+ "aria-busy": "true",
48
+ children: [
49
+ t0,
50
+ t1,
51
+ /* @__PURE__ */ jsxs("div", {
52
+ className: "space-y-2",
53
+ children: [/* @__PURE__ */ jsx(Skeleton, {
54
+ variant: "text",
55
+ className: "h-4 w-24"
56
+ }), /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" })]
57
+ }),
58
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" })
59
+ ]
60
+ });
61
+ $[2] = t2;
62
+ } else t2 = $[2];
63
+ return t2;
64
+ }
22
65
  /**
23
66
  * Accept invite page component.
24
67
  *
@@ -141,17 +184,14 @@ function AcceptInvitePage(t0) {
141
184
  } else t8$1 = $[23];
142
185
  let t9$1;
143
186
  if ($[24] !== brandName || $[25] !== logo) {
144
- t9$1 = logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName });
187
+ t9$1 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
145
188
  $[24] = brandName;
146
189
  $[25] = logo;
147
190
  $[26] = t9$1;
148
191
  } else t9$1 = $[26];
149
192
  let t10$1;
150
193
  if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
151
- t10$1 = /* @__PURE__ */ jsx("div", {
152
- className: "flex justify-center py-8",
153
- children: /* @__PURE__ */ jsx(Spinner, { className: "size-8" })
154
- });
194
+ t10$1 = /* @__PURE__ */ jsx(AcceptInvitePageSkeleton, {});
155
195
  $[27] = t10$1;
156
196
  } else t10$1 = $[27];
157
197
  let t11$1;
@@ -184,7 +224,7 @@ function AcceptInvitePage(t0) {
184
224
  } else t8$1 = $[35];
185
225
  let t9$1;
186
226
  if ($[36] !== brandName || $[37] !== logo) {
187
- t9$1 = logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName });
227
+ t9$1 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
188
228
  $[36] = brandName;
189
229
  $[37] = logo;
190
230
  $[38] = t9$1;
@@ -290,7 +330,7 @@ function AcceptInvitePage(t0) {
290
330
  } else t8 = $[68];
291
331
  let t9;
292
332
  if ($[69] !== brandName || $[70] !== logo) {
293
- t9 = logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName });
333
+ t9 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
294
334
  $[69] = brandName;
295
335
  $[70] = logo;
296
336
  $[71] = t9;
@@ -327,23 +367,6 @@ function AcceptInvitePage(t0) {
327
367
  } else t12 = $[81];
328
368
  return t12;
329
369
  }
330
- function DefaultLogo(t0) {
331
- const $ = c(2);
332
- const { brandName } = t0;
333
- let t1;
334
- if ($[0] !== brandName) {
335
- t1 = /* @__PURE__ */ jsx("div", {
336
- className: "text-center",
337
- children: /* @__PURE__ */ jsx("h1", {
338
- className: "text-xl font-bold",
339
- children: brandName
340
- })
341
- });
342
- $[0] = brandName;
343
- $[1] = t1;
344
- } else t1 = $[1];
345
- return t1;
346
- }
347
370
 
348
371
  //#endregion
349
372
  export { AcceptInvitePage };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime7 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/pages/dashboard-page.d.ts
4
4
 
@@ -38,6 +38,6 @@ declare function DashboardPage({
38
38
  title,
39
39
  description,
40
40
  className
41
- }: DashboardPageProps): react_jsx_runtime7.JSX.Element;
41
+ }: DashboardPageProps): react_jsx_runtime8.JSX.Element;
42
42
  //#endregion
43
43
  export { DashboardPage };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime8 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/views/pages/forgot-password-page.d.ts
5
5
 
@@ -51,6 +51,6 @@ declare function ForgotPasswordPage({
51
51
  logo,
52
52
  loginPath,
53
53
  resetPasswordRedirectUrl
54
- }: ForgotPasswordPageProps): react_jsx_runtime8.JSX.Element;
54
+ }: ForgotPasswordPageProps): react_jsx_runtime9.JSX.Element;
55
55
  //#endregion
56
56
  export { ForgotPasswordPage };
@@ -1,7 +1,7 @@
1
1
  import { useTranslation } from "../../i18n/hooks.mjs";
2
2
  import { selectBasePath, selectBrandName, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
3
3
  import { useAuthClient } from "../../hooks/use-auth.mjs";
4
- import { AuthLayout } from "../auth/auth-layout.mjs";
4
+ import { AuthDefaultLogo, AuthLayout } from "../auth/auth-layout.mjs";
5
5
  import { ForgotPasswordForm } from "../auth/forgot-password-form.mjs";
6
6
  import { c } from "react/compiler-runtime";
7
7
  import * as React from "react";
@@ -96,7 +96,7 @@ function ForgotPasswordPage(t0) {
96
96
  } else t4 = $[14];
97
97
  let t5;
98
98
  if ($[15] !== brandName || $[16] !== logo) {
99
- t5 = logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName });
99
+ t5 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
100
100
  $[15] = brandName;
101
101
  $[16] = logo;
102
102
  $[17] = t5;
@@ -130,23 +130,6 @@ function ForgotPasswordPage(t0) {
130
130
  } else t7 = $[26];
131
131
  return t7;
132
132
  }
133
- function DefaultLogo(t0) {
134
- const $ = c(2);
135
- const { brandName } = t0;
136
- let t1;
137
- if ($[0] !== brandName) {
138
- t1 = /* @__PURE__ */ jsx("div", {
139
- className: "text-center",
140
- children: /* @__PURE__ */ jsx("h1", {
141
- className: "text-xl font-bold",
142
- children: brandName
143
- })
144
- });
145
- $[0] = brandName;
146
- $[1] = t1;
147
- } else t1 = $[1];
148
- return t1;
149
- }
150
133
 
151
134
  //#endregion
152
135
  export { ForgotPasswordPage };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime4 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/views/pages/invite-page.d.ts
5
5
 
@@ -65,6 +65,6 @@ declare function InvitePage({
65
65
  defaultRole,
66
66
  showMessage,
67
67
  onSuccess
68
- }: InvitePageProps): react_jsx_runtime4.JSX.Element;
68
+ }: InvitePageProps): react_jsx_runtime10.JSX.Element;
69
69
  //#endregion
70
70
  export { InvitePage };
@@ -1,7 +1,7 @@
1
1
  import { useTranslation } from "../../i18n/hooks.mjs";
2
2
  import { selectBrandName, useAdminStore } from "../../runtime/provider.mjs";
3
3
  import { useAuthClient } from "../../hooks/use-auth.mjs";
4
- import { AuthLayout } from "../auth/auth-layout.mjs";
4
+ import { AuthDefaultLogo, AuthLayout } from "../auth/auth-layout.mjs";
5
5
  import { InviteForm } from "../auth/invite-form.mjs";
6
6
  import { c } from "react/compiler-runtime";
7
7
  import * as React from "react";
@@ -99,7 +99,7 @@ function InvitePage(t0) {
99
99
  } else t6 = $[12];
100
100
  let t7;
101
101
  if ($[13] !== brandName || $[14] !== logo) {
102
- t7 = logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName });
102
+ t7 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
103
103
  $[13] = brandName;
104
104
  $[14] = logo;
105
105
  $[15] = t7;
@@ -139,23 +139,6 @@ function InvitePage(t0) {
139
139
  } else t9 = $[27];
140
140
  return t9;
141
141
  }
142
- function DefaultLogo(t0) {
143
- const $ = c(2);
144
- const { brandName } = t0;
145
- let t1;
146
- if ($[0] !== brandName) {
147
- t1 = /* @__PURE__ */ jsx("div", {
148
- className: "text-center",
149
- children: /* @__PURE__ */ jsx("h1", {
150
- className: "text-xl font-bold",
151
- children: brandName
152
- })
153
- });
154
- $[0] = brandName;
155
- $[1] = t1;
156
- } else t1 = $[1];
157
- return t1;
158
- }
159
142
 
160
143
  //#endregion
161
144
  export { InvitePage };
@@ -47,7 +47,7 @@ interface LoginPageProps {
47
47
  * Default login page component.
48
48
  *
49
49
  * Uses authClient from AdminProvider to handle authentication.
50
- * Automatically redirects to setup page if no users exist.
50
+ * Automatically redirects to setup page if no admin users exist.
51
51
  *
52
52
  * @example
53
53
  * ```tsx
@@ -1,7 +1,7 @@
1
1
  import { useTranslation } from "../../i18n/hooks.mjs";
2
2
  import { selectBasePath, selectBrandName, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
3
3
  import { useAuthClient } from "../../hooks/use-auth.mjs";
4
- import { AuthLayout } from "../auth/auth-layout.mjs";
4
+ import { AuthDefaultLogo, AuthLayout } from "../auth/auth-layout.mjs";
5
5
  import { LoginForm } from "../auth/login-form.mjs";
6
6
  import { useSetupStatus } from "../../hooks/use-setup-status.mjs";
7
7
  import { c } from "react/compiler-runtime";
@@ -15,13 +15,13 @@ import { jsx } from "react/jsx-runtime";
15
15
  * Default login page that uses AuthLayout and LoginForm.
16
16
  * Integrates with authClient from AdminProvider context.
17
17
  *
18
- * Automatically redirects to setup page if no users exist.
18
+ * Automatically redirects to setup page if no admin users exist.
19
19
  */
20
20
  /**
21
21
  * Default login page component.
22
22
  *
23
23
  * Uses authClient from AdminProvider to handle authentication.
24
- * Automatically redirects to setup page if no users exist.
24
+ * Automatically redirects to setup page if no admin users exist.
25
25
  *
26
26
  * @example
27
27
  * ```tsx
@@ -131,7 +131,7 @@ function LoginPage(t0) {
131
131
  } else t9 = $[24];
132
132
  let t10;
133
133
  if ($[25] !== brandName || $[26] !== logo) {
134
- t10 = logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName });
134
+ t10 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
135
135
  $[25] = brandName;
136
136
  $[26] = logo;
137
137
  $[27] = t10;
@@ -171,23 +171,6 @@ function LoginPage(t0) {
171
171
  } else t12 = $[39];
172
172
  return t12;
173
173
  }
174
- function DefaultLogo(t0) {
175
- const $ = c(2);
176
- const { brandName } = t0;
177
- let t1;
178
- if ($[0] !== brandName) {
179
- t1 = /* @__PURE__ */ jsx("div", {
180
- className: "text-center",
181
- children: /* @__PURE__ */ jsx("h1", {
182
- className: "text-xl font-bold",
183
- children: brandName
184
- })
185
- });
186
- $[0] = brandName;
187
- $[1] = t1;
188
- } else t1 = $[1];
189
- return t1;
190
- }
191
174
 
192
175
  //#endregion
193
176
  export { LoginPage };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime10 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/views/pages/reset-password-page.d.ts
5
5
 
@@ -58,6 +58,6 @@ declare function ResetPasswordPage({
58
58
  loginPath,
59
59
  minPasswordLength,
60
60
  getToken
61
- }: ResetPasswordPageProps): react_jsx_runtime10.JSX.Element;
61
+ }: ResetPasswordPageProps): react_jsx_runtime12.JSX.Element;
62
62
  //#endregion
63
63
  export { ResetPasswordPage };
@@ -2,7 +2,7 @@ import { useTranslation } from "../../i18n/hooks.mjs";
2
2
  import { selectBasePath, selectBrandName, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
3
3
  import { Button } from "../../components/ui/button.mjs";
4
4
  import { useAuthClient } from "../../hooks/use-auth.mjs";
5
- import { AuthLayout } from "../auth/auth-layout.mjs";
5
+ import { AuthDefaultLogo, AuthLayout } from "../auth/auth-layout.mjs";
6
6
  import { ResetPasswordForm } from "../auth/reset-password-form.mjs";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import * as React from "react";
@@ -117,7 +117,7 @@ function ResetPasswordPage(t0) {
117
117
  } else t6$1 = $[13];
118
118
  let t7$1;
119
119
  if ($[14] !== brandName || $[15] !== logo) {
120
- t7$1 = logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName });
120
+ t7$1 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
121
121
  $[14] = brandName;
122
122
  $[15] = logo;
123
123
  $[16] = t7$1;
@@ -197,7 +197,7 @@ function ResetPasswordPage(t0) {
197
197
  } else t6 = $[39];
198
198
  let t7;
199
199
  if ($[40] !== brandName || $[41] !== logo) {
200
- t7 = logo ?? /* @__PURE__ */ jsx(DefaultLogo, { brandName });
200
+ t7 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
201
201
  $[40] = brandName;
202
202
  $[41] = logo;
203
203
  $[42] = t7;
@@ -235,23 +235,6 @@ function ResetPasswordPage(t0) {
235
235
  } else t9 = $[53];
236
236
  return t9;
237
237
  }
238
- function DefaultLogo(t0) {
239
- const $ = c(2);
240
- const { brandName } = t0;
241
- let t1;
242
- if ($[0] !== brandName) {
243
- t1 = /* @__PURE__ */ jsx("div", {
244
- className: "text-center",
245
- children: /* @__PURE__ */ jsx("h1", {
246
- className: "text-xl font-bold",
247
- children: brandName
248
- })
249
- });
250
- $[0] = brandName;
251
- $[1] = t1;
252
- } else t1 = $[1];
253
- return t1;
254
- }
255
238
 
256
239
  //#endregion
257
240
  export { ResetPasswordPage };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime9 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/views/pages/setup-page.d.ts
5
5
 
@@ -56,6 +56,6 @@ declare function SetupPage({
56
56
  redirectTo,
57
57
  loginPath,
58
58
  showLoginLink
59
- }: SetupPageProps): react_jsx_runtime9.JSX.Element;
59
+ }: SetupPageProps): react_jsx_runtime13.JSX.Element;
60
60
  //#endregion
61
61
  export { SetupPage, SetupPageProps };