@deepseek-ai/dsh-client-ui-settings 0.0.1-rc.2 → 0.0.1-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/client/ui-settings/README.md
5
- README.md: 8bf085fd02e3c76148674065bb4f5708e9a6e8d8
6
- README.zh.md: f7b6f18809c64be6830ea23c3968e9af70b70c41
5
+ README.md: 950585c4957cd59fe3a38dc37cdd4084f7c5541c
6
+ README.zh.md: dce8dbf5c8e0939142fed8a3df84c47acd7c8a1e
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [中文](README.zh.md)
4
4
 
5
- The settings domain's base layer, with two roles and no presentation of its own. It provides `ctx.settingsScope`, the Host transport every preference row binds its durable namespace section through, and it declares the settings slot types registrants fill: `settings.trigger` / `settings.header` / `settings.close` (chrome content), `settings.action` (ordered content-header actions), `settings.section` (one page per feature), and `settings.onboarding` (ordered feature-owned pages). It depends on no `ui-*` presentation package, so any feature that owns a preference can reach it; the settings SHELL — the `sidebar.settings` occupant, its navigation, and the chrome — lives in ui-settings-general, because a shell dependency on ui-sidebar would close a reference graph cycle through ui-layout and ui-theme. The shell's own contract types live beside the shell for the same reason.
5
+ The settings domain's base layer, with two roles and no presentation of its own. It provides `ctx.settingsScope`, the Host transport every preference row binds its durable namespace section through, and it declares the settings slot types registrants fill: `settings.trigger` / `settings.header` / `settings.close` (chrome content), `settings.action` (ordered content-header actions), `settings.section` (one page per feature), `settings.plugins.tab` (feature-owned pages inside the Plugins section), and `settings.onboarding` (ordered feature-owned pages). It depends on no `ui-*` presentation package, so any feature that owns a preference can reach it; the settings SHELL — the `sidebar.settings` occupant, its navigation, and the chrome — lives in ui-settings-general, because a shell dependency on ui-sidebar would close a reference graph cycle through ui-layout and ui-theme. The shell's own contract types live beside the shell for the same reason.
6
6
 
7
7
  The plugin injects nothing and waits for nothing: `ctx.settingsScope.bind(spec)` resolves the wire face through the CALLER's context at call time, so the bound scope's disposer belongs to the calling fiber, and the caller injects `connection` for the transport and `remote` for the invalidation. Listeners exist before the first background read starts, so a row's activation never blocks on the settings transport. A bound scope reloads on the forwarded `settings/document-updated` event for its own namespace and on `connection/reset`. Writes carry one field path and the last known namespace revision as `expectedRevision`; a rejected or failed write re-reads unless a newer write already superseded it, and a stale read never publishes over a newer one. Without a `decode` in the spec, a section that is not a plain object, fails its rehydrated schema, or carries a schema envelope this client cannot rehydrate publishes no value at all, so a row renders its own absent state instead of a half-decoded one.
8
8
 
package/README.zh.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.md) | 中文
4
4
 
5
- 设置领域的底座,承担两项职责,本身不含任何呈现内容。它提供 `ctx.settingsScope`——每个偏好设置行绑定自己那份持久化命名空间分区所用的宿主传输层;并声明由注册方填充的设置 slot 类型:`settings.trigger`/`settings.header`/`settings.close`(界面框架内容)、`settings.action`(内容标题栏中的有序操作)、`settings.section`(每项功能一页)和 `settings.onboarding`(由各功能持有的有序页面)。它不依赖任何 `ui-*` 呈现包,因此任何持有偏好设置的功能都能够到它;设置**外壳**——`sidebar.settings` 占位方、它的导航与界面框架——位于 ui-settings-general,因为外壳一旦依赖 ui-sidebar,就会经 ui-layout 与 ui-theme 闭合出一条引用图环路。外壳自身的契约类型出于同一原因与外壳放在一起。
5
+ 设置领域的底座,承担两项职责,本身不含任何呈现内容。它提供 `ctx.settingsScope`——每个偏好设置行绑定自己那份持久化命名空间分区所用的宿主传输层;并声明由注册方填充的设置 slot 类型:`settings.trigger`/`settings.header`/`settings.close`(界面框架内容)、`settings.action`(内容标题栏中的有序操作)、`settings.section`(每项功能一页)、`settings.plugins.tab`(“插件”分区内由各功能持有的页面)和 `settings.onboarding`(由各功能持有的有序页面)。它不依赖任何 `ui-*` 呈现包,因此任何持有偏好设置的功能都能够到它;设置**外壳**——`sidebar.settings` 占位方、它的导航与界面框架——位于 ui-settings-general,因为外壳一旦依赖 ui-sidebar,就会经 ui-layout 与 ui-theme 闭合出一条引用图环路。外壳自身的契约类型出于同一原因与外壳放在一起。
6
6
 
