refactor(gui): copy-free settings shell; ui-settings-general owns ownerless copy

The shell is now a pure composition face: no dictionaries, no locale
dependency, and three new chrome content seats (settings.trigger /
settings.header / settings.close) whose slot content also carries the
accessible names (trigger text, dialog aria-labelledby, visually hidden
close label). ui-settings-general returns as the owner of copy that
belongs to no single feature: chrome content, the General section with
its item slot, and the settings dictionaries. Slot types split homes —
trigger/header/close/section live in the shell contract; the
settings.general.item entry moves to the locale package (the common
dependency of every item registrant), with ui-theme consuming it
through a re-export seam; the verbatim duplicate merges are gone and
the dependency graph is a clean DAG.
This commit is contained in:
imccyu
2026-07-26 12:40:17 +08:00
parent 9a4be33899
commit a04a223bab
41 changed files with 808 additions and 336 deletions

View File

@@ -1,17 +1,9 @@
/**
* Settings-surface slot merge consumed by this package's Appearance row. The
* AUTHORITATIVE home for 'settings.general.item' is the ui-settings contract
* (declaring is claiming: the shell's General entry declares the slot); this
* file repeats the entry verbatim because the settings shell sits above the
* feature layer, so importing its types from here would invert the layering.
* TypeScript declaration merging rejects diverging duplicates, so every
* program that sees both copies enforces identity.
* Re-export seam for the `settings.general.item` slot type consumed by this
* package's Appearance row. The canonical home is the locale package (the
* common dependency of every item registrant); this file exists so row
* modules import the type from within their own package.
*/
declare module '@deepseek-ai/dsh-client-ui-slots' {
interface SlotMap {
/** One preference row inside the General section (duplicate-identical merge; authority: ui-settings contract). */
'settings.general.item': { kind: 'list'; scope: 'root'; owner: { children?: never } }
}
}
export {}
export type { SettingsGeneralItemOwnerProps } from '@deepseek-ai/dsh-client-locale/client'
// Side-effect type import: pulls the SlotMap merge into this program.
import type {} from '@deepseek-ai/dsh-client-locale/client'