@peasant-labs/fairtrade 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/commons.js +154 -143
- package/dist/lib/components.css +1 -1
- package/dist/lib/types/Redaction.d.ts +8 -3
- package/dist/lib/{ui-D-SdqnJZ.js → ui-DpXQaQyi.js} +1805 -1779
- package/dist/lib/ui.js +1 -1
- package/package.json +4 -2
package/dist/lib/commons.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { An as e, At as t, Dt as n, Et as r, Fn as i, In as a, Ln as o, Nn as s, Q as c, Tt as l, _n as u, et as d, it as f, jt as p, kt as m, nt as h, pn as g, tt as _ } from "./ui-
|
|
1
|
+
import { An as e, At as t, Dt as n, Et as r, Fn as i, In as a, Ln as o, Nn as s, Q as c, Tt as l, _n as u, et as d, it as f, jt as p, kt as m, nt as h, pn as g, tt as _ } from "./ui-DpXQaQyi.js";
|
|
2
2
|
import { gt as v, it as y, ot as b } from "./InUseShell-CY5Acw6t.js";
|
|
3
3
|
import { useEffect as x, useId as S, useMemo as C, useRef as w, useState as T } from "react";
|
|
4
4
|
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
5
|
-
import { AlertTriangle as k, ArrowRight as A, Check as j, ChevronDown as M, ChevronRight as N, CircleDot as P, Compass as F, Copy as I, ExternalLink as L, Eye as R, EyeOff as z, FileText as B, FolderGit2 as V, GitBranch as H, Hash as U, LayoutGrid as ee, List as te, Lock as W, LogOut as G, Plus as
|
|
5
|
+
import { AlertTriangle as k, ArrowRight as A, Check as j, ChevronDown as M, ChevronRight as N, CircleDot as P, Compass as F, Copy as I, ExternalLink as L, Eye as R, EyeOff as z, FileText as B, FolderGit2 as V, GitBranch as H, Hash as U, LayoutGrid as ee, List as te, Lock as W, LogOut as G, Plus as K, SearchX as ne, Settings as re, ShieldAlert as q, ShieldCheck as J, Upload as ie, User as ae, UserPlus as Y, Users as X, X as Z } from "lucide-react";
|
|
6
6
|
//#region src/ui/commons/types.js
|
|
7
7
|
var oe = Object.freeze([
|
|
8
8
|
"public",
|
|
@@ -12,11 +12,11 @@ var oe = Object.freeze([
|
|
|
12
12
|
"open",
|
|
13
13
|
"verified_only",
|
|
14
14
|
"curated"
|
|
15
|
-
]),
|
|
15
|
+
]), ce = Object.freeze([
|
|
16
16
|
"members_only",
|
|
17
17
|
"contributors",
|
|
18
18
|
"public"
|
|
19
|
-
]),
|
|
19
|
+
]), Q = Object.freeze(["user_choice", "mandatory"]), $ = Object.freeze([
|
|
20
20
|
"owner",
|
|
21
21
|
"member",
|
|
22
22
|
"contributor",
|
|
@@ -206,7 +206,10 @@ function _e(e, t, n) {
|
|
|
206
206
|
function ve(e) {
|
|
207
207
|
return e ?? le;
|
|
208
208
|
}
|
|
209
|
-
function ye(
|
|
209
|
+
function ye(e) {
|
|
210
|
+
return Number.isInteger(e) && e >= 1 ? e : 1;
|
|
211
|
+
}
|
|
212
|
+
function be({ transcript: e, href: t, onOpen: n }) {
|
|
210
213
|
let r = /* @__PURE__ */ O(E, { children: [
|
|
211
214
|
/* @__PURE__ */ O("div", {
|
|
212
215
|
className: "card-head",
|
|
@@ -263,7 +266,7 @@ function ye({ transcript: e, href: t, onOpen: n }) {
|
|
|
263
266
|
children: r
|
|
264
267
|
});
|
|
265
268
|
}
|
|
266
|
-
function
|
|
269
|
+
function xe({ transcript: e, href: t, onOpen: n }) {
|
|
267
270
|
let r = /* @__PURE__ */ O(E, { children: [
|
|
268
271
|
/* @__PURE__ */ O("span", {
|
|
269
272
|
className: "cex-trow-model",
|
|
@@ -299,7 +302,7 @@ function be({ transcript: e, href: t, onOpen: n }) {
|
|
|
299
302
|
children: r
|
|
300
303
|
});
|
|
301
304
|
}
|
|
302
|
-
function
|
|
305
|
+
function Se({ collective: e, href: t, onOpen: n }) {
|
|
303
306
|
let r = /* @__PURE__ */ O(E, { children: [
|
|
304
307
|
/* @__PURE__ */ O("div", {
|
|
305
308
|
className: "cex-cname",
|
|
@@ -335,8 +338,8 @@ function xe({ collective: e, href: t, onOpen: n }) {
|
|
|
335
338
|
children: r
|
|
336
339
|
});
|
|
337
340
|
}
|
|
338
|
-
function
|
|
339
|
-
let d = ve(e), p = d.transcripts.transcripts, [m, g] = T(""), [_, v] = T(""), [y, S] = T("recent"), [E, k] = T("all"), [A, j] = T(() => /* @__PURE__ */ new Set()), [M, N] = T("grid"), [P, I] = T(
|
|
341
|
+
function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript: r, onOpenProfile: i, onOpenCollective: a, transcriptHref: o, profileHref: s, collectiveHref: l }) {
|
|
342
|
+
let d = ve(e), p = d.transcripts.transcripts, [m, g] = T(""), [_, v] = T(""), [y, S] = T("recent"), [E, k] = T("all"), [A, j] = T(() => /* @__PURE__ */ new Set()), [M, N] = T("grid"), [P, I] = T(() => ye(d.transcripts.page)), [L, R] = T(null), [z, V] = T("browse"), H = w(!0), U = w(null);
|
|
340
343
|
x(() => {
|
|
341
344
|
if (H.current) {
|
|
342
345
|
H.current = !1, v(m);
|
|
@@ -345,7 +348,17 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
345
348
|
let e = setTimeout(() => v(m), 250);
|
|
346
349
|
return () => clearTimeout(e);
|
|
347
350
|
}, [H, m]), x(() => {
|
|
348
|
-
|
|
351
|
+
let e = JSON.stringify([
|
|
352
|
+
_,
|
|
353
|
+
y,
|
|
354
|
+
E,
|
|
355
|
+
[...A].sort()
|
|
356
|
+
]);
|
|
357
|
+
if (U.current === null || U.current === e) {
|
|
358
|
+
U.current = e;
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
U.current = e, I(1);
|
|
349
362
|
}, [
|
|
350
363
|
_,
|
|
351
364
|
y,
|
|
@@ -366,10 +379,8 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
366
379
|
E,
|
|
367
380
|
_,
|
|
368
381
|
A
|
|
369
|
-
])
|
|
370
|
-
|
|
371
|
-
}, [P, d.transcripts.page]);
|
|
372
|
-
let U = p.find((e) => e.id === L) ?? p[0] ?? null, W = U?.owner ?? null, G = W ? p.filter((e) => e.owner.githubUsername === W.githubUsername) : [], ne = C(() => {
|
|
382
|
+
]);
|
|
383
|
+
let W = p.find((e) => e.id === L) ?? p[0] ?? null, G = W?.owner ?? null, K = G ? p.filter((e) => e.owner.githubUsername === G.githubUsername) : [], re = C(() => {
|
|
373
384
|
let e = /* @__PURE__ */ new Map();
|
|
374
385
|
for (let t of p) e.set(t.modelProvider, (e.get(t.modelProvider) || 0) + 1);
|
|
375
386
|
return [{
|
|
@@ -383,39 +394,39 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
383
394
|
x(() => {
|
|
384
395
|
L && !p.some((e) => e.id === L) && (R(null), V("browse"));
|
|
385
396
|
}, [L, p]);
|
|
386
|
-
let
|
|
397
|
+
let q = C(() => {
|
|
387
398
|
let e = me(_);
|
|
388
399
|
return e ? d.collectives.filter((t) => [
|
|
389
400
|
t.name,
|
|
390
401
|
t.description,
|
|
391
402
|
t.linkedGithubOrg
|
|
392
403
|
].filter(Boolean).join(" ").toLowerCase().includes(e)) : null;
|
|
393
|
-
}, [d.collectives, _]),
|
|
404
|
+
}, [d.collectives, _]), J = p, ie = A.size, Y = d.transcripts.total ?? p.length, X = P, Z = d.transcripts.limit || p.length || 1, oe = (e) => {
|
|
394
405
|
if (r) {
|
|
395
406
|
r(e);
|
|
396
407
|
return;
|
|
397
408
|
}
|
|
398
409
|
R(e.id), V("detail");
|
|
399
|
-
},
|
|
400
|
-
if (i &&
|
|
401
|
-
i(
|
|
410
|
+
}, se = () => {
|
|
411
|
+
if (i && G) {
|
|
412
|
+
i(G);
|
|
402
413
|
return;
|
|
403
414
|
}
|
|
404
|
-
|
|
405
|
-
},
|
|
415
|
+
W ? (R(W.id), V("profile")) : p[0] && (R(p[0].id), V("profile"));
|
|
416
|
+
}, ce = () => {
|
|
406
417
|
g(""), v(""), S("recent"), k("all"), j(/* @__PURE__ */ new Set()), I(1);
|
|
407
|
-
}, Q = C(() =>
|
|
418
|
+
}, Q = C(() => G ? [...ge(K, (e) => e.projectName || "untitled project").entries()].map(([e, t]) => ({
|
|
408
419
|
project: e,
|
|
409
420
|
items: t
|
|
410
|
-
})) : [], [
|
|
411
|
-
let e =
|
|
421
|
+
})) : [], [K, G]), $ = C(() => {
|
|
422
|
+
let e = K.reduce((e, t) => e + (t.tokenCount || 0), 0);
|
|
412
423
|
return {
|
|
413
|
-
transcripts:
|
|
424
|
+
transcripts: K.length,
|
|
414
425
|
projects: Q.length,
|
|
415
426
|
tokens: e
|
|
416
427
|
};
|
|
417
|
-
}, [
|
|
418
|
-
return z === "detail" &&
|
|
428
|
+
}, [K, Q.length]);
|
|
429
|
+
return z === "detail" && W ? /* @__PURE__ */ O("div", {
|
|
419
430
|
className: `cex-root cex-detail ${t}`.trim(),
|
|
420
431
|
children: [/* @__PURE__ */ O("div", {
|
|
421
432
|
className: "cex-detail-back",
|
|
@@ -430,7 +441,7 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
430
441
|
}), /* @__PURE__ */ O("button", {
|
|
431
442
|
type: "button",
|
|
432
443
|
className: "btn btn-secondary btn-sm",
|
|
433
|
-
onClick:
|
|
444
|
+
onClick: se,
|
|
434
445
|
children: [/* @__PURE__ */ D(ae, {
|
|
435
446
|
size: 14,
|
|
436
447
|
"aria-hidden": "true"
|
|
@@ -459,7 +470,7 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
459
470
|
" ",
|
|
460
471
|
/* @__PURE__ */ D("span", {
|
|
461
472
|
className: "cur mono",
|
|
462
|
-
children:
|
|
473
|
+
children: W.id
|
|
463
474
|
})
|
|
464
475
|
]
|
|
465
476
|
})
|
|
@@ -468,15 +479,15 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
468
479
|
className: "cex-hero-title",
|
|
469
480
|
children: [/* @__PURE__ */ D("h2", {
|
|
470
481
|
className: "win-title cex-vtitle",
|
|
471
|
-
children: he(
|
|
472
|
-
}), /* @__PURE__ */ D(c, { visibility:
|
|
482
|
+
children: he(W.title || "untitled transcript")
|
|
483
|
+
}), /* @__PURE__ */ D(c, { visibility: W.visibility })]
|
|
473
484
|
}),
|
|
474
485
|
/* @__PURE__ */ O("p", {
|
|
475
486
|
className: "cex-vdesc",
|
|
476
487
|
children: [
|
|
477
|
-
|
|
488
|
+
W.projectName || "shared transcript",
|
|
478
489
|
" · ",
|
|
479
|
-
|
|
490
|
+
W.owner.displayName || W.owner.githubUsername
|
|
480
491
|
]
|
|
481
492
|
}),
|
|
482
493
|
/* @__PURE__ */ O("div", {
|
|
@@ -485,9 +496,9 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
485
496
|
/* @__PURE__ */ O("span", {
|
|
486
497
|
className: "metaitem",
|
|
487
498
|
children: [/* @__PURE__ */ D(b, {
|
|
488
|
-
harness:
|
|
499
|
+
harness: W.modelProvider,
|
|
489
500
|
accent: !0
|
|
490
|
-
}), /* @__PURE__ */ D("span", { children:
|
|
501
|
+
}), /* @__PURE__ */ D("span", { children: W.modelName || W.modelProvider })]
|
|
491
502
|
}),
|
|
492
503
|
/* @__PURE__ */ O("span", {
|
|
493
504
|
className: "metaitem mono tnum",
|
|
@@ -497,7 +508,7 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
497
508
|
"aria-hidden": "true"
|
|
498
509
|
}),
|
|
499
510
|
" ",
|
|
500
|
-
|
|
511
|
+
W.turnCount ?? 0,
|
|
501
512
|
" turns"
|
|
502
513
|
]
|
|
503
514
|
}),
|
|
@@ -509,13 +520,13 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
509
520
|
children: "#"
|
|
510
521
|
}),
|
|
511
522
|
" ",
|
|
512
|
-
ue(
|
|
523
|
+
ue(W.tokenCount || 0),
|
|
513
524
|
" tokens"
|
|
514
525
|
]
|
|
515
526
|
}),
|
|
516
527
|
/* @__PURE__ */ O("span", {
|
|
517
528
|
className: "metaitem mono tnum",
|
|
518
|
-
children: [
|
|
529
|
+
children: [W.toolCallCount ?? 0, " tools"]
|
|
519
530
|
})
|
|
520
531
|
]
|
|
521
532
|
})
|
|
@@ -533,7 +544,7 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
533
544
|
children: "about"
|
|
534
545
|
}), /* @__PURE__ */ D("span", {
|
|
535
546
|
className: "meta mono tnum",
|
|
536
|
-
children: fe(
|
|
547
|
+
children: fe(W.sessionStart || W.sessionEnd || "")
|
|
537
548
|
})]
|
|
538
549
|
}), /* @__PURE__ */ O("div", {
|
|
539
550
|
className: "turn",
|
|
@@ -545,9 +556,9 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
545
556
|
})
|
|
546
557
|
}), /* @__PURE__ */ O("div", {
|
|
547
558
|
className: "body",
|
|
548
|
-
children: [/* @__PURE__ */ D("p", { children: "This view surfaces the loaded transcript metadata, then lets the user move to the owner profile without leaving the shared surface." }),
|
|
559
|
+
children: [/* @__PURE__ */ D("p", { children: "This view surfaces the loaded transcript metadata, then lets the user move to the owner profile without leaving the shared surface." }), W.tags.length > 0 && /* @__PURE__ */ D("div", {
|
|
549
560
|
className: "cex-tags",
|
|
550
|
-
children:
|
|
561
|
+
children: W.tags.map((e) => /* @__PURE__ */ O("span", {
|
|
551
562
|
className: "chip",
|
|
552
563
|
children: ["#", e.name]
|
|
553
564
|
}, e.id))
|
|
@@ -567,15 +578,15 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
567
578
|
children: [/* @__PURE__ */ D("div", {
|
|
568
579
|
className: "cex-phero-av",
|
|
569
580
|
"aria-hidden": "true",
|
|
570
|
-
children: pe(
|
|
581
|
+
children: pe(W.owner.displayName || W.owner.githubUsername)
|
|
571
582
|
}), /* @__PURE__ */ O("div", {
|
|
572
583
|
className: "cex-phero-id",
|
|
573
584
|
children: [/* @__PURE__ */ D("h2", {
|
|
574
585
|
className: "cex-h2 cex-pname",
|
|
575
|
-
children:
|
|
586
|
+
children: W.owner.displayName || W.owner.githubUsername
|
|
576
587
|
}), /* @__PURE__ */ O("span", {
|
|
577
588
|
className: "cex-phandle mono",
|
|
578
|
-
children: ["@",
|
|
589
|
+
children: ["@", W.owner.githubUsername]
|
|
579
590
|
})]
|
|
580
591
|
})]
|
|
581
592
|
}),
|
|
@@ -600,7 +611,7 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
600
611
|
})]
|
|
601
612
|
})]
|
|
602
613
|
})]
|
|
603
|
-
}) : z === "profile" &&
|
|
614
|
+
}) : z === "profile" && G ? /* @__PURE__ */ O("div", {
|
|
604
615
|
className: `cex-root cex-profile ${t}`.trim(),
|
|
605
616
|
children: [
|
|
606
617
|
/* @__PURE__ */ O("div", {
|
|
@@ -634,7 +645,7 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
634
645
|
" ",
|
|
635
646
|
/* @__PURE__ */ O("span", {
|
|
636
647
|
className: "cur mono",
|
|
637
|
-
children: ["@",
|
|
648
|
+
children: ["@", G.githubUsername]
|
|
638
649
|
})
|
|
639
650
|
]
|
|
640
651
|
}),
|
|
@@ -643,15 +654,15 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
643
654
|
children: [/* @__PURE__ */ D("div", {
|
|
644
655
|
className: "cex-phero-av",
|
|
645
656
|
"aria-hidden": "true",
|
|
646
|
-
children: pe(
|
|
657
|
+
children: pe(G.displayName || G.githubUsername)
|
|
647
658
|
}), /* @__PURE__ */ O("div", {
|
|
648
659
|
className: "cex-phero-id",
|
|
649
660
|
children: [/* @__PURE__ */ D("h2", {
|
|
650
661
|
className: "cex-h2 cex-pname",
|
|
651
|
-
children:
|
|
662
|
+
children: G.displayName || G.githubUsername
|
|
652
663
|
}), /* @__PURE__ */ O("span", {
|
|
653
664
|
className: "cex-phandle mono",
|
|
654
|
-
children: ["@",
|
|
665
|
+
children: ["@", G.githubUsername]
|
|
655
666
|
})]
|
|
656
667
|
})]
|
|
657
668
|
}),
|
|
@@ -713,10 +724,10 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
713
724
|
})]
|
|
714
725
|
}), /* @__PURE__ */ D("div", {
|
|
715
726
|
className: "cex-lib-rows",
|
|
716
|
-
children: t.map((e) => /* @__PURE__ */ D(
|
|
727
|
+
children: t.map((e) => /* @__PURE__ */ D(xe, {
|
|
717
728
|
transcript: e,
|
|
718
729
|
href: o?.(e),
|
|
719
|
-
onOpen:
|
|
730
|
+
onOpen: oe
|
|
720
731
|
}, e.id))
|
|
721
732
|
})]
|
|
722
733
|
}, e))
|
|
@@ -750,7 +761,7 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
750
761
|
className: "cex-clear",
|
|
751
762
|
"aria-label": "clear search",
|
|
752
763
|
onClick: () => g(""),
|
|
753
|
-
children: /* @__PURE__ */ D(
|
|
764
|
+
children: /* @__PURE__ */ D(ne, {
|
|
754
765
|
size: 14,
|
|
755
766
|
"aria-hidden": "true"
|
|
756
767
|
})
|
|
@@ -762,7 +773,7 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
762
773
|
children: [/* @__PURE__ */ D(f, {
|
|
763
774
|
order: y,
|
|
764
775
|
onOrder: (e) => S(e),
|
|
765
|
-
providers:
|
|
776
|
+
providers: re,
|
|
766
777
|
activeProviders: E === "all" ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([E]),
|
|
767
778
|
onProvider: (e) => k((t) => t === e ? "all" : e),
|
|
768
779
|
topics: d.popularTags.map((e) => ({
|
|
@@ -776,12 +787,12 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
776
787
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
777
788
|
});
|
|
778
789
|
},
|
|
779
|
-
onClear:
|
|
790
|
+
onClear: ce,
|
|
780
791
|
className: "cex-rail"
|
|
781
792
|
}), /* @__PURE__ */ O("div", {
|
|
782
793
|
className: "cex-results",
|
|
783
794
|
children: [
|
|
784
|
-
|
|
795
|
+
q && /* @__PURE__ */ O("section", {
|
|
785
796
|
className: "cex-coll-results",
|
|
786
797
|
"aria-label": "matching collectives",
|
|
787
798
|
children: [/* @__PURE__ */ D("div", {
|
|
@@ -790,15 +801,15 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
790
801
|
className: "cex-eyebrow",
|
|
791
802
|
children: ["collectives ", /* @__PURE__ */ D("span", {
|
|
792
803
|
className: "cex-count tnum",
|
|
793
|
-
children:
|
|
804
|
+
children: q.length
|
|
794
805
|
})]
|
|
795
806
|
})
|
|
796
|
-
}),
|
|
807
|
+
}), q.length === 0 ? /* @__PURE__ */ D("p", {
|
|
797
808
|
className: "cex-nomatch-inline mono",
|
|
798
809
|
children: "no matching collectives."
|
|
799
810
|
}) : /* @__PURE__ */ D("div", {
|
|
800
811
|
className: "cex-coll-grid",
|
|
801
|
-
children:
|
|
812
|
+
children: q.map((e) => /* @__PURE__ */ D(Se, {
|
|
802
813
|
collective: e,
|
|
803
814
|
href: l?.(e),
|
|
804
815
|
onOpen: a
|
|
@@ -813,7 +824,7 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
813
824
|
className: "cex-count tnum",
|
|
814
825
|
role: "status",
|
|
815
826
|
"aria-live": "polite",
|
|
816
|
-
children:
|
|
827
|
+
children: Y
|
|
817
828
|
})]
|
|
818
829
|
}), /* @__PURE__ */ O("div", {
|
|
819
830
|
className: "bs-seg cex-viewseg",
|
|
@@ -841,19 +852,19 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
841
852
|
className: "bs-seg-opt",
|
|
842
853
|
"aria-pressed": z === "profile",
|
|
843
854
|
"aria-label": "profile view",
|
|
844
|
-
onClick:
|
|
845
|
-
disabled: !
|
|
855
|
+
onClick: se,
|
|
856
|
+
disabled: !J.length,
|
|
846
857
|
children: [/* @__PURE__ */ D(ae, { size: 14 }), " profile"]
|
|
847
858
|
})
|
|
848
859
|
]
|
|
849
860
|
})]
|
|
850
861
|
}),
|
|
851
|
-
|
|
862
|
+
J.length === 0 ? _.trim() || E !== "all" || ie ? /* @__PURE__ */ O("div", {
|
|
852
863
|
className: "empty cex-empty",
|
|
853
864
|
children: [
|
|
854
865
|
/* @__PURE__ */ D("div", {
|
|
855
866
|
className: "ring",
|
|
856
|
-
children: /* @__PURE__ */ D(
|
|
867
|
+
children: /* @__PURE__ */ D(ne, {
|
|
857
868
|
size: 20,
|
|
858
869
|
"aria-hidden": "true"
|
|
859
870
|
})
|
|
@@ -863,7 +874,7 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
863
874
|
/* @__PURE__ */ D("button", {
|
|
864
875
|
type: "button",
|
|
865
876
|
className: "btn btn-secondary btn-sm",
|
|
866
|
-
onClick:
|
|
877
|
+
onClick: ce,
|
|
867
878
|
children: "clear filters"
|
|
868
879
|
})
|
|
869
880
|
]
|
|
@@ -882,23 +893,23 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
882
893
|
]
|
|
883
894
|
}) : M === "grid" ? /* @__PURE__ */ D("div", {
|
|
884
895
|
className: "cex-grid",
|
|
885
|
-
children:
|
|
896
|
+
children: J.map((e) => /* @__PURE__ */ D(be, {
|
|
886
897
|
transcript: e,
|
|
887
898
|
href: o?.(e),
|
|
888
|
-
onOpen:
|
|
899
|
+
onOpen: oe
|
|
889
900
|
}, e.id))
|
|
890
901
|
}) : /* @__PURE__ */ D("div", {
|
|
891
902
|
className: "cex-list",
|
|
892
|
-
children:
|
|
903
|
+
children: J.map((e) => /* @__PURE__ */ D(xe, {
|
|
893
904
|
transcript: e,
|
|
894
905
|
href: o?.(e),
|
|
895
|
-
onOpen:
|
|
906
|
+
onOpen: oe
|
|
896
907
|
}, e.id))
|
|
897
908
|
}),
|
|
898
|
-
|
|
899
|
-
page:
|
|
900
|
-
totalItems:
|
|
901
|
-
pageSize:
|
|
909
|
+
Y > Z && /* @__PURE__ */ D(u, {
|
|
910
|
+
page: X,
|
|
911
|
+
totalItems: Y,
|
|
912
|
+
pageSize: Z,
|
|
902
913
|
onChange: I,
|
|
903
914
|
className: "cex-pgn"
|
|
904
915
|
})
|
|
@@ -909,15 +920,15 @@ function Se({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
|
|
|
909
920
|
}
|
|
910
921
|
//#endregion
|
|
911
922
|
//#region src/ui/commons/providers.js
|
|
912
|
-
function
|
|
923
|
+
function we(e) {
|
|
913
924
|
return String(e || "unknown").replace(/[-_]+/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
914
925
|
}
|
|
915
|
-
function
|
|
926
|
+
function Te(e) {
|
|
916
927
|
return v(e);
|
|
917
928
|
}
|
|
918
929
|
//#endregion
|
|
919
930
|
//#region src/mockups/inuse/CommonsManage.jsx
|
|
920
|
-
function
|
|
931
|
+
function Ee({ cmd: e, note: t }) {
|
|
921
932
|
let [n, r] = T(!1);
|
|
922
933
|
function i() {
|
|
923
934
|
try {
|
|
@@ -953,7 +964,7 @@ function Te({ cmd: e, note: t }) {
|
|
|
953
964
|
]
|
|
954
965
|
});
|
|
955
966
|
}
|
|
956
|
-
var
|
|
967
|
+
var De = [
|
|
957
968
|
{
|
|
958
969
|
id: "a1",
|
|
959
970
|
provider: "claude-code",
|
|
@@ -990,7 +1001,7 @@ var Ee = [
|
|
|
990
1001
|
turns: 128,
|
|
991
1002
|
project: "platform"
|
|
992
1003
|
}
|
|
993
|
-
],
|
|
1004
|
+
], Oe = [
|
|
994
1005
|
{
|
|
995
1006
|
n: 1,
|
|
996
1007
|
title: "install the cli",
|
|
@@ -1013,7 +1024,7 @@ var Ee = [
|
|
|
1013
1024
|
cmd: "peasant village push --dry-run --visibility public"
|
|
1014
1025
|
}
|
|
1015
1026
|
];
|
|
1016
|
-
function
|
|
1027
|
+
function ke({ v: e, names: t }) {
|
|
1017
1028
|
let n = {
|
|
1018
1029
|
public: {
|
|
1019
1030
|
Icon: R,
|
|
@@ -1043,7 +1054,7 @@ function Oe({ v: e, names: t }) {
|
|
|
1043
1054
|
})]
|
|
1044
1055
|
});
|
|
1045
1056
|
}
|
|
1046
|
-
function
|
|
1057
|
+
function Ae() {
|
|
1047
1058
|
let [e, t] = T(!0), [n, r] = T(!1);
|
|
1048
1059
|
return /* @__PURE__ */ O("div", {
|
|
1049
1060
|
className: "cmg-root",
|
|
@@ -1120,7 +1131,7 @@ function ke() {
|
|
|
1120
1131
|
className: "cmg-step-desc",
|
|
1121
1132
|
children: "connects github, discovers agent transcripts, configures providers (Claude Code / OpenCode), sets your redaction level."
|
|
1122
1133
|
}),
|
|
1123
|
-
/* @__PURE__ */ D(
|
|
1134
|
+
/* @__PURE__ */ D(Ee, { cmd: "peasant kickstart" })
|
|
1124
1135
|
]
|
|
1125
1136
|
})]
|
|
1126
1137
|
}), /* @__PURE__ */ O("div", {
|
|
@@ -1140,7 +1151,7 @@ function ke() {
|
|
|
1140
1151
|
className: "cmg-step-desc",
|
|
1141
1152
|
children: "auto-redaction runs before upload. add --dry-run to preview, or --visibility public to override."
|
|
1142
1153
|
}),
|
|
1143
|
-
/* @__PURE__ */ D(
|
|
1154
|
+
/* @__PURE__ */ D(Ee, {
|
|
1144
1155
|
cmd: "peasant village push",
|
|
1145
1156
|
note: "--dry-run preview · --visibility public override"
|
|
1146
1157
|
})
|
|
@@ -1162,17 +1173,17 @@ function ke() {
|
|
|
1162
1173
|
type: "button",
|
|
1163
1174
|
className: "btn btn-sm btn-secondary",
|
|
1164
1175
|
onClick: () => r(!0),
|
|
1165
|
-
children: [/* @__PURE__ */ D(
|
|
1176
|
+
children: [/* @__PURE__ */ D(ie, {
|
|
1166
1177
|
size: 14,
|
|
1167
1178
|
"aria-hidden": "true"
|
|
1168
1179
|
}), " import"]
|
|
1169
1180
|
})]
|
|
1170
|
-
}),
|
|
1181
|
+
}), De.length === 0 ? /* @__PURE__ */ D("div", {
|
|
1171
1182
|
className: "cmg-recent-empty mono",
|
|
1172
1183
|
children: "no transcripts published yet."
|
|
1173
1184
|
}) : /* @__PURE__ */ D("ul", {
|
|
1174
1185
|
className: "cmg-pub-list",
|
|
1175
|
-
children:
|
|
1186
|
+
children: De.map((e) => /* @__PURE__ */ O("li", {
|
|
1176
1187
|
className: "cmg-pub-row",
|
|
1177
1188
|
children: [
|
|
1178
1189
|
/* @__PURE__ */ D("span", {
|
|
@@ -1198,7 +1209,7 @@ function ke() {
|
|
|
1198
1209
|
e.turns
|
|
1199
1210
|
]
|
|
1200
1211
|
}),
|
|
1201
|
-
/* @__PURE__ */ D(
|
|
1212
|
+
/* @__PURE__ */ D(ke, { v: e.visibility }),
|
|
1202
1213
|
/* @__PURE__ */ D("span", {
|
|
1203
1214
|
className: "cmg-pub-date mono tnum",
|
|
1204
1215
|
children: e.date
|
|
@@ -1244,7 +1255,7 @@ function ke() {
|
|
|
1244
1255
|
children: "transcripts are imported through the peasant cli, not the web ui. follow these steps from a terminal:"
|
|
1245
1256
|
}), /* @__PURE__ */ D("ol", {
|
|
1246
1257
|
className: "cmg-import-steps",
|
|
1247
|
-
children:
|
|
1258
|
+
children: Oe.map((e) => /* @__PURE__ */ O("li", {
|
|
1248
1259
|
className: "cmg-step",
|
|
1249
1260
|
children: [/* @__PURE__ */ D("span", {
|
|
1250
1261
|
className: "cmg-step-n tnum",
|
|
@@ -1255,7 +1266,7 @@ function ke() {
|
|
|
1255
1266
|
children: [/* @__PURE__ */ D("div", {
|
|
1256
1267
|
className: "cmg-step-title",
|
|
1257
1268
|
children: e.title
|
|
1258
|
-
}), /* @__PURE__ */ D(
|
|
1269
|
+
}), /* @__PURE__ */ D(Ee, {
|
|
1259
1270
|
cmd: e.cmd,
|
|
1260
1271
|
note: e.note
|
|
1261
1272
|
})]
|
|
@@ -1277,7 +1288,7 @@ function ke() {
|
|
|
1277
1288
|
})]
|
|
1278
1289
|
});
|
|
1279
1290
|
}
|
|
1280
|
-
var
|
|
1291
|
+
var je = [
|
|
1281
1292
|
{
|
|
1282
1293
|
value: "open",
|
|
1283
1294
|
short: "Open",
|
|
@@ -1296,7 +1307,7 @@ var Ae = [
|
|
|
1296
1307
|
label: "curated",
|
|
1297
1308
|
rationale: "the owner must approve each share before it appears."
|
|
1298
1309
|
}
|
|
1299
|
-
],
|
|
1310
|
+
], Me = [
|
|
1300
1311
|
{
|
|
1301
1312
|
value: "members_only",
|
|
1302
1313
|
short: "Members only",
|
|
@@ -1315,11 +1326,11 @@ var Ae = [
|
|
|
1315
1326
|
label: "public",
|
|
1316
1327
|
rationale: "anyone at all can browse the dataset."
|
|
1317
1328
|
}
|
|
1318
|
-
],
|
|
1329
|
+
], Ne = [
|
|
1319
1330
|
"@anthropic-labs",
|
|
1320
1331
|
"@data-collective",
|
|
1321
1332
|
"@openai-research"
|
|
1322
|
-
],
|
|
1333
|
+
], Pe = [
|
|
1323
1334
|
{
|
|
1324
1335
|
id: "c1",
|
|
1325
1336
|
name: "AI Research Team",
|
|
@@ -1351,15 +1362,15 @@ var Ae = [
|
|
|
1351
1362
|
since: "Joined today"
|
|
1352
1363
|
}
|
|
1353
1364
|
];
|
|
1354
|
-
function
|
|
1355
|
-
let t =
|
|
1365
|
+
function Fe({ mode: e }) {
|
|
1366
|
+
let t = je.find((t) => t.value === e);
|
|
1356
1367
|
return /* @__PURE__ */ D("span", {
|
|
1357
1368
|
className: "chip " + (e === "open" ? "chip-ok" : e === "curated" ? "chip-warn" : ""),
|
|
1358
1369
|
children: t ? t.short.toLowerCase() : e
|
|
1359
1370
|
});
|
|
1360
1371
|
}
|
|
1361
|
-
function
|
|
1362
|
-
let { collectives: r =
|
|
1372
|
+
function Ie({ data: e = {}, actions: n = {} } = {}) {
|
|
1373
|
+
let { collectives: r = Pe, linkedOrgs: i = Ne, title: a = "collectives", deck: o = "groups that govern shared data together.", crumb: s = "collectives", createLabel: c = "new collective", createBusy: l = !1 } = e, { onCreateCollective: u, onOpenCollective: d } = n, [f, p] = T(!1), [m, h] = T(""), [g, _] = T(""), [v, y] = T("open"), [b, x] = T("members_only"), [C, w] = T(""), k = S();
|
|
1363
1374
|
return /* @__PURE__ */ D("div", {
|
|
1364
1375
|
className: "cmg-root",
|
|
1365
1376
|
children: /* @__PURE__ */ O("div", {
|
|
@@ -1393,7 +1404,7 @@ function Fe({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1393
1404
|
className: "btn btn-sm " + (f ? "btn-secondary" : "btn-primary"),
|
|
1394
1405
|
"aria-expanded": f,
|
|
1395
1406
|
onClick: () => p((e) => !e),
|
|
1396
|
-
children: [D(f ? Z :
|
|
1407
|
+
children: [D(f ? Z : K, {
|
|
1397
1408
|
size: 14,
|
|
1398
1409
|
"aria-hidden": "true"
|
|
1399
1410
|
}), f ? "cancel" : c]
|
|
@@ -1445,7 +1456,7 @@ function Fe({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1445
1456
|
name: "acceptance-mode",
|
|
1446
1457
|
value: v,
|
|
1447
1458
|
onChange: y,
|
|
1448
|
-
options:
|
|
1459
|
+
options: je
|
|
1449
1460
|
})
|
|
1450
1461
|
}),
|
|
1451
1462
|
/* @__PURE__ */ D("div", {
|
|
@@ -1456,7 +1467,7 @@ function Fe({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1456
1467
|
name: "data-access",
|
|
1457
1468
|
value: b,
|
|
1458
1469
|
onChange: x,
|
|
1459
|
-
options:
|
|
1470
|
+
options: Me
|
|
1460
1471
|
})
|
|
1461
1472
|
}),
|
|
1462
1473
|
/* @__PURE__ */ O("label", {
|
|
@@ -1503,7 +1514,7 @@ function Fe({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1503
1514
|
}), /* @__PURE__ */ D("span", {
|
|
1504
1515
|
id: k,
|
|
1505
1516
|
className: "cmg-form-hint mono",
|
|
1506
|
-
children:
|
|
1517
|
+
children: je.find((e) => e.value === v)?.rationale
|
|
1507
1518
|
})]
|
|
1508
1519
|
})
|
|
1509
1520
|
]
|
|
@@ -1528,7 +1539,7 @@ function Fe({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1528
1539
|
children: [/* @__PURE__ */ D("span", {
|
|
1529
1540
|
className: "cmg-col-name",
|
|
1530
1541
|
children: e.name
|
|
1531
|
-
}), /* @__PURE__ */ D(
|
|
1542
|
+
}), /* @__PURE__ */ D(Fe, { mode: e.mode })]
|
|
1532
1543
|
}),
|
|
1533
1544
|
/* @__PURE__ */ D("span", {
|
|
1534
1545
|
className: "cmg-col-desc",
|
|
@@ -1578,12 +1589,12 @@ function Fe({ data: e = {}, actions: n = {} } = {}) {
|
|
|
1578
1589
|
})
|
|
1579
1590
|
});
|
|
1580
1591
|
}
|
|
1581
|
-
var
|
|
1592
|
+
var Le = [
|
|
1582
1593
|
"owner",
|
|
1583
1594
|
"member",
|
|
1584
1595
|
"contributor",
|
|
1585
1596
|
"guest"
|
|
1586
|
-
],
|
|
1597
|
+
], Re = [
|
|
1587
1598
|
{
|
|
1588
1599
|
id: "claude-code",
|
|
1589
1600
|
pct: 58
|
|
@@ -1600,7 +1611,7 @@ var Ie = [
|
|
|
1600
1611
|
id: "codex",
|
|
1601
1612
|
pct: 6
|
|
1602
1613
|
}
|
|
1603
|
-
],
|
|
1614
|
+
], ze = [
|
|
1604
1615
|
{
|
|
1605
1616
|
id: "p1",
|
|
1606
1617
|
provider: "claude-code",
|
|
@@ -1619,7 +1630,7 @@ var Ie = [
|
|
|
1619
1630
|
title: "Multi-agent debugging session",
|
|
1620
1631
|
by: "@bob-ai"
|
|
1621
1632
|
}
|
|
1622
|
-
],
|
|
1633
|
+
], Be = [
|
|
1623
1634
|
{
|
|
1624
1635
|
handle: "@alice-dev",
|
|
1625
1636
|
name: "Alice Developer",
|
|
@@ -1644,7 +1655,7 @@ var Ie = [
|
|
|
1644
1655
|
role: "contributor",
|
|
1645
1656
|
n: 9
|
|
1646
1657
|
}
|
|
1647
|
-
],
|
|
1658
|
+
], Ve = [
|
|
1648
1659
|
{
|
|
1649
1660
|
id: "r1",
|
|
1650
1661
|
cat: "CREDENTIAL",
|
|
@@ -1685,7 +1696,7 @@ var Ie = [
|
|
|
1685
1696
|
summary: "local path detected"
|
|
1686
1697
|
}
|
|
1687
1698
|
];
|
|
1688
|
-
function
|
|
1699
|
+
function He({ item: e }) {
|
|
1689
1700
|
let [t, n] = T(!1), r = e.confidence < 70;
|
|
1690
1701
|
return /* @__PURE__ */ O("div", {
|
|
1691
1702
|
className: "cmg-redact" + (t ? " cmg-redact-exposed" : "") + (r && !t ? " cmg-redact-low" : ""),
|
|
@@ -1809,7 +1820,7 @@ function Ve({ item: e }) {
|
|
|
1809
1820
|
}), " this content will be exposed"]
|
|
1810
1821
|
}) : /* @__PURE__ */ O("span", {
|
|
1811
1822
|
className: "cmg-redact-safe mono",
|
|
1812
|
-
children: [/* @__PURE__ */ D(
|
|
1823
|
+
children: [/* @__PURE__ */ D(J, {
|
|
1813
1824
|
size: 13,
|
|
1814
1825
|
"aria-hidden": "true"
|
|
1815
1826
|
}), " redacted (safe default)"]
|
|
@@ -1834,12 +1845,12 @@ function Ve({ item: e }) {
|
|
|
1834
1845
|
]
|
|
1835
1846
|
});
|
|
1836
1847
|
}
|
|
1837
|
-
function
|
|
1848
|
+
function Ue({ data: e = {}, actions: t = {} } = {}) {
|
|
1838
1849
|
let { collective: r = {
|
|
1839
1850
|
name: "AI Research Team",
|
|
1840
1851
|
description: "Sharing transcripts related to AI research",
|
|
1841
1852
|
linkedGithubOrg: "@anthropic-labs"
|
|
1842
|
-
}, providerShare: i =
|
|
1853
|
+
}, providerShare: i = Re, pendingReview: a = ze, members: o = Be, redactions: s = Ve, browseRows: c = [
|
|
1843
1854
|
{
|
|
1844
1855
|
title: "Building a REST API from scratch",
|
|
1845
1856
|
contributor: "@alice-dev",
|
|
@@ -1867,7 +1878,7 @@ function He({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1867
1878
|
tokens: "121K",
|
|
1868
1879
|
date: "Jun 12"
|
|
1869
1880
|
}
|
|
1870
|
-
], roleOptions: l =
|
|
1881
|
+
], roleOptions: l = Le, initialRole: u = "owner", initialShowRedaction: f = !0, initialBrowseGated: p = !1, targetCollective: g = Ke, stats: v = {
|
|
1871
1882
|
transcripts: "248",
|
|
1872
1883
|
projects: "31 projects",
|
|
1873
1884
|
tokens: "4.2M",
|
|
@@ -1953,7 +1964,7 @@ function He({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1953
1964
|
type: "button",
|
|
1954
1965
|
className: "btn btn-sm btn-primary",
|
|
1955
1966
|
onClick: () => k?.(),
|
|
1956
|
-
children: [/* @__PURE__ */ D(
|
|
1967
|
+
children: [/* @__PURE__ */ D(ie, {
|
|
1957
1968
|
size: 14,
|
|
1958
1969
|
"aria-hidden": "true"
|
|
1959
1970
|
}), " contribute"]
|
|
@@ -1971,7 +1982,7 @@ function He({ data: e = {}, actions: t = {} } = {}) {
|
|
|
1971
1982
|
type: "button",
|
|
1972
1983
|
className: "btn btn-sm btn-secondary",
|
|
1973
1984
|
onClick: () => C?.(),
|
|
1974
|
-
children: [/* @__PURE__ */ D(
|
|
1985
|
+
children: [/* @__PURE__ */ D(re, {
|
|
1975
1986
|
size: 14,
|
|
1976
1987
|
"aria-hidden": "true"
|
|
1977
1988
|
}), " settings"]
|
|
@@ -2035,7 +2046,7 @@ function He({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2035
2046
|
label: "provider share",
|
|
2036
2047
|
total: 100,
|
|
2037
2048
|
data: i.map((e) => ({
|
|
2038
|
-
label:
|
|
2049
|
+
label: Te(e.id),
|
|
2039
2050
|
value: e.pct
|
|
2040
2051
|
}))
|
|
2041
2052
|
})]
|
|
@@ -2086,7 +2097,7 @@ function He({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2086
2097
|
}), /* @__PURE__ */ D("div", { children: "safe by default: every detected item stays redacted unless you opt out per item. there is no bulk accept." })]
|
|
2087
2098
|
}), /* @__PURE__ */ D("div", {
|
|
2088
2099
|
className: "cmg-redact-list",
|
|
2089
|
-
children: s.map((e) => /* @__PURE__ */ D(
|
|
2100
|
+
children: s.map((e) => /* @__PURE__ */ D(He, { item: e }, e.id))
|
|
2090
2101
|
})] })]
|
|
2091
2102
|
}),
|
|
2092
2103
|
/* @__PURE__ */ O("section", {
|
|
@@ -2172,7 +2183,7 @@ function He({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2172
2183
|
/* @__PURE__ */ O("td", { children: [
|
|
2173
2184
|
/* @__PURE__ */ D(y, { harness: e.providerId }),
|
|
2174
2185
|
" ",
|
|
2175
|
-
|
|
2186
|
+
Te(e.providerId)
|
|
2176
2187
|
] }),
|
|
2177
2188
|
/* @__PURE__ */ D("td", {
|
|
2178
2189
|
className: "cmg-num tnum",
|
|
@@ -2252,7 +2263,7 @@ function He({ data: e = {}, actions: t = {} } = {}) {
|
|
|
2252
2263
|
})
|
|
2253
2264
|
});
|
|
2254
2265
|
}
|
|
2255
|
-
function
|
|
2266
|
+
function We() {
|
|
2256
2267
|
let [t, c] = T("AI Research Team"), [u, d] = T("Sharing transcripts related to AI research"), [f, p] = T("curated"), [m, h] = T("members_only"), [_, v] = T(!0), [y, b] = T("user_choice"), [x, S] = T(!1);
|
|
2257
2268
|
return /* @__PURE__ */ D("div", {
|
|
2258
2269
|
className: "cmg-root cmg-settings",
|
|
@@ -2485,7 +2496,7 @@ function Ue() {
|
|
|
2485
2496
|
})
|
|
2486
2497
|
});
|
|
2487
2498
|
}
|
|
2488
|
-
var
|
|
2499
|
+
var Ge = [
|
|
2489
2500
|
{
|
|
2490
2501
|
id: "village",
|
|
2491
2502
|
name: "village",
|
|
@@ -2534,14 +2545,14 @@ var We = [
|
|
|
2534
2545
|
visibility: "private"
|
|
2535
2546
|
}]
|
|
2536
2547
|
}
|
|
2537
|
-
],
|
|
2548
|
+
], Ke = {
|
|
2538
2549
|
name: "AI Research Team",
|
|
2539
2550
|
members: 12
|
|
2540
2551
|
};
|
|
2541
|
-
function
|
|
2542
|
-
let [e, t] = T(() => /* @__PURE__ */ new Set(["v1"])), [n, r] = T(() => new Set(
|
|
2552
|
+
function qe() {
|
|
2553
|
+
let [e, t] = T(() => /* @__PURE__ */ new Set(["v1"])), [n, r] = T(() => new Set(Ge.map((e) => e.id))), [i, a] = T(!1), o = C(() => {
|
|
2543
2554
|
let e = {};
|
|
2544
|
-
return
|
|
2555
|
+
return Ge.forEach((t) => t.transcripts.forEach((n) => e[n.id] = {
|
|
2545
2556
|
...n,
|
|
2546
2557
|
project: t.name
|
|
2547
2558
|
})), e;
|
|
@@ -2608,7 +2619,7 @@ function Ke() {
|
|
|
2608
2619
|
/* @__PURE__ */ D("section", {
|
|
2609
2620
|
className: "card cmg-contribute",
|
|
2610
2621
|
"aria-label": "your transcripts by project",
|
|
2611
|
-
children:
|
|
2622
|
+
children: Ge.map((t) => {
|
|
2612
2623
|
let r = c(t), i = n.has(t.id);
|
|
2613
2624
|
return /* @__PURE__ */ O("div", {
|
|
2614
2625
|
className: "cmg-proj",
|
|
@@ -2678,7 +2689,7 @@ function Ke() {
|
|
|
2678
2689
|
className: "cmg-tx-title",
|
|
2679
2690
|
children: t.title
|
|
2680
2691
|
}),
|
|
2681
|
-
/* @__PURE__ */ D(
|
|
2692
|
+
/* @__PURE__ */ D(ke, { v: t.visibility }),
|
|
2682
2693
|
/* @__PURE__ */ D("span", {
|
|
2683
2694
|
className: "cmg-tx-date mono tnum",
|
|
2684
2695
|
children: t.date
|
|
@@ -2726,7 +2737,7 @@ function Ke() {
|
|
|
2726
2737
|
disabled: e.size === 0,
|
|
2727
2738
|
onClick: () => a(!0),
|
|
2728
2739
|
children: [
|
|
2729
|
-
/* @__PURE__ */ D(
|
|
2740
|
+
/* @__PURE__ */ D(ie, {
|
|
2730
2741
|
size: 14,
|
|
2731
2742
|
"aria-hidden": "true"
|
|
2732
2743
|
}),
|
|
@@ -2753,7 +2764,7 @@ function Ke() {
|
|
|
2753
2764
|
" private transcript",
|
|
2754
2765
|
f === 1 ? "" : "s",
|
|
2755
2766
|
" will become visible to members of ",
|
|
2756
|
-
/* @__PURE__ */ D("b", { children:
|
|
2767
|
+
/* @__PURE__ */ D("b", { children: Ke.name }),
|
|
2757
2768
|
". visibility will change from private to shared."
|
|
2758
2769
|
] }) : /* @__PURE__ */ O("p", { children: [
|
|
2759
2770
|
"contributing ",
|
|
@@ -2771,8 +2782,8 @@ function Ke() {
|
|
|
2771
2782
|
}, {
|
|
2772
2783
|
icon: X,
|
|
2773
2784
|
key: "shared with",
|
|
2774
|
-
value:
|
|
2775
|
-
scope: `${
|
|
2785
|
+
value: Ke.name,
|
|
2786
|
+
scope: `${Ke.members} members can see it`,
|
|
2776
2787
|
tone: "open"
|
|
2777
2788
|
}],
|
|
2778
2789
|
requireConsent: f > 0,
|
|
@@ -2790,7 +2801,7 @@ function Ke() {
|
|
|
2790
2801
|
className: "cmg-confirm-title",
|
|
2791
2802
|
children: e.title
|
|
2792
2803
|
}),
|
|
2793
|
-
/* @__PURE__ */ D(
|
|
2804
|
+
/* @__PURE__ */ D(ke, { v: e.visibility })
|
|
2794
2805
|
]
|
|
2795
2806
|
}, e.id)), d.length > 5 ? /* @__PURE__ */ O("li", {
|
|
2796
2807
|
className: "cmg-confirm-more mono",
|
|
@@ -2806,7 +2817,7 @@ function Ke() {
|
|
|
2806
2817
|
}
|
|
2807
2818
|
//#endregion
|
|
2808
2819
|
//#region src/ui/commons/Manage.jsx
|
|
2809
|
-
var
|
|
2820
|
+
var Je = {
|
|
2810
2821
|
name: "",
|
|
2811
2822
|
description: null,
|
|
2812
2823
|
linkedGithubOrg: null,
|
|
@@ -2814,15 +2825,15 @@ var qe = {
|
|
|
2814
2825
|
dataAccess: "",
|
|
2815
2826
|
role: "",
|
|
2816
2827
|
memberSince: null
|
|
2817
|
-
},
|
|
2828
|
+
}, Ye = {
|
|
2818
2829
|
transcripts: "0",
|
|
2819
2830
|
projects: "0 providers",
|
|
2820
2831
|
tokens: "0",
|
|
2821
2832
|
turns: "0 turns",
|
|
2822
2833
|
contributors: "0 members",
|
|
2823
2834
|
hours: "0 total"
|
|
2824
|
-
},
|
|
2825
|
-
collective:
|
|
2835
|
+
}, Xe = {
|
|
2836
|
+
collective: Je,
|
|
2826
2837
|
providerShare: [],
|
|
2827
2838
|
pendingReview: [],
|
|
2828
2839
|
members: [],
|
|
@@ -2832,14 +2843,14 @@ var qe = {
|
|
|
2832
2843
|
initialRole: "",
|
|
2833
2844
|
initialShowRedaction: !1,
|
|
2834
2845
|
initialBrowseGated: !1,
|
|
2835
|
-
stats:
|
|
2836
|
-
},
|
|
2846
|
+
stats: Ye
|
|
2847
|
+
}, Ze = [
|
|
2837
2848
|
"owner",
|
|
2838
2849
|
"member",
|
|
2839
2850
|
"contributor",
|
|
2840
2851
|
"guest"
|
|
2841
2852
|
];
|
|
2842
|
-
function
|
|
2853
|
+
function Qe(e) {
|
|
2843
2854
|
if (!e) return "unknown";
|
|
2844
2855
|
let t = new Date(e);
|
|
2845
2856
|
return Number.isNaN(t.getTime()) ? "unknown" : new Intl.DateTimeFormat("en-US", {
|
|
@@ -2847,8 +2858,8 @@ function Ze(e) {
|
|
|
2847
2858
|
day: "numeric"
|
|
2848
2859
|
}).format(t);
|
|
2849
2860
|
}
|
|
2850
|
-
function
|
|
2851
|
-
let { collective: i =
|
|
2861
|
+
function $e({ data: e = Xe, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
2862
|
+
let { collective: i = Je, providerShare: a = [], pendingReview: o = [], members: s = [], redactions: c = [], browseRows: l = [], roleOptions: u = [], initialRole: f = "", initialShowRedaction: p = !1, initialBrowseGated: v = !1, stats: y = Ye } = e || Xe, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: w, onContribute: E, onToggleBrowse: k } = t || {}, [A, j] = T(f || i.role || ""), [M, P] = T(!!p), [F, I] = T(!!v), L = A || i.role || "guest", B = L === "owner", H = L === "guest", U = r && u.length > 0, ee = C(() => U ? u : [], [U, u]), te = (e) => {
|
|
2852
2863
|
j(e), b?.(e);
|
|
2853
2864
|
};
|
|
2854
2865
|
return /* @__PURE__ */ D("div", {
|
|
@@ -2917,7 +2928,7 @@ function Qe({ data: e = Ye, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
2917
2928
|
className: "cmg-roleswitch",
|
|
2918
2929
|
role: "group",
|
|
2919
2930
|
"aria-label": "your role",
|
|
2920
|
-
children:
|
|
2931
|
+
children: Ze.map((e) => /* @__PURE__ */ D("span", {
|
|
2921
2932
|
className: "cmg-roleseg",
|
|
2922
2933
|
"aria-current": L === e ? "true" : void 0,
|
|
2923
2934
|
"data-active": L === e || void 0,
|
|
@@ -2956,7 +2967,7 @@ function Qe({ data: e = Ye, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
2956
2967
|
type: "button",
|
|
2957
2968
|
className: "btn btn-sm btn-secondary",
|
|
2958
2969
|
onClick: () => w?.(),
|
|
2959
|
-
children: [/* @__PURE__ */ D(
|
|
2970
|
+
children: [/* @__PURE__ */ D(re, {
|
|
2960
2971
|
size: 14,
|
|
2961
2972
|
"aria-hidden": "true"
|
|
2962
2973
|
}), " settings"]
|
|
@@ -3020,7 +3031,7 @@ function Qe({ data: e = Ye, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3020
3031
|
label: "provider share",
|
|
3021
3032
|
total: 100,
|
|
3022
3033
|
data: a.map((e) => ({
|
|
3023
|
-
label:
|
|
3034
|
+
label: Te(e.id),
|
|
3024
3035
|
value: e.pct
|
|
3025
3036
|
}))
|
|
3026
3037
|
})]
|
|
@@ -3180,7 +3191,7 @@ function Qe({ data: e = Ye, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3180
3191
|
"aria-hidden": "true"
|
|
3181
3192
|
}),
|
|
3182
3193
|
" ",
|
|
3183
|
-
e.providerId ?
|
|
3194
|
+
e.providerId ? Te(e.providerId) : we(e.provider)
|
|
3184
3195
|
] }),
|
|
3185
3196
|
/* @__PURE__ */ D("td", {
|
|
3186
3197
|
className: "cmg-num tnum",
|
|
@@ -3192,7 +3203,7 @@ function Qe({ data: e = Ye, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3192
3203
|
}),
|
|
3193
3204
|
/* @__PURE__ */ D("td", {
|
|
3194
3205
|
className: "mono tnum",
|
|
3195
|
-
children: e.date ||
|
|
3206
|
+
children: e.date || Qe(null)
|
|
3196
3207
|
})
|
|
3197
3208
|
] }, `${e.title}-${e.contributor}`)) })]
|
|
3198
3209
|
}) : /* @__PURE__ */ O("div", {
|
|
@@ -3237,4 +3248,4 @@ function Qe({ data: e = Ye, actions: t = {}, demoRoleSwitcher: r = !1 } = {}) {
|
|
|
3237
3248
|
});
|
|
3238
3249
|
}
|
|
3239
3250
|
//#endregion
|
|
3240
|
-
export { se as ACCEPTANCE_MODES,
|
|
3251
|
+
export { se as ACCEPTANCE_MODES, $ as COLLECTIVE_ROLES, Ue as CollectiveDetailView, We as CollectiveSettingsView, Ie as CollectivesView, qe as ContributeView, ce as DATA_ACCESS_POLICIES, Ce as Explore, $e as Manage, Ae as PublishView, Q as TRANSCRIPT_DELETION_POLICIES, oe as TRANSCRIPT_VISIBILITIES };
|