feat(gui): settings panel with locale and theme preferences
Add the browser Settings surface as slot-composed plugins over new
preference services:
- Rename dsh-client-i18n to dsh-client-locale (locale is the domain
name); LocaleService adds getLocale()/setLocale(id), immutable
snapshots, a locale/change event, and dsh.locale persistence.
- ThemeService owns the light/dark/system preference (default system),
resolves system via prefers-color-scheme, publishes theme/change
snapshots, persists dsh.theme, and no longer touches the DOM;
ui-layout's ThemePresenter applies resolved snapshots
(body[data-ds-dark-theme] + alias tokens) and cleans up on dispose.
- ui-sidebar drops the phase-1 settings dropdown/modal; the foot renders
the new sidebar.settings slot with the column state.
- New ui-settings shell occupies sidebar.settings: foot trigger row and
the centered 1080x700 panel (figma 501:29947) with 24% mask, close
button / mask click / Escape all closing, and a 188px nav projected
from the settings.section list slot it declares. Nav labels are
registrant-localized; sections re-register on locale change, so the
ledger version is the shell's only subscription.
- ui-settings-general registers the General section: Permission and
Tool Call skeletons, live Language (locale menu) and Appearance
(Light/Dark/System cubes following the persisted preference); its
slot store mirrors both service snapshots via apply-side listeners.
- ui-settings-models registers the Models nav entry with an empty
content column.
- Portaled menus pin z-index above modal overlays (a menu anchored
inside the settings dialog rendered underneath it and was
unclickable).
- theme/data/list-pen icons in ui-primitives; settings copy ships as
zh/en dictionaries; fixture manifests gain the settings rows.
2026-07-26 00:16:05 +08:00
|
|
|
{
|
|
|
|
|
"name": "@deepseek-ai/dsh-client-ui-settings",
|
|
|
|
|
"description": "Settings shell plugin: sidebar trigger + modal panel occupying sidebar.settings; declares the settings.section list slot",
|
|
|
|
|
"version": "0.0.1",
|
|
|
|
|
"private": true,
|
|
|
|
|
"type": "module",
|
|
|
|
|
"main": "lib/index.js",
|
|
|
|
|
"types": "lib/types/index.d.ts",
|
|
|
|
|
"exports": {
|
|
|
|
|
".": {
|
|
|
|
|
"types": "./lib/types/index.d.ts",
|
|
|
|
|
"default": "./lib/index.js"
|
|
|
|
|
},
|
|
|
|
|
"./invariant": {
|
|
|
|
|
"types": "./lib/types/invariant.d.ts",
|
|
|
|
|
"default": "./lib/invariant.js"
|
|
|
|
|
},
|
|
|
|
|
"./client": {
|
|
|
|
|
"types": "./lib/types/client/index.d.ts",
|
|
|
|
|
"default": "./lib/client.js"
|
|
|
|
|
},
|
|
|
|
|
"./src/*": "./src/*",
|
|
|
|
|
"./package.json": "./package.json"
|
|
|
|
|
},
|
|
|
|
|
"dshClient": {
|
|
|
|
|
"inject": [
|
|
|
|
|
"@deepseek-ai/dsh-client-runtime",
|
2026-07-26 12:40:17 +08:00
|
|
|
"@deepseek-ai/dsh-client-ui-sidebar"
|
feat(gui): settings panel with locale and theme preferences
Add the browser Settings surface as slot-composed plugins over new
preference services:
- Rename dsh-client-i18n to dsh-client-locale (locale is the domain
name); LocaleService adds getLocale()/setLocale(id), immutable
snapshots, a locale/change event, and dsh.locale persistence.
- ThemeService owns the light/dark/system preference (default system),
resolves system via prefers-color-scheme, publishes theme/change
snapshots, persists dsh.theme, and no longer touches the DOM;
ui-layout's ThemePresenter applies resolved snapshots
(body[data-ds-dark-theme] + alias tokens) and cleans up on dispose.
- ui-sidebar drops the phase-1 settings dropdown/modal; the foot renders
the new sidebar.settings slot with the column state.
- New ui-settings shell occupies sidebar.settings: foot trigger row and
the centered 1080x700 panel (figma 501:29947) with 24% mask, close
button / mask click / Escape all closing, and a 188px nav projected
from the settings.section list slot it declares. Nav labels are
registrant-localized; sections re-register on locale change, so the
ledger version is the shell's only subscription.
- ui-settings-general registers the General section: Permission and
Tool Call skeletons, live Language (locale menu) and Appearance
(Light/Dark/System cubes following the persisted preference); its
slot store mirrors both service snapshots via apply-side listeners.
- ui-settings-models registers the Models nav entry with an empty
content column.
- Portaled menus pin z-index above modal overlays (a menu anchored
inside the settings dialog rendered underneath it and was
unclickable).
- theme/data/list-pen icons in ui-primitives; settings copy ships as
zh/en dictionaries; fixture manifests gain the settings rows.
2026-07-26 00:16:05 +08:00
|
|
|
],
|
|
|
|
|
"platform": "web"
|
|
|
|
|
},
|
|
|
|
|
"scripts": {
|
|
|
|
|
"bundle": "tsdown",
|
|
|
|
|
"watch": "tsdown --watch"
|
|
|
|
|
},
|
|
|
|
|
"license": "BSD-3-Clause",
|
|
|
|
|
"dependencies": {
|
|
|
|
|
"clsx": "^2.0.0"
|
|
|
|
|
},
|
|
|
|
|
"peerDependencies": {
|
|
|
|
|
"@deepseek-ai/dsh-client-runtime": "^0.0.1",
|
|
|
|
|
"@deepseek-ai/dsh-client-ui-primitives": "^0.0.1",
|
|
|
|
|
"@deepseek-ai/dsh-client-ui-slots": "^0.0.1",
|
|
|
|
|
"@deepseek-ai/dsh-invariants": "^0.0.1",
|
|
|
|
|
"cordis": "^4.0.0-rc.7",
|
|
|
|
|
"react": "^18.2.0"
|
|
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
|
|
|
|
"@deepseek-ai/dsh-client-runtime": "workspace:^",
|
|
|
|
|
"@deepseek-ai/dsh-client-ui-primitives": "workspace:^",
|
|
|
|
|
"@deepseek-ai/dsh-client-ui-sidebar": "workspace:^",
|
|
|
|
|
"@deepseek-ai/dsh-client-ui-slots": "workspace:^",
|
|
|
|
|
"@deepseek-ai/dsh-invariants": "workspace:^",
|
|
|
|
|
"@types/react": "~18.3.1",
|
|
|
|
|
"cordis": "^4.0.0-rc.7",
|
|
|
|
|
"react": "^18.2.0"
|
|
|
|
|
},
|
|
|
|
|
"files": [
|
|
|
|
|
"lib/index.js",
|
|
|
|
|
"lib/invariant.js",
|
|
|
|
|
"lib/client.js",
|
|
|
|
|
"lib/types/**/*.d.ts",
|
|
|
|
|
"lib/types/**/*.d.ts.map",
|
|
|
|
|
"src"
|
|
|
|
|
]
|
|
|
|
|
}
|