@allbluecn/web-app 0.27.4 → 0.27.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allbluecn/web-app",
3
- "version": "0.27.4",
3
+ "version": "0.27.6",
4
4
  "license": "AGPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "files": [
@@ -37,7 +37,7 @@ vi.mock('@tanstack/react-router', () => ({
37
37
  useRouter: () => ({ invalidate: routerInvalidate }),
38
38
  }))
39
39
 
40
- import { QuickCaptureInvalidator } from '../quick-capture-invalidate'
40
+ import { QuickCaptureInvalidator, QUICK_CAPTURE_CREATED_EVENT } from '../quick-capture-invalidate'
41
41
 
42
42
  let client: QueryClient
43
43
 
@@ -71,6 +71,9 @@ describe('QuickCaptureInvalidator 主窗跨窗口失效', () => {
71
71
  it('桥推送记录创建事件 → invalidateQueries 全量失效 + router.invalidate 重跑 loader', async () => {
72
72
  mount()
73
73
  const invalidateSpy = vi.spyOn(client, 'invalidateQueries')
74
+ // 需求列表走组件内 state + listStoriesFn:需 window 事件直达 listRefresh
75
+ const listHandler = vi.fn()
76
+ window.addEventListener(QUICK_CAPTURE_CREATED_EVENT, listHandler)
74
77
  await act(async () => {
75
78
  captured?.({ kind: 'story', identifier: 'STORY-42', name: '托盘快捷记录' })
76
79
  await Promise.resolve()
@@ -78,9 +81,11 @@ describe('QuickCaptureInvalidator 主窗跨窗口失效', () => {
78
81
  expect(invalidateSpy).toHaveBeenCalledTimes(1)
79
82
  // 全量失效口径(复审 C2):无 queryKey 过滤参数——零参调用
80
83
  expect(invalidateSpy).toHaveBeenCalledWith()
81
- // 列表数据走 route loader(非 react-query):必须同时重跑 loader,
82
- // 否则新记录不会出现在需求列表(用户会以为要手动刷新)
84
+ // 列表数据走组件内 state(非 react-query,非 loader 直出):必须同时广播
85
+ // window 事件,否则只能等 presence 轮询兜底(用户实测 30-60s)
83
86
  expect(routerInvalidate).toHaveBeenCalledTimes(1)
87
+ expect(listHandler).toHaveBeenCalledTimes(1)
88
+ window.removeEventListener(QUICK_CAPTURE_CREATED_EVENT, listHandler)
84
89
  })
85
90
 
86
91
  it('desktopBridge 为 undefined(浏览器直开)→ 挂载不抛错、零订阅', () => {
@@ -4,12 +4,14 @@
4
4
 
5
5
  // 主窗跨窗口失效(托盘 mini 快捷记录面板闭环第 4 步):订阅
6
6
  // desktopBridge.onQuickCaptureCreated——mini 面板保存成功 → Electron main 广播
7
- // → 本组件刷新主窗数据。两条刷新通道缺一不可:
7
+ // → 本组件刷新主窗数据。三条通道缺一不可:
8
8
  // ① invalidateQueries() 全量失效(复审 C2 口径)——覆盖 projects-brief /
9
9
  // workspaces-brief / 通知等 react-query 缓存(灵感箱首建后侧边栏即时出现);
10
- // ② router.invalidate() 重跑 active route loader——需求列表/看板/日历的数据
11
- // 走 route loader + 组件内 reload 原语(非 react-query),仅失效 query 缓存
12
- // 不会让新记录出现在列表里(用户会以为「没保存,要手动刷新」)。
10
+ // ② router.invalidate() 重跑 active route loader——覆盖非列表页;
11
+ // ③ window 自定义事件 `allblue:quick-capture-created`——需求列表的数据走
12
+ // 组件内 state + listStoriesFn(非 react-query、非 loader 直出),前两条
13
+ // 对它只能靠 usePresenceListRefresh 的 30-60s 轮询兜底(用户实测延迟是
14
+ // 这个轮询),故额外广播事件让 story-list-view 立即调自己的 listRefresh()。
13
15
  // 旧壳(无此方法)undefined、浏览器直开(无桥)null——可选链双保险优雅降级。
14
16
  // 挂载点:providers(Providers 全页挂载,DesktopRenamedToast 旁)。
15
17
  import { useEffect } from "react"
@@ -17,6 +19,9 @@ import { useQueryClient } from "@tanstack/react-query"
17
19
  import { useRouter } from "@tanstack/react-router"
18
20
  import { getDesktopBridge } from "@/lib/desktop-bridge-types"
19
21
 
22
+ /** 快捷记录创建事件(window 级):story-list-view 订阅后走自身 listRefresh */
23
+ export const QUICK_CAPTURE_CREATED_EVENT = "allblue:quick-capture-created"
24
+
20
25
  export function QuickCaptureInvalidator() {
21
26
  const queryClient = useQueryClient()
22
27
  const router = useRouter()
@@ -25,6 +30,7 @@ export function QuickCaptureInvalidator() {
25
30
  const off = getDesktopBridge()?.onQuickCaptureCreated?.(() => {
26
31
  void queryClient.invalidateQueries()
27
32
  void router.invalidate()
33
+ window.dispatchEvent(new CustomEvent(QUICK_CAPTURE_CREATED_EVENT))
28
34
  })
29
35
  return off
30
36
  }, [queryClient, router])
@@ -33,7 +33,7 @@
33
33
  // 15) 请求在途期间再 Enter 不重复提交
34
34
  // 富文本编辑器 / AI 工具栏 / 内联编辑器在 jsdom 以替身注入。
35
35
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
36
- import { act, cleanup, render, screen, waitFor } from '@testing-library/react'
36
+ import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
37
37
  import userEvent from '@testing-library/user-event'
38
38
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
39
39
 
@@ -48,9 +48,11 @@ const listLabelsFnMock = vi.hoisted(() => vi.fn())
48
48
  const bridgeStub = vi.hoisted(() => {
49
49
  const unsubMiniPanelMode = vi.fn()
50
50
  const unsubMiniPanelPinned = vi.fn()
51
+ const unsubMiniPanelShown = vi.fn()
51
52
  return {
52
53
  unsubMiniPanelMode,
53
54
  unsubMiniPanelPinned,
55
+ unsubMiniPanelShown,
54
56
  window: vi.fn(),
55
57
  notifyQuickCapture: vi.fn(),
56
58
  setMiniPanelPinned: vi.fn(),
@@ -59,6 +61,7 @@ const bridgeStub = vi.hoisted(() => {
59
61
  quitApp: vi.fn(),
60
62
  onMiniPanelMode: vi.fn((_cb: (mode: string) => void) => unsubMiniPanelMode),
61
63
  onMiniPanelPinned: vi.fn((_cb: (pinned: boolean) => void) => unsubMiniPanelPinned),
64
+ onMiniPanelShown: vi.fn((_cb: () => void) => unsubMiniPanelShown),
62
65
  }
63
66
  })
64
67
 
@@ -156,16 +159,32 @@ beforeEach(() => {
156
159
  afterEach(() => cleanup())
157
160
 
158
161
  describe('QuickCapturePanel', () => {
159
- it('渲染顶部栏(logo + mini 面板)、默认预选独立需求与快捷键文案', async () => {
162
+ it('渲染顶部栏(logo + mini 面板)、三个类型 tab、默认预选独立需求与快捷键文案', async () => {
160
163
  renderPanel()
161
164
  expect(screen.getAllByAltText('AllBlue').length).toBeGreaterThan(0)
162
165
  expect(screen.getByText('mini 面板')).toBeTruthy()
163
- // 不再有可点击的「需求」「灵感」双 tab
164
- expect(screen.queryByRole('button', { name: '需求' })).toBeNull()
165
- expect(screen.queryByRole('button', { name: '灵感' })).toBeNull()
166
+ // 类型 tab:需求/灵感(当前)、BUG、任务(占位)
167
+ expect(screen.getByRole('button', { name: '需求/灵感' })).toBeTruthy()
168
+ expect(screen.getByRole('button', { name: 'BUG' })).toBeTruthy()
169
+ expect(screen.getByRole('button', { name: '任务' })).toBeTruthy()
166
170
  expect(await screen.findByText('独立需求')).toBeTruthy()
167
171
  expect(screen.getByPlaceholderText('标题')).toBeTruthy()
168
- expect(screen.getByText('Enter 记录 · Shift+Enter 换行 · Esc 关闭')).toBeTruthy()
172
+ expect(screen.getByText('Enter 记录 · ⌘+Enter 编辑区提交 · Esc 关闭')).toBeTruthy()
173
+ })
174
+
175
+ it('类型 tab:切到 BUG/任务显示占位,切回需求/灵感表单仍在', async () => {
176
+ const user = userEvent.setup()
177
+ const { container } = renderPanel()
178
+ await screen.findByText('独立需求')
179
+ expect(container.querySelector('input[placeholder="标题"]')).toBeTruthy()
180
+ await user.click(screen.getByRole('button', { name: 'BUG' }))
181
+ expect(screen.getByText('该类型记录即将上线,敬请期待')).toBeTruthy()
182
+ expect(container.querySelector('input[placeholder="标题"]')).toBeNull()
183
+ expect(screen.queryByRole('button', { name: '记录' })).toBeNull()
184
+ await user.click(screen.getByRole('button', { name: '任务' }))
185
+ expect(screen.getByText('该类型记录即将上线,敬请期待')).toBeTruthy()
186
+ await user.click(screen.getByRole('button', { name: '需求/灵感' }))
187
+ expect(container.querySelector('input[placeholder="标题"]')).toBeTruthy()
169
188
  })
170
189
 
171
190
  it('标题 Enter 提交:带默认独立需求 projectId 与内联字段缺省值', async () => {
@@ -197,6 +216,45 @@ describe('QuickCapturePanel', () => {
197
216
  expect(quickCaptureStoryFnMock).not.toHaveBeenCalled()
198
217
  })
199
218
 
219
+ it('失焦状态(焦点不在输入框)Enter 也提交', async () => {
220
+ const { container } = renderPanel()
221
+ await screen.findByText('独立需求')
222
+ fireEvent.change(screen.getByPlaceholderText('标题'), { target: { value: '失焦提交' } })
223
+ // 模拟焦点移到面板容器(非输入框、非按钮)后按 Enter
224
+ fireEvent.keyDown(container.firstElementChild as HTMLElement, { key: 'Enter' })
225
+ await waitFor(() =>
226
+ expect(quickCaptureStoryFnMock).toHaveBeenCalledWith({
227
+ data: expect.objectContaining({ name: '失焦提交' }),
228
+ }),
229
+ )
230
+ })
231
+
232
+ it('描述编辑器内:Enter 换行不提交,⌘+Enter 提交', async () => {
233
+ renderPanel()
234
+ await screen.findByText('独立需求')
235
+ fireEvent.change(screen.getByPlaceholderText('标题'), { target: { value: '编辑器提交' } })
236
+ const editor = screen.getByTestId('description-editor')
237
+ fireEvent.keyDown(editor, { key: 'Enter' })
238
+ expect(quickCaptureStoryFnMock).not.toHaveBeenCalled()
239
+ fireEvent.keyDown(editor, { key: 'Enter', metaKey: true })
240
+ await waitFor(() =>
241
+ expect(quickCaptureStoryFnMock).toHaveBeenCalledWith({
242
+ data: expect.objectContaining({ name: '编辑器提交' }),
243
+ }),
244
+ )
245
+ })
246
+
247
+ it('main 推送 panel-shown → 标题框重新聚焦', async () => {
248
+ renderPanel()
249
+ await screen.findByText('独立需求')
250
+ const input = screen.getByPlaceholderText('标题') as HTMLInputElement
251
+ input.blur()
252
+ const shownCb = bridgeStub.onMiniPanelShown.mock.calls[0]?.[0]
253
+ expect(shownCb).toBeTypeOf('function')
254
+ act(() => shownCb?.())
255
+ expect(document.activeElement).toBe(input)
256
+ })
257
+
200
258
  it('项目下拉选中「灵感箱」:Popover 自动关闭,保存传 kind=inspiration 且无 projectId', async () => {
201
259
  const user = userEvent.setup()
202
260
  renderPanel()
@@ -66,6 +66,9 @@ import {
66
66
 
67
67
  export type QuickCaptureMode = "story" | "inspiration"
68
68
 
69
+ /** 面板类型 tab:需求/灵感(story/inspiration 共用)、BUG、任务 */
70
+ type QuickCaptureTab = "story" | "bug" | "task"
71
+
69
72
  /** 保存成功反馈(已记录 IDENTIFIER)自动清除时长 */
70
73
  const FEEDBACK_CLEAR_MS = 1500
71
74
 
@@ -109,6 +112,8 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
109
112
  // 表现为 Enter/Esc 时好时坏)。挂载后再渲染工具栏。
110
113
  const [mounted, setMounted] = useState(false)
111
114
  const [appVersion, setAppVersion] = useState("")
115
+ // 类型 tab:story = 需求/灵感(本期),bug / task 占位(后续完善)
116
+ const [activeTab, setActiveTab] = useState<QuickCaptureTab>("story")
112
117
 
113
118
  const feedbackTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null)
114
119
  // 保存防重:请求在途(标题尚未清空)期间忽略再次提交,防重复落库
@@ -171,6 +176,8 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
171
176
  const unsubscribe = bridge?.onMiniPanelMode?.((next) => {
172
177
  const pick = pickForMode(next)
173
178
  if (pick) setProjectPick(pick)
179
+ // 托盘菜单「快捷记录」→ 始终切回需求/灵感 tab
180
+ setActiveTab("story")
174
181
  })
175
182
  return () => unsubscribe?.()
176
183
  }, [pickForMode])
@@ -187,19 +194,34 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
187
194
  setMounted(true)
188
195
  }, [])
189
196
 
190
- // 焦点管理:面板每次获得焦点(showInactive + webContents.focus / 用户切回)
191
- // 时把焦点放到标题框。否则焦点停在第一个可聚焦元素(顶部图钉按钮)——表现为
192
- // 图钉出现 focus ring、Enter/Esc 落到按钮上(快捷键像失效)。用户正在其他
193
- // 输入控件里编辑时不抢焦点。
197
+ // 焦点管理:面板每次显示/获得焦点时把焦点放到标题框。否则焦点停在第一个
198
+ // 可聚焦元素(顶部图钉按钮)——表现为图钉出现 focus ring、Enter/Esc 落到
199
+ // 按钮上(快捷键像失效)。三重触发覆盖窗口生命周期:
200
+ // ① mount(首次加载);② main 每次 presentPanel 推送 shown(mini 窗口单例
201
+ // 复用、组件不重挂载,mount 只跑一次——这是用户实测「还是落在图钉上」的根因);
202
+ // ③ visibilitychange(窗口 hide→show 的可见性切换兜底)。
203
+ // 用户正在其他输入控件里编辑时不抢焦点。
194
204
  useEffect(() => {
195
205
  const focusTitle = () => {
196
- const active = document.activeElement
197
- if (active && active !== document.body && active !== titleInputRef.current) return
206
+ const active = document.activeElement as HTMLElement | null
207
+ const isEditing =
208
+ !!active &&
209
+ (active.tagName === 'INPUT' ||
210
+ active.tagName === 'TEXTAREA' ||
211
+ active.isContentEditable)
212
+ if (isEditing && active !== titleInputRef.current) return
198
213
  titleInputRef.current?.focus()
199
214
  }
200
215
  focusTitle()
201
216
  window.addEventListener('focus', focusTitle)
202
- return () => window.removeEventListener('focus', focusTitle)
217
+ document.addEventListener('visibilitychange', focusTitle)
218
+ const bridge = getDesktopBridge()
219
+ const unsubscribe = bridge?.onMiniPanelShown?.(focusTitle)
220
+ return () => {
221
+ window.removeEventListener('focus', focusTitle)
222
+ document.removeEventListener('visibilitychange', focusTitle)
223
+ unsubscribe?.()
224
+ }
203
225
  }, [])
204
226
 
205
227
  useEffect(() => {
@@ -292,20 +314,31 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
292
314
  }
293
315
 
294
316
  const handlePanelKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {
295
- if (e.key !== "Escape") return
296
- // 项目 Popover 展开时 Esc 只关 Popover(Base UI 自行处理),不收起整个面板
297
- if (projectOpen) return
298
- e.preventDefault()
299
- const bridge = getDesktopBridge()
300
- bridge?.window?.("hide")
301
- }
302
-
303
- // 标题框 Enter 提交(Shift+Enter 不拦截);描述编辑器内 Enter/Shift+Enter 由 TipTap 换行
304
- const handleTitleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {
305
- if (e.key === "Enter" && !e.shiftKey) {
317
+ if (e.key === "Escape") {
318
+ // 项目 Popover 展开时 Esc 只关 Popover(Base UI 自行处理),不收起整个面板
319
+ if (projectOpen) return
306
320
  e.preventDefault()
307
- void save()
321
+ const bridge = getDesktopBridge()
322
+ bridge?.window?.("hide")
323
+ return
324
+ }
325
+ if (e.key !== "Enter") return
326
+ const target = e.target as HTMLElement | null
327
+ // 描述编辑器内:普通 Enter 交给 TipTap 换行,仅 Mod+Enter(⌘/Ctrl)提交
328
+ if (editorWrapRef.current?.contains(target as Node)) {
329
+ if (e.metaKey || e.ctrlKey) {
330
+ e.preventDefault()
331
+ void save()
332
+ }
333
+ return
308
334
  }
335
+ // 按钮上的 Enter 交给按钮自身(避免「钉按钮 + 记录」双重动作)
336
+ if (target?.tagName === "BUTTON") return
337
+ // 其余位置(标题框 / 失焦后的面板任意处):Enter 提交(Shift+Enter 不再
338
+ // 作为换行快捷键——描述框内换行直接用 Enter)
339
+ if (e.shiftKey) return
340
+ e.preventDefault()
341
+ void save()
309
342
  }
310
343
 
311
344
  const handlePickProject = (pick: ProjectPick) => {
@@ -315,6 +348,8 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
315
348
  setExtraLabels([])
316
349
  setProjectPick(pick)
317
350
  setProjectOpen(false)
351
+ // 托盘菜单/设置菜单的「快捷记录需求/灵感」始终回到需求/灵感 tab
352
+ setActiveTab("story")
318
353
  }
319
354
 
320
355
  const togglePinned = () => {
@@ -403,7 +438,36 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
403
438
  </div>
404
439
  </header>
405
440
 
406
- <div className="flex-1 space-y-3 overflow-y-auto p-3">
441
+ {/* 类型 tab:需求/灵感(本期)、BUG / 任务(占位,后续完善) */}
442
+ <div className="flex items-center gap-1 border-b border-border px-2 py-1.5">
443
+ <Button
444
+ type="button"
445
+ size="sm"
446
+ variant={activeTab === "story" ? "secondary" : "ghost"}
447
+ onClick={() => setActiveTab("story")}
448
+ >
449
+ {m.quick_capture_tabUnified()}
450
+ </Button>
451
+ <Button
452
+ type="button"
453
+ size="sm"
454
+ variant={activeTab === "bug" ? "secondary" : "ghost"}
455
+ onClick={() => setActiveTab("bug")}
456
+ >
457
+ {m.quick_capture_tabBug()}
458
+ </Button>
459
+ <Button
460
+ type="button"
461
+ size="sm"
462
+ variant={activeTab === "task" ? "secondary" : "ghost"}
463
+ onClick={() => setActiveTab("task")}
464
+ >
465
+ {m.quick_capture_tabTask()}
466
+ </Button>
467
+ </div>
468
+
469
+ {activeTab === "story" ? (
470
+ <div className="flex-1 space-y-3 overflow-y-auto p-3">
407
471
  <Popover open={projectOpen} onOpenChange={setProjectOpen}>
408
472
  <PopoverTrigger
409
473
  render={
@@ -468,7 +532,6 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
468
532
  ref={titleInputRef}
469
533
  value={name}
470
534
  onChange={(e) => setName(e.target.value)}
471
- onKeyDown={handleTitleKeyDown}
472
535
  placeholder={m.story_column_title()}
473
536
  maxLength={200}
474
537
  className="h-10 text-base md:text-lg"
@@ -552,7 +615,13 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
552
615
  />
553
616
  </div>
554
617
  </div>
618
+ ) : (
619
+ <div className="flex flex-1 items-center justify-center p-4 text-center text-sm text-muted-foreground">
620
+ {m.quick_capture_comingSoon()}
621
+ </div>
622
+ )}
555
623
 
624
+ {activeTab === "story" && (
556
625
  <footer className="space-y-1.5 border-t border-border p-2">
557
626
  <Button
558
627
  type="button"
@@ -568,6 +637,7 @@ export function QuickCapturePanel({ initialMode }: { initialMode: QuickCaptureMo
568
637
  : m.quick_capture_hint()}
569
638
  </div>
570
639
  </footer>
640
+ )}
571
641
  </div>
572
642
  )
573
643
  }
@@ -47,6 +47,7 @@ import { flattenStoryGroups } from "./display/flatten-story-groups";
47
47
  import { toast } from "@/components/ui/toast";
48
48
  import { ConfirmDialog } from "@/components/confirm-dialog";
49
49
  import { usePresenceListRefresh } from "@/lib/collab/use-presence-list-refresh";
50
+ import { QUICK_CAPTURE_CREATED_EVENT } from "@/components/desktop/quick-capture-invalidate";
50
51
  import { m } from "@/paraglide/messages.js";
51
52
  import { toastError } from "@/lib/toast-error";
52
53
 
@@ -385,6 +386,15 @@ export function StoryListView({ stories: initialStories, users: initialUsers, pr
385
386
  // 轮询兜底 → 走既有重拉入口(协同落库不 bump updatedAt,列表无推送通道)
386
387
  usePresenceListRefresh({ module: "stories", refresh: listRefresh });
387
388
 
389
+ // 托盘 mini 面板快捷记录(跨窗口):立即重拉列表,不等 presence 轮询兜底的
390
+ // 30-60s。事件由 QuickCaptureInvalidator(Providers 全局)在主窗收到 Electron
391
+ // 广播后派发;本组件数据走组件内 state + listStoriesFn(非 react-query),
392
+ // 只有这条直达通道能做到「保存后立即出现」。
393
+ useEffect(() => {
394
+ window.addEventListener(QUICK_CAPTURE_CREATED_EVENT, listRefresh);
395
+ return () => window.removeEventListener(QUICK_CAPTURE_CREATED_EVENT, listRefresh);
396
+ }, [listRefresh]);
397
+
388
398
  const projectContext = useMemo(() => {
389
399
  if (!projectId) return null;
390
400
  const project = projects.find((p) => p.id === projectId);
@@ -112,7 +112,7 @@ export const SDK_GROUPS: SdkGroup[] = [
112
112
  "items": [
113
113
  {
114
114
  "name": "@allbluecn/web-app",
115
- "version": "v0.27.4",
115
+ "version": "v0.27.6",
116
116
  "lastUpdate": "Nov 5, 2026",
117
117
  "source": "apps/web/package.json",
118
118
  "docsUrl": "https://github.com/allbluecn/allblue"
@@ -110,6 +110,10 @@ export interface DesktopBridgeApi {
110
110
  setMiniPanelPinned?: (pinned: boolean) => void
111
111
  onMiniPanelPinned?: (cb: (pinned: boolean) => void) => () => void
112
112
  popUpTrayMenu?: () => void
113
+ /** mini 面板每次显示(presentPanel)推送的**无参信号**:面板窗口单例复用、
114
+ * 组件不重挂载,渲染端据此重新聚焦标题框(否则 mini 窗口重新打开后焦点
115
+ * 仍停在最后一个聚焦元素/图钉按钮上)。订阅返回 unsubscribe。 */
116
+ onMiniPanelShown?: (cb: () => void) => () => void
113
117
  /** mini 面板设置菜单(2026-11-05 追加,add-only):
114
118
  * - openMainWindow:打开/前置主窗(菜单项「打开 AllBlue」);
115
119
  * - quitApp:退出应用(菜单项「退出 AllBlue」,复用 before-quit 清理链)。
@@ -3547,6 +3547,7 @@ export * from './prototypepanel_mobile1.js'
3547
3547
  export * from './prototypepanel_saving1.js'
3548
3548
  export * from './prototypepanel_tablet1.js'
3549
3549
  export * from './prototypepanel_title1.js'
3550
+ export * from './quick_capture_comingsoon1.js'
3550
3551
  export * from './quick_capture_failed.js'
3551
3552
  export * from './quick_capture_hint.js'
3552
3553
  export * from './quick_capture_inbox.js'
@@ -3559,6 +3560,8 @@ export * from './quick_capture_quit.js'
3559
3560
  export * from './quick_capture_saved.js'
3560
3561
  export * from './quick_capture_settings.js'
3561
3562
  export * from './quick_capture_submit.js'
3563
+ export * from './quick_capture_tabbug1.js'
3564
+ export * from './quick_capture_tabtask1.js'
3562
3565
  export * from './quick_capture_tabunified1.js'
3563
3566
  export * from './rightsidebar_collapse1.js'
3564
3567
  export * from './rightsidebar_expand1.js'
@@ -0,0 +1,30 @@
1
+ /* eslint-disable */
2
+ import { getLocale, experimentalStaticLocale } from '../runtime.js';
3
+
4
+ /** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
5
+
6
+ /** @typedef {{}} Quick_Capture_Comingsoon1Inputs */
7
+
8
+ const zh_quick_capture_comingsoon1 = /** @type {(inputs: Quick_Capture_Comingsoon1Inputs) => LocalizedString} */ () => {
9
+ return /** @type {LocalizedString} */ (`该类型记录即将上线,敬请期待`)
10
+ };
11
+
12
+ const en_quick_capture_comingsoon1 = /** @type {(inputs: Quick_Capture_Comingsoon1Inputs) => LocalizedString} */ () => {
13
+ return /** @type {LocalizedString} */ (`This record type is coming soon`)
14
+ };
15
+
16
+ /**
17
+ * | output |
18
+ * | --- |
19
+ * | "This record type is coming soon" |
20
+ *
21
+ * @param {Quick_Capture_Comingsoon1Inputs} inputs
22
+ * @param {{ locale?: "zh" | "en" }} options
23
+ * @returns {LocalizedString}
24
+ */
25
+ const quick_capture_comingsoon1 = /** @type {((inputs?: Quick_Capture_Comingsoon1Inputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quick_Capture_Comingsoon1Inputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
26
+ const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
+ if (locale === "en") return en_quick_capture_comingsoon1(inputs)
28
+ return zh_quick_capture_comingsoon1(inputs)
29
+ });
30
+ export { quick_capture_comingsoon1 as "quick_capture_comingSoon" }
@@ -6,17 +6,17 @@ import { getLocale, experimentalStaticLocale } from '../runtime.js';
6
6
  /** @typedef {{}} Quick_Capture_HintInputs */
7
7
 
8
8
  const zh_quick_capture_hint = /** @type {(inputs: Quick_Capture_HintInputs) => LocalizedString} */ () => {
9
- return /** @type {LocalizedString} */ (`Enter 记录 · Shift+Enter 换行 · Esc 关闭`)
9
+ return /** @type {LocalizedString} */ (`Enter 记录 · ⌘+Enter 编辑区提交 · Esc 关闭`)
10
10
  };
11
11
 
12
12
  const en_quick_capture_hint = /** @type {(inputs: Quick_Capture_HintInputs) => LocalizedString} */ () => {
13
- return /** @type {LocalizedString} */ (`Enter to save · Shift+Enter for newline · Esc to close`)
13
+ return /** @type {LocalizedString} */ (`Enter to save · ⌘+Enter in editor · Esc to close`)
14
14
  };
15
15
 
16
16
  /**
17
17
  * | output |
18
18
  * | --- |
19
- * | "Enter to save · Shift+Enter for newline · Esc to close" |
19
+ * | "Enter to save · ⌘+Enter in editor · Esc to close" |
20
20
  *
21
21
  * @param {Quick_Capture_HintInputs} inputs
22
22
  * @param {{ locale?: "zh" | "en" }} options
@@ -0,0 +1,30 @@
1
+ /* eslint-disable */
2
+ import { getLocale, experimentalStaticLocale } from '../runtime.js';
3
+
4
+ /** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
5
+
6
+ /** @typedef {{}} Quick_Capture_Tabbug1Inputs */
7
+
8
+ const zh_quick_capture_tabbug1 = /** @type {(inputs: Quick_Capture_Tabbug1Inputs) => LocalizedString} */ () => {
9
+ return /** @type {LocalizedString} */ (`BUG`)
10
+ };
11
+
12
+ const en_quick_capture_tabbug1 = /** @type {(inputs: Quick_Capture_Tabbug1Inputs) => LocalizedString} */ () => {
13
+ return /** @type {LocalizedString} */ (`Bug`)
14
+ };
15
+
16
+ /**
17
+ * | output |
18
+ * | --- |
19
+ * | "Bug" |
20
+ *
21
+ * @param {Quick_Capture_Tabbug1Inputs} inputs
22
+ * @param {{ locale?: "zh" | "en" }} options
23
+ * @returns {LocalizedString}
24
+ */
25
+ const quick_capture_tabbug1 = /** @type {((inputs?: Quick_Capture_Tabbug1Inputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quick_Capture_Tabbug1Inputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
26
+ const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
+ if (locale === "en") return en_quick_capture_tabbug1(inputs)
28
+ return zh_quick_capture_tabbug1(inputs)
29
+ });
30
+ export { quick_capture_tabbug1 as "quick_capture_tabBug" }
@@ -0,0 +1,30 @@
1
+ /* eslint-disable */
2
+ import { getLocale, experimentalStaticLocale } from '../runtime.js';
3
+
4
+ /** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
5
+
6
+ /** @typedef {{}} Quick_Capture_Tabtask1Inputs */
7
+
8
+ const zh_quick_capture_tabtask1 = /** @type {(inputs: Quick_Capture_Tabtask1Inputs) => LocalizedString} */ () => {
9
+ return /** @type {LocalizedString} */ (`任务`)
10
+ };
11
+
12
+ const en_quick_capture_tabtask1 = /** @type {(inputs: Quick_Capture_Tabtask1Inputs) => LocalizedString} */ () => {
13
+ return /** @type {LocalizedString} */ (`Task`)
14
+ };
15
+
16
+ /**
17
+ * | output |
18
+ * | --- |
19
+ * | "Task" |
20
+ *
21
+ * @param {Quick_Capture_Tabtask1Inputs} inputs
22
+ * @param {{ locale?: "zh" | "en" }} options
23
+ * @returns {LocalizedString}
24
+ */
25
+ const quick_capture_tabtask1 = /** @type {((inputs?: Quick_Capture_Tabtask1Inputs, options?: { locale?: "zh" | "en" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quick_Capture_Tabtask1Inputs, { locale?: "zh" | "en" }, {}>} */ ((inputs = {}, options = {}) => {
26
+ const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
27
+ if (locale === "en") return en_quick_capture_tabtask1(inputs)
28
+ return zh_quick_capture_tabtask1(inputs)
29
+ });
30
+ export { quick_capture_tabtask1 as "quick_capture_tabTask" }