@sparkelf/dsh-client-ui-skill-center 0.2.1-alpha.2 → 0.2.1-alpha.21
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 +68 -62
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -4,9 +4,9 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
8
|
let react = require("react");
|
|
8
9
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
9
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
//#region \0dsh-css:/root/projects/deepseek-harness-plus/packages/plus/ui-skill-center/src/client/SkillCenterPage.module.css.mjs
|
|
11
11
|
const css = ".DGiSta_page{box-sizing:border-box;height:100%;color:var(--dsw-alias-label-primary);flex-direction:column;align-items:center;gap:32px;padding:28px clamp(24px,4vw,48px) 48px;display:flex;overflow:auto}.DGiSta_page>*{width:100%;max-width:960px}.DGiSta_pageHead{justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.DGiSta_pageTitle{margin:0;font-size:20px;font-weight:500;line-height:28px}.DGiSta_pageIntro{color:var(--dsw-alias-label-secondary);margin:4px 0 0;font-size:13px;line-height:20px}.DGiSta_toolbar{justify-content:flex-end;align-items:center;gap:16px;display:flex}.DGiSta_iconButton{width:28px;height:28px;color:var(--dsw-alias-label-caption);cursor:pointer;background:0 0;border:0;border-radius:28px;justify-content:center;align-items:center;display:inline-flex}.DGiSta_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.DGiSta_iconButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.DGiSta_iconWrap{display:inline-flex}.DGiSta_button{border:.5px solid var(--dsw-alias-border-l3);height:32px;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:8px;padding:0 12px;font-size:13px}.DGiSta_button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.DGiSta_button:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.DGiSta_search{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);width:100%;height:36px;color:var(--dsw-alias-label-primary);background:0 0;border-radius:10px;padding:0 12px;font-size:13px}.DGiSta_search::placeholder{color:var(--dsw-alias-label-tertiary)}.DGiSta_group{margin-top:32px}.DGiSta_groupTitle{align-items:baseline;gap:8px;margin:0 0 4px;font-size:15px;font-weight:500;line-height:22px;display:flex}.DGiSta_groupCount{color:var(--dsw-alias-label-tertiary);font-size:13px;font-weight:400}.DGiSta_groupHint{color:var(--dsw-alias-label-caption);font-size:12px;font-weight:400}.DGiSta_cards{margin:0;padding:0;list-style:none}.DGiSta_card{border-radius:12px;min-width:0;margin:0 -8px}.DGiSta_card:hover{background:var(--dsw-alias-interactive-bg-hover)}.DGiSta_cardHead{align-items:center;gap:14px;padding:8px;display:flex}.DGiSta_cardIcon{border:.5px solid var(--dsw-alias-border-l3);width:48px;height:48px;color:var(--dsw-alias-label-secondary);border-radius:10px;flex:none;justify-content:center;align-items:center;display:inline-flex}.DGiSta_cardForeign{opacity:.72}.DGiSta_cardMain{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.DGiSta_workspaceBadge{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);vertical-align:middle;border-radius:4px;margin-left:8px;padding:1px 6px;font-size:11px;font-weight:400;line-height:16px}.DGiSta_cardTitle{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:500;line-height:20px;overflow:hidden}.DGiSta_cardDesc{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:13px;line-height:18px;display:-webkit-box;overflow:hidden}.DGiSta_cardWhenToUse{color:var(--dsw-alias-label-caption);font-size:12px;line-height:18px}.DGiSta_cardMarks{flex-wrap:wrap;gap:6px;margin-top:2px;display:flex}.DGiSta_mark{border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-tertiary);border-radius:4px;padding:1px 6px;font-size:11px;line-height:16px}.DGiSta_markOn{border-color:var(--dsw-alias-state-business-primary);color:var(--dsw-alias-state-business-primary)}.DGiSta_markOff{border-color:var(--dsw-alias-border-l4);color:var(--dsw-alias-label-caption)}.DGiSta_markDanger{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.DGiSta_cardEnd{flex:none;align-items:center;gap:8px;display:flex}.DGiSta_switch{background:var(--dsw-alias-border-l3);cursor:pointer;border:none;border-radius:10px;width:36px;height:20px;transition:background .12s;position:relative}.DGiSta_switch:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.DGiSta_switchOn{background:var(--dsw-alias-state-success-primary)}.DGiSta_switch:after{content:\"\";background:var(--dsw-alias-bg-layer-1);border-radius:50%;width:16px;height:16px;transition:transform .12s;position:absolute;top:2px;left:2px}.DGiSta_switchOn:after{transform:translate(16px)}.DGiSta_dialog{width:min(560px,100%)}.DGiSta_form{flex-direction:column;gap:12px;display:flex}.DGiSta_field{flex-direction:column;gap:4px;display:flex}.DGiSta_fieldLabel{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.DGiSta_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);height:32px;color:var(--dsw-alias-label-primary);background:0 0;border-radius:8px;padding:0 10px;font-size:13px}.DGiSta_textarea{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);min-height:80px;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-markdown-code-block-small);resize:vertical;background:0 0;border-radius:8px;padding:8px 10px;font-size:12px}.DGiSta_status{text-align:center;color:var(--dsw-alias-label-tertiary);padding:32px 0;font-size:13px}.DGiSta_statusError{color:var(--dsw-alias-state-error-primary)}";
|
|
12
12
|
const tagId = "@sparkelf/dsh-client-ui-skill-center/SkillCenterPage.module.css";
|
|
@@ -59,7 +59,7 @@ window.__ModuleLoader__.load({
|
|
|
59
59
|
"workspaceBadge": "DGiSta_workspaceBadge"
|
|
60
60
|
};
|
|
61
61
|
//#endregion
|
|
62
|
-
//#region
|
|
62
|
+
//#region lib/types/client/api.js
|
|
63
63
|
/**
|
|
64
64
|
* Skill center API client. Talks to the host route family over same-origin
|
|
65
65
|
* fetch; the host owns the trust fence.
|
|
@@ -131,7 +131,7 @@ window.__ModuleLoader__.load({
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
//#endregion
|
|
134
|
-
//#region
|
|
134
|
+
//#region lib/types/client/SkillCenterPage.js
|
|
135
135
|
/**
|
|
136
136
|
* Skill center page. Browses the loaded skills grouped by source, toggles model
|
|
137
137
|
* invocation, creates a skill, and deletes one into a recoverable trash.
|
|
@@ -147,9 +147,9 @@ window.__ModuleLoader__.load({
|
|
|
147
147
|
* @returns the labelled field.
|
|
148
148
|
*/
|
|
149
149
|
function DraftField({ label, children }) {
|
|
150
|
-
return
|
|
150
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
151
151
|
className: SkillCenterPage_module_css_default.field,
|
|
152
|
-
children: [
|
|
152
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
153
153
|
className: SkillCenterPage_module_css_default.fieldLabel,
|
|
154
154
|
children: label
|
|
155
155
|
}), children]
|
|
@@ -161,45 +161,45 @@ window.__ModuleLoader__.load({
|
|
|
161
161
|
* @returns the row.
|
|
162
162
|
*/
|
|
163
163
|
function SkillCard({ skill, t, onToggle, onDelete }) {
|
|
164
|
-
return
|
|
164
|
+
return (0, react_jsx_runtime.jsx)("li", {
|
|
165
165
|
className: skill.isActiveWorkspace === false && skill.workspaceName !== void 0 ? SkillCenterPage_module_css_default.card + " " + SkillCenterPage_module_css_default.cardForeign : SkillCenterPage_module_css_default.card,
|
|
166
|
-
children:
|
|
166
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
167
167
|
className: SkillCenterPage_module_css_default.cardHead,
|
|
168
168
|
children: [
|
|
169
|
-
|
|
169
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
170
170
|
className: SkillCenterPage_module_css_default.cardIcon,
|
|
171
|
-
children:
|
|
171
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSkillOutlineRegular, { size: 22 })
|
|
172
172
|
}),
|
|
173
|
-
|
|
173
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
174
174
|
className: SkillCenterPage_module_css_default.cardMain,
|
|
175
175
|
children: [
|
|
176
|
-
|
|
176
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
177
177
|
className: SkillCenterPage_module_css_default.cardTitle,
|
|
178
|
-
children: [skill.name, skill.workspaceName === void 0 ? null :
|
|
178
|
+
children: [skill.name, skill.workspaceName === void 0 ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
179
179
|
className: SkillCenterPage_module_css_default.workspaceBadge,
|
|
180
180
|
children: skill.workspaceName
|
|
181
181
|
})]
|
|
182
182
|
}),
|
|
183
|
-
|
|
183
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
184
184
|
className: SkillCenterPage_module_css_default.cardDesc,
|
|
185
185
|
children: skill.description
|
|
186
186
|
}),
|
|
187
|
-
skill.whenToUse === void 0 ? null :
|
|
187
|
+
skill.whenToUse === void 0 ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
188
188
|
className: SkillCenterPage_module_css_default.cardWhenToUse,
|
|
189
189
|
children: skill.whenToUse
|
|
190
190
|
}),
|
|
191
|
-
|
|
191
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
192
192
|
className: SkillCenterPage_module_css_default.cardMarks,
|
|
193
193
|
children: [
|
|
194
|
-
|
|
194
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
195
195
|
className: skill.modelInvocable ? SkillCenterPage_module_css_default.mark + " " + SkillCenterPage_module_css_default.markOn : SkillCenterPage_module_css_default.mark + " " + SkillCenterPage_module_css_default.markOff,
|
|
196
196
|
children: t("skill.modelInvocable")
|
|
197
197
|
}),
|
|
198
|
-
|
|
198
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
199
199
|
className: skill.userInvocable ? SkillCenterPage_module_css_default.mark + " " + SkillCenterPage_module_css_default.markOn : SkillCenterPage_module_css_default.mark + " " + SkillCenterPage_module_css_default.markOff,
|
|
200
200
|
children: t("skill.userInvocable")
|
|
201
201
|
}),
|
|
202
|
-
skill.linked === true ?
|
|
202
|
+
skill.linked === true ? (0, react_jsx_runtime.jsx)("span", {
|
|
203
203
|
className: SkillCenterPage_module_css_default.mark + " " + SkillCenterPage_module_css_default.markDanger,
|
|
204
204
|
children: t("skill.linked")
|
|
205
205
|
}) : null
|
|
@@ -207,9 +207,9 @@ window.__ModuleLoader__.load({
|
|
|
207
207
|
})
|
|
208
208
|
]
|
|
209
209
|
}),
|
|
210
|
-
|
|
210
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
211
211
|
className: SkillCenterPage_module_css_default.cardEnd,
|
|
212
|
-
children: [
|
|
212
|
+
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
213
213
|
type: "button",
|
|
214
214
|
className: skill.modelInvocable ? SkillCenterPage_module_css_default.switch + " " + SkillCenterPage_module_css_default.switchOn : SkillCenterPage_module_css_default.switch,
|
|
215
215
|
"aria-label": skill.modelInvocable ? t("skill.disabled") : t("skill.enabled"),
|
|
@@ -217,7 +217,7 @@ window.__ModuleLoader__.load({
|
|
|
217
217
|
onClick: () => {
|
|
218
218
|
onToggle(skill, !skill.modelInvocable);
|
|
219
219
|
}
|
|
220
|
-
}), skill.path === void 0 || skill.linked === true ? null :
|
|
220
|
+
}), skill.path === void 0 || skill.linked === true ? null : (0, react_jsx_runtime.jsx)("button", {
|
|
221
221
|
type: "button",
|
|
222
222
|
className: SkillCenterPage_module_css_default.button,
|
|
223
223
|
onClick: () => {
|
|
@@ -344,20 +344,20 @@ window.__ModuleLoader__.load({
|
|
|
344
344
|
load
|
|
345
345
|
]);
|
|
346
346
|
const total = state.kind === "ready" ? state.payload.groups.reduce((n, g) => n + g.skills.length, 0) : 0;
|
|
347
|
-
return
|
|
347
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
348
348
|
className: SkillCenterPage_module_css_default.page,
|
|
349
349
|
children: [
|
|
350
|
-
|
|
350
|
+
(0, react_jsx_runtime.jsxs)("header", {
|
|
351
351
|
className: SkillCenterPage_module_css_default.pageHead,
|
|
352
|
-
children: [
|
|
352
|
+
children: [(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("h1", {
|
|
353
353
|
className: SkillCenterPage_module_css_default.pageTitle,
|
|
354
354
|
children: t("panel")
|
|
355
|
-
}),
|
|
355
|
+
}), (0, react_jsx_runtime.jsx)("p", {
|
|
356
356
|
className: SkillCenterPage_module_css_default.pageIntro,
|
|
357
357
|
children: t("panel.intro")
|
|
358
|
-
})] }),
|
|
358
|
+
})] }), (0, react_jsx_runtime.jsxs)("div", {
|
|
359
359
|
className: SkillCenterPage_module_css_default.toolbar,
|
|
360
|
-
children: [
|
|
360
|
+
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
361
361
|
type: "button",
|
|
362
362
|
className: SkillCenterPage_module_css_default.iconButton,
|
|
363
363
|
"aria-label": t("action.refresh"),
|
|
@@ -365,15 +365,15 @@ window.__ModuleLoader__.load({
|
|
|
365
365
|
onClick: () => {
|
|
366
366
|
load();
|
|
367
367
|
},
|
|
368
|
-
children:
|
|
368
|
+
children: (0, react_jsx_runtime.jsx)("span", {
|
|
369
369
|
className: SkillCenterPage_module_css_default.iconWrap,
|
|
370
370
|
"aria-hidden": "true",
|
|
371
|
-
children:
|
|
371
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {})
|
|
372
372
|
})
|
|
373
|
-
}),
|
|
373
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
374
374
|
variant: "primary",
|
|
375
375
|
size: "sm",
|
|
376
|
-
icon:
|
|
376
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutlineRegular, { size: 13 }),
|
|
377
377
|
onClick: () => {
|
|
378
378
|
setCreating((v) => !v);
|
|
379
379
|
},
|
|
@@ -381,7 +381,7 @@ window.__ModuleLoader__.load({
|
|
|
381
381
|
})]
|
|
382
382
|
})]
|
|
383
383
|
}),
|
|
384
|
-
|
|
384
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
385
385
|
open: creating,
|
|
386
386
|
onClose: () => {
|
|
387
387
|
setCreating(false);
|
|
@@ -389,58 +389,58 @@ window.__ModuleLoader__.load({
|
|
|
389
389
|
title: t("create.title"),
|
|
390
390
|
closeLabel: t("action.cancel"),
|
|
391
391
|
className: SkillCenterPage_module_css_default.dialog,
|
|
392
|
-
footer:
|
|
392
|
+
footer: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
393
393
|
variant: "outline",
|
|
394
394
|
autoFocus: true,
|
|
395
395
|
onClick: () => {
|
|
396
396
|
setCreating(false);
|
|
397
397
|
},
|
|
398
398
|
children: t("action.cancel")
|
|
399
|
-
}),
|
|
399
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
400
400
|
variant: "primary",
|
|
401
401
|
onClick: () => {
|
|
402
402
|
submit();
|
|
403
403
|
},
|
|
404
404
|
children: t("action.confirm")
|
|
405
405
|
})] }),
|
|
406
|
-
children:
|
|
406
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
407
407
|
className: SkillCenterPage_module_css_default.form,
|
|
408
408
|
children: [
|
|
409
|
-
|
|
409
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
410
410
|
label: t("create.name"),
|
|
411
|
-
children:
|
|
411
|
+
children: (0, react_jsx_runtime.jsx)("input", {
|
|
412
412
|
className: SkillCenterPage_module_css_default.input,
|
|
413
413
|
value: draft.name,
|
|
414
414
|
onChange: set("name")
|
|
415
415
|
})
|
|
416
416
|
}),
|
|
417
|
-
|
|
417
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
418
418
|
label: t("create.description"),
|
|
419
|
-
children:
|
|
419
|
+
children: (0, react_jsx_runtime.jsx)("input", {
|
|
420
420
|
className: SkillCenterPage_module_css_default.input,
|
|
421
421
|
value: draft.description,
|
|
422
422
|
onChange: set("description")
|
|
423
423
|
})
|
|
424
424
|
}),
|
|
425
|
-
|
|
425
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
426
426
|
label: t("create.whenToUse"),
|
|
427
|
-
children:
|
|
427
|
+
children: (0, react_jsx_runtime.jsx)("input", {
|
|
428
428
|
className: SkillCenterPage_module_css_default.input,
|
|
429
429
|
value: draft.whenToUse,
|
|
430
430
|
onChange: set("whenToUse")
|
|
431
431
|
})
|
|
432
432
|
}),
|
|
433
|
-
|
|
433
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
434
434
|
label: t("create.content"),
|
|
435
|
-
children:
|
|
435
|
+
children: (0, react_jsx_runtime.jsx)("textarea", {
|
|
436
436
|
className: SkillCenterPage_module_css_default.textarea,
|
|
437
437
|
value: draft.content,
|
|
438
438
|
onChange: set("content")
|
|
439
439
|
})
|
|
440
440
|
}),
|
|
441
|
-
|
|
441
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
442
442
|
label: t("create.root"),
|
|
443
|
-
children:
|
|
443
|
+
children: (0, react_jsx_runtime.jsxs)("select", {
|
|
444
444
|
className: SkillCenterPage_module_css_default.input,
|
|
445
445
|
value: draft.root,
|
|
446
446
|
onChange: (e) => {
|
|
@@ -449,10 +449,10 @@ window.__ModuleLoader__.load({
|
|
|
449
449
|
root: e.target.value === "project" ? "project" : "user"
|
|
450
450
|
}));
|
|
451
451
|
},
|
|
452
|
-
children: [
|
|
452
|
+
children: [(0, react_jsx_runtime.jsx)("option", {
|
|
453
453
|
value: "user",
|
|
454
454
|
children: t("create.rootUser")
|
|
455
|
-
}),
|
|
455
|
+
}), (0, react_jsx_runtime.jsx)("option", {
|
|
456
456
|
value: "project",
|
|
457
457
|
children: t("create.rootProject")
|
|
458
458
|
})]
|
|
@@ -461,7 +461,7 @@ window.__ModuleLoader__.load({
|
|
|
461
461
|
]
|
|
462
462
|
})
|
|
463
463
|
}),
|
|
464
|
-
|
|
464
|
+
(0, react_jsx_runtime.jsx)("input", {
|
|
465
465
|
className: SkillCenterPage_module_css_default.search,
|
|
466
466
|
placeholder: t("search.placeholder"),
|
|
467
467
|
value: query,
|
|
@@ -469,11 +469,11 @@ window.__ModuleLoader__.load({
|
|
|
469
469
|
setQuery(e.target.value);
|
|
470
470
|
}
|
|
471
471
|
}),
|
|
472
|
-
state.kind === "loading" ?
|
|
472
|
+
state.kind === "loading" ? (0, react_jsx_runtime.jsx)("div", {
|
|
473
473
|
className: SkillCenterPage_module_css_default.status,
|
|
474
474
|
children: t("state.loading")
|
|
475
475
|
}) : null,
|
|
476
|
-
state.kind === "failed" ?
|
|
476
|
+
state.kind === "failed" ? (0, react_jsx_runtime.jsxs)("div", {
|
|
477
477
|
className: SkillCenterPage_module_css_default.status + " " + SkillCenterPage_module_css_default.statusError,
|
|
478
478
|
children: [
|
|
479
479
|
t("state.failed"),
|
|
@@ -481,32 +481,32 @@ window.__ModuleLoader__.load({
|
|
|
481
481
|
state.message
|
|
482
482
|
]
|
|
483
483
|
}) : null,
|
|
484
|
-
state.kind === "ready" && groups.length === 0 ?
|
|
484
|
+
state.kind === "ready" && groups.length === 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
485
485
|
className: SkillCenterPage_module_css_default.status,
|
|
486
486
|
children: query.trim() === "" ? t("state.empty") : t("search.noMatches")
|
|
487
487
|
}) : null,
|
|
488
|
-
state.kind === "ready" && groups.length > 0 && total === 0 ?
|
|
488
|
+
state.kind === "ready" && groups.length > 0 && total === 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
489
489
|
className: SkillCenterPage_module_css_default.status,
|
|
490
490
|
children: t("state.empty")
|
|
491
491
|
}) : null,
|
|
492
|
-
groups.map((group) =>
|
|
492
|
+
groups.map((group) => (0, react_jsx_runtime.jsxs)("div", {
|
|
493
493
|
className: SkillCenterPage_module_css_default.group,
|
|
494
|
-
children: [
|
|
494
|
+
children: [(0, react_jsx_runtime.jsxs)("h2", {
|
|
495
495
|
className: SkillCenterPage_module_css_default.groupTitle,
|
|
496
496
|
children: [
|
|
497
497
|
group.title,
|
|
498
|
-
|
|
498
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
499
499
|
className: SkillCenterPage_module_css_default.groupCount,
|
|
500
500
|
children: group.skills.length
|
|
501
501
|
}),
|
|
502
|
-
|
|
502
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
503
503
|
className: SkillCenterPage_module_css_default.groupHint,
|
|
504
504
|
children: group.hint
|
|
505
505
|
})
|
|
506
506
|
]
|
|
507
|
-
}),
|
|
507
|
+
}), (0, react_jsx_runtime.jsx)("ul", {
|
|
508
508
|
className: SkillCenterPage_module_css_default.cards,
|
|
509
|
-
children: group.skills.map((skill) =>
|
|
509
|
+
children: group.skills.map((skill) => (0, react_jsx_runtime.jsx)(SkillCard, {
|
|
510
510
|
skill,
|
|
511
511
|
t,
|
|
512
512
|
onToggle: (s, enabled) => {
|
|
@@ -523,17 +523,23 @@ window.__ModuleLoader__.load({
|
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
//#endregion
|
|
526
|
-
//#region
|
|
526
|
+
//#region lib/types/client/SkillCenterPanelIcon.js
|
|
527
527
|
/**
|
|
528
528
|
* Render the glyph at the size the sidebar asks for.
|
|
529
529
|
* @param props - the sidebar's icon share: requested edge and selected state.
|
|
530
530
|
* @returns the icon element.
|
|
531
531
|
*/
|
|
532
532
|
function SkillCenterPanelIcon({ size }) {
|
|
533
|
-
return
|
|
533
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSkillOutlineRegular, { size });
|
|
534
534
|
}
|
|
535
535
|
//#endregion
|
|
536
|
-
//#region
|
|
536
|
+
//#region lib/types/client/locales.js
|
|
537
|
+
/**
|
|
538
|
+
* Skill center dictionaries. Keys are typed so the panel and the sidebar entry
|
|
539
|
+
* cannot reference a string that does not exist in both languages.
|
|
540
|
+
*
|
|
541
|
+
* @module @sparkelf/dsh-client-ui-skill-center/client/locales
|
|
542
|
+
*/
|
|
537
543
|
/** Simplified Chinese dictionary. */
|
|
538
544
|
const zh = {
|
|
539
545
|
"panel": "技能中心",
|
|
@@ -595,7 +601,7 @@ window.__ModuleLoader__.load({
|
|
|
595
601
|
"delete.confirm": "Deleting moves it into .trash, where it can be restored. Delete?"
|
|
596
602
|
};
|
|
597
603
|
//#endregion
|
|
598
|
-
//#region
|
|
604
|
+
//#region lib/types/client/index.js
|
|
599
605
|
/** Dictionary namespace owned by this plugin. */
|
|
600
606
|
const NS = "skillCenter";
|
|
601
607
|
/** The id shared by the sidebar entry and the main panel it opens. */
|
package/package.json
CHANGED