@allbluecn/web-app 0.7.1 → 0.8.0

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.7.1",
3
+ "version": "0.8.0",
4
4
  "license": "AGPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "files": [
@@ -197,7 +197,9 @@
197
197
  "three": "^0.180.0",
198
198
  "tw-animate-css": "^1.4.0",
199
199
  "zod": "^4.4.3",
200
- "@allbluecn/shared": "workspace:*"
200
+ "@allbluecn/shared": "workspace:*",
201
+ "@open-file-viewer/core": "^0.1.43",
202
+ "@open-file-viewer/react": "^0.1.43"
201
203
  },
202
204
  "devDependencies": {
203
205
  "@allblue/devtools": "workspace:*",
@@ -137,7 +137,7 @@ export function FilePreview({
137
137
  className: "ofv-toolbar-icon-button",
138
138
  // 标题栏存在时才显示按钮:open-file-viewer 在插件渲染完成(setCommandSupport)
139
139
  // 与翻页/缩放时会重新求值 hidden 函数
140
- hidden: (ctx) => !ctx.viewport.querySelector(TITLE_SELECTORS),
140
+ hidden: (ctx: any) => !ctx.viewport.querySelector(TITLE_SELECTORS),
141
141
  onClick: () => setShowTitle((v) => !v),
142
142
  });
143
143
  }
@@ -95,14 +95,14 @@ export const SDK_GROUPS: SdkGroup[] = [
95
95
  "items": [
96
96
  {
97
97
  "name": "@allbluecn/web-app",
98
- "version": "v0.7.1",
98
+ "version": "v0.8.0",
99
99
  "lastUpdate": "Sep 3, 2026",
100
100
  "source": "apps/web/package.json",
101
101
  "docsUrl": "https://github.com/allbluecn/allblue"
102
102
  },
103
103
  {
104
104
  "name": "@allbluecn/kernel",
105
- "version": "v0.3.1",
105
+ "version": "v0.4.0",
106
106
  "lastUpdate": "Sep 3, 2026",
107
107
  "source": "packages/kernel/package.json",
108
108
  "docsUrl": "https://github.com/allbluecn/allblue"
@@ -29,7 +29,7 @@ export function buildOutline(elements: CanvasElement[]): OutlineNode[] {
29
29
  const children = atoms
30
30
  .filter(a => !usedAtoms.has(a.id) && isInside(a, rect))
31
31
  .map(a => { usedAtoms.add(a.id); return toAtomNode(a); });
32
- roots.push({ id: `container-${c.id}`, label: (c.overrides ?? c.props)?.name || c.type, type: "container", elementId: c.id, children });
32
+ roots.push({ id: `container-${c.id}`, label: String((c.overrides ?? c.props)?.name) || c.type, type: "container", elementId: c.id, children });
33
33
  }
34
34
 
35
35
  for (const a of atoms) {
@@ -53,5 +53,5 @@ function isInside(atom: CanvasElement, rect: { x: number; y: number; w: number;
53
53
 
54
54
  function toAtomNode(el: CanvasElement): OutlineNode {
55
55
  const p = el.overrides ?? el.props;
56
- return { id: `atom-${el.id}`, label: p?.text || p?.label || el.type, type: "atom", elementId: el.id, children: [] };
56
+ return { id: `atom-${el.id}`, label: String(p?.text || p?.label || el.type), type: "atom", elementId: el.id, children: [] };
57
57
  }
@@ -0,0 +1,14 @@
1
+ declare module '@open-file-viewer/react' {
2
+ export const FileViewer: React.FC<any>
3
+ }
4
+ declare module '@open-file-viewer/core' {
5
+ export const imagePlugin: any
6
+ export const textPlugin: any
7
+ export const pdfPlugin: any
8
+ export const officePlugin: any
9
+ export const archivePlugin: any
10
+ export const audioPlugin: any
11
+ export const videoPlugin: any
12
+ export const epubPlugin: any
13
+ export type PreviewToolbarCustomAction = any
14
+ }