@arbidocs/blocks 0.5.126 → 0.5.128
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/README.md +19 -0
- package/dist/{ConnectedCallDock-733O5M36.cjs → ConnectedCallDock-XJOYVVAH.cjs} +5 -5
- package/dist/{ConnectedCallDock-733O5M36.cjs.map → ConnectedCallDock-XJOYVVAH.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-TAUGSRGV.cjs → ConnectedCallRoom-CUDYAPQK.cjs} +5 -5
- package/dist/{ConnectedCallRoom-TAUGSRGV.cjs.map → ConnectedCallRoom-CUDYAPQK.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-HDE522YC.cjs → ConnectedNativeDocxComparison-JUF2TI2P.cjs} +9 -9
- package/dist/{ConnectedNativeDocxComparison-HDE522YC.cjs.map → ConnectedNativeDocxComparison-JUF2TI2P.cjs.map} +1 -1
- package/dist/ConnectedPresentation-SI3L77J4.cjs +1 -1
- package/dist/{ConnectedSlidesTab-JSPU6EY5.cjs → ConnectedSlidesTab-E76OVY34.cjs} +3 -3
- package/dist/{ConnectedSlidesTab-JSPU6EY5.cjs.map → ConnectedSlidesTab-E76OVY34.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-4FHPOAFZ.cjs → ConnectedStreamedWordArtifact-Q64DRRQD.cjs} +9 -9
- package/dist/{ConnectedStreamedWordArtifact-4FHPOAFZ.cjs.map → ConnectedStreamedWordArtifact-Q64DRRQD.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-BDNXP3D4.cjs → DocumentReviewCard-M53XFLI2.cjs} +4 -4
- package/dist/{DocumentReviewCard-BDNXP3D4.cjs.map → DocumentReviewCard-M53XFLI2.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-WQRNSKWM.cjs → FilesViewerDialog-C7XHGK36.cjs} +9 -9
- package/dist/{FilesViewerDialog-WQRNSKWM.cjs.map → FilesViewerDialog-C7XHGK36.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-SUDULUN3.cjs → NativeDocxEditor-2PTEK6ND.cjs} +6 -6
- package/dist/{NativeDocxEditor-SUDULUN3.cjs.map → NativeDocxEditor-2PTEK6ND.cjs.map} +1 -1
- package/dist/WorkspaceTableView-3XYAV4BV.cjs +1 -1
- package/dist/agents/index.cjs +1 -1
- package/dist/ai-IEIR7SC2.cjs +1 -1
- package/dist/calls/index.cjs +2 -2
- package/dist/{chunk-Q6N5D3R5.cjs → chunk-23I5EUZA.cjs} +45 -15
- package/dist/chunk-23I5EUZA.cjs.map +1 -0
- package/dist/{chunk-KXIRVKCJ.cjs → chunk-ERRXU2HL.cjs} +38 -6
- package/dist/chunk-ERRXU2HL.cjs.map +1 -0
- package/dist/{chunk-6B4CCDDB.cjs → chunk-ESVRVZ53.cjs} +5 -5
- package/dist/{chunk-6B4CCDDB.cjs.map → chunk-ESVRVZ53.cjs.map} +1 -1
- package/dist/{chunk-KA3F6TIH.cjs → chunk-IWHP7FAB.cjs} +12 -5
- package/dist/chunk-IWHP7FAB.cjs.map +1 -0
- package/dist/{chunk-OHHKBURG.cjs → chunk-IWMHQTVL.cjs} +401 -18
- package/dist/chunk-IWMHQTVL.cjs.map +1 -0
- package/dist/{chunk-FGOJBOZX.cjs → chunk-IZJ5L246.cjs} +4 -4
- package/dist/{chunk-FGOJBOZX.cjs.map → chunk-IZJ5L246.cjs.map} +1 -1
- package/dist/{chunk-I4X72WUT.cjs → chunk-MMSHIIKG.cjs} +6 -6
- package/dist/{chunk-I4X72WUT.cjs.map → chunk-MMSHIIKG.cjs.map} +1 -1
- package/dist/{chunk-LXM5QXII.cjs → chunk-MXBXZXXQ.cjs} +3 -3
- package/dist/{chunk-LXM5QXII.cjs.map → chunk-MXBXZXXQ.cjs.map} +1 -1
- package/dist/{chunk-463QM764.cjs → chunk-NG2EE7HR.cjs} +3 -3
- package/dist/{chunk-463QM764.cjs.map → chunk-NG2EE7HR.cjs.map} +1 -1
- package/dist/chunk-NTDQQLDD.cjs +18 -0
- package/dist/{chunk-OALQGO5C.cjs.map → chunk-NTDQQLDD.cjs.map} +1 -1
- package/dist/{chunk-XNB27POJ.cjs → chunk-Q6IKXWPG.cjs} +4 -4
- package/dist/{chunk-XNB27POJ.cjs.map → chunk-Q6IKXWPG.cjs.map} +1 -1
- package/dist/{chunk-LOB2ATS5.cjs → chunk-VLQCLQAS.cjs} +5 -5
- package/dist/{chunk-LOB2ATS5.cjs.map → chunk-VLQCLQAS.cjs.map} +1 -1
- package/dist/{chunk-4KEQ62SL.cjs → chunk-YP5EBGLU.cjs} +6 -6
- package/dist/{chunk-4KEQ62SL.cjs.map → chunk-YP5EBGLU.cjs.map} +1 -1
- package/dist/{chunk-FB3JXSQT.cjs → chunk-ZQNTYINE.cjs} +10 -10
- package/dist/{chunk-FB3JXSQT.cjs.map → chunk-ZQNTYINE.cjs.map} +1 -1
- package/dist/{chunk-CMPHJRVV.cjs → chunk-ZYGAXD3N.cjs} +3 -3
- package/dist/{chunk-CMPHJRVV.cjs.map → chunk-ZYGAXD3N.cjs.map} +1 -1
- package/dist/connect/docx.cjs +13 -13
- package/dist/connect/index.cjs +245 -299
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +7 -7
- package/dist/connection/conversation/MermaidDiagram.js +11 -2
- package/dist/connection/conversation/MermaidDiagram.js.map +2 -2
- package/dist/connection/conversation/download-mermaid.d.ts +2 -0
- package/dist/connection/conversation/download-mermaid.js +29 -0
- package/dist/connection/conversation/download-mermaid.js.map +7 -0
- package/dist/connection/remote-control/ConnectedRemoteControlConsent.js +6 -3
- package/dist/connection/remote-control/ConnectedRemoteControlConsent.js.map +2 -2
- package/dist/connection/remote-control/ConnectedRemoteControlIndicator.js +12 -2
- package/dist/connection/remote-control/ConnectedRemoteControlIndicator.js.map +2 -2
- package/dist/connection/remote-control/ConnectedRemoteControlSwitch.js +1 -1
- package/dist/connection/remote-control/ConnectedRemoteControlSwitch.js.map +1 -1
- package/dist/connection/remote-control/browser-diagnostics.d.ts +7 -0
- package/dist/connection/remote-control/browser-diagnostics.js +109 -0
- package/dist/connection/remote-control/browser-diagnostics.js.map +7 -0
- package/dist/connection/remote-control/remoteControl.d.ts +9 -1
- package/dist/connection/remote-control/remoteControl.js +146 -10
- package/dist/connection/remote-control/remoteControl.js.map +2 -2
- package/dist/connection/remote-control/screen-sharing.d.ts +11 -0
- package/dist/connection/remote-control/screen-sharing.js +78 -0
- package/dist/connection/remote-control/screen-sharing.js.map +7 -0
- package/dist/connection/report-problem/screen-capture.d.ts +1 -0
- package/dist/connection/report-problem/screen-capture.js +2 -1
- package/dist/connection/report-problem/screen-capture.js.map +2 -2
- package/dist/docx/NativeDocxEditor.js +14 -12
- package/dist/docx/NativeDocxEditor.js.map +2 -2
- package/dist/docx/index.cjs +38 -38
- package/dist/docx/useVersionAutosave.d.ts +10 -0
- package/dist/docx/useVersionAutosave.js +36 -0
- package/dist/docx/useVersionAutosave.js.map +7 -0
- package/dist/embed/index.cjs +10 -10
- package/dist/facts/index.cjs +43 -43
- package/dist/index.cjs +94 -94
- package/dist/settings/index.cjs +1 -1
- package/dist/shell/RemoteControlPill.d.ts +2 -1
- package/dist/shell/RemoteControlPill.js +10 -3
- package/dist/shell/RemoteControlPill.js.map +2 -2
- package/dist/shell/index.cjs +21 -21
- package/dist/studio/index.cjs +1 -1
- package/dist/workflow-canvas/index.cjs +12 -12
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/chunk-KA3F6TIH.cjs.map +0 -1
- package/dist/chunk-KXIRVKCJ.cjs.map +0 -1
- package/dist/chunk-OALQGO5C.cjs +0 -18
- package/dist/chunk-OHHKBURG.cjs.map +0 -1
- package/dist/chunk-Q6N5D3R5.cjs.map +0 -1
package/dist/shell/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkVCEX7COE_cjs = require('../chunk-VCEX7COE.cjs');
|
|
5
5
|
require('../chunk-34HQO4ZQ.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkIWHP7FAB_cjs = require('../chunk-IWHP7FAB.cjs');
|
|
7
7
|
var chunkK4763GD5_cjs = require('../chunk-K4763GD5.cjs');
|
|
8
8
|
var chunk2RLA6QO2_cjs = require('../chunk-2RLA6QO2.cjs');
|
|
9
9
|
var chunkNY3YUCOW_cjs = require('../chunk-NY3YUCOW.cjs');
|
|
@@ -83,83 +83,83 @@ Object.defineProperty(exports, "useInstallPrompt", {
|
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "ActionCluster", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkIWHP7FAB_cjs.ActionCluster; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "AskField", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkIWHP7FAB_cjs.AskField; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "AskRow", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkIWHP7FAB_cjs.AskRow; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "AskTrigger", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkIWHP7FAB_cjs.AskTrigger; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "DEFAULT_ASK_FIELD_LABELS", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkIWHP7FAB_cjs.DEFAULT_ASK_FIELD_LABELS; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "DEFAULT_OFFLINE_PILL_LABELS", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkIWHP7FAB_cjs.DEFAULT_OFFLINE_PILL_LABELS; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "DEFAULT_REMOTE_CONTROL_PILL_LABELS", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkIWHP7FAB_cjs.DEFAULT_REMOTE_CONTROL_PILL_LABELS; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "DEFAULT_TIP_CARD_LABELS", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkIWHP7FAB_cjs.DEFAULT_TIP_CARD_LABELS; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "DockZone", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkIWHP7FAB_cjs.DockZone; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "OfflinePill", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkIWHP7FAB_cjs.OfflinePill; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "RemoteControlPill", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkIWHP7FAB_cjs.RemoteControlPill; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "ShellSidebar", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkIWHP7FAB_cjs.ShellSidebar; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "SidebarRowAction", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkIWHP7FAB_cjs.SidebarRowAction; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "StatusBadge", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkIWHP7FAB_cjs.StatusBadge; }
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "StatusRow", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkIWHP7FAB_cjs.StatusRow; }
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "TipCard", {
|
|
145
145
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkIWHP7FAB_cjs.TipCard; }
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(exports, "resolveSidebarLayout", {
|
|
149
149
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkIWHP7FAB_cjs.resolveSidebarLayout; }
|
|
151
151
|
});
|
|
152
152
|
Object.defineProperty(exports, "useCloseOnEscape", {
|
|
153
153
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunkIWHP7FAB_cjs.useCloseOnEscape; }
|
|
155
155
|
});
|
|
156
156
|
Object.defineProperty(exports, "useSidebarController", {
|
|
157
157
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunkIWHP7FAB_cjs.useSidebarController; }
|
|
159
159
|
});
|
|
160
160
|
Object.defineProperty(exports, "useSidebarSettle", {
|
|
161
161
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunkIWHP7FAB_cjs.useSidebarSettle; }
|
|
163
163
|
});
|
|
164
164
|
Object.defineProperty(exports, "PanelModeSwitcher", {
|
|
165
165
|
enumerable: true,
|
package/dist/studio/index.cjs
CHANGED
|
@@ -31,11 +31,11 @@ require('../chunk-WXUU3COI.cjs');
|
|
|
31
31
|
require('../chunk-AHDJXIUB.cjs');
|
|
32
32
|
require('../chunk-YVCOQHCE.cjs');
|
|
33
33
|
require('../chunk-JV5TVUOU.cjs');
|
|
34
|
+
require('../chunk-VZOOGA47.cjs');
|
|
34
35
|
require('../chunk-HQDR43JC.cjs');
|
|
35
36
|
var chunkJR2YSBD5_cjs = require('../chunk-JR2YSBD5.cjs');
|
|
36
37
|
require('../chunk-3YZKDCWY.cjs');
|
|
37
38
|
var chunkZW6FPIFC_cjs = require('../chunk-ZW6FPIFC.cjs');
|
|
38
|
-
require('../chunk-VZOOGA47.cjs');
|
|
39
39
|
require('../chunk-KNGZZC4O.cjs');
|
|
40
40
|
require('../chunk-IDCD5TEZ.cjs');
|
|
41
41
|
require('../chunk-M2FOXGJU.cjs');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkYP5EBGLU_cjs = require('../chunk-YP5EBGLU.cjs');
|
|
5
5
|
require('../chunk-YZ6YOOTF.cjs');
|
|
6
6
|
require('../chunk-KWJW5TMH.cjs');
|
|
7
|
-
require('../chunk-AEQT2QQX.cjs');
|
|
8
7
|
require('../chunk-7NLO7ASW.cjs');
|
|
9
8
|
require('../chunk-7PN3YENO.cjs');
|
|
10
9
|
var chunkUFT22LAB_cjs = require('../chunk-UFT22LAB.cjs');
|
|
10
|
+
require('../chunk-AEQT2QQX.cjs');
|
|
11
11
|
var chunkADDQKZ5I_cjs = require('../chunk-ADDQKZ5I.cjs');
|
|
12
12
|
require('../chunk-5QERK4PK.cjs');
|
|
13
13
|
require('../chunk-T73BHNQX.cjs');
|
|
@@ -15,7 +15,7 @@ require('../chunk-HYUKPHCT.cjs');
|
|
|
15
15
|
require('../chunk-ALK3PUUB.cjs');
|
|
16
16
|
require('../chunk-223D4727.cjs');
|
|
17
17
|
require('../chunk-SNUBQMIS.cjs');
|
|
18
|
-
var
|
|
18
|
+
var chunkVLQCLQAS_cjs = require('../chunk-VLQCLQAS.cjs');
|
|
19
19
|
require('../chunk-4ONPEVTP.cjs');
|
|
20
20
|
require('../chunk-V3KLUWQQ.cjs');
|
|
21
21
|
var chunkP5AQYC4D_cjs = require('../chunk-P5AQYC4D.cjs');
|
|
@@ -29,7 +29,7 @@ require('../chunk-ORELHENJ.cjs');
|
|
|
29
29
|
require('../chunk-NWNVWO6L.cjs');
|
|
30
30
|
require('../chunk-SK6HQ46Q.cjs');
|
|
31
31
|
require('../chunk-TG2GM7WJ.cjs');
|
|
32
|
-
require('../chunk-
|
|
32
|
+
require('../chunk-ZYGAXD3N.cjs');
|
|
33
33
|
var chunkNSD37OF5_cjs = require('../chunk-NSD37OF5.cjs');
|
|
34
34
|
require('../chunk-OEJQFPWO.cjs');
|
|
35
35
|
var chunkQG2U2JGX_cjs = require('../chunk-QG2U2JGX.cjs');
|
|
@@ -53,6 +53,8 @@ require('../chunk-YVCOQHCE.cjs');
|
|
|
53
53
|
require('../chunk-JV5TVUOU.cjs');
|
|
54
54
|
require('../chunk-ZVEW3JBT.cjs');
|
|
55
55
|
require('../chunk-M74FWYNL.cjs');
|
|
56
|
+
require('../chunk-QUMUAJ2P.cjs');
|
|
57
|
+
require('../chunk-VZOOGA47.cjs');
|
|
56
58
|
require('../chunk-SBWIA4PL.cjs');
|
|
57
59
|
require('../chunk-QMIHLJMH.cjs');
|
|
58
60
|
var chunkHQDR43JC_cjs = require('../chunk-HQDR43JC.cjs');
|
|
@@ -62,8 +64,6 @@ var chunk3YZKDCWY_cjs = require('../chunk-3YZKDCWY.cjs');
|
|
|
62
64
|
require('../chunk-SJSGSHIT.cjs');
|
|
63
65
|
require('../chunk-ZW6FPIFC.cjs');
|
|
64
66
|
require('../chunk-ZT5MIFLC.cjs');
|
|
65
|
-
require('../chunk-QUMUAJ2P.cjs');
|
|
66
|
-
require('../chunk-VZOOGA47.cjs');
|
|
67
67
|
require('../chunk-5SKHK3BG.cjs');
|
|
68
68
|
require('../chunk-IDCD5TEZ.cjs');
|
|
69
69
|
require('../chunk-M2FOXGJU.cjs');
|
|
@@ -3045,7 +3045,7 @@ function ConnectedWorkflowsPage({
|
|
|
3045
3045
|
const config = host.workflows;
|
|
3046
3046
|
const { openConversation, openFiles } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
3047
3047
|
const openWorkflow = chunkP5AQYC4D_cjs.useOpenWorkflow();
|
|
3048
|
-
const renderPerson =
|
|
3048
|
+
const renderPerson = chunkYP5EBGLU_cjs.useRenderTaskPerson();
|
|
3049
3049
|
const refreshDocuments = react$2.useRefreshDocuments();
|
|
3050
3050
|
const invalidateTags = react$2.useInvalidateTagData();
|
|
3051
3051
|
const { data: tags = [] } = react$2.useTags();
|
|
@@ -3076,7 +3076,7 @@ function ConnectedWorkflowsPage({
|
|
|
3076
3076
|
openHistory,
|
|
3077
3077
|
closeHistoryTab,
|
|
3078
3078
|
selectHistoryTab
|
|
3079
|
-
} =
|
|
3079
|
+
} = chunkYP5EBGLU_cjs.useWorkflowsPageState({
|
|
3080
3080
|
historyWorkflowId: requestedHistoryId ?? historyWorkflowId,
|
|
3081
3081
|
onHistoryWorkflowConsumed: consumeHistory
|
|
3082
3082
|
});
|
|
@@ -3144,7 +3144,7 @@ function ConnectedWorkflowsPage({
|
|
|
3144
3144
|
return (
|
|
3145
3145
|
// The page in the Workflows page's frame: padded, scrolling.
|
|
3146
3146
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full min-h-0 w-full overflow-auto p-4 sm:p-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3147
|
-
|
|
3147
|
+
chunkYP5EBGLU_cjs.ConnectedWorkflowRunPage,
|
|
3148
3148
|
{
|
|
3149
3149
|
workflow: running.workflow,
|
|
3150
3150
|
projectFrom: running.projectFrom,
|
|
@@ -3232,7 +3232,7 @@ function ConnectedWorkflowsPage({
|
|
|
3232
3232
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-0 flex-col", "data-testid": testId, children: [
|
|
3233
3233
|
pageHeader && /* @__PURE__ */ jsxRuntime.jsx(chunkNSD37OF5_cjs.PageHeader, { ...pageHeader }),
|
|
3234
3234
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3235
|
-
|
|
3235
|
+
chunkVLQCLQAS_cjs.ConnectedWorkflowsTable,
|
|
3236
3236
|
{
|
|
3237
3237
|
onOpenTemplate: (id) => openBuilder({ kind: "template", id }),
|
|
3238
3238
|
tabs: [
|
|
@@ -3262,7 +3262,7 @@ function ConnectedWorkflowsPage({
|
|
|
3262
3262
|
}
|
|
3263
3263
|
},
|
|
3264
3264
|
content: hostTab ? hostTab.content : runsFor ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3265
|
-
|
|
3265
|
+
chunkYP5EBGLU_cjs.ConnectedWorkflowHistory,
|
|
3266
3266
|
{
|
|
3267
3267
|
inline: true,
|
|
3268
3268
|
hideHeader: true,
|
|
@@ -3326,7 +3326,7 @@ function ConnectedWorkflowsPage({
|
|
|
3326
3326
|
}
|
|
3327
3327
|
),
|
|
3328
3328
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3329
|
-
|
|
3329
|
+
chunkYP5EBGLU_cjs.ConnectedTaskComposer,
|
|
3330
3330
|
{
|
|
3331
3331
|
kind: "workflow",
|
|
3332
3332
|
saveOnly: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbidocs/coedit",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.128",
|
|
4
4
|
"description": "Real-time collaboration for the ARBI native DOCX editor: a Yjs mirror of the canonical OOXML package, session, and server runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbidocs/blocks",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.128",
|
|
4
4
|
"description": "Composable, domain-neutral UI blocks for ARBI apps, organised by capability (retrieval, facts, agents, workspaces, citations, collaboration) plus shell, theme and site primitives, on top of @arbidocs/react.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -344,9 +344,9 @@
|
|
|
344
344
|
"custom-site:test:e2e": "playwright test -c examples/custom-site/playwright.config.ts"
|
|
345
345
|
},
|
|
346
346
|
"dependencies": {
|
|
347
|
-
"@arbidocs/client": "0.5.
|
|
348
|
-
"@arbidocs/coedit": "0.5.
|
|
349
|
-
"@arbidocs/sdk": "0.5.
|
|
347
|
+
"@arbidocs/client": "0.5.128",
|
|
348
|
+
"@arbidocs/coedit": "0.5.128",
|
|
349
|
+
"@arbidocs/sdk": "0.5.128",
|
|
350
350
|
"@auth0/auth0-react": "^2.19.0",
|
|
351
351
|
"@dnd-kit/core": "^6.3.1",
|
|
352
352
|
"@dnd-kit/sortable": "^10.0.0",
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
"y-protocols": "^1.0.6"
|
|
398
398
|
},
|
|
399
399
|
"peerDependencies": {
|
|
400
|
-
"@arbidocs/react": "0.5.
|
|
400
|
+
"@arbidocs/react": "0.5.128",
|
|
401
401
|
"@lexical/html": "0.35.0",
|
|
402
402
|
"@lexical/link": "0.35.0",
|
|
403
403
|
"@lexical/list": "0.35.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shell/ShellSidebar.tsx","../src/lib/use-close-on-escape.ts","../src/lib/sidebar-mode.ts","../src/shell/use-sidebar-controller.ts","../src/shell/SidebarRowAction.tsx","../src/shell/AskField.tsx","../src/shell/ActionCluster.tsx","../src/shell/StatusRow.tsx","../src/shell/OfflinePill.tsx","../src/shell/RemoteControlPill.tsx","../src/shell/TipCard.tsx","../src/shell/DockZone.tsx"],"names":["jsxs","Sidebar","jsx","useRef","useEffect","useState","useControllableState","useIsPhone","useIsNarrow","useIsTouchScreen","useCallback","useContext","SidebarRowHoverContext","cn","BlocksTooltipProvider","Tooltip","TooltipTrigger","TooltipContent","testIdOr","Sparkles","Button","Search","ArrowUp","X","useId","STATUS_ROW_TONES","STATUS_ROW_BASE_CLASS","WifiOff","TriangleAlert","RefreshCw","MousePointerClick","Lightbulb","Pencil","Chev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AAA,IAAoB,CAAC,UAAA,IAAc;AAAA;AACrC;AAAA,KACF;AAAA,IAEC,UAAA,IAAc,YAAA,KAAiB,IAAA,oBAC9BX,cAAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAU,mEAAA;AAAA,QACV,KAAA,EAAO,EAAE,IAAA,EAAM,YAAA;AAAa;AAAA,KAC9B;AAAA,IAED,UAAA,oBAAcA,cAAAA,CAAC,KAAA,EAAA,EAAI,WAAU,yCAAA,EAA0C;AAAA,GAAA,EAC1E,CAAA;AAEJ","file":"chunk-KA3F6TIH.cjs","sourcesContent":["import type { ReactNode } from 'react'\nimport { Sidebar, type SidebarRootProps } from './Sidebar'\nimport type { SidebarController } from './use-sidebar-controller'\nimport type { NavItem, NavSection } from './types'\n\nexport interface ShellSidebarProps extends Pick<\n SidebarRootProps,\n 'className' | 'aria-label' | 'labels' | 'backdropTestId'\n> {\n /** From `useSidebarController`: layout, hover/pin/drawer behaviour. */\n controller: SidebarController\n /** Brand mark of the phone drawer's header (logo + close). Omit for no drawer header. */\n drawerLogo?: ReactNode\n /** `data-testid` of the drawer's close button. */\n drawerCloseTestId?: string\n /** Top block (workspace switcher, ask field, pin toggle). Read `controller.expanded` for the rail. */\n header?: ReactNode\n /** Rows as data. */\n items?: NavItem[]\n /** Labelled groups of rows as data, after `items`. */\n sections?: NavSection[]\n navClassName?: string\n /**\n * Width-bound cards at the top of the footer (smart tips, notices): shown only once the panel\n * has settled open, and gone the instant it starts to close.\n */\n tips?: ReactNode\n /** The rest of the footer (status rows, account rows). */\n footer?: ReactNode\n /** Root `data-testid` (default `sidebar`). */\n 'data-testid'?: string\n}\n\n/**\n * The whole sidebar from a controller and data: `Sidebar.Root` in the resolved mode, the phone\n * drawer header, the header slot, the nav rows/groups and the footer. Renders nothing while the\n * layout is hidden (a phone with the drawer closed), so no clipped rows carry duplicate test ids.\n *\n * const sidebar = useSidebarController({ isPinned, onPinnedChange: setPinned })\n * <ShellSidebar controller={sidebar} header={…} items={nav} footer={…} />\n */\nexport function ShellSidebar({\n controller,\n drawerLogo,\n drawerCloseTestId,\n header,\n items,\n sections,\n navClassName,\n tips,\n footer,\n ...rootProps\n}: ShellSidebarProps) {\n if (controller.layout.hidden) return null\n return (\n <Sidebar.Root {...controller.rootProps} {...rootProps}>\n {controller.isDrawer && drawerLogo && (\n <Sidebar.DrawerHeader\n logo={drawerLogo}\n onClose={controller.closeDrawer}\n data-testid={drawerCloseTestId}\n />\n )}\n {header && <Sidebar.Header>{header}</Sidebar.Header>}\n <Sidebar.Nav items={items} sections={sections} className={navClassName} />\n {(tips || footer) && (\n <Sidebar.Footer>\n {controller.tipsVisible && tips}\n {footer}\n </Sidebar.Footer>\n )}\n </Sidebar.Root>\n )\n}\n","import { useEffect, useRef } from 'react'\n\n/**\n * While `isActive`, Escape calls `onClose`. For surfaces that float over the page without being a\n * modal (no backdrop, no focus trap), so nothing else closes them from the keyboard. An Escape a\n * dialog already handled (`defaultPrevented`) is left alone so one press closes one layer.\n */\nexport function useCloseOnEscape(isActive: boolean, onClose: () => void): void {\n const onCloseRef = useRef(onClose)\n useEffect(() => {\n onCloseRef.current = onClose\n })\n\n useEffect(() => {\n if (!isActive) return\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && !e.defaultPrevented) onCloseRef.current()\n }\n document.addEventListener('keydown', onKeyDown)\n return () => document.removeEventListener('keydown', onKeyDown)\n }, [isActive])\n}\n","import { useEffect, useRef, useState } from 'react'\n\n/**\n * Headless sidebar behaviour (no DOM, no store): how the sidebar lays out for a given set of\n * inputs, and the settle timing that keeps labels/tips from squeezing during the width transition.\n *\n * - `drawer` small-screen off-canvas panel (opened by the app bar's menu button)\n * - `collapsed` hidden (width 0): a phone with the drawer closed, or `isCollapsed`\n * - `pinned` full width, inline, pushes the content\n * - `rail` icon strip that floats open to full width while hovered\n */\nexport type SidebarMode = 'drawer' | 'collapsed' | 'pinned' | 'rail'\n\nexport interface SidebarModeInput {\n isSmallScreen: boolean\n /** The phone drawer was requested open. */\n isDrawerRequested: boolean\n isCollapsed: boolean\n isPinned: boolean\n isHovering: boolean\n /**\n * Tablet-width viewport (above the phone drawer breakpoint but too narrow to give the content a\n * usable column next to a 255px panel): pinning is ignored and the sidebar stays an icon rail.\n */\n isNarrow?: boolean\n}\n\nexport interface SidebarLayout {\n mode: SidebarMode\n /** Labels should be shown (the panel is, or is becoming, full width). */\n expanded: boolean\n /** Phones: nothing is rendered until the drawer opens. */\n hidden: boolean\n /** Hover state that actually applies (never on touch-sized screens). */\n hovering: boolean\n}\n\nexport function resolveSidebarLayout(input: SidebarModeInput): SidebarLayout {\n const { isSmallScreen, isDrawerRequested, isCollapsed, isPinned, isHovering } = input\n const canPin = isPinned && !isSmallScreen && !input.isNarrow\n const drawerOpen = isSmallScreen && isDrawerRequested\n // Small screens are drawer-only: when it is closed the panel is fully off-canvas\n // regardless of pinning (pinning is a desktop concept), and hover never expands.\n const effectiveCollapsed = isCollapsed || (isSmallScreen && !drawerOpen)\n const hovering = isHovering && !isSmallScreen\n\n let mode: SidebarMode\n if (drawerOpen) mode = 'drawer'\n else if (effectiveCollapsed) mode = 'collapsed'\n else if (canPin) mode = 'pinned'\n else mode = 'rail'\n\n // `hovering`, not `isHovering`: a stale hover flag must not report a hidden phone sidebar as expanded.\n const expanded = drawerOpen || (!effectiveCollapsed && (canPin || hovering))\n\n return { mode, expanded, hidden: isSmallScreen && !drawerOpen, hovering }\n}\n\n/**\n * Settle timing around the width transition (default 300ms):\n * - `labelsExpanded` switches on immediately but off only after the transition, so labels do not\n * snap to icon-only while the panel is still wide;\n * - `tipsVisible` is the opposite: width-bound content (a tip card) appears only once the panel\n * has fully opened and disappears the instant collapse starts.\n */\nexport function useSidebarSettle(expanded: boolean, settleMs = 300) {\n const [labelsExpanded, setLabelsExpanded] = useState(expanded)\n const [tipsVisible, setTipsVisible] = useState(expanded)\n const labelsTimer = useRef<ReturnType<typeof setTimeout> | null>(null)\n const tipsTimer = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n useEffect(() => {\n if (labelsTimer.current) clearTimeout(labelsTimer.current)\n if (expanded) setLabelsExpanded(true)\n else labelsTimer.current = setTimeout(() => setLabelsExpanded(false), settleMs)\n return () => {\n if (labelsTimer.current) clearTimeout(labelsTimer.current)\n }\n }, [expanded, settleMs])\n\n useEffect(() => {\n if (tipsTimer.current) clearTimeout(tipsTimer.current)\n if (expanded) tipsTimer.current = setTimeout(() => setTipsVisible(true), settleMs)\n else setTipsVisible(false)\n return () => {\n if (tipsTimer.current) clearTimeout(tipsTimer.current)\n }\n }, [expanded, settleMs])\n\n return { labelsExpanded, tipsVisible }\n}\n","import { useCallback, useEffect, useRef, type PointerEvent } from 'react'\nimport { useControllableState } from '../lib/useControllableState'\nimport { useCloseOnEscape } from '../lib/use-close-on-escape'\nimport { useIsNarrow, useIsPhone, useIsTouchScreen } from '../lib/use-media-query'\nimport { resolveSidebarLayout, useSidebarSettle, type SidebarLayout } from '../lib/sidebar-mode'\nimport type { SidebarRootProps } from './Sidebar'\n\nexport interface UseSidebarControllerOptions {\n /** Pinned open (desktop). Controlled when set; otherwise kept here, seeded by `defaultPinned`. */\n isPinned?: boolean\n /** Default `true`. */\n defaultPinned?: boolean\n onPinnedChange?: (isPinned: boolean) => void\n /** The rail is floated open (hover, or its toggle at a narrow width). Controlled when set. */\n isHovering?: boolean\n onHoveringChange?: (isHovering: boolean) => void\n /** The phone drawer is open. Controlled when set (the app bar's menu button opens it). */\n isDrawerOpen?: boolean\n onDrawerOpenChange?: (isDrawerOpen: boolean) => void\n /**\n * Keep the sidebar a rail even when pinned, on top of the tablet width (for example while a\n * docked panel squeezes the content). The stored pin is left untouched.\n */\n forceRail?: boolean\n /**\n * Which rails expand on pointer enter. The default ignores narrow and emulated touch hover;\n * `all` retains hover expansion for a host whose narrow rail has no separate expand button.\n */\n hoverExpansion?: 'desktop-pointer' | 'all'\n}\n\n/** The `Sidebar.Root` props the controller resolves. */\nexport type SidebarControllerRootProps = Pick<\n SidebarRootProps,\n | 'mode'\n | 'expanded'\n | 'isHovering'\n | 'onBackdropClick'\n | 'hasRailBackdrop'\n | 'onPointerEnter'\n | 'onPointerLeave'\n>\n\nexport interface SidebarController {\n layout: SidebarLayout\n /** Labels shown (settled: they stay on until the closing transition ends). */\n expanded: boolean\n /** Width-bound content (tips, notices) may show: on once fully open, off as closing starts. */\n tipsVisible: boolean\n /** The phone drawer is showing. */\n isDrawer: boolean\n isSmallScreen: boolean\n /** Tablet width (or `forceRail`): pinning is ignored and the sidebar stays a rail. */\n isNarrow: boolean\n /** The pin as it applies (always off while narrow). */\n isPinned: boolean\n /** Spread onto `Sidebar.Root` (or pass the controller to `ShellSidebar`). */\n rootProps: SidebarControllerRootProps\n openDrawer: () => void\n closeDrawer: () => void\n /** The pin toggle: pins/unpins, or floats the rail open/closed while narrow. */\n togglePin: () => void\n /** Open from the rail (its ask button): pins, or floats the rail open while narrow. */\n expand: () => void\n /** After a nav row is chosen: closes the drawer, and a floated rail the pointer has left. */\n afterNavigate: () => void\n}\n\n// A menu opened from the rail (the account menu) is positioned against the sidebar's current\n// layout. Hovering that menu from the content would expand the rail, re-anchor the menu under\n// the pointer and move the item being clicked, so hover does not expand the rail while one is open.\nconst isMenuOpen = () =>\n typeof document !== 'undefined' &&\n document.querySelector('[role=\"menu\"][data-state=\"open\"]') !== null\n\n/**\n * Sidebar behaviour as one hook, shared by every shell: resolves the layout (drawer / pinned /\n * rail) for the viewport, settles labels and tips around the width transition, and owns the hover,\n * pin and drawer rules:\n * - touch: the rail opens only through its toggle, never by the pointer enter of a tap;\n * - narrow: a pointer drifting over the rail does not float the labels over the content;\n * - Escape closes a floated rail; the drawer closes itself when the viewport grows past a phone;\n * - choosing a row closes the drawer, and a floated rail unless the pointer is still over it.\n *\n * State is controlled per field (`isPinned`, `isHovering`, `isDrawerOpen`) so an app can keep it\n * in its own store, or uncontrolled for a shell that does not care.\n */\nexport function useSidebarController(options: UseSidebarControllerOptions = {}): SidebarController {\n const [storedPinned, setPinned] = useControllableState(\n options.isPinned,\n options.defaultPinned ?? true,\n options.onPinnedChange\n )\n const [isHovering, setHovering] = useControllableState(\n options.isHovering,\n false,\n options.onHoveringChange\n )\n const [isDrawerOpen, setDrawerOpen] = useControllableState(\n options.isDrawerOpen,\n false,\n options.onDrawerOpenChange\n )\n\n const isSmallScreen = useIsPhone()\n const isNarrow = useIsNarrow() || !!options.forceRail\n const isTouch = useIsTouchScreen()\n\n const layout = resolveSidebarLayout({\n isSmallScreen,\n isDrawerRequested: isDrawerOpen,\n isCollapsed: false,\n isPinned: storedPinned,\n isHovering,\n isNarrow,\n })\n const isDrawer = layout.mode === 'drawer'\n const { labelsExpanded, tipsVisible } = useSidebarSettle(layout.expanded)\n\n // Whether the pointer is physically over the sidebar (decides if navigating closes the rail).\n const isPointerOver = useRef(false)\n\n const closeDrawer = useCallback(() => setDrawerOpen(false), [setDrawerOpen])\n const openDrawer = useCallback(() => setDrawerOpen(true), [setDrawerOpen])\n\n // The floated rail has no modal behaviour (the drawer gets Escape from `Sidebar.Root`).\n useCloseOnEscape(layout.mode === 'rail' && layout.hovering, () => setHovering(false))\n\n // A drawer left open when the viewport grows past a phone (rotate/resize) would be a stuck overlay.\n useEffect(() => {\n if (isDrawerOpen && !isSmallScreen) setDrawerOpen(false)\n }, [isDrawerOpen, isSmallScreen, setDrawerOpen])\n\n const onPointerEnter = (event: PointerEvent<HTMLElement>) => {\n // Primary-input media queries can report touch even while a mouse is in use.\n if (event.pointerType !== 'mouse' && options.hoverExpansion !== 'all') return\n isPointerOver.current = true\n if (\n !isSmallScreen &&\n (!isNarrow || options.hoverExpansion === 'all') &&\n (!isMenuOpen() || options.hoverExpansion === 'all')\n )\n setHovering(true)\n }\n const onPointerLeave = (event: PointerEvent<HTMLElement>) => {\n if (event.pointerType !== 'mouse' && options.hoverExpansion !== 'all') return\n isPointerOver.current = false\n if (!isSmallScreen) setHovering(false)\n }\n\n return {\n layout,\n expanded: labelsExpanded,\n tipsVisible,\n isDrawer,\n isSmallScreen,\n isNarrow,\n isPinned: storedPinned && !isNarrow,\n rootProps: {\n mode: layout.mode,\n expanded: labelsExpanded,\n isHovering: layout.hovering,\n onBackdropClick: isDrawer ? closeDrawer : () => setHovering(false),\n hasRailBackdrop: isTouch,\n onPointerEnter,\n onPointerLeave,\n },\n openDrawer,\n closeDrawer,\n togglePin: () => (isNarrow ? setHovering(!isHovering) : setPinned(!storedPinned)),\n expand: () => (isNarrow ? setHovering(true) : setPinned(true)),\n afterNavigate: () => {\n if (!isPointerOver.current && !storedPinned) setHovering(false)\n if (isDrawer) closeDrawer()\n },\n }\n}\n","import { useContext, type ReactNode } from 'react'\nimport { cn, Tooltip, TooltipContent, TooltipTrigger } from '@arbidocs/react/ui'\nimport { BlocksTooltipProvider } from '../provider/TooltipScope'\nimport { SidebarRowHoverContext } from './Sidebar'\n\nexport type SidebarRowActionPulse = 'active' | 'success' | 'error'\n\nexport interface SidebarRowActionProps {\n /** The row this control sits on is selected: the glyph takes the selection ink. */\n active?: boolean\n onClick?: () => void\n /** Tooltip text and accessible label. */\n label: string\n /**\n * Demand attention while the row is idle: `active` pulses primary (work in progress),\n * `success` pulses green (just finished), `error` is a steady red alert. A selected row wins.\n */\n pulse?: SidebarRowActionPulse | null\n 'data-testid'?: string\n children: ReactNode\n}\n\nconst PULSE_STYLES: Record<SidebarRowActionPulse, string> = {\n active: 'animate-pulse-attention text-primary',\n success: 'animate-pulse-attention text-green-text',\n // Steady (not animated) so a failure stays put and reads as a standing alert.\n error: 'text-red-text opacity-100',\n}\n\n/**\n * The secondary control at the right edge of a sidebar row: a small muted glyph. Always visible\n * (touch has no hover); hovering or focusing the row only brightens it a tone, through\n * SidebarRowHoverContext. Stops propagation so it never triggers the row's own click.\n */\nexport function SidebarRowAction({\n active = false,\n onClick,\n label,\n pulse = null,\n 'data-testid': testId,\n children,\n}: SidebarRowActionProps) {\n const rowHovered = useContext(SidebarRowHoverContext)\n\n const tone = active\n ? 'text-accent-foreground hover:bg-background/60'\n : pulse\n ? `${PULSE_STYLES[pulse]} hover:bg-muted`\n : cn(\n 'text-muted-foreground hover:bg-muted hover:text-foreground',\n rowHovered ? 'opacity-100' : 'opacity-70'\n )\n\n return (\n <BlocksTooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild onFocusCapture={(e) => e.stopPropagation()}>\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation()\n onClick?.()\n }}\n aria-label={label}\n data-slot=\"sidebar-row-action\"\n data-testid={testId}\n className={cn('rounded-md p-1 transition-colors pointer-coarse:p-2.5', tone)}\n >\n {children}\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"right\">{label}</TooltipContent>\n </Tooltip>\n </BlocksTooltipProvider>\n )\n}\n","import type { InputHTMLAttributes, KeyboardEvent, ReactNode, Ref } from 'react'\nimport { ArrowUp, Search, Sparkles, X } from 'lucide-react'\nimport { Button, cn } from '@arbidocs/react/ui'\nimport { testIdOr } from '../chat/test-id'\n\n/** Fixed strings of the ask field, its trigger and the expanded row. */\nexport interface AskFieldLabels {\n /** Input placeholder (the `placeholder` prop wins). */\n placeholder: string\n /** The input's accessible name. */\n inputLabel: string\n search: string\n askAi: string\n /** The icon-only trigger. */\n askOrSearch: string\n closeSearch: string\n}\n\nexport const DEFAULT_ASK_FIELD_LABELS: AskFieldLabels = {\n placeholder: 'Ask or search…',\n inputLabel: 'Ask AI or search your documents',\n search: 'Search',\n askAi: 'Ask AI',\n askOrSearch: 'Ask AI or search',\n closeSearch: 'Close search',\n}\n\nexport interface AskFieldProps {\n value: string\n onValueChange: (value: string) => void\n /** Enter / the arrow button: ask AI. */\n onAsk: (text: string) => void\n /** The magnifier button: semantic search. */\n onSearch: (text: string) => void\n /** Intercept keys first (e.g. a slash menu); call `preventDefault` to stop the default Enter-asks. */\n onInputKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void\n /** Rendered just under the field at its width (a slash/autocomplete menu). */\n menu?: ReactNode\n inputRef?: Ref<HTMLInputElement>\n /** Extra attributes for the input, e.g. the combobox props of `useListKeyNav` for a slash menu. */\n inputProps?: InputHTMLAttributes<HTMLInputElement>\n placeholder?: string\n labels?: Partial<AskFieldLabels>\n autoFocus?: boolean\n className?: string\n /** Root id (default `workspace-ask-bar`); the input/search/submit ids are `<root>-input|search|submit`. */\n 'data-testid'?: string\n}\n\n/**\n * The compact one-line ask/search field: sparkle, input, then two icon doors (Search, Ask AI).\n * Text and the menu are controlled by the host, so the same field serves the sidebar, the phone\n * app bar and any custom shell.\n */\nexport function AskField({\n value,\n onValueChange,\n onAsk,\n onSearch,\n onInputKeyDown,\n menu,\n inputRef,\n inputProps,\n placeholder,\n labels,\n autoFocus = false,\n className,\n 'data-testid': testIdProp,\n}: AskFieldProps) {\n const testId = testIdOr(testIdProp, { testId: 'workspace-ask-bar' })\n const l = { ...DEFAULT_ASK_FIELD_LABELS, ...labels }\n const isEmpty = !value.trim()\n const submit = (handler: (text: string) => void) => {\n const text = value.trim()\n if (text) handler(text)\n }\n\n return (\n <div className={cn('relative', className)} data-slot=\"ask-field\" data-testid={testId}>\n {menu && <div className=\"absolute inset-x-0 top-9 z-30\">{menu}</div>}\n <div\n role=\"search\"\n className=\"flex h-9 items-center gap-0.5 rounded-md border border-border bg-background pl-2.5 pr-0.5 transition-colors focus-within:border-primary focus-within:ring-3 focus-within:ring-primary pointer-coarse:h-11\"\n >\n <Sparkles aria-hidden=\"true\" className=\"size-4 shrink-0 text-ai-ink\" />\n <input\n {...inputProps}\n ref={inputRef}\n type=\"text\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n onKeyDown={(e) => {\n onInputKeyDown?.(e)\n // Enter asks (not mid-IME-composition). A plain div, not a <form>.\n if (e.defaultPrevented) return\n if (e.key === 'Enter' && !e.nativeEvent.isComposing) {\n e.preventDefault()\n submit(onAsk)\n }\n }}\n placeholder={placeholder ?? l.placeholder}\n aria-label={l.inputLabel}\n autoFocus={autoFocus}\n className=\"ml-1.5 h-8 min-w-0 flex-1 bg-transparent pointer-coarse:h-11 text-sm text-foreground outline-none placeholder:text-muted-foreground\"\n data-testid={`${testId}-input`}\n />\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n disabled={isEmpty}\n onClick={() => submit(onSearch)}\n title={l.search}\n aria-label={l.search}\n className=\"size-7 shrink-0 text-muted-foreground hover:text-foreground pointer-coarse:size-10\"\n data-testid={`${testId}-search`}\n >\n <Search className=\"size-4\" />\n </Button>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n disabled={isEmpty}\n onClick={() => submit(onAsk)}\n title={l.askAi}\n aria-label={l.askAi}\n className=\"!inline-flex size-7 shrink-0 text-ai-ink hover:bg-ai-soft hover:text-ai-ink pointer-coarse:size-10\"\n data-testid={`${testId}-submit`}\n >\n <ArrowUp className=\"size-4\" />\n </Button>\n </div>\n </div>\n )\n}\n\nexport interface AskTriggerProps {\n /** Opens the ask field (or the palette): one action that asks AI and searches. */\n onClick: () => void\n /** `rail`: the icon-only sidebar's bordered tile; `appbar`: the phone app bar's bare icon. */\n variant?: 'rail' | 'appbar'\n labels?: Partial<Pick<AskFieldLabels, 'askOrSearch'>>\n 'data-testid'?: string\n}\n\n/** The icon that stands in for the field where there is no room for it. */\nexport function AskTrigger({\n onClick,\n variant = 'rail',\n labels,\n 'data-testid': testId,\n}: AskTriggerProps) {\n const text = labels?.askOrSearch ?? DEFAULT_ASK_FIELD_LABELS.askOrSearch\n return (\n <button\n type=\"button\"\n onClick={onClick}\n title={text}\n aria-label={text}\n data-slot=\"ask-trigger\"\n data-testid={testId}\n className={cn(\n 'flex items-center justify-center rounded-md text-ai-ink transition-colors hover:bg-ai-soft',\n variant === 'rail'\n ? 'h-9 w-12 border border-border bg-background pointer-coarse:h-11'\n : 'size-11'\n )}\n >\n <Sparkles className={variant === 'rail' ? 'size-4' : 'size-5'} />\n </button>\n )\n}\n\nexport interface AskRowProps {\n /** The field (an AskField). */\n children: ReactNode\n onClose: () => void\n labels?: Partial<Pick<AskFieldLabels, 'closeSearch'>>\n /** Row id (default `workspace-ask-bar-expanded`). */\n 'data-testid'?: string\n /** Collapse button id (default `workspace-ask-bar-collapse`). */\n collapseTestId?: string\n}\n\n/** The phone's expanded ask row: takes over the app bar so there is room to type; Escape closes. */\nexport function AskRow({\n children,\n onClose,\n labels,\n 'data-testid': testId,\n collapseTestId,\n}: AskRowProps) {\n return (\n <div\n className=\"flex h-14 flex-shrink-0 items-center gap-1 bg-background px-3 pt-safe\"\n data-slot=\"ask-row\"\n data-testid={testIdOr(testId, { testId: 'workspace-ask-bar-expanded' })}\n onKeyDown={(e) => {\n if (e.key === 'Escape' && !e.defaultPrevented) onClose()\n }}\n >\n <div className=\"min-w-0 flex-1\">{children}</div>\n <button\n type=\"button\"\n onClick={onClose}\n aria-label={labels?.closeSearch ?? DEFAULT_ASK_FIELD_LABELS.closeSearch}\n data-testid={testIdOr(collapseTestId, { testId: 'workspace-ask-bar-collapse' })}\n className=\"flex size-11 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground\"\n >\n <X className=\"size-5\" />\n </button>\n </div>\n )\n}\n","import { useId, type MouseEvent, type ReactNode } from 'react'\nimport type { ShellActionLayout } from './types'\n\nexport interface ActionClusterProps {\n /**\n * `bar`: one row for a page header or phone app bar (status, bell, contacts, account).\n * `sidebar`: the bottom of the expanded sidebar: the bell and contacts rows stacked above the\n * account row.\n * `rail`: the same stack on the icon-only rail (same order, icon-only rows).\n * `drawer`: the phone drawer's rows (bell and contacts only; the app bar carries the account).\n */\n layout?: ShellActionLayout\n /** Status pill (remote control); `bar` only. Other layouts show status in their own rows. */\n status?: ReactNode\n /** Report a problem (bug icon), first in the cluster. */\n report?: ReactNode\n /** Notification bell (the kit's NotificationBell, or a `Sidebar.BadgeRow`). */\n mail?: ReactNode\n /** Calendar entry (a `Sidebar.BadgeRow`), right after mail. */\n calendar?: ReactNode\n /** Databases entry (a `Sidebar.BadgeRow`), right after calendar. */\n databases?: ReactNode\n bell?: ReactNode\n /** Contacts / messages entry with its own badge (a `Sidebar.BadgeRow`). */\n contacts?: ReactNode\n /** Account menu (the kit's UserMenu). */\n account?: ReactNode\n /**\n * Names the cluster: the group's accessible name in every layout, and a visible heading above\n * the rows in the `drawer` layout (where phones otherwise get unlabelled rows).\n */\n label?: string\n 'data-testid'?: string\n}\n\n/**\n * The account area: notifications, contacts and the account menu, in one of four placements. In\n * the sidebar and on the rail the two badge rows are stacked above the account row in the same\n * order, so nothing moves when the rail expands; the account menu holds everything else (help,\n * settings, tips, processing).\n */\nexport function ActionCluster({\n layout = 'bar',\n status,\n report,\n mail,\n calendar,\n databases,\n bell,\n contacts,\n account,\n label,\n 'data-testid': testId = 'sidebar-actions',\n}: ActionClusterProps) {\n const labelId = useId()\n // Dashboard's content area resets focus on click, and Radix PORTALS bubble through the React\n // tree: stop clicks here or a dropdown item (e.g. \"View all\") would un-focus the panel it opened.\n const stop = (e: MouseEvent) => e.stopPropagation()\n\n if (layout === 'sidebar' || layout === 'rail' || layout === 'drawer') {\n const rail = layout === 'rail'\n return (\n <div\n className={rail ? 'flex flex-col items-center gap-0.5' : 'flex flex-col gap-0.5'}\n onClick={stop}\n role={label ? 'group' : undefined}\n aria-labelledby={label && layout === 'drawer' ? labelId : undefined}\n aria-label={label && layout !== 'drawer' ? label : undefined}\n data-slot=\"action-cluster\"\n data-layout={layout}\n data-testid={testId}\n >\n {label && layout === 'drawer' && (\n <p\n id={labelId}\n className=\"px-3 pb-1 pt-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground\"\n data-slot=\"action-cluster-label\"\n >\n {label}\n </p>\n )}\n {bell}\n {mail}\n {calendar}\n {databases}\n {contacts}\n {report}\n {account && layout !== 'drawer' && (\n <div className={rail ? 'mt-1' : 'mt-1 min-w-0'}>{account}</div>\n )}\n </div>\n )\n }\n\n return (\n <div\n className=\"flex items-center gap-1\"\n onClick={stop}\n role={label ? 'group' : undefined}\n aria-label={label}\n data-slot=\"action-cluster\"\n >\n {status}\n {report}\n {mail}\n {calendar}\n {databases}\n {bell}\n {contacts}\n {account}\n </div>\n )\n}\n","import { X } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { STATUS_ROW_BASE_CLASS, STATUS_ROW_TONES } from './status-row-styles'\n\nexport type StatusRowTone = 'progress' | 'success' | 'error'\n\nexport interface StatusRowProps {\n tone: StatusRowTone\n /** e.g. \"Processing 3 files…\". Always the accessible name; hidden visually when `compact`. */\n label: string\n /** Opens the thing the status is about (the processing panel). */\n onClick: () => void\n /** Icon-only (the collapsed rail). */\n compact?: boolean\n 'data-testid'?: string\n}\n\n/**\n * A live status line for the sidebar footer: a spinner and a short sentence that opens the\n * thing it reports on. The host renders it ONLY while the state is relevant (work running,\n * something failed), so a quiet app shows nothing. Announced politely to screen readers.\n */\nexport function StatusRow({\n tone,\n label,\n onClick,\n compact = false,\n 'data-testid': testId,\n}: StatusRowProps) {\n const { className, Icon, spin } = STATUS_ROW_TONES[tone]\n return (\n <div role=\"status\" data-slot=\"status-row\" className={cn(compact && 'flex justify-center')}>\n <button\n type=\"button\"\n onClick={onClick}\n aria-label={label}\n title={label}\n data-testid={testId}\n data-tone={tone}\n className={cn(\n STATUS_ROW_BASE_CLASS,\n compact ? 'size-9 justify-center pointer-coarse:size-11' : 'w-full px-2.5 py-1.5',\n className\n )}\n >\n <Icon\n className={cn('size-4 shrink-0', spin && 'animate-spin motion-reduce:animate-none')}\n />\n {!compact && <span className=\"min-w-0 flex-1 truncate text-left\">{label}</span>}\n </button>\n </div>\n )\n}\n\n/** Short live state at a navigation row's right edge, replacing inventory counts. */\nexport function StatusBadge({\n tone,\n label,\n onClick,\n onDismiss,\n 'data-testid': testId,\n}: {\n tone: StatusRowTone\n label: string\n onClick?: () => void\n onDismiss?: () => void\n 'data-testid'?: string\n}) {\n const className = cn(\n 'rounded-md px-1.5 py-0.5 text-xs font-medium whitespace-nowrap',\n STATUS_ROW_TONES[tone].className\n )\n return (\n <span\n role=\"status\"\n className={cn(\n 'ml-auto inline-flex items-center rounded-md',\n STATUS_ROW_TONES[tone].className\n )}\n data-testid={testId}\n data-tone={tone}\n >\n {onClick ? (\n <button\n type=\"button\"\n title={label}\n className={className}\n onClick={(event) => {\n event.stopPropagation()\n onClick()\n }}\n onKeyDown={(event) => event.stopPropagation()}\n >\n {label}\n </button>\n ) : (\n <span className={className}>{label}</span>\n )}\n {onDismiss && (\n <button\n type=\"button\"\n aria-label={`Dismiss ${label}`}\n title=\"Dismiss\"\n className=\"mr-1 rounded-sm p-0.5 opacity-60 hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring\"\n onClick={(event) => {\n event.stopPropagation()\n onDismiss()\n }}\n onKeyDown={(event) => event.stopPropagation()}\n >\n <X className=\"size-3\" />\n </button>\n )}\n </span>\n )\n}\n","import { RefreshCw, TriangleAlert, WifiOff } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { testIdOr } from '../chat/test-id'\nimport { SidebarRowHoverContext } from './Sidebar'\nimport { SidebarRowAction } from './SidebarRowAction'\n\nexport type OfflinePillTone = 'offline' | 'failed' | 'syncing'\n\n/** Fixed strings of the offline pill. */\nexport interface OfflinePillLabels {\n reconnect: string\n}\n\nexport const DEFAULT_OFFLINE_PILL_LABELS: OfflinePillLabels = {\n reconnect: 'Reconnect',\n}\n\nexport interface OfflinePillProps {\n tone: OfflinePillTone\n /** e.g. \"Offline · 3 pending\", \"2 failed to sync\", \"Syncing 4…\". */\n label: string\n /** Icon-only (the collapsed rail / app bar). */\n compact?: boolean\n /** Opens the pending-changes list. */\n onOpen: () => void\n /** Offered beside the pill (only when not compact); pass it only while it can do something. */\n onReconnect?: () => void\n labels?: Partial<OfflinePillLabels>\n /** Pill button id (default `offline-sync-status`). */\n 'data-testid'?: string\n /** Reconnect button id (default `offline-reconnect-button`). */\n reconnectTestId?: string\n}\n\nconst TONES: Record<OfflinePillTone, { className: string; Icon: typeof WifiOff }> = {\n offline: { className: 'bg-yellow-bg text-yellow-text', Icon: WifiOff },\n failed: { className: 'bg-red-bg text-red-text', Icon: TriangleAlert },\n syncing: { className: 'bg-blue-bg text-blue-text', Icon: RefreshCw },\n}\n\n/**\n * Connection + sync indicator: a status pill that opens the pending-changes list, plus an\n * optional Reconnect button beside it. The app renders it only when there is something to say\n * (offline, or changes waiting/failing), so online-and-synced stays clean.\n */\nexport function OfflinePill({\n tone,\n label,\n compact = false,\n onOpen,\n onReconnect,\n labels,\n 'data-testid': testId,\n reconnectTestId,\n}: OfflinePillProps) {\n const { className, Icon } = TONES[tone]\n return (\n <div\n className={cn('flex items-center gap-1', compact && 'justify-center')}\n data-slot=\"offline-pill\"\n >\n <button\n type=\"button\"\n data-testid={testIdOr(testId, { testId: 'offline-sync-status' })}\n aria-label={label}\n title={label}\n onClick={onOpen}\n className={cn(\n 'flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors hover:brightness-95 pointer-coarse:min-h-11',\n compact && 'flex-none justify-center',\n className\n )}\n >\n <Icon className={cn('size-4 shrink-0', tone === 'syncing' && 'animate-spin')} />\n {!compact && <span className=\"truncate\">{label}</span>}\n </button>\n {!compact && onReconnect && (\n // Forced visible (context true): there is no row to hover.\n <SidebarRowHoverContext.Provider value={true}>\n <SidebarRowAction\n label={labels?.reconnect ?? DEFAULT_OFFLINE_PILL_LABELS.reconnect}\n onClick={onReconnect}\n data-testid={testIdOr(reconnectTestId, { testId: 'offline-reconnect-button' })}\n >\n <RefreshCw className=\"size-5\" />\n </SidebarRowAction>\n </SidebarRowHoverContext.Provider>\n )}\n </div>\n )\n}\n","import { MousePointerClick, X } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { testIdOr } from '../chat/test-id'\n\n/** Fixed strings of the remote-control pill. */\nexport interface RemoteControlPillLabels {\n /** The disable button (the `disableLabel` prop wins). */\n turnOffRemoteControl: string\n}\n\nexport const DEFAULT_REMOTE_CONTROL_PILL_LABELS: RemoteControlPillLabels = {\n turnOffRemoteControl: 'Turn off remote control',\n}\n\nexport interface RemoteControlPillProps {\n /** A run is actively driving the screen (tinted + pulsing). */\n isActive: boolean\n label: string\n onDisable: () => void\n disableLabel?: string\n labels?: Partial<RemoteControlPillLabels>\n /** Root id (default `remote-control-indicator`). */\n 'data-testid'?: string\n /** Disable button id (default `remote-control-indicator-disable`). */\n disableTestId?: string\n}\n\n/**\n * Persistent, unobtrusive status pill shown while remote control is on or a run is executing,\n * with a one-click disable. The app decides when to mount it.\n */\nexport function RemoteControlPill({\n isActive,\n label,\n onDisable,\n disableLabel: disableLabelProp,\n labels,\n 'data-testid': testId,\n disableTestId,\n}: RemoteControlPillProps) {\n const disableLabel =\n disableLabelProp ??\n labels?.turnOffRemoteControl ??\n DEFAULT_REMOTE_CONTROL_PILL_LABELS.turnOffRemoteControl\n return (\n <div\n data-slot=\"remote-control-pill\"\n // Remote control's own control: a remote run never acts inside it.\n data-remote-control-surface=\"\"\n data-testid={testIdOr(testId, { testId: 'remote-control-indicator' })}\n className={cn(\n 'flex min-w-0 max-w-full items-center gap-1.5 rounded-full py-1 pl-2.5 pr-1 text-xs font-medium',\n isActive ? 'bg-accent text-accent-foreground' : 'bg-muted text-muted-foreground'\n )}\n >\n <MousePointerClick className={cn('size-3.5 shrink-0', isActive && 'animate-pulse')} />\n <span className=\"min-w-0 max-w-[16rem] truncate\">{label}</span>\n <button\n type=\"button\"\n onClick={onDisable}\n title={disableLabel}\n aria-label={disableLabel}\n data-testid={testIdOr(disableTestId, { testId: 'remote-control-indicator-disable' })}\n className=\"flex size-5 shrink-0 items-center justify-center rounded-full transition-colors hover:bg-foreground/10 hover:text-foreground pointer-coarse:size-8\"\n >\n <X className=\"size-3.5\" />\n </button>\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { ChevronLeft, ChevronRight, Lightbulb, Pencil, X } from 'lucide-react'\nimport { Button, cn } from '@arbidocs/react/ui'\nimport { testIdOr } from '../chat/test-id'\n\n/** Fixed strings of the tip card. */\nexport interface TipCardLabels {\n /** Default CTA text (the `ctaLabel` prop wins). */\n showMe: string\n previousTip: string\n nextTip: string\n editTip: string\n /** The card's heading and accessible name. */\n tip: string\n /** The dismiss button: it turns tips off (they come back from the account menu). */\n hideTips: string\n /** \"1 of 3\". */\n position: (index: number, count: number) => string\n}\n\nexport const DEFAULT_TIP_CARD_LABELS: TipCardLabels = {\n showMe: 'Show me',\n previousTip: 'Previous tip',\n nextTip: 'Next tip',\n editTip: 'Edit tip',\n tip: 'Tip',\n hideTips: 'Hide tips',\n position: (index, count) => `${index} of ${count}`,\n}\n\nexport interface TipCardProps {\n /** The tip text: one sentence. */\n message: ReactNode\n /** Which tip is showing (0-based) out of `count`; the pager appears when `count` > 1. */\n index?: number\n count?: number\n onPrev?: () => void\n onNext?: () => void\n /** The single primary action; omit when the tip has none. */\n ctaLabel?: string\n onCta?: () => void\n /** Turns tips off. The card is dismissible so it never becomes permanent furniture. */\n onDismiss?: () => void\n /** Dev-only edit affordance: the host passes it only in development builds. */\n onEdit?: () => void\n /** Hover pauses the host's tip rotation (desktop enhancement). */\n onHoverChange?: (hovered: boolean) => void\n labels?: Partial<TipCardLabels>\n className?: string\n /** Card id (default `tip-row`). */\n testId?: string\n /** Control ids; defaults are the current ids. */\n testIds?: Partial<Record<'prev' | 'next' | 'cta' | 'edit' | 'dismiss', string>>\n}\n\nconst ICON_BUTTON =\n 'flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:size-11'\n\n/**\n * The Smart Tips card: a compact muted tile. Header (bulb, \"Tip\", dismiss), one sentence, then\n * ONE primary action with a quiet \"n of m\" pager. It is shown only while tips are on and a tip\n * applies; the host owns which tip is current, rotation and the on/off preference.\n */\nexport function TipCard({\n message,\n index = 0,\n count = 1,\n onPrev,\n onNext,\n ctaLabel,\n onCta,\n onDismiss,\n onEdit,\n onHoverChange,\n labels,\n className,\n testId,\n testIds,\n}: TipCardProps) {\n const l = { ...DEFAULT_TIP_CARD_LABELS, ...labels }\n const hasMany = count > 1\n\n return (\n <section\n data-slot=\"tip-card\"\n aria-label={l.tip}\n className={cn('min-w-0 rounded-lg bg-muted p-3 text-sm', className)}\n onMouseEnter={() => onHoverChange?.(true)}\n onMouseLeave={() => onHoverChange?.(false)}\n data-testid={testIdOr(testId, { testId: 'tip-row' })}\n >\n <div className=\"-my-1 flex items-center gap-1.5 text-xs font-medium text-muted-foreground\">\n <Lightbulb className=\"size-4 shrink-0 text-primary\" aria-hidden />\n <span>{l.tip}</span>\n <span className=\"-mr-1.5 ml-auto flex items-center\">\n {onEdit && (\n <button\n type=\"button\"\n onClick={onEdit}\n aria-label={l.editTip}\n title={l.editTip}\n className={cn(ICON_BUTTON, 'text-red-text hover:bg-red-bg hover:text-red-text')}\n data-testid={testIdOr(testIds?.edit, { testId: 'tip-edit' })}\n >\n <Pencil className=\"size-3.5\" />\n </button>\n )}\n {onDismiss && (\n <button\n type=\"button\"\n onClick={onDismiss}\n aria-label={l.hideTips}\n title={l.hideTips}\n className={ICON_BUTTON}\n data-testid={testIdOr(testIds?.dismiss, { testId: 'tip-dismiss' })}\n >\n <X className=\"size-4\" />\n </button>\n )}\n </span>\n </div>\n <p className=\"mt-2 text-foreground\">{message}</p>\n {(onCta || hasMany) && (\n <div className=\"mt-3 flex items-center justify-between gap-2\">\n {onCta ? (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={onCta}\n className=\"font-medium text-primary\"\n data-testid={testIdOr(testIds?.cta, { testId: 'page-header-info-cta' })}\n >\n {ctaLabel ?? l.showMe}\n </Button>\n ) : (\n <span />\n )}\n {hasMany && (\n <span className=\"-mr-1.5 flex items-center text-xs text-muted-foreground\">\n <button\n type=\"button\"\n onClick={onPrev}\n aria-label={l.previousTip}\n title={l.previousTip}\n className={ICON_BUTTON}\n data-testid={testIdOr(testIds?.prev, { testId: 'tip-prev' })}\n >\n <ChevronLeft className=\"size-4\" />\n </button>\n <span className=\"min-w-10 text-center tabular-nums\" aria-live=\"polite\">\n {l.position(index + 1, count)}\n </span>\n <button\n type=\"button\"\n onClick={onNext}\n aria-label={l.nextTip}\n title={l.nextTip}\n className={ICON_BUTTON}\n data-testid={testIdOr(testIds?.next, { testId: 'tip-next' })}\n >\n <ChevronRight className=\"size-4\" />\n </button>\n </span>\n )}\n </div>\n )}\n </section>\n )\n}\n","/**\n * DockZone Component\n *\n * Layout wrapper that provides a resizable right-hand panel area (#dock-zone)\n * where panels in 'docked' mode render via PanelPortal.\n *\n * Uses MutationObserver on the #dock-zone element to detect when content is\n * portaled in/out, so the split layout appears only when a panel is actually\n * mounted — not just when the store says a panel prefers 'docked' mode.\n *\n * The dock zone reads its initial width from the child's data-dock-width\n * attribute (pixels). If absent, defaults to 50% of the container.\n *\n * Below MOBILE_BREAKPOINT_PX, MIN_MAIN_PX + MIN_DOCK_PX (500px combined)\n * can't both fit — the clamp math still ran unconditionally and squeezed the\n * dock pane down to whatever sliver was left (as little as ~90px on a 390px\n * phone), rendering both panes as unusable slivers instead of showing either\n * one properly. Below that width this becomes a single full-width view that\n * swaps between main and docked content instead of splitting — same\n * principle as the Document Viewer's own view-swap (Edit ⇄ Track Changes).\n */\n\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { cn } from '@arbidocs/react/ui'\n\nconst MIN_DOCK_PX = 200\nconst MIN_MAIN_PX = 300\n// Standard right-panel width — matches the overlay sheet (sm:w-[34rem]) so a\n// panel is the same size whether it's pinned or floating. Pinned stays\n// draggable from here; floating is fixed.\nconst DEFAULT_DOCK_PX = 544\nconst MOBILE_BREAKPOINT_PX = 640\n\ninterface DockZoneProps {\n children: React.ReactNode\n 'data-testid'?: string\n}\n\nexport function DockZone({ children, ...props }: DockZoneProps) {\n const [hasDockedContent, setHasDockedContent] = useState(false)\n const [dockWidth, setDockWidth] = useState<number | null>(null)\n const [isResizing, setIsResizing] = useState(false)\n const [dragPosition, setDragPosition] = useState<number | null>(null)\n const [containerWidth, setContainerWidth] = useState(0)\n const containerRef = useRef<HTMLDivElement>(null)\n const dockZoneRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const el = containerRef.current\n if (!el) return\n const observer = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width\n if (width !== undefined) setContainerWidth(width)\n })\n observer.observe(el)\n return () => observer.disconnect()\n }, [])\n\n const isMobile = containerWidth > 0 && containerWidth < MOBILE_BREAKPOINT_PX\n\n // Observe dock-zone children to know when content is actually portaled in\n // Also read initial width from the child's data-dock-width attribute\n useEffect(() => {\n const el = dockZoneRef.current\n if (!el) return\n\n const update = () => {\n const hasChildren = el.children.length > 0\n setHasDockedContent(hasChildren)\n if (hasChildren) {\n const requestedWidth = el.firstElementChild?.getAttribute('data-dock-width')\n if (requestedWidth) {\n setDockWidth(parseInt(requestedWidth, 10))\n }\n }\n }\n\n const observer = new MutationObserver(update)\n update()\n observer.observe(el, { childList: true })\n return () => observer.disconnect()\n }, [])\n\n const handleMouseDown = useCallback(() => {\n setIsResizing(true)\n setDragPosition(null)\n }, [])\n\n const handleMouseMove = useCallback(\n (e: MouseEvent) => {\n if (!isResizing || !containerRef.current) return\n const rect = containerRef.current.getBoundingClientRect()\n const x = e.clientX - rect.left\n // Clamp so neither pane gets too small\n const clamped = Math.min(Math.max(x, MIN_MAIN_PX), rect.width - MIN_DOCK_PX)\n setDragPosition(clamped)\n },\n [isResizing]\n )\n\n const handleMouseUp = useCallback(() => {\n if (dragPosition !== null && containerRef.current) {\n const containerWidth = containerRef.current.getBoundingClientRect().width\n setDockWidth(containerWidth - dragPosition)\n }\n setIsResizing(false)\n setDragPosition(null)\n }, [dragPosition])\n\n useEffect(() => {\n if (!isResizing) return\n document.addEventListener('mousemove', handleMouseMove)\n document.addEventListener('mouseup', handleMouseUp)\n document.body.style.cursor = 'col-resize'\n document.body.style.userSelect = 'none'\n return () => {\n document.removeEventListener('mousemove', handleMouseMove)\n document.removeEventListener('mouseup', handleMouseUp)\n document.body.style.cursor = ''\n document.body.style.userSelect = ''\n }\n }, [isResizing, handleMouseMove, handleMouseUp])\n\n // Below the mobile breakpoint there's no room to split at all — MIN_MAIN_PX\n // + MIN_DOCK_PX alone is 500px, wider than most phones. Show whichever\n // side is active at full width instead of squeezing both into slivers.\n const effectiveDockWidth =\n hasDockedContent && containerWidth > 0\n ? isMobile\n ? containerWidth\n : Math.min(\n Math.max(dockWidth ?? DEFAULT_DOCK_PX, MIN_DOCK_PX),\n containerWidth - MIN_MAIN_PX\n )\n : 0\n const mainHidden = isMobile && hasDockedContent\n\n return (\n <div ref={containerRef} className=\"h-full relative flex\" data-testid={props['data-testid']}>\n <div\n style={{\n width: mainHidden ? 0 : `calc(100% - ${effectiveDockWidth}px)`,\n // Reserve gutter space so the vertical scrollbar doesn't appear and\n // disappear as streaming content crosses the viewport boundary —\n // that toggle reflows the layout and reads as a screen-wide flicker.\n scrollbarGutter: 'stable',\n }}\n className={cn(\n // The CSS container for the page's @-variants (PageContainer must not be one; see there).\n '@container h-full overflow-auto',\n hasDockedContent && !isMobile && 'border-r',\n mainHidden && 'overflow-hidden',\n // Animate opening only. On close the portaled content has already\n // unmounted, so animating leaves an empty strip shrinking while the\n // page behind reflows — reads as flicker over heavy content like the\n // documents grid. Snap closed instead. Resizing is also instant so\n // the divider doesn't lag the cursor.\n hasDockedContent && !isResizing && 'transition-[width] duration-300 ease-in-out'\n )}\n aria-hidden={mainHidden}\n inert={mainHidden}\n data-scroll-container\n >\n {children}\n </div>\n\n {/* Wide grab zone with a visible grip, so the divider is findable and forgiving to hit */}\n {hasDockedContent && !isMobile && (\n <div\n className=\"group flex w-2 flex-shrink-0 cursor-col-resize items-center justify-center\"\n onMouseDown={handleMouseDown}\n data-testid=\"dock-resize-handle\"\n >\n <div className=\"h-12 w-1 rounded-full bg-muted-foreground/40 transition-colors group-hover:bg-primary\" />\n </div>\n )}\n\n <div\n ref={dockZoneRef}\n id=\"dock-zone\"\n style={{ width: effectiveDockWidth }}\n className={cn(\n 'h-full overflow-hidden flex-shrink-0',\n hasDockedContent && !isResizing && 'transition-[width] duration-300 ease-in-out'\n )}\n />\n\n {isResizing && dragPosition !== null && (\n <div\n className=\"absolute top-0 bottom-0 w-0.5 bg-primary z-50 pointer-events-none\"\n style={{ left: dragPosition }}\n />\n )}\n {isResizing && <div className=\"absolute inset-0 z-40 cursor-col-resize\" />}\n </div>\n )\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/chat/mermaid-normalize.ts","../src/connection/conversation/MermaidDiagram.tsx","../src/connection/conversation/DocumentWorkspaceContext.tsx","../src/connection/conversation/ConnectedMarkdown.tsx"],"names":["useState","useId","useEffect","jsxs","jsx","createContext","useContext","useBlocksEnvironment","React","useArbiSession","MentionChip","QuietLink","useArbiHost","Fragment","useCompactChat","useDocument","EntityPill","FileText","DocumentEntity","Mail","mentionFromHref","MarkdownLink","workspaceDocIdFromHref","MarkdownStreamingContext","MarkdownCode","rehypeDocEntityPills","useMemo","KitMarkdownRenderer"],"mappings":";;;;;;;;;;;;;;;;;;;AAsBO,SAAS,sBAAsB,MAAA,EAAwB;AAE5D,EAAA,IAAI,IAAA,CAAK,IAAA,CAAK,MAAM,CAAA,EAAG,OAAO,MAAA;AAE9B,EAAA,MAAM,WAAA,GAAc,MAAA,CAAO,KAAA,CAAM,gCAAgC,CAAA;AACjE,EAAA,IAAI,CAAC,aAAa,OAAO,MAAA;AAEzB,EAAA,MAAM,MAAA,GAAS,WAAA,CAAY,CAAC,CAAA,CAAE,OAAA,EAAQ;AACtC,EAAA,IAAI,OAAO,MAAA,CAAO,KAAA,CAAM,WAAA,CAAY,CAAC,EAAE,MAAM,CAAA;AAG7C,EAAA,IAAA,GAAO,IAAA,CAAK,OAAA,CAAQ,uDAAA,EAAyD,OAAO,CAAA;AAIpF,EAAA,IAAA,GAAO,IAAA,CAAK,OAAA,CAAQ,cAAA,EAAgB,SAAS,CAAA;AA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M,MAAA,GAASC,aAAA;AAAA,IACb,MACE,UAAA,GACI,EAAE,GAAG,8BAAA,EAAgC,GAAG,YAAW,GACnD,8BAAA;AAAA,IACN,CAAC,UAAU;AAAA,GACb;AACA,EAAA,uBACEtB,eAACuB,mBAAA,EAAA,EAAqB,GAAG,OAAO,UAAA,EAAY,MAAA,EAAQ,eAAe,yBAAA,EAA2B,CAAA;AAElG;AAEO,IAAM,iBAAA,GAAoBnB,sBAAA,CAAM,IAAA,CAAK,0BAA0B","file":"chunk-KXIRVKCJ.cjs","sourcesContent":["/**\n * Defensive normalizer for single-line `graph` / `flowchart` Mermaid source.\n *\n * Some LLMs emit the entire diagram on one line. Mermaid's parser splits\n * statements on newlines, so a single-line graph fails outright. This helper\n * inserts newlines on safe statement boundaries so the diagram has a chance\n * of parsing. Only attempts normalization when:\n * 1. The source has no embedded newlines (i.e. is genuinely single-line), and\n * 2. The first directive is `graph` or `flowchart`.\n *\n * Other diagram types (sequenceDiagram, classDiagram, gantt, …) have very\n * different syntaxes — applying these heuristics to them would corrupt valid\n * input, so they're left untouched.\n *\n * Boundaries we split on:\n * - After the diagram-type header (`graph TD`, `flowchart LR`, …).\n * - Before each `style` / `classDef` / `class` / `linkStyle` / `click`\n * / `subgraph` keyword.\n * - Before/after `end` (closes a subgraph block).\n * - After a `]` (label close) that's followed by another node identifier\n * starting a new edge or node declaration.\n */\nexport function normalizeMermaidGraph(source: string): string {\n // Already multi-line — assume it's well-formed; don't touch it.\n if (/\\n/.test(source)) return source\n\n const headerMatch = source.match(/^\\s*(graph|flowchart)\\s+\\w+\\s+/)\n if (!headerMatch) return source\n\n const header = headerMatch[0].trimEnd()\n let body = source.slice(headerMatch[0].length)\n\n // Insert newline before keywords that always start a new statement.\n body = body.replace(/\\s+(style|classDef|class|linkStyle|click|subgraph)\\s/g, '\\n$1 ')\n\n // `end` closes a subgraph: put it on its own line, with a break after it\n // too so any trailing statements don't stay attached.\n body = body.replace(/\\s+end\\b\\s*/g, '\\nend\\n')\n\n // After a label close (`]`), if the next token looks like a Mermaid node id\n // followed by another `[` or `-->`, that's a new statement starting.\n body = body.replace(/\\]\\s+(?=[A-Za-z_][\\w-]*\\s*(?:\\[|-->))/g, ']\\n')\n\n // Collapse any accidental runs of blank lines we may have produced.\n body = body.replace(/\\n{2,}/g, '\\n')\n\n return `${header}\\n${body.trimStart()}`\n}\n","/**\n * MermaidDiagram Component\n *\n * Renders a Mermaid diagram from source code.\n * Used inside MarkdownRenderer to handle ```mermaid code blocks.\n * Lazy-loads the mermaid library to avoid bloating the initial bundle.\n */\n\nimport { useState, useEffect, useId } from 'react'\nimport { normalizeMermaidGraph } from '../../chat/mermaid-normalize'\n\ninterface MermaidDiagramProps {\n /** Mermaid diagram source code */\n chart: string\n}\n\n// Lazy-load and initialize mermaid once\nlet mermaidInstance: typeof import('mermaid').default | null = null\nlet mermaidLoadPromise: Promise<typeof import('mermaid').default> | null = null\n\nasync function getMermaid() {\n if (mermaidInstance) return mermaidInstance\n if (!mermaidLoadPromise) {\n mermaidLoadPromise = import('mermaid').then((mod) => {\n const m = mod.default\n m.initialize({\n startOnLoad: false,\n theme: 'default',\n securityLevel: 'strict',\n flowchart: { useMaxWidth: true, curve: 'basis' },\n })\n mermaidInstance = m\n return m\n })\n }\n return mermaidLoadPromise\n}\n\nexport function MermaidDiagram({ chart }: MermaidDiagramProps) {\n const [svg, setSvg] = useState<string | null>(null)\n const [error, setError] = useState<string | null>(null)\n const uniqueId = useId().replace(/:/g, '-')\n\n useEffect(() => {\n let cancelled = false\n\n async function render() {\n const mermaid = await getMermaid()\n const diagramId = `mermaid${uniqueId}`\n\n // Validate with parse() before render(). In Mermaid v11 a render() with\n // bad source can return a \"Syntax error in text\" bomb SVG instead of\n // throwing — and it appends DOM side-effects of its own — so a try/catch\n // around render() doesn't reliably catch failures and the bomb leaks\n // into the page (especially under React StrictMode where effects run\n // twice). parse() throws cleanly with no DOM side-effects.\n //\n // Defensive rescue: some LLMs emit single-line `graph`/`flowchart`\n // source. If the original parse fails, try a normalized variant. The\n // normalizer is a no-op on already-multi-line source and on non-graph\n // diagram types, so this only helps the bad-source case and never\n // corrupts valid input.\n let validSource: string | null = null\n let firstErr: unknown\n try {\n await mermaid.parse(chart)\n validSource = chart\n } catch (err) {\n firstErr = err\n const normalized = normalizeMermaidGraph(chart)\n if (normalized !== chart) {\n try {\n await mermaid.parse(normalized)\n validSource = normalized\n } catch (retryErr) {\n console.warn('Mermaid normalized parse also failed', retryErr)\n }\n }\n }\n\n if (cancelled) return\n\n if (!validSource) {\n console.warn('Mermaid parse failed, showing source', firstErr)\n setError('Failed to render diagram')\n setSvg(null)\n return\n }\n\n try {\n const { svg: renderedSvg } = await mermaid.render(diagramId, validSource)\n if (!cancelled) {\n setSvg(renderedSvg)\n setError(null)\n }\n } catch (renderErr) {\n if (!cancelled) {\n console.warn('Mermaid render failed despite parse success', renderErr)\n setError('Failed to render diagram')\n setSvg(null)\n }\n }\n }\n\n render()\n return () => {\n cancelled = true\n }\n }, [chart, uniqueId])\n\n if (error) {\n // Fall back to showing the raw source in a code block\n return (\n <div className=\"code-block\" data-testid=\"mermaid-error\">\n <div className=\"text-sm text-muted-foreground mb-1\">{error}</div>\n <code className=\"language-mermaid\">{chart}</code>\n </div>\n )\n }\n\n if (!svg) {\n return (\n <div\n className=\"flex items-center justify-center py-8 text-muted-foreground text-sm\"\n data-testid=\"mermaid-loading\"\n >\n Rendering diagram...\n </div>\n )\n }\n\n return (\n <div\n className=\"mermaid-diagram my-4 overflow-x-auto rounded-md border border-border bg-background p-4\"\n data-testid=\"mermaid-diagram\"\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n )\n}\n","/**\n * The workspace a conversation's document references belong to, when it is not the open one: an\n * agent's direct-message thread runs in the agent's workspace, so the documents it names are there.\n * A reference then opens that workspace first (`openDocument(id, { workspaceId })`).\n */\n\nimport { createContext, useContext, type ReactNode } from 'react'\nimport { useBlocksEnvironment } from '../../provider/environment'\n\n/** The workspace of the documents referenced inside it (null: the open workspace). */\nexport const DocumentWorkspaceContext = createContext<string | null>(null)\nexport const useDocumentWorkspace = () => useContext(DocumentWorkspaceContext)\n\n/** A reference to a document of another workspace: opening it opens that workspace first. */\nexport function WorkspaceDocumentReference({\n workspaceId,\n docId,\n children,\n className = 'inline-flex rounded-full border px-2 py-0.5 text-xs hover:bg-muted',\n}: {\n workspaceId: string\n docId: string\n children?: ReactNode\n className?: string\n}) {\n const { openDocument } = useBlocksEnvironment()\n return (\n <button\n type=\"button\"\n className={className}\n onClick={() => openDocument(docId, { workspaceId })}\n >\n {children ?? docId}\n </button>\n )\n}\n","/**\n * The conversation's markdown: the kit's `MarkdownRenderer` (`@arbidocs/react`: sanitised HTML,\n * slugs, lazy KaTeX, streaming blocks, tables, code) with what a conversation adds: @mention chips,\n * workspace documents opening in the viewer, quiet external links, document and email pills (the\n * host's chips, `ArbiChatHost.renderDocumentChip` / `renderMailChip`) and Mermaid diagrams.\n */\nimport { useArbiHost, useArbiSession, useDocument } from '@arbidocs/react'\nimport { mentionFromHref, type MentionKind } from '@arbidocs/react/shell'\nimport {\n EntityPill,\n getDocumentTitle,\n MarkdownCode,\n MarkdownLink,\n MarkdownRenderer as KitMarkdownRenderer,\n MarkdownStreamingContext,\n type MarkdownRendererProps as KitMarkdownRendererProps,\n DocumentEntity,\n} from '@arbidocs/react/ui'\nimport React, { useContext, useMemo } from 'react'\nimport { FileText, Mail } from 'lucide-react'\n\n/** The markdown element overrides, as the kit's renderer takes them. */\ntype Components = NonNullable<KitMarkdownRendererProps['components']>\nimport { useCompactChat } from '../../chat/CompactChatContext'\nimport { MentionChip } from '../../chat/MentionMenu'\nimport { QuietLink } from '../../citations/QuietMarks'\nimport { rehypeDocEntityPills } from '../../chat/rehype-doc-entity-pills'\nimport { workspaceDocIdFromHref } from '../../chat/doc-links'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { MermaidDiagram } from './MermaidDiagram'\nimport { useDocumentWorkspace, WorkspaceDocumentReference } from './DocumentWorkspaceContext'\n\n/** Plain text of a link's children (the `@Label` of a mention link). */\nfunction childrenText(children: React.ReactNode): string {\n return React.Children.toArray(children)\n .map((child) => (typeof child === 'string' || typeof child === 'number' ? String(child) : ''))\n .join('')\n}\n\n/** A mention chip; a mention of the reader stands out. */\nfunction MentionLink({ kind, id, text }: { kind: MentionKind; id: string; text: string }) {\n const currentUserId = useArbiSession().user?.external_id\n return (\n <MentionChip\n kind={kind}\n id={id}\n label={text.replace(/^@/, '')}\n isSelf={kind === 'user' && id === currentUserId}\n />\n )\n}\n\n/**\n * A link to elsewhere, as quiet text. Its menu (Open link / Copy link) is the deliberate step\n * the old confirmation dialog used to be; nothing opens until the menu's primary row is chosen.\n */\nexport function ExternalLink({ href, children }: React.ComponentPropsWithoutRef<'a'>) {\n return (\n <QuietLink href={href} kind=\"external\">\n {children}\n </QuietLink>\n )\n}\n\n/**\n * A workspace document referenced by a link's href rather than by its text.\n *\n * `rehypeDocEntityPills` turns a bare `doc-…` id into a pill, but it only walks\n * TEXT nodes — so `[NVDA DCF Valuation Report](…doc-abc12345…)`, which is how an\n * answer links an artifact it just saved, keeps the id in the href where the\n * plugin never looks. The link then fell through to `ExternalLink`, and opening\n * your own workspace document asked you to confirm an \"external link\" and\n * launched a new tab. It opens in the document viewer, like the pill and the\n * artifact card already do.\n */\nexport function InternalDocLink({\n docId,\n href,\n children,\n}: React.ComponentPropsWithoutRef<'a'> & { docId: string }) {\n const { openDocument } = useBlocksEnvironment()\n const workspaceId = useDocumentWorkspace()\n if (workspaceId) {\n return (\n <WorkspaceDocumentReference workspaceId={workspaceId} docId={docId}>\n {children}\n </WorkspaceDocumentReference>\n )\n }\n\n return (\n <QuietLink href={href} kind=\"document\" onOpen={() => openDocument(docId)}>\n {children}\n </QuietLink>\n )\n}\n\n/** A document of the workspace, as a pill: the host's chip, else the document entity. */\nexport function DocumentChip({ docId }: { docId: string }) {\n const render = useArbiHost().chat?.renderDocumentChip\n const workspaceId = useDocumentWorkspace()\n if (workspaceId) return <WorkspaceDocumentReference workspaceId={workspaceId} docId={docId} />\n return render ? <>{render(docId)}</> : <DefaultDocumentChip docId={docId} />\n}\n\nfunction DefaultDocumentChip({ docId }: { docId: string }) {\n const compact = useCompactChat()\n const { data: doc } = useDocument(docId)\n const { openDocument } = useBlocksEnvironment()\n if (compact && doc)\n return (\n <button\n type=\"button\"\n className=\"inline text-left text-primary underline decoration-primary/30 underline-offset-2 hover:decoration-primary\"\n onClick={() => openDocument(docId)}\n >\n {getDocumentTitle(doc)}\n </button>\n )\n if (!doc)\n return (\n <EntityPill\n icon={<FileText className=\"w-3.5 h-3.5 flex-shrink-0\" />}\n label={docId}\n size=\"sm\"\n onClick={() => openDocument(docId)}\n data-testid=\"doc-entity-pill\"\n />\n )\n return (\n <DocumentEntity doc={doc} onClick={() => openDocument(docId)} data-testid=\"doc-entity-pill\" />\n )\n}\n\n/** An email of the person's mailbox, as a pill: the host's chip, else a plain \"Email\". */\nfunction MailChip({ mailId }: { mailId: string }) {\n const render = useArbiHost().chat?.renderMailChip\n if (render) return <>{render(mailId)}</>\n return (\n <EntityPill\n icon={<Mail className=\"w-3.5 h-3.5 flex-shrink-0\" />}\n label=\"Email\"\n size=\"sm\"\n data-testid=\"mail-entity-pill\"\n />\n )\n}\n\n/**\n * The conversation's overrides, layered on the kit's defaults. Module scope, so the reference is stable\n * and memoised markdown blocks do not re-parse.\n */\nconst conversationMarkdownComponents: Partial<Components> = {\n a: function ConversationMarkdownLink({\n href,\n children,\n ...props\n }: React.ComponentPropsWithoutRef<'a'>) {\n const deploymentDomain = useBlocksEnvironment().runtimeConfig.deploymentDomain\n // @mentions: `linkMentions` turned them into `#mention-<id>` links; draw them as chips.\n const mention = mentionFromHref(href)\n if (mention) {\n return <MentionLink kind={mention.kind} id={mention.id} text={childrenText(children)} />\n }\n // Bookmarks: in-page anchors are near-invisible text; the menu jumps or copies the place.\n if (href?.startsWith('#') && !href.startsWith('#cite-')) {\n return (\n <QuietLink href={href} kind=\"anchor\">\n {children}\n </QuietLink>\n )\n }\n // Citations, `cite:` references and bare links: the kit's link.\n if (!href || href.startsWith('#') || href.startsWith('cite:')) {\n return (\n <MarkdownLink href={href} {...props}>\n {children}\n </MarkdownLink>\n )\n }\n // A workspace document is not an external link, wherever it is hosted: it opens in the viewer.\n const docId = workspaceDocIdFromHref(href, deploymentDomain)\n if (docId) {\n return (\n <InternalDocLink docId={docId} href={href} {...props}>\n {children}\n </InternalDocLink>\n )\n }\n return (\n <ExternalLink href={href} {...props}>\n {children}\n </ExternalLink>\n )\n },\n code: function ConversationMarkdownCode(\n props: React.ComponentPropsWithoutRef<'code'> & { inline?: boolean }\n ) {\n const isStreaming = useContext(MarkdownStreamingContext)\n const { className, children } = props\n const language = /language-(\\w+)/.exec(className || '')?.[1]\n if (!language) {\n // Answers often backtick a bare doc id (`doc-f7b3eeb5`). The text-node pass skips code, so\n // the id would stay monospace text; show it as the document pill. Only a whole id (eight\n // alphanumerics): while streaming, a partial one (\"doc-e\") would be looked up and 404.\n const codeText = typeof children === 'string' ? children.trim() : ''\n if (/^doc-[a-zA-Z0-9]{8}$/.test(codeText)) return <DocumentChip docId={codeText} />\n if (/^eml-[a-zA-Z0-9]{8}$/.test(codeText)) return <MailChip mailId={codeText} />\n }\n // Mermaid lazy-loads its own bundle and re-renders SVG on every change. While streaming the\n // fence is almost always partial, so it stays a code block until generation completes.\n if (language === 'mermaid' && !isStreaming) {\n return <MermaidDiagram chart={String(children).replace(/\\n$/, '')} />\n }\n return <MarkdownCode {...props} />\n },\n span: ({ children, className, ...props }: React.ComponentPropsWithoutRef<'span'>) => {\n const docId = (props as Record<string, unknown>)['data-doc-id'] as string | undefined\n if (docId) return <DocumentChip docId={docId} />\n const mailId = (props as Record<string, unknown>)['data-mail-id'] as string | undefined\n if (mailId) return <MailChip mailId={mailId} />\n return (\n <span className={className} {...props}>\n {children}\n </span>\n )\n },\n}\n\n/** Bare `doc-…` / `eml-…` ids in text become `<span data-doc-id>` / `<span data-mail-id>` pills. */\nconst conversationRehypePlugins = [rehypeDocEntityPills]\n\nexport type ConnectedMarkdownProps = Omit<\n KitMarkdownRendererProps,\n 'rehypePlugins' | 'allowHtml' | 'renderCitation'\n>\n\n/**\n * The kit's renderer with the conversation's overrides; a caller's `components` (e.g. the citation\n * core's) still win over both.\n */\nfunction ConnectedMarkdownComponent({ components, ...props }: ConnectedMarkdownProps) {\n const merged = useMemo(\n () =>\n components\n ? { ...conversationMarkdownComponents, ...components }\n : conversationMarkdownComponents,\n [components]\n )\n return (\n <KitMarkdownRenderer {...props} components={merged} rehypePlugins={conversationRehypePlugins} />\n )\n}\n\nexport const ConnectedMarkdown = React.memo(ConnectedMarkdownComponent)\n"]}
|
package/dist/chunk-OALQGO5C.cjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var chunk6B4CCDDB_cjs = require('./chunk-6B4CCDDB.cjs');
|
|
5
|
-
var chunkLOB2ATS5_cjs = require('./chunk-LOB2ATS5.cjs');
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
|
|
8
|
-
function ConnectedStreamedWordArtifact({
|
|
9
|
-
fontBaseUrl,
|
|
10
|
-
...props
|
|
11
|
-
}) {
|
|
12
|
-
const adapter = chunkLOB2ATS5_cjs.useConnectedNativeDocxAdapter(fontBaseUrl);
|
|
13
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunk6B4CCDDB_cjs.StreamedWordArtifact, { ...props, adapter });
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
exports.ConnectedStreamedWordArtifact = ConnectedStreamedWordArtifact;
|
|
17
|
-
//# sourceMappingURL=chunk-OALQGO5C.cjs.map
|
|
18
|
-
//# sourceMappingURL=chunk-OALQGO5C.cjs.map
|