dsh-workbench-vault 0.3.5 → 0.3.9
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/cordis.patch.yml +1 -1
- package/lib/client.js +1029 -338
- package/lib/domain/actions.js +21 -0
- package/lib/index.js +3 -2
- package/package.json +4 -4
package/lib/client.js
CHANGED
|
@@ -39,105 +39,39 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
39
39
|
};
|
|
40
40
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
41
|
|
|
42
|
-
// packages/addons/lib/
|
|
43
|
-
var
|
|
44
|
-
"packages/addons/lib/
|
|
45
|
-
"use strict";
|
|
46
|
-
module2.exports = [
|
|
47
|
-
".wbck{display:flex;flex-direction:column;min-width:0}",
|
|
48
|
-
".wbck-search{padding:0 0 6px}",
|
|
49
|
-
".wbck-input{width:100%;box-sizing:border-box;font:inherit;font-size:12.5px;padding:6px 9px;border:1px solid var(--wb-border);border-radius:8px;background:var(--wb-surface);color:inherit}",
|
|
50
|
-
".wbck-input:focus-visible{outline:2px solid var(--wb-accent);outline-offset:1px}",
|
|
51
|
-
".wbck-input:disabled{opacity:.6;cursor:not-allowed}",
|
|
52
|
-
".wbck-head{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--wb-muted);padding:2px 4px 7px}",
|
|
53
|
-
".wbck-grow{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
|
|
54
|
-
".wbck-sel{flex:none;color:var(--wb-accent)}",
|
|
55
|
-
".wbck-clear{appearance:none;flex:none;border:0;background:transparent;color:inherit;border-radius:4px;margin:0;padding:3px 5px;font:inherit;font-size:11.5px;line-height:1;cursor:pointer;opacity:.75}",
|
|
56
|
-
".wbck-clear:hover:enabled{opacity:1;background:color-mix(in srgb, currentColor 8%, transparent)}",
|
|
57
|
-
".wbck-clear:focus-visible{outline:2px solid var(--wb-accent);outline-offset:1px}",
|
|
58
|
-
".wbck-clear:disabled{opacity:.4;cursor:not-allowed}",
|
|
59
|
-
".wbck-list{max-height:220px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--wb-border);border-radius:10px;padding:2px}",
|
|
60
|
-
".wbck-opt{display:flex;align-items:center;gap:7px;padding:6px;border-radius:6px;font-size:12.5px;cursor:pointer}",
|
|
61
|
-
".wbck-opt:hover{background:color-mix(in srgb, currentColor 7%, transparent)}",
|
|
62
|
-
".wbck-opt.is-on{background:color-mix(in srgb, var(--wb-accent) 10%, transparent)}",
|
|
63
|
-
".wbck-opt input{margin:0;flex:none;accent-color:var(--wb-accent)}",
|
|
64
|
-
".wbck-nm{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
|
|
65
|
-
".wbck-meta{margin-left:auto;flex:none;font-size:11.5px;color:var(--wb-muted)}",
|
|
66
|
-
".wbck-note{font-size:12px;color:var(--wb-muted);padding:8px 6px}",
|
|
67
|
-
".wbck-more{font-size:11px;color:var(--wb-muted);text-align:center;padding:6px 0 2px;opacity:.8}",
|
|
68
|
-
"@media (max-width:760px){.wbck-list{max-height:200px}}"
|
|
69
|
-
];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
// packages/addons/vault/client/ui/styles.cjs
|
|
74
|
-
var require_styles = __commonJS({
|
|
75
|
-
"packages/addons/vault/client/ui/styles.cjs"(exports2, module2) {
|
|
42
|
+
// packages/addons/lib/icons.cjs
|
|
43
|
+
var require_icons = __commonJS({
|
|
44
|
+
"packages/addons/lib/icons.cjs"(exports2, module2) {
|
|
76
45
|
"use strict";
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
".wbv-tabs{display:flex;gap:6px;flex-wrap:wrap}.wbv-tab{border:none;background:transparent;padding:4px 8px;border-radius:6px;cursor:pointer;font-size:12px}",
|
|
107
|
-
".wbv-tab.on{background:color-mix(in srgb,var(--wb-accent) 12%,transparent);color:var(--wb-accent);font-weight:600}",
|
|
108
|
-
".wbv-secret{font-family:ui-monospace,Menlo,Consolas,monospace;background:var(--wb-surface);border:1px solid var(--wb-border);border-radius:6px;padding:6px 8px;word-break:break-all}",
|
|
109
|
-
".wbv-inline{display:flex;gap:6px;align-items:center;flex-wrap:wrap}",
|
|
110
|
-
".wbv-modal{position:fixed;inset:0;background:color-mix(in srgb,var(--wb-muted) 45%,transparent);display:flex;align-items:center;justify-content:center;z-index:50;padding:18px}",
|
|
111
|
-
".wbv-modal-box{background:var(--wb-card);border:1px solid var(--wb-border);border-radius:12px;padding:16px;width:min(520px,100%);max-height:88vh;overflow:auto;display:flex;flex-direction:column;gap:10px;box-shadow:0 12px 40px color-mix(in srgb,var(--wb-muted) 30%,transparent)}",
|
|
112
|
-
".wbv-code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:11px;white-space:pre-wrap;word-break:break-word;background:var(--wb-surface);border:1px solid var(--wb-border);border-radius:8px;padding:10px;max-height:320px;overflow:auto}",
|
|
113
|
-
".wbv-split{display:grid;grid-template-columns:minmax(260px,1fr) minmax(320px,1.6fr);gap:12px;align-items:start}",
|
|
114
|
-
".wbv-list{display:flex;flex-direction:column;gap:6px}",
|
|
115
|
-
".wbv-item{border:1px solid var(--wb-border);border-radius:10px;padding:9px 10px;background:var(--wb-card);cursor:pointer}",
|
|
116
|
-
".wbv-item:hover{border-color:var(--wb-accent)}",
|
|
117
|
-
".wbv-item.on{border-color:var(--wb-accent);box-shadow:inset 3px 0 0 var(--wb-accent)}",
|
|
118
|
-
".wbv-item-top{display:flex;gap:8px;align-items:center}",
|
|
119
|
-
".wbv-dot{width:10px;height:10px;border-radius:999px;flex:none;background:var(--wb-accent)}",
|
|
120
|
-
".wbv-chips{display:flex;gap:6px;flex-wrap:wrap}",
|
|
121
|
-
".wbv-chip{display:inline-flex;gap:6px;align-items:center;border:1px solid var(--wb-border);border-radius:999px;padding:2px 8px;font-size:11px;background:var(--wb-surface)}",
|
|
122
|
-
".wbv-check{display:flex;gap:6px;align-items:center;padding:3px 0;font-size:12px}",
|
|
123
|
-
".wbv-scroll{max-height:220px;overflow:auto;border:1px solid var(--wb-border);border-radius:8px;padding:8px}",
|
|
124
|
-
"@media (max-width:820px){.wbv-split{grid-template-columns:1fr}}",
|
|
125
|
-
".wbv-search{flex:0 0 220px;width:220px}",
|
|
126
|
-
".wbv-row>input:not([type=checkbox]),.wbv-row>select{width:auto;flex:0 1 220px;min-width:120px}",
|
|
127
|
-
".wbv-sub{font-size:12px;opacity:.65;margin-top:2px}",
|
|
128
|
-
".wbv-table tbody tr:hover{background:color-mix(in srgb,var(--wb-accent) 6%,transparent)}",
|
|
129
|
-
".wbv-table td{vertical-align:top}",
|
|
130
|
-
".wbv-empty-card{border:1px dashed var(--wb-border);border-radius:10px;padding:28px 16px;display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center;background:var(--wb-card)}",
|
|
131
|
-
".wbv-empty-title{font-size:14px;font-weight:600}",
|
|
132
|
-
".wbv-check-list{display:flex;flex-wrap:wrap;gap:6px 14px;margin:4px 0}",
|
|
133
|
-
".wbv-check{display:inline-flex;align-items:center;gap:6px;font-size:12px;cursor:pointer}",
|
|
134
|
-
".wbv-dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}",
|
|
135
|
-
".wbv-secret-field{position:relative;display:flex;align-items:center;min-width:0}",
|
|
136
|
-
".wbv-secret-field input{flex:1 1 auto;min-width:0;padding-right:34px}",
|
|
137
|
-
".wbv-eye{position:absolute;right:4px;display:inline-flex;align-items:center;justify-content:center;background:transparent;border:0;border-radius:6px;padding:4px;color:var(--wb-muted);cursor:pointer}",
|
|
138
|
-
".wbv-eye:hover{color:var(--wb-accent);background:color-mix(in srgb, var(--wb-accent) 12%, transparent)}",
|
|
139
|
-
".wbv-eye:focus-visible{outline:2px solid var(--wb-accent);outline-offset:1px}"
|
|
140
|
-
].concat(require_filter_checklist_styles());
|
|
46
|
+
var h = require("react").createElement;
|
|
47
|
+
function create(prefix, glyphs, options) {
|
|
48
|
+
var opts = options || {};
|
|
49
|
+
var ICONS = Object.assign({}, glyphs);
|
|
50
|
+
function Icon2(props) {
|
|
51
|
+
var C = ICONS[props.name] || (opts.fallback ? ICONS[opts.fallback] : null);
|
|
52
|
+
if (!C) return null;
|
|
53
|
+
var size = typeof opts.sizeOf === "function" ? opts.sizeOf(props) : props.size || 14;
|
|
54
|
+
var cls = prefix + "-svg" + (opts.classNameAppend && props.className ? " " + props.className : "");
|
|
55
|
+
var attrs = {
|
|
56
|
+
size,
|
|
57
|
+
strokeWidth: props.strokeWidth || 2,
|
|
58
|
+
"aria-hidden": "true",
|
|
59
|
+
className: cls
|
|
60
|
+
};
|
|
61
|
+
if (opts.focusable) attrs.focusable = false;
|
|
62
|
+
return h(C, attrs);
|
|
63
|
+
}
|
|
64
|
+
var set = { ICONS, Icon: Icon2 };
|
|
65
|
+
if (opts.tabIcon) {
|
|
66
|
+
set.tabIcon = function(name) {
|
|
67
|
+
return function TabIcon() {
|
|
68
|
+
return h(Icon2, { name, size: 14 });
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return set;
|
|
73
|
+
}
|
|
74
|
+
module2.exports = { create };
|
|
141
75
|
}
|
|
142
76
|
});
|
|
143
77
|
|
|
@@ -429,60 +363,56 @@ var init_createLucideIcon = __esm({
|
|
|
429
363
|
}
|
|
430
364
|
});
|
|
431
365
|
|
|
432
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/
|
|
433
|
-
var
|
|
434
|
-
__export(
|
|
366
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/database.mjs
|
|
367
|
+
var database_exports = {};
|
|
368
|
+
__export(database_exports, {
|
|
435
369
|
__iconData: () => __iconData,
|
|
436
|
-
default: () =>
|
|
370
|
+
default: () => Database
|
|
437
371
|
});
|
|
438
|
-
var __iconData,
|
|
439
|
-
var
|
|
440
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/
|
|
372
|
+
var __iconData, Database;
|
|
373
|
+
var init_database = __esm({
|
|
374
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/database.mjs"() {
|
|
441
375
|
init_createLucideIcon();
|
|
442
376
|
__iconData = {
|
|
443
|
-
name: "
|
|
377
|
+
name: "database",
|
|
444
378
|
size: 24,
|
|
445
379
|
node: [
|
|
446
|
-
[
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
450
|
-
key: "oel41y"
|
|
451
|
-
}
|
|
452
|
-
]
|
|
380
|
+
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
381
|
+
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
382
|
+
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
453
383
|
]
|
|
454
384
|
};
|
|
455
385
|
__iconData.node;
|
|
456
|
-
|
|
386
|
+
Database = createLucideIcon(__iconData);
|
|
457
387
|
}
|
|
458
388
|
});
|
|
459
389
|
|
|
460
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/
|
|
461
|
-
var
|
|
462
|
-
__export(
|
|
390
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/eye.mjs
|
|
391
|
+
var eye_exports = {};
|
|
392
|
+
__export(eye_exports, {
|
|
463
393
|
__iconData: () => __iconData2,
|
|
464
|
-
default: () =>
|
|
394
|
+
default: () => Eye
|
|
465
395
|
});
|
|
466
|
-
var __iconData2,
|
|
467
|
-
var
|
|
468
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/
|
|
396
|
+
var __iconData2, Eye;
|
|
397
|
+
var init_eye = __esm({
|
|
398
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/eye.mjs"() {
|
|
469
399
|
init_createLucideIcon();
|
|
470
400
|
__iconData2 = {
|
|
471
|
-
name: "
|
|
401
|
+
name: "eye",
|
|
472
402
|
size: 24,
|
|
473
403
|
node: [
|
|
474
404
|
[
|
|
475
405
|
"path",
|
|
476
406
|
{
|
|
477
|
-
d: "M2.
|
|
478
|
-
key: "
|
|
407
|
+
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
408
|
+
key: "1nclc0"
|
|
479
409
|
}
|
|
480
410
|
],
|
|
481
|
-
["circle", { cx: "
|
|
411
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
482
412
|
]
|
|
483
413
|
};
|
|
484
414
|
__iconData2.node;
|
|
485
|
-
|
|
415
|
+
Eye = createLucideIcon(__iconData2);
|
|
486
416
|
}
|
|
487
417
|
});
|
|
488
418
|
|
|
@@ -514,57 +444,75 @@ var init_folder = __esm({
|
|
|
514
444
|
}
|
|
515
445
|
});
|
|
516
446
|
|
|
517
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/
|
|
518
|
-
var
|
|
519
|
-
__export(
|
|
447
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/key-round.mjs
|
|
448
|
+
var key_round_exports = {};
|
|
449
|
+
__export(key_round_exports, {
|
|
520
450
|
__iconData: () => __iconData4,
|
|
521
|
-
default: () =>
|
|
451
|
+
default: () => KeyRound
|
|
522
452
|
});
|
|
523
|
-
var __iconData4,
|
|
524
|
-
var
|
|
525
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/
|
|
453
|
+
var __iconData4, KeyRound;
|
|
454
|
+
var init_key_round = __esm({
|
|
455
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/key-round.mjs"() {
|
|
526
456
|
init_createLucideIcon();
|
|
527
457
|
__iconData4 = {
|
|
528
|
-
name: "
|
|
458
|
+
name: "key-round",
|
|
529
459
|
size: 24,
|
|
530
460
|
node: [
|
|
531
|
-
[
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
["
|
|
539
|
-
["path", { d: "M8 12H3", key: "a7s4jb" }]
|
|
461
|
+
[
|
|
462
|
+
"path",
|
|
463
|
+
{
|
|
464
|
+
d: "M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",
|
|
465
|
+
key: "1s6t7t"
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
|
|
540
469
|
]
|
|
541
470
|
};
|
|
542
471
|
__iconData4.node;
|
|
543
|
-
|
|
472
|
+
KeyRound = createLucideIcon(__iconData4);
|
|
544
473
|
}
|
|
545
474
|
});
|
|
546
475
|
|
|
547
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/
|
|
548
|
-
var
|
|
549
|
-
__export(
|
|
476
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/layers.mjs
|
|
477
|
+
var layers_exports = {};
|
|
478
|
+
__export(layers_exports, {
|
|
550
479
|
__iconData: () => __iconData5,
|
|
551
|
-
default: () =>
|
|
480
|
+
default: () => Layers
|
|
552
481
|
});
|
|
553
|
-
var __iconData5,
|
|
554
|
-
var
|
|
555
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/
|
|
482
|
+
var __iconData5, Layers;
|
|
483
|
+
var init_layers = __esm({
|
|
484
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/layers.mjs"() {
|
|
556
485
|
init_createLucideIcon();
|
|
557
486
|
__iconData5 = {
|
|
558
|
-
name: "
|
|
487
|
+
name: "layers",
|
|
559
488
|
size: 24,
|
|
560
489
|
node: [
|
|
561
|
-
[
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
490
|
+
[
|
|
491
|
+
"path",
|
|
492
|
+
{
|
|
493
|
+
d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",
|
|
494
|
+
key: "zw3jo"
|
|
495
|
+
}
|
|
496
|
+
],
|
|
497
|
+
[
|
|
498
|
+
"path",
|
|
499
|
+
{
|
|
500
|
+
d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",
|
|
501
|
+
key: "1wduqc"
|
|
502
|
+
}
|
|
503
|
+
],
|
|
504
|
+
[
|
|
505
|
+
"path",
|
|
506
|
+
{
|
|
507
|
+
d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",
|
|
508
|
+
key: "kqbvx6"
|
|
509
|
+
}
|
|
510
|
+
]
|
|
511
|
+
],
|
|
512
|
+
aliases: ["layers-3"]
|
|
565
513
|
};
|
|
566
514
|
__iconData5.node;
|
|
567
|
-
|
|
515
|
+
Layers = createLucideIcon(__iconData5);
|
|
568
516
|
}
|
|
569
517
|
});
|
|
570
518
|
|
|
@@ -595,60 +543,169 @@ var init_list = __esm({
|
|
|
595
543
|
}
|
|
596
544
|
});
|
|
597
545
|
|
|
598
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/
|
|
599
|
-
var
|
|
600
|
-
__export(
|
|
546
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/lock.mjs
|
|
547
|
+
var lock_exports = {};
|
|
548
|
+
__export(lock_exports, {
|
|
601
549
|
__iconData: () => __iconData7,
|
|
602
|
-
default: () =>
|
|
550
|
+
default: () => Lock
|
|
603
551
|
});
|
|
604
|
-
var __iconData7,
|
|
605
|
-
var
|
|
606
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/
|
|
552
|
+
var __iconData7, Lock;
|
|
553
|
+
var init_lock = __esm({
|
|
554
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/lock.mjs"() {
|
|
607
555
|
init_createLucideIcon();
|
|
608
556
|
__iconData7 = {
|
|
609
|
-
name: "
|
|
557
|
+
name: "lock",
|
|
558
|
+
size: 24,
|
|
559
|
+
node: [
|
|
560
|
+
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
561
|
+
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
562
|
+
]
|
|
563
|
+
};
|
|
564
|
+
__iconData7.node;
|
|
565
|
+
Lock = createLucideIcon(__iconData7);
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
|
|
569
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/lock-open.mjs
|
|
570
|
+
var lock_open_exports = {};
|
|
571
|
+
__export(lock_open_exports, {
|
|
572
|
+
__iconData: () => __iconData8,
|
|
573
|
+
default: () => LockOpen
|
|
574
|
+
});
|
|
575
|
+
var __iconData8, LockOpen;
|
|
576
|
+
var init_lock_open = __esm({
|
|
577
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/lock-open.mjs"() {
|
|
578
|
+
init_createLucideIcon();
|
|
579
|
+
__iconData8 = {
|
|
580
|
+
name: "lock-open",
|
|
581
|
+
size: 24,
|
|
582
|
+
node: [
|
|
583
|
+
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
584
|
+
["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
|
|
585
|
+
],
|
|
586
|
+
aliases: ["unlock"]
|
|
587
|
+
};
|
|
588
|
+
__iconData8.node;
|
|
589
|
+
LockOpen = createLucideIcon(__iconData8);
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
|
|
593
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/pencil.mjs
|
|
594
|
+
var pencil_exports = {};
|
|
595
|
+
__export(pencil_exports, {
|
|
596
|
+
__iconData: () => __iconData9,
|
|
597
|
+
default: () => Pencil
|
|
598
|
+
});
|
|
599
|
+
var __iconData9, Pencil;
|
|
600
|
+
var init_pencil = __esm({
|
|
601
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/pencil.mjs"() {
|
|
602
|
+
init_createLucideIcon();
|
|
603
|
+
__iconData9 = {
|
|
604
|
+
name: "pencil",
|
|
610
605
|
size: 24,
|
|
611
606
|
node: [
|
|
612
607
|
[
|
|
613
608
|
"path",
|
|
614
609
|
{
|
|
615
|
-
d: "
|
|
616
|
-
key: "
|
|
617
|
-
}
|
|
618
|
-
],
|
|
619
|
-
[
|
|
620
|
-
"path",
|
|
621
|
-
{
|
|
622
|
-
d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",
|
|
623
|
-
key: "1wduqc"
|
|
610
|
+
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
611
|
+
key: "1a8usu"
|
|
624
612
|
}
|
|
625
613
|
],
|
|
614
|
+
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
615
|
+
]
|
|
616
|
+
};
|
|
617
|
+
__iconData9.node;
|
|
618
|
+
Pencil = createLucideIcon(__iconData9);
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/plus.mjs
|
|
623
|
+
var plus_exports = {};
|
|
624
|
+
__export(plus_exports, {
|
|
625
|
+
__iconData: () => __iconData10,
|
|
626
|
+
default: () => Plus
|
|
627
|
+
});
|
|
628
|
+
var __iconData10, Plus;
|
|
629
|
+
var init_plus = __esm({
|
|
630
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/plus.mjs"() {
|
|
631
|
+
init_createLucideIcon();
|
|
632
|
+
__iconData10 = {
|
|
633
|
+
name: "plus",
|
|
634
|
+
size: 24,
|
|
635
|
+
node: [
|
|
636
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
637
|
+
["path", { d: "M12 5v14", key: "s699le" }]
|
|
638
|
+
]
|
|
639
|
+
};
|
|
640
|
+
__iconData10.node;
|
|
641
|
+
Plus = createLucideIcon(__iconData10);
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/refresh-cw.mjs
|
|
646
|
+
var refresh_cw_exports = {};
|
|
647
|
+
__export(refresh_cw_exports, {
|
|
648
|
+
__iconData: () => __iconData11,
|
|
649
|
+
default: () => RefreshCw
|
|
650
|
+
});
|
|
651
|
+
var __iconData11, RefreshCw;
|
|
652
|
+
var init_refresh_cw = __esm({
|
|
653
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/refresh-cw.mjs"() {
|
|
654
|
+
init_createLucideIcon();
|
|
655
|
+
__iconData11 = {
|
|
656
|
+
name: "refresh-cw",
|
|
657
|
+
size: 24,
|
|
658
|
+
node: [
|
|
659
|
+
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
660
|
+
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
661
|
+
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
662
|
+
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
663
|
+
]
|
|
664
|
+
};
|
|
665
|
+
__iconData11.node;
|
|
666
|
+
RefreshCw = createLucideIcon(__iconData11);
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/shield.mjs
|
|
671
|
+
var shield_exports = {};
|
|
672
|
+
__export(shield_exports, {
|
|
673
|
+
__iconData: () => __iconData12,
|
|
674
|
+
default: () => Shield
|
|
675
|
+
});
|
|
676
|
+
var __iconData12, Shield;
|
|
677
|
+
var init_shield = __esm({
|
|
678
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/shield.mjs"() {
|
|
679
|
+
init_createLucideIcon();
|
|
680
|
+
__iconData12 = {
|
|
681
|
+
name: "shield",
|
|
682
|
+
size: 24,
|
|
683
|
+
node: [
|
|
626
684
|
[
|
|
627
685
|
"path",
|
|
628
686
|
{
|
|
629
|
-
d: "
|
|
630
|
-
key: "
|
|
687
|
+
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
688
|
+
key: "oel41y"
|
|
631
689
|
}
|
|
632
690
|
]
|
|
633
|
-
]
|
|
634
|
-
aliases: ["layers-3"]
|
|
691
|
+
]
|
|
635
692
|
};
|
|
636
|
-
|
|
637
|
-
|
|
693
|
+
__iconData12.node;
|
|
694
|
+
Shield = createLucideIcon(__iconData12);
|
|
638
695
|
}
|
|
639
696
|
});
|
|
640
697
|
|
|
641
698
|
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/shield-check.mjs
|
|
642
699
|
var shield_check_exports = {};
|
|
643
700
|
__export(shield_check_exports, {
|
|
644
|
-
__iconData: () =>
|
|
701
|
+
__iconData: () => __iconData13,
|
|
645
702
|
default: () => ShieldCheck
|
|
646
703
|
});
|
|
647
|
-
var
|
|
704
|
+
var __iconData13, ShieldCheck;
|
|
648
705
|
var init_shield_check = __esm({
|
|
649
706
|
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/shield-check.mjs"() {
|
|
650
707
|
init_createLucideIcon();
|
|
651
|
-
|
|
708
|
+
__iconData13 = {
|
|
652
709
|
name: "shield-check",
|
|
653
710
|
size: 24,
|
|
654
711
|
node: [
|
|
@@ -662,8 +719,297 @@ var init_shield_check = __esm({
|
|
|
662
719
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
663
720
|
]
|
|
664
721
|
};
|
|
665
|
-
|
|
666
|
-
ShieldCheck = createLucideIcon(
|
|
722
|
+
__iconData13.node;
|
|
723
|
+
ShieldCheck = createLucideIcon(__iconData13);
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
|
|
727
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/shield-plus.mjs
|
|
728
|
+
var shield_plus_exports = {};
|
|
729
|
+
__export(shield_plus_exports, {
|
|
730
|
+
__iconData: () => __iconData14,
|
|
731
|
+
default: () => ShieldPlus
|
|
732
|
+
});
|
|
733
|
+
var __iconData14, ShieldPlus;
|
|
734
|
+
var init_shield_plus = __esm({
|
|
735
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/shield-plus.mjs"() {
|
|
736
|
+
init_createLucideIcon();
|
|
737
|
+
__iconData14 = {
|
|
738
|
+
name: "shield-plus",
|
|
739
|
+
size: 24,
|
|
740
|
+
node: [
|
|
741
|
+
[
|
|
742
|
+
"path",
|
|
743
|
+
{
|
|
744
|
+
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
745
|
+
key: "oel41y"
|
|
746
|
+
}
|
|
747
|
+
],
|
|
748
|
+
["path", { d: "M9 12h6", key: "1c52cq" }],
|
|
749
|
+
["path", { d: "M12 9v6", key: "199k2o" }]
|
|
750
|
+
]
|
|
751
|
+
};
|
|
752
|
+
__iconData14.node;
|
|
753
|
+
ShieldPlus = createLucideIcon(__iconData14);
|
|
754
|
+
}
|
|
755
|
+
});
|
|
756
|
+
|
|
757
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.mjs
|
|
758
|
+
var sliders_horizontal_exports = {};
|
|
759
|
+
__export(sliders_horizontal_exports, {
|
|
760
|
+
__iconData: () => __iconData15,
|
|
761
|
+
default: () => SlidersHorizontal
|
|
762
|
+
});
|
|
763
|
+
var __iconData15, SlidersHorizontal;
|
|
764
|
+
var init_sliders_horizontal = __esm({
|
|
765
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.mjs"() {
|
|
766
|
+
init_createLucideIcon();
|
|
767
|
+
__iconData15 = {
|
|
768
|
+
name: "sliders-horizontal",
|
|
769
|
+
size: 24,
|
|
770
|
+
node: [
|
|
771
|
+
["path", { d: "M10 5H3", key: "1qgfaw" }],
|
|
772
|
+
["path", { d: "M12 19H3", key: "yhmn1j" }],
|
|
773
|
+
["path", { d: "M14 3v4", key: "1sua03" }],
|
|
774
|
+
["path", { d: "M16 17v4", key: "1q0r14" }],
|
|
775
|
+
["path", { d: "M21 12h-9", key: "1o4lsq" }],
|
|
776
|
+
["path", { d: "M21 19h-5", key: "1rlt1p" }],
|
|
777
|
+
["path", { d: "M21 5h-7", key: "1oszz2" }],
|
|
778
|
+
["path", { d: "M8 10v4", key: "tgpxqk" }],
|
|
779
|
+
["path", { d: "M8 12H3", key: "a7s4jb" }]
|
|
780
|
+
]
|
|
781
|
+
};
|
|
782
|
+
__iconData15.node;
|
|
783
|
+
SlidersHorizontal = createLucideIcon(__iconData15);
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
|
|
787
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/trash.mjs
|
|
788
|
+
var __iconData16, Trash;
|
|
789
|
+
var init_trash = __esm({
|
|
790
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/trash.mjs"() {
|
|
791
|
+
init_createLucideIcon();
|
|
792
|
+
__iconData16 = {
|
|
793
|
+
name: "trash",
|
|
794
|
+
size: 24,
|
|
795
|
+
node: [
|
|
796
|
+
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
797
|
+
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
798
|
+
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
799
|
+
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
800
|
+
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
801
|
+
],
|
|
802
|
+
aliases: ["trash-2"]
|
|
803
|
+
};
|
|
804
|
+
__iconData16.node;
|
|
805
|
+
Trash = createLucideIcon(__iconData16);
|
|
806
|
+
}
|
|
807
|
+
});
|
|
808
|
+
|
|
809
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/trash-2.mjs
|
|
810
|
+
var trash_2_exports = {};
|
|
811
|
+
__export(trash_2_exports, {
|
|
812
|
+
default: () => Trash
|
|
813
|
+
});
|
|
814
|
+
var init_trash_2 = __esm({
|
|
815
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/trash-2.mjs"() {
|
|
816
|
+
init_trash();
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
|
|
820
|
+
// packages/addons/vault/client/ui/icons.cjs
|
|
821
|
+
var require_icons2 = __commonJS({
|
|
822
|
+
"packages/addons/vault/client/ui/icons.cjs"(exports2, module2) {
|
|
823
|
+
"use strict";
|
|
824
|
+
var icons = require_icons();
|
|
825
|
+
var set = icons.create("wbv", {
|
|
826
|
+
"database": (init_database(), __toCommonJS(database_exports)).default,
|
|
827
|
+
"eye": (init_eye(), __toCommonJS(eye_exports)).default,
|
|
828
|
+
"folder": (init_folder(), __toCommonJS(folder_exports)).default,
|
|
829
|
+
"key-round": (init_key_round(), __toCommonJS(key_round_exports)).default,
|
|
830
|
+
"layers": (init_layers(), __toCommonJS(layers_exports)).default,
|
|
831
|
+
"list": (init_list(), __toCommonJS(list_exports)).default,
|
|
832
|
+
"lock": (init_lock(), __toCommonJS(lock_exports)).default,
|
|
833
|
+
"lock-open": (init_lock_open(), __toCommonJS(lock_open_exports)).default,
|
|
834
|
+
"pencil": (init_pencil(), __toCommonJS(pencil_exports)).default,
|
|
835
|
+
"plus": (init_plus(), __toCommonJS(plus_exports)).default,
|
|
836
|
+
"refresh-cw": (init_refresh_cw(), __toCommonJS(refresh_cw_exports)).default,
|
|
837
|
+
"shield": (init_shield(), __toCommonJS(shield_exports)).default,
|
|
838
|
+
"shield-check": (init_shield_check(), __toCommonJS(shield_check_exports)).default,
|
|
839
|
+
"shield-plus": (init_shield_plus(), __toCommonJS(shield_plus_exports)).default,
|
|
840
|
+
"sliders-horizontal": (init_sliders_horizontal(), __toCommonJS(sliders_horizontal_exports)).default,
|
|
841
|
+
"trash-2": (init_trash_2(), __toCommonJS(trash_2_exports)).default
|
|
842
|
+
});
|
|
843
|
+
module2.exports = { ICONS: set.ICONS, Icon: set.Icon };
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
|
|
847
|
+
// packages/addons/lib/filter-checklist-styles.cjs
|
|
848
|
+
var require_filter_checklist_styles = __commonJS({
|
|
849
|
+
"packages/addons/lib/filter-checklist-styles.cjs"(exports2, module2) {
|
|
850
|
+
"use strict";
|
|
851
|
+
module2.exports = [
|
|
852
|
+
".wbck{display:flex;flex-direction:column;min-width:0}",
|
|
853
|
+
".wbck-search{padding:0 0 6px}",
|
|
854
|
+
".wbck-input{width:100%;box-sizing:border-box;font:inherit;font-size:12.5px;padding:6px 9px;border:1px solid var(--wb-border);border-radius:8px;background:var(--wb-surface);color:inherit}",
|
|
855
|
+
".wbck-input:focus-visible{outline:2px solid var(--wb-accent);outline-offset:1px}",
|
|
856
|
+
".wbck-input:disabled{opacity:.6;cursor:not-allowed}",
|
|
857
|
+
".wbck-head{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--wb-muted);padding:2px 4px 7px}",
|
|
858
|
+
".wbck-grow{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
|
|
859
|
+
".wbck-sel{flex:none;color:var(--wb-accent)}",
|
|
860
|
+
".wbck-clear{appearance:none;flex:none;border:0;background:transparent;color:inherit;border-radius:4px;margin:0;padding:3px 5px;font:inherit;font-size:11.5px;line-height:1;cursor:pointer;opacity:.75}",
|
|
861
|
+
".wbck-clear:hover:enabled{opacity:1;background:color-mix(in srgb, currentColor 8%, transparent)}",
|
|
862
|
+
".wbck-clear:focus-visible{outline:2px solid var(--wb-accent);outline-offset:1px}",
|
|
863
|
+
".wbck-clear:disabled{opacity:.4;cursor:not-allowed}",
|
|
864
|
+
".wbck-list{max-height:220px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--wb-border);border-radius:10px;padding:2px}",
|
|
865
|
+
".wbck-opt{display:flex;align-items:center;gap:7px;padding:6px;border-radius:6px;font-size:12.5px;cursor:pointer}",
|
|
866
|
+
".wbck-opt:hover{background:color-mix(in srgb, currentColor 7%, transparent)}",
|
|
867
|
+
".wbck-opt.is-on{background:color-mix(in srgb, var(--wb-accent) 10%, transparent)}",
|
|
868
|
+
".wbck-opt input{margin:0;flex:none;accent-color:var(--wb-accent)}",
|
|
869
|
+
// 单选变体用 button 渲染(role="radio"),这里把浏览器默认按钮样式清掉,视觉与多选行一致。
|
|
870
|
+
'.wbck-opt[role="radio"]{appearance:none;width:100%;box-sizing:border-box;border:0;background:transparent;color:inherit;font:inherit;text-align:left}',
|
|
871
|
+
'.wbck-opt[role="radio"]:disabled{opacity:.55;cursor:not-allowed}',
|
|
872
|
+
'.wbck-opt[role="radio"]:focus-visible{outline:2px solid var(--wb-accent);outline-offset:-2px}',
|
|
873
|
+
".wbck-nm{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
|
|
874
|
+
".wbck-meta{margin-left:auto;flex:none;font-size:11.5px;color:var(--wb-muted)}",
|
|
875
|
+
".wbck-note{font-size:12px;color:var(--wb-muted);padding:8px 6px}",
|
|
876
|
+
".wbck-more{font-size:11px;color:var(--wb-muted);text-align:center;padding:6px 0 2px;opacity:.8}",
|
|
877
|
+
"@media (max-width:760px){.wbck-list{max-height:200px}}"
|
|
878
|
+
];
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
// packages/addons/lib/client-base-styles.cjs
|
|
883
|
+
var require_client_base_styles = __commonJS({
|
|
884
|
+
"packages/addons/lib/client-base-styles.cjs"(exports2, module2) {
|
|
885
|
+
"use strict";
|
|
886
|
+
var SECRET_FIELD = [
|
|
887
|
+
".wb-secret-field{position:relative;display:flex;align-items:center;min-width:0}",
|
|
888
|
+
".wb-secret-field input{flex:1 1 auto;min-width:0;padding-right:34px}",
|
|
889
|
+
".wb-eye{position:absolute;right:4px;display:inline-flex;align-items:center;justify-content:center;background:transparent;border:0;border-radius:6px;padding:4px;color:var(--wb-muted,#6b7280);cursor:pointer}",
|
|
890
|
+
".wb-eye:hover:not(:disabled){color:var(--wb-accent,#2563eb);background:color-mix(in srgb, var(--wb-accent,#2563eb) 12%, transparent)}",
|
|
891
|
+
".wb-eye:focus-visible{outline:2px solid var(--wb-accent,#2563eb);outline-offset:1px}",
|
|
892
|
+
".wb-eye:disabled{opacity:.45;cursor:not-allowed}"
|
|
893
|
+
];
|
|
894
|
+
module2.exports = function baseStyles(prefix) {
|
|
895
|
+
var p = String(prefix || "wb");
|
|
896
|
+
var s = "." + p;
|
|
897
|
+
return SECRET_FIELD.concat([
|
|
898
|
+
s + "-wrap{display:flex;flex-direction:column;gap:12px;padding:16px;overflow:auto;height:100%;box-sizing:border-box}",
|
|
899
|
+
s + "-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}",
|
|
900
|
+
s + "-title{font-size:16px;font-weight:650;margin:0}",
|
|
901
|
+
s + "-sub{font-size:12px;color:var(--wb-muted,#6b7280);margin:2px 0 0}",
|
|
902
|
+
s + "-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}",
|
|
903
|
+
s + "-card{border:1px solid var(--wb-border,#e5e7eb);border-radius:10px;background:var(--wb-surface,#fff);padding:12px}",
|
|
904
|
+
s + "-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}",
|
|
905
|
+
s + "-kpi{font-size:22px;font-weight:700;line-height:1.2}" + s + "-kpi-label{font-size:12px;color:var(--wb-muted,#6b7280)}",
|
|
906
|
+
s + "-table{width:100%;border-collapse:collapse;font-size:12px}" + s + "-table th," + s + "-table td{padding:7px 8px;border-bottom:1px solid var(--wb-border,#eef0f3);text-align:left;vertical-align:top}",
|
|
907
|
+
s + "-table th{font-weight:600;color:var(--wb-muted,#6b7280);white-space:nowrap}",
|
|
908
|
+
s + "-btn{border:1px solid var(--wb-border,#d1d5db);background:var(--wb-surface,#fff);color:inherit;border-radius:7px;padding:5px 10px;font-size:12px;cursor:pointer}",
|
|
909
|
+
s + "-btn:hover:not(:disabled){border-color:var(--wb-accent,#2563eb)}" + s + "-btn:disabled{opacity:.5;cursor:default}",
|
|
910
|
+
s + "-btn.primary{background:var(--wb-accent,#2563eb);border-color:var(--wb-accent,#2563eb);color:#fff}",
|
|
911
|
+
s + "-btn.danger{color:#b91c1c;border-color:#fecaca}",
|
|
912
|
+
s + "-field{display:flex;flex-direction:column;gap:4px;font-size:12px}" + s + "-label{font-weight:600}",
|
|
913
|
+
s + "-field input," + s + "-field select," + s + "-field textarea{border:1px solid var(--wb-border,#d1d5db);border-radius:7px;padding:6px 8px;font:inherit;background:var(--wb-surface,#fff);color:inherit;min-width:0}",
|
|
914
|
+
s + "-hint{color:var(--wb-muted,#6b7280);font-size:11px}" + s + "-notice{padding:8px 10px;border-radius:8px;font-size:12px;background:#eff6ff;color:#1e40af}",
|
|
915
|
+
s + "-notice.error{background:#fef2f2;color:#b91c1c}" + s + "-notice.ok{background:#ecfdf5;color:#047857}",
|
|
916
|
+
s + "-empty{padding:18px;text-align:center;color:var(--wb-muted,#6b7280);font-size:12px;border:1px dashed var(--wb-border,#e5e7eb);border-radius:8px}",
|
|
917
|
+
s + "-pill{display:inline-block;padding:1px 7px;border-radius:999px;font-size:11px;background:#f3f4f6;color:#374151}",
|
|
918
|
+
s + "-pill.ok{background:#ecfdf5;color:#047857}" + s + "-pill.error{background:#fef2f2;color:#b91c1c}" + s + "-pill.warn{background:#fffbeb;color:#b45309}",
|
|
919
|
+
s + "-json{margin:0;padding:8px;background:#f8fafc;border-radius:8px;font-size:11px;max-height:240px;overflow:auto}",
|
|
920
|
+
s + "-muted{color:var(--wb-muted,#6b7280)}" + s + "-link{color:var(--wb-accent,#2563eb);cursor:pointer;text-decoration:none}",
|
|
921
|
+
s + "-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}"
|
|
922
|
+
]);
|
|
923
|
+
};
|
|
924
|
+
module2.exports.secretFieldStyles = SECRET_FIELD;
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
|
|
928
|
+
// packages/addons/lib/icon-label.cjs
|
|
929
|
+
var require_icon_label = __commonJS({
|
|
930
|
+
"packages/addons/lib/icon-label.cjs"(exports2, module2) {
|
|
931
|
+
"use strict";
|
|
932
|
+
module2.exports = function iconLabel(h, Icon2, text) {
|
|
933
|
+
return h(
|
|
934
|
+
"span",
|
|
935
|
+
{ className: "wb-icon-label" },
|
|
936
|
+
h(Icon2, { size: 14, strokeWidth: 2, "aria-hidden": true, focusable: false }),
|
|
937
|
+
h("span", null, text)
|
|
938
|
+
);
|
|
939
|
+
};
|
|
940
|
+
module2.exports.styles = ".wb-icon-label{display:inline-flex;align-items:center;gap:5px;max-width:100%;vertical-align:middle;text-align:start}.wb-icon-label>svg{flex:none}.wb-icon-label>span{min-width:0;overflow-wrap:anywhere}";
|
|
941
|
+
}
|
|
942
|
+
});
|
|
943
|
+
|
|
944
|
+
// packages/addons/vault/client/ui/styles.cjs
|
|
945
|
+
var require_styles = __commonJS({
|
|
946
|
+
"packages/addons/vault/client/ui/styles.cjs"(exports2, module2) {
|
|
947
|
+
"use strict";
|
|
948
|
+
module2.exports = [
|
|
949
|
+
".wbv{display:flex;flex-direction:column;gap:14px;font-size:13px;min-height:100%;padding:2px}",
|
|
950
|
+
".wbv h2{font-size:17px;margin:0}.wbv h3{font-size:14px;margin:0}",
|
|
951
|
+
".wbv-muted{opacity:.62}.wbv-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}",
|
|
952
|
+
".wbv-grow{flex:1}.wbv-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}",
|
|
953
|
+
".wbv-card{border:1px solid var(--wb-border);border-radius:10px;padding:12px;background:var(--wb-card)}",
|
|
954
|
+
".wbv-card h3{margin-bottom:6px}.wbv-kpi{font-size:22px;font-weight:650;line-height:1.2}",
|
|
955
|
+
".wbv-btn{border:1px solid var(--wb-border);background:var(--wb-card);color:inherit;border-radius:7px;padding:5px 10px;cursor:pointer;font-size:12px;line-height:1.4}",
|
|
956
|
+
".wbv-btn:hover:enabled{border-color:var(--wb-accent)}.wbv-btn:disabled{opacity:.45;cursor:not-allowed}",
|
|
957
|
+
".wbv-btn:focus-visible{outline:2px solid var(--wb-accent);outline-offset:2px}",
|
|
958
|
+
".wbv-btn.primary{background:var(--wb-accent);border-color:var(--wb-accent);color:var(--wb-on-accent,inherit)}",
|
|
959
|
+
".wbv-btn.danger{color:var(--wb-danger);border-color:color-mix(in srgb,var(--wb-danger) 45%,transparent)}",
|
|
960
|
+
".wbv-btn.ghost{background:transparent;border-color:transparent;color:var(--wb-accent);padding:2px 4px}",
|
|
961
|
+
".wbv-btn.wbv-delete{color:var(--wb-danger)}",
|
|
962
|
+
".wbv-field{display:flex;flex-direction:column;gap:4px;min-width:180px;flex:1}",
|
|
963
|
+
".wbv-label{font-size:11px;font-weight:600;opacity:.75}.wbv-hint{font-size:11px;opacity:.55}",
|
|
964
|
+
".wbv input,.wbv select,.wbv textarea{border:1px solid var(--wb-border);border-radius:7px;padding:6px 8px;font:inherit;background:var(--wb-surface);color:inherit;width:100%;box-sizing:border-box}",
|
|
965
|
+
".wbv input[type=checkbox]{width:auto}",
|
|
966
|
+
".wbv textarea{min-height:70px;resize:vertical}",
|
|
967
|
+
".wbv-notice{border-radius:8px;padding:8px 10px;font-size:12px;border:1px solid var(--wb-border);background:color-mix(in srgb,var(--wb-accent) 8%,transparent);color:inherit}",
|
|
968
|
+
".wbv-notice.error{border-color:color-mix(in srgb,var(--wb-danger) 45%,transparent);background:color-mix(in srgb,var(--wb-danger) 10%,transparent);color:var(--wb-danger)}",
|
|
969
|
+
".wbv-notice.ok{border-color:color-mix(in srgb,var(--wb-ok) 45%,transparent);background:color-mix(in srgb,var(--wb-ok) 10%,transparent);color:var(--wb-ok)}",
|
|
970
|
+
".wbv-empty{padding:22px;text-align:center;opacity:.55;border:1px dashed var(--wb-border);border-radius:10px}",
|
|
971
|
+
".wbv-table-scroll{max-width:100%;overflow-x:auto;padding:4px}.wbv-table-scroll:focus-visible{outline:2px solid var(--wb-accent);outline-offset:-2px}",
|
|
972
|
+
".wbv-table{width:100%;border-collapse:collapse;font-size:12px}",
|
|
973
|
+
".wbv-table th,.wbv-table td{text-align:left;padding:7px 8px;border-bottom:1px solid var(--wb-line);vertical-align:top}",
|
|
974
|
+
".wbv-table th{font-weight:600;opacity:.65;white-space:nowrap}.wbv-table code{font-size:11px;opacity:.8}",
|
|
975
|
+
".wbv-table tbody tr:hover{background:color-mix(in srgb,var(--wb-muted) 8%,transparent)}",
|
|
976
|
+
".wbv-pill{display:inline-block;border-radius:999px;padding:1px 8px;font-size:11px;background:color-mix(in srgb,var(--wb-muted) 14%,transparent);color:inherit}",
|
|
977
|
+
".wbv-pill.ok{background:color-mix(in srgb,var(--wb-ok) 16%,transparent);color:var(--wb-ok)}",
|
|
978
|
+
".wbv-pill.warn{background:color-mix(in srgb,var(--wb-warn) 18%,transparent);color:var(--wb-warn)}",
|
|
979
|
+
".wbv-pill.bad{background:color-mix(in srgb,var(--wb-danger) 16%,transparent);color:var(--wb-danger)}",
|
|
980
|
+
".wbv-tabs{display:flex;gap:6px;flex-wrap:wrap}.wbv-tab{border:none;background:transparent;padding:4px 8px;border-radius:6px;cursor:pointer;font-size:12px}",
|
|
981
|
+
".wbv-tab.on{background:color-mix(in srgb,var(--wb-accent) 12%,transparent);color:var(--wb-accent);font-weight:600}",
|
|
982
|
+
".wbv-secret{font-family:ui-monospace,Menlo,Consolas,monospace;background:var(--wb-surface);border:1px solid var(--wb-border);border-radius:6px;padding:6px 8px;word-break:break-all}",
|
|
983
|
+
".wbv-inline{display:flex;gap:6px;align-items:center;flex-wrap:wrap}",
|
|
984
|
+
".wbv-modal{position:fixed;inset:0;background:color-mix(in srgb,var(--wb-muted) 45%,transparent);display:flex;align-items:center;justify-content:center;z-index:50;padding:18px}",
|
|
985
|
+
".wbv-modal-box{background:var(--wb-card);border:1px solid var(--wb-border);border-radius:12px;padding:16px;width:min(520px,100%);max-height:88vh;overflow:auto;display:flex;flex-direction:column;gap:10px;box-shadow:0 12px 40px color-mix(in srgb,var(--wb-muted) 30%,transparent)}",
|
|
986
|
+
".wbv-code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:11px;white-space:pre-wrap;word-break:break-word;background:var(--wb-surface);border:1px solid var(--wb-border);border-radius:8px;padding:10px;max-height:320px;overflow:auto}",
|
|
987
|
+
".wbv-split{display:grid;grid-template-columns:minmax(260px,1fr) minmax(320px,1.6fr);gap:12px;align-items:start}",
|
|
988
|
+
".wbv-list{display:flex;flex-direction:column;gap:6px}",
|
|
989
|
+
".wbv-item{border:1px solid var(--wb-border);border-radius:10px;padding:9px 10px;background:var(--wb-card);cursor:pointer}",
|
|
990
|
+
".wbv-item:hover{border-color:var(--wb-accent)}",
|
|
991
|
+
".wbv-item.on{border-color:var(--wb-accent);box-shadow:inset 3px 0 0 var(--wb-accent)}",
|
|
992
|
+
".wbv-item-top{display:flex;gap:8px;align-items:center}",
|
|
993
|
+
".wbv-dot{width:10px;height:10px;border-radius:999px;flex:none;background:var(--wb-accent)}",
|
|
994
|
+
".wbv-chips{display:flex;gap:6px;flex-wrap:wrap}",
|
|
995
|
+
".wbv-chip{display:inline-flex;gap:6px;align-items:center;border:1px solid var(--wb-border);border-radius:999px;padding:2px 8px;font-size:11px;background:var(--wb-surface)}",
|
|
996
|
+
".wbv-check{display:flex;gap:6px;align-items:center;padding:3px 0;font-size:12px}",
|
|
997
|
+
".wbv-scroll{max-height:220px;overflow:auto;border:1px solid var(--wb-border);border-radius:8px;padding:8px}",
|
|
998
|
+
"@media (max-width:820px){.wbv-split{grid-template-columns:1fr}}",
|
|
999
|
+
".wbv-search{flex:0 0 220px;width:220px}",
|
|
1000
|
+
".wbv-row>input:not([type=checkbox]),.wbv-row>select{width:auto;flex:0 1 220px;min-width:120px}",
|
|
1001
|
+
".wbv-sub{font-size:12px;opacity:.65;margin-top:2px}",
|
|
1002
|
+
".wbv-table tbody tr:hover{background:color-mix(in srgb,var(--wb-accent) 6%,transparent)}",
|
|
1003
|
+
".wbv-table td{vertical-align:top}",
|
|
1004
|
+
".wbv-empty-card{border:1px dashed var(--wb-border);border-radius:10px;padding:28px 16px;display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center;background:var(--wb-card)}",
|
|
1005
|
+
".wbv-empty-title{font-size:14px;font-weight:600}",
|
|
1006
|
+
".wbv-check-list{display:flex;flex-wrap:wrap;gap:6px 14px;margin:4px 0}",
|
|
1007
|
+
".wbv-check{display:inline-flex;align-items:center;gap:6px;font-size:12px;cursor:pointer}",
|
|
1008
|
+
".wbv-dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}",
|
|
1009
|
+
".wbv-lock-card{max-width:560px;margin:28px auto;padding:26px 24px;border:1px solid var(--wb-border);border-radius:12px;background:var(--wb-card);display:flex;flex-direction:column;gap:8px;align-items:flex-start}",
|
|
1010
|
+
".wbv-lock-ico{color:var(--wb-muted)}",
|
|
1011
|
+
".wbv-lock-title{font-size:15px;font-weight:600}"
|
|
1012
|
+
].concat(require_filter_checklist_styles()).concat(require_client_base_styles().secretFieldStyles, require_icon_label().styles);
|
|
667
1013
|
}
|
|
668
1014
|
});
|
|
669
1015
|
|
|
@@ -793,10 +1139,110 @@ var require_common = __commonJS({
|
|
|
793
1139
|
}
|
|
794
1140
|
});
|
|
795
1141
|
|
|
1142
|
+
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/eye-off.mjs
|
|
1143
|
+
var eye_off_exports = {};
|
|
1144
|
+
__export(eye_off_exports, {
|
|
1145
|
+
__iconData: () => __iconData17,
|
|
1146
|
+
default: () => EyeOff
|
|
1147
|
+
});
|
|
1148
|
+
var __iconData17, EyeOff;
|
|
1149
|
+
var init_eye_off = __esm({
|
|
1150
|
+
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/eye-off.mjs"() {
|
|
1151
|
+
init_createLucideIcon();
|
|
1152
|
+
__iconData17 = {
|
|
1153
|
+
name: "eye-off",
|
|
1154
|
+
size: 24,
|
|
1155
|
+
node: [
|
|
1156
|
+
[
|
|
1157
|
+
"path",
|
|
1158
|
+
{
|
|
1159
|
+
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1160
|
+
key: "ct8e1f"
|
|
1161
|
+
}
|
|
1162
|
+
],
|
|
1163
|
+
["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242", key: "151rxh" }],
|
|
1164
|
+
[
|
|
1165
|
+
"path",
|
|
1166
|
+
{
|
|
1167
|
+
d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
|
|
1168
|
+
key: "13bj9a"
|
|
1169
|
+
}
|
|
1170
|
+
],
|
|
1171
|
+
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
1172
|
+
]
|
|
1173
|
+
};
|
|
1174
|
+
__iconData17.node;
|
|
1175
|
+
EyeOff = createLucideIcon(__iconData17);
|
|
1176
|
+
}
|
|
1177
|
+
});
|
|
1178
|
+
|
|
1179
|
+
// packages/addons/lib/secret-field.cjs
|
|
1180
|
+
var require_secret_field = __commonJS({
|
|
1181
|
+
"packages/addons/lib/secret-field.cjs"(exports2, module2) {
|
|
1182
|
+
"use strict";
|
|
1183
|
+
var Eye2 = (init_eye(), __toCommonJS(eye_exports)).default;
|
|
1184
|
+
var EyeOff2 = (init_eye_off(), __toCommonJS(eye_off_exports)).default;
|
|
1185
|
+
function SecretField(props) {
|
|
1186
|
+
var h = props.h;
|
|
1187
|
+
var show = Boolean(props.show);
|
|
1188
|
+
var label = show ? props.hideLabel || "\u9690\u85CF\u660E\u6587" : props.showLabel || "\u663E\u793A\u660E\u6587";
|
|
1189
|
+
var Ico = show ? EyeOff2 : Eye2;
|
|
1190
|
+
function toggle(e) {
|
|
1191
|
+
e.preventDefault();
|
|
1192
|
+
e.stopPropagation();
|
|
1193
|
+
var box = e.currentTarget && e.currentTarget.parentNode;
|
|
1194
|
+
if (props.onToggle) props.onToggle();
|
|
1195
|
+
var input = box && box.querySelector ? box.querySelector("input") : null;
|
|
1196
|
+
if (!input || !input.focus) return;
|
|
1197
|
+
input.focus();
|
|
1198
|
+
var end = String(input.value == null ? "" : input.value).length;
|
|
1199
|
+
if (input.setSelectionRange) {
|
|
1200
|
+
try {
|
|
1201
|
+
input.setSelectionRange(end, end);
|
|
1202
|
+
} catch (err) {
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
return h(
|
|
1207
|
+
"div",
|
|
1208
|
+
{ className: "wb-secret-field" + (props.className ? " " + props.className : "") },
|
|
1209
|
+
h("input", {
|
|
1210
|
+
type: show ? "text" : "password",
|
|
1211
|
+
className: props.inputClassName || void 0,
|
|
1212
|
+
id: props.id || void 0,
|
|
1213
|
+
name: props.name || void 0,
|
|
1214
|
+
autoComplete: props.autoComplete || "new-password",
|
|
1215
|
+
autoFocus: props.autoFocus ? true : void 0,
|
|
1216
|
+
spellCheck: false,
|
|
1217
|
+
disabled: props.disabled ? true : void 0,
|
|
1218
|
+
"aria-label": props.ariaLabel || void 0,
|
|
1219
|
+
value: props.value == null ? "" : props.value,
|
|
1220
|
+
placeholder: props.placeholder || void 0,
|
|
1221
|
+
onChange: function(e) {
|
|
1222
|
+
if (props.onChange) props.onChange(e.target.value);
|
|
1223
|
+
},
|
|
1224
|
+
onKeyDown: props.onKeyDown || void 0
|
|
1225
|
+
}),
|
|
1226
|
+
h("button", {
|
|
1227
|
+
type: "button",
|
|
1228
|
+
className: "wb-eye",
|
|
1229
|
+
title: label,
|
|
1230
|
+
"aria-label": label,
|
|
1231
|
+
"aria-pressed": show ? "true" : "false",
|
|
1232
|
+
tabIndex: props.disabled ? -1 : void 0,
|
|
1233
|
+
onClick: toggle
|
|
1234
|
+
}, h(Ico, { size: 15, strokeWidth: 2, "aria-hidden": "true" }))
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
module2.exports = SecretField;
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
|
|
796
1241
|
// packages/addons/vault/client/ui/ask-passphrase.cjs
|
|
797
1242
|
var require_ask_passphrase = __commonJS({
|
|
798
1243
|
"packages/addons/vault/client/ui/ask-passphrase.cjs"(exports2, module2) {
|
|
799
1244
|
"use strict";
|
|
1245
|
+
var SecretField = require_secret_field();
|
|
800
1246
|
module2.exports = function AskPassphraseModal(props) {
|
|
801
1247
|
var h = props.h, C = props.C;
|
|
802
1248
|
return h(
|
|
@@ -814,15 +1260,16 @@ var require_ask_passphrase = __commonJS({
|
|
|
814
1260
|
h(
|
|
815
1261
|
C.Field,
|
|
816
1262
|
{ h, label: props.label || "\u4E3B\u53E3\u4EE4" },
|
|
817
|
-
h(
|
|
818
|
-
|
|
1263
|
+
h(SecretField, {
|
|
1264
|
+
h,
|
|
819
1265
|
autoFocus: true,
|
|
820
1266
|
autoComplete: "current-password",
|
|
821
1267
|
value: props.value,
|
|
822
1268
|
disabled: props.busy,
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
1269
|
+
show: props.show,
|
|
1270
|
+
ariaLabel: props.label || "\u4E3B\u53E3\u4EE4",
|
|
1271
|
+
onChange: props.onChange,
|
|
1272
|
+
onToggle: props.onToggle,
|
|
826
1273
|
onKeyDown: function(e) {
|
|
827
1274
|
if (e.key === "Enter" && props.value && !props.busy) props.onConfirm();
|
|
828
1275
|
}
|
|
@@ -845,8 +1292,14 @@ var require_ask_passphrase = __commonJS({
|
|
|
845
1292
|
var require_status = __commonJS({
|
|
846
1293
|
"packages/addons/vault/client/views/status.cjs"(exports2, module2) {
|
|
847
1294
|
"use strict";
|
|
1295
|
+
var GLYPHS2 = require_icons2().ICONS;
|
|
848
1296
|
var C = require_common();
|
|
849
1297
|
var AskPassphrase = require_ask_passphrase();
|
|
1298
|
+
var iconLabel = require_icon_label();
|
|
1299
|
+
var Lock2 = GLYPHS2["lock"];
|
|
1300
|
+
var Unlock = GLYPHS2["lock-open"];
|
|
1301
|
+
var ShieldPlus2 = GLYPHS2["shield-plus"];
|
|
1302
|
+
var SecretField = require_secret_field();
|
|
850
1303
|
module2.exports = function StatusView(props) {
|
|
851
1304
|
var h = props.h;
|
|
852
1305
|
var api = props.api;
|
|
@@ -861,6 +1314,9 @@ var require_status = __commonJS({
|
|
|
861
1314
|
var mode = React.useState("A");
|
|
862
1315
|
var msg = React.useState("");
|
|
863
1316
|
var askS = React.useState(null);
|
|
1317
|
+
var showMainS = React.useState(false);
|
|
1318
|
+
var showConfirmS = React.useState(false);
|
|
1319
|
+
var showUnlockS = React.useState(false);
|
|
864
1320
|
var refreshTick = React.useState(0);
|
|
865
1321
|
var refresh = function() {
|
|
866
1322
|
refreshTick[1](refreshTick[0] + 1);
|
|
@@ -918,6 +1374,10 @@ var require_status = __commonJS({
|
|
|
918
1374
|
onChange: function(v) {
|
|
919
1375
|
askS[1](Object.assign({}, askS[0], { value: v }));
|
|
920
1376
|
},
|
|
1377
|
+
show: askS[0].show,
|
|
1378
|
+
onToggle: function() {
|
|
1379
|
+
askS[1](Object.assign({}, askS[0], { show: !askS[0].show }));
|
|
1380
|
+
},
|
|
921
1381
|
onCancel: function() {
|
|
922
1382
|
if (!askS[0].busy) askS[1](null);
|
|
923
1383
|
},
|
|
@@ -959,6 +1419,10 @@ var require_status = __commonJS({
|
|
|
959
1419
|
onChange: function(v) {
|
|
960
1420
|
askS[1](Object.assign({}, askS[0], { value: v }));
|
|
961
1421
|
},
|
|
1422
|
+
show: askS[0].show,
|
|
1423
|
+
onToggle: function() {
|
|
1424
|
+
askS[1](Object.assign({}, askS[0], { show: !askS[0].show }));
|
|
1425
|
+
},
|
|
962
1426
|
onCancel: function() {
|
|
963
1427
|
if (!askS[0].busy) askS[1](null);
|
|
964
1428
|
},
|
|
@@ -976,16 +1440,32 @@ var require_status = __commonJS({
|
|
|
976
1440
|
h(
|
|
977
1441
|
C.Field,
|
|
978
1442
|
{ h, label: "\u4E3B\u53E3\u4EE4\uFF08\u81F3\u5C11 12 \u4F4D\uFF09" },
|
|
979
|
-
h(
|
|
980
|
-
|
|
981
|
-
|
|
1443
|
+
h(SecretField, {
|
|
1444
|
+
h,
|
|
1445
|
+
autoComplete: "new-password",
|
|
1446
|
+
ariaLabel: "\u4E3B\u53E3\u4EE4",
|
|
1447
|
+
value: pass[0],
|
|
1448
|
+
show: showMainS[0],
|
|
1449
|
+
onChange: pass[1],
|
|
1450
|
+
onToggle: function() {
|
|
1451
|
+
showMainS[1](!showMainS[0]);
|
|
1452
|
+
}
|
|
1453
|
+
})
|
|
982
1454
|
),
|
|
983
1455
|
h(
|
|
984
1456
|
C.Field,
|
|
985
1457
|
{ h, label: "\u786E\u8BA4\u53E3\u4EE4" },
|
|
986
|
-
h(
|
|
987
|
-
|
|
988
|
-
|
|
1458
|
+
h(SecretField, {
|
|
1459
|
+
h,
|
|
1460
|
+
autoComplete: "new-password",
|
|
1461
|
+
ariaLabel: "\u786E\u8BA4\u53E3\u4EE4",
|
|
1462
|
+
value: pass2[0],
|
|
1463
|
+
show: showConfirmS[0],
|
|
1464
|
+
onChange: pass2[1],
|
|
1465
|
+
onToggle: function() {
|
|
1466
|
+
showConfirmS[1](!showConfirmS[0]);
|
|
1467
|
+
}
|
|
1468
|
+
})
|
|
989
1469
|
),
|
|
990
1470
|
h(
|
|
991
1471
|
C.Field,
|
|
@@ -1011,7 +1491,7 @@ var require_status = __commonJS({
|
|
|
1011
1491
|
run(function() {
|
|
1012
1492
|
return C.call(api, "vault.setup", { passphrase: pass[0], mode: mode[0] });
|
|
1013
1493
|
});
|
|
1014
|
-
} }, busy[0] ? "\u521D\u59CB\u5316\u4E2D\u2026" : "\u521B\u5EFA\u4FDD\u9669\u7BB1")
|
|
1494
|
+
} }, iconLabel(h, ShieldPlus2, busy[0] ? "\u521D\u59CB\u5316\u4E2D\u2026" : "\u521B\u5EFA\u4FDD\u9669\u7BB1"))
|
|
1015
1495
|
)
|
|
1016
1496
|
);
|
|
1017
1497
|
}
|
|
@@ -1043,6 +1523,10 @@ var require_status = __commonJS({
|
|
|
1043
1523
|
onChange: function(v) {
|
|
1044
1524
|
askS[1](Object.assign({}, askS[0], { value: v }));
|
|
1045
1525
|
},
|
|
1526
|
+
show: askS[0].show,
|
|
1527
|
+
onToggle: function() {
|
|
1528
|
+
askS[1](Object.assign({}, askS[0], { show: !askS[0].show }));
|
|
1529
|
+
},
|
|
1046
1530
|
onCancel: function() {
|
|
1047
1531
|
if (!askS[0].busy) askS[1](null);
|
|
1048
1532
|
},
|
|
@@ -1051,7 +1535,7 @@ var require_status = __commonJS({
|
|
|
1051
1535
|
return h(
|
|
1052
1536
|
"div",
|
|
1053
1537
|
{ className: "wbv" },
|
|
1054
|
-
h("h2", null, "\u4FDD\u9669\u7BB1\u5DF2\u9501\u5B9A"),
|
|
1538
|
+
h("h2", null, iconLabel(h, Lock2, "\u4FDD\u9669\u7BB1\u5DF2\u9501\u5B9A")),
|
|
1055
1539
|
h("p", { className: "wbv-muted" }, "\u8F93\u5165\u4E3B\u53E3\u4EE4\u89E3\u9501\u3002\u89E3\u9501\u72B6\u6001\u53EA\u4FDD\u5B58\u5728\u5F53\u524D\u8FDB\u7A0B\u5185\u5B58\uFF0C\u7A7A\u95F2\u8D85\u65F6\u4F1A\u81EA\u52A8\u9501\u5B9A\u3002"),
|
|
1056
1540
|
h(
|
|
1057
1541
|
"div",
|
|
@@ -1059,16 +1543,24 @@ var require_status = __commonJS({
|
|
|
1059
1543
|
h(
|
|
1060
1544
|
C.Field,
|
|
1061
1545
|
{ h, label: "\u4E3B\u53E3\u4EE4" },
|
|
1062
|
-
h(
|
|
1063
|
-
|
|
1064
|
-
|
|
1546
|
+
h(SecretField, {
|
|
1547
|
+
h,
|
|
1548
|
+
autoComplete: "current-password",
|
|
1549
|
+
ariaLabel: "\u4E3B\u53E3\u4EE4",
|
|
1550
|
+
value: pass[0],
|
|
1551
|
+
show: showUnlockS[0],
|
|
1552
|
+
onChange: pass[1],
|
|
1553
|
+
onToggle: function() {
|
|
1554
|
+
showUnlockS[1](!showUnlockS[0]);
|
|
1555
|
+
}
|
|
1556
|
+
})
|
|
1065
1557
|
),
|
|
1066
1558
|
h(C.Btn, { h, kind: "primary", disabled: busy[0], onClick: function() {
|
|
1067
1559
|
if (!pass[0]) return msg[1]("\u8BF7\u8F93\u5165\u53E3\u4EE4");
|
|
1068
1560
|
run(function() {
|
|
1069
1561
|
return C.call(api, "vault.unlock", { passphrase: pass[0] });
|
|
1070
1562
|
});
|
|
1071
|
-
} }, busy[0] ? "\u89E3\u9501\u4E2D\u2026" : "\u89E3\u9501")
|
|
1563
|
+
} }, iconLabel(h, Unlock, busy[0] ? "\u89E3\u9501\u4E2D\u2026" : "\u89E3\u9501"))
|
|
1072
1564
|
),
|
|
1073
1565
|
h(C.Notice, { h, kind: "error", text: msg[0] }),
|
|
1074
1566
|
h("p", { className: "wbv-muted" }, "\u6A21\u5F0F\uFF1A" + modeName(status.unlockMode) + "\uFF1B\u8FDE\u7EED\u5931\u8D25 5 \u6B21\u4F1A\u9501\u5B9A 5 \u5206\u949F\u3002")
|
|
@@ -1102,6 +1594,10 @@ var require_status = __commonJS({
|
|
|
1102
1594
|
onChange: function(v) {
|
|
1103
1595
|
askS[1](Object.assign({}, askS[0], { value: v }));
|
|
1104
1596
|
},
|
|
1597
|
+
show: askS[0].show,
|
|
1598
|
+
onToggle: function() {
|
|
1599
|
+
askS[1](Object.assign({}, askS[0], { show: !askS[0].show }));
|
|
1600
|
+
},
|
|
1105
1601
|
onCancel: function() {
|
|
1106
1602
|
if (!askS[0].busy) askS[1](null);
|
|
1107
1603
|
},
|
|
@@ -1110,7 +1606,7 @@ var require_status = __commonJS({
|
|
|
1110
1606
|
return h(
|
|
1111
1607
|
"div",
|
|
1112
1608
|
{ className: "wbv" },
|
|
1113
|
-
h("div", { className: "wbv-row" }, h("h2", { className: "wbv-grow" }, "\u51ED\u636E\u4FDD\u9669\u7BB1"), h(
|
|
1609
|
+
h("div", { className: "wbv-row" }, h("h2", { className: "wbv-grow" }, "\u51ED\u636E\u4FDD\u9669\u7BB1"), h(C.Pill, { h, kind: "ok" }, iconLabel(h, Unlock, "\u5DF2\u89E3\u9501"))),
|
|
1114
1610
|
h(
|
|
1115
1611
|
"div",
|
|
1116
1612
|
{ className: "wbv-grid" },
|
|
@@ -1127,7 +1623,7 @@ var require_status = __commonJS({
|
|
|
1127
1623
|
run(function() {
|
|
1128
1624
|
return C.call(api, "vault.lock");
|
|
1129
1625
|
});
|
|
1130
|
-
} }, "\u7ACB\u5373\u9501\u5B9A"),
|
|
1626
|
+
} }, iconLabel(h, Lock2, "\u7ACB\u5373\u9501\u5B9A")),
|
|
1131
1627
|
h(C.Btn, { h, onClick: function() {
|
|
1132
1628
|
askS[1]({ value: "", busy: false, error: "" });
|
|
1133
1629
|
} }, "\u5207\u56DE A \u6A21\u5F0F")
|
|
@@ -1144,111 +1640,79 @@ var require_status = __commonJS({
|
|
|
1144
1640
|
}
|
|
1145
1641
|
});
|
|
1146
1642
|
|
|
1147
|
-
//
|
|
1148
|
-
var
|
|
1149
|
-
|
|
1150
|
-
__iconData: () => __iconData9,
|
|
1151
|
-
default: () => Eye
|
|
1152
|
-
});
|
|
1153
|
-
var __iconData9, Eye;
|
|
1154
|
-
var init_eye = __esm({
|
|
1155
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/eye.mjs"() {
|
|
1156
|
-
init_createLucideIcon();
|
|
1157
|
-
__iconData9 = {
|
|
1158
|
-
name: "eye",
|
|
1159
|
-
size: 24,
|
|
1160
|
-
node: [
|
|
1161
|
-
[
|
|
1162
|
-
"path",
|
|
1163
|
-
{
|
|
1164
|
-
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
1165
|
-
key: "1nclc0"
|
|
1166
|
-
}
|
|
1167
|
-
],
|
|
1168
|
-
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
1169
|
-
]
|
|
1170
|
-
};
|
|
1171
|
-
__iconData9.node;
|
|
1172
|
-
Eye = createLucideIcon(__iconData9);
|
|
1173
|
-
}
|
|
1174
|
-
});
|
|
1175
|
-
|
|
1176
|
-
// node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/eye-off.mjs
|
|
1177
|
-
var eye_off_exports = {};
|
|
1178
|
-
__export(eye_off_exports, {
|
|
1179
|
-
__iconData: () => __iconData10,
|
|
1180
|
-
default: () => EyeOff
|
|
1181
|
-
});
|
|
1182
|
-
var __iconData10, EyeOff;
|
|
1183
|
-
var init_eye_off = __esm({
|
|
1184
|
-
"node_modules/.pnpm/lucide-react@1.70.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/eye-off.mjs"() {
|
|
1185
|
-
init_createLucideIcon();
|
|
1186
|
-
__iconData10 = {
|
|
1187
|
-
name: "eye-off",
|
|
1188
|
-
size: 24,
|
|
1189
|
-
node: [
|
|
1190
|
-
[
|
|
1191
|
-
"path",
|
|
1192
|
-
{
|
|
1193
|
-
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1194
|
-
key: "ct8e1f"
|
|
1195
|
-
}
|
|
1196
|
-
],
|
|
1197
|
-
["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242", key: "151rxh" }],
|
|
1198
|
-
[
|
|
1199
|
-
"path",
|
|
1200
|
-
{
|
|
1201
|
-
d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
|
|
1202
|
-
key: "13bj9a"
|
|
1203
|
-
}
|
|
1204
|
-
],
|
|
1205
|
-
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
1206
|
-
]
|
|
1207
|
-
};
|
|
1208
|
-
__iconData10.node;
|
|
1209
|
-
EyeOff = createLucideIcon(__iconData10);
|
|
1210
|
-
}
|
|
1211
|
-
});
|
|
1212
|
-
|
|
1213
|
-
// packages/addons/vault/client/ui/secret-field.cjs
|
|
1214
|
-
var require_secret_field = __commonJS({
|
|
1215
|
-
"packages/addons/vault/client/ui/secret-field.cjs"(exports2, module2) {
|
|
1643
|
+
// packages/addons/vault/client/ui/lock.cjs
|
|
1644
|
+
var require_lock = __commonJS({
|
|
1645
|
+
"packages/addons/vault/client/ui/lock.cjs"(exports2, module2) {
|
|
1216
1646
|
"use strict";
|
|
1217
|
-
var
|
|
1218
|
-
var
|
|
1219
|
-
function
|
|
1647
|
+
var GLYPHS2 = require_icons2().ICONS;
|
|
1648
|
+
var POLL_MS = 4e3;
|
|
1649
|
+
function useVaultLock(options) {
|
|
1650
|
+
var React = options.React;
|
|
1651
|
+
var api = options.api;
|
|
1652
|
+
var C = options.C;
|
|
1653
|
+
var every = Number(options.pollMs) > 0 ? Number(options.pollMs) : Number(obj.POLL_MS) || POLL_MS;
|
|
1654
|
+
var st = React.useState({ ready: false, locked: true, initialized: false, error: "" });
|
|
1655
|
+
var tick = React.useState(0);
|
|
1656
|
+
function read() {
|
|
1657
|
+
return C.call(api, "vault.status").then(function(data) {
|
|
1658
|
+
st[1](function(old) {
|
|
1659
|
+
var next = {
|
|
1660
|
+
ready: true,
|
|
1661
|
+
locked: !(data && data.locked === false),
|
|
1662
|
+
initialized: !!(data && data.initialized),
|
|
1663
|
+
error: ""
|
|
1664
|
+
};
|
|
1665
|
+
if (old.ready === next.ready && old.locked === next.locked && old.initialized === next.initialized && !old.error) return old;
|
|
1666
|
+
return next;
|
|
1667
|
+
});
|
|
1668
|
+
}).catch(function(e) {
|
|
1669
|
+
st[1](function(old) {
|
|
1670
|
+
return Object.assign({}, old, { ready: true, locked: true, error: C.errText(e) });
|
|
1671
|
+
});
|
|
1672
|
+
});
|
|
1673
|
+
}
|
|
1674
|
+
React.useEffect(function() {
|
|
1675
|
+
var alive = true;
|
|
1676
|
+
function poll() {
|
|
1677
|
+
if (alive) read();
|
|
1678
|
+
}
|
|
1679
|
+
poll();
|
|
1680
|
+
var timer = setInterval(poll, every);
|
|
1681
|
+
if (timer && typeof timer.unref === "function") timer.unref();
|
|
1682
|
+
return function() {
|
|
1683
|
+
alive = false;
|
|
1684
|
+
clearInterval(timer);
|
|
1685
|
+
};
|
|
1686
|
+
}, [tick[0]]);
|
|
1687
|
+
return {
|
|
1688
|
+
ready: st[0].ready,
|
|
1689
|
+
locked: st[0].locked,
|
|
1690
|
+
initialized: st[0].initialized,
|
|
1691
|
+
error: st[0].error,
|
|
1692
|
+
refresh: function() {
|
|
1693
|
+
tick[1](tick[0] + 1);
|
|
1694
|
+
}
|
|
1695
|
+
};
|
|
1696
|
+
}
|
|
1697
|
+
function Panel(props) {
|
|
1220
1698
|
var h = props.h;
|
|
1221
|
-
var
|
|
1222
|
-
var
|
|
1223
|
-
var Ico = show ? EyeOff2 : Eye2;
|
|
1699
|
+
var C = props.C;
|
|
1700
|
+
var en = props.lang === "en";
|
|
1224
1701
|
return h(
|
|
1225
1702
|
"div",
|
|
1226
|
-
{ className: "wbv
|
|
1227
|
-
h(
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
}
|
|
1236
|
-
}),
|
|
1237
|
-
h("button", {
|
|
1238
|
-
type: "button",
|
|
1239
|
-
className: "wbv-eye",
|
|
1240
|
-
title: label,
|
|
1241
|
-
"aria-label": label,
|
|
1242
|
-
"aria-pressed": show ? "true" : "false",
|
|
1243
|
-
onClick: function(e) {
|
|
1244
|
-
e.preventDefault();
|
|
1245
|
-
e.stopPropagation();
|
|
1246
|
-
props.onToggle();
|
|
1247
|
-
}
|
|
1248
|
-
}, h(Ico, { size: 15, strokeWidth: 2, "aria-hidden": "true" }))
|
|
1703
|
+
{ className: "wbv" },
|
|
1704
|
+
h(
|
|
1705
|
+
"div",
|
|
1706
|
+
{ className: "wbv-lock-card", role: "status", "aria-live": "polite" },
|
|
1707
|
+
h(GLYPHS2.lock, { size: 22, strokeWidth: 2, "aria-hidden": "true", className: "wbv-lock-ico" }),
|
|
1708
|
+
h("div", { className: "wbv-lock-title" }, en ? "Vault is locked" : "\u4FDD\u9669\u7BB1\u5DF2\u9501\u5B9A"),
|
|
1709
|
+
h("div", { className: "wbv-muted" }, en ? "Unlock it on the Vault page first; this page recovers automatically once unlocked." : "\u8BF7\u5148\u5728\u300C\u4FDD\u9669\u7BB1\u300D\u9875\u89E3\u9501\uFF1B\u89E3\u9501\u540E\u672C\u9875\u4F1A\u81EA\u52A8\u6062\u590D\u5217\u8868\u4E0E\u8BE6\u60C5\u3002"),
|
|
1710
|
+
props.error ? h(C.Notice, { h, kind: "error", text: props.error }) : null
|
|
1711
|
+
)
|
|
1249
1712
|
);
|
|
1250
1713
|
}
|
|
1251
|
-
|
|
1714
|
+
var obj = { use: useVaultLock, Panel, POLL_MS };
|
|
1715
|
+
module2.exports = obj;
|
|
1252
1716
|
}
|
|
1253
1717
|
});
|
|
1254
1718
|
|
|
@@ -1277,9 +1741,18 @@ var require_kinds = __commonJS({
|
|
|
1277
1741
|
var require_secrets = __commonJS({
|
|
1278
1742
|
"packages/addons/vault/client/views/secrets.cjs"(exports2, module2) {
|
|
1279
1743
|
"use strict";
|
|
1744
|
+
var GLYPHS2 = require_icons2().ICONS;
|
|
1280
1745
|
var C = require_common();
|
|
1281
1746
|
var AskPassphrase = require_ask_passphrase();
|
|
1747
|
+
var iconLabel = require_icon_label();
|
|
1748
|
+
var Refresh = GLYPHS2["refresh-cw"];
|
|
1749
|
+
var Unlock = GLYPHS2["lock-open"];
|
|
1750
|
+
var Plus2 = GLYPHS2["plus"];
|
|
1751
|
+
var Eye2 = GLYPHS2["eye"];
|
|
1752
|
+
var Pencil2 = GLYPHS2["pencil"];
|
|
1753
|
+
var Trash2 = GLYPHS2["trash-2"];
|
|
1282
1754
|
var SecretField = require_secret_field();
|
|
1755
|
+
var Lock2 = require_lock();
|
|
1283
1756
|
var K = require_kinds();
|
|
1284
1757
|
var KIND_LABEL = K.KIND_LABEL;
|
|
1285
1758
|
module2.exports = function SecretsView(props) {
|
|
@@ -1300,8 +1773,15 @@ var require_secrets = __commonJS({
|
|
|
1300
1773
|
var revealS = React.useState(null);
|
|
1301
1774
|
var askS = React.useState(null);
|
|
1302
1775
|
var unlockS = React.useState(null);
|
|
1776
|
+
var guard = Lock2.use({ api, C, React });
|
|
1777
|
+
var inflight = React.useState({ seq: 0 })[0];
|
|
1303
1778
|
var rows = listS[0].rows;
|
|
1304
1779
|
function load() {
|
|
1780
|
+
if (guard.locked) {
|
|
1781
|
+
listS[1]({ loading: false, rows: [], error: "" });
|
|
1782
|
+
return;
|
|
1783
|
+
}
|
|
1784
|
+
var seq = inflight.seq += 1;
|
|
1305
1785
|
listS[1](function(old) {
|
|
1306
1786
|
return Object.assign({}, old, { loading: true });
|
|
1307
1787
|
});
|
|
@@ -1314,16 +1794,31 @@ var require_secrets = __commonJS({
|
|
|
1314
1794
|
return { items: [] };
|
|
1315
1795
|
})
|
|
1316
1796
|
]).then(function(r) {
|
|
1797
|
+
if (inflight.seq !== seq) return;
|
|
1317
1798
|
listS[1]({ loading: false, rows: r[0] && (r[0].items || r[0].secrets) || [], error: "" });
|
|
1318
1799
|
statusS[1](r[1]);
|
|
1319
1800
|
setsS[1](r[2] && r[2].items || []);
|
|
1320
1801
|
}).catch(function(e) {
|
|
1802
|
+
if (inflight.seq !== seq) return;
|
|
1321
1803
|
listS[1]({ loading: false, rows: [], error: C.errText(e) });
|
|
1322
1804
|
});
|
|
1323
1805
|
}
|
|
1324
1806
|
React.useEffect(function() {
|
|
1807
|
+
if (!guard.ready) return;
|
|
1808
|
+
inflight.seq += 1;
|
|
1809
|
+
if (guard.locked) {
|
|
1810
|
+
listS[1]({ loading: false, rows: [], error: "" });
|
|
1811
|
+
revealS[1](null);
|
|
1812
|
+
askS[1](null);
|
|
1813
|
+
unlockS[1](null);
|
|
1814
|
+
formS[1](emptyForm());
|
|
1815
|
+
editingS[1](false);
|
|
1816
|
+
showSecretS[1](false);
|
|
1817
|
+
msgS[1]("");
|
|
1818
|
+
return;
|
|
1819
|
+
}
|
|
1325
1820
|
load();
|
|
1326
|
-
}, []);
|
|
1821
|
+
}, [guard.ready, guard.locked]);
|
|
1327
1822
|
function startCreate() {
|
|
1328
1823
|
formS[1](emptyForm());
|
|
1329
1824
|
showSecretS[1](false);
|
|
@@ -1479,6 +1974,8 @@ var require_secrets = __commonJS({
|
|
|
1479
1974
|
setsS[0].forEach(function(s) {
|
|
1480
1975
|
setIndex[s.id] = s.name;
|
|
1481
1976
|
});
|
|
1977
|
+
if (!guard.ready) return h("div", { className: "wbv" }, h(C.Empty, { h, text: "\u6B63\u5728\u8BFB\u53D6\u4FDD\u9669\u7BB1\u72B6\u6001\u2026" }));
|
|
1978
|
+
if (guard.locked) return h(Lock2.Panel, { h, C, lang, error: guard.error });
|
|
1482
1979
|
return h(
|
|
1483
1980
|
"div",
|
|
1484
1981
|
{ className: "wbv" },
|
|
@@ -1511,11 +2008,11 @@ var require_secrets = __commonJS({
|
|
|
1511
2008
|
return h("option", { key: k, value: k }, KIND_LABEL[k]);
|
|
1512
2009
|
})
|
|
1513
2010
|
),
|
|
1514
|
-
h(C.Btn, { h, onClick: load }, "\u5237\u65B0"),
|
|
2011
|
+
h(C.Btn, { h, onClick: load }, iconLabel(h, Refresh, "\u5237\u65B0")),
|
|
1515
2012
|
statusS[0] && statusS[0].locked ? h(C.Btn, { h, kind: "primary", onClick: function() {
|
|
1516
2013
|
askUnlock("");
|
|
1517
|
-
} }, "\u89E3\u9501") : null,
|
|
1518
|
-
h(C.Btn, { h, kind: "primary", onClick: startCreate }, "\u65B0\u589E\u51ED\u636E")
|
|
2014
|
+
} }, iconLabel(h, Unlock, "\u89E3\u9501")) : null,
|
|
2015
|
+
h(C.Btn, { h, kind: "primary", onClick: startCreate }, iconLabel(h, Plus2, "\u65B0\u589E\u51ED\u636E"))
|
|
1519
2016
|
),
|
|
1520
2017
|
h("p", { className: "wbv-muted" }, "\u51ED\u636E\u6309\u300C\u96C6\u5408\u300D\u7EC4\u7EC7\uFF1A\u4E00\u6761\u51ED\u636E\u53EF\u4EE5\u8FDB\u591A\u4E2A\u96C6\u5408\uFF0C\u4E00\u4E2A\u96C6\u5408\u53EF\u4EE5\u6302\u5230\u591A\u4E2A\u5206\u7EC4\u3002\u660E\u6587\u53EA\u5728\u672C\u673A\u89E3\u9501\u540E\u53EF\u89C1\u3002"),
|
|
1521
2018
|
statusS[0] && statusS[0].locked ? h(C.Notice, { h, kind: "error", text: "\u4FDD\u9669\u7BB1\u5DF2\u9501\u5B9A\uFF08" + (statusS[0].unlockMode || "A") + " \u6A21\u5F0F\uFF09\uFF1A\u65B0\u589E\u3001\u7F16\u8F91\u548C\u67E5\u770B\u660E\u6587\u90FD\u9700\u8981\u5148\u89E3\u9501\u3002\u70B9\u53F3\u4E0A\u89D2\u300C\u89E3\u9501\u300D\uFF0C\u6216\u76F4\u63A5\u4FDD\u5B58\u65F6\u6309\u63D0\u793A\u89E3\u9501\u3002" }) : null,
|
|
@@ -1525,8 +2022,8 @@ var require_secrets = __commonJS({
|
|
|
1525
2022
|
{ className: "wbv-empty-card" },
|
|
1526
2023
|
h("div", { className: "wbv-empty-title" }, qS[0] || kindS[0] ? "\u6CA1\u6709\u5339\u914D\u7684\u51ED\u636E" : "\u8FD8\u6CA1\u6709\u51ED\u636E"),
|
|
1527
2024
|
h("div", { className: "wbv-muted" }, qS[0] || kindS[0] ? "\u6362\u4E2A\u5173\u952E\u8BCD\u6216\u7C7B\u578B\u8BD5\u8BD5\u3002" : "\u65B0\u589E\u4E00\u6761\u540E\uFF0C\u628A\u5B83\u52A0\u5165\u96C6\u5408\uFF1B\u7AD9\u70B9\u8D26\u53F7\u4F1A\u81EA\u52A8\u7528\u8D26\u53F7 id \u4F5C\u4E3A\u96C6\u5408\u540D\u3002"),
|
|
1528
|
-
h("div", { className: "wbv-row" }, h(C.Btn, { h, kind: "primary", onClick: startCreate }, "\u65B0\u589E\u51ED\u636E"))
|
|
1529
|
-
) : h(
|
|
2025
|
+
h("div", { className: "wbv-row" }, h(C.Btn, { h, kind: "primary", onClick: startCreate }, iconLabel(h, Plus2, "\u65B0\u589E\u51ED\u636E")))
|
|
2026
|
+
) : h("div", { className: "wbv-table-scroll", role: "region", "aria-label": "\u51ED\u636E\u5217\u8868", tabIndex: 0 }, h(
|
|
1530
2027
|
"table",
|
|
1531
2028
|
{ className: "wbv-table" },
|
|
1532
2029
|
h("thead", null, h("tr", null, ["\u540D\u79F0", "\u7C7B\u578B", "\u6240\u5C5E\u96C6\u5408", "\u5907\u6CE8", "\u6700\u8FD1\u4F7F\u7528", "\u64CD\u4F5C"].map(function(x) {
|
|
@@ -1555,17 +2052,17 @@ var require_secrets = __commonJS({
|
|
|
1555
2052
|
{ className: "wbv-inline" },
|
|
1556
2053
|
h(C.Btn, { h, kind: "ghost", onClick: function() {
|
|
1557
2054
|
reveal(row);
|
|
1558
|
-
} }, "\u67E5\u770B"),
|
|
2055
|
+
} }, iconLabel(h, Eye2, "\u67E5\u770B")),
|
|
1559
2056
|
h(C.Btn, { h, kind: "ghost", onClick: function() {
|
|
1560
2057
|
startEdit(row);
|
|
1561
|
-
} }, "\u7F16\u8F91"),
|
|
1562
|
-
h(C.Btn, { h, kind: "ghost", onClick: function() {
|
|
2058
|
+
} }, iconLabel(h, Pencil2, "\u7F16\u8F91")),
|
|
2059
|
+
h(C.Btn, { h, kind: "ghost wbv-delete", onClick: function() {
|
|
1563
2060
|
del(row);
|
|
1564
|
-
} }, "\u5220\u9664")
|
|
2061
|
+
} }, iconLabel(h, Trash2, "\u5220\u9664"))
|
|
1565
2062
|
))
|
|
1566
2063
|
);
|
|
1567
2064
|
}))
|
|
1568
|
-
),
|
|
2065
|
+
)),
|
|
1569
2066
|
editingS[0] ? h(
|
|
1570
2067
|
"div",
|
|
1571
2068
|
{ className: "wbv-modal", onClick: function() {
|
|
@@ -1665,6 +2162,10 @@ var require_secrets = __commonJS({
|
|
|
1665
2162
|
onChange: function(v) {
|
|
1666
2163
|
unlockS[1](Object.assign({}, unlockS[0], { value: v }));
|
|
1667
2164
|
},
|
|
2165
|
+
show: unlockS[0].show,
|
|
2166
|
+
onToggle: function() {
|
|
2167
|
+
unlockS[1](Object.assign({}, unlockS[0], { show: !unlockS[0].show }));
|
|
2168
|
+
},
|
|
1668
2169
|
onCancel: function() {
|
|
1669
2170
|
if (!unlockS[0].busy) unlockS[1](null);
|
|
1670
2171
|
},
|
|
@@ -1672,6 +2173,8 @@ var require_secrets = __commonJS({
|
|
|
1672
2173
|
}) : null,
|
|
1673
2174
|
askS[0] ? h(AskPassphrase, { h, C, title: "\u67E5\u770B\u51ED\u636E\u660E\u6587", hint: "\u5F53\u524D\u662F B \u6A21\u5F0F\uFF0C\u67E5\u770B\u660E\u6587\u9700\u8981\u518D\u6B21\u8F93\u5165\u4E3B\u53E3\u4EE4\u3002", label: "\u4E3B\u53E3\u4EE4\uFF08" + askS[0].row.name + "\uFF09", value: askS[0].value, busy: askS[0].busy, error: askS[0].error, onChange: function(v) {
|
|
1674
2175
|
askS[1](Object.assign({}, askS[0], { value: v }));
|
|
2176
|
+
}, show: askS[0].show, onToggle: function() {
|
|
2177
|
+
askS[1](Object.assign({}, askS[0], { show: !askS[0].show }));
|
|
1675
2178
|
}, onCancel: function() {
|
|
1676
2179
|
if (!askS[0].busy) askS[1](null);
|
|
1677
2180
|
}, onConfirm: confirmPassphrase }) : null,
|
|
@@ -1722,6 +2225,7 @@ var require_sets = __commonJS({
|
|
|
1722
2225
|
"use strict";
|
|
1723
2226
|
var C = require_common();
|
|
1724
2227
|
var K = require_kinds();
|
|
2228
|
+
var Lock2 = require_lock();
|
|
1725
2229
|
module2.exports = function SetsView(props) {
|
|
1726
2230
|
var h = props.h;
|
|
1727
2231
|
var api = props.api;
|
|
@@ -1737,7 +2241,14 @@ var require_sets = __commonJS({
|
|
|
1737
2241
|
var busyS = React.useState(false);
|
|
1738
2242
|
var draftS = React.useState(null);
|
|
1739
2243
|
var pickS = React.useState([]);
|
|
2244
|
+
var guard = Lock2.use({ api, C, React });
|
|
2245
|
+
var inflight = React.useState({ seq: 0 })[0];
|
|
1740
2246
|
function load() {
|
|
2247
|
+
if (guard.locked) {
|
|
2248
|
+
listS[1]({ loading: false, items: [], error: "" });
|
|
2249
|
+
return;
|
|
2250
|
+
}
|
|
2251
|
+
var seq = inflight.seq += 1;
|
|
1741
2252
|
listS[1](function(old) {
|
|
1742
2253
|
return Object.assign({}, old, { loading: true });
|
|
1743
2254
|
});
|
|
@@ -1746,28 +2257,47 @@ var require_sets = __commonJS({
|
|
|
1746
2257
|
C.call(api, "vault.secretList", {}),
|
|
1747
2258
|
C.call(api, "vault.groupList", {})
|
|
1748
2259
|
]).then(function(r) {
|
|
2260
|
+
if (inflight.seq !== seq) return;
|
|
1749
2261
|
listS[1]({ loading: false, items: r[0] && r[0].items || [], error: "" });
|
|
1750
2262
|
secretsS[1](r[1] && (r[1].items || r[1].secrets) || []);
|
|
1751
2263
|
groupsS[1](r[2] && r[2].items || []);
|
|
1752
2264
|
if (activeS[0]) return open(activeS[0]).then(null, function() {
|
|
1753
2265
|
});
|
|
1754
2266
|
}).catch(function(e) {
|
|
2267
|
+
if (inflight.seq !== seq) return;
|
|
1755
2268
|
listS[1]({ loading: false, items: [], error: C.errText(e) });
|
|
1756
2269
|
});
|
|
1757
2270
|
}
|
|
1758
2271
|
React.useEffect(function() {
|
|
2272
|
+
if (!guard.ready) return;
|
|
2273
|
+
inflight.seq += 1;
|
|
2274
|
+
if (guard.locked) {
|
|
2275
|
+
listS[1]({ loading: false, items: [], error: "" });
|
|
2276
|
+
secretsS[1]([]);
|
|
2277
|
+
groupsS[1]([]);
|
|
2278
|
+
activeS[1](null);
|
|
2279
|
+
detailS[1]({ setId: "", secrets: [], groups: [], error: "" });
|
|
2280
|
+
draftS[1](null);
|
|
2281
|
+
pickS[1]([]);
|
|
2282
|
+
msgS[1]("");
|
|
2283
|
+
return;
|
|
2284
|
+
}
|
|
1759
2285
|
load();
|
|
1760
|
-
}, []);
|
|
2286
|
+
}, [guard.ready, guard.locked]);
|
|
1761
2287
|
function secretName(id) {
|
|
1762
2288
|
for (var i = 0; i < secretsS[0].length; i += 1) if (secretsS[0][i].id === id) return secretsS[0][i].name;
|
|
1763
2289
|
return id;
|
|
1764
2290
|
}
|
|
1765
2291
|
function open(row) {
|
|
2292
|
+
if (guard.locked) return null;
|
|
1766
2293
|
activeS[1](row);
|
|
1767
2294
|
detailS[1]({ setId: row.id, secrets: [], groups: [], error: "" });
|
|
2295
|
+
var seq = inflight.seq += 1;
|
|
1768
2296
|
return C.call(api, "vault.setGet", { id: row.id }).then(function(r) {
|
|
2297
|
+
if (inflight.seq !== seq) return;
|
|
1769
2298
|
detailS[1]({ setId: row.id, secrets: r && r.secrets || [], groups: r && r.groupIds || [], error: "" });
|
|
1770
2299
|
}).catch(function(e) {
|
|
2300
|
+
if (inflight.seq !== seq) return;
|
|
1771
2301
|
detailS[1]({ setId: row.id, secrets: [], groups: [], error: C.errText(e) });
|
|
1772
2302
|
});
|
|
1773
2303
|
}
|
|
@@ -1863,6 +2393,8 @@ var require_sets = __commonJS({
|
|
|
1863
2393
|
var candidates = secretsS[0].filter(function(s) {
|
|
1864
2394
|
return !inSet[s.id];
|
|
1865
2395
|
});
|
|
2396
|
+
if (!guard.ready) return h("div", { className: "wbv" }, h(C.Empty, { h, text: "\u6B63\u5728\u8BFB\u53D6\u4FDD\u9669\u7BB1\u72B6\u6001\u2026" }));
|
|
2397
|
+
if (guard.locked) return h(Lock2.Panel, { h, C, lang, error: guard.error });
|
|
1866
2398
|
return h(
|
|
1867
2399
|
"div",
|
|
1868
2400
|
{ className: "wbv" },
|
|
@@ -2096,6 +2628,8 @@ var require_filter_checklist = __commonJS({
|
|
|
2096
2628
|
var onLoadMore = props.onLoadMore;
|
|
2097
2629
|
var onClear = props.onClear || function() {
|
|
2098
2630
|
};
|
|
2631
|
+
var single = props.mode === "single";
|
|
2632
|
+
var onPick = typeof props.onPick === "function" ? props.onPick : onToggle;
|
|
2099
2633
|
function toggle(id) {
|
|
2100
2634
|
if (disabled) return;
|
|
2101
2635
|
onToggle(id);
|
|
@@ -2108,8 +2642,8 @@ var require_filter_checklist = __commonJS({
|
|
|
2108
2642
|
"div",
|
|
2109
2643
|
{ className: "wbck-head" },
|
|
2110
2644
|
h("span", { className: "wbck-grow" }, title + (total ? " \xB7 " + total : "")),
|
|
2111
|
-
selected.length ? h("span", { className: "wbck-sel" }, selectedText + " " + selected.length) : null,
|
|
2112
|
-
selected.length || query ? h("button", {
|
|
2645
|
+
!single && selected.length ? h("span", { className: "wbck-sel" }, selectedText + " " + selected.length) : null,
|
|
2646
|
+
!single && (selected.length || query) ? h("button", {
|
|
2113
2647
|
type: "button",
|
|
2114
2648
|
className: "wbck-clear",
|
|
2115
2649
|
title: clearText,
|
|
@@ -2126,6 +2660,25 @@ var require_filter_checklist = __commonJS({
|
|
|
2126
2660
|
} else {
|
|
2127
2661
|
body = items.map(function(x) {
|
|
2128
2662
|
var on = selected.indexOf(String(x.id)) >= 0;
|
|
2663
|
+
if (single) {
|
|
2664
|
+
return h(
|
|
2665
|
+
"button",
|
|
2666
|
+
{
|
|
2667
|
+
key: x.id,
|
|
2668
|
+
type: "button",
|
|
2669
|
+
role: "radio",
|
|
2670
|
+
"aria-checked": on ? "true" : "false",
|
|
2671
|
+
className: "wbck-opt" + (on ? " is-on" : ""),
|
|
2672
|
+
disabled,
|
|
2673
|
+
onClick: function() {
|
|
2674
|
+
if (disabled) return;
|
|
2675
|
+
onPick(x.id);
|
|
2676
|
+
}
|
|
2677
|
+
},
|
|
2678
|
+
h("span", { className: "wbck-nm", title: x.name }, x.name),
|
|
2679
|
+
x.meta ? h("span", { className: "wbck-meta" }, x.meta) : null
|
|
2680
|
+
);
|
|
2681
|
+
}
|
|
2129
2682
|
return h(
|
|
2130
2683
|
"label",
|
|
2131
2684
|
{ key: x.id, className: "wbck-opt" + (on ? " is-on" : "") },
|
|
@@ -2168,6 +2721,8 @@ var require_filter_checklist = __commonJS({
|
|
|
2168
2721
|
h("div", {
|
|
2169
2722
|
className: "wbck-list",
|
|
2170
2723
|
onScroll: scroll,
|
|
2724
|
+
role: single ? "radiogroup" : void 0,
|
|
2725
|
+
"aria-label": single ? props.groupLabel || searchPlaceholder : void 0,
|
|
2171
2726
|
"aria-busy": loading ? "true" : "false"
|
|
2172
2727
|
}, body)
|
|
2173
2728
|
);
|
|
@@ -2183,6 +2738,7 @@ var require_groups = __commonJS({
|
|
|
2183
2738
|
"use strict";
|
|
2184
2739
|
var C = require_common();
|
|
2185
2740
|
var FilterChecklist = require_filter_checklist();
|
|
2741
|
+
var Lock2 = require_lock();
|
|
2186
2742
|
module2.exports = function GroupsView(props) {
|
|
2187
2743
|
var h = props.h;
|
|
2188
2744
|
var api = props.api;
|
|
@@ -2196,7 +2752,14 @@ var require_groups = __commonJS({
|
|
|
2196
2752
|
var setsS = React.useState([]);
|
|
2197
2753
|
var delS = React.useState(null);
|
|
2198
2754
|
var pickS = React.useState({ q: "", rows: [], page: 1, loading: false });
|
|
2755
|
+
var guard = Lock2.use({ api, C, React });
|
|
2756
|
+
var inflight = React.useState({ seq: 0 })[0];
|
|
2199
2757
|
function load() {
|
|
2758
|
+
if (guard.locked) {
|
|
2759
|
+
listS[1]({ loading: false, rows: [], error: "" });
|
|
2760
|
+
return;
|
|
2761
|
+
}
|
|
2762
|
+
var seq = inflight.seq += 1;
|
|
2200
2763
|
listS[1](function(old) {
|
|
2201
2764
|
return Object.assign({}, old, { loading: true });
|
|
2202
2765
|
});
|
|
@@ -2206,15 +2769,29 @@ var require_groups = __commonJS({
|
|
|
2206
2769
|
return { items: [] };
|
|
2207
2770
|
})
|
|
2208
2771
|
]).then(function(r) {
|
|
2772
|
+
if (inflight.seq !== seq) return;
|
|
2209
2773
|
listS[1]({ loading: false, rows: r[0] && r[0].items || [], error: "" });
|
|
2210
2774
|
setsS[1](r[1] && r[1].items || []);
|
|
2211
2775
|
}).catch(function(e) {
|
|
2776
|
+
if (inflight.seq !== seq) return;
|
|
2212
2777
|
listS[1]({ loading: false, rows: [], error: C.errText(e) });
|
|
2213
2778
|
});
|
|
2214
2779
|
}
|
|
2215
2780
|
React.useEffect(function() {
|
|
2781
|
+
if (!guard.ready) return;
|
|
2782
|
+
inflight.seq += 1;
|
|
2783
|
+
if (guard.locked) {
|
|
2784
|
+
listS[1]({ loading: false, rows: [], error: "" });
|
|
2785
|
+
setsS[1]([]);
|
|
2786
|
+
openS[1](null);
|
|
2787
|
+
createS[1](null);
|
|
2788
|
+
delS[1](null);
|
|
2789
|
+
pickS[1]({ q: "", rows: [], page: 1, loading: false });
|
|
2790
|
+
msgS[1]("");
|
|
2791
|
+
return;
|
|
2792
|
+
}
|
|
2216
2793
|
load();
|
|
2217
|
-
}, []);
|
|
2794
|
+
}, [guard.ready, guard.locked]);
|
|
2218
2795
|
function openCreate() {
|
|
2219
2796
|
createS[1]({ name: "", description: "", setIds: [], error: "", busy: false });
|
|
2220
2797
|
}
|
|
@@ -2333,10 +2910,14 @@ var require_groups = __commonJS({
|
|
|
2333
2910
|
});
|
|
2334
2911
|
}
|
|
2335
2912
|
function open(row) {
|
|
2913
|
+
if (guard.locked) return;
|
|
2336
2914
|
openS[1]({ group: row, items: [], loading: true, error: "" });
|
|
2915
|
+
var seq = inflight.seq += 1;
|
|
2337
2916
|
C.call(api, "vault.subjectsOf", { groupId: row.id }).then(function(r) {
|
|
2917
|
+
if (inflight.seq !== seq) return;
|
|
2338
2918
|
openS[1]({ group: row, items: r && r.items || [], loading: false, error: "" });
|
|
2339
2919
|
}).catch(function(e) {
|
|
2920
|
+
if (inflight.seq !== seq) return;
|
|
2340
2921
|
openS[1]({ group: row, items: [], loading: false, error: C.errText(e) });
|
|
2341
2922
|
});
|
|
2342
2923
|
}
|
|
@@ -2368,6 +2949,8 @@ var require_groups = __commonJS({
|
|
|
2368
2949
|
msgS[1](C.errText(e));
|
|
2369
2950
|
});
|
|
2370
2951
|
}
|
|
2952
|
+
if (!guard.ready) return h("div", { className: "wbv" }, h(C.Empty, { h, text: "\u6B63\u5728\u8BFB\u53D6\u4FDD\u9669\u7BB1\u72B6\u6001\u2026" }));
|
|
2953
|
+
if (guard.locked) return h(Lock2.Panel, { h, C, lang, error: guard.error });
|
|
2371
2954
|
return h(
|
|
2372
2955
|
"div",
|
|
2373
2956
|
{ className: "wbv" },
|
|
@@ -2671,6 +3254,10 @@ var require_config = __commonJS({
|
|
|
2671
3254
|
onChange: function(v) {
|
|
2672
3255
|
askS[1](Object.assign({}, askS[0], { value: v }));
|
|
2673
3256
|
},
|
|
3257
|
+
show: askS[0].show,
|
|
3258
|
+
onToggle: function() {
|
|
3259
|
+
askS[1](Object.assign({}, askS[0], { show: !askS[0].show }));
|
|
3260
|
+
},
|
|
2674
3261
|
onCancel: function() {
|
|
2675
3262
|
if (!askS[0].busy) askS[1](null);
|
|
2676
3263
|
},
|
|
@@ -3975,8 +4562,21 @@ var require_action_schema_style = __commonJS({
|
|
|
3975
4562
|
"." + P + " select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}",
|
|
3976
4563
|
"." + P + "-list{display:flex;flex-direction:column;gap:8px}",
|
|
3977
4564
|
"." + P + "-card{border:1px solid var(--wb-border,#e3e5e9);border-radius:10px;padding:10px 12px;background:var(--wb-surface,var(--dsw-alias-bg-layer-1,transparent));display:flex;flex-direction:column;gap:8px;min-width:0}",
|
|
3978
|
-
"." + P + "-cardhead{display:
|
|
3979
|
-
"." + P + "-
|
|
4565
|
+
"." + P + "-cardhead{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px}",
|
|
4566
|
+
"." + P + "-cardmeta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;min-height:24px}",
|
|
4567
|
+
"." + P + "-cardhead code{font-weight:640;overflow-wrap:anywhere;min-width:0}",
|
|
4568
|
+
"." + P + "-hintline{margin:0;color:var(--dsw-alias-label-tertiary,inherit);font-size:11.5px;line-height:1.5}",
|
|
4569
|
+
"." + P + "-toggle{display:inline-flex;align-items:center;gap:6px;min-height:24px;padding:0 2px;border:0;background:transparent;font:inherit;font-size:11.5px;color:var(--wb-muted);cursor:pointer}",
|
|
4570
|
+
"." + P + "-track{display:inline-flex;align-items:center;box-sizing:border-box;width:30px;height:18px;padding:2px;border:1px solid var(--wb-muted);border-radius:999px;background:var(--wb-surface);color:var(--wb-muted)}",
|
|
4571
|
+
"." + P + "-track::before{content:'';width:12px;height:12px;border-radius:50%;background:currentColor;transition:transform .15s ease}",
|
|
4572
|
+
"." + P + "-toggle[aria-checked=true] ." + P + "-track{background:var(--wb-accent);border-color:var(--wb-accent);color:var(--wb-card)}",
|
|
4573
|
+
"." + P + "-toggle[aria-checked=true] ." + P + "-track::before{transform:translateX(12px)}",
|
|
4574
|
+
"." + P + "-toggle:hover:not(:disabled) ." + P + "-track{outline:1px solid var(--wb-accent)}",
|
|
4575
|
+
"." + P + "-toggle:focus-visible{outline:2px solid var(--wb-accent);outline-offset:2px}",
|
|
4576
|
+
"." + P + "-toggle:disabled{opacity:.6;cursor:progress}",
|
|
4577
|
+
"@media(prefers-reduced-motion:reduce){." + P + "-track::before{transition:none}}",
|
|
4578
|
+
// 安全约束(不可放开):用警示色描边,和可切换的开关区分开。
|
|
4579
|
+
"." + P + "-locked{border-color:var(--wb-warn,#b7791f);color:var(--wb-warn,#b7791f)}",
|
|
3980
4580
|
"." + P + "-desc{margin:0;color:var(--dsw-alias-label-secondary,inherit);line-height:1.55;font-size:12.5px}",
|
|
3981
4581
|
// 搜索命中:用品牌色透明度叠加而不是写死浅色,深浅主题都可读;继承文字颜色、不覆盖 ::selection。
|
|
3982
4582
|
"." + P + " mark." + P + "-hit{background:color-mix(in oklab,var(--dsw-alias-brand-primary,#4f6ef7) 22%,transparent);color:inherit;border-radius:2px;padding:0;font:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone}",
|
|
@@ -4028,6 +4628,15 @@ var require_action_schema_view = __commonJS({
|
|
|
4028
4628
|
zh: {
|
|
4029
4629
|
title: "Action",
|
|
4030
4630
|
hint: "\u8FD0\u884C\u65F6\u6CE8\u518C \xB7 \u53EA\u8BFB",
|
|
4631
|
+
switchHint: "agent \u5F00\u5173\u843D\u672C\u673A\u3001\u5373\u6539\u5373\u751F\u6548\uFF1B\u754C\u9762\u64CD\u4F5C\u4E0D\u53D7\u5F71\u54CD\u3002",
|
|
4632
|
+
hostHint: "\u5BBF\u4E3B action \u7684 agent \u5F00\u5173\uFF1B\u6807\u300C\u4EC5\u754C\u9762 \xB7 \u5B89\u5168\u7EA6\u675F\u300D\u7684\u4E0D\u53EF\u653E\u5F00\u3002",
|
|
4633
|
+
agentSwitch: "agent \u53EF\u7528",
|
|
4634
|
+
agentLocked: "\u4EC5\u754C\u9762 \xB7 \u5B89\u5168\u7EA6\u675F",
|
|
4635
|
+
agentLockedHint: "\u8BE5 action \u53EA\u80FD\u5728\u754C\u9762\u6267\u884C\uFF08\u5B89\u5168\u7EA6\u675F\uFF09\uFF0Cagent \u5F00\u5173\u4E0D\u53EF\u653E\u5F00",
|
|
4636
|
+
agentSaving: "\u4FDD\u5B58\u4E2D\u2026",
|
|
4637
|
+
agentOnToast: "\u5DF2\u5141\u8BB8 agent \u8C03\u7528",
|
|
4638
|
+
agentOffToast: "\u5DF2\u7981\u6B62 agent \u8C03\u7528",
|
|
4639
|
+
agentFail: "\u5207\u6362 agent \u5F00\u5173\u5931\u8D25",
|
|
4031
4640
|
domain: "\u57DF",
|
|
4032
4641
|
versionLabel: "\u7248\u672C",
|
|
4033
4642
|
shell: "\u5BBF\u4E3B",
|
|
@@ -4073,6 +4682,15 @@ var require_action_schema_view = __commonJS({
|
|
|
4073
4682
|
en: {
|
|
4074
4683
|
title: "Actions",
|
|
4075
4684
|
hint: "runtime registry \xB7 read-only",
|
|
4685
|
+
switchHint: "The agent switch is stored locally and applies immediately; UI actions are unaffected.",
|
|
4686
|
+
hostHint: "Agent switch for host actions; items marked UI-only (security) cannot be opened up.",
|
|
4687
|
+
agentSwitch: "Agent callable",
|
|
4688
|
+
agentLocked: "UI only \xB7 security",
|
|
4689
|
+
agentLockedHint: "This action can only run from the UI (security constraint); the agent switch cannot be opened",
|
|
4690
|
+
agentSaving: "Saving\u2026",
|
|
4691
|
+
agentOnToast: "Agent calls allowed",
|
|
4692
|
+
agentOffToast: "Agent calls blocked",
|
|
4693
|
+
agentFail: "Failed to change the agent switch",
|
|
4076
4694
|
domain: "Domain",
|
|
4077
4695
|
versionLabel: "Version",
|
|
4078
4696
|
shell: "Host",
|
|
@@ -4185,7 +4803,9 @@ var require_action_schema_view = __commonJS({
|
|
|
4185
4803
|
}
|
|
4186
4804
|
module2.exports = function createActionSchemaView(options) {
|
|
4187
4805
|
var raw = String(options.domain || "");
|
|
4188
|
-
var
|
|
4806
|
+
var SOURCE = options.source === "actions.list" ? "actions.list" : "actionSchema";
|
|
4807
|
+
var DOMAIN = SOURCE === "actions.list" ? raw : raw.indexOf("wb-addon-") === 0 ? raw : "wb-addon-" + raw;
|
|
4808
|
+
var LIST_DOMAIN = options.listDomain ? String(options.listDomain) : DOMAIN;
|
|
4189
4809
|
var prefix = options.prefix;
|
|
4190
4810
|
var P = prefix + "-as";
|
|
4191
4811
|
var Icon2 = options.Icon || null;
|
|
@@ -4229,6 +4849,8 @@ var require_action_schema_view = __commonJS({
|
|
|
4229
4849
|
var typePick = typeState[0], setTypePick = typeState[1];
|
|
4230
4850
|
var toastState = React.useState("");
|
|
4231
4851
|
var toast = toastState[0], setToast = toastState[1];
|
|
4852
|
+
var savingState = React.useState("");
|
|
4853
|
+
var saving = savingState[0], setSaving = savingState[1];
|
|
4232
4854
|
React.useEffect(function() {
|
|
4233
4855
|
injectCss();
|
|
4234
4856
|
}, []);
|
|
@@ -4237,9 +4859,10 @@ var require_action_schema_view = __commonJS({
|
|
|
4237
4859
|
setLoading(true);
|
|
4238
4860
|
setErr("");
|
|
4239
4861
|
var pending;
|
|
4240
|
-
var actionName = DOMAIN.replace(/^wb-addon-/, "") + ".actionSchema";
|
|
4862
|
+
var actionName = SOURCE === "actions.list" ? "actions.list" : DOMAIN.replace(/^wb-addon-/, "") + ".actionSchema";
|
|
4863
|
+
var callArgs = SOURCE === "actions.list" ? { detail: true, domain: LIST_DOMAIN } : void 0;
|
|
4241
4864
|
if (api && typeof api.call === "function") {
|
|
4242
|
-
pending = Promise.resolve(api.call(actionName)).then(function(r) {
|
|
4865
|
+
pending = Promise.resolve(api.call(actionName, callArgs)).then(function(r) {
|
|
4243
4866
|
if (r && r.ok === false) return r;
|
|
4244
4867
|
return r && r.result || r;
|
|
4245
4868
|
});
|
|
@@ -4279,6 +4902,39 @@ var require_action_schema_view = __commonJS({
|
|
|
4279
4902
|
plainCopy(text);
|
|
4280
4903
|
done();
|
|
4281
4904
|
}
|
|
4905
|
+
function setAgent(action, next) {
|
|
4906
|
+
var name = action.name;
|
|
4907
|
+
setSaving(name);
|
|
4908
|
+
setToast("");
|
|
4909
|
+
var fail = function(e) {
|
|
4910
|
+
setSaving("");
|
|
4911
|
+
setToast(t.agentFail + "\uFF1A" + String(e && e.message || e || ""));
|
|
4912
|
+
};
|
|
4913
|
+
var done = function(r) {
|
|
4914
|
+
setSaving("");
|
|
4915
|
+
var payload = r && typeof r === "object" && Object.prototype.hasOwnProperty.call(r, "result") ? r.result : r;
|
|
4916
|
+
if (r && r.ok === false) {
|
|
4917
|
+
setToast(t.agentFail + "\uFF1A" + String(r.error || r.text || ""));
|
|
4918
|
+
return;
|
|
4919
|
+
}
|
|
4920
|
+
var value = payload && typeof payload.agentEnabled === "boolean" ? payload.agentEnabled : next;
|
|
4921
|
+
setSnap(function(prev) {
|
|
4922
|
+
if (!prev || !Array.isArray(prev.actions)) return prev;
|
|
4923
|
+
return Object.assign({}, prev, {
|
|
4924
|
+
actions: prev.actions.map(function(a) {
|
|
4925
|
+
if (!a || a.name !== name) return a;
|
|
4926
|
+
return Object.assign({}, a, { agentEnabled: value });
|
|
4927
|
+
})
|
|
4928
|
+
});
|
|
4929
|
+
});
|
|
4930
|
+
setToast(value ? t.agentOnToast : t.agentOffToast);
|
|
4931
|
+
};
|
|
4932
|
+
if (!api || typeof api.call !== "function") {
|
|
4933
|
+
fail(new Error("no call api"));
|
|
4934
|
+
return;
|
|
4935
|
+
}
|
|
4936
|
+
Promise.resolve(api.call("actions.setAgentAccess", { action: name, agentEnabled: next })).then(done, fail);
|
|
4937
|
+
}
|
|
4282
4938
|
var all = snap && Array.isArray(snap.actions) ? snap.actions.filter(function(a) {
|
|
4283
4939
|
return a && a.domain === DOMAIN;
|
|
4284
4940
|
}) : [];
|
|
@@ -4327,6 +4983,35 @@ var require_action_schema_view = __commonJS({
|
|
|
4327
4983
|
h("td", null, Highlight.hit(row.description, kw))
|
|
4328
4984
|
);
|
|
4329
4985
|
}
|
|
4986
|
+
function agentSwitch(action) {
|
|
4987
|
+
if (action.agentLocked === true) {
|
|
4988
|
+
return h("span", {
|
|
4989
|
+
className: P + "-badge " + P + "-locked",
|
|
4990
|
+
title: t.agentLockedHint,
|
|
4991
|
+
"data-agent-locked": action.name
|
|
4992
|
+
}, t.agentLocked);
|
|
4993
|
+
}
|
|
4994
|
+
if (typeof action.agentEnabled !== "boolean") return null;
|
|
4995
|
+
var busy = saving === action.name;
|
|
4996
|
+
return h(
|
|
4997
|
+
"button",
|
|
4998
|
+
{
|
|
4999
|
+
className: P + "-toggle",
|
|
5000
|
+
"data-agent-row": action.name,
|
|
5001
|
+
type: "button",
|
|
5002
|
+
role: "switch",
|
|
5003
|
+
"aria-checked": action.agentEnabled,
|
|
5004
|
+
disabled: busy,
|
|
5005
|
+
"data-agent-toggle": action.name,
|
|
5006
|
+
"aria-label": t.agentSwitch + " \xB7 " + action.name,
|
|
5007
|
+
onClick: function() {
|
|
5008
|
+
setAgent(action, !action.agentEnabled);
|
|
5009
|
+
}
|
|
5010
|
+
},
|
|
5011
|
+
h("span", { className: P + "-track", "aria-hidden": true }),
|
|
5012
|
+
h("span", null, busy ? t.agentSaving : t.agentSwitch)
|
|
5013
|
+
);
|
|
5014
|
+
}
|
|
4330
5015
|
function card(action) {
|
|
4331
5016
|
var rows = paramRows(action);
|
|
4332
5017
|
var examples = Array.isArray(action.examples) ? action.examples : [];
|
|
@@ -4336,12 +5021,16 @@ var require_action_schema_view = __commonJS({
|
|
|
4336
5021
|
h(
|
|
4337
5022
|
"div",
|
|
4338
5023
|
{ className: P + "-cardhead" },
|
|
4339
|
-
h(
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
5024
|
+
h(
|
|
5025
|
+
"div",
|
|
5026
|
+
{ className: P + "-cardmeta" },
|
|
5027
|
+
h("code", { className: P + "-mono" }, Highlight.hit(action.name, kw)),
|
|
5028
|
+
h("span", { className: P + "-badge" }, rows.length ? t.paramCount(rows.length) : t.noParams),
|
|
5029
|
+
rows.some(function(row) {
|
|
5030
|
+
return row.required;
|
|
5031
|
+
}) ? h("span", { className: P + "-badge " + P + "-req" }, t.required) : null
|
|
5032
|
+
),
|
|
5033
|
+
agentSwitch(action)
|
|
4345
5034
|
),
|
|
4346
5035
|
action.description ? h("p", { className: P + "-desc" }, Highlight.hit(action.description, kw)) : null,
|
|
4347
5036
|
rows.length ? h(
|
|
@@ -4418,6 +5107,7 @@ var require_action_schema_view = __commonJS({
|
|
|
4418
5107
|
h("span", { className: P + "-badge" }, t.count(visible.length, all.length)),
|
|
4419
5108
|
h("span", { className: P + "-none" }, t.hint)
|
|
4420
5109
|
),
|
|
5110
|
+
h("p", { className: P + "-hintline" }, SOURCE === "actions.list" ? t.hostHint : t.switchHint),
|
|
4421
5111
|
snap ? h(
|
|
4422
5112
|
"div",
|
|
4423
5113
|
{ className: P + "-toolbar" },
|
|
@@ -4486,6 +5176,7 @@ var require_actions = __commonJS({
|
|
|
4486
5176
|
});
|
|
4487
5177
|
|
|
4488
5178
|
// packages/addons/vault/client/client.src.cjs
|
|
5179
|
+
var GLYPHS = require_icons2().ICONS;
|
|
4489
5180
|
(function() {
|
|
4490
5181
|
var root = typeof window !== "undefined" ? window : null;
|
|
4491
5182
|
var host = root && root.__WB_HOST__;
|
|
@@ -4500,13 +5191,13 @@ var require_actions = __commonJS({
|
|
|
4500
5191
|
var CSS_ARR = require_styles();
|
|
4501
5192
|
var CSS = Array.isArray(CSS_ARR) ? CSS_ARR.join("\n") : String(CSS_ARR || "");
|
|
4502
5193
|
var ICONS = {
|
|
4503
|
-
shield:
|
|
4504
|
-
key:
|
|
4505
|
-
folder:
|
|
4506
|
-
sliders:
|
|
4507
|
-
database:
|
|
4508
|
-
list:
|
|
4509
|
-
layers:
|
|
5194
|
+
shield: GLYPHS["shield"],
|
|
5195
|
+
key: GLYPHS["key-round"],
|
|
5196
|
+
folder: GLYPHS["folder"],
|
|
5197
|
+
sliders: GLYPHS["sliders-horizontal"],
|
|
5198
|
+
database: GLYPHS["database"],
|
|
5199
|
+
list: GLYPHS["list"],
|
|
5200
|
+
layers: GLYPHS["layers"]
|
|
4510
5201
|
};
|
|
4511
5202
|
function Icon2(props) {
|
|
4512
5203
|
var C = ICONS[props.name] || ICONS.shield;
|
|
@@ -4539,8 +5230,8 @@ var require_actions = __commonJS({
|
|
|
4539
5230
|
ensureStyles();
|
|
4540
5231
|
host.registerAddon({
|
|
4541
5232
|
id: "wb-addon-vault",
|
|
4542
|
-
version: "0.3.
|
|
4543
|
-
icon:
|
|
5233
|
+
version: "0.3.9",
|
|
5234
|
+
icon: GLYPHS["shield-check"],
|
|
4544
5235
|
views: [
|
|
4545
5236
|
{ id: "status", icon: tabIcon("shield"), title: { zh: "\u4FDD\u9669\u7BB1", en: "Vault" }, component: withProps(require_status(), "\u4FDD\u9669\u7BB1") },
|
|
4546
5237
|
{ id: "secrets", icon: tabIcon("key"), title: { zh: "\u51ED\u636E", en: "Secrets" }, component: withProps(require_secrets(), "\u51ED\u636E") },
|