@allbluecn/web-app 0.3.2 → 0.3.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allbluecn/web-app",
3
- "version": "0.3.2",
3
+ "version": "0.3.8",
4
4
  "license": "AGPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "files": [
@@ -123,14 +123,14 @@
123
123
  "three": "^0.180.0",
124
124
  "tw-animate-css": "^1.4.0",
125
125
  "zod": "^4.4.3",
126
+ "@allbluecn/ai-gateway": "0.3.8",
127
+ "@allbluecn/database": "0.3.8",
126
128
  "@allbluecn/prototype": "0.1.1",
127
- "@allbluecn/ai-gateway": "0.3.0",
128
- "@allbluecn/kernel": "0.2.1",
129
- "@allbluecn/database": "0.3.0",
130
- "@allbluecn/shared": "0.3.0",
131
- "@allbluecn/ui": "0.3.0",
132
- "@allbluecn/tiptap": "0.3.0",
133
- "@allbluecn/plugins-core": "0.3.0"
129
+ "@allbluecn/shared": "0.3.8",
130
+ "@allbluecn/kernel": "0.2.2",
131
+ "@allbluecn/ui": "0.3.8",
132
+ "@allbluecn/tiptap": "0.3.8",
133
+ "@allbluecn/plugins-core": "0.3.8"
134
134
  },
