KeepLost/harniverse--packages-client-ui-layout ↗★ 1

@deepseek-ai/dsh-client-ui-layout

三栏式布局框架与面板几何服务 提供带拖拽条的侧边栏、对话框及工作区布局,适合需要构建或调整 Web 界面结构的基础包。

包名
@deepseek-ai/dsh-client-ui-layout
兼容性
待验证
Harness 依赖范围
workspace:^
Cordis 依赖范围
workspace:^
版本
0.1.0-rc.5
许可证
BSD-3-Clause
最近更新
2026年9月25日

同名包的其他仓库

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

@deepseek-ai/dsh-client-ui-layout

English | 中文

Shell plugin: three-track AppFrame (drag handles and concession chain) plus the ctx.layout panel-geometry service; it registers into the runtime-owned root slot and declares sidebar, conversation, root-scoped center.view, session-scoped details, root-scoped workbench, the workbench's workbench.section.tab/workbench.section.panel section holes, and shell.overlay. Details and workbench are mutually exclusive occupants of one physical right region, with independent width ranges, center concessions, drawer breakpoints, and double-click width reset. A closed sidebar retains a 56px control rail while the right region closes to zero width. AppFrame classifies its own width into one form factor (phone, compact, regular) and publishes it as data-viewport on the frame element; that attribute is the client's single breakpoint scale, so feature CSS selects on it rather than declaring its own media query. On a phone frame the sidebar holds no track at all: collapsed, it disappears entirely behind a frame-owned floating entry button in the reserved leading corner (the only affordance; the hidden subtree stays mounted but inert and out of the accessibility tree), and expanded it overlays the center at a clamped width behind a dismiss scrim that also closes on Escape — the center column keeps the full width in both states. The drawer ranks below the shell.overlay layer so a sheet opened from it covers the drawer, and opening a center view exits the drawer. The package also seats the theme presenter: it consumes resolved ctx.theme snapshots and projects them onto the document (html { color-scheme } for native UA chrome, body[data-ds-dark-theme] from the active color scheme, the theme's alias tokens as inline variables on body, the content font-size axis (--dsw-content-font-size, retracted on dispose), and one owned `` whose content follows the computed body background). Measuring after palette and token application keeps the rendered background as the single color authority; disposing the presenter removes its metadata node with its other global writes.

AppFrame always mounts the conversation and physical right columns; the current Session (blank sessions included) admits either right occupant. A closed zero-width right occupant is inert and hidden from the accessibility tree. The sidebar and narrow-screen override are transient. ctx.layout.setCenterView(id) names one center.view registrant to cover the center column — the conversation stays mounted underneath, inert, and selecting another session clears the view (clearCenterView returns explicitly). Center-view entries receive active: true while occupying; the frame renders only the named entry. A projected localStorage record persists only each current Workspace's right mode, open state, and details/workbench widths; the active account remains transient, removed Workspace accounts are pruned after the Workspace baseline, and an unaccounted Session uses a browser-local account. Before that baseline resolves, panel actions use a non-persisted provisional Session account and migrate to the resolved Workspace or browser-local account. Explicit membership resolves first and cwd matching covers an accounting frame that has not arrived. Below the active mode's breakpoint, or whenever the concession solver cannot retain the mode's minimum docked width, the right occupant becomes a modal full-frame drawer without rewriting its preferred width; it inerts the covered shell, traps and restores focus, and closes on Escape. Conversation and details owner shares are empty; the sidebar receives collapsed and width, the workbench receives drawer plus its selected section, the select verb, and an opener's request, and every shell.overlay entry receives generic rightMode, rightOpen, and rightDrawer occupancy facts. The workbench-section holes carry the same triple to contributed sections: each tab self-identifies against current/select, and each body renders only while its section shows (ctx.layout.openWorkbenchSection(section, request?) opens and selects in one gesture). AppFrame publishes the rendered track widths as --dsh-frame-sidebar-width and --dsh-frame-right-width, letting a frame-wide surface remain inside the conversation column and align to the right occupant without reading layout state or receiving presentation geometry as component data. Registrants obtain business data from standard hooks and actions from their own inject faces.

The /client exports are the plugin body (apply/inject), LayoutController, ILayout, and the owner-share interfaces. AppFrame, the panel store, and the concession solver remain package-internal.

Model Experience

None, as the layout shell manages browser viewing state; nothing here reaches a model request.

KV Cache effect

None; this package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

  • Sidebar geometry is transient — reload restores its default; only per-Workspace right-region preferences persist.
  • Concession and drawer modes derive a zero track without touching the preferred width — the panel restores itself when space returns; consumers must not read the stored right width as rendered truth.
  • No scroll anchoring during squeeze reflow — layout changes may move the reader's viewport.