The /client entry of a UI plugin exports no values beyond what cordis loading needs; the theme constants block returns to type-only re-exports, the per-namespace schemas move into the shared *-settings modules instead of widening the host entries, and same-package specs import those internals directly per the export discipline in packages/client/AGENTS.md.
24 lines
770 B
TypeScript
24 lines
770 B
TypeScript
/** Host registration for the browser locale preference. */
|
|
|
|
import type { Context } from 'cordis'
|
|
import { settingsNamespace } from '@deepseek-ai/dsh-settings'
|
|
import { LOCALE_SETTINGS_NAMESPACE, LocaleSettingsSchema } from './locale-settings.ts'
|
|
|
|
export {
|
|
LOCALE_IDS, LOCALE_PREFERENCE_FIELD, LOCALE_SETTINGS_NAMESPACE,
|
|
type LocaleId, type LocaleSettings,
|
|
} from './locale-settings.ts'
|
|
|
|
/**
|
|
* Register the durable locale section when a settings provider exists.
|
|
* @param ctx - Host context whose optional settings service owns the section.
|
|
*/
|
|
export function apply(ctx: Context): void {
|
|
ctx.inject(['settings'], (settingsCtx) => {
|
|
settingsCtx.settings.register(
|
|
settingsNamespace(LOCALE_SETTINGS_NAMESPACE),
|
|
LocaleSettingsSchema,
|
|
)
|
|
})
|
|
}
|