135
135
  "devDependencies": {
136
136
  "@babel/parser": "^8.0.4",
@@ -22,7 +22,7 @@ import { useDebouncedCallback, EDITOR_AUTO_SAVE_MS } from "@/lib/pacer"
22
22
  import { updateDocumentFn } from "@/server/serverFns/knowledge"
23
23
  import { useEditorWidth, useMindmapWidthStyles } from "@/components/knowledge/editor/editor-width-context"
24
24
  import { DocHeader } from "@/components/knowledge/editor/doc-header"
25
- import { parseMindmapContent } from "@allbluecn/tiptap/mindmap/lib/default-mindmap-data"
25
+ import { parseMindmapContent, createDefaultMindmapData } from "@allbluecn/tiptap/mindmap/lib/default-mindmap-data"
26
26
  import type { MindElixirData } from "mind-elixir"
27
27
 
28
28
  const MindMap = lazy(() =>
@@ -70,7 +70,7 @@ export function MindmapDocEditor({ document, kbName }: MindmapDocEditorProps) {
70
70
  docId.current = document.id
71
71
 
72
72
  const parsed = useMemo(() => parseMindmapContent(document.content), [document.content])
73
- const [mindmapData, setMindmapData] = useState<MindElixirData>(parsed)
73
+ const [mindmapData, setMindmapData] = useState<MindElixirData>(parsed ?? createDefaultMindmapData())
74
74
 
75
75
  const doSave = useCallback(async (content: MindElixirData) => {
76
76
  setSaving(true)
@@ -127,7 +127,7 @@ export function MindmapDocEditor({ document, kbName }: MindmapDocEditorProps) {
127
127
  setDisplayTitle(document.title)
128
128
  setDisplayTags((Array.isArray(document.tags) ? document.tags : []) as string[])
129
129
  setLastSavedAt(document.updatedAt ? new Date(document.updatedAt) : null)
130
- setMindmapData(parsed)
130
+ setMindmapData(parsed ?? createDefaultMindmapData())
131
131
  }, [document.title, document.tags, document.updatedAt, parsed])
132
132
 
133
133
  useEffect(() => {
@@ -15,4 +15,4 @@
15
15
  // You should have received a copy of the GNU Affero General Public License
16
16
  // along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
- export { ComponentPreview } from "@allblue/prototype";
18
+ export { ComponentPreview } from "@allbluecn/prototype";
@@ -1,13 +0,0 @@
1
- {
2
- "routeFiles": [
3
- "src/routes/_nav/tags/route.tsx",
4
- "src/routes/_nav/tags/index.tsx",
5
- "src/routes/_nav/tags/$id/route.tsx",
6
- "src/routes/_nav/tags/settings/route.tsx",
7
- "src/routes/_nav/inspiration/route.tsx",
8
- "src/routes/_nav/prd/route.tsx",
9
- "src/routes/_nav/prd/index.tsx",
10
- "src/routes/_nav/prd/$id/route.tsx",
11
- "src/routes/share/prd/$prdId/route.tsx"
12
- ]
13
- }
@@ -1,20 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import type { ProFeature } from '@allbluecn/kernel'
3
-
4
- export const activePluginIds = ['@allbluecn/tags', '@allbluecn/inspiration', '@allbluecn/prd'] as const
5
- export type ActivePluginId = (typeof activePluginIds)[number]
6
-
7
- export const implementedModules: Record<ProFeature, boolean> = {
8
- billing: false,
9
- hostedAi: false,
10
- sso: false,
11
- audit: false,
12
- permissions: false,
13
- license: false,
14
- versionHistory: false,
15
- automation: false,
16
- templates: false,
17
- analytics: false,
18
- globalSearch: false,
19
- compliance: false,
20
- }
@@ -1,20 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- // profile: oss (validated: 3 plugins)
3
- // 拓扑序:@allbluecn/tags -> @allbluecn/inspiration -> @allbluecn/prd
4
- import tags from '@allbluecn/plugins-core/tags'
5
- import inspiration from '@allbluecn/plugins-core/inspiration'
6
- import prd from '@allbluecn/plugins-core/prd'
7
- import { defineProfile, type ProfileDefinition } from '@allbluecn/kernel'
8
-
9
- export const profile: ProfileDefinition = defineProfile({
10
- id: 'oss',
11
- plugins: [tags, inspiration, prd],
12
- })
13
-
14
- export const pluginIds: string[] = ['@allbluecn/tags', '@allbluecn/inspiration', '@allbluecn/prd']
15
-
16
- export const pluginMiddleware: unknown[] = [
17
- ...tags.contributes.serverMiddleware ?? [],
18
- ...inspiration.contributes.serverMiddleware ?? [],
19
- ...prd.contributes.serverMiddleware ?? [],
20
- ]
@@ -1,10 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import { NavTag } from '@allbluecn/plugins-core/tags/ui'
3
- import { InspirationNavItem } from '@allbluecn/plugins-core/inspiration/ui'
4
- import { PrdNav } from '@allbluecn/plugins-core/prd/ui'
5
- import { type ComponentType } from 'react'
6
- import type { SettingsTabContribution } from '@allbluecn/kernel'
7
-
8
- export const navItems: ComponentType[] = [NavTag, InspirationNavItem, PrdNav]
9
- export const settingsTabs: SettingsTabContribution[] = []
10
- export const dashboardWidgets: ComponentType[] = []
@@ -1,8 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import { createFileRoute } from '@tanstack/react-router'
3
- import type { PluginRouteContext } from '@allbluecn/kernel'
4
- import { inspiration_route_0 } from '@allbluecn/plugins-core/inspiration/routes'
5
-
6
- export const Route = createFileRoute('/_nav/inspiration')({
7
- component: inspiration_route_0.Component as any,
8
- })
@@ -1,9 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import { createFileRoute } from '@tanstack/react-router'
3
- import type { PluginRouteContext } from '@allbluecn/kernel'
4
- import { prd_route_2 } from '@allbluecn/plugins-core/prd/routes'
5
-
6
- export const Route = createFileRoute('/_nav/prd/$id')({
7
- beforeLoad: ((ctx: PluginRouteContext) => prd_route_2.beforeLoad(ctx)) as any,
8
- component: prd_route_2.Component as any,
9
- })
@@ -1,9 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import { createFileRoute } from '@tanstack/react-router'
3
- import type { PluginRouteContext } from '@allbluecn/kernel'
4
- import { prd_route_1 } from '@allbluecn/plugins-core/prd/routes'
5
-
6
- export const Route = createFileRoute('/_nav/prd')({
7
- loader: ((ctx: PluginRouteContext) => prd_route_1.loader(ctx)) as any,
8
- component: prd_route_1.Component as any,
9
- })
@@ -1,8 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import { createFileRoute } from '@tanstack/react-router'
3
- import type { PluginRouteContext } from '@allbluecn/kernel'
4
- import { prd_route_0 } from '@allbluecn/plugins-core/prd/routes'
5
-
6
- export const Route = createFileRoute('/_nav/prd')({
7
- component: prd_route_0.Component as any,
8
- })
@@ -1,8 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import { createFileRoute } from '@tanstack/react-router'
3
- import type { PluginRouteContext } from '@allbluecn/kernel'
4
- import { tags_route_2 } from '@allbluecn/plugins-core/tags/routes'
5
-
6
- export const Route = createFileRoute('/_nav/tags/$id')({
7
- component: tags_route_2.Component as any,
8
- })
@@ -1,8 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import { createFileRoute } from '@tanstack/react-router'
3
- import type { PluginRouteContext } from '@allbluecn/kernel'
4
- import { tags_route_1 } from '@allbluecn/plugins-core/tags/routes'
5
-
6
- export const Route = createFileRoute('/_nav/tags')({
7
- component: tags_route_1.Component as any,
8
- })
@@ -1,8 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import { createFileRoute } from '@tanstack/react-router'
3
- import type { PluginRouteContext } from '@allbluecn/kernel'
4
- import { tags_route_0 } from '@allbluecn/plugins-core/tags/routes'
5
-
6
- export const Route = createFileRoute('/_nav/tags')({
7
- component: tags_route_0.Component as any,
8
- })
@@ -1,9 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import { createFileRoute } from '@tanstack/react-router'
3
- import type { PluginRouteContext } from '@allbluecn/kernel'
4
- import { tags_route_3 } from '@allbluecn/plugins-core/tags/routes'
5
-
6
- export const Route = createFileRoute('/_nav/tags/settings')({
7
- loader: ((ctx: PluginRouteContext) => tags_route_3.loader(ctx)) as any,
8
- component: tags_route_3.Component as any,
9
- })
@@ -1,10 +0,0 @@
1
- // AUTO-GENERATED by @allbluecn/kernel — DO NOT EDIT
2
- import { createFileRoute } from '@tanstack/react-router'
3
- import type { PluginRouteContext } from '@allbluecn/kernel'
4
- import { prd_route_3 } from '@allbluecn/plugins-core/prd/routes'
5
-
6
- export const Route = createFileRoute('/share/prd/$prdId')({
7
- beforeLoad: ((ctx: PluginRouteContext) => prd_route_3.beforeLoad(ctx)) as any,
8
- validateSearch: prd_route_3.validateSearch as any,
9
- component: prd_route_3.Component as any,
10
- })