@dsh-electron/dsh-plugin-multi-root-workspace 0.1.15 → 0.1.16

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.
Files changed (39) hide show
  1. package/CHANGELOG.en.md +13 -1
  2. package/CHANGELOG.md +13 -1
  3. package/README.en.md +6 -6
  4. package/README.md +6 -6
  5. package/lib/auto-review.js +1 -1
  6. package/lib/client.js +761 -74
  7. package/lib/client.js.map +1 -1
  8. package/lib/{command-y5tfcAeC.js → command-DaVJ-mK3.js} +55 -1
  9. package/lib/command.js +1 -1
  10. package/lib/index.js +4 -4
  11. package/lib/{instructions-Ck9wp4J4.js → instructions-Ca80SkZq.js} +1 -1
  12. package/lib/instructions.js +1 -1
  13. package/lib/lsp.js +1 -1
  14. package/lib/process-fence.js +95 -12
  15. package/lib/{registry-DyDNDSJZ.js → registry-BibiukWk.js} +1 -1
  16. package/lib/{registry-operation-C2ZV3Jhw.js → registry-operation-CIlmt6_c.js} +5 -1
  17. package/lib/registry.js +1 -1
  18. package/lib/{review-context-B-oHkU6a.js → review-context-OxO-fMWR.js} +1 -1
  19. package/lib/review-context.js +1 -1
  20. package/lib/{sandbox-CZElTNPz.js → sandbox-aobdyQGi.js} +6 -3
  21. package/lib/sandbox.js +1 -1
  22. package/lib/scope.js +91 -4
  23. package/lib/skills.js +1 -1
  24. package/lib/types/client/files-tree/FilesTree.d.ts +49 -6
  25. package/lib/types/client/files-tree/adapter.d.ts +69 -16
  26. package/lib/types/client/files-tree/face.d.ts +31 -2
  27. package/lib/types/client/files-tree/locate.d.ts +74 -0
  28. package/lib/types/client/files-tree/navigator.d.ts +98 -0
  29. package/lib/types/client/index.d.ts +7 -0
  30. package/lib/types/client/locales.d.ts +2 -0
  31. package/lib/types/client/styles.d.ts +1 -1
  32. package/lib/types/compat/files-tree.d.ts +8 -1
  33. package/lib/types/compat/forge-entrypoints.d.ts +44 -0
  34. package/lib/types/compat/session-existence.d.ts +41 -0
  35. package/lib/types/registry-operation.d.ts +7 -0
  36. package/lib/types/roots.d.ts +3 -1
  37. package/lib/types/scope.d.ts +67 -1
  38. package/lib/workspace-files.js +1 -1
  39. package/package.json +1 -1
@@ -9,23 +9,66 @@ import type { FilesInjected } from './face.ts';
9
9
  import type { createFilesStore } from './store.ts';
10
10
  /**
11
11
  * The fork's props: the store/locale shares verbatim from upstream's
12
- * composed props, `start`/`toggle` from the injected face, and the four
13
- * seams upstream binds inside `FilesBody` — tab id, lifetime, root, and the
14
- * resource-opening callback — supplied by the adapter instead.
12
+ * composed props, `hold`/`release`/`toggle` from the injected face, and the
13
+ * four seams upstream binds inside `FilesBody` — tab id, lifetime, root, and
14
+ * the resource-opening callback — supplied by the adapter instead.
15
15
  */
