@lmzhen/dsh-evolution-skill-history 0.26.15 → 0.26.26
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/lib/client.js
CHANGED
|
@@ -222,7 +222,7 @@ window.__ModuleLoader__.load({
|
|
|
222
222
|
* @param key - the message key.
|
|
223
223
|
* @returns the copy, or the key itself when neither dictionary carries it.
|
|
224
224
|
*/
|
|
225
|
-
function message(
|
|
225
|
+
function message(key, language = "en") {
|
|
226
226
|
return (language === "zh" ? zh : en)[key] ?? key;
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
@@ -567,9 +567,15 @@ window.__ModuleLoader__.load({
|
|
|
567
567
|
className: "evo-hist-hint"
|
|
568
568
|
}, noteText)];
|
|
569
569
|
}
|
|
570
|
-
/** What the list shows when it has nothing to show.
|
|
571
|
-
|
|
572
|
-
|
|
570
|
+
/** What the list shows when it has nothing to show.
|
|
571
|
+
* S5-07: the sites that render it as a SIBLING in an array must pass a key - a keyless sibling made
|
|
572
|
+
* React warn on every render of the default view (measured: one warning per render, captured by spy).
|
|
573
|
+
*/
|
|
574
|
+
function emptyState(text, key) {
|
|
575
|
+
return (0, react.createElement)("p", {
|
|
576
|
+
key,
|
|
577
|
+
className: "evo-hist-empty"
|
|
578
|
+
}, text);
|
|
573
579
|
}
|
|
574
580
|
/** One notice about what just happened. */
|
|
575
581
|
function notice(text, error) {
|
|
@@ -620,7 +626,7 @@ window.__ModuleLoader__.load({
|
|
|
620
626
|
function rendererOf(row) {
|
|
621
627
|
const candidate = row.MarkdownText;
|
|
622
628
|
if (typeof candidate === "function") return candidate;
|
|
623
|
-
if (typeof candidate === "object" && candidate !== null) return candidate;
|
|
629
|
+
if (typeof candidate === "object" && candidate !== null && candidate.$$typeof !== void 0) return candidate;
|
|
624
630
|
}
|
|
625
631
|
/**
|
|
626
632
|
* The platform component, when this deployment's module table carries one.
|
|
@@ -1049,7 +1055,7 @@ window.__ModuleLoader__.load({
|
|
|
1049
1055
|
};
|
|
1050
1056
|
return (0, react.createElement)("div", { className: "evo-hist-root" }, (0, react.createElement)("aside", { className: "evo-hist-aside" }, searchField(face, query, setQuery), (0, react.createElement)("div", { className: "evo-hist-list" }, skills.length === 0 ? emptyState(face.t(skillsLoaded ? "empty.skills" : "loading")) : visible.length === 0 ? emptyState(face.t("search.none")) : visible.map((skill) => skillLine(face, skill, skill.name === selected, () => {
|
|
1051
1057
|
open(skill.name);
|
|
1052
|
-
})))), (0, react.createElement)("div", { className: "evo-hist-main" }, panelHead(face, refresh), notice(noteText, noteError), selected === void 0 ? [emptyState(face.t(skills.length === 0 ? skillsLoaded ? "empty.skills" : "loading" : "empty.pick")), (0, react.createElement)("p", {
|
|
1058
|
+
})))), (0, react.createElement)("div", { className: "evo-hist-main" }, panelHead(face, refresh), notice(noteText, noteError), selected === void 0 ? [emptyState(face.t(skills.length === 0 ? skillsLoaded ? "empty.skills" : "loading" : "empty.pick"), "empty"), (0, react.createElement)("p", {
|
|
1053
1059
|
key: "hint",
|
|
1054
1060
|
className: "evo-hist-hint"
|
|
1055
1061
|
}, face.t("hint"))] : loaded ? null : emptyState(versionsFailed === void 0 ? face.t("loading") : `${face.t("empty.versions.failed")} — ${versionsFailed}`), loaded ? (0, react.createElement)("div", null, group(face.t("group.content"), payload.content, void 0), group(face.t("group.support"), payload.support, face.t("group.support.note")), payload.content.length === 0 && payload.support.length === 0 ? (0, react.createElement)("p", { className: "evo-hist-hint" }, face.t("empty.versions")) : null) : null));
|
|
@@ -1146,7 +1152,7 @@ window.__ModuleLoader__.load({
|
|
|
1146
1152
|
}
|
|
1147
1153
|
}, "evolution-skill-history: locale");
|
|
1148
1154
|
const seatTranslator = registered ? seam.locale.bind(NS) : null;
|
|
1149
|
-
const t = (key) => seatTranslator === null ? message(
|
|
1155
|
+
const t = (key) => seatTranslator === null ? message(key) : seatTranslator(key);
|
|
1150
1156
|
ctx.effect(() => {
|
|
1151
1157
|
if (document.querySelector("style[data-plugin-css=\"@lmzhen/dsh-evolution-skill-history/panel.css\"]") === null) {
|
|
1152
1158
|
const tag = document.createElement("style");
|
|
@@ -64,8 +64,11 @@ export declare function versionRow(props: VersionRowProps): ReactNode;
|
|
|
64
64
|
* @returns the heading and the note, for the caller to place in its own section.
|
|
65
65
|
*/
|
|
66
66
|
export declare function groupHeading(title: string, noteText: string | undefined): ReactNode[];
|
|
67
|
-
/** What the list shows when it has nothing to show.
|
|
68
|
-
|
|
67
|
+
/** What the list shows when it has nothing to show.
|
|
68
|
+
* S5-07: the sites that render it as a SIBLING in an array must pass a key - a keyless sibling made
|
|
69
|
+
* React warn on every render of the default view (measured: one warning per render, captured by spy).
|
|
70
|
+
*/
|
|
71
|
+
export declare function emptyState(text: string, key?: string): ReactNode;
|
|
69
72
|
/** One notice about what just happened. */
|
|
70
73
|
export declare function notice(text: string | undefined, error: boolean): ReactNode;
|
|
71
74
|
/** The pane's heading and its one control. */
|
|
@@ -18,7 +18,7 @@ export declare const en: Record<string, string>;
|
|
|
18
18
|
* @param key - the message key.
|
|
19
19
|
* @returns the copy, or the key itself when neither dictionary carries it.
|
|
20
20
|
*/
|
|
21
|
-
export declare function message(
|
|
21
|
+
export declare function message(key: string, language?: 'zh' | 'en'): string;
|
|
22
22
|
/**
|
|
23
23
|
* Fill one TEMPLATE’s `{n}` slots. The seat resolves the key, this fills it, so the panel needs
|
|
24
24
|
* only the seat plus this rule and never learns which language it is rendering.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-skill-history",
|
|
3
3
|
"description": "Web surface for skill content history: loopback host routes plus the sidebar panel (community build)",
|
|
4
|
-
"version": "0.26.
|
|
4
|
+
"version": "0.26.26",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -30,23 +30,23 @@
|
|
|
30
30
|
],
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lmzhen/dsh-evolution-core": "^0.26.
|
|
33
|
+
"@lmzhen/dsh-evolution-core": "^0.26.26"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
37
37
|
"@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.1",
|
|
38
38
|
"react": "^18.2.0",
|
|
39
|
-
"@lmzhen/dsh-evolution-curator": "^0.26.
|
|
39
|
+
"@lmzhen/dsh-evolution-curator": "^0.26.26"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
43
43
|
"@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.1",
|
|
44
44
|
"@types/react": "~18.3.1",
|
|
45
45
|
"react": "^18.2.0",
|
|
46
|
-
"@lmzhen/dsh-evolution-core": "^0.26.
|
|
47
|
-
"@lmzhen/dsh-evolution-curator": "^0.26.
|
|
48
|
-
"@lmzhen/dsh-evolution-io": "^0.26.
|
|
49
|
-
"@lmzhen/dsh-evolution-io-node": "^0.26.
|
|
46
|
+
"@lmzhen/dsh-evolution-core": "^0.26.26",
|
|
47
|
+
"@lmzhen/dsh-evolution-curator": "^0.26.26",
|
|
48
|
+
"@lmzhen/dsh-evolution-io": "^0.26.26",
|
|
49
|
+
"@lmzhen/dsh-evolution-io-node": "^0.26.26"
|
|
50
50
|
},
|
|
51
51
|
"dsh": {
|
|
52
52
|
"client": {
|