dsh-over-ssh 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +119 -2
- package/agents/agent-manifest.json +20 -0
- package/agents/linux-amd64/dsh-over-ssh-agent +0 -0
- package/agents/linux-arm64/dsh-over-ssh-agent +0 -0
- package/cordis.patch.yml +84 -0
- package/lib/client.js +6611 -0
- package/lib/file-references.js +366 -0
- package/lib/fs.js +1368 -0
- package/lib/index.js +19034 -0
- package/lib/local-bridge-refs.js +16 -0
- package/lib/local-bridge.js +16 -0
- package/lib/terminal-wrapper.js +294 -0
- package/lib/types/src/client/controls.d.ts +131 -0
- package/lib/types/src/client/core/card-focus-trap.d.ts +45 -0
- package/lib/types/src/client/core/controls.d.ts +164 -0
- package/lib/types/src/client/core/latest.d.ts +48 -0
- package/lib/types/src/client/core/locale.d.ts +38 -0
- package/lib/types/src/client/core/message.d.ts +37 -0
- package/lib/types/src/client/core/panel-model.d.ts +134 -0
- package/lib/types/src/client/core/portal.d.ts +266 -0
- package/lib/types/src/client/core/remote.d.ts +84 -0
- package/lib/types/src/client/core/styles.d.ts +458 -0
- package/lib/types/src/client/file-tree-io.d.ts +19 -0
- package/lib/types/src/client/file-tree.d.ts +271 -0
- package/lib/types/src/client/flows/directory-browser.d.ts +587 -0
- package/lib/types/src/client/flows/session-directory.d.ts +415 -0
- package/lib/types/src/client/flows/workspace-directory-flow.d.ts +480 -0
- package/lib/types/src/client/index.d.ts +49 -0
- package/lib/types/src/client/locale.d.ts +31 -0
- package/lib/types/src/client/panel-model.d.ts +37 -0
- package/lib/types/src/client/panel.d.ts +77 -0
- package/lib/types/src/client/roots/connection-test.d.ts +69 -0
- package/lib/types/src/client/roots/roots-panel-state.d.ts +307 -0
- package/lib/types/src/client/roots/roots-panel-view.d.ts +280 -0
- package/lib/types/src/client/roots/roots-panel.d.ts +364 -0
- package/lib/types/src/client/roots/transfer-panel-view.d.ts +35 -0
- package/lib/types/src/client/roots/transfer-panel.d.ts +241 -0
- package/lib/types/src/client/roots/transfer-progress.d.ts +67 -0
- package/lib/types/src/client/roots-panel-view.d.ts +236 -0
- package/lib/types/src/client/roots-panel.d.ts +347 -0
- package/lib/types/src/client/session/session-panel-view.d.ts +336 -0
- package/lib/types/src/client/session/session-panel.d.ts +322 -0
- package/lib/types/src/client/session/session-remote-mark.d.ts +110 -0
- package/lib/types/src/client/session/session-row-actions.d.ts +398 -0
- package/lib/types/src/client/session-panel.d.ts +152 -0
- package/lib/types/src/client/styles.d.ts +252 -0
- package/lib/types/src/client/workspace-directory-flow.d.ts +342 -0
- package/lib/types/src/config.d.ts +312 -0
- package/lib/types/src/file-references.d.ts +25 -0
- package/lib/types/src/fs.d.ts +46 -0
- package/lib/types/src/host/app/backend.d.ts +170 -0
- package/lib/types/src/host/app/recycle-bin/recycle-bin-contract.d.ts +247 -0
- package/lib/types/src/host/app/recycle-bin/recycle-bin-move.d.ts +18 -0
- package/lib/types/src/host/app/recycle-bin/recycle-bin-service.d.ts +45 -0
- package/lib/types/src/host/app/recycle-bin/recycle-bin-world.d.ts +38 -0
- package/lib/types/src/host/app/recycle-bin-contract.d.ts +215 -0
- package/lib/types/src/host/app/recycle-bin-move.d.ts +18 -0
- package/lib/types/src/host/app/recycle-bin-service.d.ts +45 -0
- package/lib/types/src/host/app/recycle-bin-world.d.ts +35 -0
- package/lib/types/src/host/app/roots/roots-api-connections.d.ts +49 -0
- package/lib/types/src/host/app/roots/roots-api-contract.d.ts +369 -0
- package/lib/types/src/host/app/roots/roots-api-directories.d.ts +13 -0
- package/lib/types/src/host/app/roots/roots-api-http.d.ts +77 -0
- package/lib/types/src/host/app/roots/roots-api-long-poll.d.ts +130 -0
- package/lib/types/src/host/app/roots/roots-api-projections.d.ts +102 -0
- package/lib/types/src/host/app/roots/roots-api-roots.d.ts +13 -0
- package/lib/types/src/host/app/roots/roots-api-state.d.ts +22 -0
- package/lib/types/src/host/app/roots/roots-api-transfers.d.ts +26 -0
- package/lib/types/src/host/app/roots/roots-api.d.ts +55 -0
- package/lib/types/src/host/app/roots/user-roots.d.ts +552 -0
- package/lib/types/src/host/app/roots-api-connections.d.ts +49 -0
- package/lib/types/src/host/app/roots-api-contract.d.ts +339 -0
- package/lib/types/src/host/app/roots-api-directories.d.ts +13 -0
- package/lib/types/src/host/app/roots-api-http.d.ts +77 -0
- package/lib/types/src/host/app/roots-api-projections.d.ts +102 -0
- package/lib/types/src/host/app/roots-api-roots.d.ts +13 -0
- package/lib/types/src/host/app/roots-api-state.d.ts +22 -0
- package/lib/types/src/host/app/roots-api-support.d.ts +182 -0
- package/lib/types/src/host/app/roots-api-transfers.d.ts +13 -0
- package/lib/types/src/host/app/roots-api.d.ts +55 -0
- package/lib/types/src/host/app/routed-fs.d.ts +239 -0
- package/lib/types/src/host/app/serialize.d.ts +37 -0
- package/lib/types/src/host/app/session-admin/session-admin-context.d.ts +36 -0
- package/lib/types/src/host/app/session-admin/session-admin-contract.d.ts +221 -0
- package/lib/types/src/host/app/session-admin/session-admin-delete.d.ts +34 -0
- package/lib/types/src/host/app/session-admin/session-admin-service.d.ts +40 -0
- package/lib/types/src/host/app/session-admin-context.d.ts +36 -0
- package/lib/types/src/host/app/session-admin-contract.d.ts +214 -0
- package/lib/types/src/host/app/session-admin-delete.d.ts +34 -0
- package/lib/types/src/host/app/session-admin-service.d.ts +38 -0
- package/lib/types/src/host/app/takeover/takeover-plan.d.ts +227 -0
- package/lib/types/src/host/app/takeover/takeover-rows.d.ts +55 -0
- package/lib/types/src/host/app/transport/transport-selector.d.ts +98 -0
- package/lib/types/src/host/app/transport/transport-service.d.ts +82 -0
- package/lib/types/src/host/app/transport-selector.d.ts +98 -0
- package/lib/types/src/host/app/transport-service.d.ts +75 -0
- package/lib/types/src/host/app/user-roots.d.ts +461 -0
- package/lib/types/src/host/domain/bin-location.d.ts +79 -0
- package/lib/types/src/host/domain/capability.d.ts +78 -0
- package/lib/types/src/host/domain/connection.d.ts +95 -0
- package/lib/types/src/host/domain/errors.d.ts +55 -0
- package/lib/types/src/host/domain/glob-pattern.d.ts +62 -0
- package/lib/types/src/host/domain/literal-text.d.ts +63 -0
- package/lib/types/src/host/domain/path-grammar.d.ts +84 -0
- package/lib/types/src/host/domain/recycle-bin.d.ts +337 -0
- package/lib/types/src/host/domain/root.d.ts +74 -0
- package/lib/types/src/host/domain/roots/bin-location.d.ts +91 -0
- package/lib/types/src/host/domain/roots/connection.d.ts +106 -0
- package/lib/types/src/host/domain/roots/root.d.ts +108 -0
- package/lib/types/src/host/domain/roots/route-table.d.ts +102 -0
- package/lib/types/src/host/domain/roots/session-roots.d.ts +151 -0
- package/lib/types/src/host/domain/roots/ssh-config.d.ts +73 -0
- package/lib/types/src/host/domain/route-table.d.ts +80 -0
- package/lib/types/src/host/domain/session/session-admin.d.ts +345 -0
- package/lib/types/src/host/domain/session/terminal-target.d.ts +136 -0
- package/lib/types/src/host/domain/session-admin.d.ts +330 -0
- package/lib/types/src/host/domain/shell.d.ts +47 -0
- package/lib/types/src/host/domain/ssh-config.d.ts +73 -0
- package/lib/types/src/host/domain/terminal-target.d.ts +132 -0
- package/lib/types/src/host/domain/tool-requests.d.ts +369 -0
- package/lib/types/src/host/domain/transfer/recycle-bin.d.ts +337 -0
- package/lib/types/src/host/domain/transfer/transfer.d.ts +260 -0
- package/lib/types/src/host/domain/transfer.d.ts +260 -0
- package/lib/types/src/host/infra/backend/local-backend.d.ts +84 -0
- package/lib/types/src/host/infra/backend/local-version.d.ts +43 -0
- package/lib/types/src/host/infra/backend/platform-local-backend.d.ts +89 -0
- package/lib/types/src/host/infra/backend/remote-backend.d.ts +239 -0
- package/lib/types/src/host/infra/cache/lru.d.ts +52 -0
- package/lib/types/src/host/infra/cache/versioned.d.ts +77 -0
- package/lib/types/src/host/infra/temp-name.d.ts +19 -0
- package/lib/types/src/host/infra/transport/agent/agent-installer.d.ts +121 -0
- package/lib/types/src/host/infra/transport/agent/agent-protocol-client.d.ts +132 -0
- package/lib/types/src/host/infra/transport/agent/agent-protocol-codec.d.ts +140 -0
- package/lib/types/src/host/infra/transport/agent/agent-protocol-errors.d.ts +41 -0
- package/lib/types/src/host/infra/transport/agent/agent-protocol-frames.d.ts +197 -0
- package/lib/types/src/host/infra/transport/agent/agent-protocol-types.d.ts +564 -0
- package/lib/types/src/host/infra/transport/agent/agent-transport.d.ts +418 -0
- package/lib/types/src/host/infra/transport/agent-installer.d.ts +121 -0
- package/lib/types/src/host/infra/transport/agent-protocol-client.d.ts +123 -0
- package/lib/types/src/host/infra/transport/agent-protocol-codec.d.ts +131 -0
- package/lib/types/src/host/infra/transport/agent-protocol-errors.d.ts +41 -0
- package/lib/types/src/host/infra/transport/agent-protocol-frames.d.ts +197 -0
- package/lib/types/src/host/infra/transport/agent-protocol-types.d.ts +509 -0
- package/lib/types/src/host/infra/transport/agent-transport.d.ts +353 -0
- package/lib/types/src/host/infra/transport/alias-transport.d.ts +206 -0
- package/lib/types/src/host/infra/transport/askpass-fs.d.ts +20 -0
- package/lib/types/src/host/infra/transport/askpass.d.ts +133 -0
- package/lib/types/src/host/infra/transport/command-pool.d.ts +61 -0
- package/lib/types/src/host/infra/transport/fs-commands.d.ts +140 -0
- package/lib/types/src/host/infra/transport/git-status-route.d.ts +63 -0
- package/lib/types/src/host/infra/transport/git-status.d.ts +101 -0
- package/lib/types/src/host/infra/transport/node-spawn.d.ts +26 -0
- package/lib/types/src/host/infra/transport/session-window.d.ts +51 -0
- package/lib/types/src/host/infra/transport/shell-quote.d.ts +59 -0
- package/lib/types/src/host/infra/transport/ssh/alias-transport.d.ts +206 -0
- package/lib/types/src/host/infra/transport/ssh/askpass-fs.d.ts +20 -0
- package/lib/types/src/host/infra/transport/ssh/askpass.d.ts +133 -0
- package/lib/types/src/host/infra/transport/ssh/shell-quote.d.ts +62 -0
- package/lib/types/src/host/infra/transport/ssh/ssh-argv.d.ts +43 -0
- package/lib/types/src/host/infra/transport/ssh/ssh2-transport.d.ts +328 -0
- package/lib/types/src/host/infra/transport/ssh-argv.d.ts +43 -0
- package/lib/types/src/host/infra/transport/ssh2-transport.d.ts +302 -0
- package/lib/types/src/host/infra/transport/transport-base.d.ts +34 -0
- package/lib/types/src/host/infra/transport/transport.d.ts +527 -0
- package/lib/types/src/host/integration/agent/agent-install-io.d.ts +33 -0
- package/lib/types/src/host/integration/agent/agent-preflight.d.ts +56 -0
- package/lib/types/src/host/integration/agent/askpass-registry.d.ts +66 -0
- package/lib/types/src/host/integration/agent-install-io.d.ts +33 -0
- package/lib/types/src/host/integration/agent-preflight.d.ts +56 -0
- package/lib/types/src/host/integration/anchor-directory.d.ts +56 -0
- package/lib/types/src/host/integration/askpass-registry.d.ts +59 -0
- package/lib/types/src/host/integration/bin-root-resolver.d.ts +81 -0
- package/lib/types/src/host/integration/connection-test.d.ts +73 -0
- package/lib/types/src/host/integration/file-reference-provider.d.ts +115 -0
- package/lib/types/src/host/integration/fs/file-reference-provider.d.ts +142 -0
- package/lib/types/src/host/integration/fs/fs-provider.d.ts +368 -0
- package/lib/types/src/host/integration/fs/git-status-wiring.d.ts +21 -0
- package/lib/types/src/host/integration/fs/platform-errors.d.ts +94 -0
- package/lib/types/src/host/integration/fs/remote-file-tools.d.ts +369 -0
- package/lib/types/src/host/integration/fs/remote-index.d.ts +177 -0
- package/lib/types/src/host/integration/fs-provider.d.ts +226 -0
- package/lib/types/src/host/integration/lsp/lsp-framing.d.ts +38 -0
- package/lib/types/src/host/integration/lsp/lsp-registry.d.ts +67 -0
- package/lib/types/src/host/integration/lsp/lsp-session.d.ts +130 -0
- package/lib/types/src/host/integration/management-tools.d.ts +64 -0
- package/lib/types/src/host/integration/recycle-bin-service.d.ts +247 -0
- package/lib/types/src/host/integration/remote/connection-test.d.ts +73 -0
- package/lib/types/src/host/integration/remote/remote-face.d.ts +127 -0
- package/lib/types/src/host/integration/remote/remote-tool-backend.d.ts +108 -0
- package/lib/types/src/host/integration/remote-face.d.ts +127 -0
- package/lib/types/src/host/integration/remote-file-tools.d.ts +241 -0
- package/lib/types/src/host/integration/remote-home.d.ts +69 -0
- package/lib/types/src/host/integration/remote-index.d.ts +165 -0
- package/lib/types/src/host/integration/remote-job-tools.d.ts +295 -0
- package/lib/types/src/host/integration/remote-tool-backend.d.ts +97 -0
- package/lib/types/src/host/integration/remote-tools.d.ts +206 -0
- package/lib/types/src/host/integration/root-registry.d.ts +115 -0
- package/lib/types/src/host/integration/roots/anchor-directory.d.ts +56 -0
- package/lib/types/src/host/integration/roots/bin-root-resolver.d.ts +81 -0
- package/lib/types/src/host/integration/roots/remote-home.d.ts +69 -0
- package/lib/types/src/host/integration/roots/root-registry.d.ts +144 -0
- package/lib/types/src/host/integration/roots/roots-wiring.d.ts +219 -0
- package/lib/types/src/host/integration/roots/session-root-index.d.ts +52 -0
- package/lib/types/src/host/integration/roots-api.d.ts +407 -0
- package/lib/types/src/host/integration/roots-wiring.d.ts +211 -0
- package/lib/types/src/host/integration/session/session-api.d.ts +88 -0
- package/lib/types/src/host/integration/session/session-bin-lock.d.ts +80 -0
- package/lib/types/src/host/integration/session/session-header.d.ts +151 -0
- package/lib/types/src/host/integration/session/session-labels.d.ts +56 -0
- package/lib/types/src/host/integration/session/session-route-wiring.d.ts +50 -0
- package/lib/types/src/host/integration/session-admin-service.d.ts +236 -0
- package/lib/types/src/host/integration/session-api.d.ts +81 -0
- package/lib/types/src/host/integration/session-bin-lock.d.ts +80 -0
- package/lib/types/src/host/integration/session-header.d.ts +118 -0
- package/lib/types/src/host/integration/session-labels.d.ts +56 -0
- package/lib/types/src/host/integration/session-route-wiring.d.ts +50 -0
- package/lib/types/src/host/integration/session-scope.d.ts +113 -0
- package/lib/types/src/host/integration/session-tools.d.ts +44 -0
- package/lib/types/src/host/integration/strict-arguments.d.ts +79 -0
- package/lib/types/src/host/integration/takeover/takeover-api.d.ts +62 -0
- package/lib/types/src/host/integration/takeover/takeover-route-wiring.d.ts +60 -0
- package/lib/types/src/host/integration/takeover/takeover-service.d.ts +167 -0
- package/lib/types/src/host/integration/terminal-manifest.d.ts +94 -0
- package/lib/types/src/host/integration/tools/management-tools.d.ts +245 -0
- package/lib/types/src/host/integration/tools/remote-job-tools.d.ts +316 -0
- package/lib/types/src/host/integration/tools/remote-lsp-tools.d.ts +43 -0
- package/lib/types/src/host/integration/tools/remote-tools.d.ts +236 -0
- package/lib/types/src/host/integration/tools/session-target.d.ts +52 -0
- package/lib/types/src/host/integration/tools/session-tools.d.ts +46 -0
- package/lib/types/src/host/integration/tools/strict-arguments.d.ts +79 -0
- package/lib/types/src/host/integration/tools/terminal-manifest.d.ts +94 -0
- package/lib/types/src/host/integration/transfer/remote-copy.d.ts +66 -0
- package/lib/types/src/host/integration/transfer/transfer-adapters.d.ts +48 -0
- package/lib/types/src/host/integration/transfer/transfer-service.d.ts +212 -0
- package/lib/types/src/host/integration/transfer/transfer-tracker.d.ts +106 -0
- package/lib/types/src/host/integration/transfer-adapters.d.ts +44 -0
- package/lib/types/src/host/integration/transfer-service.d.ts +164 -0
- package/lib/types/src/host/integration/transfer-tracker.d.ts +106 -0
- package/lib/types/src/host/integration/user-roots.d.ts +461 -0
- package/lib/types/src/index.d.ts +66 -0
- package/lib/types/src/local-bridge-refs.d.ts +26 -0
- package/lib/types/src/local-bridge.d.ts +36 -0
- package/lib/types/src/shared/format.d.ts +13 -0
- package/lib/types/src/wiring/connections.d.ts +189 -0
- package/lib/types/src/wiring/fs.d.ts +13 -0
- package/lib/types/src/wiring/helpers.d.ts +144 -0
- package/lib/types/src/wiring/install-memo.d.ts +32 -0
- package/lib/types/src/wiring/legacy-dirs.d.ts +62 -0
- package/lib/types/src/wiring/package-paths.d.ts +35 -0
- package/lib/types/src/wiring/roots.d.ts +21 -0
- package/lib/types/src/wiring/state-dir.d.ts +29 -0
- package/lib/types/src/wiring/tools.d.ts +35 -0
- package/package.json +120 -4
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The visual vocabulary shared by this plugin's three web surfaces.
|
|
3
|
+
*
|
|
4
|
+
* **Everything comes from the platform's own theme tokens.** The token names were read off the runtime
|
|
5
|
+
* theme (`@deepseek-ai/dsh-client-ui-theme/lib/client.js`, the `--dsw-*` custom properties it defines); the
|
|
6
|
+
* names this plugin used before — `--dsw-alias-text-primary`, `--dsw-alias-border-subtle`,
|
|
7
|
+
* `--dsw-alias-surface-subtle`, `--dsw-alias-surface-warning` — **are not in the theme at all**, so every
|
|
8
|
+
* declaration silently fell back to `inherit` / `currentColor` / a hard-coded amber, and the commit button
|
|
9
|
+
* had no `background` whatsoever. That is why the panel looked like bare HTML with grey default buttons.
|
|
10
|
+
*
|
|
11
|
+
* Why a stylesheet and not React components:
|
|
12
|
+
*
|
|
13
|
+
* 1. The platform's own atoms (`dsh-client-ui-primitives`: `Button` / `Input` / `Alert`) are **not**
|
|
14
|
+
* reusable here — their factories import per-component CSS modules, which a third-party bundle cannot
|
|
15
|
+
* supply (the loader materialises only registered factories), and the package is not a dependency of
|
|
16
|
+
* this repository. The *tokens* those atoms are built from are on every page, so this module rebuilds
|
|
17
|
+
* the same vocabulary.
|
|
18
|
+
* 2. A React component carrying `useState` (for `:hover` / `:focus`) cannot be rendered by this
|
|
19
|
+
* repository's tests: they call the section functions **directly**, outside any React render, where a
|
|
20
|
+
* hook throws `Invalid hook call`. Classes + one injected stylesheet keep the templates pure
|
|
21
|
+
* `createElement` trees that the offline tests walk, while still giving the browser real `:hover`,
|
|
22
|
+
* `:active`, `:focus-visible` and `:disabled` states.
|
|
23
|
+
*
|
|
24
|
+
* The stylesheet is injected by the containers that mount these controls ({@link CONTROL_STYLE_ID} makes it
|
|
25
|
+
* idempotent), so importing this module on the host side has no side effect.
|
|
26
|
+
*
|
|
27
|
+
* ## Why the surfaces read as cards (audit 0051)
|
|
28
|
+
*
|
|
29
|
+
* The three surface tiers (`bgLayer1/2/3`) are **the same white as the page in the shipped light theme** —
|
|
30
|
+
* read out of `app.asar`:
|
|
31
|
+
*
|
|
32
|
+
* ```text
|
|
33
|
+
* body { --dsw-alias-bg-base: neutral-bluish-00; --dsw-alias-bg-layer-1: …-00;
|
|
34
|
+
* --dsw-alias-bg-layer-2: …-00; --dsw-alias-bg-layer-3: …-00 }
|
|
35
|
+
* body[data-ds-dark-theme] { … -875 / -850 / -800 } -- only here do the tiers differ
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* So a card built on `bgLayer1` over a `bgLayer2` row was white on white in light mode, and the *only* edge
|
|
39
|
+
* was a 1px `border-l2` (`rgba(0,0,0,.1)`). The platform's own answer is visible in its settings cards:
|
|
40
|
+
*
|
|
41
|
+
* ```css
|
|
42
|
+
* .card { border: .5px solid var(--dsw-alias-settings-card-stroke); -- = border-l4
|
|
43
|
+
* border-radius: var(--dsw-radius-xl);
|
|
44
|
+
* background: var(--dsw-alias-settings-card-fill); } -- = bg-layer-2
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* i.e. **depth comes from a stronger hairline plus a larger radius**, not from a fill difference. The card,
|
|
48
|
+
* group and row rules below follow that: three nesting levels, three stroke weights and three radii, so the
|
|
49
|
+
* hierarchy survives the light theme instead of depending on a fill the theme does not provide.
|
|
50
|
+
*
|
|
51
|
+
* @module dsh-over-ssh/client/styles
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* Semantic tokens of the shipped theme, each with a neutral fallback so a page whose theme failed to load
|
|
55
|
+
* still renders something readable rather than transparent text.
|
|
56
|
+
*
|
|
57
|
+
* The fallbacks are also kept **on the theme's own scale**: the radius fallbacks were one to two steps below
|
|
58
|
+
* the real values (`sm` was `4px` where the theme says `8px`), so a theme that failed to load produced
|
|
59
|
+
* corners that did not match the surrounding platform UI even though the token name was right.
|
|
60
|
+
*/
|
|
61
|
+
export declare const TOKENS: {
|
|
62
|
+
/** Primary/body text. */
|
|
63
|
+
readonly textPrimary: "var(--dsw-alias-label-primary, inherit)";
|
|
64
|
+
/** Secondary text: descriptions, hints, row subtitles. */
|
|
65
|
+
readonly textSecondary: "var(--dsw-alias-label-secondary, inherit)";
|
|
66
|
+
/** Tertiary text: the quietest tier. */
|
|
67
|
+
readonly textTertiary: "var(--dsw-alias-label-tertiary, currentColor)";
|
|
68
|
+
/** Hairline around inputs and cards. */
|
|
69
|
+
readonly border: "var(--dsw-alias-border-l2, currentColor)";
|
|
70
|
+
/** Page background. */
|
|
71
|
+
readonly bgBase: "var(--dsw-alias-bg-base, transparent)";
|
|
72
|
+
/** Level-1 surface: the blocks and cards this plugin draws. */
|
|
73
|
+
readonly bgLayer1: "var(--dsw-alias-bg-layer-1, rgba(127, 127, 127, 0.06))";
|
|
74
|
+
/** Level-2 surface: controls that must read as inset inside a block. */
|
|
75
|
+
readonly bgLayer2: "var(--dsw-alias-bg-layer-2, transparent)";
|
|
76
|
+
/** Level-3 surface: chips and badges. */
|
|
77
|
+
readonly bgLayer3: "var(--dsw-alias-bg-layer-3, rgba(127, 127, 127, 0.12))";
|
|
78
|
+
/**
|
|
79
|
+
* The platform's own card surface and stroke (its settings cards use exactly this pair).
|
|
80
|
+
*
|
|
81
|
+
* Read off `app.asar`: `--dsw-alias-settings-card-fill: var(--dsw-alias-bg-layer-2)` and
|
|
82
|
+
* `--dsw-alias-settings-card-stroke: var(--dsw-alias-border-l4)`. Using the *named* aliases rather than the
|
|
83
|
+
* layer/border they currently point at is deliberate: it says "this is a card", which is what the value
|
|
84
|
+
* means, and it follows the theme if the platform re-points the alias.
|
|
85
|
+
*/
|
|
86
|
+
readonly cardSurface: "var(--dsw-alias-settings-card-fill, rgba(127, 127, 127, 0.06))";
|
|
87
|
+
/** The card hairline: `border-l4`, one step stronger than the row `border`. */
|
|
88
|
+
readonly cardStroke: "var(--dsw-alias-settings-card-stroke, currentColor)";
|
|
89
|
+
/** The brand fill of a primary button. */
|
|
90
|
+
readonly primaryFill: "var(--dsw-alias-button-primary-fill, currentColor)";
|
|
91
|
+
/** Its hover step. */
|
|
92
|
+
readonly primaryHover: "var(--dsw-alias-button-primary-hover, currentColor)";
|
|
93
|
+
/** Its active/pressed step (the theme exposes one dimmed step for both). */
|
|
94
|
+
readonly primaryActive: "var(--dsw-alias-button-primary-dimmed, currentColor)";
|
|
95
|
+
/** Text on a primary fill. */
|
|
96
|
+
readonly onPrimary: "var(--dsw-alias-label-primary-foreground, currentColor)";
|
|
97
|
+
/** The neutral fill of a secondary (outline) button. */
|
|
98
|
+
readonly secondaryFill: "var(--dsw-alias-button-elevated-fill, transparent)";
|
|
99
|
+
/** A hover wash for quiet controls. */
|
|
100
|
+
readonly hoverWash: "var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, 0.12))";
|
|
101
|
+
/**
|
|
102
|
+
* The focus ring the platform draws for keyboard focus.
|
|
103
|
+
*
|
|
104
|
+
* The fallback is the platform's own (`focus.css`:
|
|
105
|
+
* `outline-color: var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary))`), not
|
|
106
|
+
* `currentColor`: `--dsw-focus-ring-color` is only *defined* while the input modality is pointer (as
|
|
107
|
+
* `transparent`), so a keyboard user hits the fallback — and with `currentColor` this plugin drew a grey
|
|
108
|
+
* ring where the platform drew a brand-blue one on the same page.
|
|
109
|
+
*/
|
|
110
|
+
readonly focusRing: "var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary))";
|
|
111
|
+
/** The brand accent (checkbox ticks, and anything that must read as "selected"). */
|
|
112
|
+
readonly brandPrimary: "var(--dsw-alias-brand-primary, currentColor)";
|
|
113
|
+
/**
|
|
114
|
+
* The platform's business/neutral accent, used for progress.
|
|
115
|
+
*
|
|
116
|
+
* Its own `.progress` rule is `accent-color: var(--dsw-alias-state-business-primary)`, so the transfer bar
|
|
117
|
+
* matches the platform's bars instead of the browser default.
|
|
118
|
+
*/
|
|
119
|
+
readonly stateBusiness: "var(--dsw-alias-state-business-primary, currentColor)";
|
|
120
|
+
/** Inline warning surface (the theme's warning tier, not an amber literal). */
|
|
121
|
+
readonly warnSurface: "var(--dsw-alias-state-warn-tertiary, rgba(255, 196, 0, 0.12))";
|
|
122
|
+
/** Inline warning text. */
|
|
123
|
+
readonly warnLabel: "var(--dsw-alias-state-warn-label, inherit)";
|
|
124
|
+
/** The warning glyph colour (the theme's warning *primary*, one step stronger than the label). */
|
|
125
|
+
readonly warnPrimary: "var(--dsw-alias-state-warn-primary, currentColor)";
|
|
126
|
+
/** Error text. */
|
|
127
|
+
readonly errorPrimary: "var(--dsw-alias-state-error-primary, inherit)";
|
|
128
|
+
/**
|
|
129
|
+
* The error hairline.
|
|
130
|
+
*
|
|
131
|
+
* There is **no** `--dsw-alias-state-error-tertiary` in the theme (checked against every definition in
|
|
132
|
+
* `app.asar`), so an error block cannot get a red *fill* from a semantic token. It gets a red *border*
|
|
133
|
+
* (this token) and red text over the neutral third layer, which is what keeps the three states
|
|
134
|
+
* distinguishable without inventing a colour.
|
|
135
|
+
*/
|
|
136
|
+
readonly errorSecondary: "var(--dsw-alias-state-error-secondary, currentColor)";
|
|
137
|
+
/** Successful state. */
|
|
138
|
+
readonly successPrimary: "var(--dsw-alias-state-success-primary, currentColor)";
|
|
139
|
+
/** The success tint, for a "done"/"live" badge. */
|
|
140
|
+
readonly successSurface: "var(--dsw-alias-state-success-tertiary, rgba(0, 200, 83, 0.12))";
|
|
141
|
+
/** The skeleton/placeholder fill the platform uses for a loading surface. */
|
|
142
|
+
readonly skeleton: "var(--dsw-alias-bg-skeleton, rgba(127, 127, 127, 0.08))";
|
|
143
|
+
/**
|
|
144
|
+
* The floating surface of a panel that is not inside the sidebar's own cards (the session entry).
|
|
145
|
+
* Read off the shipped theme's `design-platform.css` (`--dsw-alias-bg-overlay`), not invented.
|
|
146
|
+
*/
|
|
147
|
+
readonly overlaySurface: "var(--dsw-alias-bg-overlay, Canvas)";
|
|
148
|
+
/** Panel elevation: the theme's own panel shadow, which already carries its hairline stroke. */
|
|
149
|
+
readonly panelElevation: "var(--dsw-elevation-panel, none)";
|
|
150
|
+
/** A stronger hairline, for the edge of a floating card over arbitrary content. */
|
|
151
|
+
readonly borderStrong: "var(--dsw-alias-border-l4, currentColor)";
|
|
152
|
+
/** The pressed/selected wash, one step past `hoverWash`. */
|
|
153
|
+
readonly activeWash: "var(--dsw-alias-interactive-bg-active, rgba(127, 127, 127, 0.18))";
|
|
154
|
+
/**
|
|
155
|
+
* Corner radii, straight from the theme so this plugin matches the surrounding UI.
|
|
156
|
+
*
|
|
157
|
+
* The real scale (read off the theme) is `xs 4px / sm 8px / md 12px / lg 16px / xl 20px`; the fallbacks
|
|
158
|
+
* below are the theme's own numbers, not the previous one-step-down guesses.
|
|
159
|
+
*/
|
|
160
|
+
readonly radiusXs: "var(--dsw-radius-xs, 4px)";
|
|
161
|
+
readonly radiusSm: "var(--dsw-radius-sm, 8px)";
|
|
162
|
+
readonly radiusMd: "var(--dsw-radius-md, 12px)";
|
|
163
|
+
readonly radiusLg: "var(--dsw-radius-lg, 16px)";
|
|
164
|
+
/** The large radius the theme uses for panels; the session entry's floating card. */
|
|
165
|
+
readonly radiusXl: "var(--dsw-radius-xl, 20px)";
|
|
166
|
+
/** The platform's capsule radius, for tags/badges. */
|
|
167
|
+
readonly radiusPill: "999px";
|
|
168
|
+
};
|
|
169
|
+
/** The `id` of the injected `<style>` element; a second mount reuses it. */
|
|
170
|
+
export declare const CONTROL_STYLE_ID = "dsh-over-ssh-controls";
|
|
171
|
+
/** Class names of the control vocabulary. Templates carry them; {@link controlStylesheet} styles them. */
|
|
172
|
+
export declare const CLASS: {
|
|
173
|
+
/** A titled block: one form or group. */
|
|
174
|
+
readonly block: "dsh-rw-block";
|
|
175
|
+
/** A section heading (`h2`/`h3`). */
|
|
176
|
+
readonly sectionTitle: "dsh-rw-title";
|
|
177
|
+
/** A block heading (`h4`). */
|
|
178
|
+
readonly blockTitle: "dsh-rw-subtitle";
|
|
179
|
+
/** A description paragraph. */
|
|
180
|
+
readonly description: "dsh-rw-description";
|
|
181
|
+
/** A hint/caption paragraph. */
|
|
182
|
+
readonly hint: "dsh-rw-hint";
|
|
183
|
+
/** A vertical stack. */
|
|
184
|
+
readonly stack: "dsh-rw-stack";
|
|
185
|
+
/** A list of rows. */
|
|
186
|
+
readonly list: "dsh-rw-list";
|
|
187
|
+
/** One workspace section of the session inventory. */
|
|
188
|
+
readonly group: "dsh-rw-group";
|
|
189
|
+
/** A workspace section's heading line (label + count). */
|
|
190
|
+
readonly groupHead: "dsh-rw-group-head";
|
|
191
|
+
/**
|
|
192
|
+
* The inventory's action bar (select all / clear / delete). Sticky: the list is long, and a bar that
|
|
193
|
+
* scrolls away forces the user to scroll back up for every action.
|
|
194
|
+
*/
|
|
195
|
+
readonly actionBar: "dsh-rw-action-bar";
|
|
196
|
+
/** One session row: checkbox plus its two-line body. */
|
|
197
|
+
readonly sessionRow: "dsh-rw-session-row";
|
|
198
|
+
/** A session row's text column. */
|
|
199
|
+
readonly sessionBody: "dsh-rw-session-body";
|
|
200
|
+
/** A session row's first line (label + badges). */
|
|
201
|
+
readonly sessionHead: "dsh-rw-session-head";
|
|
202
|
+
/** A session row's second line (id, time, size, parent). */
|
|
203
|
+
readonly sessionMeta: "dsh-rw-session-meta";
|
|
204
|
+
/** A short session-id chip. */
|
|
205
|
+
readonly idChip: "dsh-rw-id-chip";
|
|
206
|
+
/** One row (root or connection). */
|
|
207
|
+
readonly row: "dsh-rw-row";
|
|
208
|
+
/** A row's title. */
|
|
209
|
+
readonly rowTitle: "dsh-rw-row-title";
|
|
210
|
+
/** A row's secondary text (path, note). */
|
|
211
|
+
readonly rowMeta: "dsh-rw-row-meta";
|
|
212
|
+
/**
|
|
213
|
+
* A row's trailing action group.
|
|
214
|
+
*
|
|
215
|
+
* Replaces the `style: { marginLeft: 'auto' }` that four templates used to repeat: a layout decision
|
|
216
|
+
* written in four places is a layout decision that drifts.
|
|
217
|
+
*/
|
|
218
|
+
readonly rowActions: "dsh-rw-row-actions";
|
|
219
|
+
/** A row's quiet annotation (the connection note). */
|
|
220
|
+
readonly rowNote: "dsh-rw-row-note";
|
|
221
|
+
/** The degraded-transport glyph: colour without a word. */
|
|
222
|
+
readonly warnGlyph: "dsh-rw-warn-glyph";
|
|
223
|
+
/**
|
|
224
|
+
* The sidebar's remote-session mark: a globe in the leading cell of a session row.
|
|
225
|
+
*
|
|
226
|
+
* The cell is the shell's own 16px seat (`sidebar.session.row.leading`), so this rule only centres the
|
|
227
|
+
* glyph and keeps it from being squeezed: no width, no padding, no background of its own.
|
|
228
|
+
*/
|
|
229
|
+
readonly remoteMark: "dsh-rw-remote-mark";
|
|
230
|
+
/** A badge/chip. */
|
|
231
|
+
readonly badge: "dsh-rw-badge";
|
|
232
|
+
/** A badge in the success tone (a live session, a finished transfer). */
|
|
233
|
+
readonly badgeSuccess: "dsh-rw-badge-success";
|
|
234
|
+
/** A badge in the error tone (a failed transfer). */
|
|
235
|
+
readonly badgeError: "dsh-rw-badge-error";
|
|
236
|
+
/**
|
|
237
|
+
* A checkbox.
|
|
238
|
+
*
|
|
239
|
+
* The templates used to render a bare `<input type="checkbox">`: no rule existed for it anywhere in this
|
|
240
|
+
* stylesheet, so it was the browser's default size and accent colour. The platform's own checkbox rule is
|
|
241
|
+
* `width/height: 16px; margin: 0; accent-color: var(--dsw-alias-brand-primary)`.
|
|
242
|
+
*/
|
|
243
|
+
readonly checkbox: "dsh-rw-checkbox";
|
|
244
|
+
/**
|
|
245
|
+
* The label that wraps a checkbox **and** its row body, so the whole row is the hit target.
|
|
246
|
+
*
|
|
247
|
+
* The session rows previously had no `<label>` at all (only `aria-label` on the input), so clicking the row
|
|
248
|
+
* text did nothing and the target was a 16px square.
|
|
249
|
+
*/
|
|
250
|
+
readonly checkboxLabel: "dsh-rw-checkbox-label";
|
|
251
|
+
/** A field column: caption above control. */
|
|
252
|
+
readonly field: "dsh-rw-field";
|
|
253
|
+
/** A row of fields plus its commit button. */
|
|
254
|
+
readonly form: "dsh-rw-form";
|
|
255
|
+
/**
|
|
256
|
+
* The directory-flow dialog root. Besides the card, this is the **container** for the inline-size query
|
|
257
|
+
* below (`container-type: inline-size`), so the same component reflows by the width it is *given* rather
|
|
258
|
+
* than by the viewport.
|
|
259
|
+
*/
|
|
260
|
+
readonly dialog: "dsh-rw-dialog";
|
|
261
|
+
/** The dialog's title line: flex-wrap so a long title and its badge share one row when there is space. */
|
|
262
|
+
readonly dialogHeader: "dsh-rw-dialog-header";
|
|
263
|
+
/** The dialog's body: one column by default, two columns once the container says there is room. */
|
|
264
|
+
readonly dialogBody: "dsh-rw-dialog-body";
|
|
265
|
+
/** A field that spans the whole form row (`grid-column: 1 / -1`). */
|
|
266
|
+
readonly fieldSpan: "dsh-rw-field-span";
|
|
267
|
+
/** A button that owns the whole form row. */
|
|
268
|
+
readonly spanFull: "dsh-rw-span-full";
|
|
269
|
+
/** A field whose control shares its line with one button (the remote path and its browse button). */
|
|
270
|
+
readonly inputRow: "dsh-rw-input-row";
|
|
271
|
+
/**
|
|
272
|
+
* A panel header: the title on the start edge, its controls on the end edge.
|
|
273
|
+
*
|
|
274
|
+
* Replaces the inline `display:flex; justify-content:space-between` two templates used to carry.
|
|
275
|
+
*/
|
|
276
|
+
readonly header: "dsh-rw-header";
|
|
277
|
+
/** The trailing control group of a {@link CLASS.header}. */
|
|
278
|
+
readonly headerActions: "dsh-rw-header-actions";
|
|
279
|
+
/** The button base. Every button also carries one variant class. */
|
|
280
|
+
readonly button: "dsh-rw-button";
|
|
281
|
+
/** Primary (brand-filled) button. */
|
|
282
|
+
readonly buttonPrimary: "dsh-rw-button-primary";
|
|
283
|
+
/** Secondary (outlined) button. */
|
|
284
|
+
readonly buttonSecondary: "dsh-rw-button-secondary";
|
|
285
|
+
/** Ghost button: quiet until hovered (per-row destructive actions). */
|
|
286
|
+
readonly buttonGhost: "dsh-rw-button-ghost";
|
|
287
|
+
/**
|
|
288
|
+
* Row button: a **navigable** list row (the directory browser's enterable entries).
|
|
289
|
+
*
|
|
290
|
+
* It exists because the ghost variant carries the theme's **error** tone (`--dsw-alias-state-error-primary`,
|
|
291
|
+
* which is `--dsw-static-red-600` in the light theme), and that is right for a delete action but wrong for a
|
|
292
|
+
* directory name: the first release of the browser rendered every directory in red. A row therefore declares
|
|
293
|
+
* its own colour instead of inheriting the destructive one, so the reading does not depend on rule order.
|
|
294
|
+
*/
|
|
295
|
+
readonly buttonRow: "dsh-rw-button-row";
|
|
296
|
+
/**
|
|
297
|
+
* Chip: a control that sits in a row of the platform's own chrome (the composer tool row) and must not read
|
|
298
|
+
* as a stray bordered button next to them. Mirrors the platform's own control there: transparent, ~28px tall,
|
|
299
|
+
* a 12px label, `--dsw-radius-sm`, and the hover/active washes.
|
|
300
|
+
*/
|
|
301
|
+
readonly buttonChip: "dsh-rw-button-chip";
|
|
302
|
+
/**
|
|
303
|
+
* Menu item: one row of the platform's session 「…」 menu (`session-row-actions.ts`).
|
|
304
|
+
*
|
|
305
|
+
* The base button is a centred pill; inside a popover menu the row has to be full width, left aligned and
|
|
306
|
+
* quiet until hovered — otherwise the two new entries read as two grey buttons dropped into the menu. The
|
|
307
|
+
* colours are the same label/hover/active washes the platform's own menu rows use.
|
|
308
|
+
*/
|
|
309
|
+
readonly menuItem: "dsh-rw-menu-item";
|
|
310
|
+
/**
|
|
311
|
+
* Destructive menu entry: red label so the row reads as a warning **before** it is clicked.
|
|
312
|
+
*
|
|
313
|
+
* Only the label and its hover wash change; the geometry stays the base menu row's, because a destructive row
|
|
314
|
+
* that is also a different size reads as a different kind of control rather than the same control with a
|
|
315
|
+
* consequence.
|
|
316
|
+
*/
|
|
317
|
+
readonly menuItemDanger: "dsh-rw-menu-item-danger";
|
|
318
|
+
/** Small size modifier. */
|
|
319
|
+
readonly compact: "dsh-rw-compact";
|
|
320
|
+
/** A text input. */
|
|
321
|
+
readonly input: "dsh-rw-input";
|
|
322
|
+
/** A `<select>`. */
|
|
323
|
+
readonly select: "dsh-rw-select";
|
|
324
|
+
/** An inline notice block. */
|
|
325
|
+
readonly notice: "dsh-rw-notice";
|
|
326
|
+
/** The neutral (info) notice tone. */
|
|
327
|
+
readonly noticeInfo: "dsh-rw-notice-info";
|
|
328
|
+
/** The failure tone: red text and hairline over the neutral surface. */
|
|
329
|
+
readonly noticeError: "dsh-rw-notice-error";
|
|
330
|
+
/** A status dot. */
|
|
331
|
+
readonly statusDot: "dsh-rw-status-dot";
|
|
332
|
+
/**
|
|
333
|
+
* An empty state: the placeholder that says "nothing here yet".
|
|
334
|
+
*
|
|
335
|
+
* Its own class because "empty" used to be either a `hint` paragraph (12px grey, nearly invisible) or an
|
|
336
|
+
* info notice, depending on which of the three surfaces rendered it — three spellings of one state.
|
|
337
|
+
*/
|
|
338
|
+
readonly empty: "dsh-rw-empty";
|
|
339
|
+
/** The transfer progress bar. */
|
|
340
|
+
readonly progress: "dsh-rw-progress";
|
|
341
|
+
/** A wrapped row of actions (buttons that may share a line when there is room). */
|
|
342
|
+
readonly actions: "dsh-rw-actions";
|
|
343
|
+
/** The directory browser: one listing level, one column whatever width it is given. */
|
|
344
|
+
readonly browser: "dsh-rw-browser";
|
|
345
|
+
/** The browser's current-path line. */
|
|
346
|
+
readonly browserPath: "dsh-rw-browser-path";
|
|
347
|
+
/** The browser's row list. */
|
|
348
|
+
readonly browserList: "dsh-rw-browser-list";
|
|
349
|
+
/** One `<li>` of the browser's list. */
|
|
350
|
+
readonly browserItem: "dsh-rw-browser-item";
|
|
351
|
+
/** A browser row that can be entered (a directory). */
|
|
352
|
+
readonly browserRow: "dsh-rw-browser-row";
|
|
353
|
+
/** A browser row that cannot be entered (a file or a symlink), rendered as text. */
|
|
354
|
+
readonly browserQuiet: "dsh-rw-browser-quiet";
|
|
355
|
+
/** The browser's committing action; owns its row. */
|
|
356
|
+
readonly browserCommit: "dsh-rw-browser-commit";
|
|
357
|
+
/** The session entry's mount point in the composer tool row. */
|
|
358
|
+
readonly sessionEntry: "dsh-rw-session-entry";
|
|
359
|
+
/** The session entry's trigger button. */
|
|
360
|
+
readonly sessionTrigger: "dsh-rw-session-trigger";
|
|
361
|
+
/**
|
|
362
|
+
* The session entry's card surface (the floating panel of `session-directory.ts`).
|
|
363
|
+
*
|
|
364
|
+
* Since the portal (`CLASS.portal`) owns the positioning, this class is the *surface*: the theme's overlay
|
|
365
|
+
* colour, its panel elevation and the hairline a card needs when it floats over arbitrary content.
|
|
366
|
+
*/
|
|
367
|
+
readonly floating: "dsh-rw-floating";
|
|
368
|
+
/**
|
|
369
|
+
* The body-level container a card is portalled into (`src/client/portal.ts`): `position: fixed`, so no
|
|
370
|
+
* ancestor's `overflow`/`transform`/`contain` can clip or re-anchor the card, and viewport-bounded so it
|
|
371
|
+
* still fits a narrow window. See {@link controlStylesheet} for the placement it is combined with.
|
|
372
|
+
*/
|
|
373
|
+
readonly portal: "dsh-rw-portal";
|
|
374
|
+
/** Placement of the directory-flow dialog's portal: the centre of the window. */
|
|
375
|
+
readonly portalTop: "dsh-rw-portal-top";
|
|
376
|
+
/** Placement of the session entry's portal: the centre of the window (its own surface, same placement). */
|
|
377
|
+
readonly portalComposer: "dsh-rw-portal-composer";
|
|
378
|
+
/**
|
|
379
|
+
* The click sink under a **modal** card: it swallows pointer input over the page behind the dialog.
|
|
380
|
+
*
|
|
381
|
+
* The card claims `aria-modal="true"` and traps Tab; without this element the pointer still reached the page
|
|
382
|
+
* underneath, which is how a click could land on the form behind an open dialog (audit 2026-11-01b ui P2-1).
|
|
383
|
+
* A sibling of the portal container at a lower `z-index`, so it never covers the card.
|
|
384
|
+
*/
|
|
385
|
+
readonly backdrop: "dsh-rw-backdrop";
|
|
386
|
+
/**
|
|
387
|
+
* The **one** placement every confirmation card uses: centred, narrow (`32rem`), at the settings tier.
|
|
388
|
+
*
|
|
389
|
+
* Three confirmation cards used to live in three different shells — one at 44rem over the settings modal, one at
|
|
390
|
+
* 44rem in the overlay layer, one inline in a settings block — so the same act ("confirm this deletion") looked
|
|
391
|
+
* different depending on where it was started from, and the sidebar's copy was a 704 px-wide card holding one
|
|
392
|
+
* sentence and two buttons (audit 2026-11-01b ui P2-8 / task-12 B1). It is a deliberate decision that the sidebar
|
|
393
|
+
* card gets **smaller**.
|
|
394
|
+
*/
|
|
395
|
+
readonly portalConfirm: "dsh-rw-portal-confirm";
|
|
396
|
+
/**
|
|
397
|
+
* The backdrop's tier when the card was opened **from inside the platform's settings modal**.
|
|
398
|
+
*
|
|
399
|
+
* The settings modal lives at z 900/1001, so the sink sits above it (1001) and the card above that (1002) —
|
|
400
|
+
* otherwise the page under a settings-hosted dialog would keep the promise broken.
|
|
401
|
+
*/
|
|
402
|
+
readonly backdropSettings: "dsh-rw-backdrop-settings";
|
|
403
|
+
/**
|
|
404
|
+
* Placement of the connection **edit dialog**'s portal.
|
|
405
|
+
*
|
|
406
|
+
* It needs its own tier because it is the only one of the three cards opened **from inside a platform
|
|
407
|
+
* modal** (the settings dialog). `CLASS.portal` sits at the menu/popover tier (100), which is *below* the
|
|
408
|
+
* platform's modal layers (900 / 1001) — a card portalled there would render behind the very panel that
|
|
409
|
+
* opened it. This placement raises it above them.
|
|
410
|
+
*/
|
|
411
|
+
readonly portalSettings: "dsh-rw-portal-settings";
|
|
412
|
+
};
|
|
413
|
+
/**
|
|
414
|
+
* One class attribute from a class name plus optional modifiers.
|
|
415
|
+
*
|
|
416
|
+
* @param names - the classes, `false`/`undefined` entries are dropped.
|
|
417
|
+
* @returns the `className` value.
|
|
418
|
+
*/
|
|
419
|
+
export declare function classes(...names: readonly (string | false | undefined)[]): string;
|
|
420
|
+
/**
|
|
421
|
+
* The complete stylesheet for the vocabulary above.
|
|
422
|
+
*
|
|
423
|
+
* Exported as a pure string so a test can assert the token contract offline (which tokens are used, that the
|
|
424
|
+
* primary button really declares a brand `background`, and that hover/active/disabled each have a rule)
|
|
425
|
+
* without a browser or a CSS engine.
|
|
426
|
+
*
|
|
427
|
+
* @returns CSS text, ready for a `<style>` element.
|
|
428
|
+
*/
|
|
429
|
+
export declare function controlStylesheet(): string;
|
|
430
|
+
/** The subset of `Document` the injection needs; structural so no DOM lib is required to type it. */
|
|
431
|
+
export interface StyleDocument {
|
|
432
|
+
readonly head: {
|
|
433
|
+
appendChild(node: unknown): unknown;
|
|
434
|
+
};
|
|
435
|
+
getElementById(id: string): unknown;
|
|
436
|
+
createElement(tag: 'style'): {
|
|
437
|
+
id: string;
|
|
438
|
+
textContent: string;
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Mount the stylesheet once per document.
|
|
443
|
+
*
|
|
444
|
+
* Idempotent through {@link CONTROL_STYLE_ID}, so two containers (the settings section and a directory-flow
|
|
445
|
+
* hole) share one element.
|
|
446
|
+
*
|
|
447
|
+
* The returned disposer is deliberately a **no-op**: it never removes the element. That is the intended
|
|
448
|
+
* behaviour, not an oversight — unmounting a surface must not strip the rules the surfaces still on screen are
|
|
449
|
+
* using (the class of flicker the file tree had to learn about in audit 0047). A previous version of this
|
|
450
|
+
* comment claimed the opposite ("the stylesheet leaves with the last mounted surface"), which the code never
|
|
451
|
+
* did; the test below it (`client-controls.test.ts`) had the real rule right all along.
|
|
452
|
+
*
|
|
453
|
+
* @param doc - the page's `document`, or `undefined` off-browser (tests) where the call is a no-op.
|
|
454
|
+
* @returns a disposer that is safe to call and does nothing; never throws.
|
|
455
|
+
*/
|
|
456
|
+
export declare function injectControlStyles(doc: StyleDocument | undefined): () => void;
|
|
457
|
+
/** The idempotent stylesheet mount for a React effect: `useEffect(injectControlStylesInBrowser, [])`. */
|
|
458
|
+
export declare function injectControlStylesInBrowser(): () => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The file tree's host channel: the plugin's own HTTP route, narrowed to the four calls the tree makes.
|
|
3
|
+
*
|
|
4
|
+
* It lives beside the model rather than inside it for the reason every IO in this half does: the model must be
|
|
5
|
+
* testable with no server (红线 3), and the fetch plumbing must not leak into a reducer.
|
|
6
|
+
*
|
|
7
|
+
* @module dsh-remote-workspace/client/file-tree-io
|
|
8
|
+
*/
|
|
9
|
+
import { type FileTreeIo } from './file-tree.ts';
|
|
10
|
+
import { type FetchLike } from './roots-panel.ts';
|
|
11
|
+
/**
|
|
12
|
+
* Bind the tree to the route.
|
|
13
|
+
*
|
|
14
|
+
* @param fetchImpl - `window.fetch` in the app, a stub in tests.
|
|
15
|
+
* @param path - override for tests; defaults to {@link ROOTS_API_PATH}.
|
|
16
|
+
* @returns the four calls the tree makes.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createFileTreeIo(fetchImpl: FetchLike, path?: string): FileTreeIo;
|
|
19
|
+
//# sourceMappingURL=file-tree-io.d.ts.map
|