docs(notes): export settings note contract types

Both sides of the bilingual pair compile in one doc-typecheck program;
module-scoped (exported) declarations keep the shared identifiers from
colliding across the pair.
This commit is contained in:
imccyu
2026-07-26 01:16:39 +08:00
parent c5cc348816
commit 8cc46e6025
3 changed files with 14 additions and 14 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write
2026-07-25-client-settings-locale-theme.md: 25e22c728ea509613c4d7f6cdfcd09faf4685760
2026-07-25-client-settings-locale-theme.zh.md: 9c2457b254aa826291d4c5a4e115e9ba2d391974
2026-07-25-client-settings-locale-theme.md: e1245a9e1fac82fb0feb84af7a59945b17fa1daf
2026-07-25-client-settings-locale-theme.zh.md: 195b2e5ffa3556dd1b8bf2dd6ec8ae84115fbdb2

View File

@@ -49,33 +49,33 @@ Section contributions use declaration-aware deferral and do not depend on the cl
### Service contracts
```ts
type ThemePreference = 'light' | 'dark' | 'system'
export type ThemePreference = 'light' | 'dark' | 'system'
interface ThemeDefinition {
export interface ThemeDefinition {
id: string
colorScheme: 'light' | 'dark'
tokens: Record<string, string>
}
interface ThemeSnapshot {
export interface ThemeSnapshot {
preference: ThemePreference
active: ThemeDefinition // system 已解析为具体 light/dark 定义
themes: readonly ThemeDefinition[]
revision: number
}
interface LocaleDefinition {
export interface LocaleDefinition {
id: 'zh' | 'en'
label: string
}
interface LocaleSnapshot {
export interface LocaleSnapshot {
active: 'zh' | 'en'
locales: readonly LocaleDefinition[]
revision: number
}
interface Events {
export interface Events {
/** @param snapshot - Current locale registry snapshot. @mode emit */
'locale/change'(snapshot: LocaleSnapshot): void
/** @param snapshot - Current theme registry snapshot. @mode emit */

View File

@@ -49,33 +49,33 @@ section contribution 使用 declaration-aware deferral不依赖 client manife
### Service contracts
```ts
type ThemePreference = 'light' | 'dark' | 'system'
export type ThemePreference = 'light' | 'dark' | 'system'
interface ThemeDefinition {
export interface ThemeDefinition {
id: string
colorScheme: 'light' | 'dark'
tokens: Record<string, string>
}
interface ThemeSnapshot {
export interface ThemeSnapshot {
preference: ThemePreference
active: ThemeDefinition // system 已解析为具体 light/dark 定义
themes: readonly ThemeDefinition[]
revision: number
}
interface LocaleDefinition {
export interface LocaleDefinition {
id: 'zh' | 'en'
label: string
}
interface LocaleSnapshot {
export interface LocaleSnapshot {
active: 'zh' | 'en'
locales: readonly LocaleDefinition[]
revision: number
}
interface Events {
export interface Events {
/** @param snapshot - Current locale registry snapshot. @mode emit */
'locale/change'(snapshot: LocaleSnapshot): void
/** @param snapshot - Current theme registry snapshot. @mode emit */