@morlay/dsh-client-ui-primitives 0.0.12 → 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.
- package/dist/{client-BunyBylj.mjs → client-C9tXSdRV.mjs} +114 -114
- package/dist/{client-Ngzv0PL1.cjs → client-J4NBonYH.cjs} +113 -113
- package/dist/client.cjs +1 -1
- package/dist/client.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/src/client/schema-form/hints.ts +38 -34
- package/src/client/schema-form/index.ts +10 -2
|
@@ -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
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
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
|
|
1020
|
+
return lookup(this.readers, ns, path)?.() ?? [];
|
|
1021
1021
|
}
|
|
1022
1022
|
textFor(ns, path) {
|
|
1023
|
-
return lookup(this
|
|
1023
|
+
return lookup(this.texts, ns, path)?.() ?? {};
|
|
1024
1024
|
}
|
|
1025
1025
|
select(ns, path, spec) {
|
|
1026
1026
|
const key = locationKey(ns, path);
|
|
1027
|
-
this
|
|
1028
|
-
this
|
|
1027
|
+
this.selects.set(key, spec);
|
|
1028
|
+
this.publish();
|
|
1029
1029
|
return () => {
|
|
1030
|
-
if (this
|
|
1031
|
-
this
|
|
1032
|
-
this
|
|
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
|
|
1036
|
+
return lookup(this.selects, ns, path);
|
|
1037
1037
|
}
|
|
1038
1038
|
source(name, spec) {
|
|
1039
|
-
this
|
|
1040
|
-
this
|
|
1039
|
+
this.sources.set(name, spec);
|
|
1040
|
+
this.publish();
|
|
1041
1041
|
return () => {
|
|
1042
|
-
if (this
|
|
1043
|
-
this
|
|
1044
|
-
this
|
|
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
|
|
1048
|
+
return this.sources.get(name);
|
|
1049
1049
|
}
|
|
1050
1050
|
describe(ns, path, read) {
|
|
1051
1051
|
const key = locationKey(ns, path);
|
|
1052
|
-
this
|
|
1053
|
-
this
|
|
1052
|
+
this.texts.set(key, read);
|
|
1053
|
+
this.publish();
|
|
1054
1054
|
return () => {
|
|
1055
|
-
if (this
|
|
1056
|
-
this
|
|
1057
|
-
this
|
|
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
|
|
1063
|
-
this
|
|
1062
|
+
this.readers.set(key, read);
|
|
1063
|
+
this.publish();
|
|
1064
1064
|
return () => {
|
|
1065
|
-
if (this
|
|
1066
|
-
this
|
|
1067
|
-
this
|
|
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
|
|
1071
|
+
this.listeners.add(listener);
|
|
1072
1072
|
return () => {
|
|
1073
|
-
this
|
|
1073
|
+
this.listeners.delete(listener);
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
1076
|
refresh() {
|
|
1077
|
-
this
|
|
1077
|
+
this.publish();
|
|
1078
1078
|
}
|
|
1079
|
-
|
|
1080
|
-
for (const listener of this
|
|
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
|
-
"
|
|
1470
|
-
"
|
|
1471
|
-
"hoverActions": "N3kx7G_hoverActions",
|
|
1472
|
-
"lineFold": "N3kx7G_lineFold",
|
|
1473
|
-
"compactTextField": "N3kx7G_compactTextField",
|
|
1474
|
-
"lineActions": "N3kx7G_lineActions",
|
|
1475
|
-
"lineToken": "N3kx7G_lineToken",
|
|
1476
|
-
"valueSlot": "N3kx7G_valueSlot",
|
|
1477
|
-
"lineKey": "N3kx7G_lineKey",
|
|
1469
|
+
"valueTrigger": "N3kx7G_valueTrigger",
|
|
1470
|
+
"compactInput": "N3kx7G_compactInput",
|
|
1478
1471
|
"lineComment": "N3kx7G_lineComment",
|
|
1472
|
+
"lineFold": "N3kx7G_lineFold",
|
|
1479
1473
|
"lineInvalid": "N3kx7G_lineInvalid",
|
|
1474
|
+
"hoverActions": "N3kx7G_hoverActions",
|
|
1475
|
+
"addWrap": "N3kx7G_addWrap",
|
|
1476
|
+
"editorRoot": "N3kx7G_editorRoot",
|
|
1477
|
+
"hint": "N3kx7G_hint",
|
|
1478
|
+
"lineRow": "N3kx7G_lineRow",
|
|
1480
1479
|
"lineFoldSpacer": "N3kx7G_lineFoldSpacer",
|
|
1480
|
+
"valueSlot": "N3kx7G_valueSlot",
|
|
1481
|
+
"lineToken": "N3kx7G_lineToken",
|
|
1481
1482
|
"lineValue": "N3kx7G_lineValue",
|
|
1482
|
-
"
|
|
1483
|
+
"lineKey": "N3kx7G_lineKey",
|
|
1484
|
+
"lineBody": "N3kx7G_lineBody",
|
|
1483
1485
|
"lineNumber": "N3kx7G_lineNumber",
|
|
1484
|
-
"
|
|
1485
|
-
"
|
|
1486
|
-
"addWrap": "N3kx7G_addWrap",
|
|
1487
|
-
"hint": "N3kx7G_hint"
|
|
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
|
-
"
|
|
2481
|
-
"justifyCenter": "_7Ar2dq_justifyCenter",
|
|
2482
|
-
"grow": "_7Ar2dq_grow",
|
|
2483
|
-
"alignCenter": "_7Ar2dq_alignCenter",
|
|
2484
|
-
"plain": "_7Ar2dq_plain",
|
|
2485
|
-
"toneDanger": "_7Ar2dq_toneDanger",
|
|
2486
|
-
"text": "_7Ar2dq_text",
|
|
2487
|
-
"row": "_7Ar2dq_row",
|
|
2488
|
-
"gap10": "_7Ar2dq_gap10",
|
|
2489
|
-
"padCard": "_7Ar2dq_padCard",
|
|
2490
|
-
"gap6": "_7Ar2dq_gap6",
|
|
2480
|
+
"push": "_7Ar2dq_push",
|
|
2491
2481
|
"fixed": "_7Ar2dq_fixed",
|
|
2492
|
-
"alignEnd": "_7Ar2dq_alignEnd",
|
|
2493
|
-
"fill": "_7Ar2dq_fill",
|
|
2494
2482
|
"padBlocking": "_7Ar2dq_padBlocking",
|
|
2495
|
-
"
|
|
2496
|
-
"
|
|
2497
|
-
"
|
|
2483
|
+
"padPage": "_7Ar2dq_padPage",
|
|
2484
|
+
"gap10": "_7Ar2dq_gap10",
|
|
2485
|
+
"padRow": "_7Ar2dq_padRow",
|
|
2486
|
+
"alignStart": "_7Ar2dq_alignStart",
|
|
2487
|
+
"justifyBetween": "_7Ar2dq_justifyBetween",
|
|
2488
|
+
"padBody": "_7Ar2dq_padBody",
|
|
2489
|
+
"gap16": "_7Ar2dq_gap16",
|
|
2490
|
+
"gap2": "_7Ar2dq_gap2",
|
|
2491
|
+
"gap0": "_7Ar2dq_gap0",
|
|
2492
|
+
"sizeMd": "_7Ar2dq_sizeMd",
|
|
2493
|
+
"alignCenter": "_7Ar2dq_alignCenter",
|
|
2494
|
+
"padNone": "_7Ar2dq_padNone",
|
|
2495
|
+
"gap6": "_7Ar2dq_gap6",
|
|
2496
|
+
"gap8": "_7Ar2dq_gap8",
|
|
2498
2497
|
"toneTertiary": "_7Ar2dq_toneTertiary",
|
|
2499
2498
|
"sizeXs": "_7Ar2dq_sizeXs",
|
|
2500
2499
|
"gap4": "_7Ar2dq_gap4",
|
|
2501
|
-
"
|
|
2502
|
-
"
|
|
2503
|
-
"justifyEnd": "_7Ar2dq_justifyEnd",
|
|
2504
|
-
"sizeBase": "_7Ar2dq_sizeBase",
|
|
2505
|
-
"scroll": "_7Ar2dq_scroll",
|
|
2506
|
-
"padNone": "_7Ar2dq_padNone",
|
|
2507
|
-
"stack": "_7Ar2dq_stack",
|
|
2508
|
-
"padRow": "_7Ar2dq_padRow",
|
|
2509
|
-
"tonePrimary": "_7Ar2dq_tonePrimary",
|
|
2500
|
+
"weightMedium": "_7Ar2dq_weightMedium",
|
|
2501
|
+
"row": "_7Ar2dq_row",
|
|
2510
2502
|
"truncate": "_7Ar2dq_truncate",
|
|
2511
|
-
"sizeMd": "_7Ar2dq_sizeMd",
|
|
2512
|
-
"toneSecondary": "_7Ar2dq_toneSecondary",
|
|
2513
|
-
"boxed": "_7Ar2dq_boxed",
|
|
2514
2503
|
"narrow": "_7Ar2dq_narrow",
|
|
2515
|
-
"
|
|
2516
|
-
"
|
|
2517
|
-
"
|
|
2518
|
-
"
|
|
2519
|
-
"gap8": "_7Ar2dq_gap8",
|
|
2504
|
+
"tonePrimary": "_7Ar2dq_tonePrimary",
|
|
2505
|
+
"gapWide": "_7Ar2dq_gapWide",
|
|
2506
|
+
"boxed": "_7Ar2dq_boxed",
|
|
2507
|
+
"sizeBase": "_7Ar2dq_sizeBase",
|
|
2520
2508
|
"gap14": "_7Ar2dq_gap14",
|
|
2521
|
-
"
|
|
2522
|
-
"alignStart": "_7Ar2dq_alignStart",
|
|
2523
|
-
"padBody": "_7Ar2dq_padBody",
|
|
2509
|
+
"justifyCenter": "_7Ar2dq_justifyCenter",
|
|
2524
2510
|
"mono": "_7Ar2dq_mono",
|
|
2525
|
-
"
|
|
2511
|
+
"wSearch": "_7Ar2dq_wSearch",
|
|
2512
|
+
"text": "_7Ar2dq_text",
|
|
2513
|
+
"gap12": "_7Ar2dq_gap12",
|
|
2514
|
+
"tabular": "_7Ar2dq_tabular",
|
|
2515
|
+
"toneDanger": "_7Ar2dq_toneDanger",
|
|
2516
|
+
"scroll": "_7Ar2dq_scroll",
|
|
2526
2517
|
"wrap": "_7Ar2dq_wrap",
|
|
2527
|
-
"
|
|
2528
|
-
"
|
|
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
|
-
"
|
|
2611
|
+
"badge": "Il1Dtq_badge",
|
|
2612
|
+
"body": "Il1Dtq_body",
|
|
2613
|
+
"text": "Il1Dtq_text",
|
|
2612
2614
|
"row": "Il1Dtq_row",
|
|
2615
|
+
"label": "Il1Dtq_label",
|
|
2616
|
+
"invalid": "Il1Dtq_invalid",
|
|
2613
2617
|
"hint": "Il1Dtq_hint",
|
|
2614
|
-
"reset": "Il1Dtq_reset",
|
|
2615
2618
|
"inline": "Il1Dtq_inline",
|
|
2616
|
-
"
|
|
2617
|
-
"text": "Il1Dtq_text",
|
|
2618
|
-
"badge": "Il1Dtq_badge",
|
|
2619
|
-
"body": "Il1Dtq_body"
|
|
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
|
-
"
|
|
2711
|
-
"
|
|
2710
|
+
"label": "LWgVXW_label",
|
|
2711
|
+
"danger": "LWgVXW_danger"
|
|
2712
2712
|
};
|
|
2713
2713
|
//#endregion
|
|
2714
2714
|
//#region src/client/controls/Button.tsx
|
|
@@ -2732,8 +2732,8 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
|
|
|
2732
2732
|
document.head.appendChild(tag);
|
|
2733
2733
|
}
|
|
2734
2734
|
var DisclosureRow_module_css_default = {
|
|
2735
|
-
"
|
|
2736
|
-
"
|
|
2735
|
+
"contentLayout": "_2HN-kW_contentLayout",
|
|
2736
|
+
"content": "_2HN-kW_content"
|
|
2737
2737
|
};
|
|
2738
2738
|
//#endregion
|
|
2739
2739
|
//#region src/client/controls/DisclosureRow.tsx
|
|
@@ -2757,10 +2757,10 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
|
|
|
2757
2757
|
}
|
|
2758
2758
|
var SeatButton_module_css_default = {
|
|
2759
2759
|
"label": "JqQ4qG_label",
|
|
2760
|
-
"chevron": "JqQ4qG_chevron",
|
|
2761
2760
|
"expanded": "JqQ4qG_expanded",
|
|
2762
2761
|
"seat": "JqQ4qG_seat",
|
|
2763
|
-
"icon": "JqQ4qG_icon"
|
|
2762
|
+
"icon": "JqQ4qG_icon",
|
|
2763
|
+
"chevron": "JqQ4qG_chevron"
|
|
2764
2764
|
};
|
|
2765
2765
|
//#endregion
|
|
2766
2766
|
//#region src/client/controls/SeatButton.tsx
|
|
@@ -2864,8 +2864,8 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
|
|
|
2864
2864
|
}
|
|
2865
2865
|
var IconButton_module_css_default = {
|
|
2866
2866
|
"iconButton": "AibFna_iconButton",
|
|
2867
|
-
"
|
|
2868
|
-
"
|
|
2867
|
+
"circle": "AibFna_circle",
|
|
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
|
-
"item": "_1vK46q_item",
|
|
2895
|
-
"notice": "_1vK46q_notice",
|
|
2896
|
-
"group": "_1vK46q_group",
|
|
2897
2894
|
"id": "_1vK46q_id",
|
|
2898
|
-
"error": "_1vK46q_error",
|
|
2899
2895
|
"provider": "_1vK46q_provider",
|
|
2900
|
-
"name": "_1vK46q_name",
|
|
2901
2896
|
"text": "_1vK46q_text",
|
|
2897
|
+
"list": "_1vK46q_list",
|
|
2898
|
+
"name": "_1vK46q_name",
|
|
2899
|
+
"group": "_1vK46q_group",
|
|
2902
2900
|
"picked": "_1vK46q_picked",
|
|
2903
|
-
"
|
|
2901
|
+
"notice": "_1vK46q_notice",
|
|
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
|
-
"
|
|
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
|
-
"row": "Qg7I9G_row",
|
|
3127
3126
|
"chipRemove": "Qg7I9G_chipRemove",
|
|
3128
|
-
"
|
|
3127
|
+
"empty": "Qg7I9G_empty",
|
|
3128
|
+
"chip": "Qg7I9G_chip",
|
|
3129
3129
|
"anchor": "Qg7I9G_anchor",
|
|
3130
|
+
"row": "Qg7I9G_row",
|
|
3130
3131
|
"input": "Qg7I9G_input",
|
|
3131
|
-
"
|
|
3132
|
-
"empty": "Qg7I9G_empty"
|
|
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
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
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
|
|
1021
|
+
return lookup(this.readers, ns, path)?.() ?? [];
|
|
1022
1022
|
}
|
|
1023
1023
|
textFor(ns, path) {
|
|
1024
|
-
return lookup(this
|
|
1024
|
+
return lookup(this.texts, ns, path)?.() ?? {};
|
|
1025
1025
|
}
|
|
1026
1026
|
select(ns, path, spec) {
|
|
1027
1027
|
const key = locationKey(ns, path);
|
|
1028
|
-
this
|
|
1029
|
-
this
|
|
1028
|
+
this.selects.set(key, spec);
|
|
1029
|
+
this.publish();
|
|
1030
1030
|
return () => {
|
|
1031
|
-
if (this
|
|
1032
|
-
this
|
|
1033
|
-
this
|
|
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
|
|
1037
|
+
return lookup(this.selects, ns, path);
|
|
1038
1038
|
}
|
|
1039
1039
|
source(name, spec) {
|
|
1040
|
-
this
|
|
1041
|
-
this
|
|
1040
|
+
this.sources.set(name, spec);
|
|
1041
|
+
this.publish();
|
|
1042
1042
|
return () => {
|
|
1043
|
-
if (this
|
|
1044
|
-
this
|
|
1045
|
-
this
|
|
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
|
|
1049
|
+
return this.sources.get(name);
|
|
1050
1050
|
}
|
|
1051
1051
|
describe(ns, path, read) {
|
|
1052
1052
|
const key = locationKey(ns, path);
|
|
1053
|
-
this
|
|
1054
|
-
this
|
|
1053
|
+
this.texts.set(key, read);
|
|
1054
|
+
this.publish();
|
|
1055
1055
|
return () => {
|
|
1056
|
-
if (this
|
|
1057
|
-
this
|
|
1058
|
-
this
|
|
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
|
|
1064
|
-
this
|
|
1063
|
+
this.readers.set(key, read);
|
|
1064
|
+
this.publish();
|
|
1065
1065
|
return () => {
|
|
1066
|
-
if (this
|
|
1067
|
-
this
|
|
1068
|
-
this
|
|
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
|
|
1072
|
+
this.listeners.add(listener);
|
|
1073
1073
|
return () => {
|
|
1074
|
-
this
|
|
1074
|
+
this.listeners.delete(listener);
|
|
1075
1075
|
};
|
|
1076
1076
|
}
|
|
1077
1077
|
refresh() {
|
|
1078
|
-
this
|
|
1078
|
+
this.publish();
|
|
1079
1079
|
}
|
|
1080
|
-
|
|
1081
|
-
for (const listener of this
|
|
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
|
-
"
|
|
1472
|
+
"lineNumber": "N3kx7G_lineNumber",
|
|
1473
|
+
"compactInput": "N3kx7G_compactInput",
|
|
1474
|
+
"lineKey": "N3kx7G_lineKey",
|
|
1475
|
+
"valueTrigger": "N3kx7G_valueTrigger",
|
|
1476
|
+
"lineComment": "N3kx7G_lineComment",
|
|
1473
1477
|
"lineInvalid": "N3kx7G_lineInvalid",
|
|
1478
|
+
"lineFold": "N3kx7G_lineFold",
|
|
1479
|
+
"editorRoot": "N3kx7G_editorRoot",
|
|
1474
1480
|
"compactTextField": "N3kx7G_compactTextField",
|
|
1475
|
-
"valueTrigger": "N3kx7G_valueTrigger",
|
|
1476
|
-
"lineKey": "N3kx7G_lineKey",
|
|
1477
1481
|
"hoverActions": "N3kx7G_hoverActions",
|
|
1478
|
-
"lineComment": "N3kx7G_lineComment",
|
|
1479
1482
|
"lineToken": "N3kx7G_lineToken",
|
|
1480
|
-
"
|
|
1481
|
-
"
|
|
1482
|
-
"lineNumber": "N3kx7G_lineNumber",
|
|
1483
|
-
"lineRow": "N3kx7G_lineRow",
|
|
1483
|
+
"lineBody": "N3kx7G_lineBody",
|
|
1484
|
+
"addWrap": "N3kx7G_addWrap",
|
|
1484
1485
|
"lineFoldSpacer": "N3kx7G_lineFoldSpacer",
|
|
1485
|
-
"lineActions": "N3kx7G_lineActions",
|
|
1486
1486
|
"lineValue": "N3kx7G_lineValue",
|
|
1487
|
-
"
|
|
1487
|
+
"lineRow": "N3kx7G_lineRow",
|
|
1488
|
+
"lineActions": "N3kx7G_lineActions",
|
|
1488
1489
|
"hint": "N3kx7G_hint",
|
|
1489
|
-
"
|
|
1490
|
-
"editorRoot": "N3kx7G_editorRoot"
|
|
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
|
-
"
|
|
2484
|
-
"
|
|
2485
|
-
"
|
|
2486
|
-
"
|
|
2487
|
-
"
|
|
2488
|
-
"
|
|
2489
|
-
"
|
|
2490
|
-
"
|
|
2491
|
-
"
|
|
2483
|
+
"justifyEnd": "_7Ar2dq_justifyEnd",
|
|
2484
|
+
"sizeLg": "_7Ar2dq_sizeLg",
|
|
2485
|
+
"padNone": "_7Ar2dq_padNone",
|
|
2486
|
+
"tonePrimary": "_7Ar2dq_tonePrimary",
|
|
2487
|
+
"toneTertiary": "_7Ar2dq_toneTertiary",
|
|
2488
|
+
"padBody": "_7Ar2dq_padBody",
|
|
2489
|
+
"mono": "_7Ar2dq_mono",
|
|
2490
|
+
"gapWide": "_7Ar2dq_gapWide",
|
|
2491
|
+
"plain": "_7Ar2dq_plain",
|
|
2492
2492
|
"narrow": "_7Ar2dq_narrow",
|
|
2493
|
-
"
|
|
2494
|
-
"
|
|
2495
|
-
"
|
|
2496
|
-
"
|
|
2497
|
-
"
|
|
2493
|
+
"toneDanger": "_7Ar2dq_toneDanger",
|
|
2494
|
+
"wSearch": "_7Ar2dq_wSearch",
|
|
2495
|
+
"gap12": "_7Ar2dq_gap12",
|
|
2496
|
+
"text": "_7Ar2dq_text",
|
|
2497
|
+
"sizeBase": "_7Ar2dq_sizeBase",
|
|
2498
|
+
"gap4": "_7Ar2dq_gap4",
|
|
2498
2499
|
"sizeXs": "_7Ar2dq_sizeXs",
|
|
2499
|
-
"
|
|
2500
|
+
"wrap": "_7Ar2dq_wrap",
|
|
2501
|
+
"gap8": "_7Ar2dq_gap8",
|
|
2502
|
+
"padRow": "_7Ar2dq_padRow",
|
|
2503
|
+
"tabular": "_7Ar2dq_tabular",
|
|
2500
2504
|
"scroll": "_7Ar2dq_scroll",
|
|
2501
|
-
"gap2": "_7Ar2dq_gap2",
|
|
2502
|
-
"stack": "_7Ar2dq_stack",
|
|
2503
|
-
"gap16": "_7Ar2dq_gap16",
|
|
2504
|
-
"gap4": "_7Ar2dq_gap4",
|
|
2505
|
-
"justifyEnd": "_7Ar2dq_justifyEnd",
|
|
2506
2505
|
"padPage": "_7Ar2dq_padPage",
|
|
2506
|
+
"stack": "_7Ar2dq_stack",
|
|
2507
2507
|
"gap10": "_7Ar2dq_gap10",
|
|
2508
|
-
"
|
|
2508
|
+
"padBlocking": "_7Ar2dq_padBlocking",
|
|
2509
|
+
"strong": "_7Ar2dq_strong",
|
|
2510
|
+
"fixed": "_7Ar2dq_fixed",
|
|
2511
|
+
"gap16": "_7Ar2dq_gap16",
|
|
2512
|
+
"gap0": "_7Ar2dq_gap0",
|
|
2509
2513
|
"gap14": "_7Ar2dq_gap14",
|
|
2510
|
-
"
|
|
2511
|
-
"
|
|
2512
|
-
"
|
|
2514
|
+
"toneSecondary": "_7Ar2dq_toneSecondary",
|
|
2515
|
+
"alignStart": "_7Ar2dq_alignStart",
|
|
2516
|
+
"push": "_7Ar2dq_push",
|
|
2517
|
+
"padCard": "_7Ar2dq_padCard",
|
|
2518
|
+
"truncate": "_7Ar2dq_truncate",
|
|
2519
|
+
"boxed": "_7Ar2dq_boxed",
|
|
2520
|
+
"gap6": "_7Ar2dq_gap6",
|
|
2521
|
+
"alignCenter": "_7Ar2dq_alignCenter",
|
|
2522
|
+
"alignEnd": "_7Ar2dq_alignEnd",
|
|
2523
|
+
"gap2": "_7Ar2dq_gap2",
|
|
2513
2524
|
"grow": "_7Ar2dq_grow",
|
|
2525
|
+
"fill": "_7Ar2dq_fill",
|
|
2514
2526
|
"sizeSm": "_7Ar2dq_sizeSm",
|
|
2515
|
-
"
|
|
2516
|
-
"
|
|
2517
|
-
"
|
|
2518
|
-
"sizeLg": "_7Ar2dq_sizeLg",
|
|
2519
|
-
"tonePrimary": "_7Ar2dq_tonePrimary",
|
|
2520
|
-
"toneTertiary": "_7Ar2dq_toneTertiary",
|
|
2521
|
-
"alignCenter": "_7Ar2dq_alignCenter",
|
|
2522
|
-
"plain": "_7Ar2dq_plain",
|
|
2527
|
+
"sizeMd": "_7Ar2dq_sizeMd",
|
|
2528
|
+
"row": "_7Ar2dq_row",
|
|
2529
|
+
"weightMedium": "_7Ar2dq_weightMedium",
|
|
2523
2530
|
"justifyCenter": "_7Ar2dq_justifyCenter",
|
|
2524
|
-
"
|
|
2525
|
-
"mono": "_7Ar2dq_mono",
|
|
2526
|
-
"padNone": "_7Ar2dq_padNone",
|
|
2527
|
-
"padBlocking": "_7Ar2dq_padBlocking",
|
|
2528
|
-
"truncate": "_7Ar2dq_truncate",
|
|
2529
|
-
"alignStart": "_7Ar2dq_alignStart",
|
|
2530
|
-
"justifyBetween": "_7Ar2dq_justifyBetween",
|
|
2531
|
-
"gap12": "_7Ar2dq_gap12"
|
|
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
|
-
"row": "Il1Dtq_row",
|
|
2615
2614
|
"reset": "Il1Dtq_reset",
|
|
2616
|
-
"
|
|
2617
|
-
"inline": "Il1Dtq_inline",
|
|
2615
|
+
"invalid": "Il1Dtq_invalid",
|
|
2618
2616
|
"hint": "Il1Dtq_hint",
|
|
2619
|
-
"badge": "Il1Dtq_badge",
|
|
2620
2617
|
"body": "Il1Dtq_body",
|
|
2621
|
-
"
|
|
2622
|
-
"
|
|
2618
|
+
"inline": "Il1Dtq_inline",
|
|
2619
|
+
"row": "Il1Dtq_row",
|
|
2620
|
+
"text": "Il1Dtq_text",
|
|
2621
|
+
"label": "Il1Dtq_label",
|
|
2622
|
+
"badge": "Il1Dtq_badge"
|
|
2623
2623
|
};
|
|
2624
2624
|
//#endregion
|
|
2625
2625
|
//#region src/client/settings-form/SettingsFieldRow.tsx
|
|
@@ -2735,8 +2735,8 @@ window.__ModuleLoader__.load({
|
|
|
2735
2735
|
document.head.appendChild(tag);
|
|
2736
2736
|
}
|
|
2737
2737
|
var DisclosureRow_module_css_default = {
|
|
2738
|
-
"
|
|
2739
|
-
"
|
|
2738
|
+
"content": "_2HN-kW_content",
|
|
2739
|
+
"contentLayout": "_2HN-kW_contentLayout"
|
|
2740
2740
|
};
|
|
2741
2741
|
//#endregion
|
|
2742
2742
|
//#region src/client/controls/DisclosureRow.tsx
|
|
@@ -2759,10 +2759,10 @@ window.__ModuleLoader__.load({
|
|
|
2759
2759
|
document.head.appendChild(tag);
|
|
2760
2760
|
}
|
|
2761
2761
|
var SeatButton_module_css_default = {
|
|
2762
|
-
"
|
|
2762
|
+
"expanded": "JqQ4qG_expanded",
|
|
2763
2763
|
"chevron": "JqQ4qG_chevron",
|
|
2764
|
+
"label": "JqQ4qG_label",
|
|
2764
2765
|
"icon": "JqQ4qG_icon",
|
|
2765
|
-
"expanded": "JqQ4qG_expanded",
|
|
2766
2766
|
"seat": "JqQ4qG_seat"
|
|
2767
2767
|
};
|
|
2768
2768
|
//#endregion
|
|
@@ -2866,9 +2866,9 @@ window.__ModuleLoader__.load({
|
|
|
2866
2866
|
document.head.appendChild(tag);
|
|
2867
2867
|
}
|
|
2868
2868
|
var IconButton_module_css_default = {
|
|
2869
|
+
"iconButton": "AibFna_iconButton",
|
|
2869
2870
|
"sm": "AibFna_sm",
|
|
2870
|
-
"circle": "AibFna_circle"
|
|
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
|
-
"
|
|
2898
|
-
"
|
|
2899
|
-
"
|
|
2897
|
+
"list": "_1vK46q_list",
|
|
2898
|
+
"name": "_1vK46q_name",
|
|
2899
|
+
"provider": "_1vK46q_provider",
|
|
2900
2900
|
"text": "_1vK46q_text",
|
|
2901
|
+
"picked": "_1vK46q_picked",
|
|
2901
2902
|
"item": "_1vK46q_item",
|
|
2902
|
-
"error": "_1vK46q_error",
|
|
2903
|
-
"name": "_1vK46q_name",
|
|
2904
2903
|
"group": "_1vK46q_group",
|
|
2905
|
-
"
|
|
2906
|
-
"
|
|
2904
|
+
"id": "_1vK46q_id",
|
|
2905
|
+
"notice": "_1vK46q_notice",
|
|
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",
|
|
3014
3013
|
"searchRow": "kEYv4q_searchRow",
|
|
3015
3014
|
"trigger": "kEYv4q_trigger",
|
|
3016
|
-
"empty": "kEYv4q_empty"
|
|
3015
|
+
"empty": "kEYv4q_empty",
|
|
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
|
-
"row": "Qg7I9G_row",
|
|
3130
|
-
"anchor": "Qg7I9G_anchor",
|
|
3131
|
-
"chipRemove": "Qg7I9G_chipRemove",
|
|
3132
|
-
"box": "Qg7I9G_box",
|
|
3133
3129
|
"input": "Qg7I9G_input",
|
|
3130
|
+
"box": "Qg7I9G_box",
|
|
3134
3131
|
"chip": "Qg7I9G_chip",
|
|
3135
|
-
"
|
|
3132
|
+
"chipRemove": "Qg7I9G_chipRemove",
|
|
3133
|
+
"empty": "Qg7I9G_empty",
|
|
3134
|
+
"row": "Qg7I9G_row",
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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.
|
|
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.
|
|
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
|
|
69
|
-
readonly
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
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
|
|
83
|
+
return lookup(this.readers, ns, path)?.() ?? [];
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
textFor(ns: string, path: readonly string[]): FieldText {
|
|
83
|
-
return lookup(this
|
|
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
|
|
89
|
-
this
|
|
92
|
+
this.selects.set(key, spec);
|
|
93
|
+
this.publish();
|
|
90
94
|
return () => {
|
|
91
|
-
if (this
|
|
92
|
-
this
|
|
93
|
-
this
|
|
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
|
|
102
|
+
return lookup(this.selects, ns, path);
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
source(name: string, spec: SelectSpec): () => void {
|
|
102
|
-
this
|
|
103
|
-
this
|
|
106
|
+
this.sources.set(name, spec);
|
|
107
|
+
this.publish();
|
|
104
108
|
return () => {
|
|
105
|
-
if (this
|
|
106
|
-
this
|
|
107
|
-
this
|
|
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
|
|
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
|
|
118
|
-
this
|
|
121
|
+
this.texts.set(key, read);
|
|
122
|
+
this.publish();
|
|
119
123
|
return () => {
|
|
120
|
-
if (this
|
|
121
|
-
this
|
|
122
|
-
this
|
|
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
|
|
129
|
-
this
|
|
132
|
+
this.readers.set(key, read);
|
|
133
|
+
this.publish();
|
|
130
134
|
return () => {
|
|
131
|
-
if (this
|
|
132
|
-
this
|
|
133
|
-
this
|
|
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
|
|
143
|
+
this.listeners.add(listener);
|
|
140
144
|
return () => {
|
|
141
|
-
this
|
|
145
|
+
this.listeners.delete(listener);
|
|
142
146
|
};
|
|
143
147
|
}
|
|
144
148
|
|
|
145
149
|
// 重新通知一次:读数背后的数据变了(业务自己知道),页面据此重算候选行。
|
|
146
150
|
refresh(): void {
|
|
147
|
-
this
|
|
151
|
+
this.publish();
|
|
148
152
|
}
|
|
149
153
|
|
|
150
|
-
|
|
151
|
-
for (const listener of this
|
|
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
|
-
|
|
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(
|