@arbidocs/blocks 0.5.175 → 0.5.177
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/{ConnectedCallDock-LW7S4ROJ.cjs → ConnectedCallDock-KD5LWW2E.cjs} +5 -5
- package/dist/{ConnectedCallDock-LW7S4ROJ.cjs.map → ConnectedCallDock-KD5LWW2E.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-YXJUNNUX.cjs → ConnectedCallRoom-GSMF7ZUE.cjs} +5 -5
- package/dist/{ConnectedCallRoom-YXJUNNUX.cjs.map → ConnectedCallRoom-GSMF7ZUE.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-AAQJZYZH.cjs → ConnectedNativeDocxComparison-3MRTTNR2.cjs} +7 -7
- package/dist/{ConnectedNativeDocxComparison-AAQJZYZH.cjs.map → ConnectedNativeDocxComparison-3MRTTNR2.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-CSNA2CJD.cjs → ConnectedStreamedWordArtifact-HNTS6HS4.cjs} +7 -7
- package/dist/{ConnectedStreamedWordArtifact-CSNA2CJD.cjs.map → ConnectedStreamedWordArtifact-HNTS6HS4.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-LOUVMFRX.cjs → DocumentReviewCard-RPHIQZ2Y.cjs} +14 -14
- package/dist/{DocumentReviewCard-LOUVMFRX.cjs.map → DocumentReviewCard-RPHIQZ2Y.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-2NZR4MHD.cjs → FilesViewerDialog-JIV4VGYQ.cjs} +18 -18
- package/dist/{FilesViewerDialog-2NZR4MHD.cjs.map → FilesViewerDialog-JIV4VGYQ.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-LGDLG3TX.cjs → WorkspaceTableView-QT63XYII.cjs} +7 -7
- package/dist/{WorkspaceTableView-LGDLG3TX.cjs.map → WorkspaceTableView-QT63XYII.cjs.map} +1 -1
- package/dist/agents/index.cjs +164 -164
- package/dist/{ai-NZKIMYW5.cjs → ai-XIT4MY3S.cjs} +13 -13
- package/dist/ai-XIT4MY3S.cjs.map +1 -0
- package/dist/calls/index.cjs +23 -23
- package/dist/chat/CitationMark.js +3 -2
- package/dist/chat/CitationMark.js.map +2 -2
- package/dist/chat/index.cjs +29 -29
- package/dist/chat/passage-text.d.ts +6 -0
- package/dist/chat/passage-text.js +8 -0
- package/dist/chat/passage-text.js.map +7 -0
- package/dist/{chunk-6DHDITKK.cjs → chunk-2D5GZMSK.cjs} +28 -19
- package/dist/chunk-2D5GZMSK.cjs.map +1 -0
- package/dist/{chunk-DVRAM3J4.cjs → chunk-3YUC23EC.cjs} +4 -4
- package/dist/{chunk-DVRAM3J4.cjs.map → chunk-3YUC23EC.cjs.map} +1 -1
- package/dist/{chunk-PXC6RSHQ.cjs → chunk-4AT2LJ2H.cjs} +4 -4
- package/dist/{chunk-PXC6RSHQ.cjs.map → chunk-4AT2LJ2H.cjs.map} +1 -1
- package/dist/{chunk-ZSQZZGC7.cjs → chunk-63D67ZGG.cjs} +6 -6
- package/dist/{chunk-ZSQZZGC7.cjs.map → chunk-63D67ZGG.cjs.map} +1 -1
- package/dist/{chunk-7TEHA3JK.cjs → chunk-6CPJ5ZOY.cjs} +9 -4
- package/dist/chunk-6CPJ5ZOY.cjs.map +1 -0
- package/dist/{chunk-A257IJ5J.cjs → chunk-6EJ7KD4U.cjs} +6 -6
- package/dist/{chunk-A257IJ5J.cjs.map → chunk-6EJ7KD4U.cjs.map} +1 -1
- package/dist/{chunk-H4N6BZNU.cjs → chunk-A7MGQMOV.cjs} +3 -3
- package/dist/{chunk-H4N6BZNU.cjs.map → chunk-A7MGQMOV.cjs.map} +1 -1
- package/dist/{chunk-7OMRSZOJ.cjs → chunk-AWWGV5LL.cjs} +28 -28
- package/dist/{chunk-7OMRSZOJ.cjs.map → chunk-AWWGV5LL.cjs.map} +1 -1
- package/dist/{chunk-OIMDCS4Y.cjs → chunk-CYMAF656.cjs} +5 -5
- package/dist/{chunk-OIMDCS4Y.cjs.map → chunk-CYMAF656.cjs.map} +1 -1
- package/dist/{chunk-NFXHBTAO.cjs → chunk-DKKW7GOJ.cjs} +4 -4
- package/dist/{chunk-NFXHBTAO.cjs.map → chunk-DKKW7GOJ.cjs.map} +1 -1
- package/dist/{chunk-MXP32DA2.cjs → chunk-GLFMRQBT.cjs} +3 -3
- package/dist/{chunk-MXP32DA2.cjs.map → chunk-GLFMRQBT.cjs.map} +1 -1
- package/dist/{chunk-NTQJHLYM.cjs → chunk-HX5SALXN.cjs} +4 -4
- package/dist/{chunk-NTQJHLYM.cjs.map → chunk-HX5SALXN.cjs.map} +1 -1
- package/dist/{chunk-MZPBZSKS.cjs → chunk-I5LXJLO5.cjs} +3 -3
- package/dist/{chunk-MZPBZSKS.cjs.map → chunk-I5LXJLO5.cjs.map} +1 -1
- package/dist/{chunk-6AFAYGJW.cjs → chunk-L3MYUPSH.cjs} +5 -5
- package/dist/{chunk-6AFAYGJW.cjs.map → chunk-L3MYUPSH.cjs.map} +1 -1
- package/dist/{chunk-JEHGTPS2.cjs → chunk-LYDSETR7.cjs} +3 -3
- package/dist/{chunk-JEHGTPS2.cjs.map → chunk-LYDSETR7.cjs.map} +1 -1
- package/dist/{chunk-5G33DATM.cjs → chunk-MZ7IUHQA.cjs} +42 -39
- package/dist/chunk-MZ7IUHQA.cjs.map +1 -0
- package/dist/{chunk-HSYRI3JQ.cjs → chunk-POUMLXMJ.cjs} +6 -6
- package/dist/{chunk-HSYRI3JQ.cjs.map → chunk-POUMLXMJ.cjs.map} +1 -1
- package/dist/{chunk-VCVB2OP7.cjs → chunk-RMRJ5KVE.cjs} +28 -28
- package/dist/{chunk-VCVB2OP7.cjs.map → chunk-RMRJ5KVE.cjs.map} +1 -1
- package/dist/{chunk-SZ4U6GYC.cjs → chunk-SMGUXRO5.cjs} +31 -31
- package/dist/{chunk-SZ4U6GYC.cjs.map → chunk-SMGUXRO5.cjs.map} +1 -1
- package/dist/{chunk-PUKLWHV6.cjs → chunk-TH3G7FZE.cjs} +5 -5
- package/dist/{chunk-PUKLWHV6.cjs.map → chunk-TH3G7FZE.cjs.map} +1 -1
- package/dist/{chunk-DI6UEQCZ.cjs → chunk-TQATDAJV.cjs} +4 -4
- package/dist/{chunk-DI6UEQCZ.cjs.map → chunk-TQATDAJV.cjs.map} +1 -1
- package/dist/{chunk-5YLNNO3N.cjs → chunk-TUURH4NE.cjs} +4 -4
- package/dist/{chunk-5YLNNO3N.cjs.map → chunk-TUURH4NE.cjs.map} +1 -1
- package/dist/{chunk-ZT6C4MNX.cjs → chunk-UC6Z7E6C.cjs} +4 -4
- package/dist/{chunk-ZT6C4MNX.cjs.map → chunk-UC6Z7E6C.cjs.map} +1 -1
- package/dist/{chunk-EBY2JHL3.cjs → chunk-VSX4CD7P.cjs} +62 -61
- package/dist/chunk-VSX4CD7P.cjs.map +1 -0
- package/dist/connect/docx.cjs +10 -10
- package/dist/connect/index.cjs +1059 -1059
- package/dist/connect/viewer.cjs +15 -15
- package/dist/connection/files/explorer/FileTiles.js +6 -3
- package/dist/connection/files/explorer/FileTiles.js.map +2 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js +2 -1
- package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
- package/dist/connection/viewer/useViewerTabs.d.ts +1 -1
- package/dist/connection/viewer/useViewerTabs.js +2 -2
- package/dist/connection/viewer/useViewerTabs.js.map +2 -2
- package/dist/embed/index.cjs +19 -19
- package/dist/files/ExplorerTile.d.ts +7 -0
- package/dist/files/ExplorerTile.js +17 -14
- package/dist/files/ExplorerTile.js.map +2 -2
- package/dist/files/ViewerChrome.js +1 -1
- package/dist/files/ViewerChrome.js.map +2 -2
- package/dist/files/ViewerParts.d.ts +6 -1
- package/dist/files/ViewerParts.js +9 -2
- package/dist/files/ViewerParts.js.map +2 -2
- package/dist/files/index.cjs +227 -227
- package/dist/home/index.cjs +9 -9
- package/dist/index.cjs +807 -807
- package/dist/pages/index.cjs +18 -18
- package/dist/settings/index.cjs +136 -136
- package/dist/site/index.cjs +5 -5
- package/dist/studio/index.cjs +6 -6
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/index.cjs +27 -27
- package/dist/workspaces/index.cjs +5 -5
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ai-NZKIMYW5.cjs.map +0 -1
- package/dist/chunk-5G33DATM.cjs.map +0 -1
- package/dist/chunk-6DHDITKK.cjs.map +0 -1
- package/dist/chunk-7TEHA3JK.cjs.map +0 -1
- package/dist/chunk-EBY2JHL3.cjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkUC6Z7E6C_cjs = require('./chunk-UC6Z7E6C.cjs');
|
|
5
5
|
require('./chunk-7GVKG3G4.cjs');
|
|
6
6
|
require('./chunk-OHWYQI3B.cjs');
|
|
7
7
|
require('./chunk-ER2MRSLT.cjs');
|
|
8
8
|
require('./chunk-3EIO4ZH5.cjs');
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-6EJ7KD4U.cjs');
|
|
10
|
+
require('./chunk-6CPJ5ZOY.cjs');
|
|
11
11
|
require('./chunk-ZHLBTIJJ.cjs');
|
|
12
12
|
require('./chunk-5F4DCIHS.cjs');
|
|
13
13
|
require('./chunk-AFQTQC7A.cjs');
|
|
@@ -41,35 +41,35 @@ require('./chunk-PLIF5CUV.cjs');
|
|
|
41
41
|
|
|
42
42
|
Object.defineProperty(exports, "ConnectedAssistantDock", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkUC6Z7E6C_cjs.ConnectedAssistantDock; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "redlineStats", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkUC6Z7E6C_cjs.redlineStats; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "textToArtifact", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkUC6Z7E6C_cjs.textToArtifact; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "toRedlineMarkdown", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkUC6Z7E6C_cjs.toRedlineMarkdown; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "useConnectedAiTask", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkUC6Z7E6C_cjs.useConnectedAiTask; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "useConnectedChat", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkUC6Z7E6C_cjs.useConnectedChat; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "useSemanticSearch", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkUC6Z7E6C_cjs.useSemanticSearch; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkUC6Z7E6C_cjs.useWorkspaceDocs; }
|
|
73
73
|
});
|
|
74
|
-
//# sourceMappingURL=ai-
|
|
75
|
-
//# sourceMappingURL=ai-
|
|
74
|
+
//# sourceMappingURL=ai-XIT4MY3S.cjs.map
|
|
75
|
+
//# sourceMappingURL=ai-XIT4MY3S.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ai-XIT4MY3S.cjs"}
|
package/dist/calls/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkBCU65RJM_cjs = require('../chunk-BCU65RJM.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkI5LXJLO5_cjs = require('../chunk-I5LXJLO5.cjs');
|
|
6
6
|
var chunkOAIOOVFN_cjs = require('../chunk-OAIOOVFN.cjs');
|
|
7
7
|
var chunkJTBWI74K_cjs = require('../chunk-JTBWI74K.cjs');
|
|
8
8
|
var chunk7VUO4QZH_cjs = require('../chunk-7VUO4QZH.cjs');
|
|
@@ -11,8 +11,8 @@ var chunkZ574BY3H_cjs = require('../chunk-Z574BY3H.cjs');
|
|
|
11
11
|
require('../chunk-GD5OYIOV.cjs');
|
|
12
12
|
require('../chunk-VWSOHZK2.cjs');
|
|
13
13
|
require('../chunk-TMX7YFVM.cjs');
|
|
14
|
-
require('../chunk-MOIZ2R5X.cjs');
|
|
15
14
|
var chunkZBP4ZSAJ_cjs = require('../chunk-ZBP4ZSAJ.cjs');
|
|
15
|
+
require('../chunk-MOIZ2R5X.cjs');
|
|
16
16
|
require('../chunk-3YZKDCWY.cjs');
|
|
17
17
|
require('../chunk-SJSGSHIT.cjs');
|
|
18
18
|
require('../chunk-PPCATBOY.cjs');
|
|
@@ -69,10 +69,10 @@ function ConnectedIncomingCall() {
|
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
var ConnectedCallDock = react.lazy(
|
|
72
|
-
() => import('../ConnectedCallDock-
|
|
72
|
+
() => import('../ConnectedCallDock-KD5LWW2E.cjs').then((m) => ({ default: m.ConnectedCallDock }))
|
|
73
73
|
);
|
|
74
74
|
var ConnectedCallRoom = react.lazy(
|
|
75
|
-
() => import('../ConnectedCallRoom-
|
|
75
|
+
() => import('../ConnectedCallRoom-GSMF7ZUE.cjs').then((m) => ({ default: m.ConnectedCallRoom }))
|
|
76
76
|
);
|
|
77
77
|
function ConnectedCallLayer() {
|
|
78
78
|
const hasActiveCall = react$1.useCallSession((s) => s.active !== null);
|
|
@@ -504,79 +504,79 @@ Object.defineProperty(exports, "useShortcutKeys", {
|
|
|
504
504
|
});
|
|
505
505
|
Object.defineProperty(exports, "CallConversationEmpty", {
|
|
506
506
|
enumerable: true,
|
|
507
|
-
get: function () { return
|
|
507
|
+
get: function () { return chunkI5LXJLO5_cjs.CallConversationEmpty; }
|
|
508
508
|
});
|
|
509
509
|
Object.defineProperty(exports, "CallPeoplePicker", {
|
|
510
510
|
enumerable: true,
|
|
511
|
-
get: function () { return
|
|
511
|
+
get: function () { return chunkI5LXJLO5_cjs.CallPeoplePicker; }
|
|
512
512
|
});
|
|
513
513
|
Object.defineProperty(exports, "ChatCallCard", {
|
|
514
514
|
enumerable: true,
|
|
515
|
-
get: function () { return
|
|
515
|
+
get: function () { return chunkI5LXJLO5_cjs.ChatCallCard; }
|
|
516
516
|
});
|
|
517
517
|
Object.defineProperty(exports, "ConnectedCallChatHistory", {
|
|
518
518
|
enumerable: true,
|
|
519
|
-
get: function () { return
|
|
519
|
+
get: function () { return chunkI5LXJLO5_cjs.ConnectedCallChatHistory; }
|
|
520
520
|
});
|
|
521
521
|
Object.defineProperty(exports, "ConnectedConversationCallActions", {
|
|
522
522
|
enumerable: true,
|
|
523
|
-
get: function () { return
|
|
523
|
+
get: function () { return chunkI5LXJLO5_cjs.ConnectedConversationCallActions; }
|
|
524
524
|
});
|
|
525
525
|
Object.defineProperty(exports, "DmCallButton", {
|
|
526
526
|
enumerable: true,
|
|
527
|
-
get: function () { return
|
|
527
|
+
get: function () { return chunkI5LXJLO5_cjs.DmCallButton; }
|
|
528
528
|
});
|
|
529
529
|
Object.defineProperty(exports, "GroupCallButton", {
|
|
530
530
|
enumerable: true,
|
|
531
|
-
get: function () { return
|
|
531
|
+
get: function () { return chunkI5LXJLO5_cjs.GroupCallButton; }
|
|
532
532
|
});
|
|
533
533
|
Object.defineProperty(exports, "MeetingThreadRecordingsAction", {
|
|
534
534
|
enumerable: true,
|
|
535
|
-
get: function () { return
|
|
535
|
+
get: function () { return chunkI5LXJLO5_cjs.MeetingThreadRecordingsAction; }
|
|
536
536
|
});
|
|
537
537
|
Object.defineProperty(exports, "MeetingThreadTranscriptAction", {
|
|
538
538
|
enumerable: true,
|
|
539
|
-
get: function () { return
|
|
539
|
+
get: function () { return chunkI5LXJLO5_cjs.MeetingThreadTranscriptAction; }
|
|
540
540
|
});
|
|
541
541
|
Object.defineProperty(exports, "NewCallChip", {
|
|
542
542
|
enumerable: true,
|
|
543
|
-
get: function () { return
|
|
543
|
+
get: function () { return chunkI5LXJLO5_cjs.NewCallChip; }
|
|
544
544
|
});
|
|
545
545
|
Object.defineProperty(exports, "ProvisionalSpeakers", {
|
|
546
546
|
enumerable: true,
|
|
547
|
-
get: function () { return
|
|
547
|
+
get: function () { return chunkI5LXJLO5_cjs.ProvisionalSpeakers; }
|
|
548
548
|
});
|
|
549
549
|
Object.defineProperty(exports, "StartCallButton", {
|
|
550
550
|
enumerable: true,
|
|
551
|
-
get: function () { return
|
|
551
|
+
get: function () { return chunkI5LXJLO5_cjs.StartCallButton; }
|
|
552
552
|
});
|
|
553
553
|
Object.defineProperty(exports, "ThreadCallButton", {
|
|
554
554
|
enumerable: true,
|
|
555
|
-
get: function () { return
|
|
555
|
+
get: function () { return chunkI5LXJLO5_cjs.ThreadCallButton; }
|
|
556
556
|
});
|
|
557
557
|
Object.defineProperty(exports, "buildCallCandidates", {
|
|
558
558
|
enumerable: true,
|
|
559
|
-
get: function () { return
|
|
559
|
+
get: function () { return chunkI5LXJLO5_cjs.buildCallCandidates; }
|
|
560
560
|
});
|
|
561
561
|
Object.defineProperty(exports, "callContactOf", {
|
|
562
562
|
enumerable: true,
|
|
563
|
-
get: function () { return
|
|
563
|
+
get: function () { return chunkI5LXJLO5_cjs.callContactOf; }
|
|
564
564
|
});
|
|
565
565
|
Object.defineProperty(exports, "isPickable", {
|
|
566
566
|
enumerable: true,
|
|
567
|
-
get: function () { return
|
|
567
|
+
get: function () { return chunkI5LXJLO5_cjs.isPickable; }
|
|
568
568
|
});
|
|
569
569
|
Object.defineProperty(exports, "matchesQuery", {
|
|
570
570
|
enumerable: true,
|
|
571
|
-
get: function () { return
|
|
571
|
+
get: function () { return chunkI5LXJLO5_cjs.matchesQuery; }
|
|
572
572
|
});
|
|
573
573
|
Object.defineProperty(exports, "useCallPersonName", {
|
|
574
574
|
enumerable: true,
|
|
575
|
-
get: function () { return
|
|
575
|
+
get: function () { return chunkI5LXJLO5_cjs.useCallPersonName; }
|
|
576
576
|
});
|
|
577
577
|
Object.defineProperty(exports, "useProvisionalSpeakers", {
|
|
578
578
|
enumerable: true,
|
|
579
|
-
get: function () { return
|
|
579
|
+
get: function () { return chunkI5LXJLO5_cjs.useProvisionalSpeakers; }
|
|
580
580
|
});
|
|
581
581
|
Object.defineProperty(exports, "LEVEL_TICK_MS", {
|
|
582
582
|
enumerable: true,
|
|
@@ -3,6 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { FileText } from "lucide-react";
|
|
5
5
|
import { Button, Popover, PopoverContent, PopoverTrigger, cn } from "@arbidocs/react/ui";
|
|
6
|
+
import { plainPassageText } from "./passage-text.js";
|
|
6
7
|
const MARK = "ml-px align-super text-[max(0.8em,var(--text-xs))] font-semibold leading-none tabular-nums text-muted-foreground";
|
|
7
8
|
function sourceLabel(citation, labels) {
|
|
8
9
|
return [citation.documentTitle, citation.page != null ? labels.page(citation.page) : ""].filter(Boolean).join(", ");
|
|
@@ -63,14 +64,14 @@ function CitationMark({ num, citation, labels, onOpen, className }) {
|
|
|
63
64
|
passage.page != null && /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: labels.page(passage.page) })
|
|
64
65
|
] })
|
|
65
66
|
] }),
|
|
66
|
-
/* @__PURE__ */ jsx("blockquote", { className: "line-clamp-6 border-l-2 border-border pl-3 text-xs italic text-muted-foreground", children: passage.text }),
|
|
67
|
+
/* @__PURE__ */ jsx("blockquote", { className: "line-clamp-6 border-l-2 border-border pl-3 text-xs italic text-muted-foreground", children: plainPassageText(passage.text) }),
|
|
67
68
|
onOpen && /* @__PURE__ */ jsx(
|
|
68
69
|
Button,
|
|
69
70
|
{
|
|
70
71
|
type: "button",
|
|
71
72
|
variant: "outline",
|
|
72
73
|
size: "sm",
|
|
73
|
-
className: "pointer-coarse:min-h-11",
|
|
74
|
+
className: "h-6 px-2 text-xs font-normal pointer-coarse:min-h-11",
|
|
74
75
|
onClick: () => open(passage),
|
|
75
76
|
"data-testid": `chat-citation-open-${num}`,
|
|
76
77
|
children: labels.openDocument
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/chat/CitationMark.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useState } from 'react'\nimport { FileText } from 'lucide-react'\nimport { Button, Popover, PopoverContent, PopoverTrigger, cn } from '@arbidocs/react/ui'\nimport type {\n ChatCitationTarget,\n ChatPageCitation,\n ChatPageLabels,\n ChatPagePassage,\n} from './chat-page-types'\n\nexport type CitationLabels = Pick<\n ChatPageLabels,\n 'citation' | 'citationHeading' | 'citationNoSource' | 'openDocument' | 'page'\n>\n\nexport interface CitationMarkProps {\n num: string\n /** The source behind the mark. Without it the mark is a quiet, non-interactive number. */\n citation?: ChatPageCitation\n labels: CitationLabels\n /** Opens the cited document in the host's viewer; without it the popover has no open action. */\n onOpen?: (target: ChatCitationTarget) => void\n className?: string\n}\n\nconst MARK =\n 'ml-px align-super text-[max(0.8em,var(--text-xs))] font-semibold leading-none tabular-nums text-muted-foreground'\n\nfunction sourceLabel(citation: ChatPageCitation, labels: CitationLabels): string {\n return [citation.documentTitle, citation.page != null ? labels.page(citation.page) : '']\n .filter(Boolean)\n .join(', ')\n}\n\n/**\n * The mark after a cited statement: a small superscript number, not an underline over the whole\n * sentence. With citation data it is a button that opens a popover with the source document, the\n * page and the cited passage(s), and (when the host passes `onOpen`) an \"Open document\" action;\n * without data (still streaming, an old message with no stored sources) it is the number alone.\n */\nexport function CitationMark({ num, citation, labels, onOpen, className }: CitationMarkProps) {\n const [isOpen, setIsOpen] = useState(false)\n if (!citation) {\n return (\n <sup className={cn(MARK, className)} data-cite={num}>\n {num}\n </sup>\n )\n }\n\n const open = (passage: ChatPagePassage | null) => {\n setIsOpen(false)\n onOpen?.({\n documentId: passage?.documentId ?? null,\n documentTitle: passage?.documentTitle ?? citation.documentTitle,\n page: passage?.page ?? citation.page,\n passage,\n citation,\n })\n }\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n data-cite={num}\n data-testid={`chat-citation-${num}`}\n aria-label={labels.citation(num, sourceLabel(citation, labels))}\n className={cn(\n MARK,\n // A pill hit area: 44px on touch without moving the text.\n 'relative -my-1 inline-flex min-w-[1.1em] justify-center rounded px-1 py-1 hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-muted data-[state=open]:text-foreground',\n \"pointer-coarse:after:absolute pointer-coarse:after:-inset-3 pointer-coarse:after:content-['']\",\n className\n )}\n >\n {num}\n </button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n aria-label={labels.citationHeading(num)}\n data-testid={`chat-citation-popover-${num}`}\n className=\"w-96 max-w-[calc(100vw-1rem)] p-0 text-sm\"\n >\n <div className=\"border-b border-border px-3 py-2 text-xs font-semibold text-muted-foreground\">\n {labels.citationHeading(num)}\n </div>\n {citation.passages.length === 0 ? (\n <p className=\"px-3 py-3 text-muted-foreground\">{labels.citationNoSource}</p>\n ) : (\n <ul className=\"divide-y divide-border\">\n {citation.passages.map((passage) => (\n <li key={passage.id} className=\"space-y-1.5 px-3 py-3\">\n <div className=\"flex items-start gap-2\">\n <FileText\n className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <div className=\"min-w-0 flex-1\">\n <div className=\"break-words font-medium text-foreground\">\n {passage.documentTitle}\n </div>\n {passage.page != null && (\n <div className=\"text-xs text-muted-foreground\">\n {labels.page(passage.page)}\n </div>\n )}\n </div>\n </div>\n <blockquote className=\"line-clamp-6 border-l-2 border-border pl-3 text-xs italic text-muted-foreground\">\n {passage.text}\n </blockquote>\n {onOpen && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"pointer-coarse:min-h-11\"\n onClick={() => open(passage)}\n data-testid={`chat-citation-open-${num}`}\n >\n {labels.openDocument}\n </Button>\n )}\n </li>\n ))}\n </ul>\n )}\n </PopoverContent>\n </Popover>\n )\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["import { useState } from 'react'\nimport { FileText } from 'lucide-react'\nimport { Button, Popover, PopoverContent, PopoverTrigger, cn } from '@arbidocs/react/ui'\nimport type {\n ChatCitationTarget,\n ChatPageCitation,\n ChatPageLabels,\n ChatPagePassage,\n} from './chat-page-types'\nimport { plainPassageText } from './passage-text'\n\nexport type CitationLabels = Pick<\n ChatPageLabels,\n 'citation' | 'citationHeading' | 'citationNoSource' | 'openDocument' | 'page'\n>\n\nexport interface CitationMarkProps {\n num: string\n /** The source behind the mark. Without it the mark is a quiet, non-interactive number. */\n citation?: ChatPageCitation\n labels: CitationLabels\n /** Opens the cited document in the host's viewer; without it the popover has no open action. */\n onOpen?: (target: ChatCitationTarget) => void\n className?: string\n}\n\nconst MARK =\n 'ml-px align-super text-[max(0.8em,var(--text-xs))] font-semibold leading-none tabular-nums text-muted-foreground'\n\nfunction sourceLabel(citation: ChatPageCitation, labels: CitationLabels): string {\n return [citation.documentTitle, citation.page != null ? labels.page(citation.page) : '']\n .filter(Boolean)\n .join(', ')\n}\n\n/**\n * The mark after a cited statement: a small superscript number, not an underline over the whole\n * sentence. With citation data it is a button that opens a popover with the source document, the\n * page and the cited passage(s), and (when the host passes `onOpen`) an \"Open document\" action;\n * without data (still streaming, an old message with no stored sources) it is the number alone.\n */\nexport function CitationMark({ num, citation, labels, onOpen, className }: CitationMarkProps) {\n const [isOpen, setIsOpen] = useState(false)\n if (!citation) {\n return (\n <sup className={cn(MARK, className)} data-cite={num}>\n {num}\n </sup>\n )\n }\n\n const open = (passage: ChatPagePassage | null) => {\n setIsOpen(false)\n onOpen?.({\n documentId: passage?.documentId ?? null,\n documentTitle: passage?.documentTitle ?? citation.documentTitle,\n page: passage?.page ?? citation.page,\n passage,\n citation,\n })\n }\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n data-cite={num}\n data-testid={`chat-citation-${num}`}\n aria-label={labels.citation(num, sourceLabel(citation, labels))}\n className={cn(\n MARK,\n // A pill hit area: 44px on touch without moving the text.\n 'relative -my-1 inline-flex min-w-[1.1em] justify-center rounded px-1 py-1 hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-muted data-[state=open]:text-foreground',\n \"pointer-coarse:after:absolute pointer-coarse:after:-inset-3 pointer-coarse:after:content-['']\",\n className\n )}\n >\n {num}\n </button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n aria-label={labels.citationHeading(num)}\n data-testid={`chat-citation-popover-${num}`}\n className=\"w-96 max-w-[calc(100vw-1rem)] p-0 text-sm\"\n >\n <div className=\"border-b border-border px-3 py-2 text-xs font-semibold text-muted-foreground\">\n {labels.citationHeading(num)}\n </div>\n {citation.passages.length === 0 ? (\n <p className=\"px-3 py-3 text-muted-foreground\">{labels.citationNoSource}</p>\n ) : (\n <ul className=\"divide-y divide-border\">\n {citation.passages.map((passage) => (\n <li key={passage.id} className=\"space-y-1.5 px-3 py-3\">\n <div className=\"flex items-start gap-2\">\n <FileText\n className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <div className=\"min-w-0 flex-1\">\n <div className=\"break-words font-medium text-foreground\">\n {passage.documentTitle}\n </div>\n {passage.page != null && (\n <div className=\"text-xs text-muted-foreground\">\n {labels.page(passage.page)}\n </div>\n )}\n </div>\n </div>\n <blockquote className=\"line-clamp-6 border-l-2 border-border pl-3 text-xs italic text-muted-foreground\">\n {plainPassageText(passage.text)}\n </blockquote>\n {onOpen && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"h-6 px-2 text-xs font-normal pointer-coarse:min-h-11\"\n onClick={() => open(passage)}\n data-testid={`chat-citation-open-${num}`}\n >\n {labels.openDocument}\n </Button>\n )}\n </li>\n ))}\n </ul>\n )}\n </PopoverContent>\n </Popover>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AA6CM,cAwDY,YAxDZ;AA7CN,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,QAAQ,SAAS,gBAAgB,gBAAgB,UAAU;AAOpE,SAAS,wBAAwB;AAiBjC,MAAM,OACJ;AAEF,SAAS,YAAY,UAA4B,QAAgC;AAC/E,SAAO,CAAC,SAAS,eAAe,SAAS,QAAQ,OAAO,OAAO,KAAK,SAAS,IAAI,IAAI,EAAE,EACpF,OAAO,OAAO,EACd,KAAK,IAAI;AACd;AAQO,SAAS,aAAa,EAAE,KAAK,UAAU,QAAQ,QAAQ,UAAU,GAAsB;AAC5F,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,MAAI,CAAC,UAAU;AACb,WACE,oBAAC,SAAI,WAAW,GAAG,MAAM,SAAS,GAAG,aAAW,KAC7C,eACH;AAAA,EAEJ;AAEA,QAAM,OAAO,CAAC,YAAoC;AAChD,cAAU,KAAK;AACf,aAAS;AAAA,MACP,YAAY,SAAS,cAAc;AAAA,MACnC,eAAe,SAAS,iBAAiB,SAAS;AAAA,MAClD,MAAM,SAAS,QAAQ,SAAS;AAAA,MAChC;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SACE,qBAAC,WAAQ,MAAM,QAAQ,cAAc,WACnC;AAAA,wBAAC,kBAAe,SAAO,MACrB;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,aAAW;AAAA,QACX,eAAa,iBAAiB,GAAG;AAAA,QACjC,cAAY,OAAO,SAAS,KAAK,YAAY,UAAU,MAAM,CAAC;AAAA,QAC9D,WAAW;AAAA,UACT;AAAA;AAAA,UAEA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QAEC;AAAA;AAAA,IACH,GACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,OAAM;AAAA,QACN,cAAY,OAAO,gBAAgB,GAAG;AAAA,QACtC,eAAa,yBAAyB,GAAG;AAAA,QACzC,WAAU;AAAA,QAEV;AAAA,8BAAC,SAAI,WAAU,gFACZ,iBAAO,gBAAgB,GAAG,GAC7B;AAAA,UACC,SAAS,SAAS,WAAW,IAC5B,oBAAC,OAAE,WAAU,mCAAmC,iBAAO,kBAAiB,IAExE,oBAAC,QAAG,WAAU,0BACX,mBAAS,SAAS,IAAI,CAAC,YACtB,qBAAC,QAAoB,WAAU,yBAC7B;AAAA,iCAAC,SAAI,WAAU,0BACb;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,eAAY;AAAA;AAAA,cACd;AAAA,cACA,qBAAC,SAAI,WAAU,kBACb;AAAA,oCAAC,SAAI,WAAU,2CACZ,kBAAQ,eACX;AAAA,gBACC,QAAQ,QAAQ,QACf,oBAAC,SAAI,WAAU,iCACZ,iBAAO,KAAK,QAAQ,IAAI,GAC3B;AAAA,iBAEJ;AAAA,eACF;AAAA,YACA,oBAAC,gBAAW,WAAU,mFACnB,2BAAiB,QAAQ,IAAI,GAChC;AAAA,YACC,UACC;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,SAAS,MAAM,KAAK,OAAO;AAAA,gBAC3B,eAAa,sBAAsB,GAAG;AAAA,gBAErC,iBAAO;AAAA;AAAA,YACV;AAAA,eA9BK,QAAQ,EAgCjB,CACD,GACH;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/chat/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkPOUMLXMJ_cjs = require('../chunk-POUMLXMJ.cjs');
|
|
5
5
|
var chunkKLMNCBLY_cjs = require('../chunk-KLMNCBLY.cjs');
|
|
6
|
-
var chunkA257IJ5J_cjs = require('../chunk-A257IJ5J.cjs');
|
|
7
6
|
var chunkUXGIMOIN_cjs = require('../chunk-UXGIMOIN.cjs');
|
|
8
|
-
var
|
|
7
|
+
var chunk6EJ7KD4U_cjs = require('../chunk-6EJ7KD4U.cjs');
|
|
8
|
+
var chunk6CPJ5ZOY_cjs = require('../chunk-6CPJ5ZOY.cjs');
|
|
9
9
|
var chunkW5JTACMK_cjs = require('../chunk-W5JTACMK.cjs');
|
|
10
10
|
var chunkZHLBTIJJ_cjs = require('../chunk-ZHLBTIJJ.cjs');
|
|
11
11
|
var chunk5F4DCIHS_cjs = require('../chunk-5F4DCIHS.cjs');
|
|
@@ -37,7 +37,7 @@ require('../chunk-PLIF5CUV.cjs');
|
|
|
37
37
|
|
|
38
38
|
Object.defineProperty(exports, "AssistantToaster", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkPOUMLXMJ_cjs.AssistantToaster; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "ComposerAccessories", {
|
|
43
43
|
enumerable: true,
|
|
@@ -179,93 +179,93 @@ Object.defineProperty(exports, "useDismissibleCard", {
|
|
|
179
179
|
enumerable: true,
|
|
180
180
|
get: function () { return chunkKLMNCBLY_cjs.useDismissibleCard; }
|
|
181
181
|
});
|
|
182
|
+
Object.defineProperty(exports, "useOpenCitation", {
|
|
183
|
+
enumerable: true,
|
|
184
|
+
get: function () { return chunkUXGIMOIN_cjs.useOpenCitation; }
|
|
185
|
+
});
|
|
182
186
|
Object.defineProperty(exports, "AssistantDock", {
|
|
183
187
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunk6EJ7KD4U_cjs.AssistantDock; }
|
|
185
189
|
});
|
|
186
190
|
Object.defineProperty(exports, "AssistantDockToggle", {
|
|
187
191
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunk6EJ7KD4U_cjs.AssistantDockToggle; }
|
|
189
193
|
});
|
|
190
194
|
Object.defineProperty(exports, "useAssistantDock", {
|
|
191
195
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
193
|
-
});
|
|
194
|
-
Object.defineProperty(exports, "useOpenCitation", {
|
|
195
|
-
enumerable: true,
|
|
196
|
-
get: function () { return chunkUXGIMOIN_cjs.useOpenCitation; }
|
|
196
|
+
get: function () { return chunk6EJ7KD4U_cjs.useAssistantDock; }
|
|
197
197
|
});
|
|
198
198
|
Object.defineProperty(exports, "AssistantModeToggle", {
|
|
199
199
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunk6CPJ5ZOY_cjs.AssistantModeToggle; }
|
|
201
201
|
});
|
|
202
202
|
Object.defineProperty(exports, "ChatDocuments", {
|
|
203
203
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunk6CPJ5ZOY_cjs.ChatDocuments; }
|
|
205
205
|
});
|
|
206
206
|
Object.defineProperty(exports, "ChatMessageContent", {
|
|
207
207
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunk6CPJ5ZOY_cjs.ChatMessageContent; }
|
|
209
209
|
});
|
|
210
210
|
Object.defineProperty(exports, "ChatPage", {
|
|
211
211
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunk6CPJ5ZOY_cjs.ChatPage; }
|
|
213
213
|
});
|
|
214
214
|
Object.defineProperty(exports, "ChatThreadList", {
|
|
215
215
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunk6CPJ5ZOY_cjs.ChatThreadList; }
|
|
217
217
|
});
|
|
218
218
|
Object.defineProperty(exports, "ChatThreadSelect", {
|
|
219
219
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunk6CPJ5ZOY_cjs.ChatThreadSelect; }
|
|
221
221
|
});
|
|
222
222
|
Object.defineProperty(exports, "CitationMark", {
|
|
223
223
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunk6CPJ5ZOY_cjs.CitationMark; }
|
|
225
225
|
});
|
|
226
226
|
Object.defineProperty(exports, "ContextChip", {
|
|
227
227
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunk6CPJ5ZOY_cjs.ContextChip; }
|
|
229
229
|
});
|
|
230
230
|
Object.defineProperty(exports, "ConversationEmpty", {
|
|
231
231
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunk6CPJ5ZOY_cjs.ConversationEmpty; }
|
|
233
233
|
});
|
|
234
234
|
Object.defineProperty(exports, "DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS", {
|
|
235
235
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunk6CPJ5ZOY_cjs.DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS; }
|
|
237
237
|
});
|
|
238
238
|
Object.defineProperty(exports, "DEFAULT_CHAT_PAGE_LABELS", {
|
|
239
239
|
enumerable: true,
|
|
240
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunk6CPJ5ZOY_cjs.DEFAULT_CHAT_PAGE_LABELS; }
|
|
241
241
|
});
|
|
242
242
|
Object.defineProperty(exports, "DEFAULT_CONVERSATION_EMPTY_LABELS", {
|
|
243
243
|
enumerable: true,
|
|
244
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunk6CPJ5ZOY_cjs.DEFAULT_CONVERSATION_EMPTY_LABELS; }
|
|
245
245
|
});
|
|
246
246
|
Object.defineProperty(exports, "DEFAULT_MESSAGE_ALERT_LABELS", {
|
|
247
247
|
enumerable: true,
|
|
248
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunk6CPJ5ZOY_cjs.DEFAULT_MESSAGE_ALERT_LABELS; }
|
|
249
249
|
});
|
|
250
250
|
Object.defineProperty(exports, "MessageAlert", {
|
|
251
251
|
enumerable: true,
|
|
252
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunk6CPJ5ZOY_cjs.MessageAlert; }
|
|
253
253
|
});
|
|
254
254
|
Object.defineProperty(exports, "useChatSurface", {
|
|
255
255
|
enumerable: true,
|
|
256
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunk6CPJ5ZOY_cjs.useChatSurface; }
|
|
257
257
|
});
|
|
258
258
|
Object.defineProperty(exports, "useControlledThread", {
|
|
259
259
|
enumerable: true,
|
|
260
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunk6CPJ5ZOY_cjs.useControlledThread; }
|
|
261
261
|
});
|
|
262
262
|
Object.defineProperty(exports, "useRegisterEmbeddedChat", {
|
|
263
263
|
enumerable: true,
|
|
264
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunk6CPJ5ZOY_cjs.useRegisterEmbeddedChat; }
|
|
265
265
|
});
|
|
266
266
|
Object.defineProperty(exports, "useStartRequestedConversation", {
|
|
267
267
|
enumerable: true,
|
|
268
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunk6CPJ5ZOY_cjs.useStartRequestedConversation; }
|
|
269
269
|
});
|
|
270
270
|
Object.defineProperty(exports, "BranchControls", {
|
|
271
271
|
enumerable: true,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A passage as plain text for the quote: passages are markdown, and the popover shows them in a
|
|
3
|
+
* blockquote, so `**Subject:** RE: ...` would print its asterisks. Drops links, emphasis, code
|
|
4
|
+
* ticks and heading marks; leaves everything else (including lone `*` and `_`) alone.
|
|
5
|
+
*/
|
|
6
|
+
export declare function plainPassageText(text: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function plainPassageText(text) {
|
|
3
|
+
return text.replace(/!?\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, "$2").replace(/(^|[\s(])\*(?=\S)([^*\n]*?\S)\*(?=$|[\s).,;:!?])/g, "$1$2").replace(/`([^`\n]+)`/g, "$1").replace(/^\s{0,3}#{1,6}\s+/gm, "");
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
plainPassageText
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=passage-text.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/chat/passage-text.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * A passage as plain text for the quote: passages are markdown, and the popover shows them in a\n * blockquote, so `**Subject:** RE: ...` would print its asterisks. Drops links, emphasis, code\n * ticks and heading marks; leaves everything else (including lone `*` and `_`) alone.\n */\nexport function plainPassageText(text: string): string {\n return text\n .replace(/!?\\[([^\\]]+)\\]\\([^)]*\\)/g, '$1')\n .replace(/(\\*\\*|__)(?=\\S)([\\s\\S]*?\\S)\\1/g, '$2')\n .replace(/(^|[\\s(])\\*(?=\\S)([^*\\n]*?\\S)\\*(?=$|[\\s).,;:!?])/g, '$1$2')\n .replace(/`([^`\\n]+)`/g, '$1')\n .replace(/^\\s{0,3}#{1,6}\\s+/gm, '')\n}\n"],
|
|
5
|
+
"mappings": ";AAKO,SAAS,iBAAiB,MAAsB;AACrD,SAAO,KACJ,QAAQ,4BAA4B,IAAI,EACxC,QAAQ,kCAAkC,IAAI,EAC9C,QAAQ,qDAAqD,MAAM,EACnE,QAAQ,gBAAgB,IAAI,EAC5B,QAAQ,uBAAuB,EAAE;AACtC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -8,8 +8,8 @@ var chunkS237ORM3_cjs = require('./chunk-S237ORM3.cjs');
|
|
|
8
8
|
var chunkII2OEXHW_cjs = require('./chunk-II2OEXHW.cjs');
|
|
9
9
|
var chunkS3GVFAFB_cjs = require('./chunk-S3GVFAFB.cjs');
|
|
10
10
|
var chunk6UZC4XVV_cjs = require('./chunk-6UZC4XVV.cjs');
|
|
11
|
-
var chunkDKY67DA6_cjs = require('./chunk-DKY67DA6.cjs');
|
|
12
11
|
var chunkUDSHVNU3_cjs = require('./chunk-UDSHVNU3.cjs');
|
|
12
|
+
var chunkDKY67DA6_cjs = require('./chunk-DKY67DA6.cjs');
|
|
13
13
|
var chunkZQQVXRYZ_cjs = require('./chunk-ZQQVXRYZ.cjs');
|
|
14
14
|
var chunkIPSHAMO2_cjs = require('./chunk-IPSHAMO2.cjs');
|
|
15
15
|
var chunkZVEW3JBT_cjs = require('./chunk-ZVEW3JBT.cjs');
|
|
@@ -217,6 +217,7 @@ function TileLink({
|
|
|
217
217
|
function isInsideTileLink(e) {
|
|
218
218
|
return e.target instanceof Element && !!e.target.closest('[data-slot="explorer-tile-link"]');
|
|
219
219
|
}
|
|
220
|
+
var TILE_SCALE = "[--tile-u:clamp(0.8px,0.5cqw,1.2px)]";
|
|
220
221
|
function ExplorerMenu({
|
|
221
222
|
items,
|
|
222
223
|
testId,
|
|
@@ -234,10 +235,10 @@ function ExplorerMenu({
|
|
|
234
235
|
onClick: (e) => e.stopPropagation(),
|
|
235
236
|
onPointerDown: (e) => e.stopPropagation(),
|
|
236
237
|
className: ui.cn(
|
|
237
|
-
"flex size-
|
|
238
|
+
"flex size-[calc(var(--tile-u,1px)*24)] items-center justify-center rounded-md bg-background/90 text-muted-foreground backdrop-blur-sm transition hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-background data-[state=open]:text-foreground pointer-coarse:size-11",
|
|
238
239
|
triggerClassName
|
|
239
240
|
),
|
|
240
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "size-
|
|
241
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "size-[calc(var(--tile-u,1px)*16)]" })
|
|
241
242
|
}
|
|
242
243
|
) }),
|
|
243
244
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -334,7 +335,7 @@ function SelectCheckbox({
|
|
|
334
335
|
onClick: onToggle,
|
|
335
336
|
"aria-label": selected ? labels.deselect : labels.select,
|
|
336
337
|
className: ui.cn(
|
|
337
|
-
"size-
|
|
338
|
+
"size-[calc(var(--tile-u,1px)*24)] rounded-md border-muted-foreground/60 bg-card transition data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground pointer-coarse:size-9",
|
|
338
339
|
selected ? "opacity-100" : "opacity-60 hover:opacity-100",
|
|
339
340
|
className
|
|
340
341
|
)
|
|
@@ -371,7 +372,7 @@ function ExplorerFileTile({
|
|
|
371
372
|
const [thumbFailed, setThumbFailed] = react.useState(false);
|
|
372
373
|
const [thumbLandscape, setThumbLandscape] = react.useState(false);
|
|
373
374
|
const showThumbnail = !!thumbnailUrl && !thumbFailed && !progress;
|
|
374
|
-
const tile = /* @__PURE__ */ jsxRuntime.
|
|
375
|
+
const tile = /* @__PURE__ */ jsxRuntime.jsx(
|
|
375
376
|
"div",
|
|
376
377
|
{
|
|
377
378
|
ref: rootRef,
|
|
@@ -392,11 +393,11 @@ function ExplorerFileTile({
|
|
|
392
393
|
"data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.root, { testId: "explorer-file" }),
|
|
393
394
|
"data-doc-id": id,
|
|
394
395
|
className: ui.cn(
|
|
395
|
-
"group relative h-full cursor-default select-none overflow-hidden rounded-lg border transition",
|
|
396
|
+
"@container group relative h-full cursor-default select-none overflow-hidden rounded-lg border transition",
|
|
396
397
|
dragging && "opacity-40",
|
|
397
398
|
selected ? "border-primary/30 bg-accent" : "border-border bg-muted hover:bg-muted/70"
|
|
398
399
|
),
|
|
399
|
-
children: [
|
|
400
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: TILE_SCALE, style: { display: "contents" }, children: [
|
|
400
401
|
href && /* @__PURE__ */ jsxRuntime.jsx(TileLink, { href, label: title, onSelect: onOpen }),
|
|
401
402
|
showThumbnail ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
402
403
|
"img",
|
|
@@ -463,7 +464,7 @@ function ExplorerFileTile({
|
|
|
463
464
|
] }),
|
|
464
465
|
entity
|
|
465
466
|
] })
|
|
466
|
-
]
|
|
467
|
+
] })
|
|
467
468
|
}
|
|
468
469
|
);
|
|
469
470
|
if (!tooltip) return tile;
|
|
@@ -500,7 +501,7 @@ function ExplorerFolderTile({
|
|
|
500
501
|
const isEmpty = count === 0;
|
|
501
502
|
const countLabel = isEmpty ? l.empty : l.itemCount(count);
|
|
502
503
|
const joined = path.join("/");
|
|
503
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
504
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
504
505
|
"div",
|
|
505
506
|
{
|
|
506
507
|
ref: rootRef,
|
|
@@ -511,11 +512,11 @@ function ExplorerFolderTile({
|
|
|
511
512
|
"data-folder-path": joined,
|
|
512
513
|
title: name,
|
|
513
514
|
className: ui.cn(
|
|
514
|
-
"group relative flex h-full cursor-pointer select-none flex-col items-center justify-center gap-1 rounded-lg p-2 text-center transition",
|
|
515
|
+
"@container group relative flex h-full cursor-pointer select-none flex-col items-center justify-center gap-1 rounded-lg p-2 text-center transition",
|
|
515
516
|
isOver ? "bg-accent ring-2 ring-primary/40" : selected ? "bg-accent ring-1 ring-primary/30" : "bg-muted hover:bg-muted/70",
|
|
516
517
|
isEmpty && !isOver && !selected && "opacity-70"
|
|
517
518
|
),
|
|
518
|
-
children: [
|
|
519
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: TILE_SCALE, style: { display: "contents" }, children: [
|
|
519
520
|
href && !editing && /* @__PURE__ */ jsxRuntime.jsx(TileLink, { href, label: displayName || name, onSelect: onOpen }),
|
|
520
521
|
onToggleSelect && !isEmpty && /* @__PURE__ */ jsxRuntime.jsx(
|
|
521
522
|
SelectCheckbox,
|
|
@@ -543,6 +544,7 @@ function ExplorerFolderTile({
|
|
|
543
544
|
{
|
|
544
545
|
className: ui.cn(
|
|
545
546
|
"transition",
|
|
547
|
+
density === "list" ? "size-[calc(var(--tile-u,1px)*34)]" : "size-[calc(var(--tile-u,1px)*48)]",
|
|
546
548
|
isEmpty ? "text-yellow-text/50" : "fill-yellow-text/30 text-yellow-text group-hover:fill-yellow-text/40"
|
|
547
549
|
),
|
|
548
550
|
size: iconSize
|
|
@@ -562,13 +564,13 @@ function ExplorerFolderTile({
|
|
|
562
564
|
"span",
|
|
563
565
|
{
|
|
564
566
|
className: ui.cn(
|
|
565
|
-
"line-clamp-2 w-full break-words text-
|
|
567
|
+
"line-clamp-2 w-full break-words text-[length:calc(var(--tile-u,1px)*12)] font-semibold leading-tight",
|
|
566
568
|
isEmpty ? "text-foreground/60" : "text-foreground/90"
|
|
567
569
|
),
|
|
568
570
|
children: displayName
|
|
569
571
|
}
|
|
570
572
|
),
|
|
571
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
573
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:calc(var(--tile-u,1px)*12)] text-muted-foreground", children: countLabel }),
|
|
572
574
|
processingCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
573
575
|
"span",
|
|
574
576
|
{
|
|
@@ -582,7 +584,7 @@ function ExplorerFolderTile({
|
|
|
582
584
|
]
|
|
583
585
|
}
|
|
584
586
|
)
|
|
585
|
-
]
|
|
587
|
+
] })
|
|
586
588
|
}
|
|
587
589
|
);
|
|
588
590
|
}
|
|
@@ -1697,7 +1699,7 @@ var ViewerFrame = ({
|
|
|
1697
1699
|
"data-bare": bare || void 0,
|
|
1698
1700
|
"data-testid": chunkPLIF5CUV_cjs.testIdOr(testIds?.root, { testId: "document-viewer" }),
|
|
1699
1701
|
children: [
|
|
1700
|
-
!bare && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-0 z-10 bg-background", children: [
|
|
1702
|
+
!bare && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "@container sticky top-0 z-10 bg-background", children: [
|
|
1701
1703
|
header,
|
|
1702
1704
|
compareRow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1703
1705
|
"div",
|
|
@@ -2340,7 +2342,13 @@ function DocumentGrid({
|
|
|
2340
2342
|
remountKey
|
|
2341
2343
|
);
|
|
2342
2344
|
}
|
|
2343
|
-
function ViewerTabBar({
|
|
2345
|
+
function ViewerTabBar({
|
|
2346
|
+
tabs,
|
|
2347
|
+
activeId,
|
|
2348
|
+
onChange,
|
|
2349
|
+
className,
|
|
2350
|
+
collapseLabels
|
|
2351
|
+
}) {
|
|
2344
2352
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("flex shrink-0 items-center", className), role: "group", children: tabs.map((tab) => {
|
|
2345
2353
|
const isActive = tab.id === activeId;
|
|
2346
2354
|
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
|
|
@@ -2355,11 +2363,12 @@ function ViewerTabBar({ tabs, activeId, onChange, className }) {
|
|
|
2355
2363
|
className: ui.cn(
|
|
2356
2364
|
"shrink-0 border-b-2 px-3 py-2 font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11",
|
|
2357
2365
|
tab.label && "inline-flex items-center gap-1.5 text-sm",
|
|
2366
|
+
tab.label && collapseLabels && "px-2 @[40rem]:px-3",
|
|
2358
2367
|
isActive ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:border-border hover:text-foreground"
|
|
2359
2368
|
),
|
|
2360
2369
|
children: [
|
|
2361
2370
|
tab.icon,
|
|
2362
|
-
tab.label && /* @__PURE__ */ jsxRuntime.jsx("span", { children: tab.label })
|
|
2371
|
+
tab.label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: ui.cn(collapseLabels && "hidden @[40rem]:inline"), children: tab.label })
|
|
2363
2372
|
]
|
|
2364
2373
|
}
|
|
2365
2374
|
) }),
|
|
@@ -8377,5 +8386,5 @@ exports.visibilityAudience = visibilityAudience;
|
|
|
8377
8386
|
exports.visibilityToggleTooltip = visibilityToggleTooltip;
|
|
8378
8387
|
exports.visibleColumns = visibleColumns;
|
|
8379
8388
|
exports.widthsMatch = widthsMatch;
|
|
8380
|
-
//# sourceMappingURL=chunk-
|
|
8381
|
-
//# sourceMappingURL=chunk-
|
|
8389
|
+
//# sourceMappingURL=chunk-2D5GZMSK.cjs.map
|
|
8390
|
+
//# sourceMappingURL=chunk-2D5GZMSK.cjs.map
|