@allbluecn/web-app 0.27.35 → 0.27.36
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.
- package/package.json +1 -1
- package/src/components/command/command-palette.tsx +1 -1
- package/src/components/design/editor/dashboard/create-design-dialog-lazy.tsx +26 -0
- package/src/components/design/editor/dashboard/create-design-dialog.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-main.tsx +1 -1
- package/src/lib/changelog/sdk-versions.ts +1 -1
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
CommandMenuItem,
|
|
31
31
|
useCommandMenu,
|
|
32
32
|
} from "@/components/hextaui/command-menu"
|
|
33
|
-
import { CreateDesignDialog } from "@/components/design/editor/dashboard/create-design-dialog"
|
|
33
|
+
import { CreateDesignDialogLazy as CreateDesignDialog } from "@/components/design/editor/dashboard/create-design-dialog-lazy"
|
|
34
34
|
import { useCommands, type ResolvedCommand } from "@/hooks/use-commands"
|
|
35
35
|
import {
|
|
36
36
|
commandPaletteStore,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// CreateDesignDialog 的惰性包装。静态 import 会把 design editor chunk(及其传递
|
|
6
|
+
// 依赖 pglite/Emscripten loader,含 require("node:url").fileURLToPath preamble)拖到
|
|
7
|
+
// 每个 _nav 页(agents 设置页曾因此 fileURLToPath 崩溃 + React#418)。改为 lazy 后,
|
|
8
|
+
// design chunk 只在 dialog 打开时加载。
|
|
9
|
+
|
|
10
|
+
import { lazy, Suspense } from "react"
|
|
11
|
+
import type { CreateDesignDialogProps } from "./create-design-dialog"
|
|
12
|
+
|
|
13
|
+
const CreateDesignDialogImpl = lazy(() =>
|
|
14
|
+
import("./create-design-dialog").then((m) => ({
|
|
15
|
+
default: m.CreateDesignDialog,
|
|
16
|
+
})),
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
/** 惰性 CreateDesignDialog:design chunk 只在 dialog 打开时加载。 */
|
|
20
|
+
export function CreateDesignDialogLazy(props: CreateDesignDialogProps) {
|
|
21
|
+
return (
|
|
22
|
+
<Suspense fallback={null}>
|
|
23
|
+
<CreateDesignDialogImpl {...props} />
|
|
24
|
+
</Suspense>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
@@ -33,7 +33,7 @@ import { createDesignSchema } from "./schemas/create-design";
|
|
|
33
33
|
import { m } from "@/paraglide/messages.js";
|
|
34
34
|
import { emitEvent, AppEvents } from "@/lib/events";
|
|
35
35
|
|
|
36
|
-
interface CreateDesignDialogProps {
|
|
36
|
+
export interface CreateDesignDialogProps {
|
|
37
37
|
open: boolean;
|
|
38
38
|
onOpenChange: (open: boolean) => void;
|
|
39
39
|
onSuccess?: () => void;
|
|
@@ -90,7 +90,7 @@ function getIconComponent(iconName: string | undefined) {
|
|
|
90
90
|
const IconComponent = ICON_MAP[iconName];
|
|
91
91
|
return IconComponent ? <IconComponent className="size-4 mr-2" /> : null;
|
|
92
92
|
}
|
|
93
|
-
import { CreateDesignDialog } from "@/components/design/editor/dashboard/create-design-dialog";
|
|
93
|
+
import { CreateDesignDialogLazy as CreateDesignDialog } from "@/components/design/editor/dashboard/create-design-dialog-lazy";
|
|
94
94
|
import { m } from "@/paraglide/messages.js";
|
|
95
95
|
|
|
96
96
|
// 激活态交由 Link 自身判定(activeProps data-active 替代 SidebarMenuButton isActive,
|
|
@@ -112,7 +112,7 @@ export const SDK_GROUPS: SdkGroup[] = [
|
|
|
112
112
|
"items": [
|
|
113
113
|
{
|
|
114
114
|
"name": "@allbluecn/web-app",
|
|
115
|
-
"version": "v0.27.
|
|
115
|
+
"version": "v0.27.36",
|
|
116
116
|
"lastUpdate": "Nov 10, 2026",
|
|
117
117
|
"source": "apps/web/package.json",
|
|
118
118
|
"docsUrl": "https://github.com/allbluecn/allblue"
|