@morlay/dsh-client-ui-primitives 0.0.11 → 0.0.13

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.
@@ -1008,76 +1008,76 @@ var SchemaFormController = class {
1008
1008
  //#endregion
1009
1009
  //#region src/client/schema-form/hints.ts
1010
1010
  var SchemaFormHints = class extends Service {
1011
- #readers = /* @__PURE__ */ new Map();
1012
- #texts = /* @__PURE__ */ new Map();
1013
- #selects = /* @__PURE__ */ new Map();
1014
- #sources = /* @__PURE__ */ new Map();
1015
- #listeners = /* @__PURE__ */ new Set();
1011
+ readers = /* @__PURE__ */ new Map();
1012
+ texts = /* @__PURE__ */ new Map();
1013
+ selects = /* @__PURE__ */ new Map();
1014
+ sources = /* @__PURE__ */ new Map();
1015
+ listeners = /* @__PURE__ */ new Set();
1016
1016
  constructor(ctx) {
1017
1017
  super(ctx, "schemaFormHints");
1018
1018
  }
1019
1019
  keysFor(ns, path) {
1020
- return lookup(this.#readers, ns, path)?.() ?? [];
1020
+ return lookup(this.readers, ns, path)?.() ?? [];
1021
1021
  }
1022
1022
  textFor(ns, path) {
1023
- return lookup(this.#texts, ns, path)?.() ?? {};
1023
+ return lookup(this.texts, ns, path)?.() ?? {};
1024
1024
  }
1025
1025
  select(ns, path, spec) {
1026
1026
  const key = locationKey(ns, path);
1027
- this.#selects.set(key, spec);
1028
- this.#publish();
1027
+ this.selects.set(key, spec);
1028
+ this.publish();
1029
1029
  return () => {
1030
- if (this.#selects.get(key) !== spec) return;
1031
- this.#selects.delete(key);
1032
- this.#publish();
1030
+ if (this.selects.get(key) !== spec) return;
1031
+ this.selects.delete(key);
1032
+ this.publish();
1033
1033
  };
1034
1034
  }
1035
1035
  selectFor(ns, path) {
1036
- return lookup(this.#selects, ns, path);
1036
+ return lookup(this.selects, ns, path);
1037
1037
  }
1038
1038
  source(name, spec) {
1039
- this.#sources.set(name, spec);
1040
- this.#publish();
1039
+ this.sources.set(name, spec);
1040
+ this.publish();
1041
1041
  return () => {
1042
- if (this.#sources.get(name) !== spec) return;
1043
- this.#sources.delete(name);
1044
- this.#publish();
1042
+ if (this.sources.get(name) !== spec) return;
1043
+ this.sources.delete(name);
1044
+ this.publish();
1045
1045
  };
1046
1046
  }
1047
1047
  sourceFor(name) {
1048
- return this.#sources.get(name);
1048
+ return this.sources.get(name);
1049
1049
  }
1050
1050
  describe(ns, path, read) {
1051
1051
  const key = locationKey(ns, path);
1052
- this.#texts.set(key, read);
1053
- this.#publish();
1052
+ this.texts.set(key, read);
1053
+ this.publish();
1054
1054
  return () => {
1055
- if (this.#texts.get(key) !== read) return;
1056
- this.#texts.delete(key);
1057
- this.#publish();
1055
+ if (this.texts.get(key) !== read) return;
1056
+ this.texts.delete(key);
1057
+ this.publish();
1058
1058
  };
1059
1059
  }
1060
1060
  suggestKeys(ns, path, read) {
1061
1061
  const key = locationKey(ns, path);
1062
- this.#readers.set(key, read);
1063
- this.#publish();
1062
+ this.readers.set(key, read);
1063
+ this.publish();
1064
1064
  return () => {
1065
- if (this.#readers.get(key) !== read) return;
1066
- this.#readers.delete(key);
1067
- this.#publish();
1065
+ if (this.readers.get(key) !== read) return;
1066
+ this.readers.delete(key);
1067
+ this.publish();
1068
1068
  };
1069
1069
  }
1070
1070
  subscribe(listener) {
1071
- this.#listeners.add(listener);
1071
+ this.listeners.add(listener);
1072
1072
  return () => {
1073
- this.#listeners.delete(listener);
1073
+ this.listeners.delete(listener);
1074
1074
  };
1075
1075
  }
1076
1076
  refresh() {
1077
- this.#publish();
1077
+ this.publish();
1078
1078
  }
1079
- #publish() {
1080
- for (const listener of this.#listeners) listener();
1079
+ publish() {
1080
+ for (const listener of this.listeners) listener();
1081
1081
  }
1082
1082
  };
1083
1083
  function locationKey(ns, path) {
@@ -1466,25 +1466,25 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
1466
1466
  document.head.appendChild(tag);
1467
1467
  }
1468
1468
  var schema_form_module_css_default = {
1469
- "lineBody": "N3kx7G_lineBody",
1470
- "lineNumber": "N3kx7G_lineNumber",
1471
- "compactTextField": "N3kx7G_compactTextField",
1472
- "lineActions": "N3kx7G_lineActions",
1473
1469
  "valueTrigger": "N3kx7G_valueTrigger",
1474
- "editorRoot": "N3kx7G_editorRoot",
1475
- "lineFold": "N3kx7G_lineFold",
1476
1470
  "compactInput": "N3kx7G_compactInput",
1471
+ "lineComment": "N3kx7G_lineComment",
1472
+ "lineFold": "N3kx7G_lineFold",
1473
+ "lineInvalid": "N3kx7G_lineInvalid",
1474
+ "hoverActions": "N3kx7G_hoverActions",
1475
+ "addWrap": "N3kx7G_addWrap",
1476
+ "editorRoot": "N3kx7G_editorRoot",
1477
1477
  "hint": "N3kx7G_hint",
1478
1478
  "lineRow": "N3kx7G_lineRow",
1479
1479
  "lineFoldSpacer": "N3kx7G_lineFoldSpacer",
1480
- "lineValue": "N3kx7G_lineValue",
1481
- "lineComment": "N3kx7G_lineComment",
1482
- "lineKey": "N3kx7G_lineKey",
1483
1480
  "valueSlot": "N3kx7G_valueSlot",
1484
- "lineInvalid": "N3kx7G_lineInvalid",
1485
- "hoverActions": "N3kx7G_hoverActions",
1486
1481
  "lineToken": "N3kx7G_lineToken",
1487
- "addWrap": "N3kx7G_addWrap"
1482
+ "lineValue": "N3kx7G_lineValue",
1483
+ "lineKey": "N3kx7G_lineKey",
1484
+ "lineBody": "N3kx7G_lineBody",
1485
+ "lineNumber": "N3kx7G_lineNumber",
1486
+ "compactTextField": "N3kx7G_compactTextField",
1487
+ "lineActions": "N3kx7G_lineActions"
1488
1488
  };
1489
1489
  //#endregion
1490
1490
  //#region src/client/schema-form/TruncatedTooltip.tsx
@@ -2360,11 +2360,11 @@ function apply$1(ctx) {
2360
2360
  });
2361
2361
  }
2362
2362
  function install(ctx) {
2363
+ const hints = new SchemaFormHints(ctx.root);
2363
2364
  ctx.effect(() => ctx.locale.register(NS, {
2364
2365
  zh,
2365
2366
  en
2366
2367
  }), "ui-schema-form: dictionaries");
2367
- const hints = new SchemaFormHints(ctx);
2368
2368
  ctx.effect(() => ctx.slots.registerFactory({
2369
2369
  name: "settings.schema-form.form",
2370
2370
  scope: "root",
@@ -2477,55 +2477,55 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
2477
2477
  document.head.appendChild(tag);
2478
2478
  }
2479
2479
  var layout_module_css_default = {
2480
- "row": "_7Ar2dq_row",
2481
- "sizeMd": "_7Ar2dq_sizeMd",
2482
- "sizeLg": "_7Ar2dq_sizeLg",
2483
- "truncate": "_7Ar2dq_truncate",
2484
- "justifyBetween": "_7Ar2dq_justifyBetween",
2480
+ "push": "_7Ar2dq_push",
2481
+ "fixed": "_7Ar2dq_fixed",
2485
2482
  "padBlocking": "_7Ar2dq_padBlocking",
2486
- "toneSecondary": "_7Ar2dq_toneSecondary",
2487
- "weightMedium": "_7Ar2dq_weightMedium",
2488
- "mono": "_7Ar2dq_mono",
2489
- "stack": "_7Ar2dq_stack",
2490
- "gap4": "_7Ar2dq_gap4",
2483
+ "padPage": "_7Ar2dq_padPage",
2491
2484
  "gap10": "_7Ar2dq_gap10",
2492
- "fill": "_7Ar2dq_fill",
2493
- "boxed": "_7Ar2dq_boxed",
2494
- "strong": "_7Ar2dq_strong",
2495
- "gap16": "_7Ar2dq_gap16",
2496
- "justifyCenter": "_7Ar2dq_justifyCenter",
2497
- "alignEnd": "_7Ar2dq_alignEnd",
2485
+ "padRow": "_7Ar2dq_padRow",
2486
+ "alignStart": "_7Ar2dq_alignStart",
2487
+ "justifyBetween": "_7Ar2dq_justifyBetween",
2498
2488
  "padBody": "_7Ar2dq_padBody",
2489
+ "gap16": "_7Ar2dq_gap16",
2490
+ "gap2": "_7Ar2dq_gap2",
2499
2491
  "gap0": "_7Ar2dq_gap0",
2500
- "toneTertiary": "_7Ar2dq_toneTertiary",
2501
- "toneDanger": "_7Ar2dq_toneDanger",
2502
- "gap6": "_7Ar2dq_gap6",
2503
- "wSearch": "_7Ar2dq_wSearch",
2492
+ "sizeMd": "_7Ar2dq_sizeMd",
2504
2493
  "alignCenter": "_7Ar2dq_alignCenter",
2505
- "justifyEnd": "_7Ar2dq_justifyEnd",
2506
- "padRow": "_7Ar2dq_padRow",
2507
- "tonePrimary": "_7Ar2dq_tonePrimary",
2508
- "plain": "_7Ar2dq_plain",
2509
- "alignStart": "_7Ar2dq_alignStart",
2510
- "gap14": "_7Ar2dq_gap14",
2511
- "grow": "_7Ar2dq_grow",
2512
- "padPage": "_7Ar2dq_padPage",
2513
2494
  "padNone": "_7Ar2dq_padNone",
2495
+ "gap6": "_7Ar2dq_gap6",
2496
+ "gap8": "_7Ar2dq_gap8",
2497
+ "toneTertiary": "_7Ar2dq_toneTertiary",
2514
2498
  "sizeXs": "_7Ar2dq_sizeXs",
2515
- "tabular": "_7Ar2dq_tabular",
2499
+ "gap4": "_7Ar2dq_gap4",
2500
+ "weightMedium": "_7Ar2dq_weightMedium",
2501
+ "row": "_7Ar2dq_row",
2502
+ "truncate": "_7Ar2dq_truncate",
2516
2503
  "narrow": "_7Ar2dq_narrow",
2517
- "text": "_7Ar2dq_text",
2518
- "push": "_7Ar2dq_push",
2504
+ "tonePrimary": "_7Ar2dq_tonePrimary",
2519
2505
  "gapWide": "_7Ar2dq_gapWide",
2520
- "gap8": "_7Ar2dq_gap8",
2521
- "gap2": "_7Ar2dq_gap2",
2522
- "fixed": "_7Ar2dq_fixed",
2506
+ "boxed": "_7Ar2dq_boxed",
2507
+ "sizeBase": "_7Ar2dq_sizeBase",
2508
+ "gap14": "_7Ar2dq_gap14",
2509
+ "justifyCenter": "_7Ar2dq_justifyCenter",
2510
+ "mono": "_7Ar2dq_mono",
2511
+ "wSearch": "_7Ar2dq_wSearch",
2512
+ "text": "_7Ar2dq_text",
2523
2513
  "gap12": "_7Ar2dq_gap12",
2524
- "sizeSm": "_7Ar2dq_sizeSm",
2514
+ "tabular": "_7Ar2dq_tabular",
2515
+ "toneDanger": "_7Ar2dq_toneDanger",
2525
2516
  "scroll": "_7Ar2dq_scroll",
2526
2517
  "wrap": "_7Ar2dq_wrap",
2527
- "sizeBase": "_7Ar2dq_sizeBase",
2528
- "padCard": "_7Ar2dq_padCard"
2518
+ "stack": "_7Ar2dq_stack",
2519
+ "alignEnd": "_7Ar2dq_alignEnd",
2520
+ "grow": "_7Ar2dq_grow",
2521
+ "justifyEnd": "_7Ar2dq_justifyEnd",
2522
+ "toneSecondary": "_7Ar2dq_toneSecondary",
2523
+ "fill": "_7Ar2dq_fill",
2524
+ "strong": "_7Ar2dq_strong",
2525
+ "sizeLg": "_7Ar2dq_sizeLg",
2526
+ "sizeSm": "_7Ar2dq_sizeSm",
2527
+ "padCard": "_7Ar2dq_padCard",
2528
+ "plain": "_7Ar2dq_plain"
2529
2529
  };
2530
2530
  //#endregion
2531
2531
  //#region src/client/layout/scales.ts
@@ -2608,15 +2608,15 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
2608
2608
  document.head.appendChild(tag);
2609
2609
  }
2610
2610
  var SettingsFieldRow_module_css_default = {
2611
- "label": "Il1Dtq_label",
2612
2611
  "badge": "Il1Dtq_badge",
2613
- "hint": "Il1Dtq_hint",
2612
+ "body": "Il1Dtq_body",
2613
+ "text": "Il1Dtq_text",
2614
2614
  "row": "Il1Dtq_row",
2615
+ "label": "Il1Dtq_label",
2615
2616
  "invalid": "Il1Dtq_invalid",
2616
- "body": "Il1Dtq_body",
2617
- "reset": "Il1Dtq_reset",
2617
+ "hint": "Il1Dtq_hint",
2618
2618
  "inline": "Il1Dtq_inline",
2619
- "text": "Il1Dtq_text"
2619
+ "reset": "Il1Dtq_reset"
2620
2620
  };
2621
2621
  //#endregion
2622
2622
  //#region src/client/settings-form/SettingsFieldRow.tsx
@@ -2707,8 +2707,8 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
2707
2707
  document.head.appendChild(tag);
2708
2708
  }
2709
2709
  var Button_module_css_default = {
2710
- "danger": "LWgVXW_danger",
2711
- "label": "LWgVXW_label"
2710
+ "label": "LWgVXW_label",
2711
+ "danger": "LWgVXW_danger"
2712
2712
  };
2713
2713
  //#endregion
2714
2714
  //#region src/client/controls/Button.tsx
@@ -2756,10 +2756,10 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
2756
2756
  document.head.appendChild(tag);
2757
2757
  }
2758
2758
  var SeatButton_module_css_default = {
2759
- "seat": "JqQ4qG_seat",
2759
+ "label": "JqQ4qG_label",
2760
2760
  "expanded": "JqQ4qG_expanded",
2761
+ "seat": "JqQ4qG_seat",
2761
2762
  "icon": "JqQ4qG_icon",
2762
- "label": "JqQ4qG_label",
2763
2763
  "chevron": "JqQ4qG_chevron"
2764
2764
  };
2765
2765
  //#endregion
@@ -2863,9 +2863,9 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
2863
2863
  document.head.appendChild(tag);
2864
2864
  }
2865
2865
  var IconButton_module_css_default = {
2866
- "sm": "AibFna_sm",
2866
+ "iconButton": "AibFna_iconButton",
2867
2867
  "circle": "AibFna_circle",
2868
- "iconButton": "AibFna_iconButton"
2868
+ "sm": "AibFna_sm"
2869
2869
  };
2870
2870
  //#endregion
2871
2871
  //#region src/client/controls/IconButton.tsx
@@ -2891,16 +2891,16 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
2891
2891
  document.head.appendChild(tag);
2892
2892
  }
2893
2893
  var ModelRouteList_module_css_default = {
2894
- "name": "_1vK46q_name",
2894
+ "id": "_1vK46q_id",
2895
2895
  "provider": "_1vK46q_provider",
2896
+ "text": "_1vK46q_text",
2897
+ "list": "_1vK46q_list",
2898
+ "name": "_1vK46q_name",
2896
2899
  "group": "_1vK46q_group",
2897
- "error": "_1vK46q_error",
2898
2900
  "picked": "_1vK46q_picked",
2899
- "id": "_1vK46q_id",
2900
- "item": "_1vK46q_item",
2901
2901
  "notice": "_1vK46q_notice",
2902
- "list": "_1vK46q_list",
2903
- "text": "_1vK46q_text"
2902
+ "error": "_1vK46q_error",
2903
+ "item": "_1vK46q_item"
2904
2904
  };
2905
2905
  //#endregion
2906
2906
  //#region src/client/controls/ModelRouteList.tsx
@@ -3007,10 +3007,10 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
3007
3007
  document.head.appendChild(tag);
3008
3008
  }
3009
3009
  var SearchSelect_module_css_default = {
3010
- "empty": "kEYv4q_empty",
3011
3010
  "trigger": "kEYv4q_trigger",
3011
+ "searchInput": "kEYv4q_searchInput",
3012
3012
  "searchRow": "kEYv4q_searchRow",
3013
- "searchInput": "kEYv4q_searchInput"
3013
+ "empty": "kEYv4q_empty"
3014
3014
  };
3015
3015
  //#endregion
3016
3016
  //#region src/client/controls/SearchSelect.tsx
@@ -3123,13 +3123,13 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
3123
3123
  document.head.appendChild(tag);
3124
3124
  }
3125
3125
  var TagInput_module_css_default = {
3126
- "empty": "Qg7I9G_empty",
3127
- "input": "Qg7I9G_input",
3128
- "row": "Qg7I9G_row",
3129
3126
  "chipRemove": "Qg7I9G_chipRemove",
3127
+ "empty": "Qg7I9G_empty",
3128
+ "chip": "Qg7I9G_chip",
3130
3129
  "anchor": "Qg7I9G_anchor",
3131
- "box": "Qg7I9G_box",
3132
- "chip": "Qg7I9G_chip"
3130
+ "row": "Qg7I9G_row",
3131
+ "input": "Qg7I9G_input",
3132
+ "box": "Qg7I9G_box"
3133
3133
  };
3134
3134
  //#endregion
3135
3135
  //#region src/client/controls/TagInput.tsx
@@ -1009,76 +1009,76 @@ window.__ModuleLoader__.load({
1009
1009
  //#endregion
1010
1010
  //#region src/client/schema-form/hints.ts
1011
1011
  var SchemaFormHints = class extends _deepseek_ai_cordis.Service {
1012
- #readers = /* @__PURE__ */ new Map();
1013
- #texts = /* @__PURE__ */ new Map();
1014
- #selects = /* @__PURE__ */ new Map();
1015
- #sources = /* @__PURE__ */ new Map();
1016
- #listeners = /* @__PURE__ */ new Set();
1012
+ readers = /* @__PURE__ */ new Map();
1013
+ texts = /* @__PURE__ */ new Map();
1014
+ selects = /* @__PURE__ */ new Map();
1015
+ sources = /* @__PURE__ */ new Map();
1016
+ listeners = /* @__PURE__ */ new Set();
1017
1017
  constructor(ctx) {
1018
1018
  super(ctx, "schemaFormHints");
1019
1019
  }
1020
1020
  keysFor(ns, path) {
1021
- return lookup(this.#readers, ns, path)?.() ?? [];
1021
+ return lookup(this.readers, ns, path)?.() ?? [];
1022
1022
  }
1023
1023
  textFor(ns, path) {
1024
- return lookup(this.#texts, ns, path)?.() ?? {};
1024
+ return lookup(this.texts, ns, path)?.() ?? {};
1025
1025
  }
1026
1026
  select(ns, path, spec) {
1027
1027
  const key = locationKey(ns, path);
1028
- this.#selects.set(key, spec);
1029
- this.#publish();
1028
+ this.selects.set(key, spec);
1029
+ this.publish();
1030
1030
  return () => {
1031
- if (this.#selects.get(key) !== spec) return;
1032
- this.#selects.delete(key);
1033
- this.#publish();
1031
+ if (this.selects.get(key) !== spec) return;
1032
+ this.selects.delete(key);
1033
+ this.publish();
1034
1034
  };
1035
1035
  }
1036
1036
  selectFor(ns, path) {
1037
- return lookup(this.#selects, ns, path);
1037
+ return lookup(this.selects, ns, path);
1038
1038
  }
1039
1039
  source(name, spec) {
1040
- this.#sources.set(name, spec);
1041
- this.#publish();
1040
+ this.sources.set(name, spec);
1041
+ this.publish();
1042
1042
  return () => {
1043
- if (this.#sources.get(name) !== spec) return;
1044
- this.#sources.delete(name);
1045
- this.#publish();
1043
+ if (this.sources.get(name) !== spec) return;
1044
+ this.sources.delete(name);
1045
+ this.publish();
1046
1046
  };
1047
1047
  }
1048
1048
  sourceFor(name) {
1049
- return this.#sources.get(name);
1049
+ return this.sources.get(name);
1050
1050
  }
1051
1051
  describe(ns, path, read) {
1052
1052
  const key = locationKey(ns, path);
1053
- this.#texts.set(key, read);
1054
- this.#publish();
1053
+ this.texts.set(key, read);
1054
+ this.publish();
1055
1055
  return () => {
1056
- if (this.#texts.get(key) !== read) return;
1057
- this.#texts.delete(key);
1058
- this.#publish();
1056
+ if (this.texts.get(key) !== read) return;
1057
+ this.texts.delete(key);
1058
+ this.publish();
1059
1059
  };
1060
1060
  }
1061
1061
  suggestKeys(ns, path, read) {
1062
1062
  const key = locationKey(ns, path);
1063
- this.#readers.set(key, read);
1064
- this.#publish();
1063
+ this.readers.set(key, read);
1064
+ this.publish();
1065
1065
  return () => {
1066
- if (this.#readers.get(key) !== read) return;
1067
- this.#readers.delete(key);
1068
- this.#publish();
1066
+ if (this.readers.get(key) !== read) return;
1067
+ this.readers.delete(key);
1068
+ this.publish();
1069
1069
  };
1070
1070
  }
1071
1071
  subscribe(listener) {
1072
- this.#listeners.add(listener);
1072
+ this.listeners.add(listener);
1073
1073
  return () => {
1074
- this.#listeners.delete(listener);
1074
+ this.listeners.delete(listener);
1075
1075
  };
1076
1076
  }
1077
1077
  refresh() {
1078
- this.#publish();
1078
+ this.publish();
1079
1079
  }
1080
- #publish() {
1081
- for (const listener of this.#listeners) listener();
1080
+ publish() {
1081
+ for (const listener of this.listeners) listener();
1082
1082
  }
1083
1083
  };
1084
1084
  function locationKey(ns, path) {
@@ -1469,25 +1469,25 @@ window.__ModuleLoader__.load({
1469
1469
  document.head.appendChild(tag);
1470
1470
  }
1471
1471
  var schema_form_module_css_default = {
1472
- "lineInvalid": "N3kx7G_lineInvalid",
1473
- "lineComment": "N3kx7G_lineComment",
1474
- "valueSlot": "N3kx7G_valueSlot",
1475
- "lineKey": "N3kx7G_lineKey",
1476
- "compactTextField": "N3kx7G_compactTextField",
1477
- "lineActions": "N3kx7G_lineActions",
1478
- "lineBody": "N3kx7G_lineBody",
1479
- "lineToken": "N3kx7G_lineToken",
1480
- "hint": "N3kx7G_hint",
1481
1472
  "lineNumber": "N3kx7G_lineNumber",
1473
+ "compactInput": "N3kx7G_compactInput",
1474
+ "lineKey": "N3kx7G_lineKey",
1475
+ "valueTrigger": "N3kx7G_valueTrigger",
1476
+ "lineComment": "N3kx7G_lineComment",
1477
+ "lineInvalid": "N3kx7G_lineInvalid",
1482
1478
  "lineFold": "N3kx7G_lineFold",
1483
- "lineValue": "N3kx7G_lineValue",
1484
- "hoverActions": "N3kx7G_hoverActions",
1485
1479
  "editorRoot": "N3kx7G_editorRoot",
1480
+ "compactTextField": "N3kx7G_compactTextField",
1481
+ "hoverActions": "N3kx7G_hoverActions",
1482
+ "lineToken": "N3kx7G_lineToken",
1483
+ "lineBody": "N3kx7G_lineBody",
1486
1484
  "addWrap": "N3kx7G_addWrap",
1487
1485
  "lineFoldSpacer": "N3kx7G_lineFoldSpacer",
1486
+ "lineValue": "N3kx7G_lineValue",
1488
1487
  "lineRow": "N3kx7G_lineRow",
1489
- "compactInput": "N3kx7G_compactInput",
1490
- "valueTrigger": "N3kx7G_valueTrigger"
1488
+ "lineActions": "N3kx7G_lineActions",
1489
+ "hint": "N3kx7G_hint",
1490
+ "valueSlot": "N3kx7G_valueSlot"
1491
1491
  };
1492
1492
  //#endregion
1493
1493
  //#region src/client/schema-form/TruncatedTooltip.tsx
@@ -2363,11 +2363,11 @@ window.__ModuleLoader__.load({
2363
2363
  });
2364
2364
  }
2365
2365
  function install(ctx) {
2366
+ const hints = new SchemaFormHints(ctx.root);
2366
2367
  ctx.effect(() => ctx.locale.register(NS, {
2367
2368
  zh,
2368
2369
  en
2369
2370
  }), "ui-schema-form: dictionaries");
2370
- const hints = new SchemaFormHints(ctx);
2371
2371
  ctx.effect(() => ctx.slots.registerFactory({
2372
2372
  name: "settings.schema-form.form",
2373
2373
  scope: "root",
@@ -2480,55 +2480,55 @@ window.__ModuleLoader__.load({
2480
2480
  document.head.appendChild(tag);
2481
2481
  }
2482
2482
  var layout_module_css_default = {
2483
- "sizeXs": "_7Ar2dq_sizeXs",
2484
- "gap6": "_7Ar2dq_gap6",
2485
- "sizeSm": "_7Ar2dq_sizeSm",
2486
- "truncate": "_7Ar2dq_truncate",
2487
- "padPage": "_7Ar2dq_padPage",
2488
- "gap12": "_7Ar2dq_gap12",
2489
- "sizeMd": "_7Ar2dq_sizeMd",
2490
- "gap4": "_7Ar2dq_gap4",
2491
- "row": "_7Ar2dq_row",
2492
- "justifyBetween": "_7Ar2dq_justifyBetween",
2493
- "gap8": "_7Ar2dq_gap8",
2494
2483
  "justifyEnd": "_7Ar2dq_justifyEnd",
2495
- "grow": "_7Ar2dq_grow",
2496
- "padBlocking": "_7Ar2dq_padBlocking",
2497
- "justifyCenter": "_7Ar2dq_justifyCenter",
2498
2484
  "sizeLg": "_7Ar2dq_sizeLg",
2499
- "alignCenter": "_7Ar2dq_alignCenter",
2485
+ "padNone": "_7Ar2dq_padNone",
2486
+ "tonePrimary": "_7Ar2dq_tonePrimary",
2500
2487
  "toneTertiary": "_7Ar2dq_toneTertiary",
2501
- "fixed": "_7Ar2dq_fixed",
2502
- "gap10": "_7Ar2dq_gap10",
2488
+ "padBody": "_7Ar2dq_padBody",
2489
+ "mono": "_7Ar2dq_mono",
2490
+ "gapWide": "_7Ar2dq_gapWide",
2491
+ "plain": "_7Ar2dq_plain",
2492
+ "narrow": "_7Ar2dq_narrow",
2493
+ "toneDanger": "_7Ar2dq_toneDanger",
2503
2494
  "wSearch": "_7Ar2dq_wSearch",
2504
- "padRow": "_7Ar2dq_padRow",
2505
- "gap2": "_7Ar2dq_gap2",
2495
+ "gap12": "_7Ar2dq_gap12",
2506
2496
  "text": "_7Ar2dq_text",
2497
+ "sizeBase": "_7Ar2dq_sizeBase",
2498
+ "gap4": "_7Ar2dq_gap4",
2499
+ "sizeXs": "_7Ar2dq_sizeXs",
2507
2500
  "wrap": "_7Ar2dq_wrap",
2501
+ "gap8": "_7Ar2dq_gap8",
2502
+ "padRow": "_7Ar2dq_padRow",
2503
+ "tabular": "_7Ar2dq_tabular",
2504
+ "scroll": "_7Ar2dq_scroll",
2505
+ "padPage": "_7Ar2dq_padPage",
2508
2506
  "stack": "_7Ar2dq_stack",
2509
- "sizeBase": "_7Ar2dq_sizeBase",
2510
- "gapWide": "_7Ar2dq_gapWide",
2511
- "narrow": "_7Ar2dq_narrow",
2512
- "gap14": "_7Ar2dq_gap14",
2507
+ "gap10": "_7Ar2dq_gap10",
2508
+ "padBlocking": "_7Ar2dq_padBlocking",
2509
+ "strong": "_7Ar2dq_strong",
2510
+ "fixed": "_7Ar2dq_fixed",
2511
+ "gap16": "_7Ar2dq_gap16",
2513
2512
  "gap0": "_7Ar2dq_gap0",
2514
- "scroll": "_7Ar2dq_scroll",
2515
- "tonePrimary": "_7Ar2dq_tonePrimary",
2516
- "toneDanger": "_7Ar2dq_toneDanger",
2517
- "boxed": "_7Ar2dq_boxed",
2518
- "padCard": "_7Ar2dq_padCard",
2519
- "push": "_7Ar2dq_push",
2520
- "tabular": "_7Ar2dq_tabular",
2513
+ "gap14": "_7Ar2dq_gap14",
2521
2514
  "toneSecondary": "_7Ar2dq_toneSecondary",
2522
- "padBody": "_7Ar2dq_padBody",
2523
- "gap16": "_7Ar2dq_gap16",
2524
- "plain": "_7Ar2dq_plain",
2525
- "strong": "_7Ar2dq_strong",
2526
- "fill": "_7Ar2dq_fill",
2527
- "weightMedium": "_7Ar2dq_weightMedium",
2528
2515
  "alignStart": "_7Ar2dq_alignStart",
2529
- "padNone": "_7Ar2dq_padNone",
2516
+ "push": "_7Ar2dq_push",
2517
+ "padCard": "_7Ar2dq_padCard",
2518
+ "truncate": "_7Ar2dq_truncate",
2519
+ "boxed": "_7Ar2dq_boxed",
2520
+ "gap6": "_7Ar2dq_gap6",
2521
+ "alignCenter": "_7Ar2dq_alignCenter",
2530
2522
  "alignEnd": "_7Ar2dq_alignEnd",
2531
- "mono": "_7Ar2dq_mono"
2523
+ "gap2": "_7Ar2dq_gap2",
2524
+ "grow": "_7Ar2dq_grow",
2525
+ "fill": "_7Ar2dq_fill",
2526
+ "sizeSm": "_7Ar2dq_sizeSm",
2527
+ "sizeMd": "_7Ar2dq_sizeMd",
2528
+ "row": "_7Ar2dq_row",
2529
+ "weightMedium": "_7Ar2dq_weightMedium",
2530
+ "justifyCenter": "_7Ar2dq_justifyCenter",
2531
+ "justifyBetween": "_7Ar2dq_justifyBetween"
2532
2532
  };
2533
2533
  //#endregion
2534
2534
  //#region src/client/layout/scales.ts
@@ -2611,15 +2611,15 @@ window.__ModuleLoader__.load({
2611
2611
  document.head.appendChild(tag);
2612
2612
  }
2613
2613
  var SettingsFieldRow_module_css_default = {
2614
- "badge": "Il1Dtq_badge",
2615
2614
  "reset": "Il1Dtq_reset",
2616
- "text": "Il1Dtq_text",
2617
- "body": "Il1Dtq_body",
2615
+ "invalid": "Il1Dtq_invalid",
2618
2616
  "hint": "Il1Dtq_hint",
2617
+ "body": "Il1Dtq_body",
2619
2618
  "inline": "Il1Dtq_inline",
2620
- "invalid": "Il1Dtq_invalid",
2619
+ "row": "Il1Dtq_row",
2620
+ "text": "Il1Dtq_text",
2621
2621
  "label": "Il1Dtq_label",
2622
- "row": "Il1Dtq_row"
2622
+ "badge": "Il1Dtq_badge"
2623
2623
  };
2624
2624
  //#endregion
2625
2625
  //#region src/client/settings-form/SettingsFieldRow.tsx
@@ -2710,8 +2710,8 @@ window.__ModuleLoader__.load({
2710
2710
  document.head.appendChild(tag);
2711
2711
  }
2712
2712
  var Button_module_css_default = {
2713
- "danger": "LWgVXW_danger",
2714
- "label": "LWgVXW_label"
2713
+ "label": "LWgVXW_label",
2714
+ "danger": "LWgVXW_danger"
2715
2715
  };
2716
2716
  //#endregion
2717
2717
  //#region src/client/controls/Button.tsx
@@ -2735,8 +2735,8 @@ window.__ModuleLoader__.load({
2735
2735
  document.head.appendChild(tag);
2736
2736
  }
2737
2737
  var DisclosureRow_module_css_default = {
2738
- "contentLayout": "_2HN-kW_contentLayout",
2739
- "content": "_2HN-kW_content"
2738
+ "content": "_2HN-kW_content",
2739
+ "contentLayout": "_2HN-kW_contentLayout"
2740
2740
  };
2741
2741
  //#endregion
2742
2742
  //#region src/client/controls/DisclosureRow.tsx
@@ -2759,11 +2759,11 @@ window.__ModuleLoader__.load({
2759
2759
  document.head.appendChild(tag);
2760
2760
  }
2761
2761
  var SeatButton_module_css_default = {
2762
- "chevron": "JqQ4qG_chevron",
2763
- "seat": "JqQ4qG_seat",
2764
2762
  "expanded": "JqQ4qG_expanded",
2763
+ "chevron": "JqQ4qG_chevron",
2764
+ "label": "JqQ4qG_label",
2765
2765
  "icon": "JqQ4qG_icon",
2766
- "label": "JqQ4qG_label"
2766
+ "seat": "JqQ4qG_seat"
2767
2767
  };
2768
2768
  //#endregion
2769
2769
  //#region src/client/controls/SeatButton.tsx
@@ -2800,8 +2800,8 @@ window.__ModuleLoader__.load({
2800
2800
  document.head.appendChild(tag);
2801
2801
  }
2802
2802
  var Spinner_module_css_default = {
2803
- "spin": "_1uNobG_spin",
2804
- "spinner": "_1uNobG_spinner"
2803
+ "spinner": "_1uNobG_spinner",
2804
+ "spin": "_1uNobG_spin"
2805
2805
  };
2806
2806
  //#endregion
2807
2807
  //#region src/client/controls/Spinner.tsx
@@ -2866,9 +2866,9 @@ window.__ModuleLoader__.load({
2866
2866
  document.head.appendChild(tag);
2867
2867
  }
2868
2868
  var IconButton_module_css_default = {
2869
- "circle": "AibFna_circle",
2869
+ "iconButton": "AibFna_iconButton",
2870
2870
  "sm": "AibFna_sm",
2871
- "iconButton": "AibFna_iconButton"
2871
+ "circle": "AibFna_circle"
2872
2872
  };
2873
2873
  //#endregion
2874
2874
  //#region src/client/controls/IconButton.tsx
@@ -2894,16 +2894,16 @@ window.__ModuleLoader__.load({
2894
2894
  document.head.appendChild(tag);
2895
2895
  }
2896
2896
  var ModelRouteList_module_css_default = {
2897
+ "list": "_1vK46q_list",
2898
+ "name": "_1vK46q_name",
2897
2899
  "provider": "_1vK46q_provider",
2898
2900
  "text": "_1vK46q_text",
2899
- "item": "_1vK46q_item",
2900
2901
  "picked": "_1vK46q_picked",
2901
- "error": "_1vK46q_error",
2902
+ "item": "_1vK46q_item",
2902
2903
  "group": "_1vK46q_group",
2903
- "name": "_1vK46q_name",
2904
+ "id": "_1vK46q_id",
2904
2905
  "notice": "_1vK46q_notice",
2905
- "list": "_1vK46q_list",
2906
- "id": "_1vK46q_id"
2906
+ "error": "_1vK46q_error"
2907
2907
  };
2908
2908
  //#endregion
2909
2909
  //#region src/client/controls/ModelRouteList.tsx
@@ -3010,10 +3010,10 @@ window.__ModuleLoader__.load({
3010
3010
  document.head.appendChild(tag);
3011
3011
  }
3012
3012
  var SearchSelect_module_css_default = {
3013
- "searchInput": "kEYv4q_searchInput",
3013
+ "searchRow": "kEYv4q_searchRow",
3014
3014
  "trigger": "kEYv4q_trigger",
3015
3015
  "empty": "kEYv4q_empty",
3016
- "searchRow": "kEYv4q_searchRow"
3016
+ "searchInput": "kEYv4q_searchInput"
3017
3017
  };
3018
3018
  //#endregion
3019
3019
  //#region src/client/controls/SearchSelect.tsx
@@ -3126,13 +3126,13 @@ window.__ModuleLoader__.load({
3126
3126
  document.head.appendChild(tag);
3127
3127
  }
3128
3128
  var TagInput_module_css_default = {
3129
- "anchor": "Qg7I9G_anchor",
3130
- "chip": "Qg7I9G_chip",
3131
- "empty": "Qg7I9G_empty",
3132
3129
  "input": "Qg7I9G_input",
3130
+ "box": "Qg7I9G_box",
3131
+ "chip": "Qg7I9G_chip",
3133
3132
  "chipRemove": "Qg7I9G_chipRemove",
3133
+ "empty": "Qg7I9G_empty",
3134
3134
  "row": "Qg7I9G_row",
3135
- "box": "Qg7I9G_box"
3135
+ "anchor": "Qg7I9G_anchor"
3136
3136
  };
3137
3137
  //#endregion
3138
3138
  //#region src/client/controls/TagInput.tsx
package/dist/client.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_client = require("./client-CAkM8fEx.cjs");
2
+ const require_client = require("./client-J4NBonYH.cjs");
3
3
  const require_reference = require("./reference-hchCWm3z.cjs");
4
4
  exports.Bubble = require_client.Bubble;
5
5
  exports.Button = require_client.Button;
package/dist/client.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as failureOf, C as markdownLabels, D as SchemaFormHints, E as rowRegistrations, O as SchemaFormController, S as Row, T as schema_form_exports, _ as Button, a as TagInput, b as Text, c as SearchSelect, d as IconButton, f as VisuallyHidden, g as DisclosureRow, h as SeatButton, i as referenceMentions, j as walkFields, k as projectRoot, l as MultilineField, m as Spinner, n as inject, o as mergeTags, p as TimeLabel, r as ReferenceMarkdown, s as parseTagList, t as apply, u as ModelRouteList, v as Bubble, w as NS, x as Stack, y as SettingsFieldRow } from "./client-CVJehMDy.mjs";
1
+ import { A as failureOf, C as markdownLabels, D as SchemaFormHints, E as rowRegistrations, O as SchemaFormController, S as Row, T as schema_form_exports, _ as Button, a as TagInput, b as Text, c as SearchSelect, d as IconButton, f as VisuallyHidden, g as DisclosureRow, h as SeatButton, i as referenceMentions, j as walkFields, k as projectRoot, l as MultilineField, m as Spinner, n as inject, o as mergeTags, p as TimeLabel, r as ReferenceMarkdown, s as parseTagList, t as apply, u as ModelRouteList, v as Bubble, w as NS, x as Stack, y as SettingsFieldRow } from "./client-C9tXSdRV.mjs";
2
2
  import { a as parseReference, i as isLocalReference, n as formatReference, o as parseReferenceToken, r as formatReferenceMention, t as findReferences } from "./reference-Cjcn21uW.mjs";
3
3
  export * from "@deepseek-ai/dsh-client-ui-primitives";
4
4
  export { Bubble, Button, DisclosureRow, IconButton, ModelRouteList, MultilineField, ReferenceMarkdown, Row, NS as SCHEMA_FORM_NS, SchemaFormController, SchemaFormHints, SearchSelect, SeatButton, SettingsFieldRow, Spinner, Stack, TagInput, Text, TimeLabel, VisuallyHidden, apply, failureOf, findReferences, formatReference, formatReferenceMention, inject, isLocalReference, markdownLabels, mergeTags, parseReference, parseReferenceToken, parseTagList, projectRoot, referenceMentions, rowRegistrations, schema_form_exports as schemaForm, walkFields };
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_client = require("./client-CAkM8fEx.cjs");
2
+ const require_client = require("./client-J4NBonYH.cjs");
3
3
  const require_reference = require("./reference-hchCWm3z.cjs");
4
4
  exports.Bubble = require_client.Bubble;
5
5
  exports.Button = require_client.Button;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as failureOf, C as markdownLabels, D as SchemaFormHints, E as rowRegistrations, O as SchemaFormController, S as Row, T as schema_form_exports, _ as Button, a as TagInput, b as Text, c as SearchSelect, d as IconButton, f as VisuallyHidden, g as DisclosureRow, h as SeatButton, i as referenceMentions, j as walkFields, k as projectRoot, l as MultilineField, m as Spinner, n as inject, o as mergeTags, p as TimeLabel, r as ReferenceMarkdown, s as parseTagList, t as apply, u as ModelRouteList, v as Bubble, w as NS, x as Stack, y as SettingsFieldRow } from "./client-CVJehMDy.mjs";
1
+ import { A as failureOf, C as markdownLabels, D as SchemaFormHints, E as rowRegistrations, O as SchemaFormController, S as Row, T as schema_form_exports, _ as Button, a as TagInput, b as Text, c as SearchSelect, d as IconButton, f as VisuallyHidden, g as DisclosureRow, h as SeatButton, i as referenceMentions, j as walkFields, k as projectRoot, l as MultilineField, m as Spinner, n as inject, o as mergeTags, p as TimeLabel, r as ReferenceMarkdown, s as parseTagList, t as apply, u as ModelRouteList, v as Bubble, w as NS, x as Stack, y as SettingsFieldRow } from "./client-C9tXSdRV.mjs";
2
2
  import { a as parseReference, i as isLocalReference, n as formatReference, o as parseReferenceToken, r as formatReferenceMention, t as findReferences } from "./reference-Cjcn21uW.mjs";
3
3
  export * from "@deepseek-ai/dsh-client-ui-primitives";
4
4
  export { Bubble, Button, DisclosureRow, IconButton, ModelRouteList, MultilineField, ReferenceMarkdown, Row, NS as SCHEMA_FORM_NS, SchemaFormController, SchemaFormHints, SearchSelect, SeatButton, SettingsFieldRow, Spinner, Stack, TagInput, Text, TimeLabel, VisuallyHidden, apply, failureOf, findReferences, formatReference, formatReferenceMention, inject, isLocalReference, markdownLabels, mergeTags, parseReference, parseReferenceToken, parseTagList, projectRoot, referenceMentions, rowRegistrations, schema_form_exports as schemaForm, walkFields };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morlay/dsh-client-ui-primitives",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "client UI kit for this workspace: re-exports the official ui-primitives (Button / Menu / Input / Tag / Modal / Switch / SettingsForm …) plus our own layout primitives (Stack / Row / Text / Panel) and controls (TagInput / SearchSelect / ModelRouteList / Spinner …), all styled with the same CSS Modules + `--dsw-*` tokens as upstream; also the shared reference parser/renderer (findReferences / parseReferenceToken) and the schema-generated row config page. Ships as an inlined client library (`dsh.client.inline`), not as an assembly row.",
5
5
  "keywords": [
6
6
  "client",
@@ -48,7 +48,7 @@
48
48
  "devDependencies": {
49
49
  "@deepseek-ai/dsh-util-values": "^0.2.1-rc.1",
50
50
  "@deepseek-ai/schemastery": "^3.18.5",
51
- "@morlay/session-rdb": "0.1.7",
51
+ "@morlay/session-rdb": "0.1.9",
52
52
  "@testing-library/react": "^16.3.0",
53
53
  "@types/mdast": "^4.0.4",
54
54
  "@types/react": "~18.3.1",
@@ -64,91 +64,95 @@ export interface SchemaFormHintsFace {
64
64
  }
65
65
 
66
66
  // 提示面的完整服务(业务用注册侧,表单一侧用读侧)。
67
+ //
68
+ // 状态用 TS `private`(运行时是普通属性)而不是 JS `#` 私有字段:本包是内联库,同一服务实例会被**另一份
69
+ // 副本**的代码读(多份副本各带一份类定义,`#` 字段跨类定义不可见,会抛
70
+ // `Cannot read private member #texts from an object whose class did not declare it`)。
67
71
  export class SchemaFormHints extends Service implements SchemaFormHintsFace {
68
- readonly #readers = new Map<string, SuggestedKeysReader>();
69
- readonly #texts = new Map<string, FieldTextReader>();
70
- readonly #selects = new Map<string, SelectSpec>();
71
- readonly #sources = new Map<string, SelectSpec>();
72
- readonly #listeners = new Set<() => void>();
72
+ private readonly readers = new Map<string, SuggestedKeysReader>();
73
+ private readonly texts = new Map<string, FieldTextReader>();
74
+ private readonly selects = new Map<string, SelectSpec>();
75
+ private readonly sources = new Map<string, SelectSpec>();
76
+ private readonly listeners = new Set<() => void>();
73
77
 
74
78
  constructor(ctx: Context) {
75
79
  super(ctx, "schemaFormHints");
76
80
  }
77
81
 
78
82
  keysFor(ns: string, path: readonly string[]): readonly string[] {
79
- return lookup(this.#readers, ns, path)?.() ?? [];
83
+ return lookup(this.readers, ns, path)?.() ?? [];
80
84
  }
81
85
 
82
86
  textFor(ns: string, path: readonly string[]): FieldText {
83
- return lookup(this.#texts, ns, path)?.() ?? {};
87
+ return lookup(this.texts, ns, path)?.() ?? {};
84
88
  }
85
89
 
86
90
  select(ns: string, path: readonly string[], spec: SelectSpec): () => void {
87
91
  const key = locationKey(ns, path);
88
- this.#selects.set(key, spec);
89
- this.#publish();
92
+ this.selects.set(key, spec);
93
+ this.publish();
90
94
  return () => {
91
- if (this.#selects.get(key) !== spec) return;
92
- this.#selects.delete(key);
93
- this.#publish();
95
+ if (this.selects.get(key) !== spec) return;
96
+ this.selects.delete(key);
97
+ this.publish();
94
98
  };
95
99
  }
96
100
 
97
101
  selectFor(ns: string, path: readonly string[]): SelectSpec | undefined {
98
- return lookup(this.#selects, ns, path);
102
+ return lookup(this.selects, ns, path);
99
103
  }
100
104
 
101
105
  source(name: string, spec: SelectSpec): () => void {
102
- this.#sources.set(name, spec);
103
- this.#publish();
106
+ this.sources.set(name, spec);
107
+ this.publish();
104
108
  return () => {
105
- if (this.#sources.get(name) !== spec) return;
106
- this.#sources.delete(name);
107
- this.#publish();
109
+ if (this.sources.get(name) !== spec) return;
110
+ this.sources.delete(name);
111
+ this.publish();
108
112
  };
109
113
  }
110
114
 
111
115
  sourceFor(name: string): SelectSpec | undefined {
112
- return this.#sources.get(name);
116
+ return this.sources.get(name);
113
117
  }
114
118
 
115
119
  describe(ns: string, path: readonly string[], read: FieldTextReader): () => void {
116
120
  const key = locationKey(ns, path);
117
- this.#texts.set(key, read);
118
- this.#publish();
121
+ this.texts.set(key, read);
122
+ this.publish();
119
123
  return () => {
120
- if (this.#texts.get(key) !== read) return;
121
- this.#texts.delete(key);
122
- this.#publish();
124
+ if (this.texts.get(key) !== read) return;
125
+ this.texts.delete(key);
126
+ this.publish();
123
127
  };
124
128
  }
125
129
 
126
130
  suggestKeys(ns: string, path: readonly string[], read: SuggestedKeysReader): () => void {
127
131
  const key = locationKey(ns, path);
128
- this.#readers.set(key, read);
129
- this.#publish();
132
+ this.readers.set(key, read);
133
+ this.publish();
130
134
  return () => {
131
- if (this.#readers.get(key) !== read) return;
132
- this.#readers.delete(key);
133
- this.#publish();
135
+ if (this.readers.get(key) !== read) return;
136
+ this.readers.delete(key);
137
+ this.publish();
134
138
  };
135
139
  }
136
140
 
137
141
  // 观察候选键的变化(注册与注销);返回取消订阅。
138
142
  subscribe(listener: () => void): () => void {
139
- this.#listeners.add(listener);
143
+ this.listeners.add(listener);
140
144
  return () => {
141
- this.#listeners.delete(listener);
145
+ this.listeners.delete(listener);
142
146
  };
143
147
  }
144
148
 
145
149
  // 重新通知一次:读数背后的数据变了(业务自己知道),页面据此重算候选行。
146
150
  refresh(): void {
147
- this.#publish();
151
+ this.publish();
148
152
  }
149
153
 
150
- #publish(): void {
151
- for (const listener of this.#listeners) listener();
154
+ private publish(): void {
155
+ for (const listener of this.listeners) listener();
152
156
  }
153
157
  }
154
158
 
@@ -91,9 +91,17 @@ export function apply(ctx: Context): void {
91
91
  }
92
92
 
93
93
  function install(ctx: Context): void {
94
- ctx.effect(() => ctx.locale.register(NS, { zh, en }), "ui-schema-form: dictionaries");
95
94
  // 提示面(dict 的候选键):同一次 apply 里提供,业务插件注册读数,本包的行投影读它。
96
- const hints = new SchemaFormHints(ctx);
95
+ //
96
+ // **必须最先提供,并且挂在 root 上**:多份副本各自的 `apply` 会同时等依赖到齐、各自回调;`apply` 里的检查
97
+ // 靠 `schemaFormHints` 判断“另一份已经装过”。两个细节缺一不可:
98
+ //
99
+ // - 放在 `locale.register` 之前:否则两次回调都可能先通过检查、再各注册一次 `settings.schema-form` 字典,
100
+ // 第二个抛 `locale namespace "settings.schema-form" already has locale "zh"`;
101
+ // - 用 `ctx.root` 提供:`scope.get` 默认只认 ACTIVE fiber,而 inject 回调期间它自己的 fiber 还没转
102
+ // ACTIVE——挂在当前 scope 上时,兄弟副本的回调看不到这个服务,照样会进来装第二遍。
103
+ const hints = new SchemaFormHints(ctx.root);
104
+ ctx.effect(() => ctx.locale.register(NS, { zh, en }), "ui-schema-form: dictionaries");
97
105
  ctx.effect(
98
106
  () =>
99
107
  ctx.slots.registerFactory(