dsh-deeppilot 0.9.13 → 0.9.14
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/COMPATIBILITY.md +113 -19
- package/README.md +18 -19
- package/README.zh-CN.md +16 -16
- package/bin/SHA256SUMS +6 -6
- package/bin/darwin-amd64/dsh-deeppilot-tunnel +0 -0
- package/bin/darwin-arm64/dsh-deeppilot-tunnel +0 -0
- package/bin/linux-amd64/dsh-deeppilot-tunnel +0 -0
- package/bin/linux-arm64/dsh-deeppilot-tunnel +0 -0
- package/bin/windows-amd64/dsh-deeppilot-tunnel.exe +0 -0
- package/bin/windows-arm64/dsh-deeppilot-tunnel.exe +0 -0
- package/docs/DSH_022_FEATURES.md +38 -3
- package/docs/DSH_RELEASE_MEMORY.md +158 -2
- package/docs/NPM_PUBLISHING.md +33 -1
- package/lib/client.js +91 -93
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +305 -33
- package/lib/index.js +1611 -162
- package/lib/index.js.map +1 -1
- package/locale/en.json +2 -1
- package/locale/zh.json +2 -1
- package/package.json +22 -22
package/lib/client.js
CHANGED
|
@@ -4,14 +4,14 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
-
|
|
7
|
+
// \0rolldown/runtime.js
|
|
8
8
|
var __create = Object.create;
|
|
9
9
|
var __defProp = Object.defineProperty;
|
|
10
10
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
11
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
12
12
|
var __getProtoOf = Object.getPrototypeOf;
|
|
13
13
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
14
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
15
15
|
var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
17
17
|
key = keys[i];
|
|
@@ -26,9 +26,8 @@ window.__ModuleLoader__.load({
|
|
|
26
26
|
value: mod,
|
|
27
27
|
enumerable: true
|
|
28
28
|
}) : target, mod));
|
|
29
|
-
//#endregion
|
|
30
29
|
let react = require("react");
|
|
31
|
-
|
|
30
|
+
// src/client/snapshot-store.ts
|
|
32
31
|
function createSnapshotStore(initial) {
|
|
33
32
|
let snapshot = initial;
|
|
34
33
|
const listeners = /* @__PURE__ */ new Set();
|
|
@@ -45,8 +44,7 @@ window.__ModuleLoader__.load({
|
|
|
45
44
|
}
|
|
46
45
|
};
|
|
47
46
|
}
|
|
48
|
-
|
|
49
|
-
//#region src/tailscale-version.ts
|
|
47
|
+
// src/tailscale-version.ts
|
|
50
48
|
/**
|
|
51
49
|
* 内嵌 helper 上报的 tailscale.com 模块版本。
|
|
52
50
|
*
|
|
@@ -69,8 +67,7 @@ window.__ModuleLoader__.load({
|
|
|
69
67
|
function isTailscaleVersion(value) {
|
|
70
68
|
return typeof value === "string" && value.length <= MAX_TAILSCALE_VERSION_LENGTH && TAILSCALE_VERSION_PATTERN.test(value);
|
|
71
69
|
}
|
|
72
|
-
|
|
73
|
-
//#region src/device-auth.ts
|
|
70
|
+
// src/device-auth.ts
|
|
74
71
|
const DEVICE_SCOPES = [
|
|
75
72
|
"sessions.read",
|
|
76
73
|
"prompt.send",
|
|
@@ -85,8 +82,7 @@ window.__ModuleLoader__.load({
|
|
|
85
82
|
const allowed = new Set(DEVICE_SCOPES);
|
|
86
83
|
return [...new Set(value.filter((scope) => typeof scope === "string" && allowed.has(scope)))];
|
|
87
84
|
}
|
|
88
|
-
|
|
89
|
-
//#region src/report-wire.ts
|
|
85
|
+
// src/report-wire.ts
|
|
90
86
|
/** The npm package identity both contribution registrations claim. */
|
|
91
87
|
const REPORT_REMOTE_PACKAGE = "dsh-deeppilot";
|
|
92
88
|
/** Canonical `<namespace>/<method>` endpoint of the report Remote. */
|
|
@@ -464,8 +460,7 @@ window.__ModuleLoader__.load({
|
|
|
464
460
|
}
|
|
465
461
|
]
|
|
466
462
|
};
|
|
467
|
-
|
|
468
|
-
//#region src/client/report-mount.ts
|
|
463
|
+
// src/client/report-mount.ts
|
|
469
464
|
/** Mount the contribution and resolve the namespace service it installs. */
|
|
470
465
|
async function mountReportRemote(remote, resolveNamespace) {
|
|
471
466
|
const dispose = await remote.$mount(REPORT_REMOTE_CONTRIBUTION);
|
|
@@ -479,8 +474,7 @@ window.__ModuleLoader__.load({
|
|
|
479
474
|
dispose
|
|
480
475
|
};
|
|
481
476
|
}
|
|
482
|
-
|
|
483
|
-
//#region src/client/i18n.ts
|
|
477
|
+
// src/client/i18n.ts
|
|
484
478
|
/** Single namespace shared with the host's locale registry, so other
|
|
485
479
|
* host-side modules (if any) can translate the same keys. */
|
|
486
480
|
const DEEPPILOT_LOCALE_NS = "settings.deeppilot";
|
|
@@ -1066,8 +1060,7 @@ window.__ModuleLoader__.load({
|
|
|
1066
1060
|
en: TABLES.en
|
|
1067
1061
|
});
|
|
1068
1062
|
}
|
|
1069
|
-
|
|
1070
|
-
//#region src/client/styles.ts
|
|
1063
|
+
// src/client/styles.ts
|
|
1071
1064
|
const EASE = "cubic-bezier(0.22,1,0.36,1)";
|
|
1072
1065
|
const CSS = [
|
|
1073
1066
|
".pbb-section{container:pbb/inline-size;max-width:760px;color:var(--dsw-alias-label-primary);font-size:14px;line-height:1.5;display:flex;flex-direction:column;gap:16px}",
|
|
@@ -1259,15 +1252,13 @@ window.__ModuleLoader__.load({
|
|
|
1259
1252
|
tag.textContent = CSS;
|
|
1260
1253
|
document.head.appendChild(tag);
|
|
1261
1254
|
}
|
|
1262
|
-
|
|
1263
|
-
//#region node_modules/qrcode/lib/can-promise.js
|
|
1255
|
+
// node_modules/qrcode/lib/can-promise.js
|
|
1264
1256
|
var require_can_promise = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1265
1257
|
module.exports = function() {
|
|
1266
1258
|
return typeof Promise === "function" && Promise.prototype && Promise.prototype.then;
|
|
1267
1259
|
};
|
|
1268
1260
|
}));
|
|
1269
|
-
|
|
1270
|
-
//#region node_modules/qrcode/lib/core/utils.js
|
|
1261
|
+
// node_modules/qrcode/lib/core/utils.js
|
|
1271
1262
|
var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1272
1263
|
let toSJISFunction;
|
|
1273
1264
|
const CODEWORDS_COUNT = [
|
|
@@ -1358,8 +1349,7 @@ window.__ModuleLoader__.load({
|
|
|
1358
1349
|
return toSJISFunction(kanji);
|
|
1359
1350
|
};
|
|
1360
1351
|
}));
|
|
1361
|
-
|
|
1362
|
-
//#region node_modules/qrcode/lib/core/error-correction-level.js
|
|
1352
|
+
// node_modules/qrcode/lib/core/error-correction-level.js
|
|
1363
1353
|
var require_error_correction_level = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1364
1354
|
exports.L = { bit: 1 };
|
|
1365
1355
|
exports.M = { bit: 0 };
|
|
@@ -1391,8 +1381,7 @@ window.__ModuleLoader__.load({
|
|
|
1391
1381
|
}
|
|
1392
1382
|
};
|
|
1393
1383
|
}));
|
|
1394
|
-
|
|
1395
|
-
//#region node_modules/qrcode/lib/core/bit-buffer.js
|
|
1384
|
+
// node_modules/qrcode/lib/core/bit-buffer.js
|
|
1396
1385
|
var require_bit_buffer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1397
1386
|
function BitBuffer() {
|
|
1398
1387
|
this.buffer = [];
|
|
@@ -1418,8 +1407,7 @@ window.__ModuleLoader__.load({
|
|
|
1418
1407
|
};
|
|
1419
1408
|
module.exports = BitBuffer;
|
|
1420
1409
|
}));
|
|
1421
|
-
|
|
1422
|
-
//#region node_modules/qrcode/lib/core/bit-matrix.js
|
|
1410
|
+
// node_modules/qrcode/lib/core/bit-matrix.js
|
|
1423
1411
|
var require_bit_matrix = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1424
1412
|
/**
|
|
1425
1413
|
* Helper class to handle QR Code symbol modules
|
|
@@ -1479,8 +1467,7 @@ window.__ModuleLoader__.load({
|
|
|
1479
1467
|
};
|
|
1480
1468
|
module.exports = BitMatrix;
|
|
1481
1469
|
}));
|
|
1482
|
-
|
|
1483
|
-
//#region node_modules/qrcode/lib/core/alignment-pattern.js
|
|
1470
|
+
// node_modules/qrcode/lib/core/alignment-pattern.js
|
|
1484
1471
|
var require_alignment_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1485
1472
|
/**
|
|
1486
1473
|
* Alignment pattern are fixed reference pattern in defined positions
|
|
@@ -1547,8 +1534,7 @@ window.__ModuleLoader__.load({
|
|
|
1547
1534
|
return coords;
|
|
1548
1535
|
};
|
|
1549
1536
|
}));
|
|
1550
|
-
|
|
1551
|
-
//#region node_modules/qrcode/lib/core/finder-pattern.js
|
|
1537
|
+
// node_modules/qrcode/lib/core/finder-pattern.js
|
|
1552
1538
|
var require_finder_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1553
1539
|
const getSymbolSize = require_utils$1().getSymbolSize;
|
|
1554
1540
|
const FINDER_PATTERN_SIZE = 7;
|
|
@@ -1568,8 +1554,7 @@ window.__ModuleLoader__.load({
|
|
|
1568
1554
|
];
|
|
1569
1555
|
};
|
|
1570
1556
|
}));
|
|
1571
|
-
|
|
1572
|
-
//#region node_modules/qrcode/lib/core/mask-pattern.js
|
|
1557
|
+
// node_modules/qrcode/lib/core/mask-pattern.js
|
|
1573
1558
|
var require_mask_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1574
1559
|
/**
|
|
1575
1560
|
* Data mask pattern reference
|
|
@@ -1632,18 +1617,18 @@ window.__ModuleLoader__.load({
|
|
|
1632
1617
|
sameCountCol = sameCountRow = 0;
|
|
1633
1618
|
lastCol = lastRow = null;
|
|
1634
1619
|
for (let col = 0; col < size; col++) {
|
|
1635
|
-
let module
|
|
1636
|
-
if (module
|
|
1620
|
+
let module = data.get(row, col);
|
|
1621
|
+
if (module === lastCol) sameCountCol++;
|
|
1637
1622
|
else {
|
|
1638
1623
|
if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
|
|
1639
|
-
lastCol = module
|
|
1624
|
+
lastCol = module;
|
|
1640
1625
|
sameCountCol = 1;
|
|
1641
1626
|
}
|
|
1642
|
-
module
|
|
1643
|
-
if (module
|
|
1627
|
+
module = data.get(col, row);
|
|
1628
|
+
if (module === lastRow) sameCountRow++;
|
|
1644
1629
|
else {
|
|
1645
1630
|
if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
|
|
1646
|
-
lastRow = module
|
|
1631
|
+
lastRow = module;
|
|
1647
1632
|
sameCountRow = 1;
|
|
1648
1633
|
}
|
|
1649
1634
|
}
|
|
@@ -1759,8 +1744,7 @@ window.__ModuleLoader__.load({
|
|
|
1759
1744
|
return bestPattern;
|
|
1760
1745
|
};
|
|
1761
1746
|
}));
|
|
1762
|
-
|
|
1763
|
-
//#region node_modules/qrcode/lib/core/error-correction-code.js
|
|
1747
|
+
// node_modules/qrcode/lib/core/error-correction-code.js
|
|
1764
1748
|
var require_error_correction_code = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1765
1749
|
const ECLevel = require_error_correction_level();
|
|
1766
1750
|
const EC_BLOCKS_TABLE = [
|
|
@@ -2122,8 +2106,7 @@ window.__ModuleLoader__.load({
|
|
|
2122
2106
|
}
|
|
2123
2107
|
};
|
|
2124
2108
|
}));
|
|
2125
|
-
|
|
2126
|
-
//#region node_modules/qrcode/lib/core/galois-field.js
|
|
2109
|
+
// node_modules/qrcode/lib/core/galois-field.js
|
|
2127
2110
|
var require_galois_field = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2128
2111
|
const EXP_TABLE = /* @__PURE__ */ new Uint8Array(512);
|
|
2129
2112
|
const LOG_TABLE = /* @__PURE__ */ new Uint8Array(256);
|
|
@@ -2168,8 +2151,7 @@ window.__ModuleLoader__.load({
|
|
|
2168
2151
|
return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]];
|
|
2169
2152
|
};
|
|
2170
2153
|
}));
|
|
2171
|
-
|
|
2172
|
-
//#region node_modules/qrcode/lib/core/polynomial.js
|
|
2154
|
+
// node_modules/qrcode/lib/core/polynomial.js
|
|
2173
2155
|
var require_polynomial = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2174
2156
|
const GF = require_galois_field();
|
|
2175
2157
|
/**
|
|
@@ -2215,8 +2197,7 @@ window.__ModuleLoader__.load({
|
|
|
2215
2197
|
return poly;
|
|
2216
2198
|
};
|
|
2217
2199
|
}));
|
|
2218
|
-
|
|
2219
|
-
//#region node_modules/qrcode/lib/core/reed-solomon-encoder.js
|
|
2200
|
+
// node_modules/qrcode/lib/core/reed-solomon-encoder.js
|
|
2220
2201
|
var require_reed_solomon_encoder = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2221
2202
|
const Polynomial = require_polynomial();
|
|
2222
2203
|
function ReedSolomonEncoder(degree) {
|
|
@@ -2255,8 +2236,7 @@ window.__ModuleLoader__.load({
|
|
|
2255
2236
|
};
|
|
2256
2237
|
module.exports = ReedSolomonEncoder;
|
|
2257
2238
|
}));
|
|
2258
|
-
|
|
2259
|
-
//#region node_modules/qrcode/lib/core/version-check.js
|
|
2239
|
+
// node_modules/qrcode/lib/core/version-check.js
|
|
2260
2240
|
var require_version_check = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2261
2241
|
/**
|
|
2262
2242
|
* Check if QR Code version is valid
|
|
@@ -2268,8 +2248,7 @@ window.__ModuleLoader__.load({
|
|
|
2268
2248
|
return !isNaN(version) && version >= 1 && version <= 40;
|
|
2269
2249
|
};
|
|
2270
2250
|
}));
|
|
2271
|
-
|
|
2272
|
-
//#region node_modules/qrcode/lib/core/regex.js
|
|
2251
|
+
// node_modules/qrcode/lib/core/regex.js
|
|
2273
2252
|
var require_regex = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2274
2253
|
const numeric = "[0-9]+";
|
|
2275
2254
|
const alphanumeric = "[A-Z $%*+\\-./:]+";
|
|
@@ -2294,8 +2273,7 @@ window.__ModuleLoader__.load({
|
|
|
2294
2273
|
return TEST_ALPHANUMERIC.test(str);
|
|
2295
2274
|
};
|
|
2296
2275
|
}));
|
|
2297
|
-
|
|
2298
|
-
//#region node_modules/qrcode/lib/core/mode.js
|
|
2276
|
+
// node_modules/qrcode/lib/core/mode.js
|
|
2299
2277
|
var require_mode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2300
2278
|
const VersionCheck = require_version_check();
|
|
2301
2279
|
const Regex = require_regex();
|
|
@@ -2451,8 +2429,7 @@ window.__ModuleLoader__.load({
|
|
|
2451
2429
|
}
|
|
2452
2430
|
};
|
|
2453
2431
|
}));
|
|
2454
|
-
|
|
2455
|
-
//#region node_modules/qrcode/lib/core/version.js
|
|
2432
|
+
// node_modules/qrcode/lib/core/version.js
|
|
2456
2433
|
var require_version = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2457
2434
|
const Utils = require_utils$1();
|
|
2458
2435
|
const ECCode = require_error_correction_code();
|
|
@@ -2548,8 +2525,7 @@ window.__ModuleLoader__.load({
|
|
|
2548
2525
|
return version << 12 | d;
|
|
2549
2526
|
};
|
|
2550
2527
|
}));
|
|
2551
|
-
|
|
2552
|
-
//#region node_modules/qrcode/lib/core/format-info.js
|
|
2528
|
+
// node_modules/qrcode/lib/core/format-info.js
|
|
2553
2529
|
var require_format_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2554
2530
|
const Utils = require_utils$1();
|
|
2555
2531
|
const G15 = 1335;
|
|
@@ -2572,8 +2548,7 @@ window.__ModuleLoader__.load({
|
|
|
2572
2548
|
return (data << 10 | d) ^ G15_MASK;
|
|
2573
2549
|
};
|
|
2574
2550
|
}));
|
|
2575
|
-
|
|
2576
|
-
//#region node_modules/qrcode/lib/core/numeric-data.js
|
|
2551
|
+
// node_modules/qrcode/lib/core/numeric-data.js
|
|
2577
2552
|
var require_numeric_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2578
2553
|
const Mode = require_mode();
|
|
2579
2554
|
function NumericData(data) {
|
|
@@ -2605,8 +2580,7 @@ window.__ModuleLoader__.load({
|
|
|
2605
2580
|
};
|
|
2606
2581
|
module.exports = NumericData;
|
|
2607
2582
|
}));
|
|
2608
|
-
|
|
2609
|
-
//#region node_modules/qrcode/lib/core/alphanumeric-data.js
|
|
2583
|
+
// node_modules/qrcode/lib/core/alphanumeric-data.js
|
|
2610
2584
|
var require_alphanumeric_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2611
2585
|
const Mode = require_mode();
|
|
2612
2586
|
/**
|
|
@@ -2689,8 +2663,7 @@ window.__ModuleLoader__.load({
|
|
|
2689
2663
|
};
|
|
2690
2664
|
module.exports = AlphanumericData;
|
|
2691
2665
|
}));
|
|
2692
|
-
|
|
2693
|
-
//#region node_modules/qrcode/lib/core/byte-data.js
|
|
2666
|
+
// node_modules/qrcode/lib/core/byte-data.js
|
|
2694
2667
|
var require_byte_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2695
2668
|
const Mode = require_mode();
|
|
2696
2669
|
function ByteData(data) {
|
|
@@ -2712,8 +2685,7 @@ window.__ModuleLoader__.load({
|
|
|
2712
2685
|
};
|
|
2713
2686
|
module.exports = ByteData;
|
|
2714
2687
|
}));
|
|
2715
|
-
|
|
2716
|
-
//#region node_modules/qrcode/lib/core/kanji-data.js
|
|
2688
|
+
// node_modules/qrcode/lib/core/kanji-data.js
|
|
2717
2689
|
var require_kanji_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2718
2690
|
const Mode = require_mode();
|
|
2719
2691
|
const Utils = require_utils$1();
|
|
@@ -2743,8 +2715,7 @@ window.__ModuleLoader__.load({
|
|
|
2743
2715
|
};
|
|
2744
2716
|
module.exports = KanjiData;
|
|
2745
2717
|
}));
|
|
2746
|
-
|
|
2747
|
-
//#region node_modules/dijkstrajs/dijkstra.js
|
|
2718
|
+
// node_modules/dijkstrajs/dijkstra.js
|
|
2748
2719
|
var require_dijkstra = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2749
2720
|
/******************************************************************************
|
|
2750
2721
|
* Created 2008-08-19.
|
|
@@ -2859,8 +2830,7 @@ window.__ModuleLoader__.load({
|
|
|
2859
2830
|
};
|
|
2860
2831
|
if (typeof module !== "undefined") module.exports = dijkstra;
|
|
2861
2832
|
}));
|
|
2862
|
-
|
|
2863
|
-
//#region node_modules/qrcode/lib/core/segments.js
|
|
2833
|
+
// node_modules/qrcode/lib/core/segments.js
|
|
2864
2834
|
var require_segments = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2865
2835
|
const Mode = require_mode();
|
|
2866
2836
|
const NumericData = require_numeric_data();
|
|
@@ -3138,8 +3108,7 @@ window.__ModuleLoader__.load({
|
|
|
3138
3108
|
return exports.fromArray(getSegmentsFromString(data, Utils.isKanjiModeEnabled()));
|
|
3139
3109
|
};
|
|
3140
3110
|
}));
|
|
3141
|
-
|
|
3142
|
-
//#region node_modules/qrcode/lib/core/qrcode.js
|
|
3111
|
+
// node_modules/qrcode/lib/core/qrcode.js
|
|
3143
3112
|
var require_qrcode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3144
3113
|
const Utils = require_utils$1();
|
|
3145
3114
|
const ECLevel = require_error_correction_level();
|
|
@@ -3434,8 +3403,7 @@ window.__ModuleLoader__.load({
|
|
|
3434
3403
|
return createSymbol(data, version, errorCorrectionLevel, mask);
|
|
3435
3404
|
};
|
|
3436
3405
|
}));
|
|
3437
|
-
|
|
3438
|
-
//#region node_modules/qrcode/lib/renderer/utils.js
|
|
3406
|
+
// node_modules/qrcode/lib/renderer/utils.js
|
|
3439
3407
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3440
3408
|
function hex2rgba(hex) {
|
|
3441
3409
|
if (typeof hex === "number") hex = hex.toString();
|
|
@@ -3502,8 +3470,7 @@ window.__ModuleLoader__.load({
|
|
|
3502
3470
|
}
|
|
3503
3471
|
};
|
|
3504
3472
|
}));
|
|
3505
|
-
|
|
3506
|
-
//#region node_modules/qrcode/lib/renderer/canvas.js
|
|
3473
|
+
// node_modules/qrcode/lib/renderer/canvas.js
|
|
3507
3474
|
var require_canvas = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3508
3475
|
const Utils = require_utils();
|
|
3509
3476
|
function clearCanvas(ctx, canvas, size) {
|
|
@@ -3551,8 +3518,7 @@ window.__ModuleLoader__.load({
|
|
|
3551
3518
|
return canvasEl.toDataURL(type, rendererOpts.quality);
|
|
3552
3519
|
};
|
|
3553
3520
|
}));
|
|
3554
|
-
|
|
3555
|
-
//#region node_modules/qrcode/lib/renderer/svg-tag.js
|
|
3521
|
+
// node_modules/qrcode/lib/renderer/svg-tag.js
|
|
3556
3522
|
var require_svg_tag = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3557
3523
|
const Utils = require_utils();
|
|
3558
3524
|
function getColorAttrib(color, attrib) {
|
|
@@ -3602,8 +3568,7 @@ window.__ModuleLoader__.load({
|
|
|
3602
3568
|
return svgTag;
|
|
3603
3569
|
};
|
|
3604
3570
|
}));
|
|
3605
|
-
|
|
3606
|
-
//#region src/pairing-qr.ts
|
|
3571
|
+
// src/pairing-qr.ts
|
|
3607
3572
|
var import_browser = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3608
3573
|
const canPromise = require_can_promise();
|
|
3609
3574
|
const QRCode = require_qrcode();
|
|
@@ -3729,8 +3694,7 @@ window.__ModuleLoader__.load({
|
|
|
3729
3694
|
if (!grant.audience.startsWith("deeppilot:")) throw new TypeError("pairing audience is invalid");
|
|
3730
3695
|
if (tlsFingerprint !== void 0 && !isLanTlsFingerprint(tlsFingerprint)) throw new TypeError("pairing TLS fingerprint is invalid");
|
|
3731
3696
|
}
|
|
3732
|
-
|
|
3733
|
-
//#region src/client/pairing-panel.ts
|
|
3697
|
+
// src/client/pairing-panel.ts
|
|
3734
3698
|
const initialPairingPanelState = {
|
|
3735
3699
|
target: null,
|
|
3736
3700
|
busy: false,
|
|
@@ -3804,16 +3768,14 @@ window.__ModuleLoader__.load({
|
|
|
3804
3768
|
function normalizeFunnelConnectionLimit(value) {
|
|
3805
3769
|
return typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 16 ? value : 8;
|
|
3806
3770
|
}
|
|
3807
|
-
|
|
3808
|
-
//#region src/local-policy.ts
|
|
3771
|
+
// src/local-policy.ts
|
|
3809
3772
|
const DEFAULT_LOCAL_PORT = 3098;
|
|
3810
3773
|
const MIN_LOCAL_PORT = 1024;
|
|
3811
3774
|
const MAX_LOCAL_PORT = 65535;
|
|
3812
3775
|
function normalizeLocalPort(value) {
|
|
3813
3776
|
return typeof value === "number" && Number.isInteger(value) && value >= 1024 && value <= 65535 ? value : DEFAULT_LOCAL_PORT;
|
|
3814
3777
|
}
|
|
3815
|
-
|
|
3816
|
-
//#region src/client/settings-props.ts
|
|
3778
|
+
// src/client/settings-props.ts
|
|
3817
3779
|
const MISSING_REPORT_HOOK = () => ({
|
|
3818
3780
|
status: "loading",
|
|
3819
3781
|
report: null,
|
|
@@ -3948,8 +3910,7 @@ window.__ModuleLoader__.load({
|
|
|
3948
3910
|
reportHookMissing: !isFn(source.useDeepPilotReport)
|
|
3949
3911
|
};
|
|
3950
3912
|
}
|
|
3951
|
-
|
|
3952
|
-
//#region src/client/settings-view-models.ts
|
|
3913
|
+
// src/client/settings-view-models.ts
|
|
3953
3914
|
/**
|
|
3954
3915
|
* 设置页的 view model:把原先住在渲染函数里的三块逻辑变成可单测的纯模块。
|
|
3955
3916
|
*
|
|
@@ -4093,8 +4054,7 @@ window.__ModuleLoader__.load({
|
|
|
4093
4054
|
function deviceLabel(device) {
|
|
4094
4055
|
return (device.customName ?? device.deviceName).trim();
|
|
4095
4056
|
}
|
|
4096
|
-
|
|
4097
|
-
//#region src/client/settings-page.ts
|
|
4057
|
+
// src/client/settings-page.ts
|
|
4098
4058
|
/** phase 语义标签 → i18n key。措辞归页面,view model 只认语义。 */
|
|
4099
4059
|
const REMOTE_LABEL_KEY = {
|
|
4100
4060
|
disabled: "phase.disabled",
|
|
@@ -4975,8 +4935,44 @@ window.__ModuleLoader__.load({
|
|
|
4975
4935
|
open: failed
|
|
4976
4936
|
}, (0, react.createElement)("summary", null, (0, react.createElement)("span", { className: "pbb-chev" }, ChevronIcon()), (0, react.createElement)("span", { className: "pbb-disclosureTitle" }, translateWith(props.t, "diag.summary"))), (0, react.createElement)("div", { className: "pbb-disclosureBody" }, (0, react.createElement)("p", { className: "pbb-diag" + (failed ? " pbb-diagBad" : "") }, translateWith(props.t, "diag.prefix") + diag.join(" | ")))) : null);
|
|
4977
4937
|
}
|
|
4978
|
-
|
|
4979
|
-
|
|
4938
|
+
// src/client/nav-icon.ts
|
|
4939
|
+
/**
|
|
4940
|
+
* 设置页左侧导航里 DeepPilot 一行的图标。
|
|
4941
|
+
*
|
|
4942
|
+
* DSH 0.2.2 的设置壳为每个 `settings.section` 渲染
|
|
4943
|
+
* `renderSlot('settings.section.icon', { size, active }, { only: id, fallback })`:
|
|
4944
|
+
* 有同 id 的图标贡献就用它,否则画默认齿轮。壳负责按钮、文字和装饰性外框
|
|
4945
|
+
* (外框已 `aria-hidden`),图标只需按 `size` 画一个随文字颜色变化的线性 SVG。
|
|
4946
|
+
*
|
|
4947
|
+
* 不用 `icon.svg`:那是插件管理页的彩色品牌图(渐变填充、白底),放进导航行
|
|
4948
|
+
* 会和内置单色线性图标格格不入,也违反「图标统一用线性单色 SVG」的要求。
|
|
4949
|
+
* 这里画一部手机(DeepPilot 的职责是把手机接到这台电脑的 DSH),描边沿用
|
|
4950
|
+
* 设置页其他图标的 16×16 视图框和 1.5 线宽。
|
|
4951
|
+
*/
|
|
4952
|
+
/** 导航行默认边长;壳当前固定传 16。 */
|
|
4953
|
+
const DEFAULT_NAV_ICON_SIZE = 16;
|
|
4954
|
+
const DeepPilotNavIcon = ({ size }) => {
|
|
4955
|
+
const edge = typeof size === "number" && size > 0 ? size : DEFAULT_NAV_ICON_SIZE;
|
|
4956
|
+
return (0, react.createElement)("svg", {
|
|
4957
|
+
viewBox: "0 0 16 16",
|
|
4958
|
+
width: edge,
|
|
4959
|
+
height: edge,
|
|
4960
|
+
fill: "none",
|
|
4961
|
+
stroke: "currentColor",
|
|
4962
|
+
strokeWidth: 1.5,
|
|
4963
|
+
strokeLinecap: "round",
|
|
4964
|
+
strokeLinejoin: "round",
|
|
4965
|
+
"aria-hidden": true,
|
|
4966
|
+
focusable: "false"
|
|
4967
|
+
}, (0, react.createElement)("rect", {
|
|
4968
|
+
x: 4.25,
|
|
4969
|
+
y: 1.75,
|
|
4970
|
+
width: 7.5,
|
|
4971
|
+
height: 12.5,
|
|
4972
|
+
rx: 1.75
|
|
4973
|
+
}), (0, react.createElement)("path", { d: "M7 11.75h2" }));
|
|
4974
|
+
};
|
|
4975
|
+
// src/client/config-form.ts
|
|
4980
4976
|
/**
|
|
4981
4977
|
* Deep-unwrap live-update references in a snapshot section.
|
|
4982
4978
|
*
|
|
@@ -5029,8 +5025,7 @@ window.__ModuleLoader__.load({
|
|
|
5029
5025
|
function bindConfigForm(ctx) {
|
|
5030
5026
|
return adaptConfigForm(ctx.get("configForms"), "deeppilot");
|
|
5031
5027
|
}
|
|
5032
|
-
|
|
5033
|
-
//#region src/client/index.ts
|
|
5028
|
+
// src/client/index.ts
|
|
5034
5029
|
/** Polls the report remote and owns the page state transitions. */
|
|
5035
5030
|
var ReportController = class {
|
|
5036
5031
|
fetchReport;
|
|
@@ -5482,8 +5477,11 @@ window.__ModuleLoader__.load({
|
|
|
5482
5477
|
t: (key, vars) => t(ctx, key, vars)
|
|
5483
5478
|
})
|
|
5484
5479
|
}, DeepPilotSettingsPage));
|
|
5480
|
+
anyCtx.slots?.inject("settings.section.icon", () => anyCtx.slots.register({
|
|
5481
|
+
name: "settings.section.icon",
|
|
5482
|
+
id: "deeppilot"
|
|
5483
|
+
}, DeepPilotNavIcon));
|
|
5485
5484
|
}
|
|
5486
|
-
//#endregion
|
|
5487
5485
|
exports.DeepPilotSettingsPage = DeepPilotSettingsPage;
|
|
5488
5486
|
exports.apply = apply;
|
|
5489
5487
|
exports.inject = inject;
|