@allbluecn/admin-app 0.3.4 → 0.3.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 (115) hide show
  1. package/package.json +5 -5
  2. package/src/components/admin/admin-user-menu.tsx +4 -4
  3. package/src/components/admin/developer-log.tsx +7 -7
  4. package/src/components/ai-memory/memory-facts-panel.tsx +9 -9
  5. package/src/components/ai-prompts/preview-panel.tsx +1 -1
  6. package/src/components/ai-prompts/prompt-editor.tsx +8 -8
  7. package/src/components/ai-prompts/prompt-table.tsx +6 -6
  8. package/src/components/ai-prompts/section-editor.tsx +3 -3
  9. package/src/components/ai-prompts/variable-panel.tsx +2 -2
  10. package/src/components/ai-prompts/version-history.tsx +5 -5
  11. package/src/components/ai-provider/model-list-editor.tsx +2 -2
  12. package/src/components/ai-provider/provider-form.tsx +7 -7
  13. package/src/components/ai-provider/provider-table.tsx +6 -6
  14. package/src/components/auth/admin-login-form.tsx +6 -6
  15. package/src/components/auth/icon-input.tsx +2 -2
  16. package/src/components/auth/password-input.tsx +2 -2
  17. package/src/components/component/component-form-dialog.tsx +8 -8
  18. package/src/components/component/component-import-dialog.tsx +6 -6
  19. package/src/components/component/component-table.tsx +3 -3
  20. package/{allblue-ui/src → src}/components/confirm-dialog.tsx +2 -2
  21. package/src/components/dependency/changelog-dialog.tsx +2 -2
  22. package/src/components/dependency/columns.tsx +3 -3
  23. package/src/components/dependency/dependency-table.tsx +7 -7
  24. package/src/components/dependency/edit-dialog.tsx +8 -8
  25. package/src/components/invitations/invitations-page.tsx +13 -13
  26. package/src/components/knowledge-public/bookmark-form-dialog.tsx +6 -6
  27. package/src/components/knowledge-public/compliance-form-dialog.tsx +6 -6
  28. package/src/components/knowledge-public/legal-form-dialog.tsx +7 -7
  29. package/src/components/layout/sidebar-02/app-sidebar.tsx +1 -1
  30. package/src/components/layout/sidebar-02/index.tsx +1 -1
  31. package/src/components/layout/sidebar-02/nav-main.tsx +2 -2
  32. package/src/components/layout/sidebar-02/nav-notifications.tsx +3 -3
  33. package/src/components/market/columns.tsx +4 -4
  34. package/src/components/market/market-app-form.tsx +6 -6
  35. package/src/components/market/market-app-list.tsx +4 -4
  36. package/src/components/monitoring/error-list.tsx +1 -1
  37. package/src/components/monitoring/metrics-stats.tsx +1 -1
  38. package/src/components/monitoring/request-log-table.tsx +1 -1
  39. package/src/components/oauth-providers/provider-page.tsx +9 -9
  40. package/src/components/permissions/assign-dialog.tsx +5 -5
  41. package/src/components/permissions/create-role-dialog.tsx +6 -6
  42. package/{allblue-ui/src → src/components}/ui/sidebar.tsx +1 -1
  43. package/src/components/user/columns.tsx +4 -4
  44. package/src/components/user/settings-activity-log.tsx +7 -7
  45. package/src/components/user/settings-profile/avatar-uploader.tsx +2 -2
  46. package/src/components/user/settings-profile/social-links.tsx +2 -2
  47. package/src/components/user/settings-profile.tsx +6 -6
  48. package/src/components/user/user-create-dialog.tsx +6 -6
  49. package/src/components/user/user-detail/error-boundary.tsx +1 -1
  50. package/src/components/user/user-detail/user-detail-dialogs.tsx +6 -6
  51. package/src/components/user/user-filters.tsx +3 -3
  52. package/src/providers/index.tsx +1 -1
  53. package/src/routes/__root.tsx +1 -1
  54. package/src/routes/_nav/audit/route.lazy.tsx +1 -1
  55. package/src/routes/_nav/compliance/route.lazy.tsx +3 -3
  56. package/src/routes/_nav/components/route.lazy.tsx +4 -4
  57. package/src/routes/_nav/knowledge-public/bookmarks/route.lazy.tsx +6 -6
  58. package/src/routes/_nav/knowledge-public/compliance/route.lazy.tsx +6 -6
  59. package/src/routes/_nav/knowledge-public/legal/route.lazy.tsx +6 -6
  60. package/src/routes/_nav/licenses/$licenseId/route.lazy.tsx +3 -3
  61. package/src/routes/_nav/licenses/new/route.lazy.tsx +5 -5
  62. package/src/routes/_nav/licenses/route.lazy.tsx +1 -1
  63. package/src/routes/_nav/monitoring/ai-usage/route.lazy.tsx +2 -2
  64. package/src/routes/_nav/monitoring/errors/route.lazy.tsx +1 -1
  65. package/src/routes/_nav/monitoring/health/route.lazy.tsx +3 -3
  66. package/src/routes/_nav/monitoring/logs/route.lazy.tsx +3 -3
  67. package/src/routes/_nav/monitoring/metrics/route.lazy.tsx +3 -3
  68. package/src/routes/_nav/monitoring/route.lazy.tsx +2 -2
  69. package/src/routes/_nav/monitoring/sentry/route.lazy.tsx +1 -1
  70. package/src/routes/_nav/permissions/route.lazy.tsx +4 -4
  71. package/src/routes/_nav/sso/route.lazy.tsx +2 -2
  72. package/src/routes/_nav/users/$userId/route.lazy.tsx +8 -8
  73. package/src/routes/_nav/users/-components/users-table.tsx +1 -1
  74. package/src/routes/_nav/users/route.lazy.tsx +1 -1
  75. package/src/routes/setup/route.lazy.tsx +2 -2
  76. package/src/server/dependency/helpers.ts +0 -1
  77. package/src/styles/globals.css +3 -3
  78. package/allblue-ui/package.json +0 -6
  79. package/allblue-ui/src/components/infinite-scroll-sentinel.tsx +0 -37
  80. package/allblue-ui/src/hooks/use-load-more.ts +0 -57
  81. package/allblue-ui/src/index.ts +0 -31
  82. package/allblue-ui/src/lib/avatar.ts +0 -41
  83. package/allblue-ui/src/lib/utils.ts +0 -1
  84. /package/{allblue-ui/src → src/components}/data-table/data-table-pagination.tsx +0 -0
  85. /package/{allblue-ui/src → src/components}/data-table/data-table.tsx +0 -0
  86. /package/{allblue-ui/src → src/components}/data-table/table-detail-layout.tsx +0 -0
  87. /package/{allblue-ui/src → src}/components/notion-avatar.tsx +0 -0
  88. /package/{allblue-ui/src → src/components}/ui/alert-dialog.tsx +0 -0
  89. /package/{allblue-ui/src → src/components}/ui/alert.tsx +0 -0
  90. /package/{allblue-ui/src → src/components}/ui/avatar.tsx +0 -0
  91. /package/{allblue-ui/src → src/components}/ui/badge.tsx +0 -0
  92. /package/{allblue-ui/src → src/components}/ui/button.tsx +0 -0
  93. /package/{allblue-ui/src → src/components}/ui/card.tsx +0 -0
  94. /package/{allblue-ui/src → src/components}/ui/checkbox.tsx +0 -0
  95. /package/{allblue-ui/src → src/components}/ui/collapsible.tsx +0 -0
  96. /package/{allblue-ui/src → src/components}/ui/dialog.tsx +0 -0
  97. /package/{allblue-ui/src → src/components}/ui/dropdown-menu.tsx +0 -0
  98. /package/{allblue-ui/src → src/components}/ui/field.tsx +0 -0
  99. /package/{allblue-ui/src → src/components}/ui/input-group.tsx +0 -0
  100. /package/{allblue-ui/src → src/components}/ui/input.tsx +0 -0
  101. /package/{allblue-ui/src → src/components}/ui/label.tsx +0 -0
  102. /package/{allblue-ui/src → src/components}/ui/pagination.tsx +0 -0
  103. /package/{allblue-ui/src → src/components}/ui/select.tsx +0 -0
  104. /package/{allblue-ui/src → src/components}/ui/separator.tsx +0 -0
  105. /package/{allblue-ui/src → src/components}/ui/sheet.tsx +0 -0
  106. /package/{allblue-ui/src → src/components}/ui/skeleton.tsx +0 -0
  107. /package/{allblue-ui/src → src/components}/ui/switch.tsx +0 -0
  108. /package/{allblue-ui/src → src/components}/ui/table.tsx +0 -0
  109. /package/{allblue-ui/src → src/components}/ui/textarea.tsx +0 -0
  110. /package/{allblue-ui/src → src/components}/ui/toast.tsx +0 -0
  111. /package/{allblue-ui/src → src/components}/ui/tooltip.tsx +0 -0
  112. /package/{allblue-ui/src → src}/components/user-avatar.tsx +0 -0
  113. /package/{allblue-ui/src → src}/hooks/use-mobile.ts +0 -0
  114. /package/{allblue-ui/src → src}/lib/datetime.ts +0 -0
  115. /package/{allblue-ui/src → src}/lib/sanitize.ts +0 -0