16
- export type FilesTreeProps = PropsStore<ReturnType<typeof createFilesStore>> & Pick<FilesInjected, 'start' | 'toggle'> & PropsLocale<'sidebarFiles'> & {
16
+ export type FilesTreeProps = PropsStore<ReturnType<typeof createFilesStore>> & Pick<FilesInjected, 'hold' | 'release' | 'toggle'> & PropsLocale<'sidebarFiles'> & {
17
17
  /** The store bucket this tree reads and writes — the pane's own dockkit tab id. */
18
18
  readonly tabId: TabId;
19
19
  /** Session the listing and the resource addresses belong to. */
20
20
  readonly sessionId: SessionId;
21
21
  /** Absolute path of the root this tree lists (the selected additional root). */
22
22
  readonly root: string;
23
- /** Takeover lifetime: aborting forgets the bucket and closes the watch tree. */
23
+ /**
24
+ * The owner's record lifetime: aborting it forgets the bucket and closes
25
+ * the tree. A body unmount alone only ends the hold — the bucket, its
26
+ * listed levels, and its expansion stay for the next mount to resume.
27
+ */
24
28
  readonly signal: AbortSignal;
25
29
  /** Open one `dsh-resource://file` address (the adapter's sidebarRight route). */
26
30
  readonly onOpen: (address: string) => void;
27
31
  /** Optional host-controlled tree Factory, available on the newer Files page. */
28
32
  readonly nativeTree?: NativeTreeRenderer | undefined;
33
+ /**
34
+ * The owner's live scroll mirror — upstream's `scrolled` writing
35
+ * `pane.scrollTop`: fired on every scroll and once more at unmount with
36
+ * the body's final offset (the adapter refuses the write when the owner
37
+ * is already dead, so a normal close keeps its last position while a
38
+ * killed one cannot resurrect). The fork's own store still hears the
39
+ * offset only at unmount through `actions.scrolled`, as upstream.
40
+ */
41
+ readonly onScrollOffset?: ((offset: number) => void) | undefined;
42
+ /**
43
+ * The preview navigator's locate-current-file request: expand the file's
44
+ * ancestors, mark its row current, and scroll it into view — what the
45
+ * native navigator's `revealing`/`step()`/`revealed` does with
46
+ * `pane.current` and `scrollToCurrent`. `revealed` is the owner's memory
47
+ * of the last completed walk: a path equal to it suppresses stepping —
48
+ * exactly upstream's `revealing = revealed === address ? undefined :
49
+ * address` on a body mount — while `onSettled` reports each completed
50
+ * walk (found, unreachable, or canceled) so the owner can record it.
51
+ * Absent on the Files page, which has no current file.
52
+ */
53
+ readonly reveal?: {
54
+ readonly path: string;
55
+ readonly revealed?: string | undefined;
56
+ readonly onSettled?: ((path: string) => void) | undefined;
57
+ } | undefined;
58
+ /**
59
+ * Expansion, scroll offset, and reveal memory saved while this tree's
60
+ * owner was closed — the pane record's surviving `expanded`/`scrollTop`/
61
+ * `revealed` upstream. `expanded` is replayed through `toggle` (the
62
+ * verbatim face's own restore-preferences channel) right after `start`,
63
+ * so every remembered directory re-expands as its level lands; the
64
+ * scroll offset is deferred until the body overflows, and `revealed`
65
+ * seeds the reveal's suppression.
66
+ */
67
+ readonly saved?: {
68
+ readonly expanded?: readonly string[];
69
+ readonly scrollTop?: number;
70
+ readonly revealed?: string;
71
+ } | undefined;
29
72
  };
30
73
  /**
31
74
  * Order one level's entries for display: directories first, then everything
@@ -47,4 +90,4 @@ export declare function failureLine(t: TranslateNS<'sidebarFiles'>, failure: Rem
47
90
  * has opened under it — the upstream body's scroll, seed, and render logic
48
91
  * verbatim, with the root arriving as a prop instead of `useSessions(cwd)`.
49
92
  */
50
- export declare function FilesTree({ tabId, sessionId, root, signal, useStore, actions, start, toggle, onOpen, t, nativeTree, }: FilesTreeProps): ReactNode;
93
+ export declare function FilesTree({ tabId, sessionId, root, signal, useStore, actions, hold, release, toggle, onOpen, t, nativeTree, reveal, saved, onScrollOffset, }: FilesTreeProps): ReactNode;
@@ -47,26 +47,67 @@ export type TreeSelection = Readonly<Record<string, RootView>>;
47
47
  * native tree across a body remount (opening a file deactivates this tab,
48
48
  * unmounting its body without ending the record).
49
49
  */
50
+ /**
51
+ * The tree-view memory one closed owner keeps for its next open — the
52
+ * fork's spelling of upstream's pane record: `expanded`/`scrollTop` survive
53
+ * the hold's end, and `revealed` is the last previewed file the reveal
54
+ * walk completed (upstream's `pane.revealed`). Entries live per
55
+ * (key, root), so one pane previewing files of different roots keeps each
56
+ * root's memory apart.
57
+ */
58
+ export interface FilesTreeSaved {
59
+ /** The root this snapshot belongs to; a stale snapshot never crosses roots. */
60
+ readonly root: string;
61
+ /** Expansion preferences at the moment the owner closed. */
62
+ readonly expanded?: readonly string[];
63
+ /** The body's scroll offset at the moment it closed. */
64
+ readonly scrollTop?: number;
65
+ /** The last previewed file whose reveal completed — suppresses re-stepping. */
66
+ readonly revealed?: string;
67
+ }
50
68
  export interface FilesTreeTakeover {
51
69
  /**
52
- * The live signal for (tabId, root); reuses the live entry so a remounted
53
- * body finds its bucket and watches intact. A different root — or an entry
54
- * already aborted — ends the previous controller before minting the next.
55
- * @param tabId - the pane's dockkit tab id.
70
+ * The record signal for (key, root); reuses the live entry so a remounted
71
+ * body finds its tree bucket and resumes it. Only the record's end — the
72
+ * owner dying, or a different root superseding it — aborts the controller;
73
+ * a navigator closing is a hold ending and leaves this signal live.
74
+ * @param key - the owner's dockkit identity: the Files pane's tab id, or
75
+ * the preview navigator's pane id.
56
76
  * @param root - absolute path of the root being browsed.
57
- * @param section - the dockkit tabHost section the caller mounted under; a
58
- * live entry keeps an observer on it that ends the takeover whenever the
59
- * section leaves the document — the record's real end — including when the
60
- * body that mounted it has long been unmounted itself.
77
+ * @param section - how the owner's survival is checked: an Element (kept
78
+ * while `isConnected`) or a predicate (kept while it returns true —
79
+ * the preview navigator's "some connected element still carries this
80
+ * pane id" query, since a dockkit pane has no stable element across a
81
+ * `replaceTab`). The watch lives at this scope and outlives `end()`:
82
+ * ending the hold never disarms it, so the owner's real death drops
83
+ * the saved memory even after the body that mounted it is gone.
61
84
  * @returns the signal the forked tree lives under.
62
85
  */
63
- readonly signal: (tabId: TabId, root: string, section?: Element) => AbortSignal;
86
+ readonly signal: (key: TabId, root: string, section?: Element | (() => boolean)) => AbortSignal;
64
87
  /**
65
- * Abort and drop one tab's takeover: the reader deselected or switched
66
- * roots, or the tab record itself went away.
67
- * @param tabId - the pane's dockkit tab id.
88
+ * Abort and drop one owner's record: the owner died, the selection moved to
89
+ * another root, or a body with no pane carrier closed. A normal navigator
90
+ * close is not a record end — the body release keeps the bucket. The saved
91
+ * memory survives here because the death watch owns the only real drop;
92
+ * this method only guarantees a superseded record stops writing.
93
+ * @param key - the owner's dockkit identity.
68
94
  */
69
- readonly end: (tabId: TabId) => void;
95
+ readonly end: (key: TabId) => void;
96
+ /**
97
+ * The tree-view memory kept for (key, root) — `undefined` before the
98
+ * first close or after the owner's section died.
99
+ * @param key - the owner's dockkit identity.
100
+ * @param root - absolute path of the root the memory belongs to.
101
+ */
102
+ readonly saved: (key: TabId, root: string) => FilesTreeSaved | undefined;
103
+ /**
104
+ * Merge memory for (key, snapshot.root): fields present in the snapshot
105
+ * overwrite, fields absent keep what was saved before — so a settle-time
106
+ * `revealed` write survives the close-time `expanded`/`scrollTop` write.
107
+ * @param key - the owner's dockkit identity.
108
+ * @param snapshot - the memory fields to record.
109
+ */
110
+ readonly save: (key: TabId, snapshot: FilesTreeSaved) => void;
70
111
  }
71
112
  /** The inject face the registration composes onto the occupant's props. */
72
113
  export interface FilesTreeInjected {
@@ -74,6 +115,14 @@ export interface FilesTreeInjected {
74
115
  readonly face: FilesInjected;
75
116
  /** Open one `dsh-resource://file` address in the host viewer. */
76
117
  readonly openFile: (address: string) => void;
118
+ /**
119
+ * Open one `dsh-resource://file` address replacing the given tab — the
120
+ * document-preview navigator's open route, where the native navigator's
121
+ * `onOpen` is `tab.actions.openResource(address, { replaceTab: true })`.
122
+ * @param tabId - the preview tab the opened file replaces.
123
+ * @param address - the file's `dsh-resource://file` address.
124
+ */
125
+ readonly openFileIn: (tabId: TabId, address: string) => void;
77
126
  /**
78
127
  * The reserved inject compartment: the slot renderer binds each source to a
79
128
  * `use<Name>` selector hook, so `treeSelection` reaches the component as
@@ -99,6 +148,8 @@ export interface FilesTreeSurface {
99
148
  readonly actions: FilesTreeProps['actions'];
100
149
  readonly face: FilesInjected;
101
150
  readonly openFile: (address: string) => void;
151
+ /** The preview navigator's replace-tab open route; see {@link FilesTreeInjected.openFileIn}. */
152
+ readonly openFileIn: FilesTreeInjected['openFileIn'];
102
153
  readonly t: FilesTreeProps['t'];
103
154
  /** Selector hook over this session's per-tab root selections. */
104
155
  readonly useTreeSelection: SnapshotSelectorHook<TreeSelection>;
@@ -123,9 +174,10 @@ export declare function lazyFilesRemote(ctx: ClientContext): ClientRemote;
123
174
  /**
124
175
  * The registration's `store`/`inject` declarations, built once in `apply`.
125
176
  *
126
- * The inject face nests the verbatim files face under `face` and adds the
127
- * session-bound `openFile` — keeping `FilesInjected` untouched means the
128
- * fork's call sites and the sync diff stay upstream-shaped.
177
+ * The inject face nests the files face under `face` and adds the
178
+ * session-bound `openFile`; the fork's call sites stay upstream-shaped, the
179
+ * one lifecycle delta being the hold/release pair the preview navigator needs
180
+ * (see FORK.md).
129
181
  * @param ctx - the client root context (the remote/sidebarRight lookups).
130
182
  * @returns the store handle and the inject factory for `register`.
131
183
  */
@@ -148,6 +200,7 @@ export declare function createFilesTreeSurface(props: {
148
200
  readonly actions: FilesTreeSurface['actions'];
149
201
  readonly face: FilesInjected | undefined;
150
202
  readonly openFile: ((address: string) => void) | undefined;
203
+ readonly openFileIn: FilesTreeInjected['openFileIn'] | undefined;
151
204
  readonly useTreeSelection: FilesTreeSurface['useTreeSelection'] | undefined;
152
205
  readonly selectRoot: FilesTreeSurface['selectRoot'] | undefined;
153
206
  readonly takeover: FilesTreeSurface['takeover'] | undefined;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The tree's asynchronous half: listing directories into the store.
3
3
  *
4
- * The component never awaits anything. It calls `start` / `refresh` / `toggle`, and
4
+ * The component never awaits anything. It calls `hold` / `release` / `refresh` / `toggle`, and
5
5
  * this face performs the listing and writes the outcome through the store's own
6
6
  * actions — the Slot-standard `inject` shape, so the session id is resolved by
7
7
  * the framework and the write set stays the store's.
@@ -17,6 +17,12 @@
17
17
  * `signal`: a request is not made for a record that already ended, and when the
18
18
  * record goes away the bucket and the tab's listing bookkeeping are forgotten,
19
19
  * so no later settlement writes to it.
20
+ *
21
+ * A hold can end without its record ending: `release` closes the hold's
22
+ * directory node and watches but keeps the listed levels and expansion, and
23
+ * the next `hold` reopens them. That is upstream's `hold(paneId, cwd)` —
24
+ * closing a navigator is not closing its pane, so reopening draws the kept
25
+ * rows instead of falling back to a loading row.
20
26
  */
21
27
  import type { ClientRemote, RemoteResult } from '@deepseek-ai/dsh-api-remotes/client';
22
28
  import type { BoundActions } from '@deepseek-ai/dsh-client-store';
@@ -75,12 +81,35 @@ export interface FilesInjected {
75
81
  /** Control automatic rereads without closing watches. @param tabId - owning tab. @param enabled - automatic-refresh setting. */
76
82
  readonly setAutoRefresh: (tabId: TabId, enabled: boolean) => void;
77
83
  /**
78
- * Seed this tab's tree and list its root.
84
+ * Seed this tab's tree and list its root. This is the record's first open:
85
+ * it always reseeds the store at `root`, so use {@link hold} for later holds.
79
86
  * @param tabId - the tab being drawn.
80
87
  * @param root - absolute path of the workspace root.
81
88
  * @param signal - the tab record's lifetime.
82
89
  */
83
90
  readonly start: (tabId: TabId, root: string, signal: AbortSignal) => void;
91
+ /**
92
+ * Open one hold on this tab's tree and list its root.
93
+ *
94
+ * The store bucket is reused when it already belongs to `root`; its listed
95
+ * levels stay drawn while the reopened node's listings settle, so a navigator
96
+ * closed and reopened by the reader never flashes a loading row over rows it
97
+ * already had. A different root reseeds the bucket, exactly like `start`.
98
+ * @param tabId - the tab being drawn.
99
+ * @param root - absolute path of the workspace root.
100
+ * @param signal - the tab record's lifetime; aborting it still forgets the
101
+ * bucket and closes the node.
102
+ * @param restore - expanded directories to reopen as their parent listing
103
+ * returns (the kept tree's expansion preferences).
104
+ */
105
+ readonly hold: (tabId: TabId, root: string, signal: AbortSignal, restore?: readonly string[]) => void;
106
+ /**
107
+ * End one hold: close its directory node and watches while keeping the store
108
+ * bucket and expansion for the next `hold`. The record's `signal` still owns
109
+ * the bucket; aborting it forgets the tree.
110
+ * @param tabId - the tab whose hold ends.
111
+ */
112
+ readonly release: (tabId: TabId) => void;
84
113
  /**
85
114
  * List one directory into the store.
86
115
  * @param tabId - the tab being drawn.
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Path-location mechanics for the preview navigator's takeover and reveal,
3
+ * ported from upstream's `ui-sidebar-files` navigator internals
4
+ * (`0.2.2-alpha.3`; the package build is byte-identical at `0.2.2-rc.1`):
5
+ * the same `windowsRoot`, `underRoot`, and `locateFile` the native
6
+ * FileNavigator runs against its pane tree, spelled against this fork's
7
+ * `FilesTabState` — the store shape is the same (`root`, `levels` keyed by
8
+ * absolute path, `expanded`), only the `refreshing` flag is absent, so a
9
+ * stale level reports `pending: false` exactly like a settled native one.
10
+ *
11
+ * Everything here is a port or plugin-owned logic on top of it; nothing in
12
+ * this file needs upstream sync beyond the documented provenance.
13
+ *
14
+ * @module @dsh-electron/dsh-plugin-multi-root-workspace/client/files-tree/locate
15
+ */
16
+ import type { RootView, RootsView } from '../../contract.ts';
17
+ import type { FilesTabState } from './store.ts';
18
+ /**
19
+ * Whether a root is a Windows drive or UNC path, in either separator
20
+ * spelling, where names compare regardless of case.
21
+ * @param root - the tree's root, or a prefix built from it.
22
+ * @returns `true` for a drive letter followed by a separator, or a leading
23
+ * double separator.
24
+ */
25
+ export declare function windowsRoot(root: string): boolean;
26
+ /**
27
+ * An absolute `/`-separated path relative to a tree's root.
28
+ * @param path - the absolute path, in either separator spelling.
29
+ * @param root - the tree's root, in either separator spelling.
30
+ * @returns the path under the root, or `undefined` outside it.
31
+ */
32
+ export declare function underRoot(path: string, root: string): string | undefined;
33
+ /**
34
+ * The workspace-relative path of a file under a tree's root, validated the
35
+ * way upstream's `relativeFileOf` tail validates it: nothing absolute, and
36
+ * no empty or dot segments.
37
+ * @param path - the file's absolute path, in either separator spelling.
38
+ * @param root - the root it must sit under.
39
+ * @returns the `/`-separated relative path, or `undefined` outside the root.
40
+ */
41
+ export declare function relativeUnderRoot(path: string, root: string): string | undefined;
42
+ /**
43
+ * The additional root that owns one absolute file path: available roots
44
+ * only, the longest matching root path winning when registrations nest.
45
+ * @param view - the session's registry view.
46
+ * @param path - the file's absolute path, in either separator spelling.
47
+ * @returns the owning root, or `undefined` when the file is outside every
48
+ * available additional root (the primary root included).
49
+ */
50
+ export declare function rootForPath(view: RootsView, path: string): RootView | undefined;
51
+ /** What walking the listed levels toward a workspace-relative file found. */
52
+ export interface FileLocation {
53
+ /** The directories verified so far, each named by its listing's spelling. */
54
+ readonly ancestors: readonly {
55
+ readonly parent: string;
56
+ readonly path: string;
57
+ }[];
58
+ /** The file's tree key once its row exists, `undefined` until or unless it does. */
59
+ readonly current: string | undefined;
60
+ /** Whether a level on the way is still pending its listing. */
61
+ readonly pending: boolean;
62
+ }
63
+ /**
64
+ * Walk the listed levels to a workspace-relative file, keeping the listing's
65
+ * spelling of each name; a Windows root also matches names regardless of
66
+ * case. A verbatim port of upstream's navigator helper — the fork's
67
+ * `LevelState` carries no `refreshing` flag, so a stale level reports
68
+ * `pending: false` like a settled native one.
69
+ * @param tree - the tab's tree.
70
+ * @param relativePath - the file's path under the tree's root, `/`-separated.
71
+ * @returns the ancestors found so far, the file's tree key, and whether a
72
+ * level is pending.
73
+ */
74
+ export declare function locateFile(tree: Pick<FilesTabState, 'root' | 'levels'>, relativePath: string): FileLocation;
@@ -0,0 +1,98 @@
1
+ /**
2
+ * The document-preview navigator's additional-root retarget.
3
+ *
4
+ * Upstream's `sidebar.files.navigator` Factory (`ui-sidebar-files`, added at
5
+ * `0.2.2-alpha.3`) is the Folder-toggle tree the document preview draws
6
+ * beside its body. Its root is hard-wired to the session's `cwd` — the
7
+ * previewed file's absolute path is located against that root, so a file
8
+ * that lives under an additional root lands outside every tree it can draw:
9
+ * the navigator opens on the primary root, unexpanded and unmarked.
10
+ *
11
+ * The Factory itself cannot be retargeted — it is a registration upstream
12
+ * already owns, and its root is not an input. What CAN move is what its
13
+ * `aside[data-files-navigator]` draws: this occupant mounts in the preview
14
+ * header's `sidebar.right.tab.document.actions` seat (owner prop
15
+ * `absolutePath` — the previewed file's host path), watches the preview's
16
+ * `[data-textpreview-content]` row for the aside, and when the file sits
17
+ * under an available additional root it lends the aside's body area to the
18
+ * forked tree, the same takeover the Files page's root switcher performs.
19
+ * The aside itself — its width, its push/overlay/fill modes, its resize
20
+ * separator — stays native; only the tree inside is the fork's.
21
+ *
22
+ * Everything is keyed by the dockkit PANE id (`data-files-navigator` on the
23
+ * aside, `data-dockkit-pane` on the content section), never by the preview
24
+ * tab: upstream's navigator records live in `store.byPane`, and the pane
25
+ * survives what the tab does not — `replaceTab` mints a fresh tab id, so
26
+ * opening a file from the retargeted tree destroys the preview tab that
27
+ * opened it. The inject-side takeover map holds the pane-record memory
28
+ * (`expanded`/`scrollTop`/`revealed`) across that death; the component's
29
+ * own refs only ever carry the live copy.
30
+ *
31
+ * Three upstream behaviors are reproduced, not approximated:
32
+ *
33
+ * - **Hold lifetime.** The native navigator holds its pane tree only while
34
+ * it is open (`hold(paneId, cwd)` gated on `state.open`): closing the
35
+ * navigator closes the directory node — watches and listings end — while
36
+ * the pane record keeps `expanded`/`scrollTop`/`revealed` for the next
37
+ * open. Here the takeover `signal` is requested when the aside appears
38
+ * and ended when it leaves. The saved snapshot is written into the
39
+ * inject-side map continuously — the bucket's expansion set mirrors into
40
+ * it, the forked body reports its live scroll offset, and a settled
41
+ * reveal records its file — so no cleanup ordering ever decides what is
42
+ * remembered. A dockkit pane has no stable element (a non-empty pane's
43
+ * id rides on its selected tab's host, which `replaceTab` swaps out), so
44
+ * the owner's death is checked by query: the pane lives while some
45
+ * connected element still carries its id, and the watch that drops the
46
+ * memory outlives every `end` because the body's cleanup always wins
47
+ * the unmount race.
48
+ * - **Reveal.** The native navigator seeds `pane.revealing` with the drawn
49
+ * file's address — unless `pane.revealed` already names it — and steps
50
+ * the walk open (ancestors expanded one listing at a time, then the
51
+ * file's row marked current and scrolled into view). The forked tree's
52
+ * `reveal` prop drives the same sequence against the additional root,
53
+ * with the saved `revealed` suppressing a repeat of a completed walk, so
54
+ * collapsing a directory and reopening the navigator keeps the reader's
55
+ * collapse exactly as upstream's pane record does.
56
+ * - **Replace-tab open.** The native navigator's `onOpen` is
57
+ * `tab.actions.openResource(address, { replaceTab: true })` — the opened
58
+ * file takes the preview's own tab. The forked tree's opens route through
59
+ * `openFileIn`, which spells the same intent to `openResourceIn` as
60
+ * `{ replaceTab: tabId }` against the preview's dockkit tab id.
61
+ *
62
+ * Every step degrades silently: no `[data-textpreview-url]` ancestor, no
63
+ * dockkit pane id, no `panel`, an address that is not a session file of
64
+ * THIS session, a file outside every available additional root (the
65
+ * primary root's own files included), or a fork that cannot render — each
66
+ * leaves the native navigator completely untouched. Where the upstream
67
+ * hooks do not exist (a runtime without this navigator), the marker span
68
+ * is the only trace the occupant leaves, and it draws nothing.
69
+ *
70
+ * @module @dsh-electron/dsh-plugin-multi-root-workspace/client/files-tree/navigator
71
+ */
72
+ import { type ReactNode } from 'react';
73
+ import type { NativeTreeRenderer } from '../../compat/files-tree.ts';
74
+ import type { PanelClient } from '../panel-client.ts';
75
+ import { type FilesTreeSurface } from './adapter.tsx';
76
+ /** What the registered document-actions occupant needs beyond the slot owner. */
77
+ export interface NavigatorRetargetProps {
78
+ /** The previewed file's absolute host path — the slot owner's `absolutePath`. */
79
+ readonly absolutePath: string;
80
+ /** This preview's session — the composed session share; absent without one. */
81
+ readonly sessionId: string | undefined;
82
+ /** The channel client; absent when this composition has no host Connection. */
83
+ readonly panel: PanelClient | undefined;
84
+ /**
85
+ * The forked tree's shared props; the registration gates on it, so the
86
+ * occupant only renders where the fork can — the native navigator keeping
87
+ * its tree is the same behavior an upstream Files page without the fork
88
+ * would produce.
89
+ */
90
+ readonly filesTree: FilesTreeSurface;
91
+ readonly nativeTree?: NativeTreeRenderer | undefined;
92
+ }
93
+ /**
94
+ * The marker that lives in the preview header and, while the file it names
95
+ * sits under an additional root, lends the navigator aside to the forked
96
+ * tree. It draws nothing of its own.
97
+ */
98
+ export declare function NavigatorRetarget(props: NavigatorRetargetProps): ReactNode;
@@ -25,6 +25,13 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
25
25
  readonly absolutePath: string;
26
26
  };
27
27
  };
28
+ 'sidebar.right.tab.document.actions': {
29
+ kind: 'list';
30
+ scope: 'session';
31
+ owner: {
32
+ readonly absolutePath: string;
33
+ };
34
+ };
28
35
  }
29
36
  }
30
37
  /** The footer-action cell this plugin owns. */
@@ -111,6 +111,7 @@ export declare const zh: {
111
111
  'error.unavailable': string;
112
112
  'error.copy-failed': string;
113
113
  'error.session-not-found': string;
114
+ 'error.session-not-live': string;
114
115
  'error.unsupported-path': string;
115
116
  'error.protected-path': string;
116
117
  'error.protected-boundary-unknown': string;
@@ -220,6 +221,7 @@ export declare const en: {
220
221
  'error.unavailable': string;
221
222
  'error.copy-failed': string;
222
223
  'error.session-not-found': string;
224
+ 'error.session-not-live': string;
223
225
  'error.unsupported-path': string;
224
226
  'error.protected-path': string;
225
227
  'error.protected-boundary-unknown': string;
@@ -11,4 +11,4 @@
11
11
  * @module @dsh-electron/dsh-plugin-multi-root-workspace/client/styles
12
12
  */
13
13
  /** The stylesheet text; every class is prefixed `mrfw-` to stay collision-free. */
14
- export declare const STYLES = "\n/* Sidebar footer row, mirroring the host ui-settings-general trigger: the row\n * wrapper overhangs each side by 2px (width calc(100% + 4px) against the\n * shell's 12px inline padding) so the icon's ink line lands at 18px from the\n * column edge \u2014 exactly where the Settings gear below sits. */\n.mrfw-triggerRow {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n width: calc(100% + 4px);\n margin: 4px -2px;\n}\n\n.mrfw-triggerRow.mrfw-railRow {\n width: 36px;\n margin: 8px 0 10px;\n}\n\n.mrfw-trigger {\n box-sizing: border-box;\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 8px;\n width: auto;\n height: 42px;\n margin: 0;\n padding: 0 10px 0 8px;\n border: none;\n border-radius: 12px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n font-size: 14px;\n line-height: 22px;\n text-align: left;\n cursor: pointer;\n overflow: hidden;\n transition: background-color var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-trigger:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.mrfw-triggerIcon {\n flex: none;\n display: inline-flex;\n}\n\n.mrfw-triggerLabel {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.mrfw-triggerRail {\n flex: none;\n width: 36px;\n height: 36px;\n margin: 0;\n padding: 0;\n gap: 0;\n border-radius: 50%;\n justify-content: center;\n}\n\n/* Icon-only launcher inside the upstream Files tab header. Upstream's\n FilesBody renders .header as one flat flex row \u2014 PathLabel, then the\n reload button, then the files.actions slot occupants \u2014 and each of those\n children carries a stable data-files-* attribute on the flex item itself\n (data-files-root on the pane, data-files-path, data-files-reload).\n A registration order sorts only INSIDE the actions slot and can never\n overtake the reload button, so the launcher is moved with the flex order\n property instead: this wrapper is the slot's root element and therefore a\n direct flex item of .header, and order: -1 puts it ahead of every\n order-0 sibling while the :has() rule below keeps the path first. */\n.mrfw-fileLauncher {\n order: -1;\n flex: none;\n display: flex;\n align-items: center;\n}\n\n/* Pin the upstream path label ahead of the launcher \u2014 but only while this\n plugin is in the row: the :has() guard keeps a rule that names an\n upstream element inert whenever the launcher is absent. The\n :not([data-files-entry]) qualifier is load-bearing, not decorative:\n upstream puts data-files-path on EVERY tree row too (the row's own\n absolute path), so an unqualified selector would match the whole tree,\n not just the header's PathLabel. Both selectors depend on upstream's DOM\n shape, which is not part of the slot contract; if it changes, the rules\n simply stop matching and the launcher falls back to its in-slot position \u2014\n a silent degradation, never a broken header. */\n[data-files-root]:has(.mrfw-fileLauncher) [data-files-path]:not([data-files-entry]) {\n order: -2;\n}\n\n/* The root switcher is the launcher's grown-up form on runtimes whose\n files.actions owner carries absolutePath. It takes the path label's flex\n position and stretch: order: -1 ahead of every order-0 sibling, and a\n growing min-width:0 item so both the trigger label and the PathLabel\n inside it can ellipsize instead of pushing the header controls out. */\n.mrfw-rootSwitcher {\n order: -1;\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n align-items: center;\n /* Same 4px the upstream .header puts between its own flex items, so the\n takeover controls (reload, open-in-app fork) sit at the same offsets the\n hidden native ones did \u2014 no drift between primary and additional state. */\n gap: 4px;\n}\n\n/* While the switcher exists it hides the upstream path label \u2014 the\n :has() guard again keeps the upstream-naming rule inert unless this\n plugin is actually in the row. The switcher draws its own PathLabel of\n the selected root next to the trigger (className mrfw-switcherPath, no\n data-files-* attributes), so the header keeps a path in the same spot.\n :not([data-files-entry]) is what confines this rule to the header:\n every tree row carries data-files-path with its own path as the value,\n and only the PathLabel carries it bare. Without the qualifier this\n display:none would blank the entire native tree. */\n[data-files-root]:has(.mrfw-rootSwitcher) [data-files-path]:not([data-files-entry]) {\n display: none;\n}\n\n/* While the switcher names an additional root, the native tree body and its\n reload hide: the reload refreshes the very tree that is no longer\n visible, and the plugin's forked tree is portaled in as the body's sibling.\n The header still offers a reload \u2014 the switcher's own .mrfw-switcherReload\n calls the forked face's refresh. The native tree keeps watching in the\n background, so switching back to the primary root restores it instantly. */\n[data-files-root]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-files-body],\n[data-files-root]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-files-reload] {\n display: none;\n}\n\n/* Newer Files pages place the navigator beside the header instead of\n wrapping both in data-files-root. Target the page without hiding the\n portaled replacement or any of its rows. */\n[data-files-page]:has(.mrfw-fileLauncher) [data-files-path]:not([data-files-entry]) { order: -2; }\n[data-files-page]:has(.mrfw-rootSwitcher) [data-files-path]:not([data-files-entry]) { display: none; }\n[data-files-page]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-files-content],\n[data-files-page]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-files-reload] { display: none; }\n[data-files-page]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-slot=\"sidebar.right.tab.files.actions\"] > *:has([data-open-target=\"directory\"]:not(.mrfw-openSplit)),\n[data-files-page]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-open-target=\"directory\"]:not(.mrfw-openSplit) { display: none; }\n\n/* While the switcher names an additional root, the native open-in-app split\n button hides too: its slot props carry the pane's primary root, so it\n would always open the primary root no matter what the switcher selected.\n The header gets the plugin's own fork of that same control instead (the\n open-in-app directory), wired to the selected root.\n\n The slot's render site is wrapped in the renderer's own anchor \u2014\n <div data-slot=\"sidebar.right.tab.files.actions\" style=\"display:contents\">\n \u2014 so the header's flex items inside it are the occupants themselves, and\n the native item is the ui-primitives Menu anchor span wrapping the marked\n .split. The first selector hides that occupant item through the data-slot\n anchor: hiding only the inner control would leave the empty anchor span\n as a zero-width flex item whose header gap pushes the fork 4px left of\n the native position. The wrapper itself can never be the target \u2014 its\n inline display:contents beats any stylesheet rule, and hiding it would\n take the switcher with it. The second selector is the fallback for an\n upstream that moves the attribute off the item. The fork survives both:\n the only data-open-target inside .mrfw-rootSwitcher is its own\n .mrfw-openSplit, which :not() excludes. */\n[data-files-root]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-slot=\"sidebar.right.tab.files.actions\"] > *:has([data-open-target=\"directory\"]:not(.mrfw-openSplit)),\n[data-files-root]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-open-target=\"directory\"]:not(.mrfw-openSplit) {\n display: none;\n}\n\n/* The trigger borrows the path label's look: quiet text with a folder\n glyph, the hover of the neighboring header buttons, and the overflow\n behavior PathLabel itself uses in a narrow header. It may shrink but\n never grows \u2014 the PathLabel after it owns the free header space. */\n.mrfw-rootSwitchBtn {\n flex: 0 1 auto;\n min-width: 0;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 28px;\n margin: 0;\n padding: 0 4px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n font-size: inherit;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-rootSwitchBtn:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.mrfw-rootSwitchBtn .mrfw-triggerIcon {\n color: var(--dsw-alias-label-secondary);\n}\n\n.mrfw-rootSwitchLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mrfw-rootSwitchChevron {\n margin-left: auto;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* The selected root's full path sits between the trigger and the reload \u2014\n the very PathLabel upstream draws there, so it brings its own grow,\n left-clip and hover-title behavior; only the gutters are ours. The right\n margin plus the container gap reproduces upstream's .path margin-right\n 12px + header gap 4px; the left gutter comes from the same container gap. */\n.mrfw-switcherPath {\n margin: 0 12px 0 0;\n}\n\n/* The takeover's own reload, standing exactly where the hidden native one\n did: the upstream .tool recipe verbatim (28px hit area, 15px glyph,\n secondary voice, hover fills). It calls the forked face's refresh \u2014 an\n in-place re-list, not a remount. */\n.mrfw-switcherReload {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 6px;\n border: none;\n border-radius: var(--dsw-radius-sm);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n line-height: 1;\n cursor: pointer;\n}\n\n.mrfw-switcherReload:hover {\n color: var(--dsw-alias-label-primary);\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n/* \u2500\u2500 files-tree fork (verbatim rules, renamed classes) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n Copied from upstream's FilesBody.module.css (ui-sidebar-files @\n 0.2.2-alpha.2) with local names mapped to mrfw-ft* so the rules cannot\n collide with host DOM \u2014 and so the fork's own body (which must NOT carry\n data-files-body) stays visible while the rules above hide the native one.\n The header-only rules (root/header/path/tool/status/statusLine/titleIcon)\n belong to the upstream shell this fork drops and are not mapped. Fork sync\n re-diffs the upstream file and re-applies the rename \u2014 see\n src/client/files-tree/FORK.md. */\n\n/* The pane's own .root already supplies the flex column, color, and font;\n the fork's body takes the same stretch item the hidden native body held,\n including the workspace list's 2px scrollbar offset and stable gutter. */\n.mrfw-ftBody {\n flex: 1 1 auto;\n min-height: 0;\n margin-right: 2px;\n padding: 8px 0 8px 8px;\n overflow: auto;\n scrollbar-gutter: stable;\n}\n\n.mrfw-ftBody::-webkit-scrollbar-track {\n margin: 2px;\n}\n\n.mrfw-ftLevel {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.mrfw-ftLevel .mrfw-ftLevel {\n padding-left: 18px;\n}\n\n.mrfw-ftItem {\n margin: 0;\n padding: 0;\n}\n\n/* Rows abut, so the hover fill is the whole row; the tree's air is this\n inset, not a gap between rows. */\n.mrfw-ftRow {\n display: flex;\n gap: 6px;\n align-items: center;\n width: 100%;\n min-width: 0;\n padding: 5px 10px;\n color: inherit;\n font: inherit;\n text-align: left;\n background: transparent;\n border: 0;\n border-radius: var(--dsw-radius-md);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .mrfw-ftRow:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n/* The folder glyph rides the tertiary ink, as the workspace tree's does. */\n.mrfw-ftIcon {\n flex: 0 0 auto;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* The type's coloured sheet at the folder glyph's 16px; its colour is its own. */\n.mrfw-ftFileIcon {\n flex: 0 0 auto;\n}\n\n.mrfw-ftName {\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n/* Neither a file nor a directory: shown so the directory is reported whole,\n greyed so nobody tries to open it. */\n.mrfw-ftOther {\n color: var(--dsw-alias-label-tertiary);\n cursor: default;\n}\n\n@media (hover: hover) {\n .mrfw-ftOther:hover {\n background: transparent;\n }\n}\n\n.mrfw-ftNote {\n margin: 0;\n padding: 3px 10px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n}\n\n/* \u2500\u2500 open-in-app fork (verbatim rules, renamed classes) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n Copied from upstream's OpenTargetButton.module.css\n (dsh-client-ui-open-in-app @ 0.2.1-alpha.2) with local names mapped to\n mrfw-open* so the rules cannot collide with host DOM. Fork sync re-diffs\n the upstream file and re-applies the rename \u2014 see\n src/client/open-in-app/FORK.md. */\n\n/* Sized to sit in the document header's 24px control row beside its round\n icon buttons: a hairline pill with a 12px label and a narrow chevron half. */\n.mrfw-openMenuAnchor {\n display: inline-flex;\n flex: none;\n align-self: center;\n}\n\n.mrfw-openSplit {\n display: inline-flex;\n align-items: stretch;\n box-sizing: border-box;\n height: 24px;\n overflow: hidden;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm);\n font-family: var(--dsw-font-family);\n}\n\n.mrfw-openMain,\n.mrfw-openChevron {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 0;\n background: none;\n color: var(--dsw-alias-label-primary);\n font-size: 11px;\n line-height: 16px;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.mrfw-openMain {\n gap: 4px;\n padding: 3px 5px;\n}\n\n.mrfw-openChevron {\n padding: 3px 4px 3px 3px;\n border-left: 0.5px solid var(--dsw-alias-border-l4);\n color: var(--dsw-alias-label-secondary);\n}\n\n.mrfw-openMain:hover:not(:disabled),\n.mrfw-openMain:focus-visible,\n.mrfw-openChevron:hover:not(:disabled),\n.mrfw-openChevron:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n/* Pending disables clicks without a restyle; only hover feedback pauses. */\n.mrfw-openMain:disabled,\n.mrfw-openChevron:disabled {\n cursor: default;\n}\n\n.mrfw-openAppIcon {\n object-fit: contain;\n}\n\n/* The unavailable preview emphasizes the same actions with a labeled button. */\n.mrfw-openSplit[data-size='large'] {\n height: 36px;\n border-radius: var(--dsw-radius-md);\n border-color: var(--dsw-alias-border-l2);\n}\n\n.mrfw-openSplit[data-size='large'] .mrfw-openMain {\n gap: 6px;\n padding: 6px 14px;\n font-size: 14px;\n}\n\n.mrfw-openSplit[data-size='large'] .mrfw-openChevron {\n padding: 6px 10px;\n}\n\n.mrfw-openSkeleton { display: inline-block; flex: none; border-radius: var(--dsw-radius-xs); background: var(--dsw-alias-interactive-bg-hover); }\n\n.mrfw-overlay {\n position: fixed;\n inset: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n}\n\n.mrfw-mask {\n position: absolute;\n inset: 0;\n background: var(--dsw-alias-bg-mask-1);\n backdrop-filter: var(--dsw-mask-blur);\n}\n\n.mrfw-dialog {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n width: min(640px, 100%);\n max-height: 100%;\n overflow: hidden;\n border: none;\n border-radius: 24px;\n background: var(--dsw-alias-bg-layer-2);\n box-shadow: var(--dsw-elevation-prominent);\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n outline: none;\n}\n\n.mrfw-header {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 22px 14px 12px 24px;\n}\n\n.mrfw-title {\n margin: 0;\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary);\n}\n\n.mrfw-close {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n border-radius: 8px;\n background: transparent;\n cursor: pointer;\n color: var(--dsw-alias-label-secondary);\n transition: background-color var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-close:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.mrfw-body {\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow-y: auto;\n padding: 0 24px 24px;\n}\n\n.mrfw-alert {\n margin: 0 0 8px;\n font-size: 14px;\n line-height: 22px;\n color: var(--dsw-alias-state-error-primary);\n}\n\n.mrfw-section {\n display: flex;\n flex-direction: column;\n}\n\n.mrfw-section + .mrfw-section {\n margin-top: 8px;\n}\n\n.mrfw-sectionTitleRow {\n display: flex;\n align-items: baseline;\n gap: 8px;\n padding: 8px 0 4px;\n}\n\n.mrfw-sectionTitle {\n font-size: 14px;\n line-height: 22px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary);\n}\n\n.mrfw-sectionNote {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.mrfw-row {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 12px 0;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.mrfw-rowBare {\n border-bottom: none;\n}\n\n/* A root entry's two lines: the display name on top, the absolute path under\n it in the tertiary voice (the workspace rows recipe of the host sidebar). */\n/* Match upstream General Settings' DeveloperToolsRow layout. */\n.mrfw-skillsSettings {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n padding: 16px 0;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2);\n}\n.mrfw-skillsSettingsText { min-width: 0; }\n.mrfw-settingsTitleRow {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.mrfw-skillsSettingsTitle { font-size: 14px; line-height: 20px; }\n.mrfw-skillsSettingsDescription {\n margin-top: 4px;\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n line-height: 18px;\n}\n.mrfw-rootText {\n display: flex;\n flex: 1 1 240px;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n/* Keep status tags and permission glyphs visible beside the alias, wrapping\n onto another line when the dialog is narrow. */\n.mrfw-rootName {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n font-size: 14px;\n line-height: 20px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary);\n}\n\n.mrfw-rootNameText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mrfw-rootPath {\n font-family: var(--ds-font-family-code);\n font-size: 12px;\n line-height: 18px;\n word-break: break-all;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* The path doubles as the copy control: an unstyled button that keeps the\n text recipe and makes the whole string clickable \u2014 the whole region, not\n just the icon, copies on click. */\n.mrfw-pathCopy {\n display: block;\n width: 100%;\n padding: 0;\n border: 0;\n background: transparent;\n text-align: left;\n cursor: pointer;\n}\n\n/* The trailing icon stays in flow but invisible until the path is hovered\n or focused: appearing never re-wraps the text, and the icon inherits the\n path's own tertiary ink. */\n.mrfw-pathCopyIcon {\n display: inline-flex;\n margin-left: 4px;\n vertical-align: -2px;\n opacity: 0;\n transition: opacity var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-pathCopy:hover .mrfw-pathCopyIcon,\n.mrfw-pathCopy:focus-visible .mrfw-pathCopyIcon {\n opacity: 1;\n}\n\n.mrfw-note {\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.mrfw-stateWarn {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-state-warn-primary);\n}\n\n.mrfw-btn {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n gap: 4px;\n height: 28px;\n padding: 0 10px;\n border: none;\n border-radius: 14px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n font-size: 12px;\n line-height: 18px;\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-btn[aria-busy='true'] {\n cursor: wait;\n}\n\n.mrfw-btn:disabled {\n cursor: not-allowed;\n opacity: 0.4;\n}\n\n.mrfw-btnGhost:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.mrfw-btnGhost:active:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-active);\n}\n\n/* The solid destructive action of the capsule family: the upgrade confirm's\n red button. state-error-primary is the error ink upstream also uses as a\n fill (StateDot); the hover mixes in the host's primary label token to\n follow its theme and contrast choices. Neither color is a guessed token:\n an undefined var() would fall back\n to transparent and white-out the whole button. */\n.mrfw-btnDanger {\n background: var(--dsw-alias-state-error-primary);\n color: var(--dsw-alias-label-primary-foreground);\n}\n\n.mrfw-btnDanger:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 85%, var(--dsw-alias-label-primary));\n}\n\n.mrfw-btnOutline {\n border: 0.5px solid var(--dsw-alias-border-l3);\n background: transparent;\n}\n\n.mrfw-btnOutline:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.mrfw-btnPrimary {\n background: var(--dsw-alias-button-primary-fill);\n color: var(--dsw-alias-label-primary-foreground);\n}\n\n.mrfw-btnPrimary:hover:not(:disabled) {\n background: var(--dsw-alias-button-primary-hover);\n}\n\n/* One icon-only action: a square of the capsule family, meaning in title.\n Declared after the .mrfw-btn family so its padding wins the cascade tie:\n the capsule's 0 10px padding would otherwise squeeze the icon glyph. */\n.mrfw-iconBtn {\n width: 28px;\n padding: 0;\n border-radius: 8px;\n}\n\n.mrfw-input {\n flex: 1 1 220px;\n min-width: 0;\n height: 32px;\n padding: 0 8px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-1);\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n font-size: 14px;\n line-height: 22px;\n outline: none;\n transition: border-color var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-input:focus {\n border-color: var(--dsw-alias-brand-primary);\n}\n\n.mrfw-input::placeholder {\n color: var(--dsw-alias-label-dimmed);\n}\n\n.mrfw-inputInline {\n flex: 1 1 auto;\n}\n\n.mrfw-accessSelect {\n flex: 0 0 auto;\n}\n\n/* The access dropdown's capsule trigger: the Menu anchor wrapper is the flex\n item, the button inside keeps the control row's 32px capsule recipe. */\n.mrfw-accessTrigger {\n padding: 0 12px;\n}\n\n.mrfw-cwdTag {\n flex: none;\n padding: 0 6px;\n border-radius: 4px;\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n font-size: 11px;\n line-height: 18px;\n}\n\n.mrfw-accessBadge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.mrfw-accessBadge {\n flex: none;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.mrfw-aliasEditor {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n flex-basis: 100%;\n}\n\n.mrfw-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n margin-top: 16px;\n padding-top: 16px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n/* One control row, one height: the capsule buttons match the 32px input. */\n.mrfw-actions .mrfw-btn {\n height: 32px;\n border-radius: 16px;\n}\n\n.mrfw-actions .mrfw-iconBtn {\n width: 32px;\n}\n";
14
+ export declare const STYLES = "\n/* Sidebar footer row, mirroring the host ui-settings-general trigger: the row\n * wrapper overhangs each side by 2px (width calc(100% + 4px) against the\n * shell's 12px inline padding) so the icon's ink line lands at 18px from the\n * column edge \u2014 exactly where the Settings gear below sits. */\n.mrfw-triggerRow {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n width: calc(100% + 4px);\n margin: 4px -2px;\n}\n\n.mrfw-triggerRow.mrfw-railRow {\n width: 36px;\n margin: 8px 0 10px;\n}\n\n.mrfw-trigger {\n box-sizing: border-box;\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 8px;\n width: auto;\n height: 42px;\n margin: 0;\n padding: 0 10px 0 8px;\n border: none;\n border-radius: 12px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n font-size: 14px;\n line-height: 22px;\n text-align: left;\n cursor: pointer;\n overflow: hidden;\n transition: background-color var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-trigger:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.mrfw-triggerIcon {\n flex: none;\n display: inline-flex;\n}\n\n.mrfw-triggerLabel {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.mrfw-triggerRail {\n flex: none;\n width: 36px;\n height: 36px;\n margin: 0;\n padding: 0;\n gap: 0;\n border-radius: 50%;\n justify-content: center;\n}\n\n/* Icon-only launcher inside the upstream Files tab header. Upstream's\n FilesBody renders .header as one flat flex row \u2014 PathLabel, then the\n reload button, then the files.actions slot occupants \u2014 and each of those\n children carries a stable data-files-* attribute on the flex item itself\n (data-files-root on the pane, data-files-path, data-files-reload).\n A registration order sorts only INSIDE the actions slot and can never\n overtake the reload button, so the launcher is moved with the flex order\n property instead: this wrapper is the slot's root element and therefore a\n direct flex item of .header, and order: -1 puts it ahead of every\n order-0 sibling while the :has() rule below keeps the path first. */\n.mrfw-fileLauncher {\n order: -1;\n flex: none;\n display: flex;\n align-items: center;\n}\n\n/* Pin the upstream path label ahead of the launcher \u2014 but only while this\n plugin is in the row: the :has() guard keeps a rule that names an\n upstream element inert whenever the launcher is absent. The\n :not([data-files-entry]) qualifier is load-bearing, not decorative:\n upstream puts data-files-path on EVERY tree row too (the row's own\n absolute path), so an unqualified selector would match the whole tree,\n not just the header's PathLabel. Both selectors depend on upstream's DOM\n shape, which is not part of the slot contract; if it changes, the rules\n simply stop matching and the launcher falls back to its in-slot position \u2014\n a silent degradation, never a broken header. */\n[data-files-root]:has(.mrfw-fileLauncher) [data-files-path]:not([data-files-entry]) {\n order: -2;\n}\n\n/* The root switcher is the launcher's grown-up form on runtimes whose\n files.actions owner carries absolutePath. It takes the path label's flex\n position and stretch: order: -1 ahead of every order-0 sibling, and a\n growing min-width:0 item so both the trigger label and the PathLabel\n inside it can ellipsize instead of pushing the header controls out. */\n.mrfw-rootSwitcher {\n order: -1;\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n align-items: center;\n /* Same 4px the upstream .header puts between its own flex items, so the\n takeover controls (reload, open-in-app fork) sit at the same offsets the\n hidden native ones did \u2014 no drift between primary and additional state. */\n gap: 4px;\n}\n\n/* While the switcher exists it hides the upstream path label \u2014 the\n :has() guard again keeps the upstream-naming rule inert unless this\n plugin is actually in the row. The switcher draws its own PathLabel of\n the selected root next to the trigger (className mrfw-switcherPath, no\n data-files-* attributes), so the header keeps a path in the same spot.\n :not([data-files-entry]) is what confines this rule to the header:\n every tree row carries data-files-path with its own path as the value,\n and only the PathLabel carries it bare. Without the qualifier this\n display:none would blank the entire native tree. */\n[data-files-root]:has(.mrfw-rootSwitcher) [data-files-path]:not([data-files-entry]) {\n display: none;\n}\n\n/* While the switcher names an additional root, the native tree body and its\n reload hide: the reload refreshes the very tree that is no longer\n visible, and the plugin's forked tree is portaled in as the body's sibling.\n The header still offers a reload \u2014 the switcher's own .mrfw-switcherReload\n calls the forked face's refresh. The native tree keeps watching in the\n background, so switching back to the primary root restores it instantly. */\n[data-files-root]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-files-body],\n[data-files-root]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-files-reload] {\n display: none;\n}\n\n/* Newer Files pages place the navigator beside the header instead of\n wrapping both in data-files-root. Target the page without hiding the\n portaled replacement or any of its rows. */\n[data-files-page]:has(.mrfw-fileLauncher) [data-files-path]:not([data-files-entry]) { order: -2; }\n[data-files-page]:has(.mrfw-rootSwitcher) [data-files-path]:not([data-files-entry]) { display: none; }\n[data-files-page]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-files-content],\n[data-files-page]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-files-reload] { display: none; }\n[data-files-page]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-slot=\"sidebar.right.tab.files.actions\"] > *:has([data-open-target=\"directory\"]:not(.mrfw-openSplit)),\n[data-files-page]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-open-target=\"directory\"]:not(.mrfw-openSplit) { display: none; }\n\n/* While the switcher names an additional root, the native open-in-app split\n button hides too: its slot props carry the pane's primary root, so it\n would always open the primary root no matter what the switcher selected.\n The header gets the plugin's own fork of that same control instead (the\n open-in-app directory), wired to the selected root.\n\n The slot's render site is wrapped in the renderer's own anchor \u2014\n <div data-slot=\"sidebar.right.tab.files.actions\" style=\"display:contents\">\n \u2014 so the header's flex items inside it are the occupants themselves, and\n the native item is the ui-primitives Menu anchor span wrapping the marked\n .split. The first selector hides that occupant item through the data-slot\n anchor: hiding only the inner control would leave the empty anchor span\n as a zero-width flex item whose header gap pushes the fork 4px left of\n the native position. The wrapper itself can never be the target \u2014 its\n inline display:contents beats any stylesheet rule, and hiding it would\n take the switcher with it. The second selector is the fallback for an\n upstream that moves the attribute off the item. The fork survives both:\n the only data-open-target inside .mrfw-rootSwitcher is its own\n .mrfw-openSplit, which :not() excludes. */\n[data-files-root]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-slot=\"sidebar.right.tab.files.actions\"] > *:has([data-open-target=\"directory\"]:not(.mrfw-openSplit)),\n[data-files-root]:has(.mrfw-rootSwitcher[data-root-kind=\"additional\"]) [data-open-target=\"directory\"]:not(.mrfw-openSplit) {\n display: none;\n}\n\n/* The trigger borrows the path label's look: quiet text with a folder\n glyph, the hover of the neighboring header buttons, and the overflow\n behavior PathLabel itself uses in a narrow header. It may shrink but\n never grows \u2014 the PathLabel after it owns the free header space. */\n.mrfw-rootSwitchBtn {\n flex: 0 1 auto;\n min-width: 0;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 28px;\n margin: 0;\n padding: 0 4px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n font-size: inherit;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-rootSwitchBtn:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.mrfw-rootSwitchBtn .mrfw-triggerIcon {\n color: var(--dsw-alias-label-secondary);\n}\n\n.mrfw-rootSwitchLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mrfw-rootSwitchChevron {\n margin-left: auto;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* The selected root's full path sits between the trigger and the reload \u2014\n the very PathLabel upstream draws there, so it brings its own grow,\n left-clip and hover-title behavior; only the gutters are ours. The right\n margin plus the container gap reproduces upstream's .path margin-right\n 12px + header gap 4px; the left gutter comes from the same container gap. */\n.mrfw-switcherPath {\n margin: 0 12px 0 0;\n}\n\n/* The takeover's own reload, standing exactly where the hidden native one\n did: the upstream .tool recipe verbatim (28px hit area, 15px glyph,\n secondary voice, hover fills). It calls the forked face's refresh \u2014 an\n in-place re-list, not a remount. */\n.mrfw-switcherReload {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 6px;\n border: none;\n border-radius: var(--dsw-radius-sm);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n line-height: 1;\n cursor: pointer;\n}\n\n.mrfw-switcherReload:hover {\n color: var(--dsw-alias-label-primary);\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n/* The document preview's navigator aside, while the retarget holds it: the\n native body hides (it lists the session's primary root regardless of the\n previewed file), and the forked tree \u2014 portaled in as the aside's sibling\n child \u2014 takes the same stretch item in the aside's column flex, right\n down to the body's own padding and 2px scrollbar offset. The aside's\n chrome is untouched: width, push/overlay/fill modes, and the resize\n separator all stay native. The marker attribute is set only while a\n takeover actually holds the aside, so a navigator we never matched \u2014 or\n one whose plugin sheet is gone \u2014 renders exactly as upstream drew it. */\naside[data-mrfw-navigator] > [data-files-body] {\n display: none;\n}\n\n/* The reveal's current row, the fork's spelling of upstream's .current:\n the interactive-active fill, kept under hover exactly as the native\n tree's current row keeps it. */\n.mrfw-ftRow[data-files-current],\n.mrfw-ftRow[data-files-current]:hover {\n background: var(--dsw-alias-interactive-bg-active);\n}\n\n/* \u2500\u2500 files-tree fork (verbatim rules, renamed classes) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n Copied from upstream's FilesBody.module.css (ui-sidebar-files @\n 0.2.2-alpha.2) with local names mapped to mrfw-ft* so the rules cannot\n collide with host DOM \u2014 and so the fork's own body (which must NOT carry\n data-files-body) stays visible while the rules above hide the native one.\n The header-only rules (root/header/path/tool/status/statusLine/titleIcon)\n belong to the upstream shell this fork drops and are not mapped. Fork sync\n re-diffs the upstream file and re-applies the rename \u2014 see\n src/client/files-tree/FORK.md. */\n\n/* The pane's own .root already supplies the flex column, color, and font;\n the fork's body takes the same stretch item the hidden native body held,\n including the workspace list's 2px scrollbar offset and stable gutter. */\n.mrfw-ftBody {\n flex: 1 1 auto;\n min-height: 0;\n margin-right: 2px;\n padding: 8px 0 8px 8px;\n overflow: auto;\n scrollbar-gutter: stable;\n}\n\n.mrfw-ftBody::-webkit-scrollbar-track {\n margin: 2px;\n}\n\n.mrfw-ftLevel {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.mrfw-ftLevel .mrfw-ftLevel {\n padding-left: 18px;\n}\n\n.mrfw-ftItem {\n margin: 0;\n padding: 0;\n}\n\n/* Rows abut, so the hover fill is the whole row; the tree's air is this\n inset, not a gap between rows. */\n.mrfw-ftRow {\n display: flex;\n gap: 6px;\n align-items: center;\n width: 100%;\n min-width: 0;\n padding: 5px 10px;\n color: inherit;\n font: inherit;\n text-align: left;\n background: transparent;\n border: 0;\n border-radius: var(--dsw-radius-md);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .mrfw-ftRow:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n/* The folder glyph rides the tertiary ink, as the workspace tree's does. */\n.mrfw-ftIcon {\n flex: 0 0 auto;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* The type's coloured sheet at the folder glyph's 16px; its colour is its own. */\n.mrfw-ftFileIcon {\n flex: 0 0 auto;\n}\n\n.mrfw-ftName {\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n/* Neither a file nor a directory: shown so the directory is reported whole,\n greyed so nobody tries to open it. */\n.mrfw-ftOther {\n color: var(--dsw-alias-label-tertiary);\n cursor: default;\n}\n\n@media (hover: hover) {\n .mrfw-ftOther:hover {\n background: transparent;\n }\n}\n\n.mrfw-ftNote {\n margin: 0;\n padding: 3px 10px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n}\n\n/* \u2500\u2500 open-in-app fork (verbatim rules, renamed classes) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n Copied from upstream's OpenTargetButton.module.css\n (dsh-client-ui-open-in-app @ 0.2.1-alpha.2) with local names mapped to\n mrfw-open* so the rules cannot collide with host DOM. Fork sync re-diffs\n the upstream file and re-applies the rename \u2014 see\n src/client/open-in-app/FORK.md. */\n\n/* Sized to sit in the document header's 24px control row beside its round\n icon buttons: a hairline pill with a 12px label and a narrow chevron half. */\n.mrfw-openMenuAnchor {\n display: inline-flex;\n flex: none;\n align-self: center;\n}\n\n.mrfw-openSplit {\n display: inline-flex;\n align-items: stretch;\n box-sizing: border-box;\n height: 24px;\n overflow: hidden;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm);\n font-family: var(--dsw-font-family);\n}\n\n.mrfw-openMain,\n.mrfw-openChevron {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 0;\n background: none;\n color: var(--dsw-alias-label-primary);\n font-size: 11px;\n line-height: 16px;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.mrfw-openMain {\n gap: 4px;\n padding: 3px 5px;\n}\n\n.mrfw-openChevron {\n padding: 3px 4px 3px 3px;\n border-left: 0.5px solid var(--dsw-alias-border-l4);\n color: var(--dsw-alias-label-secondary);\n}\n\n.mrfw-openMain:hover:not(:disabled),\n.mrfw-openMain:focus-visible,\n.mrfw-openChevron:hover:not(:disabled),\n.mrfw-openChevron:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n/* Pending disables clicks without a restyle; only hover feedback pauses. */\n.mrfw-openMain:disabled,\n.mrfw-openChevron:disabled {\n cursor: default;\n}\n\n.mrfw-openAppIcon {\n object-fit: contain;\n}\n\n/* The unavailable preview emphasizes the same actions with a labeled button. */\n.mrfw-openSplit[data-size='large'] {\n height: 36px;\n border-radius: var(--dsw-radius-md);\n border-color: var(--dsw-alias-border-l2);\n}\n\n.mrfw-openSplit[data-size='large'] .mrfw-openMain {\n gap: 6px;\n padding: 6px 14px;\n font-size: 14px;\n}\n\n.mrfw-openSplit[data-size='large'] .mrfw-openChevron {\n padding: 6px 10px;\n}\n\n.mrfw-openSkeleton { display: inline-block; flex: none; border-radius: var(--dsw-radius-xs); background: var(--dsw-alias-interactive-bg-hover); }\n\n.mrfw-overlay {\n position: fixed;\n inset: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n}\n\n.mrfw-mask {\n position: absolute;\n inset: 0;\n background: var(--dsw-alias-bg-mask-1);\n backdrop-filter: var(--dsw-mask-blur);\n}\n\n.mrfw-dialog {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n width: min(640px, 100%);\n max-height: 100%;\n overflow: hidden;\n border: none;\n border-radius: 24px;\n background: var(--dsw-alias-bg-layer-2);\n box-shadow: var(--dsw-elevation-prominent);\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n outline: none;\n}\n\n.mrfw-header {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 22px 14px 12px 24px;\n}\n\n.mrfw-title {\n margin: 0;\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary);\n}\n\n.mrfw-close {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n border-radius: 8px;\n background: transparent;\n cursor: pointer;\n color: var(--dsw-alias-label-secondary);\n transition: background-color var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-close:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.mrfw-body {\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow-y: auto;\n padding: 0 24px 24px;\n}\n\n.mrfw-alert {\n margin: 0 0 8px;\n font-size: 14px;\n line-height: 22px;\n color: var(--dsw-alias-state-error-primary);\n}\n\n.mrfw-section {\n display: flex;\n flex-direction: column;\n}\n\n.mrfw-section + .mrfw-section {\n margin-top: 8px;\n}\n\n.mrfw-sectionTitleRow {\n display: flex;\n align-items: baseline;\n gap: 8px;\n padding: 8px 0 4px;\n}\n\n.mrfw-sectionTitle {\n font-size: 14px;\n line-height: 22px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary);\n}\n\n.mrfw-sectionNote {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.mrfw-row {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 12px 0;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.mrfw-rowBare {\n border-bottom: none;\n}\n\n/* A root entry's two lines: the display name on top, the absolute path under\n it in the tertiary voice (the workspace rows recipe of the host sidebar). */\n/* Match upstream General Settings' DeveloperToolsRow layout. */\n.mrfw-skillsSettings {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n padding: 16px 0;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2);\n}\n.mrfw-skillsSettingsText { min-width: 0; }\n.mrfw-settingsTitleRow {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.mrfw-skillsSettingsTitle { font-size: 14px; line-height: 20px; }\n.mrfw-skillsSettingsDescription {\n margin-top: 4px;\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n line-height: 18px;\n}\n.mrfw-rootText {\n display: flex;\n flex: 1 1 240px;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n/* Keep status tags and permission glyphs visible beside the alias, wrapping\n onto another line when the dialog is narrow. */\n.mrfw-rootName {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n font-size: 14px;\n line-height: 20px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary);\n}\n\n.mrfw-rootNameText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mrfw-rootPath {\n font-family: var(--ds-font-family-code);\n font-size: 12px;\n line-height: 18px;\n word-break: break-all;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* The path doubles as the copy control: an unstyled button that keeps the\n text recipe and makes the whole string clickable \u2014 the whole region, not\n just the icon, copies on click. */\n.mrfw-pathCopy {\n display: block;\n width: 100%;\n padding: 0;\n border: 0;\n background: transparent;\n text-align: left;\n cursor: pointer;\n}\n\n/* The trailing icon stays in flow but invisible until the path is hovered\n or focused: appearing never re-wraps the text, and the icon inherits the\n path's own tertiary ink. */\n.mrfw-pathCopyIcon {\n display: inline-flex;\n margin-left: 4px;\n vertical-align: -2px;\n opacity: 0;\n transition: opacity var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-pathCopy:hover .mrfw-pathCopyIcon,\n.mrfw-pathCopy:focus-visible .mrfw-pathCopyIcon {\n opacity: 1;\n}\n\n.mrfw-note {\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.mrfw-stateWarn {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-state-warn-primary);\n}\n\n.mrfw-btn {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n gap: 4px;\n height: 28px;\n padding: 0 10px;\n border: none;\n border-radius: 14px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n font-size: 12px;\n line-height: 18px;\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-btn[aria-busy='true'] {\n cursor: wait;\n}\n\n.mrfw-btn:disabled {\n cursor: not-allowed;\n opacity: 0.4;\n}\n\n.mrfw-btnGhost:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.mrfw-btnGhost:active:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-active);\n}\n\n/* The solid destructive action of the capsule family: the upgrade confirm's\n red button. state-error-primary is the error ink upstream also uses as a\n fill (StateDot); the hover mixes in the host's primary label token to\n follow its theme and contrast choices. Neither color is a guessed token:\n an undefined var() would fall back\n to transparent and white-out the whole button. */\n.mrfw-btnDanger {\n background: var(--dsw-alias-state-error-primary);\n color: var(--dsw-alias-label-primary-foreground);\n}\n\n.mrfw-btnDanger:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 85%, var(--dsw-alias-label-primary));\n}\n\n.mrfw-btnOutline {\n border: 0.5px solid var(--dsw-alias-border-l3);\n background: transparent;\n}\n\n.mrfw-btnOutline:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.mrfw-btnPrimary {\n background: var(--dsw-alias-button-primary-fill);\n color: var(--dsw-alias-label-primary-foreground);\n}\n\n.mrfw-btnPrimary:hover:not(:disabled) {\n background: var(--dsw-alias-button-primary-hover);\n}\n\n/* One icon-only action: a square of the capsule family, meaning in title.\n Declared after the .mrfw-btn family so its padding wins the cascade tie:\n the capsule's 0 10px padding would otherwise squeeze the icon glyph. */\n.mrfw-iconBtn {\n width: 28px;\n padding: 0;\n border-radius: 8px;\n}\n\n.mrfw-input {\n flex: 1 1 220px;\n min-width: 0;\n height: 32px;\n padding: 0 8px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-1);\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n font-size: 14px;\n line-height: 22px;\n outline: none;\n transition: border-color var(--ds-transition-duration-fast) var(--ds-ease-in-out);\n}\n\n.mrfw-input:focus {\n border-color: var(--dsw-alias-brand-primary);\n}\n\n.mrfw-input::placeholder {\n color: var(--dsw-alias-label-dimmed);\n}\n\n.mrfw-inputInline {\n flex: 1 1 auto;\n}\n\n.mrfw-accessSelect {\n flex: 0 0 auto;\n}\n\n/* The access dropdown's capsule trigger: the Menu anchor wrapper is the flex\n item, the button inside keeps the control row's 32px capsule recipe. */\n.mrfw-accessTrigger {\n padding: 0 12px;\n}\n\n.mrfw-cwdTag {\n flex: none;\n padding: 0 6px;\n border-radius: 4px;\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n font-size: 11px;\n line-height: 18px;\n}\n\n.mrfw-accessBadge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.mrfw-accessBadge {\n flex: none;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.mrfw-aliasEditor {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n flex-basis: 100%;\n}\n\n.mrfw-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n margin-top: 16px;\n padding-top: 16px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n/* One control row, one height: the capsule buttons match the 32px input. */\n.mrfw-actions .mrfw-btn {\n height: 32px;\n border-radius: 16px;\n}\n\n.mrfw-actions .mrfw-iconBtn {\n width: 32px;\n}\n";
@@ -27,10 +27,17 @@ export type NativeTreeRenderer = (name: string, input: object, options: {
27
27
  fallback: unknown;
28
28
  }) => unknown;
29
29
  export declare function nativeTreeRenderer(value: unknown): NativeTreeRenderer | undefined;
30
+ /** The revealed file's identity, forwarded as the factory's `current`/`currentRef` inputs. */
31
+ export interface NativeTreeCurrent {
32
+ /** The current row's tree key — the factory marks it `.current` + `aria-current`. */
33
+ readonly path: string;
34
+ /** Optional callback ref for the current row's button — the reveal's scroll target. */
35
+ readonly ref?: ((row: unknown) => void) | undefined;
36
+ }
30
37
  /** The factory consumes absolute, slash-separated keys and already-localized errors. */
31
38
  export declare function nativeTreeInput<F>(state: {
32
39
  readonly root: string;
33
40
  readonly levels: Readonly<Record<string, Level<F>>>;
34
41
  readonly expanded: readonly string[];
35
- }, failureLine: (failure: F) => string, toggle: (parent: string, path: string) => void, open: (path: string) => void): object;
42
+ }, failureLine: (failure: F) => string, toggle: (parent: string, path: string) => void, open: (path: string) => void, current?: NativeTreeCurrent | undefined): object;
36
43
  export {};