@qilin-agent/client-ui-sidebar-files 3.1.4 → 3.1.6
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 +17 -5
- package/package.json +17 -17
package/lib/client.js
CHANGED
|
@@ -604,6 +604,7 @@ window.__ModuleLoader__.load({
|
|
|
604
604
|
}
|
|
605
605
|
settling.set(tabId, setTimeout(() => {
|
|
606
606
|
settling.delete(tabId);
|
|
607
|
+
/* v8 ignore next -- a superseded timer is always cleared before it fires. */
|
|
607
608
|
if (queryGenerations.get(tabId) !== generation) return;
|
|
608
609
|
actions.searchRunning(tabId, query);
|
|
609
610
|
searchNames(sessionId, needle, signal).then((result) => {
|
|
@@ -1508,7 +1509,7 @@ window.__ModuleLoader__.load({
|
|
|
1508
1509
|
}
|
|
1509
1510
|
//#endregion
|
|
1510
1511
|
//#region \0qilin-css:/home/runner/work/QiLin/QiLin/packages/client/ui-sidebar-files/src/client/UploadOverlay.module.css.mjs
|
|
1511
|
-
const css$2 = ".
|
|
1512
|
+
const css$2 = ".UTlBNa_host{flex-direction:column;height:100%;min-height:0;display:flex;position:relative}.UTlBNa_overlay{z-index:10;border:2px dashed var(--qilin-alias-text-link,currentColor);border-radius:var(--qilin-radius-lg,10px);background:var(--qilin-alias-scrim,#0000004d);pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.UTlBNa_hint{color:var(--qilin-alias-text-primary,white);font-size:14px}.UTlBNa_report{flex-direction:column;gap:2px;padding:4px 12px;font-size:12px;display:flex}.UTlBNa_ok{color:var(--qilin-alias-state-success-primary,inherit)}.UTlBNa_fail{color:var(--qilin-alias-state-error-primary,inherit)}.UTlBNa_done{color:var(--qilin-alias-label-tertiary,inherit);font-size:11px}";
|
|
1512
1513
|
const tagId$1 = "@qilin-agent/client-ui-sidebar-files/UploadOverlay.module.css";
|
|
1513
1514
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
1514
1515
|
const tag = document.createElement("style");
|
|
@@ -1518,10 +1519,10 @@ window.__ModuleLoader__.load({
|
|
|
1518
1519
|
document.head.appendChild(tag);
|
|
1519
1520
|
}
|
|
1520
1521
|
var UploadOverlay_module_css_default = {
|
|
1521
|
-
"active": "UTlBNa_active",
|
|
1522
1522
|
"done": "UTlBNa_done",
|
|
1523
1523
|
"fail": "UTlBNa_fail",
|
|
1524
1524
|
"hint": "UTlBNa_hint",
|
|
1525
|
+
"host": "UTlBNa_host",
|
|
1525
1526
|
"ok": "UTlBNa_ok",
|
|
1526
1527
|
"overlay": "UTlBNa_overlay",
|
|
1527
1528
|
"report": "UTlBNa_report"
|
|
@@ -1543,6 +1544,17 @@ window.__ModuleLoader__.load({
|
|
|
1543
1544
|
/** The per-file byte ceiling mirrors the host route's mediaLimitBytes default. */
|
|
1544
1545
|
const UPLOAD_LIMIT_BYTES = 20 * 1024 * 1024;
|
|
1545
1546
|
/**
|
|
1547
|
+
* One line of the completion report: the file's name, and for a failure its reason.
|
|
1548
|
+
* @param result - one attempted file.
|
|
1549
|
+
* @param failedLabel - localized copy for a failure that names no reason.
|
|
1550
|
+
* @returns the report line.
|
|
1551
|
+
*/
|
|
1552
|
+
function reportLine(result, failedLabel) {
|
|
1553
|
+
if (result.ok) return result.name;
|
|
1554
|
+
/* v8 ignore next -- no caller constructs a failed outcome without a detail. */
|
|
1555
|
+
return `${result.name}: ${result.detail ?? failedLabel}`;
|
|
1556
|
+
}
|
|
1557
|
+
/**
|
|
1546
1558
|
* Wrap one file tree with a drag-and-drop upload overlay.
|
|
1547
1559
|
* @param props - session identity, displayed root, reload callback, copy.
|
|
1548
1560
|
* @returns the overlay that mounts over the tree while a drag is active.
|
|
@@ -1628,7 +1640,7 @@ window.__ModuleLoader__.load({
|
|
|
1628
1640
|
if (files.length > 0) upload(files);
|
|
1629
1641
|
};
|
|
1630
1642
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
1631
|
-
className:
|
|
1643
|
+
className: UploadOverlay_module_css_default.host,
|
|
1632
1644
|
onDragEnter,
|
|
1633
1645
|
onDragLeave,
|
|
1634
1646
|
onDragOver,
|
|
@@ -1646,9 +1658,9 @@ window.__ModuleLoader__.load({
|
|
|
1646
1658
|
results !== null && (0, react_jsx_runtime.jsxs)("div", {
|
|
1647
1659
|
className: UploadOverlay_module_css_default.report,
|
|
1648
1660
|
"data-files-upload-report": true,
|
|
1649
|
-
children: [results.map((result) => (0, react_jsx_runtime.
|
|
1661
|
+
children: [results.map((result) => (0, react_jsx_runtime.jsx)("span", {
|
|
1650
1662
|
className: result.ok ? UploadOverlay_module_css_default.ok : UploadOverlay_module_css_default.fail,
|
|
1651
|
-
children:
|
|
1663
|
+
children: reportLine(result, t("upload.failed"))
|
|
1652
1664
|
}, result.name)), (0, react_jsx_runtime.jsx)("span", {
|
|
1653
1665
|
className: UploadOverlay_module_css_default.done,
|
|
1654
1666
|
children: t("upload.done", { count: String(results.filter((r) => r.ok).length) })
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/client-ui-sidebar-files",
|
|
3
3
|
"description": "Workspace file tree tab type for the right Sidebar: lazy directory listing over the workspaceFiles Remote namespace, opening files into the Sidebar",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.6",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@qilin-agent/kylin": "~4.0.
|
|
44
|
+
"@qilin-agent/kylin": "~4.0.5"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@codemirror/commands": "^6.11.0",
|
|
@@ -69,21 +69,21 @@
|
|
|
69
69
|
"clsx": "^2.0.0",
|
|
70
70
|
"react": "^18.2.0",
|
|
71
71
|
"react-dom": "^18.2.0",
|
|
72
|
-
"@qilin-agent/kylin": "~4.0.
|
|
73
|
-
"@qilin-agent/api-
|
|
74
|
-
"@qilin-agent/
|
|
75
|
-
"@qilin-agent/
|
|
76
|
-
"@qilin-agent/client-
|
|
77
|
-
"@qilin-agent/client-
|
|
78
|
-
"@qilin-agent/client-ui-dockkit": "3.1.
|
|
79
|
-
"@qilin-agent/client-ui-
|
|
80
|
-
"@qilin-agent/client-ui-
|
|
81
|
-
"@qilin-agent/client-ui-
|
|
82
|
-
"@qilin-agent/client-ui-
|
|
83
|
-
"@qilin-agent/client-ui-
|
|
84
|
-
"@qilin-agent/util-workspace-path": "3.1.
|
|
85
|
-
"@qilin-agent/client-ui-
|
|
86
|
-
"@qilin-agent/session": "3.1.
|
|
72
|
+
"@qilin-agent/kylin": "~4.0.5",
|
|
73
|
+
"@qilin-agent/api-remotes": "3.1.6",
|
|
74
|
+
"@qilin-agent/client-locale": "3.1.6",
|
|
75
|
+
"@qilin-agent/api-workspace-files": "3.1.6",
|
|
76
|
+
"@qilin-agent/client-store": "3.1.6",
|
|
77
|
+
"@qilin-agent/client-test-runtime": "3.1.6",
|
|
78
|
+
"@qilin-agent/client-ui-dockkit": "3.1.6",
|
|
79
|
+
"@qilin-agent/client-ui-primitives": "3.1.6",
|
|
80
|
+
"@qilin-agent/client-ui-renderer": "3.1.6",
|
|
81
|
+
"@qilin-agent/client-ui-sidebar-right": "3.1.6",
|
|
82
|
+
"@qilin-agent/client-ui-sidebar-documentpreview": "3.1.6",
|
|
83
|
+
"@qilin-agent/client-ui-session": "3.1.6",
|
|
84
|
+
"@qilin-agent/util-workspace-path": "3.1.6",
|
|
85
|
+
"@qilin-agent/client-ui-slots": "3.1.6",
|
|
86
|
+
"@qilin-agent/session": "3.1.6"
|
|
87
87
|
},
|
|
88
88
|
"files": [
|
|
89
89
|
"lib/index.js",
|