@@ -37,12 +37,12 @@ import {
37
37
  const categoryIconMap: Record<string, LucideIcon> = {
38
38
  Folder, Globe, Code, Book, BookOpen,
39
39
  }
40
- import { DataTable, type AdminColumnDef } from '@allbluecn/ui/data-table'
41
- import { Button } from '@allbluecn/ui/button'
42
- import { Input } from '@allbluecn/ui/input'
43
- import { Badge } from '@allbluecn/ui/badge'
44
- import { ConfirmDialog } from '@allbluecn/ui/components/confirm-dialog'
45
- import { toast } from '@allbluecn/ui/toast'
40
+ import { DataTable, type AdminColumnDef } from '@/components/data-table/data-table'
41
+ import { Button } from '@/components/ui/button'
42
+ import { Input } from '@/components/ui/input'
43
+ import { Badge } from '@/components/ui/badge'
44
+ import { ConfirmDialog } from '@/components/confirm-dialog'
45
+ import { toast } from '@/components/ui/toast'
46
46
  import {
47
47
  BookmarkFormDialog,
48
48
  type BookmarkRow,
@@ -19,12 +19,12 @@ import { createLazyFileRoute, useNavigate, useRouter } from '@tanstack/react-rou
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useState, useTransition } from 'react'
21
21
  import { PlusIcon, PencilIcon, Trash2Icon, SearchIcon } from 'lucide-react'
22
- import { DataTable, type AdminColumnDef } from '@allbluecn/ui/data-table'
23
- import { Button } from '@allbluecn/ui/button'
24
- import { Input } from '@allbluecn/ui/input'
25
- import { Badge } from '@allbluecn/ui/badge'
26
- import { ConfirmDialog } from '@allbluecn/ui/components/confirm-dialog'
27
- import { toast } from '@allbluecn/ui/toast'
22
+ import { DataTable, type AdminColumnDef } from '@/components/data-table/data-table'
23
+ import { Button } from '@/components/ui/button'
24
+ import { Input } from '@/components/ui/input'
25
+ import { Badge } from '@/components/ui/badge'
26
+ import { ConfirmDialog } from '@/components/confirm-dialog'
27
+ import { toast } from '@/components/ui/toast'
28
28
  import {
29
29
  ComplianceFormDialog,
30
30
  type ComplianceRow,
@@ -19,10 +19,10 @@ import { createLazyFileRoute, useNavigate, useRouter } from '@tanstack/react-rou
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useState, useTransition } from 'react'
21
21
  import { PlusIcon, PencilIcon, Trash2Icon, SearchIcon } from 'lucide-react'
22
- import { DataTable, type AdminColumnDef } from '@allbluecn/ui/data-table'
23
- import { Button } from '@allbluecn/ui/button'
24
- import { Input } from '@allbluecn/ui/input'
25
- import { Badge } from '@allbluecn/ui/badge'
22
+ import { DataTable, type AdminColumnDef } from '@/components/data-table/data-table'
23
+ import { Button } from '@/components/ui/button'
24
+ import { Input } from '@/components/ui/input'
25
+ import { Badge } from '@/components/ui/badge'
26
26
  import {
27
27
  AlertDialog,
28
28
  AlertDialogAction,
@@ -32,8 +32,8 @@ import {
32
32
  AlertDialogFooter,
33
33
  AlertDialogHeader,
34
34
  AlertDialogTitle,
35
- } from '@allbluecn/ui/alert-dialog'
36
- import { toast } from '@allbluecn/ui/toast'
35
+ } from '@/components/ui/alert-dialog'
36
+ import { toast } from '@/components/ui/toast'
37
37
  import { LegalFormDialog, type LegalRow } from '@/components/knowledge-public/legal-form-dialog'
38
38
  import { adminDeleteLegalFn } from '@/server/serverFns/knowledge-public/legal/delete'
39
39
 
@@ -18,10 +18,10 @@
18
18
  import { createLazyFileRoute, Link, useNavigate } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useServerFn } from '@tanstack/react-start'
