@lmzhen/dsh-evolution-settings-ui 0.16.0 → 0.16.1

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.md CHANGED
@@ -31,6 +31,13 @@ writes and carries the two decisions plus a preview. It reads the approval plugi
31
31
  (`src/client/api.ts` + `approval-routes.ts`; the path literals are compared against the host table by a spec),
32
32
  wears the same card shell and button vocabulary as the parameter cards, and invents no state of its own.
33
33
 
34
+ The card rides that keyed slot with a key of its own (`approval-pending`): it has no namespace, so no
35
+ namespace-driven loop can name it — and a keyed slot renders ONLY the keys its section asks for, so
36
+ `SettingsSection` names it explicitly and puts it FIRST (it is the one card in this section that waits on a
37
+ decision). A registration nobody asks for renders nowhere: 0.16.0 shipped exactly that, which is why
38
+ `tests/section.client.spec.ts` now drives the real `apply()` and requires the section's `renderSlot` calls to cover
39
+ every key the bundle registers into the slot.
40
+
34
41
  Its states are deliberately distinct: **reading** ("正在读取待批项…"), **empty** ("没有待批的写入") and
35
42
  **failed** (the reason plus a retry). Merging the first two is what once made a slow answer read as lost data
36
43
  (E7), so the state machine lives in `pending-state.ts` and the three are asserted without a browser.