7
7
  该插件不注入任何服务、也不等待任何服务:`ctx.settingsScope.bind(spec)` 在调用时经**调用方**的 context 解析线路面,因此绑定所得 scope 的 disposer 归调用方 fiber 所有,而由调用方注入 `connection` 取得传输层、注入 `remote` 取得失效通知。监听器在首次后台读取启动之前就已存在,因此某一行的激活绝不会阻塞在设置传输层上。已绑定的 scope 会在收到属于自己命名空间的转发 `settings/document-updated` 事件时、以及在 `connection/reset` 时重新读取。写入携带单一字段路径以及最近已知的命名空间 revision 作为 `expectedRevision`;被拒绝或失败的写入会重新读取,除非已有更新的写入取代了它,而过期的读取绝不会覆盖发布更新的结果。若 spec 未提供 `decode`,则分区不是普通对象、未通过其重建后的 schema 校验、或携带本客户端无法重建的 schema 信封时,一律不发布任何值,于是行渲染自己的缺失状态,而不是一份半解码的值。
8
8
 
package/lib/client.js CHANGED
@@ -187,7 +187,7 @@ window.__ModuleLoader__.load({
187
187
  * cross-plugin collaboration through cordis services
188
188
  * (`packages/client/tsdown.client.ts`).
189
189
  */
190
- var SettingsScopeService = class extends _deepseek_ai_cordis.Service {
190
+ var SettingsScopeBinder = class extends _deepseek_ai_cordis.Service {
191
191
  /**
192
192
  * @param ctx - the providing plugin's context.
193
193
  */
@@ -240,11 +240,11 @@ window.__ModuleLoader__.load({
240
240
  * @param ctx - client root context.
241
241
  */
242
242
  function apply(ctx) {
243
- new SettingsScopeService(ctx);
243
+ new SettingsScopeBinder(ctx);
244
244
  }
245
245
  //#endregion
246
+ exports.SettingsScopeBinder = SettingsScopeBinder;
246
247
  exports.SettingsScopeController = SettingsScopeController;
247
- exports.SettingsScopeService = SettingsScopeService;
248
248
  exports.apply = apply;
249
249
  exports.inject = inject;
250
250
  return module.exports;
@@ -69,6 +69,19 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
69
69
  scope: 'root';
70
70
  owner: SettingsSectionOwnerProps;
71
71
  };
72
+ /**
73
+ * One page inside the Plugins settings section. The section owner renders
74
+ * localized entry labels as tabs and mounts each contribution inside its
75
+ * corresponding tab panel. Options: `id` (tab key), `order` (tab order),
76
+ * and `label` (registrant-localized tab text). Declared at runtime by the
77
+ * feature that owns the Plugins section; the type lives here so inventory
78
+ * and configuration plugins collaborate without depending on one another.
79
+ */
80
+ 'settings.plugins.tab': {
81
+ kind: 'list';
82
+ scope: 'root';
83
+ owner: SettingsPluginsTabOwnerProps;
84
+ };
72
85
  /**
73
86
  * Root-scoped onboarding steps contributed by settings features. The
74
87
  * shell mounts one ordered step at a time; the active registrant either
@@ -87,14 +100,18 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
87
100
  owner: SettingsOnboardingOwnerProps;
88
101
  };
89
102
  /**
90
- * One preference row inside the General section, contributed by the
91
- * feature plugin that owns the preference (locale Language, ui-theme →
92
- * Appearance, ui-conversation Composer Enter). Options: `id` (row key),
93
- * `order` (row position). Rows draw their own internals; the section
94
- * column only stacks them. Declared at runtime by ui-settings-general's
95
- * General entry the type lives here with every other settings slot type,
96
- * because this package is the settings domain's base layer and every
97
- * registrant already depends on it for `ctx.settingsScope`.
103
+ * One preference row inside the General section the additive seat for a
104
+ * single setting that needs no page of its own (a whole page is
105
+ * `settings.section`), contributed by the feature plugin that owns the
106
+ * preference (locale Language, ui-theme Appearance, ui-conversation
107
+ * Composer Enter). Options: `id` (row key), `order` (row position). The
108
+ * section column only stacks rows, so a row draws its own internals,
109
+ * including its label: nothing projects a `label` here and the owner passes
110
+ * no props at all copy, current value, and the write path are all yours,
111
+ * through your own inject face and `host.call`. Declared at runtime by
112
+ * ui-settings-general's General entry; the type lives here with every other
113
+ * settings slot type, because this package is the settings domain's base
114
+ * layer and every registrant already depends on it for `ctx.settingsScope`.
98
115
  */
99
116
  'settings.general.item': {
100
117
  kind: 'list';
@@ -108,6 +125,11 @@ export interface SettingsGeneralItemOwnerProps {
108
125
  /** Marker field: item owner props are intentionally empty. */
109
126
  children?: never;
110
127
  }
128
+ /** Owner share of a Plugins tab (the section supplies nothing). */
129
+ export interface SettingsPluginsTabOwnerProps {
130
+ /** Marker field: tab owner props are intentionally empty. */
131
+ children?: never;
132
+ }
111
133
  /** Owner share of the trigger content seat: the sidebar column state. */
112
134
  export interface SettingsTriggerOwnerProps {
113
135
  /** Whether the sidebar renders wide content (false = 56px rail, icon only). */
@@ -9,8 +9,8 @@
9
9
  * through ui-layout and ui-theme. Export discipline: packages/client/AGENTS.md.
10
10
  */
11
11
  import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client';
12
- export type { SettingsGeneralItemOwnerProps, SettingsHeaderOwnerProps, SettingsOnboardingOwnerProps, SettingsSectionOwnerProps, SettingsTriggerOwnerProps, } from './contract/slots.ts';
13
- export { SettingsScopeController, SettingsScopeService } from './settings-scope.ts';
12
+ export type { SettingsGeneralItemOwnerProps, SettingsHeaderOwnerProps, SettingsOnboardingOwnerProps, SettingsPluginsTabOwnerProps, SettingsSectionOwnerProps, SettingsTriggerOwnerProps, } from './contract/slots.ts';
13
+ export { SettingsScopeController, SettingsScopeBinder } from './settings-scope.ts';
14
14
  /**
15
15
  * Required services: none. The transport is resolved per caller through
16
16
  * `this.ctx` at `bind` time, so this plugin waits for nothing.
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { Service } from '@deepseek-ai/cordis';
8
8
  import type { Context } from '@deepseek-ai/cordis';
9
- import type { IApiClient } from '@deepseek-ai/dsh-client-connection/client';
9
+ import type { IApiClient } from '@deepseek-ai/dsh-api-remotes/client';
10
10
  import { type SettingsScope, type SettingsScopeSnapshot, type SettingsScopeSpec } from '@deepseek-ai/dsh-client-runtime/client';
11
11
  type SettingsFace = Pick<IApiClient, 'settings'>;
12
12
  /**
@@ -71,7 +71,7 @@ export declare class SettingsScopeController<T> implements SettingsScope<T> {
71
71
  }
72
72
  declare module '@deepseek-ai/cordis' {
73
73
  interface Context {
74
- settingsScope: SettingsScopeService;
74
+ settingsScope: SettingsScopeBinder;
75
75
  }
76
76
  }
77
77
  /**
@@ -81,7 +81,7 @@ declare module '@deepseek-ai/cordis' {
81
81
  * cross-plugin collaboration through cordis services
82
82
  * (`packages/client/tsdown.client.ts`).
83
83
  */
84
- export declare class SettingsScopeService extends Service {
84
+ export declare class SettingsScopeBinder extends Service {
85
85
  /**
86
86
  * @param ctx - the providing plugin's context.
87
87
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-settings",
3
3
  "description": "Settings domain base plugin: the settings-namespace scope service and the canonical settings slot-type contract",
4
- "version": "0.0.1-rc.2",
4
+ "version": "0.0.1-rc.3",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -43,28 +43,25 @@
43
43
  "peerDependencies": {
44
44
  "react": "^18.2.0",
45
45
  "@deepseek-ai/cordis": "^4.0.1-rc.1",
46
- "@deepseek-ai/dsh-api-gateway": "^0.0.1-rc.2",
47
- "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.2",
48
- "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.2",
49
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
50
- "@deepseek-ai/dsh-settings": "^0.0.1-rc.2",
51
- "@deepseek-ai/dsh-api-remotes": "^0.0.1-rc.2",
52
- "@deepseek-ai/dsh-client-connection": "^0.0.1-rc.2",
53
- "@deepseek-ai/dsh-client-schema-form": "^0.0.1-rc.2"
46
+ "@deepseek-ai/dsh-api-remotes": "^0.0.1-rc.3",
47
+ "@deepseek-ai/dsh-client-connection": "^0.0.1-rc.3",
48
+ "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.3",
49
+ "@deepseek-ai/dsh-client-schema-form": "^0.0.1-rc.3",
50
+ "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.3",
51
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.3",
52
+ "@deepseek-ai/dsh-settings": "^0.0.1-rc.3"
54
53
  },
55
54
  "devDependencies": {
56
55
  "@types/react": "~18.3.1",
57
56
  "react": "^18.2.0",
58
- "@deepseek-ai/dsh-api-gateway": "^0.0.1-rc.2",
59
- "@deepseek-ai/dsh-api-remotes": "^0.0.1-rc.2",
60
- "@deepseek-ai/dsh-client-connection": "^0.0.1-rc.2",
61
- "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.2",
62
- "@deepseek-ai/dsh-client-schema-form": "^0.0.1-rc.2",
63
57
  "@deepseek-ai/cordis": "^4.0.1-rc.1",
64
- "@deepseek-ai/dsh-client-test-runtime": "^0.0.1-rc.2",
65
- "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.2",
66
- "@deepseek-ai/dsh-settings": "^0.0.1-rc.2",
67
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2"
58
+ "@deepseek-ai/dsh-api-remotes": "^0.0.1-rc.3",
59
+ "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.3",
60
+ "@deepseek-ai/dsh-client-schema-form": "^0.0.1-rc.3",
61
+ "@deepseek-ai/dsh-client-test-runtime": "^0.0.1-rc.3",
62
+ "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.3",
63
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.3",
64
+ "@deepseek-ai/dsh-settings": "^0.0.1-rc.3"
68
65
  },
69
66
  "files": [
70
67
  "lib/index.js",