@xrn1997/dsh-session-delete 0.13.0 → 0.14.1
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/THIRD_PARTY_NOTICES.md +2 -2
- package/lib/client.js +7656 -7596
- package/lib/types/client/{batch-bar.d.ts → batch/batch-bar.d.ts} +2 -2
- package/lib/types/client/{batch-menu-item.d.ts → batch/batch-menu-item.d.ts} +1 -1
- package/lib/types/client/{batch-pick.d.ts → batch/batch-pick.d.ts} +1 -1
- package/lib/types/client/{batch-select.d.ts → batch/batch-select.d.ts} +2 -2
- package/lib/types/client/{delete-menu-item.d.ts → batch/delete-menu-item.d.ts} +1 -1
- package/lib/types/client/batch/index.d.ts +10 -0
- package/lib/types/client/{copy.d.ts → core/copy.d.ts} +2 -2
- package/lib/types/client/{receipt.d.ts → core/receipt.d.ts} +1 -1
- package/lib/types/client/{remote.d.ts → core/remote.d.ts} +1 -1
- package/lib/types/client/{store.d.ts → core/value-store.d.ts} +1 -1
- package/lib/types/client/detail/block-render.d.ts +22 -0
- package/lib/types/client/{detail-blocks.d.ts → detail/detail-blocks.d.ts} +1 -1
- package/lib/types/client/detail/detail-style.d.ts +62 -0
- package/lib/types/client/detail/detail-text.d.ts +18 -0
- package/lib/types/client/detail/index.d.ts +17 -0
- package/lib/types/client/{markdown.d.ts → detail/markdown.d.ts} +2 -2
- package/lib/types/client/{prompt-rail.d.ts → detail/prompt-rail.d.ts} +2 -2
- package/lib/types/client/{session-detail.d.ts → detail/session-detail.d.ts} +3 -12
- package/lib/types/client/{subagent-section.d.ts → detail/subagent-section.d.ts} +2 -2
- package/lib/types/client/{use-archive-detail-reader.d.ts → detail/use-archive-detail-reader.d.ts} +2 -2
- package/lib/types/client/{use-detail-pager.d.ts → detail/use-detail-pager.d.ts} +1 -1
- package/lib/types/client/{use-detail-rail.d.ts → detail/use-detail-rail.d.ts} +1 -1
- package/lib/types/client/{use-detail-reader.d.ts → detail/use-detail-reader.d.ts} +3 -3
- package/lib/types/client/{use-prompt-rail.d.ts → detail/use-prompt-rail.d.ts} +1 -1
- package/lib/types/client/{use-trash-detail-reader.d.ts → detail/use-trash-detail-reader.d.ts} +2 -2
- package/lib/types/client/{context-menu-actions.d.ts → host/context-menu-actions.d.ts} +2 -2
- package/lib/types/client/host/guard.d.ts +16 -0
- package/lib/types/client/{host-archive-watch.d.ts → host/host-archive-watch.d.ts} +1 -1
- package/lib/types/client/host/index.d.ts +11 -0
- package/lib/types/client/{archive-detail.d.ts → panel/archive-detail.d.ts} +3 -5
- package/lib/types/client/{archive-pane.d.ts → panel/archive-pane.d.ts} +10 -10
- package/lib/types/client/{detail-pane.d.ts → panel/detail-pane.d.ts} +3 -3
- package/lib/types/client/panel/index.d.ts +9 -0
- package/lib/types/client/{panel-tab.d.ts → panel/panel-tab.d.ts} +3 -3
- package/lib/types/client/{session-list.d.ts → panel/session-list.d.ts} +4 -4
- package/lib/types/client/{trash-confirm.d.ts → panel/trash-confirm.d.ts} +2 -12
- package/lib/types/client/{trash-detail.d.ts → panel/trash-detail.d.ts} +4 -6
- package/lib/types/client/{trash-drop.d.ts → panel/trash-drop.d.ts} +1 -1
- package/lib/types/client/{trash-entry.d.ts → panel/trash-entry.d.ts} +2 -2
- package/lib/types/client/{trash-panel.d.ts → panel/trash-panel.d.ts} +1 -1
- package/lib/types/client/{trash-tab.d.ts → panel/trash-tab.d.ts} +7 -7
- package/lib/types/client/{use-archive-panel-controller.d.ts → panel/use-archive-panel-controller.d.ts} +5 -5
- package/lib/types/client/{use-archive-query.d.ts → panel/use-archive-query.d.ts} +2 -2
- package/lib/types/client/{use-list-selection.d.ts → panel/use-list-selection.d.ts} +1 -1
- package/lib/types/client/{use-panel-child-view.d.ts → panel/use-panel-child-view.d.ts} +1 -1
- package/lib/types/client/{use-panel-tab.d.ts → panel/use-panel-tab.d.ts} +8 -11
- package/lib/types/client/{use-trash-panel-controller.d.ts → panel/use-trash-panel-controller.d.ts} +4 -4
- package/lib/types/client/{use-trash-query.d.ts → panel/use-trash-query.d.ts} +4 -4
- package/lib/types/client/{view-switches.d.ts → panel/view-switches.d.ts} +1 -1
- package/lib/types/client/scene.d.ts +8 -8
- package/lib/types/client/search/index.d.ts +12 -0
- package/lib/types/client/{search-box.d.ts → search/search-box.d.ts} +1 -1
- package/lib/types/client/{search-preview.d.ts → search/search-preview.d.ts} +2 -2
- package/lib/types/client/{search-results.d.ts → search/search-results.d.ts} +2 -2
- package/lib/types/client/{use-search-view.d.ts → search/use-search-view.d.ts} +2 -2
- package/lib/types/client/{use-search.d.ts → search/use-search.d.ts} +2 -2
- package/lib/types/client/{config-settings.d.ts → settings/config-settings.d.ts} +2 -2
- package/lib/types/client/settings/index.d.ts +8 -0
- package/lib/types/client/{maintenance-parts.d.ts → settings/maintenance-parts.d.ts} +1 -1
- package/lib/types/client/{maintenance-settings.d.ts → settings/maintenance-settings.d.ts} +1 -1
- package/lib/types/client/settings/orphan-confirm.d.ts +12 -0
- package/lib/types/client/{orphan-maintenance.d.ts → settings/orphan-maintenance.d.ts} +3 -3
- package/lib/types/client/{settings-cards.d.ts → settings/settings-cards.d.ts} +2 -2
- package/lib/types/client/{use-maintenance-section.d.ts → settings/use-maintenance-section.d.ts} +1 -1
- package/lib/types/client/{use-maintenance.d.ts → settings/use-maintenance.d.ts} +4 -4
- package/lib/types/client/{batch-selection-store.d.ts → state/batch-selection-store.d.ts} +11 -4
- package/lib/types/client/state/delete-action.d.ts +16 -0
- package/lib/types/client/{main-view.d.ts → state/main-view.d.ts} +1 -1
- package/lib/types/client/{trash-snapshot.d.ts → state/trash-snapshot.d.ts} +1 -1
- package/lib/types/client/ui/Button.d.ts +2 -1
- package/lib/types/client/ui/ErrorBoundary.d.ts +4 -8
- package/lib/types/client/ui/Tooltip.d.ts +3 -2
- package/lib/types/client/ui/inert.d.ts +15 -0
- package/lib/types/client/{attachment-view.d.ts → widgets/attachment-view.d.ts} +2 -2
- package/lib/types/client/{trash-view.d.ts → widgets/trash-view.d.ts} +3 -1
- package/lib/types/client/write/delete-action-host.d.ts +4 -0
- package/lib/types/client/write/index.d.ts +13 -0
- package/lib/types/client/{undo-toast.d.ts → write/undo-toast.d.ts} +2 -2
- package/lib/types/client/{use-write-progress.d.ts → write/use-write-progress.d.ts} +2 -2
- package/lib/types/client/{write-progress.d.ts → write/write-progress.d.ts} +1 -1
- package/lib/types/client/{write-seats.d.ts → write/write-seats.d.ts} +7 -15
- package/lib/types/shared/wire.d.ts +2 -2
- package/package.json +7 -7
- package/lib/types/client/delete-action.d.ts +0 -23
- package/lib/types/client/ui/Tag.d.ts +0 -16
- /package/lib/types/client/{api-base.d.ts → core/api-base.d.ts} +0 -0
- /package/lib/types/client/{context.d.ts → core/context.d.ts} +0 -0
- /package/lib/types/client/{detail-ledger.d.ts → core/detail-ledger.d.ts} +0 -0
- /package/lib/types/client/{plugin.d.ts → core/plugin.d.ts} +0 -0
- /package/lib/types/client/{use-gated-refresh.d.ts → core/use-gated-refresh.d.ts} +0 -0
- /package/lib/types/client/{use-prefetch.d.ts → core/use-prefetch.d.ts} +0 -0
- /package/lib/types/client/{use-detail-frame.d.ts → detail/use-detail-frame.d.ts} +0 -0
- /package/lib/types/client/{session-live.d.ts → host/session-live.d.ts} +0 -0
- /package/lib/types/client/{drop-machine.d.ts → panel/drop-machine.d.ts} +0 -0
- /package/lib/types/client/{trash-nav.d.ts → panel/trash-nav.d.ts} +0 -0
- /package/lib/types/client/{use-column-resize.d.ts → panel/use-column-resize.d.ts} +0 -0
- /package/lib/types/client/{use-panel-list-read.d.ts → panel/use-panel-list-read.d.ts} +0 -0
- /package/lib/types/client/{use-panel-selection.d.ts → panel/use-panel-selection.d.ts} +0 -0
- /package/lib/types/client/{use-panel-width.d.ts → panel/use-panel-width.d.ts} +0 -0
- /package/lib/types/client/{search-text.d.ts → search/search-text.d.ts} +0 -0
- /package/lib/types/client/{settings-view.d.ts → settings/settings-view.d.ts} +0 -0
- /package/lib/types/client/{archive-store.d.ts → state/archive-store.d.ts} +0 -0
- /package/lib/types/client/{host-rows.d.ts → state/host-rows.d.ts} +0 -0
- /package/lib/types/client/{pending-open.d.ts → state/pending-open.d.ts} +0 -0
- /package/lib/types/client/{trash-store.d.ts → state/trash-store.d.ts} +0 -0
- /package/lib/types/client/{undo-notices.d.ts → state/undo-notices.d.ts} +0 -0
- /package/lib/types/client/{confirm-dialog.d.ts → widgets/confirm-dialog.d.ts} +0 -0
- /package/lib/types/client/{notice.d.ts → widgets/notice.d.ts} +0 -0
- /package/lib/types/client/{busy-gate.d.ts → write/busy-gate.d.ts} +0 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* 3. 多选态且拖的行在勾选集里 ⇒ `batch`(一拖删整集,items = 当前勾选集);
|
|
11
11
|
* 4. 其余 ⇒ `single`。
|
|
12
12
|
*/
|
|
13
|
-
import { type PickItem } from '
|
|
13
|
+
import { type PickItem } from '../state/batch-selection-store.js';
|
|
14
14
|
export type DropPlan =
|
|
15
15
|
/** 未登记 id / 空 payload:什么都不做。 */
|
|
16
16
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Translate } from '
|
|
2
|
-
import type { OneShotDeps } from '
|
|
1
|
+
import { type Translate } from '../core/copy.js';
|
|
2
|
+
import type { OneShotDeps } from '../core/remote.js';
|
|
3
3
|
/** 宿主 `SidebarPanelIconOwnerProps`:请求的方形边长;`deps`/`t` 由 `deps+t` 注入面给。 */
|
|
4
4
|
export interface TrashPanelIconProps {
|
|
5
5
|
size?: number | undefined;
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* 回收站档:adapter(两档差异的回收站那一半)+ 本档四个视图件(清单行读数 / 详情投影 / 工具行 / 页脚)。
|
|
3
3
|
* 装配线住 `use-panel-tab.ts`,四格版面住 `panel-tab.tsx`;判据与 DOM 身份不变。
|
|
4
4
|
*/
|
|
5
|
-
import { type
|
|
6
|
-
import { type TrashEntryWire } from '
|
|
7
|
-
import {
|
|
8
|
-
import type { TrashDetailLike } from '
|
|
9
|
-
import type { TrashEntryLike } from '
|
|
5
|
+
import { type RefObject } from 'react';
|
|
6
|
+
import { type TrashEntryWire } from '../../shared/wire.js';
|
|
7
|
+
import type { Translate } from '../core/copy.js';
|
|
8
|
+
import type { TrashDetailLike } from '../core/remote.js';
|
|
9
|
+
import type { TrashEntryLike } from '../core/remote.js';
|
|
10
10
|
import { type TrashQuery } from './use-trash-query.js';
|
|
11
11
|
import { type TrashPanelController } from './use-trash-panel-controller.js';
|
|
12
12
|
import { type PanelTab, type PanelTabAdapter, type PanelTabContext } from './use-panel-tab.js';
|
|
13
13
|
import { type PanelTabFrameLayout } from './panel-tab.js';
|
|
14
|
-
import { type SearchInputRef } from '
|
|
14
|
+
import { type SearchInputRef } from '../search/index.js';
|
|
15
15
|
import type { PanelTabDeps } from './use-panel-tab.js';
|
|
16
16
|
export declare const TRASH_TAB_ADAPTER: PanelTabAdapter<TrashQuery, TrashEntryLike, TrashEntryWire, TrashDetailLike, TrashPanelController>;
|
|
17
17
|
export type TrashPanelTab = PanelTab<TrashQuery, TrashEntryLike, TrashEntryWire, TrashDetailLike, TrashPanelController>;
|
|
@@ -34,7 +34,7 @@ export interface TrashTabViewProps {
|
|
|
34
34
|
readonly onSearchQuery: (next: string) => void;
|
|
35
35
|
readonly searchInputRef: SearchInputRef;
|
|
36
36
|
/** 面板壳持有的还原点:切档往返时视图会卸载,本地 ref 活不过去。 */
|
|
37
|
-
readonly searchRestoreRef:
|
|
37
|
+
readonly searchRestoreRef: RefObject<TrashSearchView | null>;
|
|
38
38
|
readonly t: Translate;
|
|
39
39
|
}
|
|
40
40
|
/** 回收站档的四格视图:清单、详情、工具行(折叠 / 多选)、页脚(「不自动过期」+ 清空 / 批量两颗)。 */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ArchiveRowWire, ArchiveSubagentWire } from '
|
|
2
|
-
import type
|
|
3
|
-
import type { Translate } from '
|
|
4
|
-
import type { ArchiveDetailLike, SessionDeleteRemote } from '
|
|
5
|
-
import type
|
|
1
|
+
import type { ArchiveRowWire, ArchiveSubagentWire } from '../../shared/wire.js';
|
|
2
|
+
import { type BusyGate } from '../write/index.js';
|
|
3
|
+
import type { Translate } from '../core/copy.js';
|
|
4
|
+
import type { ArchiveDetailLike, SessionDeleteRemote } from '../core/remote.js';
|
|
5
|
+
import { type ArchiveDetailSubject } from '../detail/index.js';
|
|
6
6
|
import { type ArchiveQuery } from './use-archive-query.js';
|
|
7
7
|
import { type PanelTabController } from './use-panel-tab.js';
|
|
8
8
|
/** 归档档离清单的孩子视图:父仍是清单选中那条已归档行,看的却是它的一个子会话。 */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ArchiveRowWire } from '
|
|
2
|
-
import type { SessionDeleteRemote } from '
|
|
1
|
+
import type { ArchiveRowWire } from '../../shared/wire.js';
|
|
2
|
+
import type { SessionDeleteRemote } from '../core/remote.js';
|
|
3
3
|
export type ArchiveListState = {
|
|
4
4
|
readonly status: 'loading';
|
|
5
5
|
} | {
|
|
@@ -4,17 +4,14 @@
|
|
|
4
4
|
* (两个 `usePanelTab` 实例互不读写,ADR-0060 决定第 4 条);布局事实由面板算好交进来。
|
|
5
5
|
*/
|
|
6
6
|
import { type RefObject } from 'react';
|
|
7
|
-
import type
|
|
8
|
-
import type { Translate } from '
|
|
9
|
-
import type { SessionDeleteRemote } from '
|
|
10
|
-
import type
|
|
7
|
+
import { type BusyGate } from '../write/index.js';
|
|
8
|
+
import type { Translate } from '../core/copy.js';
|
|
9
|
+
import type { SessionDeleteRemote } from '../core/remote.js';
|
|
10
|
+
import { type DetailNav, type DetailFrame, type DetailState, type RailDetailLike } from '../detail/index.js';
|
|
11
11
|
import { type ListDom } from './session-list.js';
|
|
12
12
|
import { type TrashNav } from './trash-nav.js';
|
|
13
|
-
import type { ProjectGroup } from '
|
|
14
|
-
import { type
|
|
15
|
-
import type { DetailState } from './use-detail-reader.js';
|
|
16
|
-
import type { RailDetailLike } from './use-detail-rail.js';
|
|
17
|
-
import { type DelayedPrefetch } from './use-prefetch.js';
|
|
13
|
+
import type { ProjectGroup } from '../widgets/trash-view.js';
|
|
14
|
+
import { type DelayedPrefetch } from '../core/use-prefetch.js';
|
|
18
15
|
import { type ListSelection } from './use-list-selection.js';
|
|
19
16
|
/** 一档的依赖面:面板的两条读 + 一段 `/apply` + 清空 + 进度读(`progress` 面板自己不读,随座位的
|
|
20
17
|
* `OneShotDeps` 面向下转发,认领轮询归 `use-write-progress.ts`);控制器/查询的输入是它的窄切片。 */
|
|
@@ -103,8 +100,8 @@ export interface PanelTab<Q, R, S, D extends RailDetailLike, C extends PanelTabC
|
|
|
103
100
|
readonly nav: TrashNav;
|
|
104
101
|
readonly prefetch: DelayedPrefetch<R>;
|
|
105
102
|
readonly frame: DetailFrame<S, D>;
|
|
106
|
-
readonly listRef: RefObject<HTMLDivElement>;
|
|
107
|
-
readonly scrollRef: RefObject<HTMLDivElement>;
|
|
103
|
+
readonly listRef: RefObject<HTMLDivElement | null>;
|
|
104
|
+
readonly scrollRef: RefObject<HTMLDivElement | null>;
|
|
108
105
|
/** 盒子够宽且清单有行:两栏成立(空态/读失败不分栏)。 */
|
|
109
106
|
readonly split: boolean;
|
|
110
107
|
/** 窄档下详情栏该不该在 DOM 里(宽档恒真)。 */
|
package/lib/types/client/{use-trash-panel-controller.d.ts → panel/use-trash-panel-controller.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type SessionDeleteRemote, type TrashDetailLike, type TrashEntryLike } from '
|
|
3
|
-
import type { TrashEntryWire } from '
|
|
1
|
+
import { type BusyGate } from '../write/index.js';
|
|
2
|
+
import { type SessionDeleteRemote, type TrashDetailLike, type TrashEntryLike } from '../core/remote.js';
|
|
3
|
+
import type { TrashEntryWire } from '../../shared/wire.js';
|
|
4
4
|
import { type PanelTabController } from './use-panel-tab.js';
|
|
5
5
|
import { type TrashQuery } from './use-trash-query.js';
|
|
6
6
|
/** 待确认的动作:一条、整个回收站、或多选一批(`ids` 已按清单顺序排好);类型归状态机。 */
|
|
@@ -19,7 +19,7 @@ export type PendingAction = {
|
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* 控制器要的面:`query` 取清单、`reload`、清空与附件读数上屏;`ordered` 是屏幕上的顺序。
|
|
22
|
-
* 输入的引用**不需稳定**:reload 回调经 `useLatest` 读最新那一份(判据住 `store.ts`)。
|
|
22
|
+
* 输入的引用**不需稳定**:reload 回调经 `useLatest` 读最新那一份(判据住 `core/value-store.ts`)。
|
|
23
23
|
*/
|
|
24
24
|
export interface TrashPanelControllerInput {
|
|
25
25
|
/** `progress` 不在这里读:slice 按「自己读或向下转发的」收——座位吃 `OneShotDeps`(含认领轮询那一格)。 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type SessionDeleteRemote, type TrashEntryLike } from '
|
|
3
|
-
import type { Translate } from '
|
|
4
|
-
import type { AttachmentCleanupWire } from '
|
|
1
|
+
import { type BusyGate, type GateRun } from '../write/index.js';
|
|
2
|
+
import { type SessionDeleteRemote, type TrashEntryLike } from '../core/remote.js';
|
|
3
|
+
import type { Translate } from '../core/copy.js';
|
|
4
|
+
import type { AttachmentCleanupWire } from '../../shared/wire.js';
|
|
5
5
|
export type TrashQueryDeps = Pick<SessionDeleteRemote, 'list' | 'emptyTrash'>;
|
|
6
6
|
/** 清单的唯一状态:加载中 / 有行 / 未知。`unknown` 不向下游交出任何行——旧行不许继续可操作。 */
|
|
7
7
|
export type TrashListState = {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* `aria-label` 交给读屏——不为提示再包一层锚点(上一笔 `dbad2be` 的教训)。
|
|
16
16
|
*/
|
|
17
17
|
import type { ReactElement } from 'react';
|
|
18
|
-
import type { Translate } from '
|
|
18
|
+
import type { Translate } from '../core/copy.js';
|
|
19
19
|
export interface ViewSwitchesProps {
|
|
20
20
|
readonly allCollapsed: boolean;
|
|
21
21
|
readonly selectMode: boolean;
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* **环内模块顶层只许字面量初始化**:本文件与八个现场模块互相 import,顶层读环内导出会踩 TDZ / `undefined`。
|
|
6
6
|
*/
|
|
7
7
|
import { type ReactElement, type ReactNode } from 'react';
|
|
8
|
-
import { type ArchiveRevisionScene } from './archive-store.js';
|
|
9
|
-
import { type BatchSelectionScene } from './batch-selection-store.js';
|
|
10
|
-
import { type DeleteActionScene } from './delete-action.js';
|
|
11
|
-
import { type HostRowsScene } from './host-rows.js';
|
|
12
|
-
import { type MainViewScene } from './main-view.js';
|
|
13
|
-
import { type TrashRevisionScene } from './trash-store.js';
|
|
14
|
-
import { type TrashSnapshotScene } from './trash-snapshot.js';
|
|
15
|
-
import { type UndoNoticeScene } from './undo-notices.js';
|
|
8
|
+
import { type ArchiveRevisionScene } from './state/archive-store.js';
|
|
9
|
+
import { type BatchSelectionScene } from './state/batch-selection-store.js';
|
|
10
|
+
import { type DeleteActionScene } from './state/delete-action.js';
|
|
11
|
+
import { type HostRowsScene } from './state/host-rows.js';
|
|
12
|
+
import { type MainViewScene } from './state/main-view.js';
|
|
13
|
+
import { type TrashRevisionScene } from './state/trash-store.js';
|
|
14
|
+
import { type TrashSnapshotScene } from './state/trash-snapshot.js';
|
|
15
|
+
import { type UndoNoticeScene } from './state/undo-notices.js';
|
|
16
16
|
export interface ClientScene {
|
|
17
17
|
readonly trashRevisions: TrashRevisionScene;
|
|
18
18
|
readonly archiveRevisions: ArchiveRevisionScene;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 检索模块的入口:一条状态机(输入即切结果视图、取消走 latest-wins、写后重跑)加四件视图,
|
|
3
|
+
* 回收站与归档两档共用同一份(ADR-0075)。
|
|
4
|
+
*
|
|
5
|
+
* 外部只 import 本文件;游标续页、预览三态、命中高亮切片这些是这一层的实现细节。边界由
|
|
6
|
+
* `tests/dependency-direction.test.ts` 钉住。
|
|
7
|
+
*/
|
|
8
|
+
export { SearchBox, type SearchInputRef } from './search-box.js';
|
|
9
|
+
export { SearchPreview } from './search-preview.js';
|
|
10
|
+
export { SearchResults, resultRowsOf, type BodyResultRow, type ResultRow } from './search-results.js';
|
|
11
|
+
export { useSearch } from './use-search.js';
|
|
12
|
+
export { useSearchViewState } from './use-search-view.js';
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* 不归这里(`src/client/ui/top-layer.ts` 的判据)。
|
|
11
11
|
*/
|
|
12
12
|
import type { ReactElement } from 'react';
|
|
13
|
-
import type { Translate } from '
|
|
13
|
+
import type { Translate } from '../core/copy.js';
|
|
14
14
|
/** 输入框 ref 的可写形态:面板要能读它来聚焦,也要让 React 在挂载/卸载时写它。 */
|
|
15
15
|
export interface SearchInputRef {
|
|
16
16
|
current: HTMLInputElement | null;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* 这里的「彻底删除…」是安静的红(`QUIET_DANGER`),与行内动作同一档。
|
|
11
11
|
*/
|
|
12
12
|
import type { ReactElement, ReactNode } from 'react';
|
|
13
|
-
import type { SearchPreviewWire } from '
|
|
14
|
-
import type { Translate } from '
|
|
13
|
+
import type { SearchPreviewWire } from '../../shared/wire.js';
|
|
14
|
+
import type { Translate } from '../core/copy.js';
|
|
15
15
|
export interface SearchPreviewProps {
|
|
16
16
|
readonly preview: SearchPreviewWire;
|
|
17
17
|
/** 组根显示名(面板清单给的)。 */
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* 读不出的会话不是"没有",界面不能替它下结论(ADR-0074 决定第 3 条)。
|
|
12
12
|
*/
|
|
13
13
|
import { type ReactElement } from 'react';
|
|
14
|
-
import type { SearchBodyHitWire, SearchPageWire, SearchTitleHitWire } from '
|
|
15
|
-
import type { Translate } from '
|
|
14
|
+
import type { SearchBodyHitWire, SearchPageWire, SearchTitleHitWire } from '../../shared/wire.js';
|
|
15
|
+
import type { Translate } from '../core/copy.js';
|
|
16
16
|
import type { SearchController } from './use-search.js';
|
|
17
17
|
interface ResultRowBase {
|
|
18
18
|
/** 行的稳定身份:标题区与正文区同名会话会同时出现,所以前缀分家(`title:x` / `body:x`)。 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SearchPreviewState } from './use-search.js';
|
|
2
|
-
import type { SessionDeleteRemote } from '
|
|
3
|
-
import type { SearchBodyHitWire, SearchPreviewWire, SearchScopeWire } from '
|
|
2
|
+
import type { SessionDeleteRemote } from '../core/remote.js';
|
|
3
|
+
import type { SearchBodyHitWire, SearchPreviewWire, SearchScopeWire } from '../../shared/wire.js';
|
|
4
4
|
import type { BodyResultRow, ResultRow, TitleResultRow } from './search-results.js';
|
|
5
5
|
/** 「在完整详情中打开」要用的落点:命中会话 + 消息下标 + 命中消息时间(拿不到时间时为 `null`)。 */
|
|
6
6
|
export interface OpenTarget {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SearchPageLike, SearchPreviewLike, SessionDeleteRemote } from '
|
|
2
|
-
import type { SearchScopeWire } from '
|
|
1
|
+
import type { SearchPageLike, SearchPreviewLike, SessionDeleteRemote } from '../core/remote.js';
|
|
2
|
+
import type { SearchScopeWire } from '../../shared/wire.js';
|
|
3
3
|
/** 输入到发请求的静默间隔:短到不打断输入节奏,长到不在每个按键上都解一次日志。 */
|
|
4
4
|
export declare const SEARCH_DEBOUNCE_MS = 250;
|
|
5
5
|
export type SearchState = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import { type Translate } from '
|
|
3
|
-
import type { ConfigDeps } from '
|
|
2
|
+
import { type Translate } from '../core/copy.js';
|
|
3
|
+
import type { ConfigDeps } from '../core/remote.js';
|
|
4
4
|
export interface ConfigSettingsProps {
|
|
5
5
|
/** 整套 remote 的切片;测试可以只给维护那七件(缺这两件时本卡不渲染)。 */
|
|
6
6
|
readonly deps: Partial<ConfigDeps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 插件设置页模块的入口:`plugins.bundle.config` 那一格的两张卡(上「可调项」、下「维护」,ADR-0043 决定 4)。
|
|
3
|
+
*
|
|
4
|
+
* 外部只 import 本文件——目录内部怎么分(卡片壳 / 两张卡的呈现 / 维护状态机与远程 glue)是这一层的
|
|
5
|
+
* 实现细节;边界由 `tests/dependency-direction.test.ts` 钉住。槽位视图守卫(`summary` 不画)也跟着
|
|
6
|
+
* 主体走,不留给注册处再判一次。
|
|
7
|
+
*/
|
|
8
|
+
export { SettingsCards } from './settings-cards.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* 它同时被回收站面板用到,住中立模块 `notice.tsx`。
|
|
4
4
|
*/
|
|
5
5
|
import type { ReactElement, ReactNode } from 'react';
|
|
6
|
-
import type { Translate } from '
|
|
6
|
+
import type { Translate } from '../core/copy.js';
|
|
7
7
|
interface MaintenanceChromeProps {
|
|
8
8
|
/** 给测试与界面规格一个稳定的块名;缺省不写 `data-*`。 */
|
|
9
9
|
slot?: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* 卡片只呈现,读数与动作归 `use-maintenance.ts`;孤儿会话段复用 `OrphanMaintenance`,另两段在本文件。
|
|
4
4
|
*/
|
|
5
5
|
import type { ReactElement } from 'react';
|
|
6
|
-
import { type Translate } from '
|
|
6
|
+
import { type Translate } from '../core/copy.js';
|
|
7
7
|
import { type MaintenanceDeps } from './use-maintenance.js';
|
|
8
8
|
export interface MaintenanceSettingsProps {
|
|
9
9
|
/** 维护七件(三段读数与动作 + 进度认领那一读);可调项两件由占用者另发给「可调项」卡。 */
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { OrphanReportWire } from '../../shared/wire.js';
|
|
2
|
+
import type { OneShotDeps } from '../core/remote.js';
|
|
3
|
+
import type { Translate } from '../core/copy.js';
|
|
4
|
+
/** 无主子会话的清理确认框。载荷是刚扫出来的那份报告,界面不重算。 */
|
|
5
|
+
export declare function OrphanConfirm({ deps, report, busy, t, onCancel, onConfirm, }: {
|
|
6
|
+
deps: OneShotDeps;
|
|
7
|
+
report: OrphanReportWire;
|
|
8
|
+
busy: boolean;
|
|
9
|
+
t: Translate;
|
|
10
|
+
onCancel: () => void;
|
|
11
|
+
onConfirm: () => void;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* (原位原文 + 重试,不折成空报告);「已经不在」不是失败(中性提示,下次检查自然消失)。
|
|
5
5
|
*/
|
|
6
6
|
import type { ReactElement } from 'react';
|
|
7
|
-
import type { Translate } from '
|
|
8
|
-
import type { OrphanReportWire } from '
|
|
9
|
-
import type { OneShotDeps } from '
|
|
7
|
+
import type { Translate } from '../core/copy.js';
|
|
8
|
+
import type { OrphanReportWire } from '../../shared/wire.js';
|
|
9
|
+
import type { OneShotDeps } from '../core/remote.js';
|
|
10
10
|
import type { MaintenanceSectionView } from './use-maintenance-section.js';
|
|
11
11
|
export interface OrphanMaintenanceProps {
|
|
12
12
|
/** 段视图:读数、提示、确认框、忙碌与四个动作都在它上面,本块不多要也不少读。 */
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* 呈现与状态机归 `config-settings.tsx` / `maintenance-settings.tsx`。
|
|
4
4
|
*/
|
|
5
5
|
import type { ReactElement } from 'react';
|
|
6
|
-
import { type Translate } from '
|
|
7
|
-
import type { ConfigDeps } from '
|
|
6
|
+
import { type Translate } from '../core/copy.js';
|
|
7
|
+
import type { ConfigDeps } from '../core/remote.js';
|
|
8
8
|
import type { MaintenanceDeps } from './use-maintenance.js';
|
|
9
9
|
export interface SettingsCardsProps {
|
|
10
10
|
/** 维护七件 + 可调项两件;只造维护七件的测试替身会让「可调项」卡整体缺席。 */
|
package/lib/types/client/{use-maintenance-section.d.ts → settings/use-maintenance-section.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RemoteOutcome } from '
|
|
1
|
+
import type { RemoteOutcome } from '../core/remote.js';
|
|
2
2
|
/** 一段在飞的动作:检查只读,清理会写。状态行靠它分开说「检查中…」与「清理中…」;`null` = 空闲。 */
|
|
3
3
|
export type MaintenancePhase = 'scanning' | 'cleaning';
|
|
4
4
|
/** 检查的落地面:失败句由各段自己拼(`text`),机器只负责在赢票之后把它摆上屏。 */
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* 远程调用、"没活可干"的判据与回执拼句,同样不挂 effect。写动作走 `/apply` 的 `orphan-clean` 与
|
|
5
5
|
* 两个聚合清理段;面板的 `useTrashQuery` 与本 hook 互不引用。
|
|
6
6
|
*/
|
|
7
|
-
import type { Translate } from '
|
|
8
|
-
import type { AttachmentOrphanReportWire, OrphanReportWire } from '
|
|
9
|
-
import { type SessionDeleteRemote } from '
|
|
10
|
-
import type { ProjectionCacheOrphanReportWire } from '
|
|
7
|
+
import type { Translate } from '../core/copy.js';
|
|
8
|
+
import type { AttachmentOrphanReportWire, OrphanReportWire } from '../../shared/wire.js';
|
|
9
|
+
import { type SessionDeleteRemote } from '../core/remote.js';
|
|
10
|
+
import type { ProjectionCacheOrphanReportWire } from '../../shared/wire.js';
|
|
11
11
|
import { type MaintenanceSectionView } from './use-maintenance-section.js';
|
|
12
12
|
/** 维护卡只需要这七段:三份报告 + 孤儿会话的批量写 + 孤儿附件/投影缓存的聚合写,加进度认领那一读
|
|
13
13
|
* (确认框里的进度行轮询 `/progress`,不在 /progress 覆盖面的两段只拿它当兜底文案不管)。 */
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
/** 一条**待移入回收站的会话**:宿主投影的会话 id + 移入回收站那一刻的显示名(投影的 `displayTitle`)。
|
|
2
|
+
*
|
|
3
|
+
* 这组字段是四个消费者共用的同一个形状:选中集、会话行的单条与批量座位、撤销横幅与已选清单原文。
|
|
4
|
+
* 它由**选中集**拥有(`title` 只用于清单与失败原文,不参与请求),写链向下 import 它——不是写链的实现细节。
|
|
5
|
+
*/
|
|
6
|
+
export interface PickItem {
|
|
7
|
+
/** 宿主槽位投影的会话 id,原样透给 `/apply`(浏览器半不自己拼 id)。 */
|
|
8
|
+
readonly sessionId: string;
|
|
9
|
+
/** 移入回收站那一刻的显示名。 */
|
|
10
|
+
readonly title: string;
|
|
11
|
+
}
|
|
5
12
|
export interface SelectionState {
|
|
6
13
|
readonly selecting: boolean;
|
|
7
14
|
readonly picks: readonly PickItem[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PickItem } from './batch-selection-store.js';
|
|
2
|
+
/** 现场里的一张请求:形状就是一条待移入回收站的会话,外加认领用的序号。 */
|
|
3
|
+
export interface DeleteActionRequest extends PickItem {
|
|
4
|
+
readonly seq: number;
|
|
5
|
+
}
|
|
6
|
+
export interface DeleteActionScene {
|
|
7
|
+
request(input: PickItem): void;
|
|
8
|
+
clear(expected: DeleteActionRequest): void;
|
|
9
|
+
use(): DeleteActionRequest | null;
|
|
10
|
+
reset(): void;
|
|
11
|
+
}
|
|
12
|
+
export declare function createDeleteActionScene(): DeleteActionScene;
|
|
13
|
+
/** 菜单行落下一次请求(委托进程场景的实例)。 */
|
|
14
|
+
export declare function requestDelete(input: PickItem): void;
|
|
15
|
+
/** 动作宿主读当前请求(委托进程场景的实例)。 */
|
|
16
|
+
export declare function useDeleteActionRequest(): DeleteActionRequest | null;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* 归档时 `clearMain()` 的判据在 `dsh-client-ui-workspace/lib/client.js`。
|
|
8
8
|
* 不 import 宿主客户端包(AGENTS.md 红线):只通过 `ctx.get('uiWorkspace')` 可选读服务,形状不符/缺席安静退回。
|
|
9
9
|
*/
|
|
10
|
-
import type { ClientContextLike } from '
|
|
10
|
+
import type { ClientContextLike } from '../core/context.js';
|
|
11
11
|
/** 一台主视图收尾现场:绑定宿主 / 关主视图 / 重开 / 遗忘 / 收场。 */
|
|
12
12
|
export interface MainViewScene {
|
|
13
13
|
/** 入口激活时绑一次;之后每次调用再读服务(客户端插件激活顺序早于 `uiWorkspace` 也没关系)。 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TrashDetailLike, TrashEntryLike } from '
|
|
1
|
+
import type { TrashDetailLike, TrashEntryLike } from '../core/remote.js';
|
|
2
2
|
/** 快照的形状:只搬清册/详情线上已有的只读事实,不带时间戳或"读了几次"这类读数。 */
|
|
3
3
|
export interface TrashSnapshot {
|
|
4
4
|
readonly rows: readonly TrashEntryLike[];
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* 官方还有 `toolbar` 变体与 `className` 之外的转发面,这里不铺开。
|
|
7
7
|
*
|
|
8
8
|
* **转发 `ref`**:官方把 `ref` 交给原生按钮("for focus management and overlay anchors"),
|
|
9
|
-
* `Modal`
|
|
9
|
+
* `Modal` 的初始焦点与外壳的对齐测量都吃这个。`forwardRef` 在宿主两代(18 / 19)里都能用
|
|
10
|
+
* ——19 把 `ref` 也算普通 prop,但 `forwardRef` 没有移除,官方实现同形。
|
|
10
11
|
*/
|
|
11
12
|
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
12
13
|
import './styles.js';
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
* 槽位条目的**错误边界**:单个贡献在渲染期抛错时只画一块本地化占位,不把宿主那一格打空,
|
|
3
3
|
* 更不让整棵槽位树跟着白屏。原错与组件栈留给 `console.error`(诊断不吞)。
|
|
4
4
|
*
|
|
5
|
-
* 为什么是 class
|
|
5
|
+
* 为什么是 class:宿主两代(18 / 19)里只有 class 的 `getDerivedStateFromError` / `componentDidCatch`
|
|
6
6
|
* 能接住渲染期异常,函数组件 + hook 没有等价物。
|
|
7
7
|
*
|
|
8
8
|
* 边界只包**渲染期**:事件处理器 / 异步回调里的抛错不经过它,那些地方各自有失败面(`RemoteOutcome`、
|
|
9
9
|
* 行失败原文等)。也**不提供重试按钮**:一条贡献崩了通常是这一代宿主契约变了,原样重渲染只会再崩
|
|
10
10
|
* 一次;刷新页面 / HMR 换代才是恢复路径。文案由注册处按 `t` 给(见 `copy.ts`)。
|
|
11
|
+
*
|
|
12
|
+
* 场景实例**不**在这里进子树:包装件住 `src/client/host/guard.tsx`,边界保持通用(`ui/` 是库,不 import 上层)。
|
|
11
13
|
*/
|
|
12
|
-
import { Component, type
|
|
13
|
-
import { type ClientScene } from '../scene.js';
|
|
14
|
+
import { Component, type ErrorInfo, type ReactNode } from 'react';
|
|
14
15
|
export interface ErrorBoundaryProps {
|
|
15
16
|
/** 崩溃时上屏的本地化文案(注册处按 `t` 给)。 */
|
|
16
17
|
fallback: string;
|
|
@@ -25,9 +26,4 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
|
|
|
25
26
|
componentDidCatch(error: unknown, info: ErrorInfo): void;
|
|
26
27
|
render(): ReactNode;
|
|
27
28
|
}
|
|
28
|
-
/**
|
|
29
|
-
* 把一条槽位贡献包进边界:注册表里登记的组件就是这一层。`displayName` 带上来源,测试与
|
|
30
|
-
* 宿主调试面板都能一眼看出这是被隔离过的那颗。
|
|
31
|
-
*/
|
|
32
|
-
export declare function withErrorBoundary<P extends object>(Wrapped: ComponentType<P>, fallback: string, scene?: ClientScene): ComponentType<P>;
|
|
33
29
|
export {};
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
* (本插件唯一一处用的是零延迟默认值)。**没有砍掉 `side`/`gap`**:定位数学是三行分支,
|
|
15
15
|
* 留着才与官方同形。
|
|
16
16
|
*
|
|
17
|
-
* **与官方的一处差异**:官方把锚点自己的 `ref` 与它的 `ref`
|
|
18
|
-
*
|
|
17
|
+
* **与官方的一处差异**:官方把锚点自己的 `ref` 与它的 `ref` 合并后一起挂;这里 `cloneElement`
|
|
18
|
+
* 会直接覆写 `children` 的 `ref`,因此要求锚点**不带自己的 ref**(现有调用点为 `<span>` 与 `<button>`,
|
|
19
|
+
* 均未自带 `ref`)。以后若需传 `ref` 给锚点,再补 ref 合并。
|
|
19
20
|
*/
|
|
20
21
|
import { type ReactElement } from 'react';
|
|
21
22
|
import './styles.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `inert` 的跨代写法。宿主两代的语义不同(0.2.3-alpha.2 起 Web / 桌面外壳换成 React 19):
|
|
3
|
+
*
|
|
4
|
+
* - **React 18**:`inert` 不在它的 DOM 类型面里,属性值按字符串原样写进元素;传 boolean 会报未知布尔属性告警;
|
|
5
|
+
* - **React 19**:类型面把它声明成 boolean,且**空串按 false 处理**(属性被摘掉并报 `console.error`);
|
|
6
|
+
* 同时 dev `validateProperty` 对内置布尔属性 `inert` 传入字面量字符串 `'true'` / `'false'` 也会报 `console.error`。
|
|
7
|
+
*
|
|
8
|
+
* 两代都要「属性在场上且控制台零告警」只有传入 HTML 布尔属性规范名 `'inert'`:
|
|
9
|
+
* 在 18 里原样落成 `inert="inert"`,在 19 里绕过 `'true'`/`'false'` 拦截并按 truthy 落成 `inert=""`;
|
|
10
|
+
* 两者都没有告警。返回值声明成 `object` 是为了绕开 React 19 的 boolean 类型声明——这是给 DOM 的值,
|
|
11
|
+
* 不是给类型面的值。
|
|
12
|
+
*
|
|
13
|
+
* 反面的代价写在调用点:不要把 `inert` 写成 `''`(19 下静默失效,正文在保持期仍可交互)或 `'true'`(19 dev 报错)。
|
|
14
|
+
*/
|
|
15
|
+
export declare function inertProps(on: boolean): object;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type TrashDetailAttachmentWire } from '
|
|
2
|
-
import type { Translate } from '
|
|
1
|
+
import { type TrashDetailAttachmentWire } from '../../shared/wire.js';
|
|
2
|
+
import type { Translate } from '../core/copy.js';
|
|
3
3
|
/** 取数地址只从校验过的 id 与 kind 派生:不接受路径与任意查询串,故不存在「读任意文件」的入口。 */
|
|
4
4
|
export declare function attachmentUrl(a: TrashDetailAttachmentWire): string;
|
|
5
5
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* **配色与圆角一律走 token,字号是字面量 px**:卡片用宿主设置面的底层 token,清单行不铺底不描边。
|
|
4
4
|
*/
|
|
5
5
|
import type { CSSProperties } from 'react';
|
|
6
|
-
import type { Translate } from '
|
|
6
|
+
import type { Translate } from '../core/copy.js';
|
|
7
7
|
/** 卡片配方:宿主设置面的 fill/stroke 底层 token + 官方 `lg` 圆角。 */
|
|
8
8
|
export declare const CARD: CSSProperties;
|
|
9
9
|
/** 清单条目行:与 `CARD` 同族但不铺底、不描边——`CARD` 借给读数失败块与附件回执块(要打断视线),
|
|
@@ -67,3 +67,5 @@ export declare function detailNameOf(row: {
|
|
|
67
67
|
readonly label?: string;
|
|
68
68
|
readonly logTitle: string;
|
|
69
69
|
} | undefined, fallback: string): string;
|
|
70
|
+
/** 确认框里那份可滚的逐条清单(两张确认框共用一份):长清单在框内滚,标题与动作行留在框里。 */
|
|
71
|
+
export declare const CARD_LIST: CSSProperties;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 写链模块的入口:六个写入座位共用的一条 `apply → 解信封 → 回执摘要 → settlement → refresh` 生命周期
|
|
3
|
+
* (ADR-0013 / ADR-0017 / ADR-0069),外加删除动作宿主与撤销横幅。
|
|
4
|
+
*
|
|
5
|
+
* 外部只 import 本文件;座位怎么排、busy 闸怎么开、进度怎么认领、撤销怎么起落是这一层的实现细节。
|
|
6
|
+
* 边界由 `tests/dependency-direction.test.ts` 钉住。
|
|
7
|
+
*/
|
|
8
|
+
export { useBusyGate, type BusyGate, type GateRun } from './busy-gate.js';
|
|
9
|
+
export { DeleteActionHost } from './delete-action-host.js';
|
|
10
|
+
export { UndoToast } from './undo-toast.js';
|
|
11
|
+
export { useWriteProgress } from './use-write-progress.js';
|
|
12
|
+
export { WriteProgressLine } from './write-progress.js';
|
|
13
|
+
export { deleteSessionsFromBatch, deleteSessionFromMenu, unarchiveFromArchiveTab, purgeFromPanel, restoreFromPanel, type WriteOutcome, } from './write-seats.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Translate } from '
|
|
2
|
-
import type { OneShotDeps } from '
|
|
1
|
+
import { type Translate } from '../core/copy.js';
|
|
2
|
+
import type { OneShotDeps } from '../core/remote.js';
|
|
3
3
|
/**
|
|
4
4
|
* 常驻的撤销提示宿主,挂 `shell.overlay`。两种来源共用:**当前横幅**优先;不在时顶上一条待显示的
|
|
5
5
|
* 撤销失败(在飞期间横幅被覆盖/熄灭,失败原文不能跟着消失)。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { WriteProgressAction, WriteProgressStep } from '
|
|
2
|
-
import type { ProgressDeps } from '
|
|
1
|
+
import type { WriteProgressAction, WriteProgressStep } from '../../shared/wire.js';
|
|
2
|
+
import type { ProgressDeps } from '../core/remote.js';
|
|
3
3
|
/** 轮询周期 300ms:够密到 k/N 的推进看得见,够疏到不跟自己那趟写抢盘(口径裁定,不随配置走)。 */
|
|
4
4
|
export declare const PROGRESS_POLL_MS = 300;
|
|
5
5
|
/** 认领结果的界面脸:`own` 才带 k/N 与步骤(原样来自快照,不折算百分比——假进度是反目标);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 整句一个键会让任一段变化都重写整句模板,也让「已用秒数」没法单独活着。语序与「 · 」分隔在两种语言下同形。
|
|
7
7
|
*/
|
|
8
8
|
import { type ReactElement } from 'react';
|
|
9
|
-
import type { Translate } from '
|
|
9
|
+
import type { Translate } from '../core/copy.js';
|
|
10
10
|
import type { WriteProgressFace } from './use-write-progress.js';
|
|
11
11
|
/** 进度行本体:`role="status"` 就是 `docs/ui-spec.md` §2 那条 `aria-live`(遥测小读的翻转不该抢焦点)。
|
|
12
12
|
* `announce=false` 用于已经处在另一个 live region(撤销横幅的 `role=alert`)里的场景:整行只做视觉,
|