package/lib/client.js CHANGED
@@ -769,7 +769,7 @@ window.__ModuleLoader__.load({
769
769
  /** Chinese copy (the family's primary language). */
770
770
  const zh = {
771
771
  title: "自进化",
772
- subtitle: "下面按功能列出你能改的参数;没有列出的由安装时的配置决定。",
772
+ subtitle: "待你决定的写入在最上面;下面按功能列出你能改的参数,没有列出的由安装时的配置决定。",
773
773
  overridden: "我改过",
774
774
  deployment: "默认",
775
775
  loading: "正在读取设置…",
@@ -814,7 +814,7 @@ window.__ModuleLoader__.load({
814
814
  /** English copy, key for key with {@link zh}. */
815
815
  const en = {
816
816
  title: "Self-evolution",
817
- subtitle: "Changeable parameters are listed by feature below; anything not listed comes from the deployment configuration.",
817
+ subtitle: "Writes waiting for your decision come first; the changeable parameters are listed by feature below, and anything not listed comes from the deployment configuration.",
818
818
  overridden: "edited by you",
819
819
  deployment: "default",
820
820
  loading: "reading settings…",
@@ -1109,10 +1109,20 @@ window.__ModuleLoader__.load({
1109
1109
  //#region src/client/seam.ts
1110
1110
  /** Our card slot, hosted by the section this bundle registers. */
1111
1111
  const CARD_SLOT = "evolution.namespace.card";
1112
+ /**
1113
+ * The pending-window card's slot key.
1114
+ *
1115
+ * The section pairs cards by key and the parameter cards use their settings namespace; this card has no
1116
+ * namespace (its data comes from the host's approval routes), so it carries a key of its own. The constant
1117
+ * lives HERE and not in `index.ts` because the SECTION has to name it too, and `index.ts` already imports
1118
+ * the section — one definition in the module both sides already share is what keeps that pair acyclic.
1119
+ */
1120
+ const PENDING_CARD_KEY = "approval-pending";
1112
1121
  //#endregion
1113
1122
  //#region src/client/SettingsSection.ts
1114
1123
  /**
1115
- * The section shell: title, one-line explanation, then one card per namespace.
1124
+ * The section shell: title, one-line explanation, then one card per namespace — with the staged-write
1125
+ * window's card ahead of them all, because it is the only card here that waits on a decision.
1116
1126
  *
1117
1127
  * This is the shape the platform's own settings sections use — a heading plus the
1118
1128
  * child slots it declared in its registration. The cards themselves are separate
@@ -1126,7 +1136,10 @@ window.__ModuleLoader__.load({
1126
1136
  * @returns the section element.
1127
1137
  */
1128
1138
  function SettingsSection(face) {
1129
- return (0, react.createElement)("div", { className: "evolution-params" }, (0, react.createElement)("h2", { className: "evolution-params-title" }, face.t("title")), (0, react.createElement)("p", { className: "evolution-params-subtitle" }, face.t("subtitle")), ...CLIENT_PARAM_SECTIONS.map((section_) => (0, react.createElement)("div", {
1139
+ return (0, react.createElement)("div", { className: "evolution-params" }, (0, react.createElement)("h2", { className: "evolution-params-title" }, face.t("title")), (0, react.createElement)("p", { className: "evolution-params-subtitle" }, face.t("subtitle")), (0, react.createElement)("div", {
1140
+ key: PENDING_CARD_KEY,
1141
+ className: "evolution-params-group"
1142
+ }, face.renderSlot(CARD_SLOT, {}, { entryKey: PENDING_CARD_KEY })), ...CLIENT_PARAM_SECTIONS.map((section_) => (0, react.createElement)("div", {
1130
1143
  key: section_.namespace,
1131
1144
  className: "evolution-params-group"
1132
1145
  }, face.renderSlot(CARD_SLOT, {}, { entryKey: section_.namespace }))));
@@ -1235,13 +1248,6 @@ window.__ModuleLoader__.load({
1235
1248
  const SECTION_ID = "evolution";
1236
1249
  const SECTION_ORDER = 25;
1237
1250
  /**
1238
- * The pending-window card's slot key.
1239
- *
1240
- * The section pairs cards by key and the parameter cards use their settings namespace; this card has no
1241
- * namespace (its data comes from the host's approval routes), so it carries a key of its own.
1242
- */
1243
- const PENDING_CARD_KEY = "approval-pending";
1244
- /**
1245
1251
  * Register the locale namespace, the section and its cards.
1246
1252
  * @param ctx - client cordis context.
1247
1253
  */
@@ -1,5 +1,6 @@
1
1
  /**
2
- * The section shell: title, one-line explanation, then one card per namespace.
2
+ * The section shell: title, one-line explanation, then one card per namespace — with the staged-write
3
+ * window's card ahead of them all, because it is the only card here that waits on a decision.
3
4
  *
4
5
  * This is the shape the platform's own settings sections use — a heading plus the
5
6
  * child slots it declared in its registration. The cards themselves are separate
@@ -16,18 +16,14 @@
16
16
  * @module @lmzhen/dsh-evolution-settings-ui/client
17
17
  */
18
18
  import type { Context as ClientContext } from '@deepseek-ai/cordis';
19
+ import { PENDING_CARD_KEY } from './seam.ts';
19
20
  /** Required client services: the slot registry, the settings transport, the locale seat. */
20
21
  export declare const inject: string[];
21
22
  /** Section id and nav order (the platform's own sections sit at 0/10/15/20). */
22
23
  export declare const SECTION_ID = "evolution";
23
24
  export declare const SECTION_ORDER = 25;
24
- /**
25
- * The pending-window card's slot key.
26
- *
27
- * The section pairs cards by key and the parameter cards use their settings namespace; this card has no
28
- * namespace (its data comes from the host's approval routes), so it carries a key of its own.
29
- */
30
- export declare const PENDING_CARD_KEY = "approval-pending";
25
+ /** The pending-window card's key, re-exported from `seam.ts` (the section names it as well). */
26
+ export { PENDING_CARD_KEY };
31
27
  /**
32
28
  * Register the locale namespace, the section and its cards.
33
29
  * @param ctx - client cordis context.
@@ -13,7 +13,7 @@ export declare const NS = "evolution-settings";
13
13
  /** Chinese copy (the family's primary language). */
14
14
  export declare const zh: {
15
15
  readonly title: "自进化";
16
- readonly subtitle: "下面按功能列出你能改的参数;没有列出的由安装时的配置决定。";
16
+ readonly subtitle: "待你决定的写入在最上面;下面按功能列出你能改的参数,没有列出的由安装时的配置决定。";
17
17
  readonly overridden: "我改过";
18
18
  readonly deployment: "默认";
19
19
  readonly loading: "正在读取设置…";
@@ -13,6 +13,15 @@
13
13
  import type { ReactNode } from 'react';
14
14
  /** Our card slot, hosted by the section this bundle registers. */
15
15
  export declare const CARD_SLOT = "evolution.namespace.card";
16
+ /**
17
+ * The pending-window card's slot key.
18
+ *
19
+ * The section pairs cards by key and the parameter cards use their settings namespace; this card has no
20
+ * namespace (its data comes from the host's approval routes), so it carries a key of its own. The constant
21
+ * lives HERE and not in `index.ts` because the SECTION has to name it too, and `index.ts` already imports
22
+ * the section — one definition in the module both sides already share is what keeps that pair acyclic.
23
+ */
24
+ export declare const PENDING_CARD_KEY = "approval-pending";
16
25
  /** Snapshot of one settings namespace, as the client scope reports it. */
17
26
  export interface ParamSectionSnapshot {
18
27
  status: 'loading' | 'ready' | 'unavailable';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-settings-ui",
3
3
  "description": "Web settings cards for the evolution family's parameter namespaces (community build)",
4
- "version": "0.16.0",
4
+ "version": "0.16.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },