@arbidocs/blocks 0.4.165 → 0.4.166
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/{ConnectedNativeDocxComparison-7WXIDRDY.js → ConnectedNativeDocxComparison-MSX6OCMN.js} +16 -16
- package/dist/{ConnectedNativeDocxComparison-7WXIDRDY.js.map → ConnectedNativeDocxComparison-MSX6OCMN.js.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-XV2UHRBQ.cjs → ConnectedNativeDocxComparison-S4XHG3XN.cjs} +17 -17
- package/dist/{ConnectedNativeDocxComparison-XV2UHRBQ.cjs.map → ConnectedNativeDocxComparison-S4XHG3XN.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-Z7KSH5RK.cjs → ConnectedNativeDocxEditor-4G7LNREO.cjs} +16 -16
- package/dist/{ConnectedNativeDocxEditor-Z7KSH5RK.cjs.map → ConnectedNativeDocxEditor-4G7LNREO.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-X3FEGMRT.js → ConnectedNativeDocxEditor-CTWKXXQQ.js} +14 -14
- package/dist/{ConnectedNativeDocxEditor-X3FEGMRT.js.map → ConnectedNativeDocxEditor-CTWKXXQQ.js.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-UNZIAYWQ.cjs → ConnectedStreamedWordArtifact-DQGOIULU.cjs} +17 -17
- package/dist/ConnectedStreamedWordArtifact-DQGOIULU.cjs.map +1 -0
- package/dist/{ConnectedStreamedWordArtifact-JV56WYWK.js → ConnectedStreamedWordArtifact-HIILV2RB.js} +16 -16
- package/dist/{ConnectedStreamedWordArtifact-JV56WYWK.js.map → ConnectedStreamedWordArtifact-HIILV2RB.js.map} +1 -1
- package/dist/{NativeDocxEditor-WAUI2YRU.cjs → NativeDocxEditor-T2PJIZMU.cjs} +8 -8
- package/dist/{NativeDocxEditor-WAUI2YRU.cjs.map → NativeDocxEditor-T2PJIZMU.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-XEDC4UFE.js → NativeDocxEditor-TBTBD6TC.js} +4 -4
- package/dist/{NativeDocxEditor-XEDC4UFE.js.map → NativeDocxEditor-TBTBD6TC.js.map} +1 -1
- package/dist/{WorkspaceTableView-QVOLTH5Z.js → WorkspaceTableView-CJ3QPV2X.js} +10 -10
- package/dist/{WorkspaceTableView-QVOLTH5Z.js.map → WorkspaceTableView-CJ3QPV2X.js.map} +1 -1
- package/dist/{WorkspaceTableView-OMBC2G5K.cjs → WorkspaceTableView-VEW6SMZ6.cjs} +12 -12
- package/dist/{WorkspaceTableView-OMBC2G5K.cjs.map → WorkspaceTableView-VEW6SMZ6.cjs.map} +1 -1
- package/dist/agents/index.cjs +270 -270
- package/dist/agents/index.js +13 -13
- package/dist/calls/index.cjs +1 -1
- package/dist/calls/index.js +1 -1
- package/dist/chat/index.cjs +140 -140
- package/dist/chat/index.js +6 -6
- package/dist/{chunk-R2N5VIVI.cjs → chunk-3VW7ZXQ6.cjs} +4 -4
- package/dist/{chunk-R2N5VIVI.cjs.map → chunk-3VW7ZXQ6.cjs.map} +1 -1
- package/dist/{chunk-HCAXURWO.cjs → chunk-4GITK3Q5.cjs} +3 -3
- package/dist/{chunk-HCAXURWO.cjs.map → chunk-4GITK3Q5.cjs.map} +1 -1
- package/dist/{chunk-A7HNGO5F.js → chunk-4MFSGPEH.js} +3 -3
- package/dist/{chunk-A7HNGO5F.js.map → chunk-4MFSGPEH.js.map} +1 -1
- package/dist/{chunk-C45WOKZW.cjs → chunk-5A2QQAF5.cjs} +3 -3
- package/dist/{chunk-C45WOKZW.cjs.map → chunk-5A2QQAF5.cjs.map} +1 -1
- package/dist/{chunk-C3GS4WQE.cjs → chunk-5C7DRQQE.cjs} +4 -4
- package/dist/{chunk-C3GS4WQE.cjs.map → chunk-5C7DRQQE.cjs.map} +1 -1
- package/dist/{chunk-HQYN5EFX.js → chunk-5WLORPGX.js} +3 -3
- package/dist/{chunk-HQYN5EFX.js.map → chunk-5WLORPGX.js.map} +1 -1
- package/dist/{chunk-YG3BXG5M.js → chunk-6E5XJC6L.js} +4 -4
- package/dist/{chunk-YG3BXG5M.js.map → chunk-6E5XJC6L.js.map} +1 -1
- package/dist/{chunk-HDJSU5IS.js → chunk-6XIXNH26.js} +3 -3
- package/dist/{chunk-HDJSU5IS.js.map → chunk-6XIXNH26.js.map} +1 -1
- package/dist/{chunk-OGQSYL3P.cjs → chunk-AODZXDEE.cjs} +12 -12
- package/dist/{chunk-OGQSYL3P.cjs.map → chunk-AODZXDEE.cjs.map} +1 -1
- package/dist/{chunk-V24UHHL4.cjs → chunk-APNFKXQ5.cjs} +61 -61
- package/dist/{chunk-V24UHHL4.cjs.map → chunk-APNFKXQ5.cjs.map} +1 -1
- package/dist/{chunk-EJHJQKUF.js → chunk-AVXRXPII.js} +3 -3
- package/dist/{chunk-EJHJQKUF.js.map → chunk-AVXRXPII.js.map} +1 -1
- package/dist/{chunk-YMWMVV4H.cjs → chunk-AYJZRBHG.cjs} +4 -4
- package/dist/{chunk-YMWMVV4H.cjs.map → chunk-AYJZRBHG.cjs.map} +1 -1
- package/dist/{chunk-HZJQQVKL.js → chunk-BGXWPVHR.js} +3 -3
- package/dist/{chunk-HZJQQVKL.js.map → chunk-BGXWPVHR.js.map} +1 -1
- package/dist/{chunk-2NTQH63V.js → chunk-DIPB7UR2.js} +12 -12
- package/dist/{chunk-2NTQH63V.js.map → chunk-DIPB7UR2.js.map} +1 -1
- package/dist/chunk-ECQR3VPP.cjs +18 -0
- package/dist/{chunk-OSWZ4K34.cjs.map → chunk-ECQR3VPP.cjs.map} +1 -1
- package/dist/{chunk-MPXUHCEV.cjs → chunk-ETJFC6MO.cjs} +4 -4
- package/dist/{chunk-MPXUHCEV.cjs.map → chunk-ETJFC6MO.cjs.map} +1 -1
- package/dist/{chunk-YNLWAD57.cjs → chunk-GFVIFXWT.cjs} +5 -5
- package/dist/{chunk-YNLWAD57.cjs.map → chunk-GFVIFXWT.cjs.map} +1 -1
- package/dist/{chunk-KCIYZ76I.js → chunk-GWSGIZQ5.js} +3 -3
- package/dist/{chunk-KCIYZ76I.js.map → chunk-GWSGIZQ5.js.map} +1 -1
- package/dist/{chunk-QARJQJAX.js → chunk-J7YHBMBB.js} +3 -3
- package/dist/{chunk-QARJQJAX.js.map → chunk-J7YHBMBB.js.map} +1 -1
- package/dist/{chunk-SLLNLFFP.js → chunk-JTJCCL2E.js} +4 -4
- package/dist/{chunk-SLLNLFFP.js.map → chunk-JTJCCL2E.js.map} +1 -1
- package/dist/{chunk-6RKMFTUJ.js → chunk-KBOA5UFJ.js} +8 -8
- package/dist/{chunk-6RKMFTUJ.js.map → chunk-KBOA5UFJ.js.map} +1 -1
- package/dist/{chunk-FPFMKSSB.js → chunk-KM7P35MJ.js} +3 -3
- package/dist/{chunk-FPFMKSSB.js.map → chunk-KM7P35MJ.js.map} +1 -1
- package/dist/{chunk-UKKTT3JE.js → chunk-KNCJSPXV.js} +6 -6
- package/dist/{chunk-UKKTT3JE.js.map → chunk-KNCJSPXV.js.map} +1 -1
- package/dist/{chunk-XBTOPW6B.js → chunk-KS5VQKI2.js} +4 -4
- package/dist/{chunk-XBTOPW6B.js.map → chunk-KS5VQKI2.js.map} +1 -1
- package/dist/{chunk-WE5DABTC.cjs → chunk-LMQOTLG4.cjs} +3 -3
- package/dist/{chunk-WE5DABTC.cjs.map → chunk-LMQOTLG4.cjs.map} +1 -1
- package/dist/{chunk-XA6QWXOQ.js → chunk-MXD2R4HR.js} +4 -4
- package/dist/{chunk-XA6QWXOQ.js.map → chunk-MXD2R4HR.js.map} +1 -1
- package/dist/{chunk-WLFMHGHK.cjs → chunk-NS7NVX4E.cjs} +6 -6
- package/dist/{chunk-WLFMHGHK.cjs.map → chunk-NS7NVX4E.cjs.map} +1 -1
- package/dist/{chunk-JB4EXO3V.cjs → chunk-NUAC5GTQ.cjs} +6 -6
- package/dist/{chunk-JB4EXO3V.cjs.map → chunk-NUAC5GTQ.cjs.map} +1 -1
- package/dist/{chunk-HHNYVJV3.cjs → chunk-OHCYJFV2.cjs} +7 -7
- package/dist/{chunk-HHNYVJV3.cjs.map → chunk-OHCYJFV2.cjs.map} +1 -1
- package/dist/{chunk-M7C4FHLU.cjs → chunk-PTSTVYQD.cjs} +12 -12
- package/dist/{chunk-M7C4FHLU.cjs.map → chunk-PTSTVYQD.cjs.map} +1 -1
- package/dist/{chunk-6SOWJFWJ.js → chunk-RMJ6DH7F.js} +4 -4
- package/dist/{chunk-6SOWJFWJ.js.map → chunk-RMJ6DH7F.js.map} +1 -1
- package/dist/{chunk-ZSDL36BI.js → chunk-RY2SODRN.js} +4 -4
- package/dist/{chunk-ZSDL36BI.js.map → chunk-RY2SODRN.js.map} +1 -1
- package/dist/chunk-SG3OH7ZM.cjs +18 -0
- package/dist/{chunk-PMHAJRKF.cjs.map → chunk-SG3OH7ZM.cjs.map} +1 -1
- package/dist/{chunk-X6Z6IWRY.cjs → chunk-SYTZ3UAU.cjs} +6 -6
- package/dist/{chunk-X6Z6IWRY.cjs.map → chunk-SYTZ3UAU.cjs.map} +1 -1
- package/dist/{chunk-AXCTDWFH.cjs → chunk-TNESYDBR.cjs} +3 -3
- package/dist/{chunk-AXCTDWFH.cjs.map → chunk-TNESYDBR.cjs.map} +1 -1
- package/dist/{chunk-GMJZ4FO7.js → chunk-TWVXDRLH.js} +4 -4
- package/dist/{chunk-GMJZ4FO7.js.map → chunk-TWVXDRLH.js.map} +1 -1
- package/dist/{chunk-I4HFM5HB.js → chunk-UORU5S7Y.js} +3 -3
- package/dist/{chunk-I4HFM5HB.js.map → chunk-UORU5S7Y.js.map} +1 -1
- package/dist/{chunk-VTTDCHBZ.js → chunk-XER3JLC7.js} +3 -3
- package/dist/{chunk-VTTDCHBZ.js.map → chunk-XER3JLC7.js.map} +1 -1
- package/dist/{chunk-VIV56KDN.cjs → chunk-XGFNZTPO.cjs} +4 -4
- package/dist/{chunk-VIV56KDN.cjs.map → chunk-XGFNZTPO.cjs.map} +1 -1
- package/dist/{chunk-IHPQO2TG.cjs → chunk-YNSSIULM.cjs} +5 -5
- package/dist/{chunk-IHPQO2TG.cjs.map → chunk-YNSSIULM.cjs.map} +1 -1
- package/dist/{chunk-5BKVKWKQ.js → chunk-ZPE7334Z.js} +6 -6
- package/dist/{chunk-5BKVKWKQ.js.map → chunk-ZPE7334Z.js.map} +1 -1
- package/dist/{chunk-2MX3RAF4.cjs → chunk-ZV4DNZ5N.cjs} +11 -11
- package/dist/{chunk-2MX3RAF4.cjs.map → chunk-ZV4DNZ5N.cjs.map} +1 -1
- package/dist/citations/index.cjs +1 -1
- package/dist/citations/index.js +1 -1
- package/dist/connect/docx.cjs +20 -20
- package/dist/connect/docx.js +16 -16
- package/dist/connect/index.cjs +681 -681
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +36 -36
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/viewer.cjs +70 -70
- package/dist/connect/viewer.js +19 -19
- package/dist/connection/ConnectedWorkflowsTable.d.ts +1 -0
- package/dist/connection/workspace-list/useConnectedWorkspaceList.d.ts +2 -0
- package/dist/connection/workspace-settings/useConnectedWorkspaceSettings.d.ts +4 -0
- package/dist/document-tools/index.cjs +20 -20
- package/dist/document-tools/index.js +3 -3
- package/dist/docx/index.cjs +51 -51
- package/dist/docx/index.js +4 -4
- package/dist/facts/index.cjs +58 -58
- package/dist/facts/index.js +8 -8
- package/dist/files/index.cjs +241 -241
- package/dist/files/index.js +9 -9
- package/dist/home/index.cjs +30 -30
- package/dist/home/index.js +5 -5
- package/dist/index.cjs +920 -920
- package/dist/index.js +24 -24
- package/dist/retrieval/index.cjs +1 -1
- package/dist/retrieval/index.js +1 -1
- package/dist/settings/index.cjs +174 -174
- package/dist/settings/index.js +5 -5
- package/dist/shell/index.cjs +12 -12
- package/dist/shell/index.js +4 -4
- package/dist/studio/index.cjs +7 -7
- package/dist/studio/index.js +6 -6
- package/dist/workflow-canvas/index.cjs +26 -26
- package/dist/workflow-canvas/index.js +13 -13
- package/dist/workspaces/index.cjs +2 -2
- package/dist/workspaces/index.js +2 -2
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ConnectedStreamedWordArtifact-UNZIAYWQ.cjs.map +0 -1
- package/dist/chunk-OSWZ4K34.cjs +0 -18
- package/dist/chunk-PMHAJRKF.cjs +0 -18
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkPCB2BPN3_cjs = require('./chunk-PCB2BPN3.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkTNESYDBR_cjs = require('./chunk-TNESYDBR.cjs');
|
|
6
6
|
var chunkHUNX4CQG_cjs = require('./chunk-HUNX4CQG.cjs');
|
|
7
7
|
var ui = require('@arbidocs/react/ui');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -176,7 +176,7 @@ function FactsStrip({
|
|
|
176
176
|
"data-testid": testId,
|
|
177
177
|
children: [
|
|
178
178
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
179
|
-
|
|
179
|
+
chunkTNESYDBR_cjs.SectionHeader,
|
|
180
180
|
{
|
|
181
181
|
icon,
|
|
182
182
|
title,
|
|
@@ -187,7 +187,7 @@ function FactsStrip({
|
|
|
187
187
|
}
|
|
188
188
|
),
|
|
189
189
|
filled.length === 0 ? empty && /* @__PURE__ */ jsxRuntime.jsx(
|
|
190
|
-
|
|
190
|
+
chunkTNESYDBR_cjs.EmptyStrip,
|
|
191
191
|
{
|
|
192
192
|
icon: empty.icon,
|
|
193
193
|
label: empty.label,
|
|
@@ -238,7 +238,7 @@ function RecentList({
|
|
|
238
238
|
"data-testid": testId,
|
|
239
239
|
children: [
|
|
240
240
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
241
|
-
|
|
241
|
+
chunkTNESYDBR_cjs.SectionHeader,
|
|
242
242
|
{
|
|
243
243
|
icon,
|
|
244
244
|
title,
|
|
@@ -250,7 +250,7 @@ function RecentList({
|
|
|
250
250
|
}
|
|
251
251
|
),
|
|
252
252
|
rows.length === 0 ? empty?.onSelect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
253
|
-
|
|
253
|
+
chunkTNESYDBR_cjs.EmptyStrip,
|
|
254
254
|
{
|
|
255
255
|
icon: empty.icon,
|
|
256
256
|
label: empty.label,
|
|
@@ -315,5 +315,5 @@ exports.HomeFrame = HomeFrame;
|
|
|
315
315
|
exports.HomeLoadError = HomeLoadError;
|
|
316
316
|
exports.HomeMain = HomeMain;
|
|
317
317
|
exports.RecentList = RecentList;
|
|
318
|
-
//# sourceMappingURL=chunk-
|
|
319
|
-
//# sourceMappingURL=chunk-
|
|
318
|
+
//# sourceMappingURL=chunk-OHCYJFV2.cjs.map
|
|
319
|
+
//# sourceMappingURL=chunk-OHCYJFV2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/home/HomeLayout.tsx","../src/home/CreateTile.tsx","../src/home/DashboardParts.tsx","../src/home/FactsStrip.tsx","../src/home/RecentList.tsx"],"names":["jsx","cn","Callout","jsxs","Plus","Button","SectionHeader","EmptyStrip","Fragment","ActionLink"],"mappings":";;;;;;;;;AAKO,SAAS,SAAA,CAAU;AAAA,EACxB,MAAA,GAAS,WAAA;AAAA,EACT;AACF,CAAA,EAGG;AACD,EAAA,uBACEA,cAAA,CAAC,SAAI,WAAA,EAAU,YAAA,EAAa,eAAa,MAAA,EAAQ,SAAA,EAAU,wBACxD,QAAA,EACH,CAAA;AAEJ;AAGO,SAAS,QAAA,CAAS,EAAE,QAAA,EAAS,EAA4B;AAC9D,EAAA,uBACEA,cAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,WAAA;AAAA,MACV,SAAA,EAAU,4DAAA;AAAA,MAET;AAAA;AAAA,GACH;AAEJ;AAMO,SAAS,kBAAA,CAAmB,EAAE,QAAA,EAAS,EAA4B;AACxE,EAAA,uBACEA,cAAA,CAAC,KAAA,EAAA,EAA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A,CAAA;AAAA,oBAE/B,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAI,OAAA;AAAA,sCACLE,eAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,gBAAA,EACb,QAAA,EAAA;AAAA,wCAAAA,eAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,2BAAA,EACb,QAAA,EAAA;AAAA,0CAAAH,cAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,6DAAA,EACb,cAAI,KAAA,EACP,CAAA;AAAA,0BACC,CAAC,GAAA,CAAI,QAAA,IAAY,GAAA,CAAI,IAAA,oBACpBA,cAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,qDAAA,EACb,QAAA,EAAA,GAAA,CAAI,IAAA,EACP;AAAA,yBAAA,EAEJ,CAAA;AAAA,wBACC,GAAA,CAAI,4BACHA,cAAAA,CAAC,OAAE,SAAA,EAAU,+CAAA,EACV,cAAI,QAAA,EACP;AAAA,uBAAA,EAEJ;AAAA;AAAA;AAAA,iBACF;AAAA,gBACC,GAAA,CAAI,2BAAWA,cAAAA,CAAC,SAAI,SAAA,EAAU,eAAA,EAAiB,QAAA,EAAA,GAAA,CAAI,QAAA,EAAS,CAAA,GAAS;AAAA;AAAA,aAAA;AAAA,YAlCjE,GAAA,CAAI;AAAA,WAoCZ,CAAA,EACH;AAAA,SAAA,EACF;AAAA;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-HHNYVJV3.cjs","sourcesContent":["import type { ReactNode } from 'react'\nimport { cn } from '@arbidocs/react/ui'\nimport { Callout } from '../components/Callout'\n\n/** Column of the home page: greeting header, then the content. */\nexport function HomeFrame({\n testId = 'home-page',\n children,\n}: {\n testId?: string\n children: ReactNode\n}) {\n return (\n <div data-slot=\"home-frame\" data-testid={testId} className=\"flex h-full flex-col\">\n {children}\n </div>\n )\n}\n\n/** Content area under the header; the pages inside own their scrolling. */\nexport function HomeMain({ children }: { children: ReactNode }) {\n return (\n <main\n data-slot=\"home-main\"\n className=\"min-h-0 min-w-sidebar flex-1 overflow-hidden bg-background\"\n >\n {children}\n </main>\n )\n}\n\n/**\n * Scroll container that spans the full width (so its scrollbar rides the window edge) with the\n * content centred in a bounded column.\n */\nexport function HomeCenteredScroll({ children }: { children: ReactNode }) {\n return (\n <div data-slot=\"home-scroll\" className=\"h-full overflow-y-auto\">\n <div className=\"mx-auto max-w-6xl\">{children}</div>\n </div>\n )\n}\n\n/** Bounded, centred column for a full-height child (the workspaces table). */\nexport function HomeCenteredColumn({\n className,\n children,\n}: {\n className?: string\n children: ReactNode\n}) {\n return (\n <div\n data-slot=\"home-column\"\n className={cn('mx-auto h-full max-w-6xl px-4 pb-4 sm:px-8', className)}\n >\n {children}\n </div>\n )\n}\n\n/** Centred error notice for a page that could not load. */\nexport function HomeLoadError({\n title,\n body,\n testId,\n}: {\n title: string\n body: string\n testId?: string\n}) {\n return (\n <div\n data-slot=\"home-load-error\"\n className=\"flex h-full flex-col items-center justify-center p-8\"\n >\n <div className=\"w-full max-w-md\">\n <Callout variant=\"danger\" title={title} body={body} testId={testId} />\n </div>\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { Plus } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\n\nexport interface CreateTileProps {\n /** Visible label, e.g. \"New workspace\". */\n label: string\n /** Accessible name; defaults to `label`. */\n ariaLabel?: string\n onSelect?: () => void\n /** One line explaining what is being created (first-run empty state). */\n help?: ReactNode\n /** When set, the tile is disabled and shows this explanation instead of `help`. */\n disabledReason?: string\n className?: string\n testId?: string\n}\n\n/**\n * The \"create\" tile. Sits in the grid beside the workspace tiles at the same\n * height, in the same tonal family: no dashed outline, no shadow.\n */\nexport function CreateTile({\n label,\n ariaLabel,\n onSelect,\n help,\n disabledReason,\n className,\n testId,\n}: CreateTileProps) {\n const disabled = !!disabledReason\n const select = disabled ? undefined : onSelect\n return (\n <div\n className={cn(\n 'flex min-h-40 w-full flex-col items-center justify-center gap-1 rounded-lg p-4 text-muted-foreground border border-border bg-card shadow-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n disabled\n ? 'cursor-not-allowed opacity-60'\n : 'cursor-pointer hover:border-ring/50 hover:bg-accent/40 hover:text-foreground',\n className\n )}\n onClick={select}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n select?.()\n }\n }}\n role=\"button\"\n tabIndex={0}\n aria-disabled={disabled || undefined}\n title={disabledReason}\n aria-label={ariaLabel ?? label}\n data-slot=\"create-tile\"\n data-testid={testId}\n >\n <span className=\"inline-flex flex-col items-center gap-2 text-sm font-medium\">\n <Plus className=\"size-6\" aria-hidden=\"true\" />\n {label}\n </span>\n {(disabledReason ?? help) && (\n <p className=\"max-w-64 px-4 text-center text-xs leading-snug text-muted-foreground\">\n {disabledReason ?? help}\n </p>\n )}\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { Button, cn } from '@arbidocs/react/ui'\n\n/** A section's quiet header action: ghost, small, still 44px on touch. */\nexport const DASHBOARD_QUIET_ACTION_CLASS =\n 'h-8 gap-1.5 px-2 text-sm bg-transparent text-muted-foreground hover:bg-muted hover:text-foreground pointer-coarse:h-11'\n\n/** Column of the workspace dashboard's bands. A container, so children can use `@2xl:` queries. */\nexport function DashboardRoot({\n testId,\n className,\n children,\n}: {\n testId?: string\n className?: string\n children: ReactNode\n}) {\n return (\n <div\n data-slot=\"dashboard\"\n data-testid={testId}\n className={cn('flex flex-col gap-6', className)}\n >\n {children}\n </div>\n )\n}\n\n/** A dashboard band: `start` is the tiles under the identity bar, `recent` the lists with an eyebrow. */\nexport function DashboardBand({\n kind,\n children,\n}: {\n kind: 'start' | 'recent'\n children: ReactNode\n}) {\n return (\n <div\n data-slot=\"dashboard-band\"\n data-kind={kind}\n className={kind === 'start' ? 'mt-2' : 'mt-4 flex flex-col gap-3'}\n >\n {children}\n </div>\n )\n}\n\n/** Two equal columns from the `@2xl` container width, one below it. */\nexport function DashboardColumns({ children }: { children: ReactNode }) {\n return (\n <div data-slot=\"dashboard-columns\" className=\"grid gap-8 @2xl:grid-cols-2\">\n {children}\n </div>\n )\n}\n\n/** A fact row's mark: a quiet dot. */\nexport function FactMark() {\n return (\n <span\n data-slot=\"fact-mark\"\n className=\"mx-1 size-1.5 shrink-0 rounded-full bg-muted-foreground/40\"\n aria-hidden\n />\n )\n}\n\nexport interface DashboardActionProps {\n /** `primary` is the page's one filled action; `quiet` the ghost header actions. */\n emphasis: 'primary' | 'quiet'\n icon: ReactNode\n label: string\n onClick: () => void\n testId?: string\n}\n\n/** Header action of a dashboard section (\"New chat\", \"New fact\"). */\nexport function DashboardAction({ emphasis, icon, label, onClick, testId }: DashboardActionProps) {\n return (\n <Button\n variant={emphasis === 'primary' ? 'default' : 'ghost'}\n size=\"sm\"\n className={\n emphasis === 'primary'\n ? 'h-8 gap-1.5 px-3 text-sm pointer-coarse:h-11'\n : DASHBOARD_QUIET_ACTION_CLASS\n }\n onClick={onClick}\n data-testid={testId}\n >\n {icon}\n {label}\n </Button>\n )\n}\n","import type { ReactNode } from 'react'\nimport type { LucideIcon } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { EmptyStrip, SectionHeader } from './sections'\n\nexport interface FactsStripRow {\n id: string\n leading?: ReactNode\n title: string\n /** Right-aligned stamp: a date or a time. */\n time?: string\n onSelect?: () => void\n}\n\nexport interface FactsStripGroup {\n /** Captions the group (\"Upcoming\", \"Created\"); an empty group is not rendered. */\n caption: string\n rows: FactsStripRow[]\n /** Test id of every row in this group. Defaults to `${testId}-row`. */\n rowTestId?: string\n}\n\nexport interface FactsStripEmpty {\n icon: LucideIcon\n label: ReactNode\n description?: ReactNode\n onSelect?: () => void\n testId?: string\n}\n\nexport interface FactsStripProps {\n icon?: LucideIcon\n title: string\n count?: number\n onOpen?: () => void\n action?: ReactNode\n groups: FactsStripGroup[]\n empty?: FactsStripEmpty\n className?: string\n /** Root test id; the title button gets `${testId}-open`. */\n testId?: string\n}\n\n/**\n * A glanceable band of captioned groups (facts: upcoming, recently created).\n * Not a third list page: callers hand it a few rows per group.\n */\nexport function FactsStrip({\n icon,\n title,\n count,\n onOpen,\n action,\n groups,\n empty,\n className,\n testId,\n}: FactsStripProps) {\n const filled = groups.filter((g) => g.rows.length > 0)\n return (\n <section\n className={cn('flex min-w-0 flex-col gap-1', className)}\n data-slot=\"facts-strip\"\n data-testid={testId}\n >\n <SectionHeader\n icon={icon}\n title={title}\n count={count}\n onOpen={onOpen}\n openTestId={testId && `${testId}-open`}\n action={action}\n />\n {filled.length === 0\n ? empty && (\n <EmptyStrip\n icon={empty.icon}\n label={empty.label}\n description={empty.description}\n onSelect={empty.onSelect}\n testId={empty.testId}\n />\n )\n : filled.map((group) => (\n <div key={group.caption} className=\"min-w-0\">\n <p className=\"px-3 pb-1 pt-1 text-right text-xs text-muted-foreground\">\n {group.caption}\n </p>\n <ul>\n {group.rows.map((row) => (\n <li key={row.id}>\n <button\n type=\"button\"\n onClick={row.onSelect}\n title={row.title}\n className=\"flex w-full min-w-0 items-center gap-3 rounded-md px-3 py-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&:hover]:bg-muted pointer-coarse:min-h-11\"\n data-testid={group.rowTestId ?? (testId && `${testId}-row`)}\n >\n {row.leading}\n <span className=\"min-w-0 flex-1 truncate text-sm text-foreground\">\n {row.title}\n </span>\n {row.time && (\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {row.time}\n </span>\n )}\n </button>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </section>\n )\n}\n","import type { ReactNode } from 'react'\nimport type { LucideIcon } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { ActionLink } from '../components/ActionLink'\nimport { EmptyStrip, SectionHeader } from './sections'\n\n/** One listed item. Source-agnostic: a chat, a file. */\nexport interface RecentRow {\n id: string\n /** Bare entity mark (an icon carries its own identity; no tinted box). */\n leading?: ReactNode\n title: string\n subtitle?: string\n /** Pinned right on the title line, like a message time. Hidden when `trailing` is set. */\n time?: string\n onSelect?: () => void\n /** Real link target; `onSelect` still fires on a plain click (see `ActionLink`). */\n href?: string\n /** A control rendered beside the row, outside its button. */\n trailing?: ReactNode\n}\n\nexport interface RecentListEmpty {\n icon?: LucideIcon\n label: ReactNode\n description?: ReactNode\n /** Makes the empty strip an invitation button. */\n onSelect?: () => void\n}\n\nexport interface RecentListProps {\n icon?: LucideIcon\n title: string\n count?: number\n /** Opens the full list; makes the header title a button. */\n onOpen?: () => void\n /** Real link target of the header title (with `onOpen`, plain clicks call `onOpen`). */\n openHref?: string\n /** The section's one quiet header action. */\n action?: ReactNode\n rows: RecentRow[]\n /** Names the right-hand column (\"Added\", \"Messaged\"). */\n caption?: string\n /** What an empty section says. A plain muted line unless `onSelect` is set. */\n empty?: RecentListEmpty\n className?: string\n /** Root test id; derived ids: `-open`, `-caption`, `-row`, `-empty-action`. */\n testId?: string\n}\n\n/**\n * A titled list of recent items (files, chats): plain rows under a quiet\n * header. An empty list is one tonal strip that invites the first item.\n */\nexport function RecentList({\n icon,\n title,\n count,\n onOpen,\n openHref,\n action,\n rows,\n caption,\n empty,\n className,\n testId,\n}: RecentListProps) {\n return (\n <section\n className={cn('flex min-w-0 flex-col gap-1', className)}\n data-slot=\"recent-list\"\n data-testid={testId}\n >\n <SectionHeader\n icon={icon}\n title={title}\n count={count}\n onOpen={onOpen}\n openHref={openHref}\n openTestId={testId && `${testId}-open`}\n action={action}\n />\n {rows.length === 0 ? (\n empty?.onSelect ? (\n <EmptyStrip\n icon={empty.icon}\n label={empty.label}\n description={empty.description}\n onSelect={empty.onSelect}\n testId={testId && `${testId}-empty-action`}\n />\n ) : (\n <p className=\"px-1 py-3 text-sm text-muted-foreground\">\n {empty?.description ?? empty?.label}\n </p>\n )\n ) : (\n <>\n {caption && (\n <p className=\"sr-only\" data-testid={testId && `${testId}-caption`}>\n {caption}\n </p>\n )}\n <ul>\n {rows.map((row) => (\n <li\n key={row.id}\n className=\"relative flex items-center rounded-md transition-colors [&:hover]:bg-muted has-[:focus-visible]:bg-muted\"\n data-slot=\"recent-row\"\n >\n <ActionLink\n href={row.href}\n onSelect={row.onSelect}\n title={row.title}\n className={cn(\n 'flex min-w-0 flex-1 items-start gap-3 rounded-md px-3 py-2 text-left focus-visible:outline-none',\n row.onSelect && 'cursor-pointer',\n 'pointer-coarse:min-h-11'\n )}\n data-testid={testId && `${testId}-row`}\n >\n {row.leading}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline gap-2\">\n <span className=\"min-w-0 flex-1 truncate text-sm font-medium text-foreground\">\n {row.title}\n </span>\n {!row.trailing && row.time && (\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {row.time}\n </span>\n )}\n </div>\n {row.subtitle && (\n <p className=\"mt-0.5 truncate text-xs text-muted-foreground\">\n {row.subtitle}\n </p>\n )}\n </div>\n </ActionLink>\n {row.trailing ? <div className=\"shrink-0 pr-3\">{row.trailing}</div> : null}\n </li>\n ))}\n </ul>\n </>\n )}\n </section>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/home/HomeLayout.tsx","../src/home/CreateTile.tsx","../src/home/DashboardParts.tsx","../src/home/FactsStrip.tsx","../src/home/RecentList.tsx"],"names":["jsx","cn","Callout","jsxs","Plus","Button","SectionHeader","EmptyStrip","Fragment","ActionLink"],"mappings":";;;;;;;;;AAKO,SAAS,SAAA,CAAU;AAAA,EACxB,MAAA,GAAS,WAAA;AAAA,EACT;AACF,CAAA,EAGG;AACD,EAAA,uBACEA,cAAA,CAAC,SAAI,WAAA,EAAU,YAAA,EAAa,eAAa,MAAA,EAAQ,SAAA,EAAU,wBACxD,QAAA,EACH,CAAA;AAEJ;AAGO,SAAS,QAAA,CAAS,EAAE,QAAA,EAAS,EAA4B;AAC9D,EAAA,uBACEA,cAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,WAAA;AAAA,MACV,SAAA,EAA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AA,sBACT,iGAAA;AAAA,sBACA,IAAI,QAAA,IAAY,gBAAA;AAAA,sBAChB;AAAA,qBACF;AAAA,oBACA,aAAA,EAAa,MAAA,IAAU,CAAA,EAAG,MAAM,CAAA,IAAA,CAAA;AAAA,oBAE/B,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAI,OAAA;AAAA,sCACLE,eAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,gBAAA,EACb,QAAA,EAAA;AAAA,wCAAAA,eAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,2BAAA,EACb,QAAA,EAAA;AAAA,0CAAAH,cAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,6DAAA,EACb,cAAI,KAAA,EACP,CAAA;AAAA,0BACC,CAAC,GAAA,CAAI,QAAA,IAAY,GAAA,CAAI,IAAA,oBACpBA,cAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,qDAAA,EACb,QAAA,EAAA,GAAA,CAAI,IAAA,EACP;AAAA,yBAAA,EAEJ,CAAA;AAAA,wBACC,GAAA,CAAI,4BACHA,cAAAA,CAAC,OAAE,SAAA,EAAU,+CAAA,EACV,cAAI,QAAA,EACP;AAAA,uBAAA,EAEJ;AAAA;AAAA;AAAA,iBACF;AAAA,gBACC,GAAA,CAAI,2BAAWA,cAAAA,CAAC,SAAI,SAAA,EAAU,eAAA,EAAiB,QAAA,EAAA,GAAA,CAAI,QAAA,EAAS,CAAA,GAAS;AAAA;AAAA,aAAA;AAAA,YAlCjE,GAAA,CAAI;AAAA,WAoCZ,CAAA,EACH;AAAA,SAAA,EACF;AAAA;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-OHCYJFV2.cjs","sourcesContent":["import type { ReactNode } from 'react'\nimport { cn } from '@arbidocs/react/ui'\nimport { Callout } from '../components/Callout'\n\n/** Column of the home page: greeting header, then the content. */\nexport function HomeFrame({\n testId = 'home-page',\n children,\n}: {\n testId?: string\n children: ReactNode\n}) {\n return (\n <div data-slot=\"home-frame\" data-testid={testId} className=\"flex h-full flex-col\">\n {children}\n </div>\n )\n}\n\n/** Content area under the header; the pages inside own their scrolling. */\nexport function HomeMain({ children }: { children: ReactNode }) {\n return (\n <main\n data-slot=\"home-main\"\n className=\"min-h-0 min-w-sidebar flex-1 overflow-hidden bg-background\"\n >\n {children}\n </main>\n )\n}\n\n/**\n * Scroll container that spans the full width (so its scrollbar rides the window edge) with the\n * content centred in a bounded column.\n */\nexport function HomeCenteredScroll({ children }: { children: ReactNode }) {\n return (\n <div data-slot=\"home-scroll\" className=\"h-full overflow-y-auto\">\n <div className=\"mx-auto max-w-6xl\">{children}</div>\n </div>\n )\n}\n\n/** Bounded, centred column for a full-height child (the workspaces table). */\nexport function HomeCenteredColumn({\n className,\n children,\n}: {\n className?: string\n children: ReactNode\n}) {\n return (\n <div\n data-slot=\"home-column\"\n className={cn('mx-auto h-full max-w-6xl px-4 pb-4 sm:px-8', className)}\n >\n {children}\n </div>\n )\n}\n\n/** Centred error notice for a page that could not load. */\nexport function HomeLoadError({\n title,\n body,\n testId,\n}: {\n title: string\n body: string\n testId?: string\n}) {\n return (\n <div\n data-slot=\"home-load-error\"\n className=\"flex h-full flex-col items-center justify-center p-8\"\n >\n <div className=\"w-full max-w-md\">\n <Callout variant=\"danger\" title={title} body={body} testId={testId} />\n </div>\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { Plus } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\n\nexport interface CreateTileProps {\n /** Visible label, e.g. \"New workspace\". */\n label: string\n /** Accessible name; defaults to `label`. */\n ariaLabel?: string\n onSelect?: () => void\n /** One line explaining what is being created (first-run empty state). */\n help?: ReactNode\n /** When set, the tile is disabled and shows this explanation instead of `help`. */\n disabledReason?: string\n className?: string\n testId?: string\n}\n\n/**\n * The \"create\" tile. Sits in the grid beside the workspace tiles at the same\n * height, in the same tonal family: no dashed outline, no shadow.\n */\nexport function CreateTile({\n label,\n ariaLabel,\n onSelect,\n help,\n disabledReason,\n className,\n testId,\n}: CreateTileProps) {\n const disabled = !!disabledReason\n const select = disabled ? undefined : onSelect\n return (\n <div\n className={cn(\n 'flex min-h-40 w-full flex-col items-center justify-center gap-1 rounded-lg p-4 text-muted-foreground border border-border bg-card shadow-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n disabled\n ? 'cursor-not-allowed opacity-60'\n : 'cursor-pointer hover:border-ring/50 hover:bg-accent/40 hover:text-foreground',\n className\n )}\n onClick={select}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n select?.()\n }\n }}\n role=\"button\"\n tabIndex={0}\n aria-disabled={disabled || undefined}\n title={disabledReason}\n aria-label={ariaLabel ?? label}\n data-slot=\"create-tile\"\n data-testid={testId}\n >\n <span className=\"inline-flex flex-col items-center gap-2 text-sm font-medium\">\n <Plus className=\"size-6\" aria-hidden=\"true\" />\n {label}\n </span>\n {(disabledReason ?? help) && (\n <p className=\"max-w-64 px-4 text-center text-xs leading-snug text-muted-foreground\">\n {disabledReason ?? help}\n </p>\n )}\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { Button, cn } from '@arbidocs/react/ui'\n\n/** A section's quiet header action: ghost, small, still 44px on touch. */\nexport const DASHBOARD_QUIET_ACTION_CLASS =\n 'h-8 gap-1.5 px-2 text-sm bg-transparent text-muted-foreground hover:bg-muted hover:text-foreground pointer-coarse:h-11'\n\n/** Column of the workspace dashboard's bands. A container, so children can use `@2xl:` queries. */\nexport function DashboardRoot({\n testId,\n className,\n children,\n}: {\n testId?: string\n className?: string\n children: ReactNode\n}) {\n return (\n <div\n data-slot=\"dashboard\"\n data-testid={testId}\n className={cn('flex flex-col gap-6', className)}\n >\n {children}\n </div>\n )\n}\n\n/** A dashboard band: `start` is the tiles under the identity bar, `recent` the lists with an eyebrow. */\nexport function DashboardBand({\n kind,\n children,\n}: {\n kind: 'start' | 'recent'\n children: ReactNode\n}) {\n return (\n <div\n data-slot=\"dashboard-band\"\n data-kind={kind}\n className={kind === 'start' ? 'mt-2' : 'mt-4 flex flex-col gap-3'}\n >\n {children}\n </div>\n )\n}\n\n/** Two equal columns from the `@2xl` container width, one below it. */\nexport function DashboardColumns({ children }: { children: ReactNode }) {\n return (\n <div data-slot=\"dashboard-columns\" className=\"grid gap-8 @2xl:grid-cols-2\">\n {children}\n </div>\n )\n}\n\n/** A fact row's mark: a quiet dot. */\nexport function FactMark() {\n return (\n <span\n data-slot=\"fact-mark\"\n className=\"mx-1 size-1.5 shrink-0 rounded-full bg-muted-foreground/40\"\n aria-hidden\n />\n )\n}\n\nexport interface DashboardActionProps {\n /** `primary` is the page's one filled action; `quiet` the ghost header actions. */\n emphasis: 'primary' | 'quiet'\n icon: ReactNode\n label: string\n onClick: () => void\n testId?: string\n}\n\n/** Header action of a dashboard section (\"New chat\", \"New fact\"). */\nexport function DashboardAction({ emphasis, icon, label, onClick, testId }: DashboardActionProps) {\n return (\n <Button\n variant={emphasis === 'primary' ? 'default' : 'ghost'}\n size=\"sm\"\n className={\n emphasis === 'primary'\n ? 'h-8 gap-1.5 px-3 text-sm pointer-coarse:h-11'\n : DASHBOARD_QUIET_ACTION_CLASS\n }\n onClick={onClick}\n data-testid={testId}\n >\n {icon}\n {label}\n </Button>\n )\n}\n","import type { ReactNode } from 'react'\nimport type { LucideIcon } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { EmptyStrip, SectionHeader } from './sections'\n\nexport interface FactsStripRow {\n id: string\n leading?: ReactNode\n title: string\n /** Right-aligned stamp: a date or a time. */\n time?: string\n onSelect?: () => void\n}\n\nexport interface FactsStripGroup {\n /** Captions the group (\"Upcoming\", \"Created\"); an empty group is not rendered. */\n caption: string\n rows: FactsStripRow[]\n /** Test id of every row in this group. Defaults to `${testId}-row`. */\n rowTestId?: string\n}\n\nexport interface FactsStripEmpty {\n icon: LucideIcon\n label: ReactNode\n description?: ReactNode\n onSelect?: () => void\n testId?: string\n}\n\nexport interface FactsStripProps {\n icon?: LucideIcon\n title: string\n count?: number\n onOpen?: () => void\n action?: ReactNode\n groups: FactsStripGroup[]\n empty?: FactsStripEmpty\n className?: string\n /** Root test id; the title button gets `${testId}-open`. */\n testId?: string\n}\n\n/**\n * A glanceable band of captioned groups (facts: upcoming, recently created).\n * Not a third list page: callers hand it a few rows per group.\n */\nexport function FactsStrip({\n icon,\n title,\n count,\n onOpen,\n action,\n groups,\n empty,\n className,\n testId,\n}: FactsStripProps) {\n const filled = groups.filter((g) => g.rows.length > 0)\n return (\n <section\n className={cn('flex min-w-0 flex-col gap-1', className)}\n data-slot=\"facts-strip\"\n data-testid={testId}\n >\n <SectionHeader\n icon={icon}\n title={title}\n count={count}\n onOpen={onOpen}\n openTestId={testId && `${testId}-open`}\n action={action}\n />\n {filled.length === 0\n ? empty && (\n <EmptyStrip\n icon={empty.icon}\n label={empty.label}\n description={empty.description}\n onSelect={empty.onSelect}\n testId={empty.testId}\n />\n )\n : filled.map((group) => (\n <div key={group.caption} className=\"min-w-0\">\n <p className=\"px-3 pb-1 pt-1 text-right text-xs text-muted-foreground\">\n {group.caption}\n </p>\n <ul>\n {group.rows.map((row) => (\n <li key={row.id}>\n <button\n type=\"button\"\n onClick={row.onSelect}\n title={row.title}\n className=\"flex w-full min-w-0 items-center gap-3 rounded-md px-3 py-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&:hover]:bg-muted pointer-coarse:min-h-11\"\n data-testid={group.rowTestId ?? (testId && `${testId}-row`)}\n >\n {row.leading}\n <span className=\"min-w-0 flex-1 truncate text-sm text-foreground\">\n {row.title}\n </span>\n {row.time && (\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {row.time}\n </span>\n )}\n </button>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </section>\n )\n}\n","import type { ReactNode } from 'react'\nimport type { LucideIcon } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { ActionLink } from '../components/ActionLink'\nimport { EmptyStrip, SectionHeader } from './sections'\n\n/** One listed item. Source-agnostic: a chat, a file. */\nexport interface RecentRow {\n id: string\n /** Bare entity mark (an icon carries its own identity; no tinted box). */\n leading?: ReactNode\n title: string\n subtitle?: string\n /** Pinned right on the title line, like a message time. Hidden when `trailing` is set. */\n time?: string\n onSelect?: () => void\n /** Real link target; `onSelect` still fires on a plain click (see `ActionLink`). */\n href?: string\n /** A control rendered beside the row, outside its button. */\n trailing?: ReactNode\n}\n\nexport interface RecentListEmpty {\n icon?: LucideIcon\n label: ReactNode\n description?: ReactNode\n /** Makes the empty strip an invitation button. */\n onSelect?: () => void\n}\n\nexport interface RecentListProps {\n icon?: LucideIcon\n title: string\n count?: number\n /** Opens the full list; makes the header title a button. */\n onOpen?: () => void\n /** Real link target of the header title (with `onOpen`, plain clicks call `onOpen`). */\n openHref?: string\n /** The section's one quiet header action. */\n action?: ReactNode\n rows: RecentRow[]\n /** Names the right-hand column (\"Added\", \"Messaged\"). */\n caption?: string\n /** What an empty section says. A plain muted line unless `onSelect` is set. */\n empty?: RecentListEmpty\n className?: string\n /** Root test id; derived ids: `-open`, `-caption`, `-row`, `-empty-action`. */\n testId?: string\n}\n\n/**\n * A titled list of recent items (files, chats): plain rows under a quiet\n * header. An empty list is one tonal strip that invites the first item.\n */\nexport function RecentList({\n icon,\n title,\n count,\n onOpen,\n openHref,\n action,\n rows,\n caption,\n empty,\n className,\n testId,\n}: RecentListProps) {\n return (\n <section\n className={cn('flex min-w-0 flex-col gap-1', className)}\n data-slot=\"recent-list\"\n data-testid={testId}\n >\n <SectionHeader\n icon={icon}\n title={title}\n count={count}\n onOpen={onOpen}\n openHref={openHref}\n openTestId={testId && `${testId}-open`}\n action={action}\n />\n {rows.length === 0 ? (\n empty?.onSelect ? (\n <EmptyStrip\n icon={empty.icon}\n label={empty.label}\n description={empty.description}\n onSelect={empty.onSelect}\n testId={testId && `${testId}-empty-action`}\n />\n ) : (\n <p className=\"px-1 py-3 text-sm text-muted-foreground\">\n {empty?.description ?? empty?.label}\n </p>\n )\n ) : (\n <>\n {caption && (\n <p className=\"sr-only\" data-testid={testId && `${testId}-caption`}>\n {caption}\n </p>\n )}\n <ul>\n {rows.map((row) => (\n <li\n key={row.id}\n className=\"relative flex items-center rounded-md transition-colors [&:hover]:bg-muted has-[:focus-visible]:bg-muted\"\n data-slot=\"recent-row\"\n >\n <ActionLink\n href={row.href}\n onSelect={row.onSelect}\n title={row.title}\n className={cn(\n 'flex min-w-0 flex-1 items-start gap-3 rounded-md px-3 py-2 text-left focus-visible:outline-none',\n row.onSelect && 'cursor-pointer',\n 'pointer-coarse:min-h-11'\n )}\n data-testid={testId && `${testId}-row`}\n >\n {row.leading}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline gap-2\">\n <span className=\"min-w-0 flex-1 truncate text-sm font-medium text-foreground\">\n {row.title}\n </span>\n {!row.trailing && row.time && (\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {row.time}\n </span>\n )}\n </div>\n {row.subtitle && (\n <p className=\"mt-0.5 truncate text-xs text-muted-foreground\">\n {row.subtitle}\n </p>\n )}\n </div>\n </ActionLink>\n {row.trailing ? <div className=\"shrink-0 pr-3\">{row.trailing}</div> : null}\n </li>\n ))}\n </ul>\n </>\n )}\n </section>\n )\n}\n"]}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
var chunkBGJZVJJM_cjs = require('./chunk-BGJZVJJM.cjs');
|
|
5
5
|
var chunkAYKE6USO_cjs = require('./chunk-AYKE6USO.cjs');
|
|
6
6
|
var chunk464YPRAE_cjs = require('./chunk-464YPRAE.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunk4GITK3Q5_cjs = require('./chunk-4GITK3Q5.cjs');
|
|
8
8
|
var chunkLJJJ6CYH_cjs = require('./chunk-LJJJ6CYH.cjs');
|
|
9
9
|
var chunkWP4VIOOA_cjs = require('./chunk-WP4VIOOA.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkZV4DNZ5N_cjs = require('./chunk-ZV4DNZ5N.cjs');
|
|
11
11
|
var chunk2VHYOTWW_cjs = require('./chunk-2VHYOTWW.cjs');
|
|
12
12
|
var chunkJKB7WT7L_cjs = require('./chunk-JKB7WT7L.cjs');
|
|
13
13
|
var chunkEFEFLBRM_cjs = require('./chunk-EFEFLBRM.cjs');
|
|
@@ -44,7 +44,7 @@ function toWorkflowFieldDocument(doc) {
|
|
|
44
44
|
function useConnectedWorkflowScopeSource() {
|
|
45
45
|
const { data: docs } = chunkBGJZVJJM_cjs.useConnectedDocuments();
|
|
46
46
|
const { data: tags } = chunkBGJZVJJM_cjs.useConnectedTags();
|
|
47
|
-
return react.useMemo(() =>
|
|
47
|
+
return react.useMemo(() => chunkZV4DNZ5N_cjs.buildWorkflowScopeSource(docs, chunkZV4DNZ5N_cjs.documentScopeLabels(tags)), [docs, tags]);
|
|
48
48
|
}
|
|
49
49
|
function useConnectedAgentOptions() {
|
|
50
50
|
const { data: agents } = react$1.useAgents();
|
|
@@ -101,7 +101,7 @@ function ConnectedWorkflowDocumentsField({
|
|
|
101
101
|
}
|
|
102
102
|
),
|
|
103
103
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
104
|
-
|
|
104
|
+
chunkZV4DNZ5N_cjs.WorkflowDocumentsField,
|
|
105
105
|
{
|
|
106
106
|
field,
|
|
107
107
|
value,
|
|
@@ -123,7 +123,7 @@ function ConnectedWorkflowLauncher({
|
|
|
123
123
|
const scopeSource = useConnectedWorkflowScopeSource();
|
|
124
124
|
const agents = useConnectedAgentOptions();
|
|
125
125
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
126
|
-
|
|
126
|
+
chunkZV4DNZ5N_cjs.WorkflowLauncher,
|
|
127
127
|
{
|
|
128
128
|
...props,
|
|
129
129
|
scopeSource,
|
|
@@ -245,7 +245,7 @@ var DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS = {
|
|
|
245
245
|
var messageOf = (error) => error instanceof Error ? error.message : "";
|
|
246
246
|
function ConnectedWorkflowsTable({
|
|
247
247
|
filter,
|
|
248
|
-
describeTrigger = (w) =>
|
|
248
|
+
describeTrigger = (w) => chunkZV4DNZ5N_cjs.workflowTriggerType(w).replaceAll("_", " "),
|
|
249
249
|
formatDate = chunkKDG6FER6_cjs.fmtDate,
|
|
250
250
|
onViewRuns,
|
|
251
251
|
connectedLabels,
|
|
@@ -307,7 +307,7 @@ function ConnectedWorkflowsTable({
|
|
|
307
307
|
await act(workflow, () => remove.mutateAsync(workflow.external_id));
|
|
308
308
|
};
|
|
309
309
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
310
|
-
|
|
310
|
+
chunkZV4DNZ5N_cjs.WorkflowsTable,
|
|
311
311
|
{
|
|
312
312
|
...tableProps,
|
|
313
313
|
workflows,
|
|
@@ -372,7 +372,7 @@ function useConnectedHouseTemplate() {
|
|
|
372
372
|
load: async () => {
|
|
373
373
|
if (templateId) {
|
|
374
374
|
await ensureWorkspaceOpen();
|
|
375
|
-
const response = await arbi.editor.request(
|
|
375
|
+
const response = await arbi.editor.request(chunk4GITK3Q5_cjs.contentPath(templateId));
|
|
376
376
|
const [record] = await arbi.documents.get([templateId]).catch(() => []);
|
|
377
377
|
return {
|
|
378
378
|
bytes: new Uint8Array(await response.arrayBuffer()),
|
|
@@ -385,7 +385,7 @@ function useConnectedHouseTemplate() {
|
|
|
385
385
|
const deployment = await arbi.houseTemplates.deployment();
|
|
386
386
|
if (deployment) return { ...deployment, source: "deployment" };
|
|
387
387
|
}
|
|
388
|
-
return
|
|
388
|
+
return chunk4GITK3Q5_cjs.builtinHouseTemplate();
|
|
389
389
|
},
|
|
390
390
|
setFromDocument: supported && isWorkspaceOwner ? async (documentId) => {
|
|
391
391
|
await ensureWorkspaceOpen();
|
|
@@ -435,7 +435,7 @@ function ConnectedNativeDocxEditor({
|
|
|
435
435
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
436
436
|
openFailed && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "status", className: "text-muted-foreground border-b px-3 py-2 text-xs", children: "Co-editing isn't available for this document right now, so this is a read-only copy of the last saved version." }),
|
|
437
437
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
438
|
-
|
|
438
|
+
chunk4GITK3Q5_cjs.NativeDocxEditor,
|
|
439
439
|
{
|
|
440
440
|
...props,
|
|
441
441
|
snapshot: props.snapshot || openFailed,
|
|
@@ -564,5 +564,5 @@ exports.useConnectedWorkflowScopeSource = useConnectedWorkflowScopeSource;
|
|
|
564
564
|
exports.useConnectedWorkspaceRole = useConnectedWorkspaceRole;
|
|
565
565
|
exports.useDocxCommentTarget = useDocxCommentTarget;
|
|
566
566
|
exports.useNativeDocxSupport = useNativeDocxSupport;
|
|
567
|
-
//# sourceMappingURL=chunk-
|
|
568
|
-
//# sourceMappingURL=chunk-
|
|
567
|
+
//# sourceMappingURL=chunk-PTSTVYQD.cjs.map
|
|
568
|
+
//# sourceMappingURL=chunk-PTSTVYQD.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/connection/docx/support.ts","../src/connection/ConnectedWorkflowLauncher.tsx","../src/connection/docx/useConnectedDocxReferences.tsx","../src/connection/ConnectedWorkflowsTable.tsx","../src/connection/docx/useConnectedHouseTemplate.ts","../src/connection/docx/ConnectedNativeDocxEditor.tsx"],"names":["useHost","useConnectedDocuments","useConnectedTags","useMemo","buildWorkflowScopeSource","documentScopeLabels","useAgents","useBlocksEnvironment","useConnectedWorkspace","useUploadDocuments","useThumbnails","useRef","useState","useCallback","jsxs","Fragment","jsx","WorkflowDocumentsField","WorkflowLauncher","DocumentPicker","useArbi","buildDeepLinkUrl","parseDeepLinkPath","useWorkspaceUsers","workflowTriggerType","fmtDate","useWorkflows","useConnectedConversations","useUpdateWorkflow","useDeleteWorkflow","useConnectedRunWorkflow","useEffect","WorkflowsTable","useSetWorkspaceHouseTemplate","useWorkspaces","supportsHouseTemplates","workspaceHouseTemplateId","useHouseTemplateCandidates","contentPath","builtinHouseTemplate","isCandidate","useRegisterOpenDocument","NativeDocxEditor","useQueryClient","useOptionalDocumentTools","loadDocxFonts","refreshDocuments","fetchSavedSignature","storeSavedSignature"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,IAAM,aAAgC,EAAC;AACvC,IAAM,YAAY,MAAM,IAAA;AAEjB,SAAS,oBAAA,GAA0C;AACxD,EAAA,OAAOA,yBAAA,GAAU,IAAA,IAAQ,UAAA;AAC3B;AAGO,SAAS,oBAAA,GAAyE;AACvF,EAAA,MAAM,SAAA,GAAY,oBAAA,EAAqB,CAAE,gBAAA,IAAoB,SAAA;AAC7D,EAAA,OAAO,SAAA,EAAU;AACnB;ACZA,IAAM,gBAAA,mBAAmB,IAAI,GAAA,CAAI,CAAC,KAAA,EAAO,KAAA,EAAO,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,MAAA,EAAQ,MAAM,CAAC,CAAA;AAG9E,SAAS,wBAAwB,GAAA,EAA+C;AAErF,EAAA,MAAM,UAAU,gBAAA,CAAiB,GAAA,CAAA,CAAK,IAAI,SAAA,IAAa,EAAA,EAAI,aAAa,CAAA;AACxE,EAAA,OAAO;AAAA,IACL,IAAI,GAAA,CAAI,WAAA;AAAA,IACR,OAAO,GAAA,CAAI,YAAA,EAAc,KAAA,IAAS,GAAA,CAAI,aAAa,GAAA,CAAI,WAAA;AAAA,IACvD,UAAU,GAAA,CAAI,SAAA;AAAA,IACd,KAAA,EAAO,OAAA,GAAU,IAAA,GAAQ,GAAA,CAAI,OAAA,IAAW,IAAA;AAAA,IACxC,MAAA,EAAQ,OAAA,GAAU,IAAA,GAAQ,GAAA,CAAI,MAAA,IAAU,IAAA;AAAA,IACxC,QAAQ,GAAA,CAAI,MAAA;AAAA,IACZ;AAAA,GACF;AACF;AAGO,SAAS,+BAAA,GAAuD;AACrE,EAAA,MAAM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,OAAA,CAAQ,SAAA;AAAA,YACpB,aAAa,OAAA,CAAQ,WAAA;AAAA,YACrB,YAAY,OAAA,CAAQ,SAAA;AAAA,YACpB,eAAe,OAAA,CAAQ;AAAA,WACxB;AAAA,SACF,CAAA;AACD,QAAA,MAAM,QAAA,GAAY,MAAM,QAAA,CAAS,IAAA,EAAK;AACtC,QAAA,MAAA,CAAO,sBAAsB,SAAS,CAAA;AACtC,QAAA,OAAO,EAAE,WAAA,EAAa,QAAA,CAAS,YAAA,IAAgB,EAAC,EAAE;AAAA,MACpD,CAAA;AAAA,MACA,cAAA,EAAgB,OAAO,UAAA,KAAA,CAAgB,MAAM,KAAK,SAAA,CAAU,WAAA,CAAY,UAAU,CAAA,EAAG,MAAA;AAAA,MACrF,aAAa,OAAA,CAAQ,WAAA;AAAA,MACrB,UAAA;AAAA,MACA,iBAAiB,OAAA,CAAQ,eAAA;AAAA,MACzB;AAAA,KACF,CAAA;AAAA,IACA;AAAA,MACE,IAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,mBAAA;AAAA,MACA,WAAA;AAAA,MACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,kBAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA,EAAM;AAAA;AACR,GACF;AACA,EAAA,OAAO,OAAA;AACT","file":"chunk-M7C4FHLU.cjs","sourcesContent":["/**\n * What a host adds to the connected Word editor that the platform API alone cannot give: the\n * workspace's definitions (facts labelled \"Definitions\"), image generation (an assistant run), the\n * host's leave-page guard, and a comment to open the editor at. It is the host configuration's\n * `docx`; every field is optional, and without one the editor simply offers less (no Defined term,\n * no Generate image).\n */\n\nimport { useHost } from '../../provider/host'\nimport type { DefinitionSource } from '../../tags/definitions'\nimport type { DocxImageGeneration } from '../../docx/layout/GenerateImage'\n\nexport interface NativeDocxSupport {\n /** The workspace's definitions. Present: Insert offers Defined term and `@@` the type-ahead. */\n definitions?: () => Promise<DefinitionSource[]>\n /** The platform's image generation. Present: Insert offers Generate image. */\n imageGeneration?: DocxImageGeneration\n /** The open editor has (or no longer has) unsaved changes. */\n onDirtyChange?: (dirty: boolean) => void\n /** A comment thread to open when its document opens (a notification's link), as a hook. */\n useCommentTarget?: () => { documentId: string; commentId: string } | null\n}\n\nconst NO_SUPPORT: NativeDocxSupport = {}\nconst NO_TARGET = () => null\n\nexport function useNativeDocxSupport(): NativeDocxSupport {\n return useHost().docx ?? NO_SUPPORT\n}\n\n/** The comment thread to open with its document (none without the host's). */\nexport function useDocxCommentTarget(): { documentId: string; commentId: string } | null {\n const useTarget = useNativeDocxSupport().useCommentTarget ?? NO_TARGET\n return useTarget()\n}\n","/**\n * The workflow launcher bound to the connection: the open workspace's folders, labels and files\n * behind its scope and `documents` fields (files can be added right there), and the user's agents\n * behind \"Run as\". The host still says what a launch does (`onLaunch`): open a chat, start a task.\n */\n\nimport { useCallback, useMemo, useRef, useState } from 'react'\nimport { useAgents, useThumbnails, useUploadDocuments } from '@arbidocs/react'\nimport { WorkflowLauncher, type WorkflowLauncherProps } from '../agents/workflows/WorkflowLauncher'\nimport {\n WorkflowDocumentsField,\n type WorkflowDocumentsFieldLabels,\n type WorkflowFieldDocument,\n} from '../agents/workflows/WorkflowDocumentsField'\nimport type { WorkflowScopeSource } from '../agents/workflows/WorkflowConfigDialog'\nimport { buildWorkflowScopeSource, documentScopeLabels } from '../agents/workflows/workspaceScope'\nimport type { AgentOption } from '../agents/workflows/AgentSelect'\nimport type { WorkflowField, WorkflowScope } from '../agents/workflows/types'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedDocuments, useConnectedTags, type ConnectedDocument } from './workspaceData'\n\nconst IMAGE_FILE_TYPES = new Set(['png', 'jpg', 'jpeg', 'gif', 'bmp', 'tiff', 'webp'])\n\n/** A workspace document as a `documents` field offers it. */\nexport function toWorkflowFieldDocument(doc: ConnectedDocument): WorkflowFieldDocument {\n // Pages and tokens are a text-parsing concept: never meaningful for an image.\n const isImage = IMAGE_FILE_TYPES.has((doc.file_type ?? '').toLowerCase())\n return {\n id: doc.external_id,\n title: doc.doc_metadata?.title || doc.file_name || doc.external_id,\n fileName: doc.file_name,\n pages: isImage ? null : (doc.n_pages ?? null),\n tokens: isImage ? null : (doc.tokens ?? null),\n status: doc.status,\n isImage,\n }\n}\n\n/** The open workspace's folders and labels for a workflow's scope field. */\nexport function useConnectedWorkflowScopeSource(): WorkflowScopeSource {\n const { data: docs } = useConnectedDocuments()\n const { data: tags } = useConnectedTags()\n return useMemo(() => buildWorkflowScopeSource(docs, documentScopeLabels(tags)), [docs, tags])\n}\n\n/** The user's agents, for \"Run as\". */\nexport function useConnectedAgentOptions(): AgentOption[] {\n const { data: agents } = useAgents()\n return useMemo(\n () => (agents ?? []).map((a) => ({ id: a.external_id, label: a.given_name || a.email })),\n [agents]\n )\n}\n\nexport interface ConnectedWorkflowDocumentsFieldProps {\n field: WorkflowField\n value: WorkflowScope\n onChange: (value: WorkflowScope) => void\n /** Add files the host's way (its upload dialog). Absent: they are uploaded here. */\n onAddFiles?: (files?: File[]) => void\n labels?: Partial<WorkflowDocumentsFieldLabels>\n}\n\n/**\n * A workflow `documents` field over the open workspace's files: pick, add (or drop) files, see the\n * chosen images. A launcher's or a task composer's `renderDocuments`.\n */\nexport function ConnectedWorkflowDocumentsField({\n field,\n value,\n onChange,\n onAddFiles,\n labels,\n}: ConnectedWorkflowDocumentsFieldProps) {\n const { notify } = useBlocksEnvironment()\n const { ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: docs, loaded } = useConnectedDocuments()\n const uploadDocuments = useUploadDocuments()\n const documents = useMemo(() => docs.map(toWorkflowFieldDocument), [docs])\n const chosen = value.documents ?? []\n const { data: thumbnails } = useThumbnails(chosen, { enabled: (field.max ?? 1) > 1 })\n const input = useRef<HTMLInputElement>(null)\n const [adding, setAdding] = useState(false)\n\n const upload = useCallback(\n async (files: File[]) => {\n setAdding(true)\n try {\n await ensureWorkspaceOpen()\n // Each new document joins the shared list as it lands.\n for (const file of files) await uploadDocuments.mutateAsync({ files: [file] })\n } catch (error) {\n notify(error instanceof Error && error.message ? error.message : String(error), 'error')\n } finally {\n setAdding(false)\n }\n },\n [uploadDocuments, ensureWorkspaceOpen, notify]\n )\n\n return (\n <>\n {!onAddFiles && (\n <input\n ref={input}\n type=\"file\"\n multiple\n className=\"hidden\"\n aria-label=\"Add files\"\n data-testid=\"workflow-add-files-input\"\n onChange={(e) => {\n const files = Array.from(e.target.files ?? [])\n e.target.value = ''\n if (files.length) void upload(files)\n }}\n />\n )}\n <WorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n documents={documents}\n loaded={loaded}\n thumbnailOf={(id) => thumbnails?.[id]}\n onAddFiles={\n onAddFiles ?? ((files) => (files?.length ? void upload(files) : input.current?.click()))\n }\n adding={adding}\n labels={labels}\n />\n </>\n )\n}\n\nexport interface ConnectedWorkflowLauncherProps extends Omit<\n WorkflowLauncherProps,\n 'scopeSource' | 'renderDocuments' | 'agents'\n> {\n /** Add files from a `documents` field the host's way (its upload dialog). Absent: uploaded here. */\n onAddFiles?: (files?: File[]) => void\n}\n\nexport function ConnectedWorkflowLauncher({\n onAddFiles,\n ...props\n}: ConnectedWorkflowLauncherProps) {\n const scopeSource = useConnectedWorkflowScopeSource()\n const agents = useConnectedAgentOptions()\n return (\n <WorkflowLauncher\n {...props}\n scopeSource={scopeSource}\n agents={agents}\n renderDocuments={(field, value, onChange) => (\n <ConnectedWorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n onAddFiles={onAddFiles}\n />\n )}\n />\n )\n}\n","/**\n * The Word editor's references to the workspace's other documents: the documents and their\n * passages (the same parsed passages a fact's citations quote), the ARBI address of a passage\n * (`/wrk-…/doc-…/cnk-…`, the deep link that opens a document at a passage, so the link works from\n * Word too), and opening one wherever the host shows documents, highlighted like a citation.\n */\nimport { useMemo, useRef } from 'react'\nimport { useArbi } from '@arbidocs/react'\nimport type { DocxReferencesAdapter } from '../../docx/references/CrossReferences'\nimport { DocumentPicker } from '../../settings/DocumentPicker'\nimport { buildDeepLinkUrl, parseDeepLinkPath } from '../../lib/deep-link'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { toWorkflowFieldDocument } from '../ConnectedWorkflowLauncher'\nimport { useConnectedDocuments, type ConnectedDocument } from '../workspaceData'\n\ninterface ParsedChunk {\n content?: string | null\n metadata?: { chunk_ext_id?: string | null; page_number?: number | null } | null\n}\n\n/** Top-level documents only: an attachment opens with its parent. */\nconst isTopLevel = (doc: ConnectedDocument) => !doc.parent_ext_id\n\nfunction ReferencePicker({\n documents,\n selectedId,\n onSelect,\n}: {\n documents: ConnectedDocument[]\n selectedId: string | null\n onSelect: (documentId: string) => void\n}) {\n const groups = useMemo(() => {\n const docs = documents\n .filter(isTopLevel)\n .map(toWorkflowFieldDocument)\n .sort((a, b) => a.title.toLowerCase().localeCompare(b.title.toLowerCase()))\n return [{ id: 'all', heading: 'In this workspace', docs }]\n }, [documents])\n const selected = groups[0].docs.find((d) => d.id === selectedId)\n return (\n <DocumentPicker\n groups={groups}\n value={selectedId ?? ''}\n onValueChange={onSelect}\n selected={selected}\n labels={{ placeholder: 'Search documents…' }}\n />\n )\n}\n\nexport function useConnectedDocxReferences(): DocxReferencesAdapter {\n const arbi = useArbi()\n const { workspaceId } = useConnectedWorkspace()\n const { openDocument, runtimeConfig } = useBlocksEnvironment()\n const { data: documents } = useConnectedDocuments()\n // Read when called (the picker, a link): the list grows while the editor is open.\n const documentsRef = useRef(documents)\n documentsRef.current = documents\n return useMemo<DocxReferencesAdapter>(\n () => ({\n documents: async () =>\n documentsRef.current\n .filter(isTopLevel)\n .map((d) => ({ id: d.external_id, title: toWorkflowFieldDocument(d).title })),\n passages: async (documentId) => {\n const parsed = await arbi.documents.getParsedContent(documentId, 'final')\n return ((parsed.chunks ?? []) as ParsedChunk[]).flatMap((chunk) =>\n chunk.metadata?.chunk_ext_id && chunk.content?.trim()\n ? [\n {\n chunkId: chunk.metadata.chunk_ext_id,\n page: chunk.metadata.page_number ?? null,\n text: chunk.content,\n },\n ]\n : []\n )\n },\n linkFor: ({ documentId, chunkId, page }) => {\n const url = buildDeepLinkUrl(\n { workspaceId: workspaceId ?? undefined, documentId, chunkId },\n runtimeConfig.deploymentDomain\n )\n return page ? `${url}?page=${page}` : url\n },\n targetOf: (href) => {\n let url: URL\n try {\n url = new URL(href, window.location.origin)\n } catch {\n return null\n }\n const { documentId, chunkId } = parseDeepLinkPath(url.pathname)\n if (!documentId || !chunkId) return null\n const page = Number(url.searchParams.get('page')) || null\n return { documentId, chunkId, page }\n },\n open: ({ documentId, chunkId, page }) =>\n openDocument(documentId, { passageId: chunkId, page: page ?? undefined }),\n renderDocumentPicker: (onSelect, selectedId) => (\n <ReferencePicker\n documents={documentsRef.current}\n selectedId={selectedId}\n onSelect={onSelect}\n />\n ),\n }),\n [arbi, workspaceId, openDocument, runtimeConfig.deploymentDomain]\n )\n}\n","/**\n * The saved workflows bound to the connection: when each starts, its last run (a link to the thread\n * it created) and next run, who runs it, pause and resume, share, run now, delete (one or many), and\n * the workflow's history. The host opens a workflow (its builder) and its history; threads open\n * through the environment's `openConversation`, failures are told through its `notify`.\n */\n\nimport { useEffect, useMemo, useState } from 'react'\nimport {\n useAgents,\n useDeleteWorkflow,\n useUpdateWorkflow,\n useWorkflows,\n useWorkspaceUsers,\n type WorkflowResponse,\n} from '@arbidocs/react'\nimport { WorkflowsTable, type WorkflowsTableProps } from '../agents/tasks/WorkflowsTable'\nimport { workflowTriggerType } from '../agents/tasks/workflowRows'\nimport { fmtDate } from '../lib/format'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedConversations, useConnectedRunWorkflow } from './workspaceData'\n\n/** The viewer's role in the open workspace, and the workspace's members. */\nexport function useConnectedWorkspaceRole() {\n const { workspaceId, live, userId, ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: members = [] } = useWorkspaceUsers(workspaceId ?? undefined, {\n enabled: live && !!workspaceId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const role = members.find((m) => m.user.external_id === userId)?.role\n return {\n members,\n role,\n /** An owner or a collaborator edits, pauses, resumes and runs what is shared with the workspace. */\n canEditShared: role === 'owner' || role === 'collaborator',\n /** With an item's creator, the only one who deletes it. */\n isWorkspaceOwner: role === 'owner',\n }\n}\n\nexport interface ConnectedWorkflowsTableLabels {\n /** A change (pause, share, delete) that failed without a message. */\n updateFailed: string\n deleteTitle: string\n deleteOne: (name: string) => string\n deleteMany: (count: number) => string\n /** A run that failed: its history has the error report. */\n runFailed: string\n /** A run that created no thread. */\n noThread: string\n /** A document action that started (it has no thread): what is happening. */\n documentAction: (workflow: WorkflowResponse) => string\n untitledTask: string\n}\n\nexport const DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS: ConnectedWorkflowsTableLabels = {\n updateFailed: 'Could not update the workflow',\n deleteTitle: 'Delete workflow',\n deleteOne: (name) => `Delete “${name}”? Threads it already created stay.`,\n deleteMany: (count) => `Delete ${count} workflows? Threads they already created stay.`,\n runFailed: 'The workflow failed. You can send an error report from its history.',\n noThread: 'The workflow did not create a thread.',\n documentAction: (workflow) =>\n workflow.action?.type === 'email_documents'\n ? 'Preparing your document email'\n : 'Reviewing documents',\n untitledTask: 'Untitled thread',\n}\n\ntype TableProps = WorkflowsTableProps<WorkflowResponse>\n\nexport interface ConnectedWorkflowsTableProps extends Omit<\n TableProps,\n | 'workflows'\n | 'isLoading'\n | 'busyId'\n | 'describeTrigger'\n | 'formatDate'\n | 'onToggleActive'\n | 'onToggleShared'\n | 'onDelete'\n | 'onDeleteMany'\n | 'onToggleActiveMany'\n | 'onRun'\n | 'onOpenThread'\n | 'lastRuns'\n | 'agentNames'\n | 'taskNames'\n | 'canEditShared'\n | 'isWorkspaceOwner'\n> {\n /** Which saved workflows to list (e.g. those on a schedule). Default: all. */\n filter?: (workflow: WorkflowResponse) => boolean\n /** When a workflow starts, in the host's words. Default: its trigger type. */\n describeTrigger?: TableProps['describeTrigger']\n formatDate?: TableProps['formatDate']\n connectedLabels?: Partial<ConnectedWorkflowsTableLabels>\n}\n\nconst messageOf = (error: unknown) => (error instanceof Error ? error.message : '')\n\nexport function ConnectedWorkflowsTable({\n filter,\n describeTrigger = (w) => workflowTriggerType(w).replaceAll('_', ' '),\n formatDate = fmtDate,\n onViewRuns,\n connectedLabels,\n ...tableProps\n}: ConnectedWorkflowsTableProps) {\n const l = { ...DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, ...connectedLabels }\n const { notify, confirm, openConversation } = useBlocksEnvironment()\n const { canEditShared, isWorkspaceOwner } = useConnectedWorkspaceRole()\n const { data: saved = [], isLoading } = useWorkflows({ live: true })\n const { data: conversations, refetch } = useConnectedConversations({ live: true })\n const { data: agents = [] } = useAgents()\n const update = useUpdateWorkflow()\n const remove = useDeleteWorkflow()\n const run = useConnectedRunWorkflow()\n const [busyId, setBusyId] = useState<string | null>(null)\n\n const workflows = useMemo(() => (filter ? saved.filter(filter) : saved), [saved, filter])\n // A clock or an event fired a workflow: the thread it created is new to the conversation list.\n const firingStamp = saved.map((w) => `${w.external_id}:${w.last_fired_at ?? ''}`).join('|')\n useEffect(() => {\n void refetch?.()\n }, [firingStamp, refetch])\n\n const lastRuns = useMemo(() => {\n const out: NonNullable<TableProps['lastRuns']> = {}\n for (const c of conversations) {\n const id = c.workflow_ext_id\n if (id && (!out[id] || Date.parse(c.created_at) > Date.parse(out[id].at)))\n out[id] = { conversationId: c.external_id, at: c.created_at, threadStatus: c.status }\n }\n return out\n }, [conversations])\n const agentNames = useMemo(\n () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),\n [agents]\n )\n const taskNames = useMemo(\n () =>\n Object.fromEntries(\n conversations\n .filter((c) => c.status != null)\n .map((c) => [c.external_id, c.title || l.untitledTask])\n ),\n [conversations, l.untitledTask]\n )\n\n const act = async (workflow: WorkflowResponse, action: () => Promise<unknown>) => {\n setBusyId(workflow.external_id)\n try {\n await action()\n } catch (error) {\n notify(messageOf(error) || l.updateFailed, 'error')\n } finally {\n setBusyId(null)\n }\n }\n const setActive = (workflow: WorkflowResponse, active: boolean) =>\n act(workflow, () => update.mutateAsync({ workflowId: workflow.external_id, patch: { active } }))\n const deleteAll = async (items: WorkflowResponse[]) => {\n if (!items.length) return\n const ok = await confirm({\n title: l.deleteTitle,\n message: items.length === 1 ? l.deleteOne(items[0].name) : l.deleteMany(items.length),\n })\n if (!ok) return\n for (const workflow of items)\n await act(workflow, () => remove.mutateAsync(workflow.external_id))\n }\n\n return (\n <WorkflowsTable\n {...tableProps}\n workflows={workflows}\n isLoading={isLoading}\n busyId={busyId}\n describeTrigger={describeTrigger}\n formatDate={formatDate}\n agentNames={agentNames}\n taskNames={taskNames}\n lastRuns={lastRuns}\n canEditShared={canEditShared}\n isWorkspaceOwner={isWorkspaceOwner}\n onOpenThread={(conversationId) => openConversation(conversationId)}\n onViewRuns={onViewRuns}\n onToggleActive={(workflow, active) => void setActive(workflow, active)}\n onToggleActiveMany={(items, active) => {\n void (async () => {\n for (const workflow of items) await setActive(workflow, active)\n })()\n }}\n onToggleShared={(workflow, shared) =>\n void act(workflow, () =>\n update.mutateAsync({ workflowId: workflow.external_id, patch: { shared } })\n )\n }\n onDelete={(workflow) => void deleteAll([workflow])}\n onDeleteMany={(items) => void deleteAll(items)}\n onRun={(workflow) =>\n void act(workflow, async () => {\n const result = await run.mutateAsync(workflow.external_id)\n if (result.conversation_ext_id) openConversation(result.conversation_ext_id)\n if (result.error) {\n onViewRuns?.(workflow)\n notify(l.runFailed, 'error')\n return\n }\n if (result.execution_id && !result.conversation_ext_id) {\n // A document action runs without a thread: its history shows how it goes.\n onViewRuns?.(workflow)\n notify(l.documentAction(workflow), 'success')\n return\n }\n if (!result.conversation_ext_id) throw new Error(l.noThread)\n })\n }\n />\n )\n}\n","/**\n * The house template for the open workspace: its own (a document of the workspace), else the\n * deployment's default, else ARBI's built-in legal template. A workspace owner can make a document\n * the house template once the server supports it.\n */\nimport { useMemo } from 'react'\nimport {\n supportsHouseTemplates,\n useArbi,\n useHouseTemplateCandidates,\n useSetWorkspaceHouseTemplate,\n useWorkspaces,\n workspaceHouseTemplateId,\n} from '@arbidocs/react'\nimport { contentPath } from '../../docx/NativeDocxEditor'\nimport {\n builtinHouseTemplate,\n type HouseTemplate,\n type HouseTemplateHost,\n} from '../../docx/template/HouseTemplate'\nimport { isCandidate } from '../../docx/template/candidates'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { useConnectedWorkspaceRole } from '../ConnectedWorkflowsTable'\n\nexport function useConnectedHouseTemplate(): HouseTemplateHost {\n const arbi = useArbi()\n const { mutateAsync: setWorkspaceTemplate } = useSetWorkspaceHouseTemplate()\n const { workspaceId, live, ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: workspaces } = useWorkspaces({ enabled: live })\n const workspace = workspaces?.find((w) => w.external_id === workspaceId)\n const { isWorkspaceOwner } = useConnectedWorkspaceRole()\n const supported = supportsHouseTemplates(workspace)\n const templateId = workspaceHouseTemplateId(workspace)\n // Only an eligible document (shared, Word, here or in a public workspace) is offered as the template.\n const { data: candidates } = useHouseTemplateCandidates(\n workspaceId,\n supported && isWorkspaceOwner\n )\n return useMemo<HouseTemplateHost>(\n () => ({\n load: async (): Promise<HouseTemplate> => {\n if (templateId) {\n await ensureWorkspaceOpen()\n const response = await arbi.editor.request(contentPath(templateId))\n const [record] = await arbi.documents.get([templateId]).catch(() => [])\n return {\n bytes: new Uint8Array(await response.arrayBuffer()),\n name: record?.file_name ?? 'House template.docx',\n source: 'workspace',\n documentId: templateId,\n }\n }\n if (supported) {\n const deployment = await arbi.houseTemplates.deployment()\n if (deployment) return { ...deployment, source: 'deployment' }\n }\n return builtinHouseTemplate()\n },\n setFromDocument:\n supported && isWorkspaceOwner\n ? async (documentId) => {\n await ensureWorkspaceOpen()\n await setWorkspaceTemplate(documentId)\n }\n : undefined,\n isEligible: (documentId) => isCandidate(candidates, documentId),\n }),\n [\n arbi,\n setWorkspaceTemplate,\n supported,\n templateId,\n isWorkspaceOwner,\n candidates,\n ensureWorkspaceOpen,\n ]\n )\n}\n","import { useMemo, useRef, useState } from 'react'\nimport { useQueryClient } from '@tanstack/react-query'\nimport { refreshDocuments, useArbi, useWorkspaceUsers } from '@arbidocs/react'\nimport {\n fetchSavedSignature,\n storeSavedSignature,\n useOptionalDocumentTools,\n} from '@arbidocs/react/document-tools'\nimport {\n NativeDocxEditor,\n type NativeDocxAdapter,\n type NativeDocxEditorProps,\n} from '../../docx/NativeDocxEditor'\nimport { loadDocxFonts } from '../../docx/fonts'\nimport { useRegisterOpenDocument } from '../../chat/open-document'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { useDocxCommentTarget, useNativeDocxSupport } from './support'\nimport { useConnectedDocxReferences } from './useConnectedDocxReferences'\nimport { useConnectedHouseTemplate } from './useConnectedHouseTemplate'\n\nexport type ConnectedNativeDocxEditorProps = Omit<NativeDocxEditorProps, 'adapter'> & {\n fontBaseUrl?: string\n}\n\n/**\n * The native Word editor on the signed-in ARBI session, under any host (`defaultHost`'s sign-in\n * layer, or the host's own `arbi` and session state). Until a live session has opened, a failure to\n * open one falls back to the saved copy, read-only, so the document is still readable; later token\n * refreshes are not guarded (switching modes would drop unsaved edits).\n */\nexport function ConnectedNativeDocxEditor({\n fontBaseUrl = '/native-docx/fonts',\n ...props\n}: ConnectedNativeDocxEditorProps) {\n const adapter = useConnectedNativeDocxAdapter(fontBaseUrl)\n const { workspaceId } = useConnectedWorkspace()\n const commentTarget = useDocxCommentTarget()\n const [openFailed, setOpenFailed] = useState(false)\n const hasOpened = useRef(false)\n const guardedAdapter = useMemo<NativeDocxAdapter>(\n () => ({\n ...adapter,\n open: async (documentId) => {\n try {\n const session = await adapter.open(documentId)\n hasOpened.current = true\n return session\n } catch (error) {\n if (!hasOpened.current) setOpenFailed(true)\n throw error\n }\n },\n }),\n [adapter]\n )\n // Drafting mode: the saved Word document being edited is what the chat is about. A history\n // snapshot, a streamed preview, an unsaved draft and an embedded body field are not.\n const live = !props.snapshot && !props.stream && !props.draftContent && !props.compact\n useRegisterOpenDocument({ documentId: live ? props.documentId : null, workspaceId })\n const initialCommentId =\n props.initialCommentId ??\n (commentTarget?.documentId === props.documentId ? commentTarget.commentId : undefined)\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n {openFailed && (\n <p role=\"status\" className=\"text-muted-foreground border-b px-3 py-2 text-xs\">\n Co-editing isn't available for this document right now, so this is a read-only copy\n of the last saved version.\n </p>\n )}\n <div className=\"min-h-0 flex-1\">\n <NativeDocxEditor\n {...props}\n snapshot={props.snapshot || openFailed}\n initialCommentId={initialCommentId}\n adapter={guardedAdapter}\n />\n </div>\n </div>\n )\n}\n\n/** The access token changed (a refresh): the live room is told the new one. */\nfunction tokenChanges(arbi: ReturnType<typeof useArbi>) {\n return (listener: () => void) => {\n if (!arbi.isLoggedIn) return () => {}\n const session = arbi.getClient().session\n let token = session.getState().accessToken\n return session.subscribe((state) => {\n if (state.accessToken === token) return\n token = state.accessToken\n listener()\n })\n }\n}\n\n/**\n * The native Word adapter on the signed-in session: the editor transport, the people to mention,\n * cross-references, the house template, and the host's extras (its host config's `docx`).\n */\nexport function useConnectedNativeDocxAdapter(fontBaseUrl = '/native-docx/fonts') {\n const arbi = useArbi()\n const { workspaceId, live, user, ensureWorkspaceOpen } = useConnectedWorkspace()\n const queries = useQueryClient()\n const { notify } = useBlocksEnvironment()\n const tools = useOptionalDocumentTools()\n const support = useNativeDocxSupport()\n const references = useConnectedDocxReferences()\n const houseTemplate = useConnectedHouseTemplate()\n const { data: members } = useWorkspaceUsers(workspaceId ?? undefined, {\n enabled: live && !!workspaceId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const onDocumentsChanged = tools?.onDocumentsChanged\n // Tracked changes and comments are authored by the user's first name.\n const author = (live && arbi.user.profile()?.givenName) || user?.name || 'You'\n const adapter = useMemo<NativeDocxAdapter>(\n () => ({\n request: async (path, options) => {\n await ensureWorkspaceOpen()\n return arbi.editor.request(path, options)\n },\n open: async (id) => {\n await ensureWorkspaceOpen()\n return (\n await arbi.editor.request(`/${encodeURIComponent(id)}/session`, { method: 'POST' })\n ).json()\n },\n save: async (id, state) =>\n (\n await arbi.editor.request(`/${encodeURIComponent(id)}/save`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ state }),\n })\n ).json(),\n loadFonts: () => loadDocxFonts(fontBaseUrl),\n baseUrl: arbi.getConnectionInfo()?.baseUrl || window.location.origin,\n author,\n subscribeTokenChanges: tokenChanges(arbi),\n onDirtyChange: support.onDirtyChange,\n // The document's row moves to the saved version in place: through the host when it keeps\n // the lists (its document tools refresh them), else here.\n onVersionSaved: async (id) => {\n await (onDocumentsChanged\n ? onDocumentsChanged([id], 'version')\n : refreshDocuments(queries, arbi, [id]))\n },\n notify,\n mentions: members?.map(({ user: member }) => ({\n id: member.external_id,\n name: [member.given_name, member.family_name].filter(Boolean).join(' '),\n kind: member.external_id.startsWith('agt-') ? 'agent' : 'human',\n })),\n savedSignature: {\n load: () => fetchSavedSignature(arbi.getClient().fetch),\n save: (signature) => storeSavedSignature(arbi.getClient().fetch, signature),\n defaultName: user?.name ?? '',\n },\n signatureSigners: members\n ?.filter(({ user: member }) => member.external_id.startsWith('usr-'))\n .map(({ user: member }) => ({\n email: member.email,\n name: [member.given_name, member.family_name].filter(Boolean).join(' '),\n })),\n requestAgent: async (id, request) => {\n const response = await arbi.editor.request(`/${encodeURIComponent(id)}/mentions`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n comment_id: request.commentId,\n instruction: request.instruction,\n request_id: request.requestId,\n recipient_ids: request.recipientIds,\n }),\n })\n const delivery = (await response.json()) as { response_ids: string[] }\n notify('Mention delivered.', 'success')\n return { responseIds: delivery.response_ids || [] }\n },\n getAgentStatus: async (responseId) => (await arbi.assistant.getResponse(responseId)).status,\n definitions: support.definitions,\n references,\n imageGeneration: support.imageGeneration,\n houseTemplate,\n }),\n [\n arbi,\n author,\n members,\n ensureWorkspaceOpen,\n fontBaseUrl,\n queries,\n notify,\n onDocumentsChanged,\n support,\n references,\n houseTemplate,\n user?.name,\n ]\n )\n return adapter\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/connection/docx/support.ts","../src/connection/ConnectedWorkflowLauncher.tsx","../src/connection/docx/useConnectedDocxReferences.tsx","../src/connection/ConnectedWorkflowsTable.tsx","../src/connection/docx/useConnectedHouseTemplate.ts","../src/connection/docx/ConnectedNativeDocxEditor.tsx"],"names":["useHost","useConnectedDocuments","useConnectedTags","useMemo","buildWorkflowScopeSource","documentScopeLabels","useAgents","useBlocksEnvironment","useConnectedWorkspace","useUploadDocuments","useThumbnails","useRef","useState","useCallback","jsxs","Fragment","jsx","WorkflowDocumentsField","WorkflowLauncher","DocumentPicker","useArbi","buildDeepLinkUrl","parseDeepLinkPath","useWorkspaceUsers","workflowTriggerType","fmtDate","useWorkflows","useConnectedConversations","useUpdateWorkflow","useDeleteWorkflow","useConnectedRunWorkflow","useEffect","WorkflowsTable","useSetWorkspaceHouseTemplate","useWorkspaces","supportsHouseTemplates","workspaceHouseTemplateId","useHouseTemplateCandidates","contentPath","builtinHouseTemplate","isCandidate","useRegisterOpenDocument","NativeDocxEditor","useQueryClient","useOptionalDocumentTools","loadDocxFonts","refreshDocuments","fetchSavedSignature","storeSavedSignature"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,IAAM,aAAgC,EAAC;AACvC,IAAM,YAAY,MAAM,IAAA;AAEjB,SAAS,oBAAA,GAA0C;AACxD,EAAA,OAAOA,yBAAA,GAAU,IAAA,IAAQ,UAAA;AAC3B;AAGO,SAAS,oBAAA,GAAyE;AACvF,EAAA,MAAM,SAAA,GAAY,oBAAA,EAAqB,C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,EAAG,MAAA;AAAA,MACrF,aAAa,OAAA,CAAQ,WAAA;AAAA,MACrB,UAAA;AAAA,MACA,iBAAiB,OAAA,CAAQ,eAAA;AAAA,MACzB;AAAA,KACF,CAAA;AAAA,IACA;AAAA,MACE,IAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,mBAAA;AAAA,MACA,WAAA;AAAA,MACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,kBAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA,EAAM;AAAA;AACR,GACF;AACA,EAAA,OAAO,OAAA;AACT","file":"chunk-PTSTVYQD.cjs","sourcesContent":["/**\n * What a host adds to the connected Word editor that the platform API alone cannot give: the\n * workspace's definitions (facts labelled \"Definitions\"), image generation (an assistant run), the\n * host's leave-page guard, and a comment to open the editor at. It is the host configuration's\n * `docx`; every field is optional, and without one the editor simply offers less (no Defined term,\n * no Generate image).\n */\n\nimport { useHost } from '../../provider/host'\nimport type { DefinitionSource } from '../../tags/definitions'\nimport type { DocxImageGeneration } from '../../docx/layout/GenerateImage'\n\nexport interface NativeDocxSupport {\n /** The workspace's definitions. Present: Insert offers Defined term and `@@` the type-ahead. */\n definitions?: () => Promise<DefinitionSource[]>\n /** The platform's image generation. Present: Insert offers Generate image. */\n imageGeneration?: DocxImageGeneration\n /** The open editor has (or no longer has) unsaved changes. */\n onDirtyChange?: (dirty: boolean) => void\n /** A comment thread to open when its document opens (a notification's link), as a hook. */\n useCommentTarget?: () => { documentId: string; commentId: string } | null\n}\n\nconst NO_SUPPORT: NativeDocxSupport = {}\nconst NO_TARGET = () => null\n\nexport function useNativeDocxSupport(): NativeDocxSupport {\n return useHost().docx ?? NO_SUPPORT\n}\n\n/** The comment thread to open with its document (none without the host's). */\nexport function useDocxCommentTarget(): { documentId: string; commentId: string } | null {\n const useTarget = useNativeDocxSupport().useCommentTarget ?? NO_TARGET\n return useTarget()\n}\n","/**\n * The workflow launcher bound to the connection: the open workspace's folders, labels and files\n * behind its scope and `documents` fields (files can be added right there), and the user's agents\n * behind \"Run as\". The host still says what a launch does (`onLaunch`): open a chat, start a task.\n */\n\nimport { useCallback, useMemo, useRef, useState } from 'react'\nimport { useAgents, useThumbnails, useUploadDocuments } from '@arbidocs/react'\nimport { WorkflowLauncher, type WorkflowLauncherProps } from '../agents/workflows/WorkflowLauncher'\nimport {\n WorkflowDocumentsField,\n type WorkflowDocumentsFieldLabels,\n type WorkflowFieldDocument,\n} from '../agents/workflows/WorkflowDocumentsField'\nimport type { WorkflowScopeSource } from '../agents/workflows/WorkflowConfigDialog'\nimport { buildWorkflowScopeSource, documentScopeLabels } from '../agents/workflows/workspaceScope'\nimport type { AgentOption } from '../agents/workflows/AgentSelect'\nimport type { WorkflowField, WorkflowScope } from '../agents/workflows/types'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedDocuments, useConnectedTags, type ConnectedDocument } from './workspaceData'\n\nconst IMAGE_FILE_TYPES = new Set(['png', 'jpg', 'jpeg', 'gif', 'bmp', 'tiff', 'webp'])\n\n/** A workspace document as a `documents` field offers it. */\nexport function toWorkflowFieldDocument(doc: ConnectedDocument): WorkflowFieldDocument {\n // Pages and tokens are a text-parsing concept: never meaningful for an image.\n const isImage = IMAGE_FILE_TYPES.has((doc.file_type ?? '').toLowerCase())\n return {\n id: doc.external_id,\n title: doc.doc_metadata?.title || doc.file_name || doc.external_id,\n fileName: doc.file_name,\n pages: isImage ? null : (doc.n_pages ?? null),\n tokens: isImage ? null : (doc.tokens ?? null),\n status: doc.status,\n isImage,\n }\n}\n\n/** The open workspace's folders and labels for a workflow's scope field. */\nexport function useConnectedWorkflowScopeSource(): WorkflowScopeSource {\n const { data: docs } = useConnectedDocuments()\n const { data: tags } = useConnectedTags()\n return useMemo(() => buildWorkflowScopeSource(docs, documentScopeLabels(tags)), [docs, tags])\n}\n\n/** The user's agents, for \"Run as\". */\nexport function useConnectedAgentOptions(): AgentOption[] {\n const { data: agents } = useAgents()\n return useMemo(\n () => (agents ?? []).map((a) => ({ id: a.external_id, label: a.given_name || a.email })),\n [agents]\n )\n}\n\nexport interface ConnectedWorkflowDocumentsFieldProps {\n field: WorkflowField\n value: WorkflowScope\n onChange: (value: WorkflowScope) => void\n /** Add files the host's way (its upload dialog). Absent: they are uploaded here. */\n onAddFiles?: (files?: File[]) => void\n labels?: Partial<WorkflowDocumentsFieldLabels>\n}\n\n/**\n * A workflow `documents` field over the open workspace's files: pick, add (or drop) files, see the\n * chosen images. A launcher's or a task composer's `renderDocuments`.\n */\nexport function ConnectedWorkflowDocumentsField({\n field,\n value,\n onChange,\n onAddFiles,\n labels,\n}: ConnectedWorkflowDocumentsFieldProps) {\n const { notify } = useBlocksEnvironment()\n const { ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: docs, loaded } = useConnectedDocuments()\n const uploadDocuments = useUploadDocuments()\n const documents = useMemo(() => docs.map(toWorkflowFieldDocument), [docs])\n const chosen = value.documents ?? []\n const { data: thumbnails } = useThumbnails(chosen, { enabled: (field.max ?? 1) > 1 })\n const input = useRef<HTMLInputElement>(null)\n const [adding, setAdding] = useState(false)\n\n const upload = useCallback(\n async (files: File[]) => {\n setAdding(true)\n try {\n await ensureWorkspaceOpen()\n // Each new document joins the shared list as it lands.\n for (const file of files) await uploadDocuments.mutateAsync({ files: [file] })\n } catch (error) {\n notify(error instanceof Error && error.message ? error.message : String(error), 'error')\n } finally {\n setAdding(false)\n }\n },\n [uploadDocuments, ensureWorkspaceOpen, notify]\n )\n\n return (\n <>\n {!onAddFiles && (\n <input\n ref={input}\n type=\"file\"\n multiple\n className=\"hidden\"\n aria-label=\"Add files\"\n data-testid=\"workflow-add-files-input\"\n onChange={(e) => {\n const files = Array.from(e.target.files ?? [])\n e.target.value = ''\n if (files.length) void upload(files)\n }}\n />\n )}\n <WorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n documents={documents}\n loaded={loaded}\n thumbnailOf={(id) => thumbnails?.[id]}\n onAddFiles={\n onAddFiles ?? ((files) => (files?.length ? void upload(files) : input.current?.click()))\n }\n adding={adding}\n labels={labels}\n />\n </>\n )\n}\n\nexport interface ConnectedWorkflowLauncherProps extends Omit<\n WorkflowLauncherProps,\n 'scopeSource' | 'renderDocuments' | 'agents'\n> {\n /** Add files from a `documents` field the host's way (its upload dialog). Absent: uploaded here. */\n onAddFiles?: (files?: File[]) => void\n}\n\nexport function ConnectedWorkflowLauncher({\n onAddFiles,\n ...props\n}: ConnectedWorkflowLauncherProps) {\n const scopeSource = useConnectedWorkflowScopeSource()\n const agents = useConnectedAgentOptions()\n return (\n <WorkflowLauncher\n {...props}\n scopeSource={scopeSource}\n agents={agents}\n renderDocuments={(field, value, onChange) => (\n <ConnectedWorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n onAddFiles={onAddFiles}\n />\n )}\n />\n )\n}\n","/**\n * The Word editor's references to the workspace's other documents: the documents and their\n * passages (the same parsed passages a fact's citations quote), the ARBI address of a passage\n * (`/wrk-…/doc-…/cnk-…`, the deep link that opens a document at a passage, so the link works from\n * Word too), and opening one wherever the host shows documents, highlighted like a citation.\n */\nimport { useMemo, useRef } from 'react'\nimport { useArbi } from '@arbidocs/react'\nimport type { DocxReferencesAdapter } from '../../docx/references/CrossReferences'\nimport { DocumentPicker } from '../../settings/DocumentPicker'\nimport { buildDeepLinkUrl, parseDeepLinkPath } from '../../lib/deep-link'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { toWorkflowFieldDocument } from '../ConnectedWorkflowLauncher'\nimport { useConnectedDocuments, type ConnectedDocument } from '../workspaceData'\n\ninterface ParsedChunk {\n content?: string | null\n metadata?: { chunk_ext_id?: string | null; page_number?: number | null } | null\n}\n\n/** Top-level documents only: an attachment opens with its parent. */\nconst isTopLevel = (doc: ConnectedDocument) => !doc.parent_ext_id\n\nfunction ReferencePicker({\n documents,\n selectedId,\n onSelect,\n}: {\n documents: ConnectedDocument[]\n selectedId: string | null\n onSelect: (documentId: string) => void\n}) {\n const groups = useMemo(() => {\n const docs = documents\n .filter(isTopLevel)\n .map(toWorkflowFieldDocument)\n .sort((a, b) => a.title.toLowerCase().localeCompare(b.title.toLowerCase()))\n return [{ id: 'all', heading: 'In this workspace', docs }]\n }, [documents])\n const selected = groups[0].docs.find((d) => d.id === selectedId)\n return (\n <DocumentPicker\n groups={groups}\n value={selectedId ?? ''}\n onValueChange={onSelect}\n selected={selected}\n labels={{ placeholder: 'Search documents…' }}\n />\n )\n}\n\nexport function useConnectedDocxReferences(): DocxReferencesAdapter {\n const arbi = useArbi()\n const { workspaceId } = useConnectedWorkspace()\n const { openDocument, runtimeConfig } = useBlocksEnvironment()\n const { data: documents } = useConnectedDocuments()\n // Read when called (the picker, a link): the list grows while the editor is open.\n const documentsRef = useRef(documents)\n documentsRef.current = documents\n return useMemo<DocxReferencesAdapter>(\n () => ({\n documents: async () =>\n documentsRef.current\n .filter(isTopLevel)\n .map((d) => ({ id: d.external_id, title: toWorkflowFieldDocument(d).title })),\n passages: async (documentId) => {\n const parsed = await arbi.documents.getParsedContent(documentId, 'final')\n return ((parsed.chunks ?? []) as ParsedChunk[]).flatMap((chunk) =>\n chunk.metadata?.chunk_ext_id && chunk.content?.trim()\n ? [\n {\n chunkId: chunk.metadata.chunk_ext_id,\n page: chunk.metadata.page_number ?? null,\n text: chunk.content,\n },\n ]\n : []\n )\n },\n linkFor: ({ documentId, chunkId, page }) => {\n const url = buildDeepLinkUrl(\n { workspaceId: workspaceId ?? undefined, documentId, chunkId },\n runtimeConfig.deploymentDomain\n )\n return page ? `${url}?page=${page}` : url\n },\n targetOf: (href) => {\n let url: URL\n try {\n url = new URL(href, window.location.origin)\n } catch {\n return null\n }\n const { documentId, chunkId } = parseDeepLinkPath(url.pathname)\n if (!documentId || !chunkId) return null\n const page = Number(url.searchParams.get('page')) || null\n return { documentId, chunkId, page }\n },\n open: ({ documentId, chunkId, page }) =>\n openDocument(documentId, { passageId: chunkId, page: page ?? undefined }),\n renderDocumentPicker: (onSelect, selectedId) => (\n <ReferencePicker\n documents={documentsRef.current}\n selectedId={selectedId}\n onSelect={onSelect}\n />\n ),\n }),\n [arbi, workspaceId, openDocument, runtimeConfig.deploymentDomain]\n )\n}\n","/**\n * The saved workflows bound to the connection: when each starts, its last run (a link to the thread\n * it created) and next run, who runs it, pause and resume, share, run now, delete (one or many), and\n * the workflow's history. The host opens a workflow (its builder) and its history; threads open\n * through the environment's `openConversation`, failures are told through its `notify`.\n */\n\nimport { useEffect, useMemo, useState } from 'react'\nimport {\n useAgents,\n useDeleteWorkflow,\n useUpdateWorkflow,\n useWorkflows,\n useWorkspaceUsers,\n type WorkflowResponse,\n} from '@arbidocs/react'\nimport { WorkflowsTable, type WorkflowsTableProps } from '../agents/tasks/WorkflowsTable'\nimport { workflowTriggerType } from '../agents/tasks/workflowRows'\nimport { fmtDate } from '../lib/format'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedConversations, useConnectedRunWorkflow } from './workspaceData'\n\n/** The viewer's role in the open workspace, and the workspace's members. */\nexport function useConnectedWorkspaceRole() {\n const { workspaceId, live, userId, ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: members = [] } = useWorkspaceUsers(workspaceId ?? undefined, {\n enabled: live && !!workspaceId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const role = members.find((m) => m.user.external_id === userId)?.role\n return {\n members,\n role,\n /** An owner or a collaborator edits, pauses, resumes and runs what is shared with the workspace. */\n canEditShared: role === 'owner' || role === 'collaborator',\n /** With an item's creator, the only one who deletes it. */\n isWorkspaceOwner: role === 'owner',\n }\n}\n\nexport interface ConnectedWorkflowsTableLabels {\n /** A change (pause, share, delete) that failed without a message. */\n updateFailed: string\n deleteTitle: string\n deleteOne: (name: string) => string\n deleteMany: (count: number) => string\n /** A run that failed: its history has the error report. */\n runFailed: string\n /** A run that created no thread. */\n noThread: string\n /** A document action that started (it has no thread): what is happening. */\n documentAction: (workflow: WorkflowResponse) => string\n untitledTask: string\n}\n\nexport const DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS: ConnectedWorkflowsTableLabels = {\n updateFailed: 'Could not update the workflow',\n deleteTitle: 'Delete workflow',\n deleteOne: (name) => `Delete “${name}”? Threads it already created stay.`,\n deleteMany: (count) => `Delete ${count} workflows? Threads they already created stay.`,\n runFailed: 'The workflow failed. You can send an error report from its history.',\n noThread: 'The workflow did not create a thread.',\n documentAction: (workflow) =>\n workflow.action?.type === 'email_documents'\n ? 'Preparing your document email'\n : 'Reviewing documents',\n untitledTask: 'Untitled thread',\n}\n\ntype TableProps = WorkflowsTableProps<WorkflowResponse>\n\nexport interface ConnectedWorkflowsTableProps extends Omit<\n TableProps,\n | 'workflows'\n | 'isLoading'\n | 'busyId'\n | 'describeTrigger'\n | 'formatDate'\n | 'onToggleActive'\n | 'onToggleShared'\n | 'onDelete'\n | 'onDeleteMany'\n | 'onToggleActiveMany'\n | 'onRun'\n | 'onOpenThread'\n | 'lastRuns'\n | 'agentNames'\n | 'taskNames'\n | 'canEditShared'\n | 'isWorkspaceOwner'\n> {\n /** Which saved workflows to list (e.g. those on a schedule). Default: all. */\n filter?: (workflow: WorkflowResponse) => boolean\n /** When a workflow starts, in the host's words. Default: its trigger type. */\n describeTrigger?: TableProps['describeTrigger']\n formatDate?: TableProps['formatDate']\n connectedLabels?: Partial<ConnectedWorkflowsTableLabels>\n}\n\nconst messageOf = (error: unknown) => (error instanceof Error ? error.message : '')\n\nexport function ConnectedWorkflowsTable({\n filter,\n describeTrigger = (w) => workflowTriggerType(w).replaceAll('_', ' '),\n formatDate = fmtDate,\n onViewRuns,\n connectedLabels,\n ...tableProps\n}: ConnectedWorkflowsTableProps) {\n const l = { ...DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, ...connectedLabels }\n const { notify, confirm, openConversation } = useBlocksEnvironment()\n const { canEditShared, isWorkspaceOwner } = useConnectedWorkspaceRole()\n const { data: saved = [], isLoading } = useWorkflows({ live: true })\n const { data: conversations, refetch } = useConnectedConversations({ live: true })\n const { data: agents = [] } = useAgents()\n const update = useUpdateWorkflow()\n const remove = useDeleteWorkflow()\n const run = useConnectedRunWorkflow()\n const [busyId, setBusyId] = useState<string | null>(null)\n\n const workflows = useMemo(() => (filter ? saved.filter(filter) : saved), [saved, filter])\n // A clock or an event fired a workflow: the thread it created is new to the conversation list.\n const firingStamp = saved.map((w) => `${w.external_id}:${w.last_fired_at ?? ''}`).join('|')\n useEffect(() => {\n void refetch?.()\n }, [firingStamp, refetch])\n\n const lastRuns = useMemo(() => {\n const out: NonNullable<TableProps['lastRuns']> = {}\n for (const c of conversations) {\n const id = c.workflow_ext_id\n if (id && (!out[id] || Date.parse(c.created_at) > Date.parse(out[id].at)))\n out[id] = { conversationId: c.external_id, at: c.created_at, threadStatus: c.status }\n }\n return out\n }, [conversations])\n const agentNames = useMemo(\n () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),\n [agents]\n )\n const taskNames = useMemo(\n () =>\n Object.fromEntries(\n conversations\n .filter((c) => c.status != null)\n .map((c) => [c.external_id, c.title || l.untitledTask])\n ),\n [conversations, l.untitledTask]\n )\n\n const act = async (workflow: WorkflowResponse, action: () => Promise<unknown>) => {\n setBusyId(workflow.external_id)\n try {\n await action()\n } catch (error) {\n notify(messageOf(error) || l.updateFailed, 'error')\n } finally {\n setBusyId(null)\n }\n }\n const setActive = (workflow: WorkflowResponse, active: boolean) =>\n act(workflow, () => update.mutateAsync({ workflowId: workflow.external_id, patch: { active } }))\n const deleteAll = async (items: WorkflowResponse[]) => {\n if (!items.length) return\n const ok = await confirm({\n title: l.deleteTitle,\n message: items.length === 1 ? l.deleteOne(items[0].name) : l.deleteMany(items.length),\n })\n if (!ok) return\n for (const workflow of items)\n await act(workflow, () => remove.mutateAsync(workflow.external_id))\n }\n\n return (\n <WorkflowsTable\n {...tableProps}\n workflows={workflows}\n isLoading={isLoading}\n busyId={busyId}\n describeTrigger={describeTrigger}\n formatDate={formatDate}\n agentNames={agentNames}\n taskNames={taskNames}\n lastRuns={lastRuns}\n canEditShared={canEditShared}\n isWorkspaceOwner={isWorkspaceOwner}\n onOpenThread={(conversationId) => openConversation(conversationId)}\n onViewRuns={onViewRuns}\n onToggleActive={(workflow, active) => void setActive(workflow, active)}\n onToggleActiveMany={(items, active) => {\n void (async () => {\n for (const workflow of items) await setActive(workflow, active)\n })()\n }}\n onToggleShared={(workflow, shared) =>\n void act(workflow, () =>\n update.mutateAsync({ workflowId: workflow.external_id, patch: { shared } })\n )\n }\n onDelete={(workflow) => void deleteAll([workflow])}\n onDeleteMany={(items) => void deleteAll(items)}\n onRun={(workflow) =>\n void act(workflow, async () => {\n const result = await run.mutateAsync(workflow.external_id)\n if (result.conversation_ext_id) openConversation(result.conversation_ext_id)\n if (result.error) {\n onViewRuns?.(workflow)\n notify(l.runFailed, 'error')\n return\n }\n if (result.execution_id && !result.conversation_ext_id) {\n // A document action runs without a thread: its history shows how it goes.\n onViewRuns?.(workflow)\n notify(l.documentAction(workflow), 'success')\n return\n }\n if (!result.conversation_ext_id) throw new Error(l.noThread)\n })\n }\n />\n )\n}\n","/**\n * The house template for the open workspace: its own (a document of the workspace), else the\n * deployment's default, else ARBI's built-in legal template. A workspace owner can make a document\n * the house template once the server supports it.\n */\nimport { useMemo } from 'react'\nimport {\n supportsHouseTemplates,\n useArbi,\n useHouseTemplateCandidates,\n useSetWorkspaceHouseTemplate,\n useWorkspaces,\n workspaceHouseTemplateId,\n} from '@arbidocs/react'\nimport { contentPath } from '../../docx/NativeDocxEditor'\nimport {\n builtinHouseTemplate,\n type HouseTemplate,\n type HouseTemplateHost,\n} from '../../docx/template/HouseTemplate'\nimport { isCandidate } from '../../docx/template/candidates'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { useConnectedWorkspaceRole } from '../ConnectedWorkflowsTable'\n\nexport function useConnectedHouseTemplate(): HouseTemplateHost {\n const arbi = useArbi()\n const { mutateAsync: setWorkspaceTemplate } = useSetWorkspaceHouseTemplate()\n const { workspaceId, live, ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: workspaces } = useWorkspaces({ enabled: live })\n const workspace = workspaces?.find((w) => w.external_id === workspaceId)\n const { isWorkspaceOwner } = useConnectedWorkspaceRole()\n const supported = supportsHouseTemplates(workspace)\n const templateId = workspaceHouseTemplateId(workspace)\n // Only an eligible document (shared, Word, here or in a public workspace) is offered as the template.\n const { data: candidates } = useHouseTemplateCandidates(\n workspaceId,\n supported && isWorkspaceOwner\n )\n return useMemo<HouseTemplateHost>(\n () => ({\n load: async (): Promise<HouseTemplate> => {\n if (templateId) {\n await ensureWorkspaceOpen()\n const response = await arbi.editor.request(contentPath(templateId))\n const [record] = await arbi.documents.get([templateId]).catch(() => [])\n return {\n bytes: new Uint8Array(await response.arrayBuffer()),\n name: record?.file_name ?? 'House template.docx',\n source: 'workspace',\n documentId: templateId,\n }\n }\n if (supported) {\n const deployment = await arbi.houseTemplates.deployment()\n if (deployment) return { ...deployment, source: 'deployment' }\n }\n return builtinHouseTemplate()\n },\n setFromDocument:\n supported && isWorkspaceOwner\n ? async (documentId) => {\n await ensureWorkspaceOpen()\n await setWorkspaceTemplate(documentId)\n }\n : undefined,\n isEligible: (documentId) => isCandidate(candidates, documentId),\n }),\n [\n arbi,\n setWorkspaceTemplate,\n supported,\n templateId,\n isWorkspaceOwner,\n candidates,\n ensureWorkspaceOpen,\n ]\n )\n}\n","import { useMemo, useRef, useState } from 'react'\nimport { useQueryClient } from '@tanstack/react-query'\nimport { refreshDocuments, useArbi, useWorkspaceUsers } from '@arbidocs/react'\nimport {\n fetchSavedSignature,\n storeSavedSignature,\n useOptionalDocumentTools,\n} from '@arbidocs/react/document-tools'\nimport {\n NativeDocxEditor,\n type NativeDocxAdapter,\n type NativeDocxEditorProps,\n} from '../../docx/NativeDocxEditor'\nimport { loadDocxFonts } from '../../docx/fonts'\nimport { useRegisterOpenDocument } from '../../chat/open-document'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { useDocxCommentTarget, useNativeDocxSupport } from './support'\nimport { useConnectedDocxReferences } from './useConnectedDocxReferences'\nimport { useConnectedHouseTemplate } from './useConnectedHouseTemplate'\n\nexport type ConnectedNativeDocxEditorProps = Omit<NativeDocxEditorProps, 'adapter'> & {\n fontBaseUrl?: string\n}\n\n/**\n * The native Word editor on the signed-in ARBI session, under any host (`defaultHost`'s sign-in\n * layer, or the host's own `arbi` and session state). Until a live session has opened, a failure to\n * open one falls back to the saved copy, read-only, so the document is still readable; later token\n * refreshes are not guarded (switching modes would drop unsaved edits).\n */\nexport function ConnectedNativeDocxEditor({\n fontBaseUrl = '/native-docx/fonts',\n ...props\n}: ConnectedNativeDocxEditorProps) {\n const adapter = useConnectedNativeDocxAdapter(fontBaseUrl)\n const { workspaceId } = useConnectedWorkspace()\n const commentTarget = useDocxCommentTarget()\n const [openFailed, setOpenFailed] = useState(false)\n const hasOpened = useRef(false)\n const guardedAdapter = useMemo<NativeDocxAdapter>(\n () => ({\n ...adapter,\n open: async (documentId) => {\n try {\n const session = await adapter.open(documentId)\n hasOpened.current = true\n return session\n } catch (error) {\n if (!hasOpened.current) setOpenFailed(true)\n throw error\n }\n },\n }),\n [adapter]\n )\n // Drafting mode: the saved Word document being edited is what the chat is about. A history\n // snapshot, a streamed preview, an unsaved draft and an embedded body field are not.\n const live = !props.snapshot && !props.stream && !props.draftContent && !props.compact\n useRegisterOpenDocument({ documentId: live ? props.documentId : null, workspaceId })\n const initialCommentId =\n props.initialCommentId ??\n (commentTarget?.documentId === props.documentId ? commentTarget.commentId : undefined)\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n {openFailed && (\n <p role=\"status\" className=\"text-muted-foreground border-b px-3 py-2 text-xs\">\n Co-editing isn't available for this document right now, so this is a read-only copy\n of the last saved version.\n </p>\n )}\n <div className=\"min-h-0 flex-1\">\n <NativeDocxEditor\n {...props}\n snapshot={props.snapshot || openFailed}\n initialCommentId={initialCommentId}\n adapter={guardedAdapter}\n />\n </div>\n </div>\n )\n}\n\n/** The access token changed (a refresh): the live room is told the new one. */\nfunction tokenChanges(arbi: ReturnType<typeof useArbi>) {\n return (listener: () => void) => {\n if (!arbi.isLoggedIn) return () => {}\n const session = arbi.getClient().session\n let token = session.getState().accessToken\n return session.subscribe((state) => {\n if (state.accessToken === token) return\n token = state.accessToken\n listener()\n })\n }\n}\n\n/**\n * The native Word adapter on the signed-in session: the editor transport, the people to mention,\n * cross-references, the house template, and the host's extras (its host config's `docx`).\n */\nexport function useConnectedNativeDocxAdapter(fontBaseUrl = '/native-docx/fonts') {\n const arbi = useArbi()\n const { workspaceId, live, user, ensureWorkspaceOpen } = useConnectedWorkspace()\n const queries = useQueryClient()\n const { notify } = useBlocksEnvironment()\n const tools = useOptionalDocumentTools()\n const support = useNativeDocxSupport()\n const references = useConnectedDocxReferences()\n const houseTemplate = useConnectedHouseTemplate()\n const { data: members } = useWorkspaceUsers(workspaceId ?? undefined, {\n enabled: live && !!workspaceId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const onDocumentsChanged = tools?.onDocumentsChanged\n // Tracked changes and comments are authored by the user's first name.\n const author = (live && arbi.user.profile()?.givenName) || user?.name || 'You'\n const adapter = useMemo<NativeDocxAdapter>(\n () => ({\n request: async (path, options) => {\n await ensureWorkspaceOpen()\n return arbi.editor.request(path, options)\n },\n open: async (id) => {\n await ensureWorkspaceOpen()\n return (\n await arbi.editor.request(`/${encodeURIComponent(id)}/session`, { method: 'POST' })\n ).json()\n },\n save: async (id, state) =>\n (\n await arbi.editor.request(`/${encodeURIComponent(id)}/save`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ state }),\n })\n ).json(),\n loadFonts: () => loadDocxFonts(fontBaseUrl),\n baseUrl: arbi.getConnectionInfo()?.baseUrl || window.location.origin,\n author,\n subscribeTokenChanges: tokenChanges(arbi),\n onDirtyChange: support.onDirtyChange,\n // The document's row moves to the saved version in place: through the host when it keeps\n // the lists (its document tools refresh them), else here.\n onVersionSaved: async (id) => {\n await (onDocumentsChanged\n ? onDocumentsChanged([id], 'version')\n : refreshDocuments(queries, arbi, [id]))\n },\n notify,\n mentions: members?.map(({ user: member }) => ({\n id: member.external_id,\n name: [member.given_name, member.family_name].filter(Boolean).join(' '),\n kind: member.external_id.startsWith('agt-') ? 'agent' : 'human',\n })),\n savedSignature: {\n load: () => fetchSavedSignature(arbi.getClient().fetch),\n save: (signature) => storeSavedSignature(arbi.getClient().fetch, signature),\n defaultName: user?.name ?? '',\n },\n signatureSigners: members\n ?.filter(({ user: member }) => member.external_id.startsWith('usr-'))\n .map(({ user: member }) => ({\n email: member.email,\n name: [member.given_name, member.family_name].filter(Boolean).join(' '),\n })),\n requestAgent: async (id, request) => {\n const response = await arbi.editor.request(`/${encodeURIComponent(id)}/mentions`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n comment_id: request.commentId,\n instruction: request.instruction,\n request_id: request.requestId,\n recipient_ids: request.recipientIds,\n }),\n })\n const delivery = (await response.json()) as { response_ids: string[] }\n notify('Mention delivered.', 'success')\n return { responseIds: delivery.response_ids || [] }\n },\n getAgentStatus: async (responseId) => (await arbi.assistant.getResponse(responseId)).status,\n definitions: support.definitions,\n references,\n imageGeneration: support.imageGeneration,\n houseTemplate,\n }),\n [\n arbi,\n author,\n members,\n ensureWorkspaceOpen,\n fontBaseUrl,\n queries,\n notify,\n onDocumentsChanged,\n support,\n references,\n houseTemplate,\n user?.name,\n ]\n )\n return adapter\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { RowNavigatorControls, LabelPickerList } from './chunk-JMQLTMJ7.js';
|
|
2
3
|
import { DetailLoading, DetailBody, DetailSection, DetailFields, DetailField, DetailLinkList, DetailLinkItem, DetailEmpty } from './chunk-ZCOVDK2E.js';
|
|
3
4
|
import { page, minuteUtc, cell, paragraph, documentXml, docxPackage, TABLE_DOCUMENT_STYLES, groupDefinitions, compareDefinitions } from './chunk-DIB4JYUY.js';
|
|
4
|
-
import {
|
|
5
|
-
import { taskActivityHeadline, DEFAULT_TASK_ACTIVITY_LABELS } from './chunk-6RKMFTUJ.js';
|
|
5
|
+
import { taskActivityHeadline, DEFAULT_TASK_ACTIVITY_LABELS } from './chunk-KBOA5UFJ.js';
|
|
6
6
|
import { DocumentPicker } from './chunk-NUSBINUM.js';
|
|
7
7
|
import { ModalHeader } from './chunk-TX2ZICS7.js';
|
|
8
8
|
import { VisibilityToggle, cn, Textarea, Input, Button, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuItem, Checkbox, getEntityLabel, tagKindNouns, tagKindTitle, Popover, PopoverTrigger, PopoverContent, getEntityColor, isImageDocument, getDocumentTitle, Dialog, DialogContent, DialogTitle, DialogDescription } from '@arbidocs/react/ui';
|
|
@@ -2042,5 +2042,5 @@ function ExtractEntitiesDialog({
|
|
|
2042
2042
|
}
|
|
2043
2043
|
|
|
2044
2044
|
export { DEFAULT_GLOSSARY_LABELS, DEFAULT_TAG_COLUMNS_EDITOR_LABELS, DEFAULT_TAG_DETAIL_LABELS, DEFAULT_TAG_TABLE_DOCX_LABELS, DEFAULT_TAG_TABLE_LABELS, DEFAULT_THREAD_FOLLOW_LABELS, DEFAULT_WORKSPACE_ACTIVITY_LABELS, DEFAULT_WORKSPACE_NOTIFICATION_MENU_LABELS, EXTRACT_LIMIT, EntityIdentityBar, EntityTooltip, EntityTooltipHeader, EntityTooltipHint, EntityTooltipSection, EntityTooltipStats, ExtractEntitiesDialog, GridRowNavigator, IDENTITY_NAME_MAX_LENGTH, LoadingIndicator, SharedCell, TAG_TABLE_DOCX_LANDSCAPE_AFTER, TagColumnsEditor, TagDetail, TagPicker, TagTable, TagTableCell, ThreadFollowButton, ThreadFollowMenuItem, WorkspaceActivityList, WorkspaceNotificationMenu, cellText, cellValue, documentCount, entitiesPhrase, fieldWrites, glossaryDocumentXml, glossaryDocx, glossaryEntries, glossaryFileName, glossaryMarkdown, isGap, parseCell, rowLinks, tagDetailLabels, tagKindDescription, tagNoteLabel, tagTableDocumentXml, tagTableDocx, tagTableLabels, tagTableMarkdown, tagsPageNouns, workspaceActivityHeadline, workspaceActivityTarget };
|
|
2045
|
-
//# sourceMappingURL=chunk-
|
|
2046
|
-
//# sourceMappingURL=chunk-
|
|
2045
|
+
//# sourceMappingURL=chunk-RMJ6DH7F.js.map
|
|
2046
|
+
//# sourceMappingURL=chunk-RMJ6DH7F.js.map
|