@allbluecn/admin-app 0.3.4 → 0.3.6

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 (140) hide show
  1. package/package.json +15 -15
  2. package/src/components/__tests__/user-avatar.test.tsx +39 -0
  3. package/src/components/admin/admin-user-menu.tsx +6 -6
  4. package/src/components/admin/developer-log.tsx +7 -7
  5. package/src/components/ai-memory/memory-facts-panel.tsx +9 -9
  6. package/src/components/ai-prompts/preview-panel.tsx +1 -1
  7. package/src/components/ai-prompts/prompt-editor.tsx +8 -8
  8. package/src/components/ai-prompts/prompt-table.tsx +6 -6
  9. package/src/components/ai-prompts/section-editor.tsx +3 -3
  10. package/src/components/ai-prompts/variable-panel.tsx +2 -2
  11. package/src/components/ai-prompts/version-history.tsx +5 -5
  12. package/src/components/ai-provider/model-list-editor.tsx +2 -2
  13. package/src/components/ai-provider/provider-form.tsx +7 -7
  14. package/src/components/ai-provider/provider-table.tsx +6 -6
  15. package/src/components/auth/admin-login-form.tsx +8 -8
  16. package/src/components/auth/icon-input.tsx +2 -2
  17. package/src/components/auth/password-input.tsx +2 -2
  18. package/src/components/component/component-form-dialog.tsx +8 -8
  19. package/src/components/component/component-import-dialog.tsx +6 -6
  20. package/src/components/component/component-table.tsx +3 -3
  21. package/{allblue-ui/src → src}/components/confirm-dialog.tsx +2 -2
  22. package/src/components/dependency/changelog-dialog.tsx +2 -2
  23. package/src/components/dependency/columns.tsx +3 -3
  24. package/src/components/dependency/dependency-table.tsx +7 -7
  25. package/src/components/dependency/edit-dialog.tsx +8 -8
  26. package/src/components/invitations/invitations-page.tsx +13 -13
  27. package/src/components/{knowledge-public → knowledge/public}/bookmark-form-dialog.tsx +10 -10
  28. package/src/components/{knowledge-public → knowledge/public}/compliance-form-dialog.tsx +10 -10
  29. package/src/components/{knowledge-public → knowledge/public}/legal-form-dialog.tsx +11 -11
  30. package/src/components/layout/sidebar-02/app-sidebar.tsx +1 -1
  31. package/src/components/layout/sidebar-02/index.tsx +1 -1
  32. package/src/components/layout/sidebar-02/nav-main.tsx +2 -2
  33. package/src/components/layout/sidebar-02/nav-notifications.tsx +3 -3
  34. package/src/components/market/columns.tsx +4 -4
  35. package/src/components/market/market-app-form.tsx +6 -6
  36. package/src/components/market/market-app-list.tsx +4 -4
  37. package/src/components/monitoring/error-list.tsx +1 -1
  38. package/src/components/monitoring/metrics-stats.tsx +1 -1
  39. package/src/components/monitoring/request-log-table.tsx +1 -1
  40. package/src/components/oauth-providers/provider-page.tsx +9 -9
  41. package/src/components/permissions/assign-dialog.tsx +5 -5
  42. package/src/components/permissions/create-role-dialog.tsx +6 -6
  43. package/{allblue-ui/src → src/components}/ui/checkbox.tsx +4 -4
  44. package/{allblue-ui/src → src/components}/ui/sidebar.tsx +1 -1
  45. package/src/components/user/columns.tsx +5 -5
  46. package/src/components/user/settings-activity-log.tsx +7 -7
  47. package/src/components/user/settings-profile/avatar-uploader.tsx +2 -2
  48. package/src/components/user/settings-profile/social-links.tsx +2 -2
  49. package/src/components/user/settings-profile.tsx +6 -6
  50. package/src/components/user/user-create-dialog.tsx +6 -6
  51. package/src/components/user/user-detail/error-boundary.tsx +1 -1
  52. package/src/components/user/user-detail/user-detail-dialogs.tsx +6 -6
  53. package/src/components/user/user-filters.tsx +3 -3
  54. package/{allblue-ui/src → src}/components/user-avatar.tsx +7 -4
  55. package/src/lib/__tests__/avatar-shape.test.ts +44 -0
  56. package/src/lib/auth.config.ts +1 -1
  57. package/{allblue-ui/src/lib/avatar.ts → src/lib/avatar-shape.ts} +15 -21
  58. package/src/providers/index.tsx +1 -1
  59. package/src/routes/__root.tsx +1 -1
  60. package/src/routes/_nav/audit/route.lazy.tsx +1 -1
  61. package/src/routes/_nav/compliance/route.lazy.tsx +3 -3
  62. package/src/routes/_nav/components/route.lazy.tsx +4 -4
  63. package/src/routes/_nav/knowledge-public/bookmarks/route.lazy.tsx +16 -16
  64. package/src/routes/_nav/knowledge-public/bookmarks/route.tsx +1 -1
  65. package/src/routes/_nav/knowledge-public/compliance/route.lazy.tsx +14 -14
  66. package/src/routes/_nav/knowledge-public/compliance/route.tsx +1 -1
  67. package/src/routes/_nav/knowledge-public/legal/route.lazy.tsx +14 -14
  68. package/src/routes/_nav/knowledge-public/legal/route.tsx +1 -1
  69. package/src/routes/_nav/licenses/$licenseId/route.lazy.tsx +3 -3
  70. package/src/routes/_nav/licenses/new/route.lazy.tsx +5 -5
  71. package/src/routes/_nav/licenses/route.lazy.tsx +1 -1
  72. package/src/routes/_nav/monitoring/ai-usage/route.lazy.tsx +2 -2
  73. package/src/routes/_nav/monitoring/errors/route.lazy.tsx +1 -1
  74. package/src/routes/_nav/monitoring/health/route.lazy.tsx +3 -3
  75. package/src/routes/_nav/monitoring/logs/route.lazy.tsx +3 -3
  76. package/src/routes/_nav/monitoring/metrics/route.lazy.tsx +3 -3
  77. package/src/routes/_nav/monitoring/route.lazy.tsx +2 -2
  78. package/src/routes/_nav/monitoring/sentry/route.lazy.tsx +1 -1
  79. package/src/routes/_nav/permissions/route.lazy.tsx +4 -4
  80. package/src/routes/_nav/sso/route.lazy.tsx +2 -2
  81. package/src/routes/_nav/users/$userId/route.lazy.tsx +9 -9
  82. package/src/routes/_nav/users/-components/users-table.tsx +1 -1
  83. package/src/routes/_nav/users/route.lazy.tsx +1 -1
  84. package/src/routes/login/route.lazy.tsx +1 -1
  85. package/src/routes/setup/route.lazy.tsx +2 -2
  86. package/src/server/dependency/helpers.ts +0 -1
  87. package/src/server/{knowledge-public → knowledge/public}/github-sync.ts +12 -2
  88. package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/create.ts +1 -1
  89. package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/list.ts +2 -1
  90. package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/sync-all-github.ts +3 -2
  91. package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/update.ts +3 -2
  92. package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/create.ts +1 -1
  93. package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/list.ts +2 -1
  94. package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/update.ts +3 -2
  95. package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/create.ts +1 -1
  96. package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/list.ts +2 -1
  97. package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/update.ts +3 -2
  98. package/src/styles/globals.css +3 -3
  99. package/allblue-ui/package.json +0 -6
  100. package/allblue-ui/src/components/infinite-scroll-sentinel.tsx +0 -37
  101. package/allblue-ui/src/hooks/use-load-more.ts +0 -57
  102. package/allblue-ui/src/index.ts +0 -31
  103. package/allblue-ui/src/lib/utils.ts +0 -1
  104. /package/{allblue-ui/src → src/components}/data-table/data-table-pagination.tsx +0 -0
  105. /package/{allblue-ui/src → src/components}/data-table/data-table.tsx +0 -0
  106. /package/{allblue-ui/src → src/components}/data-table/table-detail-layout.tsx +0 -0
  107. /package/{allblue-ui/src → src}/components/notion-avatar.tsx +0 -0
  108. /package/{allblue-ui/src → src/components}/ui/alert-dialog.tsx +0 -0
  109. /package/{allblue-ui/src → src/components}/ui/alert.tsx +0 -0
  110. /package/{allblue-ui/src → src/components}/ui/avatar.tsx +0 -0
  111. /package/{allblue-ui/src → src/components}/ui/badge.tsx +0 -0
  112. /package/{allblue-ui/src → src/components}/ui/button.tsx +0 -0
  113. /package/{allblue-ui/src → src/components}/ui/card.tsx +0 -0
  114. /package/{allblue-ui/src → src/components}/ui/collapsible.tsx +0 -0
  115. /package/{allblue-ui/src → src/components}/ui/dialog.tsx +0 -0
  116. /package/{allblue-ui/src → src/components}/ui/dropdown-menu.tsx +0 -0
  117. /package/{allblue-ui/src → src/components}/ui/field.tsx +0 -0
  118. /package/{allblue-ui/src → src/components}/ui/input-group.tsx +0 -0
  119. /package/{allblue-ui/src → src/components}/ui/input.tsx +0 -0
  120. /package/{allblue-ui/src → src/components}/ui/label.tsx +0 -0
  121. /package/{allblue-ui/src → src/components}/ui/pagination.tsx +0 -0
  122. /package/{allblue-ui/src → src/components}/ui/select.tsx +0 -0
  123. /package/{allblue-ui/src → src/components}/ui/separator.tsx +0 -0
  124. /package/{allblue-ui/src → src/components}/ui/sheet.tsx +0 -0
  125. /package/{allblue-ui/src → src/components}/ui/skeleton.tsx +0 -0
  126. /package/{allblue-ui/src → src/components}/ui/switch.tsx +0 -0
  127. /package/{allblue-ui/src → src/components}/ui/table.tsx +0 -0
  128. /package/{allblue-ui/src → src/components}/ui/textarea.tsx +0 -0
  129. /package/{allblue-ui/src → src/components}/ui/toast.tsx +0 -0
  130. /package/{allblue-ui/src → src/components}/ui/tooltip.tsx +0 -0
  131. /package/{allblue-ui/src → src}/hooks/use-mobile.ts +0 -0
  132. /package/{allblue-ui/src → src}/lib/datetime.ts +0 -0
  133. /package/{allblue-ui/src → src}/lib/sanitize.ts +0 -0
  134. /package/src/server/{knowledge-public → knowledge/public}/canonical-id.ts +0 -0
  135. /package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/delete.ts +0 -0
  136. /package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/detail.ts +0 -0
  137. /package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/delete.ts +0 -0
  138. /package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/detail.ts +0 -0
  139. /package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/delete.ts +0 -0
  140. /package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/detail.ts +0 -0
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@allbluecn/admin-app",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "private": false,
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@allbluecn/database": "0.9.2",
9
- "@allbluecn/kernel": "0.9.1",
8
+ "@allbluecn/database": "0.9.3",
9
+ "@allbluecn/kernel": "0.10.0",
10
10
  "@auth/core": "^0.41.2",
11
11
  "@base-ui/react": "^1.8.0",
12
12
  "@fontsource-variable/inter": "^5.3.0",
@@ -21,21 +21,23 @@
21
21
  "@radix-ui/react-tooltip": "^1.2.8",
22
22
  "@sentry/tanstackstart-react": "^10.67.0",
23
23
  "@tabler/icons-react": "^3.44.0",
24
- "@tanstack/charts": "^0.16.0",
25
- "@tanstack/react-form": "2.0.0-alpha.2",
24
+ "@tanstack/charts": "^1.1.0",
25
+ "@tanstack/react-form": "2.0.0-alpha.3",
26
26
  "@tanstack/react-pacer": "^0.24.1",
27
- "@tanstack/react-query": "^5.104.1",
28
- "@tanstack/react-router": "1.170.41",
27
+ "@tanstack/react-query": "^5.104.5",
28
+ "@tanstack/react-router": "1.170.46",
29
29
  "@tanstack/react-router-ssr-query": "^1.167.3",
30
- "@tanstack/react-start": "1.168.60",
31
- "@tanstack/react-table": "^9.2.6",
32
- "@tanstack/react-virtual": "^3.14.13",
30
+ "@tanstack/react-start": "1.169.4",
31
+ "@tanstack/react-table": "^9.3.1",
32
+ "@tanstack/react-virtual": "^3.14.22",
33
33
  "@tanstack/store": "^0.11.2",
34
34
  "bcryptjs": "^3.0.3",
35
35
  "class-variance-authority": "^0.7.1",
36
36
  "clsx": "^2.1.1",
37
37
  "cn": "^0.3.0",
38
38
  "date-fns": "^4.4.0",
39
+ "date-fns-tz": "^3.2.0",
40
+ "isomorphic-dompurify": "^3.22.0",
39
41
  "lucide-react": "^1.47.0",
40
42
  "motion": "^13.4.0",
41
43
  "next-themes": "^0.4.6",
@@ -55,7 +57,7 @@
55
57
  "@inlang/paraglide-js": "^2.25.0",
56
58
  "@inlang/plugin-message-format": "^4.4.4",
57
59
  "@tailwindcss/vite": "^4.3.3",
58
- "@tanstack/react-query-devtools": "5.104.1",
60
+ "@tanstack/react-query-devtools": "5.104.5",
59
61
  "@tanstack/react-router-devtools": "1.167.2",
60
62
  "@testing-library/jest-dom": "7.0.1",
61
63
  "@testing-library/react": "^16.3.2",
@@ -75,13 +77,11 @@
75
77
  "typescript-eslint": "^8.70.1",
76
78
  "vite": "^8.3.3",
77
79
  "vitest": "5.0.0",
78
- "wrangler": "^4.99.0",
79
- "@allbluecn/ui": "0.1.0"
80
+ "wrangler": "^4.99.0"
80
81
  },
81
82
  "files": [
82
83
  "src",
83
- "public",
84
- "allblue-ui"
84
+ "public"
85
85
  ],
86
86
  "publishConfig": {
87
87
  "access": "public"
@@ -0,0 +1,39 @@
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
+ import { describe, it, expect } from 'vitest'
19
+ import { render } from '@testing-library/react'
20
+ import { UserAvatar } from '../user-avatar'
21
+
22
+ // 与 web 端 shared-kit/avatars/__tests__/user-avatar.test.tsx 同构:
23
+ // bgShape 是 DB 字典直通的 string|null,渲染前经 toAvatarShape 归一
24
+ describe('UserAvatar bgShape 归一', () => {
25
+ it('合法 rounded 渲染 rounded-lg', () => {
26
+ const { container } = render(<UserAvatar name="张三" bgShape="rounded" />)
27
+ expect(container.firstElementChild?.className).toContain('rounded-lg')
28
+ })
29
+
30
+ it('不传 bgShape fallback 走 square(rounded-none)', () => {
31
+ const { container } = render(<UserAvatar name="张三" />)
32
+ expect(container.firstElementChild?.className).toContain('rounded-none')
33
+ })
34
+
35
+ it('非法 bgShape 不崩溃,静默归 square(rounded-none)', () => {
36
+ const { container } = render(<UserAvatar name="张三" bgShape="weird-shape" />)
37
+ expect(container.firstElementChild?.className).toContain('rounded-none')
38
+ })
39
+ })
@@ -17,18 +17,18 @@
17
17
 
18
18
  import { LogOut } from "lucide-react";
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { Badge } from "@allbluecn/ui/badge";
20
+ import { Badge } from "@/components/ui/badge";
21
21
  import {
22
22
  SidebarMenu,
23
23
  SidebarMenuAction,
24
24
  SidebarMenuButton,
25
25
  SidebarMenuItem,
26
- } from "@allbluecn/ui/sidebar";
27
- import { Tooltip, TooltipContent, TooltipTrigger } from "@allbluecn/ui/tooltip";
26
+ } from "@/components/ui/sidebar";
27
+ import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
28
28
  import { useRouter, useMatches } from "@tanstack/react-router";
29
29
  import { signOut, useSession } from "@/lib/auth-client";
30
- import { UserAvatar } from "@allbluecn/ui/components/user-avatar";
31
- import type { AvatarConfig, ShapeType } from "@allbluecn/kernel";
30
+ import { UserAvatar } from "@/components/user-avatar";
31
+ import type { AvatarConfig } from "@allbluecn/kernel";
32
32
 
33
33
  const ROLE_LABELS: Record<string, () => string> = {
34
34
  ADMIN: m.common_common_role_ADMIN,
@@ -53,7 +53,7 @@ export function AdminUserMenu() {
53
53
  const userRole = (user as { role?: string })?.role || "ADMIN";
54
54
  const roleLabel = (ROLE_LABELS[userRole] ?? (() => m.common_login_admin()))();
55
55
  const avatarConfig = (user as { avatarConfig?: AvatarConfig })?.avatarConfig;
56
- const bgShape = (user as { bgShape?: string })?.bgShape as ShapeType | undefined;
56
+ const bgShape = (user as { bgShape?: string })?.bgShape;
57
57
  const bgColor = (user as { bgColor?: string })?.bgColor;
58
58
 
59
59
  const handleExitAdmin = async () => {
@@ -4,7 +4,7 @@ import { Route } from '@/routes/_nav/developer-logs/route'
4
4
  import type { DeveloperLogEntry } from '@allbluecn/kernel'
5
5
  import { useQueryClient } from '@tanstack/react-query'
6
6
  import { useServerFn } from '@tanstack/react-start'
7
- import { toast } from '@allbluecn/ui/toast'
7
+ import { toast } from '@/components/ui/toast'
8
8
  import {
9
9
  Plus,
10
10
  Pencil,
@@ -19,12 +19,12 @@ import {
19
19
  DialogHeader,
20
20
  DialogTitle,
21
21
  DialogFooter,
22
- } from '@allbluecn/ui/dialog'
23
- import { ConfirmDialog } from '@allbluecn/ui/components/confirm-dialog'
24
- import { Input } from '@allbluecn/ui/input'
25
- import { Textarea } from '@allbluecn/ui/textarea'
26
- import { Label } from '@allbluecn/ui/label'
27
- import { Button } from '@allbluecn/ui/button'
22
+ } from '@/components/ui/dialog'
23
+ import { ConfirmDialog } from '@/components/confirm-dialog'
24
+ import { Input } from '@/components/ui/input'
25
+ import { Textarea } from '@/components/ui/textarea'
26
+ import { Label } from '@/components/ui/label'
27
+ import { Button } from '@/components/ui/button'
28
28
  import { createDeveloperLogFn, updateDeveloperLogFn, deleteDeveloperLogFn } from '@/server/serverFns/developer-logs'
29
29
  import { autoGenerateLogsFn, backfillLogDetailsFn } from '@/server/serverFns/developer-log-auto-generate'
30
30
 
@@ -26,21 +26,21 @@ import {
26
26
  } from "lucide-react"
27
27
 
28
28
  import { m } from "@/paraglide/messages.js"
29
- import { formatTimestamp } from "@allbluecn/ui/lib/datetime"
30
- import { toast } from "@allbluecn/ui/toast"
31
- import { Alert, AlertDescription, AlertTitle } from "@allbluecn/ui/alert"
32
- import { Badge } from "@allbluecn/ui/badge"
33
- import { Button } from "@allbluecn/ui/button"
34
- import { Card, CardContent } from "@allbluecn/ui/card"
35
- import { ConfirmDialog } from "@allbluecn/ui/components/confirm-dialog"
29
+ import { formatTimestamp } from "@/lib/datetime"
30
+ import { toast } from "@/components/ui/toast"
31
+ import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
32
+ import { Badge } from "@/components/ui/badge"
33
+ import { Button } from "@/components/ui/button"
34
+ import { Card, CardContent } from "@/components/ui/card"
35
+ import { ConfirmDialog } from "@/components/confirm-dialog"
36
36
  import {
37
37
  Select,
38
38
  SelectContent,
39
39
  SelectItem,
40
40
  SelectTrigger,
41
41
  SelectValue,
42
- } from "@allbluecn/ui/select"
43
- import { DataTable, type AdminColumnDef } from "@allbluecn/ui/data-table"
42
+ } from "@/components/ui/select"
43
+ import { DataTable, type AdminColumnDef } from "@/components/data-table/data-table"
44
44
  import { listMemoryFactsFn } from "@/server/serverFns/ai-memory/list"
45
45
  import { deleteMemoryFactFn } from "@/server/serverFns/ai-memory/delete"
46
46
  import { clearMemoryFactsFn } from "@/server/serverFns/ai-memory/clear"
@@ -20,7 +20,7 @@ import { useCallback, useEffect, useRef, useState } from "react"
20
20
  import { AlertTriangle, Loader2 } from "lucide-react"
21
21
 
22
22
  import { m } from "@/paraglide/messages.js"
23
- import { Input } from "@allbluecn/ui/input"
23
+ import { Input } from "@/components/ui/input"
24
24
  import {
25
25
  PROMPT_PREVIEW_DEBOUNCE_MS,
26
26
  useDebouncedCallback,
@@ -25,18 +25,18 @@ import { Link } from "@tanstack/react-router"
25
25
  import { ArrowLeft, Loader2, Save, ShieldCheck } from "lucide-react"
26
26
 
27
27
  import { m } from "@/paraglide/messages.js"
28
- import { toast } from "@allbluecn/ui/toast"
29
- import { Badge } from "@allbluecn/ui/badge"
30
- import { Button } from "@allbluecn/ui/button"
31
- import { Field, FieldContent, FieldLabel } from "@allbluecn/ui/field"
32
- import { Input } from "@allbluecn/ui/input"
33
- import { Switch } from "@allbluecn/ui/switch"
34
- import { Textarea } from "@allbluecn/ui/textarea"
28
+ import { toast } from "@/components/ui/toast"
29
+ import { Badge } from "@/components/ui/badge"
30
+ import { Button } from "@/components/ui/button"
31
+ import { Field, FieldContent, FieldLabel } from "@/components/ui/field"
32
+ import { Input } from "@/components/ui/input"
33
+ import { Switch } from "@/components/ui/switch"
34
+ import { Textarea } from "@/components/ui/textarea"
35
35
  import {
36
36
  Tooltip,
37
37
  TooltipContent,
38
38
  TooltipTrigger,
39
- } from "@allbluecn/ui/tooltip"
39
+ } from "@/components/ui/tooltip"
40
40
  import { activatePromptTemplateFn } from "@/server/serverFns/ai-prompts/activate"
41
41
  import { getPromptTemplateFn } from "@/server/serverFns/ai-prompts/get"
42
42
  import { rollbackPromptTemplateFn } from "@/server/serverFns/ai-prompts/rollback"
@@ -19,14 +19,14 @@
19
19
  import { useMutation } from "@tanstack/react-query"
20
20
  import { Link, useRouter } from "@tanstack/react-router"
21
21
  import { Edit, ShieldCheck } from "lucide-react"
22
- import { formatTimestamp } from "@allbluecn/ui/lib/datetime"
22
+ import { formatTimestamp } from "@/lib/datetime"
23
23
 
24
24
  import { m } from "@/paraglide/messages.js"
25
- import { toast } from "@allbluecn/ui/toast"
26
- import { Badge } from "@allbluecn/ui/badge"
27
- import { Button } from "@allbluecn/ui/button"
28
- import { Switch } from "@allbluecn/ui/switch"
29
- import { DataTable, type AdminColumnDef } from "@allbluecn/ui/data-table"
25
+ import { toast } from "@/components/ui/toast"
26
+ import { Badge } from "@/components/ui/badge"
27
+ import { Button } from "@/components/ui/button"
28
+ import { Switch } from "@/components/ui/switch"
29
+ import { DataTable, type AdminColumnDef } from "@/components/data-table/data-table"
30
30
  import { activatePromptTemplateFn } from "@/server/serverFns/ai-prompts/activate"
31
31
  import type { PromptTemplateRow } from "./prompt-utils"
32
32
 
@@ -19,9 +19,9 @@
19
19
  import { ArrowDown, ArrowUp, Plus, Trash2 } from "lucide-react"
20
20
 
21
21
  import { m } from "@/paraglide/messages.js"
22
- import { Button } from "@allbluecn/ui/button"
23
- import { Input } from "@allbluecn/ui/input"
24
- import { Textarea } from "@allbluecn/ui/textarea"
22
+ import { Button } from "@/components/ui/button"
23
+ import { Input } from "@/components/ui/input"
24
+ import { Textarea } from "@/components/ui/textarea"
25
25
  import {
26
26
  appendSection,
27
27
  moveSection,
@@ -19,8 +19,8 @@
19
19
  import { AlertTriangle, Plus, Trash2 } from "lucide-react"
20
20
 
21
21
  import { m } from "@/paraglide/messages.js"
22
- import { Button } from "@allbluecn/ui/button"
23
- import { Input } from "@allbluecn/ui/input"
22
+ import { Button } from "@/components/ui/button"
23
+ import { Input } from "@/components/ui/input"
24
24
  import {
25
25
  addVariable,
26
26
  removeVariable,
@@ -18,17 +18,17 @@
18
18
  // apps/admin/src/components/ai-prompts/version-history.tsx
19
19
  import { useState } from "react"
20
20
  import { History, Loader2, RotateCcw } from "lucide-react"
21
- import { formatTimestamp } from "@allbluecn/ui/lib/datetime"
21
+ import { formatTimestamp } from "@/lib/datetime"
22
22
 
23
23
  import { m } from "@/paraglide/messages.js"
24
- import { Badge } from "@allbluecn/ui/badge"
25
- import { Button } from "@allbluecn/ui/button"
24
+ import { Badge } from "@/components/ui/badge"
25
+ import { Button } from "@/components/ui/button"
26
26
  import {
27
27
  Collapsible,
28
28
  CollapsibleContent,
29
29
  CollapsibleTrigger,
30
- } from "@allbluecn/ui/collapsible"
31
- import { ConfirmDialog } from "@allbluecn/ui/components/confirm-dialog"
30
+ } from "@/components/ui/collapsible"
31
+ import { ConfirmDialog } from "@/components/confirm-dialog"
32
32
  import type { PromptVersionSummary } from "./prompt-utils"
33
33
 
34
34
  interface VersionHistoryProps {
@@ -17,8 +17,8 @@
17
17
 
18
18
  // apps/admin/src/components/ai-provider/model-list-editor.tsx
19
19
  import { Plus, Trash2 } from "lucide-react"
20
- import { Button } from "@allbluecn/ui/button"
21
- import { Input } from "@allbluecn/ui/input"
20
+ import { Button } from "@/components/ui/button"
21
+ import { Input } from "@/components/ui/input"
22
22
  import { cn } from "@/lib/utils"
23
23
  import {
24
24
  MODEL_CAPABILITY_OPTIONS,
@@ -21,7 +21,7 @@ import { m } from '@/paraglide/messages.js'
21
21
  import { useMutation } from "@tanstack/react-query"
22
22
  import { Link, useNavigate, useRouter } from "@tanstack/react-router"
23
23
  import { ArrowLeft, Loader2, Save } from "lucide-react"
24
- import { toast } from '@allbluecn/ui/toast'
24
+ import { toast } from '@/components/ui/toast'
25
25
  import {
26
26
  ADAPTER_KINDS,
27
27
  PROVIDER_CATEGORIES,
@@ -29,17 +29,17 @@ import {
29
29
  type AdapterKind,
30
30
  type ProviderCategory,
31
31
  } from "@allbluecn/kernel"
32
- import { Button } from "@allbluecn/ui/button"
33
- import { Input } from "@allbluecn/ui/input"
34
- import { Textarea } from "@allbluecn/ui/textarea"
35
- import { Switch } from "@allbluecn/ui/switch"
32
+ import { Button } from "@/components/ui/button"
33
+ import { Input } from "@/components/ui/input"
34
+ import { Textarea } from "@/components/ui/textarea"
35
+ import { Switch } from "@/components/ui/switch"
36
36
  import {
37
37
  Select,
38
38
  SelectContent,
39
39
  SelectItem,
40
40
  SelectTrigger,
41
41
  SelectValue,
42
- } from "@allbluecn/ui/select"
42
+ } from "@/components/ui/select"
43
43
  import {
44
44
  Field,
45
45
  FieldContent,
@@ -49,7 +49,7 @@ import {
49
49
  FieldSet,
50
50
  FieldLegend,
51
51
  FieldSeparator,
52
- } from "@allbluecn/ui/field"
52
+ } from "@/components/ui/field"
53
53
  import { createAiProviderAdminFn } from "@/server/serverFns/ai-provider/create"
54
54
  import { updateAiProviderAdminFn } from "@/server/serverFns/ai-provider/update"
55
55
  import { ModelListEditor } from "./model-list-editor"
@@ -21,13 +21,13 @@ import { m } from '@/paraglide/messages.js'
21
21
  import { useMutation } from "@tanstack/react-query"
22
22
  import { Link, useRouter } from "@tanstack/react-router"
23
23
  import { Edit, Plus, RefreshCw, Trash2, Users } from "lucide-react"
24
- import { toast } from '@allbluecn/ui/toast'
24
+ import { toast } from '@/components/ui/toast'
25
25
  import { ADAPTER_KINDS, PROVIDER_BADGE_STYLES, type AiProviderRow } from "@allbluecn/kernel"
26
- import { Button } from "@allbluecn/ui/button"
27
- import { Switch } from "@allbluecn/ui/switch"
28
- import { Badge } from "@allbluecn/ui/badge"
29
- import { ConfirmDialog } from "@allbluecn/ui/components/confirm-dialog"
30
- import { DataTable, type AdminColumnDef } from "@allbluecn/ui/data-table"
26
+ import { Button } from "@/components/ui/button"
27
+ import { Switch } from "@/components/ui/switch"
28
+ import { Badge } from "@/components/ui/badge"
29
+ import { ConfirmDialog } from "@/components/confirm-dialog"
30
+ import { DataTable, type AdminColumnDef } from "@/components/data-table/data-table"
31
31
  import { ProviderIcon } from "./provider-icon"
32
32
  import { updateAiProviderAdminFn } from "@/server/serverFns/ai-provider/update"
33
33
  import { deleteAiProviderAdminFn } from "@/server/serverFns/ai-provider/delete"
@@ -19,13 +19,13 @@ import { LogOut, Mail, Users, BarChart3, Shield, Settings, ArrowRight, ArrowLeft
19
19
  import { m } from '@/paraglide/messages.js'
20
20
  import { useState } from "react";
21
21
  import { signIn, signOut } from "@/lib/auth-client";
22
- import { Button } from "@allbluecn/ui/button";
23
- import { Checkbox } from "@allbluecn/ui/checkbox";
24
- import { Field, FieldLabel } from "@allbluecn/ui/field";
25
- import { Card, CardContent } from "@allbluecn/ui/card";
26
- import { toast } from '@allbluecn/ui/toast';
27
- import { UserAvatar } from "@allbluecn/ui/components/user-avatar";
28
- import type { AvatarConfig, ShapeType } from "@allbluecn/kernel";
22
+ import { Button } from "@/components/ui/button";
23
+ import { Checkbox } from "@/components/ui/checkbox";
24
+ import { Field, FieldLabel } from "@/components/ui/field";
25
+ import { Card, CardContent } from "@/components/ui/card";
26
+ import { toast } from '@/components/ui/toast';
27
+ import { UserAvatar } from "@/components/user-avatar";
28
+ import type { AvatarConfig } from "@allbluecn/kernel";
29
29
  import { AuthLayout, AuthLayoutLeft, AuthLayoutRight } from "@/components/auth/auth-layout";
30
30
  import { AuthHeader } from "@/components/auth/auth-header";
31
31
  import { AuthBrandPanel } from "@/components/auth/auth-brand-panel";
@@ -126,7 +126,7 @@ export default function AdminLoginForm({ user, isAdmin }: AdminLoginFormProps) {
126
126
  <CardContent className="flex h-full items-center gap-3 px-3 py-3">
127
127
  <UserAvatar
128
128
  avatarConfig={user?.avatarConfig}
129
- bgShape={user?.bgShape as ShapeType | undefined}
129
+ bgShape={user?.bgShape}
130
130
  bgColor={user?.bgColor}
131
131
  name={user?.name || user?.email || ""}
132
132
  size="lg"
@@ -16,8 +16,8 @@
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
 
19
- import { Input } from '@allbluecn/ui/input'
20
- import { Label } from '@allbluecn/ui/label'
19
+ import { Input } from '@/components/ui/input'
20
+ import { Label } from '@/components/ui/label'
21
21
  import type { LucideIcon } from 'lucide-react'
22
22
 
23
23
  interface IconInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
@@ -17,8 +17,8 @@
17
17
 
18
18
  import { useState } from 'react'
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { Input } from '@allbluecn/ui/input'
21
- import { Label } from '@allbluecn/ui/label'
20
+ import { Input } from '@/components/ui/input'
21
+ import { Label } from '@/components/ui/label'
22
22
  import { Lock } from 'lucide-react'
23
23
 
24
24
  interface PasswordInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
@@ -17,28 +17,28 @@
17
17
 
18
18
  import { useState, useEffect } from 'react'
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { Button } from '@allbluecn/ui/button'
21
- import { Input } from '@allbluecn/ui/input'
22
- import { Label } from '@allbluecn/ui/label'
23
- import { Textarea } from '@allbluecn/ui/textarea'
24
- import { Switch } from '@allbluecn/ui/switch'
20
+ import { Button } from '@/components/ui/button'
21
+ import { Input } from '@/components/ui/input'
22
+ import { Label } from '@/components/ui/label'
23
+ import { Textarea } from '@/components/ui/textarea'
24
+ import { Switch } from '@/components/ui/switch'
25
25
  import {
26
26
  Select,
27
27
  SelectContent,
28
28
  SelectItem,
29
29
  SelectTrigger,
30
30
  SelectValue,
31
- } from '@allbluecn/ui/select'
31
+ } from '@/components/ui/select'
32
32
  import {
33
33
  Dialog,
34
34
  DialogContent,
35
35
  DialogFooter,
36
36
  DialogHeader,
37
37
  DialogTitle,
38
- } from '@allbluecn/ui/dialog'
38
+ } from '@/components/ui/dialog'
39
39
  import { ComponentPreview } from './component-preview'
40
40
  import { createComponentFn, updateComponentFn } from '@/server/serverFns/components/mutations'
41
- import { toast } from '@allbluecn/ui/toast'
41
+ import { toast } from '@/components/ui/toast'
42
42
  import type { ComponentItem } from './component-table'
43
43
 
44
44
  const CATEGORY_KEYS = ['base', 'block', 'template'] as const
@@ -16,16 +16,16 @@
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
  import { useState } from 'react'
19
- import { Button } from '@allbluecn/ui/button'
20
- import { Input } from '@allbluecn/ui/input'
21
- import { Label } from '@allbluecn/ui/label'
19
+ import { Button } from '@/components/ui/button'
20
+ import { Input } from '@/components/ui/input'
21
+ import { Label } from '@/components/ui/label'
22
22
  import {
23
23
  Select,
24
24
  SelectContent,
25
25
  SelectItem,
26
26
  SelectTrigger,
27
27
  SelectValue,
28
- } from '@allbluecn/ui/select'
28
+ } from '@/components/ui/select'
29
29
  import {
30
30
  Dialog,
31
31
  DialogContent,
@@ -33,9 +33,9 @@ import {
33
33
  DialogFooter,
34
34
  DialogHeader,
35
35
  DialogTitle,
36
- } from '@allbluecn/ui/dialog'
36
+ } from '@/components/ui/dialog'
37
37
  import { importComponentFn } from '@/server/serverFns/components/import'
38
- import { toast } from '@allbluecn/ui/toast'
38
+ import { toast } from '@/components/ui/toast'
39
39
  import { Loader2, Sparkles } from 'lucide-react'
40
40
  import { cn } from '@/lib/utils'
41
41
 
@@ -17,8 +17,8 @@
17
17
 
18
18
  import { Edit, Trash2 } from 'lucide-react'
19
19
  import { m } from '@/paraglide/messages.js'
20
- import { Badge } from '@allbluecn/ui/badge'
21
- import { Button } from '@allbluecn/ui/button'
20
+ import { Badge } from '@/components/ui/badge'
21
+ import { Button } from '@/components/ui/button'
22
22
  import {
23
23
  Table,
24
24
  TableBody,
@@ -26,7 +26,7 @@ import {
26
26
  TableHead,
27
27
  TableHeader,
28
28
  TableRow,
29
- } from '@allbluecn/ui/table'
29
+ } from '@/components/ui/table'
30
30
  import { cn } from '@/lib/utils'
31
31
 
32
32
  export interface ComponentItem {
@@ -13,8 +13,8 @@ import {
13
13
  AlertDialogHeader,
14
14
  AlertDialogTitle,
15
15
  AlertDialogTrigger,
16
- } from "../ui/alert-dialog"
17
- import type { Button } from "../ui/button"
16
+ } from "./ui/alert-dialog"
17
+ import type { Button } from "./ui/button"
18
18
 
19
19
  export interface ConfirmDialogProps {
20
20
  /** 受控 open;不传则由 trigger 非受控驱动 */
@@ -21,14 +21,14 @@ import ReactMarkdown from "react-markdown"
21
21
  import remarkGfm from "remark-gfm"
22
22
  import { ExternalLink, FileText } from "lucide-react"
23
23
  import type { ThirdPartyDependencyRow } from "@allbluecn/kernel"
24
- import { Button } from "@allbluecn/ui/button"
24
+ import { Button } from "@/components/ui/button"
25
25
  import {
26
26
  Dialog,
27
27
  DialogContent,
28
28
  DialogHeader,
29
29
  DialogTitle,
30
30
  DialogTrigger,
31
- } from "@allbluecn/ui/dialog"
31
+ } from "@/components/ui/dialog"
32
32
 
33
33
  export function ChangelogDialog({ row }: { row: ThirdPartyDependencyRow }) {
34
34
  const [open, setOpen] = useState(false)
@@ -29,9 +29,9 @@ import {
29
29
  type ThirdPartyDependencyRow,
30
30
  type VersionStatus,
31
31
  } from "@allbluecn/kernel"
32
- import { Badge } from "@allbluecn/ui/badge"
33
- import { Button } from "@allbluecn/ui/button"
34
- import { Tooltip, TooltipContent, TooltipTrigger } from "@allbluecn/ui/tooltip"
32
+ import { Badge } from "@/components/ui/badge"
33
+ import { Button } from "@/components/ui/button"
34
+ import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
35
35
  import { cn } from "@/lib/utils"
36
36
  import { EditDependencyDialog } from "./edit-dialog"
37
37
  import { ChangelogDialog } from "./changelog-dialog"
@@ -22,7 +22,7 @@ import {
22
22
  useTable,
23
23
  type PaginationState,
24
24
  } from "@tanstack/react-table"
25
- import { toast } from '@allbluecn/ui/toast'
25
+ import { toast } from '@/components/ui/toast'
26
26
  import { RefreshCw, Search, TriangleAlert, Loader2 } from "lucide-react"
27
27
  import {
28
28
  DEPENDENCY_CATEGORIES,
@@ -31,10 +31,10 @@ import {
31
31
  type VersionStatus,
32
32
  } from "@allbluecn/kernel"
33
33
  import { syncAllDependenciesFn, syncDependencyFn } from "@/server/serverFns/dependency/sync"
34
- import { Badge } from "@allbluecn/ui/badge"
35
- import { Button } from "@allbluecn/ui/button"
36
- import { Input } from "@allbluecn/ui/input"
37
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@allbluecn/ui/select"
34
+ import { Badge } from "@/components/ui/badge"
35
+ import { Button } from "@/components/ui/button"
36
+ import { Input } from "@/components/ui/input"
37
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
38
38
  import {
39
39
  Table,
40
40
  TableBody,
@@ -42,7 +42,7 @@ import {
42
42
  TableHead,
43
43
  TableHeader,
44
44
  TableRow,
45
- } from "@allbluecn/ui/table"
45
+ } from "@/components/ui/table"
46
46
  import {
47
47
  Pagination,
48
48
  PaginationContent,
@@ -51,7 +51,7 @@ import {
51
51
  PaginationLink,
52
52
  PaginationNext,
53
53
  PaginationPrevious,
54
- } from "@allbluecn/ui/pagination"
54
+ } from "@/components/ui/pagination"
55
55
  import { cn } from "@/lib/utils"
56
56
  import { dependencyTableFeatures, getDependencyColumns } from "./columns"
57
57