@arbidocs/blocks 0.4.82 → 0.4.84
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/agents/index.cjs +279 -279
- package/dist/agents/index.js +4 -4
- package/dist/agents/workflows/StepBarFrame.d.ts +12 -4
- package/dist/{chunk-FE4ULGOR.js → chunk-2YOVK524.js} +28 -5
- package/dist/chunk-2YOVK524.js.map +1 -0
- package/dist/{chunk-5XVWGJ2H.cjs → chunk-B3WCKBJ7.cjs} +3 -3
- package/dist/{chunk-5XVWGJ2H.cjs.map → chunk-B3WCKBJ7.cjs.map} +1 -1
- package/dist/{chunk-THCFZKTM.js → chunk-CONIA2ZA.js} +8 -8
- package/dist/chunk-CONIA2ZA.js.map +1 -0
- package/dist/{chunk-O35LRB3P.js → chunk-GJV2G4FC.js} +3 -3
- package/dist/{chunk-O35LRB3P.js.map → chunk-GJV2G4FC.js.map} +1 -1
- package/dist/{chunk-ZVBPRMHJ.cjs → chunk-JH6JTI76.cjs} +27 -4
- package/dist/chunk-JH6JTI76.cjs.map +1 -0
- package/dist/{chunk-COP6GVKN.js → chunk-RSKSXEPW.js} +57 -19
- package/dist/chunk-RSKSXEPW.js.map +1 -0
- package/dist/{chunk-IRG5LPDP.js → chunk-RX35SMPR.js} +6 -6
- package/dist/{chunk-IRG5LPDP.js.map → chunk-RX35SMPR.js.map} +1 -1
- package/dist/{chunk-BX7JWZWE.cjs → chunk-RYYYHPFU.cjs} +8 -8
- package/dist/chunk-RYYYHPFU.cjs.map +1 -0
- package/dist/{chunk-VWK24TEY.cjs → chunk-XA5S4776.cjs} +45 -45
- package/dist/chunk-XA5S4776.cjs.map +1 -0
- package/dist/{chunk-LRRJ2HBW.cjs → chunk-ZQYE7J3J.cjs} +54 -14
- package/dist/chunk-ZQYE7J3J.cjs.map +1 -0
- package/dist/connect/index.cjs +81 -51
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +43 -13
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedWorkflowBuilder.d.ts +9 -2
- package/dist/connection/WorkflowRunnerDialogs.d.ts +12 -1
- package/dist/document-tools/SignDocumentDialog.d.ts +9 -2
- package/dist/document-tools/index.cjs +2 -2
- package/dist/document-tools/index.js +1 -1
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +22 -3
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +22 -4
- package/dist/files/index.js.map +1 -1
- package/dist/files/views/TagFormParts.d.ts +8 -0
- package/dist/files/views/index.d.ts +1 -1
- package/dist/home/index.cjs +1 -1
- package/dist/home/index.js +1 -1
- package/dist/index.cjs +891 -609
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +283 -12
- package/dist/index.js.map +1 -1
- package/dist/settings/index.cjs +35 -35
- package/dist/settings/index.js +3 -3
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +1 -1
- package/dist/studio/index.js +1 -1
- package/dist/tags/TagDetail.d.ts +38 -0
- package/dist/tags/TagMatrix.d.ts +27 -8
- package/dist/tags/TagsNav.d.ts +44 -0
- package/dist/tags/index.d.ts +8 -3
- package/dist/tags/tagMatrixDocx.d.ts +4 -1
- package/dist/tags/tagMatrixModel.d.ts +10 -6
- package/dist/workflow-canvas/index.cjs +82 -64
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +40 -22
- package/dist/workflow-canvas/index.js.map +1 -1
- package/dist/workspaces/index.cjs +1 -1
- package/dist/workspaces/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-BX7JWZWE.cjs.map +0 -1
- package/dist/chunk-COP6GVKN.js.map +0 -1
- package/dist/chunk-FE4ULGOR.js.map +0 -1
- package/dist/chunk-LRRJ2HBW.cjs.map +0 -1
- package/dist/chunk-THCFZKTM.js.map +0 -1
- package/dist/chunk-VWK24TEY.cjs.map +0 -1
- package/dist/chunk-ZVBPRMHJ.cjs.map +0 -1
package/dist/connect/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { SettingsSection, ProfileCard, AvatarPicker, IdentityVerificationCard, IdentityVerificationDialog, RequireVerified, SettingsCard, SettingsActionRow, PasswordChangeDialog, EMAIL_NOTIFICATION_KEYS, EMAIL_NOTIFICATION_CATEGORIES, NotificationCategoryList, toNotificationCategories, toActiveSessionViews, SettingsRow, ActiveSessionsDialog, LogoutDialog, toLogoutSessionViews, SettingsDangerZone, DeleteAccountDialog, toDeleteBlockerViews } from '../chunk-
|
|
2
|
+
import { SettingsSection, ProfileCard, AvatarPicker, IdentityVerificationCard, IdentityVerificationDialog, RequireVerified, SettingsCard, SettingsActionRow, PasswordChangeDialog, EMAIL_NOTIFICATION_KEYS, EMAIL_NOTIFICATION_CATEGORIES, NotificationCategoryList, toNotificationCategories, toActiveSessionViews, SettingsRow, ActiveSessionsDialog, LogoutDialog, toLogoutSessionViews, SettingsDangerZone, DeleteAccountDialog, toDeleteBlockerViews } from '../chunk-GJV2G4FC.js';
|
|
3
3
|
import { useWorkspaceDocs } from '../chunk-XQDM6T6C.js';
|
|
4
4
|
export { ConnectedAssistantDock, redlineStats, textToArtifact, toRedlineMarkdown, useConnectedAiTask, useConnectedChat, useSemanticSearch, useWorkspaceDocs } from '../chunk-XQDM6T6C.js';
|
|
5
5
|
import { ConnectedNativeDocxEditor } from '../chunk-A24C6BNA.js';
|
|
6
6
|
import { ConnectionProvider, useConnection } from '../chunk-OYMWV45N.js';
|
|
7
7
|
export { ConnectionProvider, SESSION_EXPIRED_MESSAGE, isAuthenticated, useConnection } from '../chunk-OYMWV45N.js';
|
|
8
|
-
import { SignDocumentDialog } from '../chunk-
|
|
8
|
+
import { SignDocumentDialog } from '../chunk-2YOVK524.js';
|
|
9
9
|
import '../chunk-OPA2Y6YZ.js';
|
|
10
|
-
import { TagMatrix, tagMatrixDocx, DOCX_MIME_TYPE } from '../chunk-
|
|
11
|
-
import { splitDocRef, WorkflowStepBar, stepLevels, WorkflowRunner, initialRunInputs, workflowSteps, fromPlanSteps, stepStatesFromActivity, toPlanSteps, runThreadTitle, useWorkflowView, stepFields } from '../chunk-
|
|
10
|
+
import { TagMatrix, tagMatrixDocx, DOCX_MIME_TYPE } from '../chunk-RSKSXEPW.js';
|
|
11
|
+
import { splitDocRef, WorkflowStepBar, stepLevels, WorkflowRunner, initialRunInputs, workflowSteps, fromPlanSteps, stepStatesFromActivity, toPlanSteps, runThreadTitle, useWorkflowView, stepFields } from '../chunk-CONIA2ZA.js';
|
|
12
12
|
import '../chunk-EVUEIBNU.js';
|
|
13
13
|
import '../chunk-XD2M6LIG.js';
|
|
14
14
|
import { StreamedArtifactFrame } from '../chunk-LOJVUGBJ.js';
|
|
15
15
|
import '../chunk-VILAPTCB.js';
|
|
16
|
-
import { ModalScaffold } from '../chunk-TX2ZICS7.js';
|
|
17
16
|
import { ChatPage } from '../chunk-EWSEQEPL.js';
|
|
18
17
|
import '../chunk-KZJAG7T3.js';
|
|
19
18
|
import '../chunk-HOXKR26S.js';
|
|
20
19
|
import '../chunk-AA3PT6KR.js';
|
|
21
20
|
import '../chunk-NPLYHR2E.js';
|
|
22
21
|
import { initials } from '../chunk-OXF2IFXG.js';
|
|
22
|
+
import { ModalScaffold } from '../chunk-TX2ZICS7.js';
|
|
23
23
|
import '../chunk-7F6CBP3Z.js';
|
|
24
24
|
import '../chunk-VUNV25KB.js';
|
|
25
25
|
import { lazy, useState, Suspense, useEffect, useRef, useCallback, useMemo } from 'react';
|
|
@@ -29,7 +29,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
29
29
|
import { Button, Label, Input, cn } from '@arbidocs/react/ui';
|
|
30
30
|
import { useStreamedArtifact } from '@arbidocs/react/artifacts';
|
|
31
31
|
import { ExternalLink, UserCircle, KeyRound, Radio, Loader2, MessageSquare } from 'lucide-react';
|
|
32
|
-
import { useOptionalDocumentTools, DocumentToolsProvider } from '@arbidocs/react/document-tools';
|
|
32
|
+
import { useOptionalDocumentTools, fetchDocumentPdf, DocumentToolsProvider } from '@arbidocs/react/document-tools';
|
|
33
33
|
import { useNotify } from '@arbidocs/react/shell';
|
|
34
34
|
|
|
35
35
|
function ConnectionBoundWebSocket({ children }) {
|
|
@@ -429,6 +429,7 @@ function WorkflowRunThread({
|
|
|
429
429
|
}
|
|
430
430
|
var DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS = {
|
|
431
431
|
loadingDocument: "Opening the document\u2026",
|
|
432
|
+
preparingDocument: "The PDF is still being prepared\u2026",
|
|
432
433
|
documentFailed: "The document could not be opened.",
|
|
433
434
|
reviewTitle: "Review",
|
|
434
435
|
reviewDescription: "Each document against each review column.",
|
|
@@ -436,6 +437,9 @@ var DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS = {
|
|
|
436
437
|
empty: "\u2014",
|
|
437
438
|
wordTitle: "Tracked changes"
|
|
438
439
|
};
|
|
440
|
+
var SIGN_PDF_RETRIES = 4;
|
|
441
|
+
var SIGN_PDF_RETRY_DELAY_MS = 1500;
|
|
442
|
+
var wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
439
443
|
function WorkflowSignDialog({
|
|
440
444
|
docRef,
|
|
441
445
|
onClose,
|
|
@@ -444,18 +448,33 @@ function WorkflowSignDialog({
|
|
|
444
448
|
const arbi = useArbi();
|
|
445
449
|
const { user, ensureWorkspaceOpen } = useConnection();
|
|
446
450
|
const tools = useOptionalDocumentTools();
|
|
447
|
-
const { id, version } = splitDocRef(docRef);
|
|
451
|
+
const { id, version: stepVersion } = splitDocRef(docRef);
|
|
452
|
+
const [version, setVersion] = useState(stepVersion);
|
|
448
453
|
const [pdf, setPdf] = useState(null);
|
|
454
|
+
const [preparing, setPreparing] = useState(false);
|
|
449
455
|
const [failed, setFailed] = useState(false);
|
|
450
456
|
useEffect(() => {
|
|
451
457
|
let live = true;
|
|
458
|
+
setPdf(null);
|
|
459
|
+
setFailed(false);
|
|
460
|
+
setPreparing(false);
|
|
452
461
|
void (async () => {
|
|
453
462
|
try {
|
|
454
463
|
await ensureWorkspaceOpen();
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
464
|
+
const client = arbi.getClient().fetch;
|
|
465
|
+
const ref = version ? `${id}@v${version}` : id;
|
|
466
|
+
for (let attempt = 0; ; attempt++) {
|
|
467
|
+
try {
|
|
468
|
+
const blob = await fetchDocumentPdf(client, ref);
|
|
469
|
+
if (live) setPdf(blob);
|
|
470
|
+
return;
|
|
471
|
+
} catch (err) {
|
|
472
|
+
if (!live || attempt >= SIGN_PDF_RETRIES) throw err;
|
|
473
|
+
setPreparing(true);
|
|
474
|
+
await wait(SIGN_PDF_RETRY_DELAY_MS);
|
|
475
|
+
if (!live) return;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
459
478
|
} catch {
|
|
460
479
|
if (live) setFailed(true);
|
|
461
480
|
}
|
|
@@ -476,11 +495,22 @@ function WorkflowSignDialog({
|
|
|
476
495
|
children: /* @__PURE__ */ jsx(ModalScaffold.Body, { children: /* @__PURE__ */ jsx("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: failed ? labels.documentFailed : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
477
496
|
/* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" }),
|
|
478
497
|
" ",
|
|
479
|
-
labels.loadingDocument
|
|
498
|
+
preparing ? labels.preparingDocument : labels.loadingDocument
|
|
480
499
|
] }) }) })
|
|
481
500
|
}
|
|
482
501
|
);
|
|
483
|
-
const dialog = /* @__PURE__ */ jsx(
|
|
502
|
+
const dialog = /* @__PURE__ */ jsx(
|
|
503
|
+
SignDocumentDialog,
|
|
504
|
+
{
|
|
505
|
+
open: true,
|
|
506
|
+
onOpenChange: (o) => !o && onClose(),
|
|
507
|
+
documentId: id,
|
|
508
|
+
pdfBlob: pdf,
|
|
509
|
+
version,
|
|
510
|
+
onOpenCurrent: () => setVersion(void 0)
|
|
511
|
+
},
|
|
512
|
+
version ?? "current"
|
|
513
|
+
);
|
|
484
514
|
return tools ? dialog : /* @__PURE__ */ jsx(
|
|
485
515
|
DocumentToolsProvider,
|
|
486
516
|
{
|