21
- import { toast } from '@allbluecn/ui/toast'
21
+ import { toast } from '@/components/ui/toast'
22
22
  import type React from 'react'
23
- import { Button } from '@allbluecn/ui/button'
24
- import { Card, CardContent, CardHeader, CardTitle } from '@allbluecn/ui/card'
23
+ import { Button } from '@/components/ui/button'
24
+ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
25
25
  import { revokeLicenseFn } from '@/server/serverFns/licenses'
26
26
 
27
27
  export const Route = createLazyFileRoute('/_nav/licenses/$licenseId')({
@@ -22,11 +22,11 @@ import { useState } from 'react'
22
22
  import { useForm } from '@tanstack/react-form'
23
23
  import { useServerFn } from '@tanstack/react-start'
24
24
  import { Check, Copy } from 'lucide-react'
25
- import { Button } from '@allbluecn/ui/button'
26
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@allbluecn/ui/card'
27
- import { Input } from '@allbluecn/ui/input'
28
- import { Label } from '@allbluecn/ui/label'
29
- import { Alert, AlertDescription, AlertTitle } from '@allbluecn/ui/alert'
25
+ import { Button } from '@/components/ui/button'
26
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
27
+ import { Input } from '@/components/ui/input'
28
+ import { Label } from '@/components/ui/label'
29
+ import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'
30
30
  import { issueLicenseFn } from '@/server/serverFns/licenses'
31
31
  import { FeatureRegistry } from '@allbluecn/kernel'
32
32
 
@@ -18,7 +18,7 @@
18
18
  import { createLazyFileRoute, Link } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import type React from 'react'
21
- import { Button } from '@allbluecn/ui/button'
21
+ import { Button } from '@/components/ui/button'
22
22
 
23
23
  export const Route = createLazyFileRoute('/_nav/licenses')({
24
24
  pendingComponent: () => (
@@ -8,8 +8,8 @@ import { tooltip } from '@tanstack/charts/tooltip'
8
8
  import { Chart } from '@tanstack/charts/react'
9
9
  import { BarChart3, AlertCircle, AlertTriangle, ChevronLeft, ChevronRight, RefreshCw } from 'lucide-react'
10
10
  import { PageHeader } from '@/components/common/page-header'
11
- import { Card, CardContent, CardHeader, CardTitle } from '@allbluecn/ui/card'
12
- import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@allbluecn/ui/table'
11
+ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
12
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'
13
13
  import { getAiUsageOverviewFn } from '@/server/serverFns/monitoring/get-ai-usage-overview'
14
14
  import { checkAiAlertsFn } from '@/server/serverFns/monitoring/check-ai-alerts'
15
15
  import type { AiUsageOverview } from '@/server/admin-ai-usage'
@@ -25,7 +25,7 @@ import { ErrorItem } from '@/components/monitoring/error-list'
25
25
  import { getErrors } from '@/server/serverFns/monitoring/get-errors'
26
26
  import { resetMonitoring } from '@/server/serverFns/monitoring/reset'
27
27
  import { jsonify } from '@/lib/loader-serial'
28
- import { toast } from '@allbluecn/ui/toast'
28
+ import { toast } from '@/components/ui/toast'
29
29
 
30
30
  export const Route = createLazyFileRoute('/_nav/monitoring/errors')({
31
31
  component: MonitoringErrors,
@@ -18,14 +18,14 @@
18
18
  import { createLazyFileRoute } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useState, useEffect, useRef } from 'react'
21
- import { formatTimestamp } from '@allbluecn/ui/lib/datetime'
21
+ import { formatTimestamp } from '@/lib/datetime'
22
22
  import { HeartPulse, Play, Square, RefreshCw } from 'lucide-react'
23
23
  import { PageHeader } from '@/components/common/page-header'
24
24
  import { HealthCards } from '@/components/monitoring/health-cards'
25
- import { DataTable } from '@allbluecn/ui/data-table'
25
+ import { DataTable } from '@/components/data-table/data-table'
26
26
  import { getHealthStatus } from '@/server/serverFns/monitoring/get-health'
27
27
  import { getHealthCheckSettings, updateHealthCheckSettings } from '@/server/serverFns/monitoring/get-health-settings'
28
- import { toast } from '@allbluecn/ui/toast'
28
+ import { toast } from '@/components/ui/toast'
29
29
  import { jsonify } from '@/lib/loader-serial'
30
30
 
31
31
  export const Route = createLazyFileRoute('/_nav/monitoring/health')({
@@ -21,11 +21,11 @@ import { useState, useEffect, useRef } from 'react'
21
21
  import { Activity, Filter, RefreshCw, Trash2 } from 'lucide-react'
22
22
  import { PageHeader } from '@/components/common/page-header'
23
23
  import { RequestLogTable } from '@/components/monitoring/request-log-table'
24
- import { Checkbox } from '@allbluecn/ui/checkbox'
24
+ import { Checkbox } from '@/components/ui/checkbox'
25
25
  import { getRequestLogs } from '@/server/serverFns/monitoring/get-request-logs'
26
26
  import { resetMonitoring } from '@/server/serverFns/monitoring/reset'
27
- import { DataTablePagination } from '@allbluecn/ui/data-table/pagination'
28
- import { toast } from '@allbluecn/ui/toast'
27
+ import { DataTablePagination } from '@/components/data-table/data-table-pagination'
28
+ import { toast } from '@/components/ui/toast'
29
29
  import { jsonify } from '@/lib/loader-serial'
30
30
  import { RequestLogEntry } from '@/components/monitoring/request-log-table'
31
31
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  import { m } from '@/paraglide/messages.js'
19
19
  import { getBenchmark, getBenchmarkSource, compareDuration } from '@/lib/monitoring-benchmarks'
20
- import { formatTimestamp } from '@allbluecn/ui/lib/datetime'
20
+ import { formatTimestamp } from '@/lib/datetime'
21
21
  import { createLazyFileRoute } from '@tanstack/react-router'
22
22
  import { useState } from 'react'
23
23
  import { BarChart3, RefreshCw, Trash2, MemoryStick } from 'lucide-react'
@@ -27,8 +27,8 @@ import { MetricsStats } from '@/components/monitoring/metrics-stats'
27
27
  import { getMetrics } from '@/server/serverFns/monitoring/get-metrics'
28
28
  import { resetMonitoring } from '@/server/serverFns/monitoring/reset'
29
29
  import { jsonify } from '@/lib/loader-serial'
30
- import { DataTable } from '@allbluecn/ui/data-table'
31
- import { toast } from '@allbluecn/ui/toast'
30
+ import { DataTable } from '@/components/data-table/data-table'
31
+ import { toast } from '@/components/ui/toast'
32
32
 
33
33
  export const Route = createLazyFileRoute('/_nav/monitoring/metrics')({
34
34
  component: MonitoringMetrics,
@@ -17,8 +17,8 @@
17
17
 
18
18
  import { createLazyFileRoute, Link, Outlet, useLocation } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { SidebarTrigger } from '@allbluecn/ui/sidebar'
21
- import { Separator } from '@allbluecn/ui/separator'
20
+ import { SidebarTrigger } from '@/components/ui/sidebar'
21
+ import { Separator } from '@/components/ui/separator'
22
22
 
23
23
  export const Route = createLazyFileRoute('/_nav/monitoring')({
24
24
  component: MonitoringLayout,
@@ -21,7 +21,7 @@ import * as Sentry from '@sentry/tanstackstart-react'
21
21
  import { BugPlay, ExternalLink, Bug, Activity, Eye, EyeOff, Save, CheckCircle2, XCircle, RefreshCw, ShieldCheck } from 'lucide-react'
22
22
  import { IconBrandSentry } from '@tabler/icons-react';
23
23
  import { useEffect, useState } from 'react'
24
- import { toast } from '@allbluecn/ui/toast'
24
+ import { toast } from '@/components/ui/toast'
25
25
  import { getSentryConfig, saveSentryConfig, reconfigureSentryServer } from '@/server/serverFns/sentry/config'
26
26
  import type { SentryConfig } from '@/server/serverFns/sentry/config'
27
27
 
@@ -2,15 +2,15 @@ import { createLazyFileRoute, Link, useLocation } from '@tanstack/react-router'
2
2
  import { m } from '@/paraglide/messages.js'
3
3
  import { getLocale } from '@/paraglide/runtime.js'
4
4
  import { useServerFn } from '@tanstack/react-start'
5
- import { toast } from '@allbluecn/ui/toast'
5
+ import { toast } from '@/components/ui/toast'
6
6
  import { useEffect, useState } from 'react'
7
7
  import type React from 'react'
8
8
  import {
9
9
  listRolesFn,
10
10
  deleteRoleFn,
11
11
  } from '@/server/serverFns/permissions'
12
- import { Badge } from '@allbluecn/ui/badge'
13
- import { Button } from '@allbluecn/ui/button'
12
+ import { Badge } from '@/components/ui/badge'
13
+ import { Button } from '@/components/ui/button'
14
14
  import {
15
15
  Table,
16
16
  TableBody,
@@ -18,7 +18,7 @@ import {
18
18
  TableHead,
19
19
  TableHeader,
20
20
  TableRow,
21
- } from '@allbluecn/ui/table'
21
+ } from '@/components/ui/table'
22
22
  import { CreateRoleDialog } from '@/components/permissions/create-role-dialog'
23
23
  import { AssignDialog } from '@/components/permissions/assign-dialog'
24
24
  import type { RoleItem } from '@/components/permissions/types'
@@ -18,10 +18,10 @@
18
18
  import { createLazyFileRoute } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useServerFn } from '@tanstack/react-start'
21
- import { toast } from '@allbluecn/ui/toast'
21
+ import { toast } from '@/components/ui/toast'
22
22
  import type React from 'react'
23
23
  import { deleteSsoProviderFn, toggleSsoProviderFn } from '@/server/serverFns/sso-config'
24
- import { Badge } from '@allbluecn/ui/badge'
24
+ import { Badge } from '@/components/ui/badge'
25
25
 
26
26
  export const Route = createLazyFileRoute('/_nav/sso')({
27
27
  pendingComponent: () => (
@@ -18,17 +18,17 @@
18
18
  import { createLazyFileRoute, useNavigate } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useState, useTransition } from 'react'
21
- import { formatTimestamp } from '@allbluecn/ui/lib/datetime'
21
+ import { formatTimestamp } from '@/lib/datetime'
22
22
  import { getUserDetailFn } from '@/server/serverFns/user/detail'
23
23
  import { updateUserRoleFn } from '@/server/serverFns/user/update-role'
24
24
  import { updateUserStatusFn } from '@/server/serverFns/user/update-status'
25
25
  import { resetUserPasswordFn } from '@/server/serverFns/user/reset-password'
26
26
  import { deleteUserFn } from '@/server/serverFns/user/delete'
27
- import { TableDetailLayout } from '@allbluecn/ui/data-table/table-detail-layout'
28
- import { Badge } from '@allbluecn/ui/badge'
29
- import { Separator } from '@allbluecn/ui/separator'
30
- import { Button } from '@allbluecn/ui/button'
31
- import { UserAvatar } from '@allbluecn/ui/components/user-avatar'
27
+ import { TableDetailLayout } from '@/components/data-table/table-detail-layout'
28
+ import { Badge } from '@/components/ui/badge'
29
+ import { Separator } from '@/components/ui/separator'
30
+ import { Button } from '@/components/ui/button'
31
+ import { UserAvatar } from '@/components/user-avatar'
32
32
 
33
33
  const STATUS_LABELS: Record<string, () => string> = {
34
34
  active: m['admin-users_status_active'],
@@ -48,7 +48,7 @@ import {
48
48
  ShoppingBagIcon,
49
49
  ShieldCheckIcon,
50
50
  } from 'lucide-react'
51
- import { toast } from '@allbluecn/ui/toast'
51
+ import { toast } from '@/components/ui/toast'
52
52
  import { parseUserAgent, formatParsedUA } from '@allbluecn/kernel'
53
53
  import type { AvatarConfig } from '@allbluecn/kernel'
54
54
  import SettingsActivityLog, {
@@ -61,7 +61,7 @@ import {
61
61
  CardDescription,
62
62
  CardHeader,
63
63
  CardTitle,
64
- } from '@allbluecn/ui/card'
64
+ } from '@/components/ui/card'
65
65
  import { AdminUserErrorBoundary } from '@/components/user/user-detail/error-boundary'
66
66
  import {
67
67
  UserDeleteDialog,
@@ -16,7 +16,7 @@
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
 
19
- import { DataTable } from "@allbluecn/ui/data-table"
19
+ import { DataTable } from "@/components/data-table/data-table"
20
20
  import { getUserColumns } from "@/components/user/columns"
21
21
  import type { UserRow } from "@/components/user/columns"
22
22
  import { useNavigate } from "@tanstack/react-router"
@@ -21,7 +21,7 @@ import { useState } from 'react'
21
21
  import { UsersTable } from './-components/users-table'
22
22
  import { UserFilters } from '@/components/user/user-filters'
23
23
  import { UserCreateDialog } from '@/components/user/user-create-dialog'
24
- import { Button } from '@allbluecn/ui/button'
24
+ import { Button } from '@/components/ui/button'
25
25
  import { PlusIcon } from 'lucide-react'
26
26
 
27
27
  export const Route = createLazyFileRoute('/_nav/users')({
@@ -18,14 +18,14 @@
18
18
  import { createLazyFileRoute, useNavigate } from '@tanstack/react-router'
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useState } from 'react'
21
- import { toast } from '@allbluecn/ui/toast'
21
+ import { toast } from '@/components/ui/toast'
22
22
  import { Loader2, ShieldCheck, User, Mail, Database } from 'lucide-react'
23
23
  import { AuthLayout, AuthLayoutLeft, AuthLayoutRight } from '@/components/auth/auth-layout'
24
24
  import { AuthHeader } from '@/components/auth/auth-header'
25
25
  import { AuthBrandPanel } from '@/components/auth/auth-brand-panel'
26
26
  import { PasswordInput } from '@/components/auth/password-input'
27
27
  import { IconInput } from '@/components/auth/icon-input'
28
- import { Button } from '@allbluecn/ui/button'
28
+ import { Button } from '@/components/ui/button'
29
29
  import { setupAdminFn } from '@/server/serverFns/auth/setup'
30
30
 
31
31
  export const Route = createLazyFileRoute('/setup')({
@@ -44,7 +44,6 @@ const PACKAGE_FILES = [
44
44
  "apps/admin/package.json",
45
45
  "packages/database/package.json",
46
46
  "packages/shared/package.json",
47
- "packages/ui/package.json",
48
47
  ]
49
48
 
50
49
  interface ParsedPkgFile {
@@ -3,9 +3,9 @@
3
3
 
4
4
  @import "tailwindcss";
5
5
 
6
- /* 共享 UI 包源码类名扫描(Tailwind v4 自动探测不覆盖 workspace 包,
7
- 缺失则 @allbluecn/ui 内组件的全部工具类不生成) */
8
- @source "../../../../packages/ui/src/**/*.{ts,tsx}";
6
+ /* src 源码类名扫描(含 components/ui 内联组件,
7
+ Tailwind v4 自动探测不覆盖的路径由此显式声明) */
8
+ @source "../";
9
9
 
10
10
  @import "tw-animate-css";
11
11
 
@@ -1,6 +0,0 @@
1
- {
2
- "name": "@allbluecn/ui-bundled",
3
- "version": "0.1.0",
4
- "private": true,
5
- "type": "module"
6
- }
@@ -1,37 +0,0 @@
1
- // SPDX-License-Identifier: AGPL-3.0-or-later
2
- // AllBlue - 理想之海
3
- // Copyright (C) 2026 AllBlue Contributors
4
-
5
- import { useLoadMore } from "../hooks/use-load-more"
6
-
7
- interface InfiniteScrollSentinelProps {
8
- onLoadMore: () => void | Promise<void>
9
- hasMore: boolean
10
- rootRef?: React.RefObject<HTMLElement | null>
11
- /** 全部加载完后的提示文案(调用方传入,组件内不做 i18n) */
12
- loadedAllLabel: string
13
- }
14
-
15
- /**
16
- * 无限滚动哨兵:滚动到底部附近触发 onLoadMore,展示三点脉冲 loading 与
17
- * 「已全部加载」提示。加载状态机见 useLoadMore。
18
- */
19
- export function InfiniteScrollSentinel({ onLoadMore, hasMore, rootRef, loadedAllLabel }: InfiniteScrollSentinelProps) {
20
- const { sentinelRef, loading } = useLoadMore(onLoadMore, hasMore, rootRef)
21
-
22
- return (
23
- <div className="flex h-7 items-center justify-center">
24
- <div ref={sentinelRef} className="h-1" />
25
- {loading && (
26
- <div className="flex items-center gap-1">
27
- <div className="h-1.5 w-1.5 animate-pulse rounded-full bg-primary/60" />
28
- <div className="h-1.5 w-1.5 animate-pulse rounded-full bg-primary/60 delay-75" />
29
- <div className="h-1.5 w-1.5 animate-pulse rounded-full bg-primary/60 delay-150" />
30
- </div>
31
- )}
32
- {!loading && !hasMore && (
33
- <span className="text-xs text-muted-foreground">{loadedAllLabel}</span>
34
- )}
35
- </div>
36
- )
37
- }
@@ -1,57 +0,0 @@
1
- // SPDX-License-Identifier: AGPL-3.0-or-later
2
- // AllBlue - 理想之海
3
- // Copyright (C) 2026 AllBlue Contributors
4
-
5
- import { useEffect, useRef, useState } from "react";
6
-
7
- /**
8
- * 无限滚动加载状态机:IntersectionObserver 哨兵 + loading 防重入。
9
- *
10
- * 哨兵进入视口且 hasMore 时触发 onLoadMore;返回 Promise 时 resolve 后解除
11
- * loading,同步返回则由调用方经 hasMore/数据更新间接解除。供
12
- * InfiniteScrollSentinel 等无限滚动组件复用。
13
- */
14
- export function useLoadMore(
15
- onLoadMore: () => void | Promise<void>,
16
- hasMore: boolean,
17
- rootRef?: React.RefObject<HTMLElement | null>,
18
- ): {
19
- /** 挂到滚动末端哨兵元素上 */
20
- sentinelRef: React.RefObject<HTMLDivElement | null>;
21
- loading: boolean;
22
- } {
23
- const sentinelRef = useRef<HTMLDivElement>(null);
24
- const observerRef = useRef<IntersectionObserver | null>(null);
25
- const [loading, setLoading] = useState(false);
26
- const loadingRef = useRef(false);
27
-
28
- useEffect(() => {
29
- loadingRef.current = loading;
30
- }, [loading]);
31
-
32
- useEffect(() => {
33
- if (!sentinelRef.current || !hasMore) return;
34
-
35
- if (observerRef.current) observerRef.current.disconnect();
36
-
37
- const observer = new IntersectionObserver(
38
- (entries) => {
39
- if (entries[0]?.isIntersecting && !loadingRef.current) {
40
- setLoading(true);
41
- const result = onLoadMore();
42
- if (result && typeof (result as Promise<void>).then === "function") {
43
- (result as Promise<void>).then(() => setLoading(false));
44
- }
45
- }
46
- },
47
- { root: rootRef?.current ?? null, rootMargin: "80px" },
48
- );
49
-
50
- observer.observe(sentinelRef.current);
51
- observerRef.current = observer;
52
- return () => observer.disconnect();
53
- // onLoadMore 由调用方保证稳定(多为 useCallback),与原实现一致仅依赖 hasMore/rootRef
54
- }, [hasMore, rootRef]);
55
-
56
- return { sentinelRef, loading };
57
- }
@@ -1,31 +0,0 @@
1
- export * from "./ui/alert"
2
- export * from "./ui/alert-dialog"
3
- export * from "./ui/avatar"
4
- export * from "./ui/badge"
5
- export * from "./ui/button"
6
- export * from "./ui/card"
7
- export * from "./ui/checkbox"
8
- export * from "./ui/collapsible"
9
- export * from "./ui/dialog"
10
- export * from "./ui/dropdown-menu"
11
- export * from "./ui/field"
12
- export * from "./ui/input"
13
- export * from "./ui/input-group"
14
- export * from "./ui/label"
15
- export * from "./ui/pagination"
16
- export * from "./ui/select"
17
- export * from "./ui/separator"
18
- export * from "./ui/sheet"
19
- export * from "./ui/sidebar"
20
- export * from "./ui/skeleton"
21
- export * from "./ui/switch"
22
- export * from "./ui/table"
23
- export * from "./ui/textarea"
24
- export * from "./ui/toast"
25
- export * from "./ui/tooltip"
26
- export { ConfirmDialog, type ConfirmDialogProps } from "./components/confirm-dialog"
27
- export { InfiniteScrollSentinel } from "./components/infinite-scroll-sentinel"
28
- export { useLoadMore } from "./hooks/use-load-more"
29
- export { useIsMobile } from "./hooks/use-mobile"
30
- export { getBoringAvatarUrl, getAvatarFallback, type AvatarOptions } from "./lib/avatar"
31
- export { cn } from "./lib/utils"
@@ -1,41 +0,0 @@
1
- // SPDX-License-Identifier: AGPL-3.0-or-later
2
- // AllBlue - 理想之海
3
- // Copyright (C) 2026 AllBlue Contributors
4
- //
5
- // This program is free software: you can redistribute it and/or modify
6
- // it under the terms of the GNU Affero General Public License as published by
7
- // the Free Software Foundation, either version 3 of the License, or
8
- // (at your option) any later version.
9
- //
10
- // This program is distributed in the hope that it will be useful,
11
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- // GNU Affero General Public License for more details.
14
- //
15
- // You should have received a copy of the GNU Affero General Public License
16
- // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
-
18
- const DICE_BEAR_BASE = "https://api.dicebear.com/7.x";
19
-
20
- const DICE_BEAR_STYLES = ["avataaars", "micah", "notionists", "lorelei", "adventurer"] as const;
21
-
22
- type DiceBearStyle = (typeof DICE_BEAR_STYLES)[number];
23
-
24
- export interface AvatarOptions {
25
- style?: DiceBearStyle;
26
- size?: number;
27
- square?: boolean;
28
- }
29
-
30
- export function getBoringAvatarUrl(
31
- seed: string,
32
- options: AvatarOptions = {}
33
- ): string {
34
- const { style = "avataaars", size = 80 } = options;
35
-
36
- return `${DICE_BEAR_BASE}/${style}/svg?seed=${encodeURIComponent(seed)}&size=${size}`;
37
- }
38
-
39
- export function getAvatarFallback(name: string): string {
40
- return name.charAt(0).toUpperCase();
41
- }
@@ -1 +0,0 @@
1
- export { cn } from "cn"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes